|
libxr
Embedded C++ framework for bare-metal, RTOS and Linux
|
ESP32-S3 USB OTG 设备核心实现 / ESP32-S3 USB OTG device-core implementation. More...
#include <esp_usb_dev.hpp>
Classes | |
| struct | EPConfig |
| ESP32-S3 USB endpoint 配置项 / ESP32-S3 USB endpoint configuration entry. More... | |
Public Member Functions | |
| ESP32USBDevice (const std::initializer_list< EPConfig > ep_cfgs, USB::DeviceDescriptor::PacketSize0 packet_size, uint16_t vid, uint16_t pid, uint16_t bcd, const std::initializer_list< const USB::DescriptorStrings::LanguagePack * > lang_list, const std::initializer_list< const std::initializer_list< USB::ConfigDescriptorItem * > > configs, ConstRawData uid={nullptr, 0}) | |
| 构造 ESP32-S3 USB device core / Construct the ESP32-S3 USB device core | |
| void | Init (bool in_isr) override |
| 初始化 USB device core 状态 / Initialize the USB device-core state | |
| void | Deinit (bool in_isr) override |
| 去初始化 USB device core 状态 / Deinitialize the USB device-core state | |
| ErrorCode | SetAddress (uint8_t address, USB::DeviceCore::Context context) override |
| 在控制传输阶段写入设备地址 / Write the device address during control-transfer sequencing | |
| void | Start (bool in_isr) override |
| 启动 USB device controller / Start the USB device controller | |
| void | Stop (bool in_isr) override |
| 停止 USB device controller / Stop the USB device controller | |
Public Member Functions inherited from LibXR::USB::EndpointPool | |
| EndpointPool (size_t endpoint_num) | |
| 构造函数 / Constructor | |
| EndpointPool (const EndpointPool &)=delete | |
| EndpointPool & | operator= (const EndpointPool &)=delete |
| ErrorCode | Put (Endpoint *ep) |
| 登记一个端点到池中 / Register an endpoint into the pool | |
| ErrorCode | Get (Endpoint *&ep_info, Endpoint::Direction direction, Endpoint::EPNumber ep_num) |
| 分配端点 / Allocate endpoint | |
| ErrorCode | Release (Endpoint *ep_info) |
| 回收端点 / Release endpoint | |
| ErrorCode | FindEndpoint (uint8_t ep_addr, Endpoint *&ans) |
| 查找端点/ Lookup endpoint | |
| Endpoint * | GetEndpoint0Out () |
| 获取端点0的OUT对象 / Get Endpoint 0's OUT object | |
| Endpoint * | GetEndpoint0In () |
| 获取端点0的IN对象 / Get Endpoint 0's IN object | |
| void | SetEndpoint0 (Endpoint *ep0_in, Endpoint *ep0_out) |
| 设置端点0的IN/OUT对象 / Set Endpoint 0 IN/OUT objects | |
Public Member Functions inherited from LibXR::USB::DeviceCore | |
| DeviceCore (EndpointPool &ep_pool, USBSpec spec, Speed speed, DeviceDescriptor::PacketSize0 packet_size, uint16_t vid, uint16_t pid, uint16_t bcd, const std::initializer_list< const DescriptorStrings::LanguagePack * > &lang_list, const std::initializer_list< const std::initializer_list< ConfigDescriptorItem * > > &configs, ConstRawData uid={nullptr, 0}) | |
| 构造函数 / Constructor | |
| void | OnSetupPacket (bool in_isr, const SetupPacket *setup) |
| 处理 Setup 包 / Handle Setup packet | |
| bool | IsInited () const |
| 查询设备核心是否已经完成初始化 / Query whether the device core is initialized | |
Friends | |
| class | ESP32USBEndpoint |
Additional Inherited Members | |
Public Types inherited from LibXR::USB::DeviceCore | |
| enum | Context : uint8_t { UNKNOWN = 0 , SETUP_BEFORE_STATUS , STATUS_IN_ARMED , DATA_OUT , STATUS_OUT , DATA_IN , STATUS_IN_COMPLETE , ZLP } |
| 控制传输上下文 / Control transfer context More... | |
Public Attributes inherited from LibXR::USB::DeviceCore | |
Protected Member Functions inherited from LibXR::USB::DeviceCore | |
| virtual void | EnableRemoteWakeup () |
| 启用远程唤醒 / Enable remote wakeup | |
| virtual void | DisableRemoteWakeup () |
| 禁用远程唤醒 / Disable remote wakeup | |
| virtual bool | IsRemoteWakeupEnabled () const |
| 远程唤醒是否启用 / Whether remote wakeup is enabled | |
| Speed | GetSpeed () const |
| 获取设备速度 / Get device speed | |
ESP32-S3 USB OTG 设备核心实现 / ESP32-S3 USB OTG device-core implementation.
Definition at line 25 of file esp_usb_dev.hpp.
| LibXR::ESP32USBDevice::ESP32USBDevice | ( | const std::initializer_list< EPConfig > | ep_cfgs, |
| USB::DeviceDescriptor::PacketSize0 | packet_size, | ||
| uint16_t | vid, | ||
| uint16_t | pid, | ||
| uint16_t | bcd, | ||
| const std::initializer_list< const USB::DescriptorStrings::LanguagePack * > | lang_list, | ||
| const std::initializer_list< const std::initializer_list< USB::ConfigDescriptorItem * > > | configs, | ||
| ConstRawData | uid = {nullptr, 0} ) |
构造 ESP32-S3 USB device core / Construct the ESP32-S3 USB device core
| ep_cfgs | endpoint 构造配置列表 / Endpoint construction config list |
| packet_size | EP0 包长配置 / EP0 packet-size configuration |
| vid | USB vendor ID |
| pid | USB product ID |
| bcd | Device release number in BCD |
| lang_list | 字符串语言包列表 / String language-pack list |
| configs | 配置描述符项列表 / Configuration-descriptor item lists |
| uid | 可选设备唯一标识数据 / Optional device-unique ID payload |
|
overridevirtual |
去初始化 USB device core 状态 / Deinitialize the USB device-core state
Reimplemented from LibXR::USB::DeviceCore.
|
overridevirtual |
初始化 USB device core 状态 / Initialize the USB device-core state
Reimplemented from LibXR::USB::DeviceCore.
|
overridevirtual |
在控制传输阶段写入设备地址 / Write the device address during control-transfer sequencing
Implements LibXR::USB::DeviceCore.
|
overridevirtual |
启动 USB device controller / Start the USB device controller
Implements LibXR::USB::DeviceCore.
|
overridevirtual |
停止 USB device controller / Stop the USB device controller
Implements LibXR::USB::DeviceCore.
|
friend |
Definition at line 118 of file esp_usb_dev.hpp.