From 03d3482357f4b89956a5b8c9760d72b5d9d8fb19 Mon Sep 17 00:00:00 2001 From: SkorP Date: Fri, 18 Aug 2023 13:00:42 +0400 Subject: [PATCH] SubGhz: fix RXFIFO_OVERFLOW --- applications/drivers/subghz/cc1101_ext/cc1101_ext.c | 2 +- firmware/targets/f7/furi_hal/furi_hal_subghz.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/drivers/subghz/cc1101_ext/cc1101_ext.c b/applications/drivers/subghz/cc1101_ext/cc1101_ext.c index 0c5346749..a29c8e3de 100644 --- a/applications/drivers/subghz/cc1101_ext/cc1101_ext.c +++ b/applications/drivers/subghz/cc1101_ext/cc1101_ext.c @@ -357,7 +357,7 @@ bool subghz_device_cc1101_ext_rx_pipe_not_empty() { (CC1101_STATUS_RXBYTES) | CC1101_BURST, (uint8_t*)status); furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle); - if((status->NUM_RXBYTES > 0) && (status->RXFIFO_OVERFLOW == 0)) { + if((status->NUM_RXBYTES > 0) || (status->RXFIFO_OVERFLOW == 0)) { return true; } else { return false; diff --git a/firmware/targets/f7/furi_hal/furi_hal_subghz.c b/firmware/targets/f7/furi_hal/furi_hal_subghz.c index be0e8cdd8..94965694e 100644 --- a/firmware/targets/f7/furi_hal/furi_hal_subghz.c +++ b/firmware/targets/f7/furi_hal/furi_hal_subghz.c @@ -234,7 +234,7 @@ bool furi_hal_subghz_rx_pipe_not_empty() { cc1101_read_reg( &furi_hal_spi_bus_handle_subghz, (CC1101_STATUS_RXBYTES) | CC1101_BURST, (uint8_t*)status); furi_hal_spi_release(&furi_hal_spi_bus_handle_subghz); - if((status->NUM_RXBYTES > 0) && (status->RXFIFO_OVERFLOW == 0)) { + if((status->NUM_RXBYTES > 0) || (status->RXFIFO_OVERFLOW == 0)) { return true; } else { return false;