usb_host: Pin test task to core 0
When we try to uninstall usb_host library on multi-core SoC (ESP32S3) the USB interrupt can be triggered even after it was disabled on one CPU
This commit is contained in:
parent
d9b8717058
commit
53a2111127
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* SPDX-License-Identifier: CC0-1.0
|
||||
*/
|
||||
|
||||
#include "soc/soc_caps.h"
|
||||
|
@ -88,7 +88,7 @@ void usb_lib_task(void *arg)
|
|||
void test_install_cdc_driver(void)
|
||||
{
|
||||
// Create a task that will handle USB library events
|
||||
TEST_ASSERT_EQUAL(pdTRUE, xTaskCreate(usb_lib_task, "usb_lib", 4*4096, xTaskGetCurrentTaskHandle(), 10, NULL));
|
||||
TEST_ASSERT_EQUAL(pdTRUE, xTaskCreatePinnedToCore(usb_lib_task, "usb_lib", 4*4096, xTaskGetCurrentTaskHandle(), 10, NULL, 0));
|
||||
ulTaskNotifyTake(false, 1000);
|
||||
|
||||
printf("Installing CDC-ACM driver\n");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* SPDX-License-Identifier: CC0-1.0
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
@ -55,7 +55,7 @@ void run_usb_dual_cdc_device(void)
|
|||
.usb_dev = TINYUSB_USBDEV_0,
|
||||
.cdc_port = TINYUSB_CDC_ACM_0,
|
||||
.rx_unread_buf_sz = 64,
|
||||
.callback_rx = &tinyusb_cdc_rx_callback, // the first way to register a callback
|
||||
.callback_rx = &tinyusb_cdc_rx_callback,
|
||||
.callback_rx_wanted_char = NULL,
|
||||
.callback_line_state_changed = NULL,
|
||||
.callback_line_coding_changed = NULL
|
||||
|
|
Loading…
Reference in New Issue