mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 10:30:58 +02:00
fix(usb/host): Use ESP_INTR_FLAG_LOWMED interrupt priority for USB examples
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: CC0-1.0
|
||||
*/
|
||||
@@ -109,7 +109,7 @@ void app_main(void)
|
||||
ESP_LOGI(TAG, "Installing USB Host");
|
||||
const usb_host_config_t host_config = {
|
||||
.skip_phy_setup = false,
|
||||
.intr_flags = ESP_INTR_FLAG_LEVEL1,
|
||||
.intr_flags = ESP_INTR_FLAG_LOWMED,
|
||||
};
|
||||
ESP_ERROR_CHECK(usb_host_install(&host_config));
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: CC0-1.0
|
||||
*/
|
||||
@@ -111,7 +111,7 @@ extern "C" void app_main(void)
|
||||
ESP_LOGI(TAG, "Installing USB Host");
|
||||
usb_host_config_t host_config = {};
|
||||
host_config.skip_phy_setup = false;
|
||||
host_config.intr_flags = ESP_INTR_FLAG_LEVEL1;
|
||||
host_config.intr_flags = ESP_INTR_FLAG_LOWMED;
|
||||
ESP_ERROR_CHECK(usb_host_install(&host_config));
|
||||
|
||||
// Create a task that will handle USB library events
|
||||
|
@@ -557,7 +557,7 @@ static void usb_lib_task(void *arg)
|
||||
{
|
||||
const usb_host_config_t host_config = {
|
||||
.skip_phy_setup = false,
|
||||
.intr_flags = ESP_INTR_FLAG_LEVEL1,
|
||||
.intr_flags = ESP_INTR_FLAG_LOWMED,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(usb_host_install(&host_config));
|
||||
@@ -645,7 +645,7 @@ void app_main(void)
|
||||
.intr_type = GPIO_INTR_NEGEDGE,
|
||||
};
|
||||
ESP_ERROR_CHECK(gpio_config(&input_pin));
|
||||
ESP_ERROR_CHECK(gpio_install_isr_service(ESP_INTR_FLAG_LEVEL1));
|
||||
ESP_ERROR_CHECK(gpio_install_isr_service(ESP_INTR_FLAG_LOWMED));
|
||||
ESP_ERROR_CHECK(gpio_isr_handler_add(APP_QUIT_PIN, gpio_isr_cb, NULL));
|
||||
|
||||
/*
|
||||
|
@@ -421,7 +421,7 @@ static void speed_test(int slot)
|
||||
*/
|
||||
static void usb_task(void *args)
|
||||
{
|
||||
const usb_host_config_t host_config = { .intr_flags = ESP_INTR_FLAG_LEVEL1 };
|
||||
const usb_host_config_t host_config = { .intr_flags = ESP_INTR_FLAG_LOWMED };
|
||||
ESP_ERROR_CHECK(usb_host_install(&host_config));
|
||||
|
||||
const msc_host_driver_config_t msc_config = {
|
||||
@@ -508,7 +508,7 @@ void app_main(void)
|
||||
.intr_type = GPIO_INTR_NEGEDGE,
|
||||
};
|
||||
ESP_ERROR_CHECK(gpio_config(&input_pin));
|
||||
ESP_ERROR_CHECK(gpio_install_isr_service(ESP_INTR_FLAG_LEVEL1));
|
||||
ESP_ERROR_CHECK(gpio_install_isr_service(ESP_INTR_FLAG_LOWMED));
|
||||
ESP_ERROR_CHECK(gpio_isr_handler_add(APP_QUIT_PIN, gpio_cb, NULL));
|
||||
|
||||
ESP_LOGI(TAG, "Waiting for USB flash drive to be connected");
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
@@ -109,7 +109,7 @@ static void usb_host_lib_task(void *arg)
|
||||
ESP_LOGI(TAG, "Installing USB Host Library");
|
||||
usb_host_config_t host_config = {
|
||||
.skip_phy_setup = false,
|
||||
.intr_flags = ESP_INTR_FLAG_LEVEL1,
|
||||
.intr_flags = ESP_INTR_FLAG_LOWMED,
|
||||
# ifdef ENABLE_ENUM_FILTER_CALLBACK
|
||||
.enum_filter_cb = set_config_cb,
|
||||
# endif // ENABLE_ENUM_FILTER_CALLBACK
|
||||
@@ -161,7 +161,7 @@ void app_main(void)
|
||||
.intr_type = GPIO_INTR_NEGEDGE,
|
||||
};
|
||||
ESP_ERROR_CHECK(gpio_config(&input_pin));
|
||||
ESP_ERROR_CHECK(gpio_install_isr_service(ESP_INTR_FLAG_LEVEL1));
|
||||
ESP_ERROR_CHECK(gpio_install_isr_service(ESP_INTR_FLAG_LOWMED));
|
||||
ESP_ERROR_CHECK(gpio_isr_handler_add(APP_QUIT_PIN, gpio_cb, NULL));
|
||||
|
||||
app_event_queue = xQueueCreate(10, sizeof(app_event_queue_t));
|
||||
|
@@ -211,7 +211,7 @@ void app_main(void)
|
||||
ESP_LOGI(TAG, "Installing USB Host");
|
||||
const usb_host_config_t host_config = {
|
||||
.skip_phy_setup = false,
|
||||
.intr_flags = ESP_INTR_FLAG_LEVEL1,
|
||||
.intr_flags = ESP_INTR_FLAG_LOWMED,
|
||||
};
|
||||
ESP_ERROR_CHECK(usb_host_install(&host_config));
|
||||
|
||||
|
Reference in New Issue
Block a user