fix: increase delay duration in reset function and adjust data reading logic
This commit is contained in:
@ -141,9 +141,9 @@ reset() {
|
|||||||
}
|
}
|
||||||
gpio::set_mode(RST_PIN, gpio::Mode::OUTPUT);
|
gpio::set_mode(RST_PIN, gpio::Mode::OUTPUT);
|
||||||
gpio::digital_write(RST_PIN, false);
|
gpio::digital_write(RST_PIN, false);
|
||||||
delay_ms(10);
|
delay_ms(100);
|
||||||
gpio::digital_write(RST_PIN, true);
|
gpio::digital_write(RST_PIN, true);
|
||||||
delay_ms(10);
|
delay_ms(100);
|
||||||
const auto instant = Instant<>{};
|
const auto instant = Instant<>{};
|
||||||
constexpr auto INTERVAL = std::chrono::duration<uint16_t, std::milli>{spi::DEFAULT_TIMEOUT_MS};
|
constexpr auto INTERVAL = std::chrono::duration<uint16_t, std::milli>{spi::DEFAULT_TIMEOUT_MS};
|
||||||
decltype(standby()) res = ue_t{error_t{error::FAILED}};
|
decltype(standby()) res = ue_t{error_t{error::FAILED}};
|
||||||
@ -988,7 +988,7 @@ read_data_internal() {
|
|||||||
* each time the transceiver enters Rx mode. In continuous mode the pointer
|
* each time the transceiver enters Rx mode. In continuous mode the pointer
|
||||||
* is incremented starting from the previous position.
|
* is incremented starting from the previous position.
|
||||||
*/
|
*/
|
||||||
const auto [sz, ptr] = std::move(*tuple_);
|
const auto [sz, ptr] = *tuple_;
|
||||||
// the rx pointer would become 0x80 at first, so we need to adapt that behavior
|
// the rx pointer would become 0x80 at first, so we need to adapt that behavior
|
||||||
const auto r_ptr = ptr - sz < DEFAULT_RX_BUFFER_ADDRESS ? ptr : ptr - sz;
|
const auto r_ptr = ptr - sz < DEFAULT_RX_BUFFER_ADDRESS ? ptr : ptr - sz;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user