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

This commit is contained in:
wanckl
2026-06-26 18:35:09 +08:00
parent f4cf285425
commit 70b0edb30a
15 changed files with 226 additions and 56 deletions
+12 -1
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -622,6 +622,17 @@ static inline void twai_ll_set_acc_filter(twai_dev_t *hw, uint32_t code, uint32_
/* ------------------------- TX/RX Buffer Registers ------------------------- */
/**
* @brief Get the number of TX buffers that are preset in the hardware.
*
* @param hw Pointer to the TWAI-FD device hardware.
* @return The number of TX buffers available.
*/
static inline uint32_t twai_ll_get_tx_buffer_total(twai_dev_t *hw)
{
return 1; // only one TX buffer
}
/**
* @brief Copy a formatted TWAI frame into TX buffer for transmission
*