Function esp_idf_sys::twai_stop

source ยท
pub unsafe extern "C" fn twai_stop() -> esp_err_t
Expand description

@brief Stop the TWAI driver

This function stops the TWAI driver, preventing any further message from being transmitted or received until twai_start() is called. Any messages in the TX queue are cleared. Any messages in the RX queue should be read by the application after this function is called. This function can only be called when the TWAI driver is in the running state.

@warning A message currently being transmitted/received on the TWAI bus will be ceased immediately. This may lead to other TWAI nodes interpreting the unfinished message as an error.

@return - ESP_OK: TWAI driver is now Stopped - ESP_ERR_INVALID_STATE: Driver is not in running state, or is not installed