Merge branch 'fix/twai_tag_not_defined_in_configure_gpio' into 'release/v5.0'

fix(twai): fix build error TWAI_TAG used but not defined (v5.0)

See merge request espressif/esp-idf!27811
This commit is contained in:
Jiang Jiang Jian
2023-12-15 19:29:27 +08:00

View File

@ -27,6 +27,7 @@
/* ---------------------------- Definitions --------------------------------- */
//Internal Macros
#define TWAI_TAG "TWAI"
#define TWAI_CHECK(cond, ret_val) ({ \
if (!(cond)) { \
return (ret_val); \
@ -40,11 +41,11 @@
})
#define TWAI_SET_FLAG(var, mask) ((var) |= (mask))
#define TWAI_RESET_FLAG(var, mask) ((var) &= ~(mask))
#ifdef CONFIG_TWAI_ISR_IN_IRAM
#define TWAI_ISR_ATTR IRAM_ATTR
#define TWAI_MALLOC_CAPS (MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT)
#else
#define TWAI_TAG "TWAI"
#define TWAI_ISR_ATTR
#define TWAI_MALLOC_CAPS MALLOC_CAP_DEFAULT
#endif //CONFIG_TWAI_ISR_IN_IRAM
@ -463,7 +464,6 @@ esp_err_t twai_driver_install(const twai_general_config_t *g_config, const twai_
//Assign GPIO
ret = twai_configure_gpio(g_config->tx_io, g_config->rx_io, g_config->clkout_io, g_config->bus_off_io);
if (ESP_OK != ret) {
ESP_LOGE(TWAI_TAG, "init gpio for twai failed");
goto err;
}