feat(driver_twai): support using all 4 hardware tx buffer

This commit is contained in:
wanckl
2026-06-24 14:15:51 +08:00
committed by Wan Lei
parent 15a1a86a0a
commit ec31ba1c6c
17 changed files with 241 additions and 58 deletions
+2 -2
View File
@@ -243,8 +243,8 @@ static void twai_intr_handler_main(void *arg)
//Note: This event will never occur if there is a periph reset event
twai_handle_rx_buffer_frames(p_twai_obj, &task_woken, &alert_req);
}
if (events & TWAI_HAL_EVENT_TX_BUFF_FREE) {
twai_handle_tx_buffer_frame(p_twai_obj, (events & TWAI_HAL_EVENT_TX_SUCCESS), &task_woken, &alert_req);
if (events & TWAI_HAL_EVENT_TX0_DONE) {
twai_handle_tx_buffer_frame(p_twai_obj, (events & TWAI_HAL_EVENT_TX0_SUCCESS), &task_woken, &alert_req);
}
//Handle events that only require alerting (i.e. no handler)