![]() |
LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
|
Endpoint packet management definitions for the LPC18xx architecture. More...
Functions | |
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_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. | |
Endpoint packet management definitions for the LPC18xx architecture.
Functions, macros, variables, enums and types related to packet management of endpoints.
|
inlinestatic |
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.
Definition at line 389 of file Endpoint_LPC18xx.h.
|
inlinestatic |
Sends an IN packet to the host on the currently selected endpoint, freeing up the endpoint for the next packet and switching to the alternative endpoint bank if double banked.
Definition at line 526 of file Endpoint_LPC18xx.h.
|
inlinestatic |
Acknowledges an OUT packet to the host on the currently selected endpoint, freeing up the endpoint for the next packet and switching to the alternative endpoint bank if double banked.
Definition at line 546 of file Endpoint_LPC18xx.h.
|
inlinestatic |
Clears a received SETUP packet on the currently selected CONTROL type endpoint, freeing up the endpoint for the next packet.
Definition at line 512 of file Endpoint_LPC18xx.h.
|
inlinestatic |
Clears the STALL condition on the currently selected endpoint.
Definition at line 584 of file Endpoint_LPC18xx.h.
|
inlinestatic |
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.
Definition at line 377 of file Endpoint_LPC18xx.h.
|
inlinestatic |
Determines if the selected IN endpoint is ready for a new packet to be sent to the host.
true
if the current endpoint is ready for an IN packet, false
otherwise. Definition at line 466 of file Endpoint_LPC18xx.h.
|
inlinestatic |
Determines if the selected OUT endpoint has received new packet from the host.
true
if current endpoint is has received an OUT packet, false
otherwise. Definition at line 482 of file Endpoint_LPC18xx.h.
|
inlinestatic |
Determines if the current CONTROL type endpoint has received a SETUP packet.
true
if the selected endpoint has received a SETUP packet, false
otherwise. Definition at line 498 of file Endpoint_LPC18xx.h.
|
inlinestatic |
Determines if the currently selected endpoint is stalled, false otherwise.
true
if the currently selected endpoint is stalled, false
otherwise. Definition at line 599 of file Endpoint_LPC18xx.h.
|
inlinestatic |
Stalls the current endpoint, indicating to the host that a logical problem occurred with the indicated endpoint and that the current transfer sequence should be aborted. This provides a way for devices to indicate invalid commands to the host so that the current transfer can be aborted and the host can begin its own recovery sequence.
The currently selected endpoint remains stalled until either the Endpoint_ClearStall() macro is called, or the host issues a CLEAR FEATURE request to the device for the currently selected endpoint.