diff --git a/include/btstack/run_loop.h b/include/btstack/run_loop.h index ddb2d856a..9e31cdaec 100644 --- a/include/btstack/run_loop.h +++ b/include/btstack/run_loop.h @@ -98,7 +98,9 @@ void run_loop_execute(void); uint32_t embedded_get_ticks(void); uint32_t embedded_ticks_for_ms(uint32_t time_in_ms); #endif - +#ifdef EMBEDDED +void embedded_trigger(void); +#endif #if defined __cplusplus } #endif diff --git a/src/hci_transport_h4_dma.c b/src/hci_transport_h4_dma.c index 8203c31f0..61b9dea34 100644 --- a/src/hci_transport_h4_dma.c +++ b/src/hci_transport_h4_dma.c @@ -190,6 +190,8 @@ static void h4_block_received(void){ case H4_W4_PAYLOAD: h4_state = H4_PACKET_RECEIVED; bytes_to_read = 0; + // trigger run loop + embedded_trigger(); break; default: @@ -212,6 +214,8 @@ static void h4_block_sent(void){ break; case TX_W4_PACKET_SENT: tx_state = TX_DONE; + // trigger run loop + embedded_trigger(); break; default: break;