Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FATFileSystem mbed-rtos
Fork of USBHost by
USBEndpoint Class Reference
USBEndpoint class. More...
#include <USBEndpoint.h>
Public Member Functions | |
| USBEndpoint () | |
| Constructor. | |
| void | init (HCED *hced, ENDPOINT_TYPE type, ENDPOINT_DIRECTION dir, uint32_t size, uint8_t ep_number, HCTD *td_list[2]) |
| Initialize an endpoint. | |
| void | setNextToken (uint32_t token) |
| Set next token. | |
| void | queueEndpoint (USBEndpoint *endpoint) |
| Queue an endpoint. | |
| void | queueTransfer () |
| Queue a transfer on the endpoint. | |
| void | unqueueTransfer (volatile HCTD *td) |
| Unqueue a transfer from the endpoint. | |
| template<typename T > | |
| void | attach (T *tptr, void(T::*mptr)(void)) |
| Attach a member function to call when a transfer is finished. | |
| void | attach (void(*fptr)(void)) |
| Attach a callback called when a transfer is finished. | |
| void | call () |
| Call the handler associted to the end of a transfer. | |
Detailed Description
USBEndpoint class.
Definition at line 29 of file USBEndpoint.h.
Constructor & Destructor Documentation
| USBEndpoint | ( | ) |
Constructor.
Definition at line 35 of file USBEndpoint.h.
Member Function Documentation
| void attach | ( | T * | tptr, |
| void(T::*)(void) | mptr | ||
| ) |
Attach a member function to call when a transfer is finished.
- Parameters:
-
tptr pointer to the object to call the member function on mptr pointer to the member function to be called
Definition at line 86 of file USBEndpoint.h.
| void attach | ( | void(*)(void) | fptr ) |
Attach a callback called when a transfer is finished.
- Parameters:
-
fptr function pointer
Definition at line 97 of file USBEndpoint.h.
| void call | ( | ) |
Call the handler associted to the end of a transfer.
Definition at line 106 of file USBEndpoint.h.
| void init | ( | HCED * | hced, |
| ENDPOINT_TYPE | type, | ||
| ENDPOINT_DIRECTION | dir, | ||
| uint32_t | size, | ||
| uint8_t | ep_number, | ||
| HCTD * | td_list[2] | ||
| ) |
Initialize an endpoint.
- Parameters:
-
hced hced associated to the endpoint type endpoint type dir endpoint direction size endpoint size ep_number endpoint number td_list array of two allocated transfer descriptors
Definition at line 21 of file USBEndpoint.cpp.
| void queueEndpoint | ( | USBEndpoint * | endpoint ) |
Queue an endpoint.
- Parameters:
-
endpoint endpoint which will be queued in the linked list
Definition at line 158 of file USBEndpoint.cpp.
| void queueTransfer | ( | ) |
Queue a transfer on the endpoint.
Definition at line 135 of file USBEndpoint.cpp.
| void setNextToken | ( | uint32_t | token ) |
Set next token.
Warning: only useful for the control endpoint
- Parameters:
-
token IN, OUT or SETUP token
Definition at line 81 of file USBEndpoint.cpp.
| void unqueueTransfer | ( | volatile HCTD * | td ) |
Unqueue a transfer from the endpoint.
- Parameters:
-
td hctd which will be unqueued
Definition at line 147 of file USBEndpoint.cpp.
Generated on Wed Jul 13 2022 21:33:35 by
1.7.2
