Code: Select all
void Serial_Task(void *arg)
{
usb_serial_jtag_driver_config_t usb_serial_jtag_config =
{
.rx_buffer_size = BUFFER_SIZE,
.tx_buffer_size = BUFFER_SIZE,
};
ESP_ERROR_CHECK(usb_serial_jtag_driver_install(&usb_serial_jtag_config));
while (1)
{
int len = usb_serial_jtag_read_bytes(data, (BUFFER_SIZE - 1), 20 / portTICK_PERIOD_MS);
if (len)
{
// do something
}
vTaskDelay(1);
}
}
Code: Select all
ESP_LOGI(TAG, "before"); // works
printf("before\n"); // works
xTaskCreate(Serial_Task, "serial_task", STACK_SIZE, NULL, 10, NULL);
ESP_LOGI(TAG, "after"); // don't work
printf("after\n"); // don't work