USB::VENDOR::HostDevice Class Referenceabstract
Base class to use for custom devices. More...
#include <HostDevice.h>
Inheritance diagram for USB::VENDOR::HostDevice:
Collaboration diagram for USB::VENDOR::HostDevice:
Classes | |
| struct | Config |
| Device configuration received during mount procedure. More... | |
| struct | Transfer |
| Structure passed to 'transferComplete' method. More... | |
Public Member Functions | |
| void | end () override |
| Called when device is disconnected. Override as required. More... | |
| virtual bool | setConfig (uint8_t itf_num)=0 |
| Set active configuration. More... | |
| virtual bool | transferComplete (const Transfer &txfr)=0 |
| Called when a non-control USB transfer has completed. More... | |
| bool | ownsEndpoint (uint8_t ep_addr) |
Public Member Functions inherited from USB::HostInterface | |
| void | begin (const Instance &inst) |
| Descendant classes should override this method to peform initialisation. More... | |
| const char * | getName () const |
| uint8_t | getAddress () const |
| bool | operator== (const HostInterface &other) const |
| bool | operator== (const Instance &other) const |
Protected Member Functions | |
| bool | openEndpoint (const tusb_desc_endpoint_t &ep_desc) |
| Implementations should call this method during initialisation. More... | |
Additional Inherited Members | |
Protected Attributes inherited from USB::HostInterface | |
| Instance | inst |
Detailed Description
Base class to use for custom devices.
Member Function Documentation
◆ end()
|
inlineoverridevirtual |
Called when device is disconnected. Override as required.
Reimplemented from USB::HostInterface.
◆ openEndpoint()
|
protected |
Implementations should call this method during initialisation.
Typically called in a 'begin' method called from the application. Endpoints are released automatically when the device is disconnected.
◆ ownsEndpoint()
| bool USB::VENDOR::HostDevice::ownsEndpoint | ( | uint8_t | ep_addr | ) |
◆ setConfig()
|
pure virtual |
Set active configuration.
Implementations typically start communicating.
◆ transferComplete()
|
pure virtual |
Called when a non-control USB transfer has completed.
The documentation for this class was generated from the following file:
Public Member Functions inherited from
1.9.1