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.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
EndpointResolver Class Reference
[EndpointResolver class]
Utility class for resolving endpoints. More...
#include <EndpointResolver.h>
Public Member Functions | |
void | endpoint_ctrl (uint32_t size) |
Add control endpoint size. | |
usb_ep_t | endpoint_in (usb_ep_type_t type, uint32_t size) |
Return a free IN endpoint of the given size. | |
usb_ep_t | endpoint_out (usb_ep_type_t type, uint32_t size) |
Return a free OUT endpoint of the given size. | |
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. |
Detailed Description
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.
Member Function Documentation
void endpoint_ctrl | ( | uint32_t | size ) |
Add control endpoint size.
- Parameters:
-
size Space reserved for control in and control out
Definition at line 41 of file EndpointResolver.cpp.
usb_ep_t endpoint_in | ( | usb_ep_type_t | type, |
uint32_t | size | ||
) |
Return a free IN endpoint of the given size.
- Parameters:
-
type Desired endpoint type size Space to reserve for this endpoint
- Returns:
- Endpoint index or 0 if there are not enough resources
Definition at line 62 of file EndpointResolver.cpp.
usb_ep_t endpoint_out | ( | usb_ep_type_t | type, |
uint32_t | size | ||
) |
Return a free OUT endpoint of the given size.
- Parameters:
-
type Desired endpoint type size Space to reserve for this endpoint
- Returns:
- Endpoint index or 0 if there are not enough resources
Definition at line 67 of file EndpointResolver.cpp.
usb_ep_t next_free_endpoint | ( | bool | in_not_out, |
usb_ep_type_t | type, | ||
uint32_t | size | ||
) |
Get next free endpoint.
Definition at line 47 of file EndpointResolver.cpp.
void reset | ( | void | ) |
Reset this class's state to when it was constructed.
Definition at line 77 of file EndpointResolver.cpp.
bool valid | ( | ) |
Check if the endpoint configuration created so far is valid.
- Returns:
- true if all endpoint sizes are available and fit, false otherwise
Definition at line 72 of file EndpointResolver.cpp.
Generated on Tue Jul 12 2022 13:55:30 by
