Function esp_idf_svc::hal::sys::twai_initiate_recovery
source ยท pub unsafe extern "C" fn twai_initiate_recovery() -> i32
Expand description
@brief Start the bus recovery process
This function initiates the bus recovery process when the TWAI driver is in the bus-off state. Once initiated, the TWAI driver will enter the recovering state and wait for 128 occurrences of the bus-free signal on the TWAI bus before returning to the stopped state. This function will reset the TX queue, clearing any messages pending transmission.
@note The BUS_RECOVERED alert can be enabled to alert the application when the bus recovery process completes.
@return - ESP_OK: Bus recovery started - ESP_ERR_INVALID_STATE: TWAI driver is not in the bus-off state, or is not installed