LUFA Library  120219
Endpoint Data Reading and Writing (XMEGA)

Endpoint data read/write definitions for the Atmel AVR XMEGA architecture. More...

Enumerations

enum  Endpoint_WaitUntilReady_ErrorCodes_t {
  ENDPOINT_READYWAIT_NoError = 0,
  ENDPOINT_READYWAIT_EndpointStalled = 1,
  ENDPOINT_READYWAIT_DeviceDisconnected = 2,
  ENDPOINT_READYWAIT_BusSuspended = 3,
  ENDPOINT_READYWAIT_Timeout = 4,
  ENDPOINT_READYWAIT_NoError = 0,
  ENDPOINT_READYWAIT_EndpointStalled = 1,
  ENDPOINT_READYWAIT_DeviceDisconnected = 2,
  ENDPOINT_READYWAIT_BusSuspended = 3,
  ENDPOINT_READYWAIT_Timeout = 4,
  ENDPOINT_READYWAIT_NoError = 0,
  ENDPOINT_READYWAIT_EndpointStalled = 1,
  ENDPOINT_READYWAIT_DeviceDisconnected = 2,
  ENDPOINT_READYWAIT_BusSuspended = 3,
  ENDPOINT_READYWAIT_Timeout = 4
}

Functions

static uint16_t Endpoint_BytesInEndpoint (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
uint8_t Endpoint_WaitUntilReady (void)

Detailed Description

Functions, macros, variables, enums and types related to data reading and writing from and to endpoints.


Enumeration Type Documentation

Enum for the possible error return codes of the Endpoint_WaitUntilReady() function.

Enumerator:
ENDPOINT_READYWAIT_NoError 

Endpoint is ready for next packet, no error.

ENDPOINT_READYWAIT_EndpointStalled 

The endpoint was stalled during the stream transfer by the host or device.

ENDPOINT_READYWAIT_DeviceDisconnected 

Device was disconnected from the host while waiting for the endpoint to become ready.

ENDPOINT_READYWAIT_BusSuspended 

The USB bus has been suspended by the host and no USB endpoint traffic can occur until the bus has resumed.

ENDPOINT_READYWAIT_Timeout 

The host failed to accept or send the next packet within the software timeout period set by the USB_STREAM_TIMEOUT_MS macro.

ENDPOINT_READYWAIT_NoError 

Endpoint is ready for next packet, no error.

ENDPOINT_READYWAIT_EndpointStalled 

The endpoint was stalled during the stream transfer by the host or device.

ENDPOINT_READYWAIT_DeviceDisconnected 

Device was disconnected from the host while waiting for the endpoint to become ready.

ENDPOINT_READYWAIT_BusSuspended 

The USB bus has been suspended by the host and no USB endpoint traffic can occur until the bus has resumed.

ENDPOINT_READYWAIT_Timeout 

The host failed to accept or send the next packet within the software timeout period set by the USB_STREAM_TIMEOUT_MS macro.

ENDPOINT_READYWAIT_NoError 

Endpoint is ready for next packet, no error.

ENDPOINT_READYWAIT_EndpointStalled 

The endpoint was stalled during the stream transfer by the host or device.

ENDPOINT_READYWAIT_DeviceDisconnected 

Device was disconnected from the host while waiting for the endpoint to become ready.

ENDPOINT_READYWAIT_BusSuspended 

The USB bus has been suspended by the host and no USB endpoint traffic can occur until the bus has resumed.

ENDPOINT_READYWAIT_Timeout 

The host failed to accept or send the next packet within the software timeout period set by the USB_STREAM_TIMEOUT_MS macro.


Function Documentation

static uint16_t Endpoint_BytesInEndpoint ( void  ) [inline, static]

Indicates the number of bytes currently stored in the current endpoint's selected bank.

Note:
The return width of this function may differ, depending on the maximum endpoint bank size of the selected AVR model.
Returns:
Total number of bytes in the currently selected Endpoint's FIFO buffer.
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.

Note:
This routine should not be called on CONTROL type endpoints.
Returns:
A value from the Endpoint_WaitUntilReady_ErrorCodes_t enum.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines