File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ extern "C" {
1111#endif
1212#include "stdint.h"
1313
14+ // note(zzy): Structure definition from ESP-IDF:
15+ // components/soc/esp32c3/register/soc/usb_serial_jtag_struct.h
1416typedef volatile struct usb_serial_jtag_dev_s {
1517 union {
1618 struct {
@@ -290,6 +292,9 @@ typedef volatile struct usb_serial_jtag_dev_s {
290292} usb_serial_jtag_dev_t ;
291293extern usb_serial_jtag_dev_t USB_SERIAL_JTAG ;
292294
295+ // note(zzy): Functions below are based on ESP-IDF HAL layer:
296+ // https://github.com/espressif/esp-idf/blob/release/v6.0/components/hal/esp32c3/include/hal/usb_serial_jtag_ll.h
297+
293298/**
294299 * @brief Flushes the TX buffer, that is, make it available for the
295300 * host to pick up.
@@ -336,6 +341,8 @@ static inline int usb_serial_jtag_ll_write_txfifo(const uint8_t *buf, uint32_t w
336341// ============================================================================
337342// System Call Implementation for Bare-Metal ESP32-C3
338343// ============================================================================
344+ // note(zzy): _write() implementation is inspired by ESP-IDF VFS layer:
345+ // https://github.com/espressif/esp-idf/blob/release/v6.0/components/esp_driver_usb_serial_jtag/src/usb_serial_jtag_vfs.c
339346
340347#include <sys/types.h>
341348
You can’t perform that action at this time.
0 commit comments