LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Endpoint Packet Management (LPC17xx)

Detailed Description

Endpoint packet management definitions for the NXP LPC17xx architecture.

Functions, macros, variables, enums and types related to packet management of endpoints.

Functions

static bool Endpoint_IsINReady (uint8_t corenum) 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 (uint8_t corenum) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
 Determines if the selected OUT endpoint has received new packet from the host.
 
static bool Endpoint_IsSETUPReceived (uint8_t corenum) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
 Determines if the current CONTROL type endpoint has received a SETUP packet.
 
static void Endpoint_ClearSETUP (uint8_t corenum) ATTR_ALWAYS_INLINE
 Clears a received SETUP packet on the currently selected CONTROL type endpoint, freeing up the endpoint for the next packet.
 
static void Endpoint_ClearIN (uint8_t corenum) ATTR_ALWAYS_INLINE
 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.
 
static void Endpoint_ClearOUT (uint8_t corenum) ATTR_ALWAYS_INLINE
 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.
 
void Endpoint_StallTransaction (uint8_t corenum)
 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.
 
static void Endpoint_ClearStall (uint8_t corenum) ATTR_ALWAYS_INLINE
 Clears the STALL condition on the currently selected endpoint.
 
static bool Endpoint_IsStalled (uint8_t corenum) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
 Determines if the currently selected endpoint is stalled, false otherwise.
 

Function Documentation

static void Endpoint_ClearIN ( uint8_t  corenum)
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.

Parameters
corenum: ID Number of USB Core to be processed.
Returns
Nothing.

Definition at line 400 of file Endpoint_LPC17xx.h.

static void Endpoint_ClearOUT ( uint8_t  corenum)
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.

Parameters
corenum: ID Number of USB Core to be processed.
Returns
Nothing.

Definition at line 426 of file Endpoint_LPC17xx.h.

static void Endpoint_ClearSETUP ( uint8_t  corenum)
inlinestatic

Clears a received SETUP packet on the currently selected CONTROL type endpoint, freeing up the endpoint for the next packet.

Parameters
corenum: ID Number of USB Core to be processed.
Returns
Nothing.
Note
This is not applicable for non CONTROL type endpoints.

Definition at line 381 of file Endpoint_LPC17xx.h.

static void Endpoint_ClearStall ( uint8_t  corenum)
inlinestatic

Clears the STALL condition on the currently selected endpoint.

Parameters
corenum: ID Number of USB Core to be processed.
Returns
Nothing.

Definition at line 468 of file Endpoint_LPC17xx.h.

static bool Endpoint_IsINReady ( uint8_t  corenum)
inlinestatic

Determines if the selected IN endpoint is ready for a new packet to be sent to the host.

Parameters
corenum: ID Number of USB Core to be processed.
Returns
Boolean true if the current endpoint is ready for an IN packet, false otherwise.

Definition at line 310 of file Endpoint_LPC17xx.h.

static bool Endpoint_IsOUTReceived ( uint8_t  corenum)
inlinestatic

Determines if the selected OUT endpoint has received new packet from the host.

Parameters
corenum: ID Number of USB Core to be processed.
Returns
Boolean true if current endpoint is has received an OUT packet, false otherwise.

Definition at line 340 of file Endpoint_LPC17xx.h.

static bool Endpoint_IsSETUPReceived ( uint8_t  corenum)
inlinestatic

Determines if the current CONTROL type endpoint has received a SETUP packet.

Parameters
corenum: ID Number of USB Core to be processed.
Returns
Boolean true if the selected endpoint has received a SETUP packet, false otherwise.

Definition at line 364 of file Endpoint_LPC17xx.h.

static bool Endpoint_IsStalled ( uint8_t  corenum)
inlinestatic

Determines if the currently selected endpoint is stalled, false otherwise.

Parameters
corenum: ID Number of USB Core to be processed.
Returns
Boolean true if the currently selected endpoint is stalled, false otherwise.

Definition at line 487 of file Endpoint_LPC17xx.h.

static void Endpoint_StallTransaction ( uint8_t  corenum)
inline

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.

Parameters
corenum: ID Number of USB Core to be processed.
Returns
Nothing.

Definition at line 602 of file Endpoint_LPC18xx.h.