Firmware  0.0.0
Loading...
Searching...
No Matches
usb Namespace Reference

Namespaces

namespace  anonymous_namespace{init.cpp}
 
namespace  anonymous_namespace{rx_task_function.cpp}
 
namespace  anonymous_namespace{tx_task_function.cpp}
 
namespace  ulf_dcc_ein
 
namespace  ulf_decup_ein
 
namespace  ulf_susiv2
 

Classes

struct  RxStreamBuffer
 
struct  RxTask
 
struct  TxStreamBuffer
 
struct  TxTask
 

Functions

esp_err_t init (BaseType_t xCoreID)
 Initialize USB.
 
void transmit_ping ()
 Execute ping command.
 
bool any_protocol_task_active ()
 Check if any protocol task is active.
 
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

bool volatile rts {}
 
constexpr auto vbus_gpio_num {GPIO_NUM_7}
 
constexpr auto buffer_size {512uz}
 
struct usb::RxTask rx_task
 
struct usb::TxTask tx_task
 
struct usb::RxStreamBuffer rx_stream_buffer
 
struct usb::TxStreamBuffer tx_stream_buffer
 

Function Documentation

◆ any_protocol_task_active()

bool usb::any_protocol_task_active ( )
Returns
true if any protocol task is active
false if no protocol task is active

◆ init()

esp_err_t usb::init ( BaseType_t xCoreID)

Create a CDC device on the TinyUSB stack and start various USB and USB protocol tasks. The following protocols are supported:

  • ULF_DCC_EIN
  • ULF_DECUP_EIN
  • ULF_SUSIV2
Return values
ESP_OKSuccess

◆ rx_task_function()

void usb::rx_task_function ( void * )

Scan the CDC character stream for protocol entry strings. Once a supported string is detected the protocol tasks are resumed and the task suspends itself.

◆ transmit_not_ok()

void usb::transmit_not_ok ( )

◆ transmit_ok()

void usb::transmit_ok ( )

◆ transmit_ping()

void usb::transmit_ping ( )

Transmit device name and semantic version to the CDC device queue.

◆ tx_task_function()

void usb::tx_task_function ( void * )

Receive data from tx_stream_buffer and transmit it to the CDC device queue.

Variable Documentation

◆ buffer_size

auto usb::buffer_size {512uz}
inlineconstexpr

◆ rts

bool volatile usb::rts {}
inline

◆ rx_stream_buffer

struct usb::RxStreamBuffer usb::rx_stream_buffer

◆ rx_task

struct usb::RxTask usb::rx_task

◆ tx_stream_buffer

struct usb::TxStreamBuffer usb::tx_stream_buffer

◆ tx_task

struct usb::TxTask usb::tx_task

◆ vbus_gpio_num

auto usb::vbus_gpio_num {GPIO_NUM_7}
inlineconstexpr