Namespaces | |
| namespace | anonymous_namespace{init.cpp} |
| namespace | anonymous_namespace{rx_task_function.cpp} |
| namespace | anonymous_namespace{tx_task_function.cpp} |
Classes | |
| struct | RxStreamBuffer |
| struct | TxStreamBuffer |
Functions | |
| TASK (rx_task, "intf::usb::rx", 3072uz, 5u, APP_CPU_NUM, 100u) | |
| TASK (tx_task, "intf::usb::tx", 3072uz, 1u, APP_CPU_NUM, 20u) | |
| esp_err_t | init () |
| Initialize USB. | |
| bool | any_service_task_active () |
| Check if any USB service task is active. | |
| void | transmit_ping () |
| Execute ping command. | |
| void | rx_task_function (void *) |
| USB receive task function. | |
| void | transmit_ok () |
| Transmit "OK\r" to the CDC device queue. | |
| void | transmit_not_ok () |
| Transmit "NOT OK\r" to the CDC device queue. | |
| void | tx_task_function (void *) |
| USB transmit task function. | |
Variables | |
| constexpr auto | vbus_gpio_num {GPIO_NUM_7} |
| constexpr auto | buffer_size {512uz} |
| struct intf::usb::RxStreamBuffer | rx_stream_buffer |
| struct intf::usb::TxStreamBuffer | tx_stream_buffer |
| bool intf::usb::any_service_task_active | ( | ) |
| true | if any service task is active |
| false | if no service task is active |
| esp_err_t intf::usb::init | ( | ) |
| void intf::usb::rx_task_function | ( | void * | ) |
The receive task scans the CDC character stream for commands. Those commands could either be general ones (e.g. PING\r) or protocol entry strings. When a protocol entry string is detected the corrsponding task is created and the receive task destroys itself.
Currently supported protocols are:
|
inline |
|
inline |
| void intf::usb::transmit_not_ok | ( | ) |
| void intf::usb::transmit_ok | ( | ) |
| void intf::usb::transmit_ping | ( | ) |
Transmit device name and semantic version to the CDC device queue.
| void intf::usb::tx_task_function | ( | void * | ) |
The transmit task receives data from tx_stream_buffer and transmit it to the CDC device queue.
|
inlineconstexpr |
| struct intf::usb::RxStreamBuffer intf::usb::rx_stream_buffer |
| struct intf::usb::TxStreamBuffer intf::usb::tx_stream_buffer |
|
inlineconstexpr |