twai_driver_install_v2() function
Install TWAI driver and return a handle
Arguments
g_config
General configuration structure
t_config
Timing configuration structure
f_config
Filter configuration structure
ret_twai
Pointer to a new created TWAI handle
Return value
- ESP_OK: Successfully installed TWAI driver - ESP_ERR_INVALID_ARG: Arguments are invalid, e.g. invalid clock source, invalid quanta resolution, invalid controller ID - ESP_ERR_NO_MEM: Insufficient memory - ESP_ERR_INVALID_STATE: Driver is already installed
Notes
This is an advanced version of `twai_driver_install` that can return a driver handle, so that it allows you to install multiple TWAI drivers. Don't forget to set the proper controller_id in the `twai_general_config_t` Please refer to the documentation of `twai_driver_install` for more details.