Endpoint management definitions for the NXP LPC11Uxx architecture.
More...
|
void | WrCmdDat (uint32_t cmd, uint32_t val) |
|
void | WrCmd (uint32_t cmd) |
|
void | HAL11UXX_WriteEndPoint (uint8_t EPNum, uint8_t *pData, uint32_t cnt) |
|
void | DcdDataTransfer (uint8_t EPNum, uint8_t *pData, uint32_t length) |
|
void | Endpoint_Streaming (uint8_t *buffer, uint16_t packetsize, uint16_t totalpackets, uint16_t dummypackets) |
|
bool | Endpoint_ConfigureEndpoint (const uint8_t Number, const uint8_t Type, const uint8_t Direction, const uint16_t Size, const uint8_t Banks) |
|
static PRAGMA_ALWAYS_INLINE void | Endpoint_ResetEndpoint (const uint8_t EndpointNumber) ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE void | Endpoint_EnableEndpoint (void) ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE void | Endpoint_DisableEndpoint (void) ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE bool | Endpoint_IsEnabled (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE uint8_t | Endpoint_GetBusyBanks (void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT |
|
static void | Endpoint_AbortPendingIN (void) |
|
static PRAGMA_ALWAYS_INLINE bool | Endpoint_IsConfigured (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE uint8_t | Endpoint_GetEndpointInterrupts (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE bool | Endpoint_HasEndpointInterrupted (const uint8_t EndpointNumber) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE
uint16_t | Endpoint_BytesInEndpoint (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE bool | Endpoint_IsINReady (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE bool | Endpoint_IsOUTReceived (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE bool | Endpoint_IsSETUPReceived (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE void | Endpoint_ClearSETUP (void) ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE void | Endpoint_ClearIN (void) ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE void | Endpoint_ClearOUT (void) ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE void | Endpoint_StallTransaction (void) ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE void | Endpoint_ClearStall (void) ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE bool | Endpoint_IsStalled (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE |
|
static PRAGMA_ALWAYS_INLINE void | Endpoint_ResetDataToggle (void) ATTR_ALWAYS_INLINE |
|
void | Endpoint_ClearStatusStage (void) |
|
uint8_t | Endpoint_WaitUntilReady (void) |
|
Endpoint management definitions for the NXP LPC11Uxx architecture.
Functions, macros and enums related to endpoint management when in USB Device mode. This module contains the endpoint management macros, as well as endpoint interrupt and data send/receive functions for various data types.
#define DEV_STAT_INT (0x80000000) |
#define EP0_INT (0x1 << 0) |
#define EP1_INT (0x1 << 1) |
#define EP2_INT (0x1 << 2) |
#define EP3_INT (0x1 << 3) |
#define EP4_INT (0x1 << 4) |
#define EP5_INT (0x1 << 5) |
#define EP6_INT (0x1 << 6) |
#define EP7_INT (0x1 << 7) |
#define EP8_INT (0x1 << 8) |
#define EP9_INT (0x1 << 9) |
#define ERR_BIT_STUFF 0x0D |
#define ERR_BUF_OVERRUN 0x0B |
#define ERR_PID_ENCODE 0x01 |
#define ERR_SENT_EPT_PKT 0x0C |
#define ERR_SENT_STALL 0x0A |
#define ERR_TOGGLE_BIT 0x0F |
#define ERR_TX_RX_NAK 0x09 |
#define ERR_UNEXPECT_PKT 0x03 |
#define ERR_UNKNOWN_PID 0x02 |
#define FRAME_INT (0x1 << 30) |
#define PKT_LNGTH_MASK 0x000003FF |
#define USB_DCON (0x1 << 16) /* Device connect */ |
#define USB_DCON_C (0x1 << 24) /* Device connection change */ |
#define USB_DRESET_C (0x1 << 26) /* Device RESET */ |
#define USB_DSUS (0x1 << 17) /* Device Suspend */ |
#define USB_DSUS_C (0x1 << 25) /* Device SUSPEND change */ |
#define USB_EN (0x1 << 7) /* Device Enable */ |
#define USB_IntOnNAK_AI (0x1 << 13) /* Device Interrupt on NAK BULK IN */ |
#define USB_IntOnNAK_AO (0x1 << 12) /* Device Interrupt on NAK BULK OUT */ |
#define USB_IntOnNAK_CI (0x1 << 15) /* Device Interrupt on NAK CTRL IN */ |
#define USB_IntOnNAK_CO (0x1 << 14) /* Device Interrupt on NAK CTRL OUT */ |
#define USB_LPM (0x1 << 11) /* LPM is supported */ |
#define USB_LPM_SUS (0x1 << 19) /* LPM suspend */ |
#define USB_PLL_ON (0x1 << 9) /* PLL is always ON */ |
#define USB_REMOTE_WAKE (0x1 << 20) /* LPM Remote Wakeup */ |
#define USB_SETUP_RCVD (0x1 << 8) /* SETUP token received */ |
#define USB_VBUS_DBOUNCE (0x1 << 28) /* Device VBUS detect */ |
#define USED_PHYSICAL_ENDPOINTS (ENDPOINT_DETAILS_MAXEP * 2)/* This macro effect memory size of the DCD */ |
void DcdDataTransfer |
( |
uint8_t |
EPNum, |
|
|
uint8_t * |
pData, |
|
|
uint32_t |
length |
|
) |
| |
static void Endpoint_AbortPendingIN |
( |
void |
| ) |
|
|
inlinestatic |
static uint16_t Endpoint_BytesInEndpoint |
( |
void |
| ) |
|
|
inlinestatic |
static void Endpoint_ClearIN |
( |
void |
| ) |
|
|
inlinestatic |
static void Endpoint_ClearOUT |
( |
void |
| ) |
|
|
inlinestatic |
static void Endpoint_ClearSETUP |
( |
void |
| ) |
|
|
inlinestatic |
static void Endpoint_ClearStall |
( |
void |
| ) |
|
|
inlinestatic |
void Endpoint_ClearStatusStage |
( |
void |
| ) |
|
bool Endpoint_ConfigureEndpoint |
( |
const uint8_t |
Number, |
|
|
const uint8_t |
Type, |
|
|
const uint8_t |
Direction, |
|
|
const uint16_t |
Size, |
|
|
const uint8_t |
Banks |
|
) |
| |
static void Endpoint_DisableEndpoint |
( |
void |
| ) |
|
|
inlinestatic |
static void Endpoint_EnableEndpoint |
( |
void |
| ) |
|
|
inlinestatic |
static uint8_t Endpoint_GetBusyBanks |
( |
void |
| ) |
|
|
inlinestatic |
static uint8_t Endpoint_GetEndpointInterrupts |
( |
void |
| ) |
|
|
inlinestatic |
static bool Endpoint_HasEndpointInterrupted |
( |
const uint8_t |
EndpointNumber | ) |
|
|
inlinestatic |
static bool Endpoint_IsConfigured |
( |
void |
| ) |
|
|
inlinestatic |
static bool Endpoint_IsEnabled |
( |
void |
| ) |
|
|
inlinestatic |
static bool Endpoint_IsINReady |
( |
void |
| ) |
|
|
inlinestatic |
static bool Endpoint_IsOUTReceived |
( |
void |
| ) |
|
|
inlinestatic |
static bool Endpoint_IsSETUPReceived |
( |
void |
| ) |
|
|
inlinestatic |
static bool Endpoint_IsStalled |
( |
void |
| ) |
|
|
inlinestatic |
static void Endpoint_ResetDataToggle |
( |
void |
| ) |
|
|
inlinestatic |
static void Endpoint_ResetEndpoint |
( |
const uint8_t |
EndpointNumber | ) |
|
|
inlinestatic |
static void Endpoint_StallTransaction |
( |
void |
| ) |
|
|
inlinestatic |
void Endpoint_Streaming |
( |
uint8_t * |
buffer, |
|
|
uint16_t |
packetsize, |
|
|
uint16_t |
totalpackets, |
|
|
uint16_t |
dummypackets |
|
) |
| |
uint8_t Endpoint_WaitUntilReady |
( |
void |
| ) |
|
void HAL11UXX_WriteEndPoint |
( |
uint8_t |
EPNum, |
|
|
uint8_t * |
pData, |
|
|
uint32_t |
cnt |
|
) |
| |
uint8_t USB_Device_ControlEndpointSize |