TWAI: Track HW state in HAL

This commit refactors the TWAI HAL such that it
now tracks  harwdare state instead of the driver
layer. Some HAL and LL cleanup was also done.
This commit is contained in:
Darian Leung
2020-07-24 23:21:53 +08:00
parent 36720504f9
commit 7398390049
8 changed files with 249 additions and 362 deletions
+3 -3
View File
@@ -166,9 +166,9 @@ esp_err_t twai_driver_uninstall(void);
*
* This function starts the TWAI driver, putting the TWAI driver into the running
* state. This allows the TWAI driver to participate in TWAI bus activities such
* as transmitting/receiving messages. The RX queue is reset in this function,
* clearing any unread messages. This function can only be called when the TWAI
* driver is in the stopped state.
* as transmitting/receiving messages. The TX and RX queue are reset in this function,
* clearing any messages that are unread or pending transmission. This function
* can only be called when the TWAI driver is in the stopped state.
*
* @return
* - ESP_OK: TWAI driver is now running