#include <usbd-wrapper.h>
Public Member Functions | |
usbd_wrapper (ARM_DRIVER_USBD *driver, ARM_USBD_SignalDeviceEvent_t c_cb_device_func, ARM_USBD_SignalEndpointEvent_t c_cb_endpoint_func) noexcept | |
usbd_wrapper (const usbd_wrapper &)=delete | |
usbd_wrapper (usbd_wrapper &&)=delete | |
virtual | ~usbd_wrapper () noexcept |
return_t | abort_transfer (endpoint_t ep_addr) noexcept |
Abort current USB Endpoint transfer. | |
return_t | configure_address (device_address_t dev_addr) noexcept |
Set USB Device Address. | |
return_t | configure_endpoint (endpoint_t ep_addr, Endpoint_type ep_type, packet_size_t ep_max_packet_size) noexcept |
Configure USB Endpoint. | |
return_t | connect (void) noexcept |
Connect USB Device. | |
return_t | disconnect (void) noexcept |
Disconnect USB Device. | |
const device::Capabilities & | get_capabilities (void) noexcept |
Get driver capabilities. | |
frame_number_t | get_frame_number (void) noexcept |
Get current USB Frame Number. | |
device::Status & | get_status (void) noexcept |
Get current USB Device Status. | |
std::size_t | get_transfer_count (endpoint_t ep_addr) noexcept |
Get result of USB Endpoint transfer. | |
const Version & | get_version (void) noexcept |
Get driver version. | |
usbd_wrapper & | operator= (const usbd_wrapper &)=delete |
usbd_wrapper & | operator= (usbd_wrapper &&)=delete |
return_t | power (Power state) noexcept |
Power up/down device. | |
return_t | read_setup_packet (uint8_t *buf) noexcept |
Read setup packet received over Control Endpoint. | |
void | register_device_callback (device::signal_device_event_t cb_func, const void *cb_object=nullptr) noexcept |
Register device event callback. | |
void | register_endpoint_callback (device::signal_endpoint_event_t cb_func, const void *cb_object=nullptr) noexcept |
void | signal_device_event (event_t event) noexcept |
Signal device events. | |
void | signal_endpoint_event (endpoint_t ep_addr, event_t event) noexcept |
Signal USB Endpoint Event. | |
return_t | stall_endpoint (endpoint_t ep_addr, bool stall) noexcept |
Set/Clear Stall for USB Endpoint. | |
return_t | transfer (endpoint_t ep_addr, uint8_t *data, std::size_t num) noexcept |
Read data from or Write data to USB Endpoint. | |
return_t | unconfigure_endpoint (endpoint_t ep_addr) noexcept |
Unconfigure USB Endpoint. | |
return_t | wakeup_remote (void) noexcept |
Trigger USB Remote Wakeup. | |
Protected Member Functions | |
virtual return_t | do_abort_transfer (usb::endpoint_t ep_addr) noexcept override |
virtual return_t | do_configure_address (usb::device_address_t dev_addr) noexcept override |
virtual return_t | do_configure_endpoint (usb::endpoint_t ep_addr, usb::Endpoint_type ep_type, usb::packet_size_t ep_max_packet_size) noexcept override |
virtual return_t | do_connect (void) noexcept override |
virtual return_t | do_disconnect (void) noexcept override |
const usb::device::Capabilities & | do_get_capabilities (void) noexcept override |
virtual usb::frame_number_t | do_get_frame_number (void) noexcept override |
virtual usb::device::Status & | do_get_status (void) noexcept override |
virtual std::size_t | do_get_transfer_count (usb::endpoint_t ep_addr) noexcept override |
virtual const Version & | do_get_version (void) noexcept override |
virtual return_t | do_power (Power state) noexcept override |
virtual return_t | do_read_setup_packet (uint8_t *buf) noexcept override |
virtual return_t | do_stall_endpoint (usb::endpoint_t ep_addr, bool stall) noexcept override |
virtual return_t | do_transfer (usb::endpoint_t ep_addr, uint8_t *data, std::size_t num) noexcept override |
virtual return_t | do_unconfigure_endpoint (usb::endpoint_t ep_addr) noexcept override |
virtual return_t | do_wakeup_remote (void) noexcept override |
Private Attributes | |
ARM_USBD_SignalDeviceEvent_t | c_cb_device_func_ |
ARM_USBD_SignalEndpointEvent_t | c_cb_endpoint_func_ |
usb::device::Capabilities | capa_ |
device::signal_device_event_t | cb_device_func_ |
Pointer to static function that implements the device callback. | |
const void * | cb_device_object_ |
Pointer to object instance associated with the device callback. | |
device::signal_endpoint_event_t | cb_endpoint_func_ |
Pointer to static function that implements the endpoint callback. | |
const void * | cb_endpoint_object_ |
Pointer to object instance associated with the endpoint callback. | |
ARM_DRIVER_USBD * | driver_ |
Pointer to CMSIS USBD Keil driver. | |
usb::device::Status | status_ |
Version | version_ { 0, 0 } |
Definition at line 47 of file usbd-wrapper.h.
|
noexcept |
Definition at line 29 of file usbd-wrapper.cpp.
|
delete |
|
delete |
|
virtualnoexcept |
Definition at line 39 of file usbd-wrapper.cpp.
|
inlinenoexceptinherited |
Abort current USB Endpoint transfer.
[in] | ep_addr | Endpoint Address
|
Definition at line 553 of file usb-device.h.
|
inlinenoexceptinherited |
Set USB Device Address.
[in] | dev_addr | Device Address |
Definition at line 516 of file usb-device.h.
|
inlinenoexceptinherited |
Configure USB Endpoint.
[in] | ep_addr | Endpoint Address
|
[in] | ep_type | Endpoint Type (ARM_USB_ENDPOINT_xxx) |
[in] | ep_max_packet_size | Endpoint Maximum Packet Size |
Definition at line 528 of file usb-device.h.
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 183 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 129 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 147 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 111 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 117 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 65 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 141 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 74 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 177 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::Base.
Definition at line 56 of file usbd-wrapper.cpp.
Implements os::driver::Base.
Definition at line 85 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 135 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 163 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 169 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 157 of file usbd-wrapper.cpp.
|
overrideprotectedvirtualnoexcept |
Implements os::driver::usb::Device.
Definition at line 123 of file usbd-wrapper.cpp.
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
Get result of USB Endpoint transfer.
[in] | ep_addr | Endpoint Address
|
Definition at line 547 of file usb-device.h.
|
inlinenoexceptinherited |
|
delete |
|
delete |
|
noexceptinherited |
Read setup packet received over Control Endpoint.
[out] | buf | Pointer to buffer for setup packet |
Definition at line 74 of file usb-device.cpp.
|
noexceptinherited |
Register device event callback.
[in] | cb_func | Pointer to function. |
[in] | cb_object | Pointer to object passed to the function. |
Definition at line 56 of file usb-device.cpp.
|
noexceptinherited |
Definition at line 64 of file usb-device.cpp.
|
noexceptinherited |
Signal device events.
[in] | event | Event. |
Definition at line 94 of file usb-device.cpp.
|
noexceptinherited |
Signal USB Endpoint Event.
[in] | ep_addr | Endpoint Address
|
[in] | event | Event. |
Definition at line 104 of file usb-device.cpp.
|
inlinenoexceptinherited |
Set/Clear Stall for USB Endpoint.
[in] | ep_addr | Endpoint Address
|
[in] | stall | Operation
|
Definition at line 541 of file usb-device.h.
|
noexceptinherited |
Read data from or Write data to USB Endpoint.
[in] | ep_addr | Endpoint Address
|
[out] | data | Pointer to buffer for data to read or with data to write |
[in] | num | Number of data bytes to transfer |
Definition at line 81 of file usb-device.cpp.
|
inlinenoexceptinherited |
Unconfigure USB Endpoint.
[in] | ep_addr | Endpoint Address
|
Definition at line 535 of file usb-device.h.
|
inlinenoexceptinherited |
|
private |
Pointer to non-reentrant callback. Must be stored because Initialize() is now delayed just before PowerControl(FULL).
Definition at line 135 of file usbd-wrapper.h.
|
private |
Definition at line 136 of file usbd-wrapper.h.
|
private |
Definition at line 147 of file usbd-wrapper.h.
|
privateinherited |
Pointer to static function that implements the device callback.
Definition at line 438 of file usb-device.h.
|
privateinherited |
Pointer to object instance associated with the device callback.
Definition at line 441 of file usb-device.h.
|
privateinherited |
Pointer to static function that implements the endpoint callback.
Definition at line 444 of file usb-device.h.
|
privateinherited |
Pointer to object instance associated with the endpoint callback.
Definition at line 447 of file usb-device.h.
|
private |
Pointer to CMSIS USBD Keil driver.
Definition at line 131 of file usbd-wrapper.h.
|
private |
Definition at line 148 of file usbd-wrapper.h.
|
private |
Definition at line 145 of file usbd-wrapper.h.