Mbed OS Reference
|
Utility class for resolving endpoints. More...
#include <EndpointResolver.h>
Public Member Functions | |
void | endpoint_ctrl (uint32_t size) |
Add control endpoint size. More... | |
usb_ep_t | endpoint_in (usb_ep_type_t type, uint32_t size) |
Return a free IN endpoint of the given size. More... | |
usb_ep_t | endpoint_out (usb_ep_type_t type, uint32_t size) |
Return a free OUT endpoint of the given size. More... | |
usb_ep_t | next_free_endpoint (bool in_not_out, usb_ep_type_t type, uint32_t size) |
Get next free endpoint. More... | |
bool | valid () |
Check if the endpoint configuration created so far is valid. More... | |
void | reset () |
Reset this class's state to when it was constructed. More... | |
Utility class for resolving endpoints.
This class is intended to make the process of selecting the correct endpoint from a device endpoint table easier. It also provides a verification function to check if the device has enough resources for the given configuration.
Definition at line 39 of file EndpointResolver.h.
void endpoint_ctrl | ( | uint32_t | size | ) |
Add control endpoint size.
size | Space reserved for control in and control out |
usb_ep_t endpoint_in | ( | usb_ep_type_t | type, |
uint32_t | size | ||
) |
Return a free IN endpoint of the given size.
type | Desired endpoint type |
size | Space to reserve for this endpoint |
usb_ep_t endpoint_out | ( | usb_ep_type_t | type, |
uint32_t | size | ||
) |
Return a free OUT endpoint of the given size.
type | Desired endpoint type |
size | Space to reserve for this endpoint |
usb_ep_t next_free_endpoint | ( | bool | in_not_out, |
usb_ep_type_t | type, | ||
uint32_t | size | ||
) |
Get next free endpoint.
bool valid | ( | ) |
Check if the endpoint configuration created so far is valid.
void reset | ( | ) |
Reset this class's state to when it was constructed.