Skip to content

Commit 4405944

Browse files
authored
Merge pull request #7 from ramonverde/main
Fix sx126x_getDeviceErrors to read 3 bytes from response
2 parents f718541 + 79770cc commit 4405944

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/SX126x_driver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,9 @@ void sx126x_resetStats()
374374

375375
void sx126x_getDeviceErrors(uint16_t* opError)
376376
{
377-
uint8_t buf[2];
378-
sx126x_transfer(0x17, buf, 2);
379-
*opError = buf[1];
377+
uint8_t buf[3];
378+
sx126x_transfer(0x17, buf, 3);
379+
*opError = buf[2];
380380
}
381381

382382
void sx126x_clearDeviceErrors()

0 commit comments

Comments
 (0)