ESP32C3 USB示例问题
Re: ESP32C3 USB示例问题
既然有这个串口,这个串口的驱动方式也没有,我在example/peripherals/USB下没找到能支持C3的示例,现在printf可以输出内容到虚拟串口,但我需要一个接受回调进行接受数据的处理
Re: ESP32C3 USB示例问题
c3 没有 otg 外设,所以更改不了 USB 描述符,仅支持:
如需使用 USB 开发,请使用 esp32s2/s3
Code: Select all
/**
* @brief USB_SERIAL_JTAG read bytes from USB_SERIAL_JTAG buffer
*
* @param buf pointer to the buffer.
* @param length data length
* @param ticks_to_wait Timeout in RTOS ticks
*
* @return
* - The number of bytes read from USB_SERIAL FIFO
*/
int usb_serial_jtag_read_bytes(void* buf, uint32_t length, TickType_t ticks_to_wait);
/**
* @brief Send data to the USB-UART port from a given buffer and length,
*
* Please ensure the `tx_buffer_size is larger than 0`, if the 'tx_buffer_size' > 0, this function will return after copying all the data to tx ring buffer,
* USB_SERIAL_JTAG ISR will then move data from the ring buffer to TX FIFO gradually.
*
* @param src data buffer address
* @param size data length to send
* @param ticks_to_wait Maximum timeout in RTOS ticks
*
* @return
* - The number of bytes pushed to the TX FIFO
*/
int usb_serial_jtag_write_bytes(const void* src, size_t size, TickType_t ticks_to_wait);Who is online
Users browsing this forum: YisouSpider and 2 guests
