mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(twai): graduate the hal drivers into esp_hal_twai component
This commit is contained in:
@@ -5,7 +5,7 @@ menu "TWAI Configuration"
|
||||
|
||||
config EXAMPLE_ENABLE_TWAI_FD
|
||||
bool "Enable TWAI-FD Support"
|
||||
depends on SOC_TWAI_SUPPORT_FD
|
||||
depends on SOC_TWAI_FD_SUPPORTED
|
||||
default false
|
||||
help
|
||||
Enable TWAI-FD (Flexible Data-rate) support.
|
||||
|
||||
@@ -388,8 +388,6 @@ static int twai_dump_handler(int argc, char **argv)
|
||||
ret = twai_node_disable(controller->node_handle);
|
||||
ESP_RETURN_ON_ERROR(ret, TAG, "Failed to disable TWAI node%d for filter configuration: %s", controller_id, esp_err_to_name(ret));
|
||||
|
||||
ret = (SOC_TWAI_MASK_FILTER_NUM > 0) ? ESP_OK : ESP_ERR_INVALID_STATE;
|
||||
ESP_RETURN_ON_ERROR(ret, TAG, "TWAI%d does not support %d mask filters", controller_id, SOC_TWAI_MASK_FILTER_NUM);
|
||||
if (mask_count > 0) {
|
||||
for (int i = 0; i < mask_count; i++) {
|
||||
ret = twai_node_config_mask_filter(controller->node_handle, i,
|
||||
|
||||
@@ -477,7 +477,7 @@ def test_twai_utils_send_various_frames(twai: TwaiTestHelper) -> None:
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', soc_filtered_targets('SOC_TWAI_SUPPORT_FD == 1'), indirect=['target'])
|
||||
@idf_parametrize('target', soc_filtered_targets('SOC_TWAI_FD_SUPPORTED == 1'), indirect=['target'])
|
||||
def test_twai_utils_fd_frames(twai: TwaiTestHelper) -> None:
|
||||
with twai.session():
|
||||
FD_FRAMES = [
|
||||
|
||||
Reference in New Issue
Block a user