Function esp_idf_svc::sys::twai_driver_install
source ยท pub unsafe extern "C" fn twai_driver_install(
g_config: *const twai_general_config_t,
t_config: *const twai_timing_config_t,
f_config: *const twai_filter_config_t,
) -> i32
Expand description
@brief Install TWAI driver
This function installs the TWAI driver using three configuration structures. The required memory is allocated and the TWAI driver is placed in the stopped state after running this function.
@param[in] g_config General configuration structure @param[in] t_config Timing configuration structure @param[in] f_config Filter configuration structure
@note Macro initializers are available for the configuration structures (see documentation)
@note To reinstall the TWAI driver, call twai_driver_uninstall() first
@return - ESP_OK: Successfully installed TWAI driver - ESP_ERR_INVALID_ARG: Arguments are invalid, e.g. invalid clock source, invalid quanta resolution - ESP_ERR_NO_MEM: Insufficient memory - ESP_ERR_INVALID_STATE: Driver is already installed