1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +04:00

FuriHalSerial: Fix RXFNE interrupt hang (#4246)

* Expansion: Wake thread on UART error flag

* Expansion: Stop UART async rx early

* FuriHalSerial: Fix RXFNE interrupt hang

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
This commit is contained in:
WillyJL
2025-09-24 12:24:09 +02:00
committed by GitHub
parent dfd753703a
commit 7f0e8f39d3
2 changed files with 43 additions and 29 deletions

View File

@@ -35,7 +35,8 @@ typedef enum {
ExpansionWorkerFlagError = 1 << 2,
} ExpansionWorkerFlag;
#define EXPANSION_ALL_FLAGS (ExpansionWorkerFlagData | ExpansionWorkerFlagStop)
#define EXPANSION_ALL_FLAGS \
(ExpansionWorkerFlagData | ExpansionWorkerFlagStop | ExpansionWorkerFlagError)
struct ExpansionWorker {
FuriThread* thread;
@@ -360,6 +361,8 @@ static int32_t expansion_worker(void* context) {
expansion_worker_state_machine(instance);
}
furi_hal_serial_async_rx_stop(instance->serial_handle);
if(instance->state == ExpansionWorkerStateRpcActive) {
expansion_worker_rpc_session_close(instance);
}