![]() |
LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
|
#include "../EndpointCommon.h"
Go to the source code of this file.
Functions | |
bool | Endpoint_ConfigureEndpoint (const uint8_t Number, const uint8_t Type, const uint8_t Direction, const uint16_t Size, const uint8_t Banks) |
Configures the specified endpoint number with the given endpoint type, direction, bank size and banking mode. Once configured, the endpoint may be read from or written to, depending on its direction. | |
static void | Endpoint_ResetEndpoint (const uint8_t EndpointNumber) ATTR_ALWAYS_INLINE |
Resets the endpoint bank FIFO. This clears all the endpoint banks and resets the USB controller's data In and Out pointers to the bank's contents. | |
static void | Endpoint_EnableEndpoint (void) ATTR_ALWAYS_INLINE |
static void | Endpoint_DisableEndpoint (void) ATTR_ALWAYS_INLINE |
static bool | Endpoint_IsEnabled (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
Determines if the currently selected endpoint is enabled, but not necessarily configured. | |
static uint8_t | Endpoint_GetBusyBanks (void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT |
Retrieves the number of busy banks in the currently selected endpoint, which have been queued for transmission via the Endpoint_ClearIN() command, or are awaiting acknowledgement via the Endpoint_ClearOUT() command. | |
static void | Endpoint_AbortPendingIN (void) |
Aborts all pending IN transactions on the currently selected endpoint, once the bank has been queued for transmission to the host via Endpoint_ClearIN(). This function will terminate all queued transactions, resetting the endpoint banks ready for a new packet. | |
static bool | Endpoint_IsConfigured (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
Determines if the currently selected endpoint is configured. | |
static uint8_t | Endpoint_GetEndpointInterrupts (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
Returns a mask indicating which INTERRUPT type endpoints have interrupted - i.e. their interrupt duration has elapsed. Which endpoints have interrupted can be determined by masking the return value against (1 << {Endpoint Number}) . | |
static bool | Endpoint_HasEndpointInterrupted (const uint8_t EndpointNumber) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
Determines if the specified endpoint number has interrupted (valid only for INTERRUPT type endpoints). | |
static uint16_t | Endpoint_BytesInEndpoint (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
Indicates the number of bytes currently stored in the current endpoint's selected bank. | |
static bool | Endpoint_IsINReady (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
Determines if the selected IN endpoint is ready for a new packet to be sent to the host. | |
static bool | Endpoint_IsOUTReceived (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
Determines if the selected OUT endpoint has received new packet from the host. | |
static bool | Endpoint_IsSETUPReceived (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
Determines if the current CONTROL type endpoint has received a SETUP packet. | |
static void | Endpoint_ClearSETUP (void) ATTR_ALWAYS_INLINE |
static void | Endpoint_ClearIN (void) ATTR_ALWAYS_INLINE |
static void | Endpoint_ClearOUT (void) ATTR_ALWAYS_INLINE |
static void | Endpoint_StallTransaction (void) ATTR_ALWAYS_INLINE |
static void | Endpoint_ClearStall (void) ATTR_ALWAYS_INLINE |
static bool | Endpoint_IsStalled (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
Determines if the currently selected endpoint is stalled, false otherwise. | |
static void | Endpoint_ResetDataToggle (void) ATTR_ALWAYS_INLINE |
void | Endpoint_ClearStatusStage (void) |
uint8_t | Endpoint_WaitUntilReady (void) |
Spin-loops until the currently selected non-control endpoint is ready for the next packet of data to be read or written to it. | |
Variables | |
uint8_t | USB_Device_ControlEndpointSize |