#include <usb-device.h>
Inheritance diagram for os::driver::usb::Device:Public Member Functions | |
| Device () noexcept | |
| Device (const Device &)=delete | |
| Device (Device &&)=delete | |
| virtual | ~Device () noexcept override |
| 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. | |
| Device & | operator= (const Device &)=delete |
| Device & | operator= (Device &&)=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 (endpoint_t ep_addr) noexcept=0 |
| virtual return_t | do_configure_address (device_address_t dev_addr) noexcept=0 |
| virtual return_t | do_configure_endpoint (endpoint_t ep_addr, Endpoint_type ep_type, packet_size_t ep_max_packet_size) noexcept=0 |
| virtual return_t | do_connect (void) noexcept=0 |
| virtual return_t | do_disconnect (void) noexcept=0 |
| virtual const device::Capabilities & | do_get_capabilities (void) noexcept=0 |
| virtual frame_number_t | do_get_frame_number (void) noexcept=0 |
| virtual device::Status & | do_get_status (void) noexcept=0 |
| virtual std::size_t | do_get_transfer_count (endpoint_t ep_addr) noexcept=0 |
| virtual const Version & | do_get_version (void) noexcept=0 |
| virtual return_t | do_power (Power state) noexcept=0 |
| virtual return_t | do_read_setup_packet (uint8_t *buf) noexcept=0 |
| virtual return_t | do_stall_endpoint (endpoint_t ep_addr, bool stall) noexcept=0 |
| virtual return_t | do_transfer (endpoint_t ep_addr, uint8_t *data, std::size_t num) noexcept=0 |
| virtual return_t | do_unconfigure_endpoint (endpoint_t ep_addr) noexcept=0 |
| virtual return_t | do_wakeup_remote (void) noexcept=0 |
Protected Attributes | |
| device::Status | status_ |
Private Attributes | |
| 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. | |
Definition at line 192 of file usb-device.h.
|
noexcept |
Definition at line 38 of file usb-device.cpp.
References cb_device_func_, cb_device_object_, cb_endpoint_func_, cb_endpoint_object_, and os::trace::printf().
|
delete |
|
delete |
|
overridevirtualnoexcept |
Definition at line 49 of file usb-device.cpp.
References os::trace::printf().
|
inlinenoexcept |
| [in] | ep_addr | Endpoint Address
|
Definition at line 556 of file usb-device.h.
References do_abort_transfer().
|
inlinenoexcept |
| [in] | dev_addr | Device Address |
Definition at line 519 of file usb-device.h.
References do_configure_address().
|
inlinenoexcept |
| [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 531 of file usb-device.h.
References do_configure_endpoint().
|
inlinenoexcept |
Definition at line 501 of file usb-device.h.
References do_connect().
|
inlinenoexcept |
Definition at line 507 of file usb-device.h.
References do_disconnect().
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
Referenced by abort_transfer().
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
Referenced by configure_address().
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
Referenced by configure_endpoint().
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
Referenced by connect().
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
Referenced by disconnect().
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
Referenced by get_capabilities().
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
Referenced by get_frame_number().
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
Referenced by get_status().
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
Referenced by get_transfer_count().
|
protectedpure virtualnoexceptinherited |
Implemented in os::driver::usart_wrapper, os::driver::usbd_wrapper, and os::driver::usbh_wrapper.
Implemented in os::driver::usart_wrapper, os::driver::usbd_wrapper, and os::driver::usbh_wrapper.
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
Referenced by stall_endpoint().
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
Referenced by unconfigure_endpoint().
|
protectedpure virtualnoexcept |
Implemented in os::driver::usbd_wrapper.
Referenced by wakeup_remote().
|
inlinenoexcept |
Definition at line 489 of file usb-device.h.
References do_get_capabilities().
|
inlinenoexcept |
Definition at line 525 of file usb-device.h.
References do_get_frame_number().
|
inlinenoexcept |
Definition at line 495 of file usb-device.h.
References do_get_status().
|
inlinenoexcept |
| [in] | ep_addr | Endpoint Address
|
Definition at line 550 of file usb-device.h.
References do_get_transfer_count().
|
inlinenoexceptinherited |
|
noexcept |
| [out] | buf | Pointer to buffer for setup packet |
Definition at line 74 of file usb-device.cpp.
|
noexcept |
| [in] | cb_func | Pointer to function. |
| [in] | cb_object | Pointer to object passed to the function. |
Definition at line 55 of file usb-device.cpp.
|
noexcept |
Definition at line 63 of file usb-device.cpp.
|
noexcept |
| [in] | event | Event. |
Definition at line 95 of file usb-device.cpp.
|
noexcept |
| [in] | ep_addr | Endpoint Address
|
| [in] | event | Event. |
Definition at line 105 of file usb-device.cpp.
|
inlinenoexcept |
| [in] | ep_addr | Endpoint Address
|
| [in] | stall | Operation
|
Definition at line 544 of file usb-device.h.
References do_stall_endpoint().
|
noexcept |
| [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.
References os::driver::RETURN_OK.
|
inlinenoexcept |
| [in] | ep_addr | Endpoint Address
|
Definition at line 538 of file usb-device.h.
References do_unconfigure_endpoint().
|
inlinenoexcept |
Definition at line 513 of file usb-device.h.
References do_wakeup_remote().
|
private |
Definition at line 442 of file usb-device.h.
Referenced by Device().
|
private |
Definition at line 445 of file usb-device.h.
Referenced by Device().
|
private |
Definition at line 448 of file usb-device.h.
Referenced by Device().
|
private |
Definition at line 451 of file usb-device.h.
Referenced by Device().
|
protected |
Definition at line 454 of file usb-device.h.