fix(driver_twai): fixed TWAI arbitration lost event handling

Merges https://github.com/espressif/esp-idf/pull/18100
This commit is contained in:
Franz Höpfinger
2026-04-01 10:55:53 +08:00
committed by morris
parent 94aaff3981
commit c423155728
4 changed files with 61 additions and 10 deletions
+3 -1
View File
@@ -272,7 +272,9 @@ twai_error_state_t twai_hal_get_err_state(twai_hal_context_t *hal_ctx);
__attribute__((always_inline))
static inline twai_error_flags_t twai_hal_get_err_flags(twai_hal_context_t *hal_ctx)
{
return hal_ctx->errors;
twai_error_flags_t error_flags = hal_ctx->errors;
hal_ctx->errors.val = 0; // clear ctx for next errors
return error_flags;
}
/* ------------------------------- TX and RX -------------------------------- */