No interrupt for packets bigger than 64 bytes

This commit is contained in:
Crsarmv7l 2025-02-11 20:02:47 +01:00 committed by GitHub
parent 1bee00bc64
commit 42b981d63c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -240,7 +240,7 @@ int16_t CC1101::startTransmit(const uint8_t* data, size_t len, uint8_t addr) {
SPIsendCommand(RADIOLIB_CC1101_CMD_FSTXON); SPIsendCommand(RADIOLIB_CC1101_CMD_FSTXON);
// Check MARCSTATE and wait until ready to tx // Check MARCSTATE and wait until ready to tx
// 724us is the longest time for callibrate per datasheet // 724us is the longest time for calibrate per datasheet
RadioLibTime_t start = this->mod->hal->micros(); RadioLibTime_t start = this->mod->hal->micros();
while(SPIgetRegValue(RADIOLIB_CC1101_REG_MARCSTATE, 4, 0) != 0x12) { while(SPIgetRegValue(RADIOLIB_CC1101_REG_MARCSTATE, 4, 0) != 0x12) {
if(this->mod->hal->micros() - start > 724) { if(this->mod->hal->micros() - start > 724) {
@ -249,9 +249,12 @@ int16_t CC1101::startTransmit(const uint8_t* data, size_t len, uint8_t addr) {
} }
} }
// set GDO0 mapping // set GDO0 mapping only if we aren't refilling the FIFO
int16_t state = SPIsetRegValue(RADIOLIB_CC1101_REG_IOCFG2, RADIOLIB_CC1101_GDOX_SYNC_WORD_SENT_OR_PKT_RECEIVED, 5, 0); int16_t state
RADIOLIB_ASSERT(state); if (len <= RADIOLIB_CC1101_FIFO_SIZE) {
state = SPIsetRegValue(RADIOLIB_CC1101_REG_IOCFG2, RADIOLIB_CC1101_GDOX_SYNC_WORD_SENT_OR_PKT_RECEIVED, 5, 0);
RADIOLIB_ASSERT(state);
}
// data put on FIFO // data put on FIFO
uint8_t dataSent = 0; uint8_t dataSent = 0;
@ -307,7 +310,7 @@ int16_t CC1101::startTransmit(const uint8_t* data, size_t len, uint8_t addr) {
int16_t CC1101::finishTransmit() { int16_t CC1101::finishTransmit() {
// set mode to standby to disable transmitter/RF switch // set mode to standby to disable transmitter/RF switch
// Check MARCSTATE for Idle // Check MARCSTATE for Idle to let anything in the FIFO empty
// Timeout is 2x FIFO transmit time // Timeout is 2x FIFO transmit time
RadioLibTime_t timeout = (1.0f/(this->bitRate))*(RADIOLIB_CC1101_FIFO_SIZE*2.0f); RadioLibTime_t timeout = (1.0f/(this->bitRate))*(RADIOLIB_CC1101_FIFO_SIZE*2.0f);
RadioLibTime_t start = this->mod->hal->millis(); RadioLibTime_t start = this->mod->hal->millis();