LUFA Library  120219
Pipe_AVR8.h File Reference

USB Pipe definitions for the AVR8 microcontrollers. More...

Defines

#define PIPE_CONTROLPIPE_DEFAULT_SIZE   64
#define PIPE_TOTAL_PIPES   7
#define PIPE_MAX_SIZE   256
Pipe Error Flag Masks
#define PIPE_ERRORFLAG_OVERFLOW   (1 << 6)
#define PIPE_ERRORFLAG_UNDERFLOW   (1 << 5)
#define PIPE_ERRORFLAG_CRC16   (1 << 4)
#define PIPE_ERRORFLAG_TIMEOUT   (1 << 3)
#define PIPE_ERRORFLAG_PID   (1 << 2)
#define PIPE_ERRORFLAG_DATAPID   (1 << 1)
#define PIPE_ERRORFLAG_DATATGL   (1 << 0)
Pipe Token Masks
#define PIPE_TOKEN_SETUP   (0 << PTOKEN0)
#define PIPE_TOKEN_IN   (1 << PTOKEN0)
#define PIPE_TOKEN_OUT   (2 << PTOKEN0)
Pipe Bank Mode Masks
#define PIPE_BANK_SINGLE   (0 << EPBK0)
#define PIPE_BANK_DOUBLE   (1 << EPBK0)

Enumerations

enum  Pipe_WaitUntilReady_ErrorCodes_t {
  PIPE_READYWAIT_NoError = 0,
  PIPE_READYWAIT_PipeStalled = 1,
  PIPE_READYWAIT_DeviceDisconnected = 2,
  PIPE_READYWAIT_Timeout = 3,
  PIPE_READYWAIT_NoError = 0,
  PIPE_READYWAIT_PipeStalled = 1,
  PIPE_READYWAIT_DeviceDisconnected = 2,
  PIPE_READYWAIT_Timeout = 3
}

Functions

static uint16_t Pipe_BytesInPipe (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static uint8_t Pipe_GetCurrentPipe (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Pipe_SelectPipe (const uint8_t PipeNumber) ATTR_ALWAYS_INLINE
static void Pipe_ResetPipe (const uint8_t PipeNumber) ATTR_ALWAYS_INLINE
static void Pipe_EnablePipe (void) ATTR_ALWAYS_INLINE
static void Pipe_DisablePipe (void) ATTR_ALWAYS_INLINE
static bool Pipe_IsEnabled (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static uint8_t Pipe_GetPipeToken (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Pipe_SetPipeToken (const uint8_t Token) ATTR_ALWAYS_INLINE
static void Pipe_SetInfiniteINRequests (void) ATTR_ALWAYS_INLINE
static void Pipe_SetFiniteINRequests (const uint8_t TotalINRequests) ATTR_ALWAYS_INLINE
static bool Pipe_IsConfigured (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static uint8_t Pipe_GetBoundEndpointAddress (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Pipe_SetInterruptPeriod (const uint8_t Milliseconds) ATTR_ALWAYS_INLINE
static uint8_t Pipe_GetPipeInterrupts (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static bool Pipe_HasPipeInterrupted (const uint8_t PipeNumber) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Pipe_Unfreeze (void) ATTR_ALWAYS_INLINE
static void Pipe_Freeze (void) ATTR_ALWAYS_INLINE
static bool Pipe_IsFrozen (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Pipe_ClearError (void) ATTR_ALWAYS_INLINE
static bool Pipe_IsError (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static uint8_t Pipe_GetErrorFlags (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static uint8_t Pipe_GetBusyBanks (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static bool Pipe_IsReadWriteAllowed (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static bool Pipe_IsINReceived (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static bool Pipe_IsOUTReady (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static bool Pipe_IsSETUPSent (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Pipe_ClearSETUP (void) ATTR_ALWAYS_INLINE
static void Pipe_ClearIN (void) ATTR_ALWAYS_INLINE
static void Pipe_ClearOUT (void) ATTR_ALWAYS_INLINE
static bool Pipe_IsNAKReceived (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Pipe_ClearNAKReceived (void) ATTR_ALWAYS_INLINE
static bool Pipe_IsStalled (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Pipe_ClearStall (void) ATTR_ALWAYS_INLINE
static uint8_t Pipe_Read_8 (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Pipe_Write_8 (const uint8_t Data) ATTR_ALWAYS_INLINE
static void Pipe_Discard_8 (void) ATTR_ALWAYS_INLINE
static uint16_t Pipe_Read_16_LE (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static uint16_t Pipe_Read_16_BE (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Pipe_Write_16_LE (const uint16_t Data) ATTR_ALWAYS_INLINE
static void Pipe_Write_16_BE (const uint16_t Data) ATTR_ALWAYS_INLINE
static void Pipe_Discard_16 (void) ATTR_ALWAYS_INLINE
static uint32_t Pipe_Read_32_LE (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static uint32_t Pipe_Read_32_BE (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Pipe_Write_32_LE (const uint32_t Data) ATTR_ALWAYS_INLINE
static void Pipe_Write_32_BE (const uint32_t Data) ATTR_ALWAYS_INLINE
static void Pipe_Discard_32 (void) ATTR_ALWAYS_INLINE
bool Pipe_ConfigurePipe (const uint8_t Number, const uint8_t Type, const uint8_t Token, const uint8_t EndpointNumber, const uint16_t Size, const uint8_t Banks)
uint8_t Pipe_WaitUntilReady (void)
bool Pipe_IsEndpointBound (const uint8_t EndpointAddress) ATTR_WARN_UNUSED_RESULT

Variables

uint8_t USB_Host_ControlPipeSize

Detailed Description

This module contains functions, macros and enums related to pipe management when in USB Host mode. This module contains the pipe management macros, as well as pipe interrupt and data send/receive functions for various data types.

Note:
This file should not be included directly. It is automatically included as needed by the USB driver dispatch header located in LUFA/Drivers/USB/USB.h.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines