Библиотека LUFA (раннее название MyUSB) версия 101122
Endpoint.h File Reference

Определения для поддержки конечной точки устройства USB. More...

#include <avr/io.h>
#include <stdbool.h>
#include "../../../Common/Common.h"
#include "../HighLevel/USBTask.h"
#include "USBInterrupt.h"

Defines

#define ENDPOINT_CONTROLEP   0
#define ENDPOINT_CONTROLEP_DEFAULT_SIZE   8
#define ENDPOINT_EPNUM_MASK   0x07
#define ENDPOINT_EPDIR_MASK   0x80
#define ENDPOINT_EPSIZE_MASK   0x7F
#define ENDPOINT_MAX_SIZE(EPIndex)   _ENDPOINT_GET_MAXSIZE(EPIndex)
#define ENDPOINT_BANKS_SUPPORTED(EPIndex)   _ENDPOINT_GET_BANKS(EPIndex)
#define ENDPOINT_TOTAL_ENDPOINTS   ENDPOINT_DETAILS_MAXEP
Маски направления данных конечной точки
#define ENDPOINT_DIR_OUT   (0 << EPDIR)
#define ENDPOINT_DIR_IN   (1 << EPDIR)
Маски режима банка конечной точки
#define ENDPOINT_BANK_SINGLE   (0 << EPBK0)
#define ENDPOINT_BANK_DOUBLE   (1 << EPBK0)

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
}

Functions

static bool Endpoint_ConfigureEndpoint (const uint8_t Number, const uint8_t Type, const uint8_t Direction, const uint16_t Size, const uint8_t Banks) ATTR_ALWAYS_INLINE
static uint16_t Endpoint_BytesInEndpoint (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static uint8_t Endpoint_GetCurrentEndpoint (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Endpoint_SelectEndpoint (const uint8_t EndpointNumber) ATTR_ALWAYS_INLINE
static void Endpoint_ResetFIFO (const uint8_t EndpointNumber) ATTR_ALWAYS_INLINE
static void Endpoint_EnableEndpoint (void) ATTR_ALWAYS_INLINE
static void Endpoint_DisableEndpoint (void) ATTR_ALWAYS_INLINE
static bool Endpoint_IsEnabled (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Endpoint_AbortPendingIN (void)
static uint8_t Endpoint_GetBusyBanks (void)
static bool Endpoint_IsReadWriteAllowed (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static bool Endpoint_IsConfigured (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static uint8_t Endpoint_GetEndpointInterrupts (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static bool Endpoint_HasEndpointInterrupted (const uint8_t EndpointNumber) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static bool Endpoint_IsINReady (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static bool Endpoint_IsOUTReceived (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static bool Endpoint_IsSETUPReceived (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
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
static void Endpoint_ResetDataToggle (void) ATTR_ALWAYS_INLINE
static uint8_t Endpoint_GetEndpointDirection (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Endpoint_SetEndpointDirection (const uint8_t DirectionMask) ATTR_ALWAYS_INLINE
static uint8_t Endpoint_Read_Byte (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Endpoint_Write_Byte (const uint8_t Byte) ATTR_ALWAYS_INLINE
static void Endpoint_Discard_Byte (void) ATTR_ALWAYS_INLINE
static uint16_t Endpoint_Read_Word_LE (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static uint16_t Endpoint_Read_Word_BE (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Endpoint_Write_Word_LE (const uint16_t Word) ATTR_ALWAYS_INLINE
static void Endpoint_Write_Word_BE (const uint16_t Word) ATTR_ALWAYS_INLINE
static void Endpoint_Discard_Word (void) ATTR_ALWAYS_INLINE
static uint32_t Endpoint_Read_DWord_LE (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static uint32_t Endpoint_Read_DWord_BE (void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE
static void Endpoint_Write_DWord_LE (const uint32_t DWord) ATTR_ALWAYS_INLINE
static void Endpoint_Write_DWord_BE (const uint32_t DWord) ATTR_ALWAYS_INLINE
static void Endpoint_Discard_DWord (void) ATTR_ALWAYS_INLINE
void Endpoint_ClearStatusStage (void)
uint8_t Endpoint_WaitUntilReady (void)

Variables

uint8_t USB_ControlEndpointSize

Detailed Description

Этот файл содержит структуры, прототипы функций и макросы, связанные с поддержкой конечных точек данных устройства, когда библиотека инициализирована в режиме устройства USB.

Note:
Этот файл не должен включаться (include) самостоятельно. Он автоматически подключается при необходимости диспетчером заголовков драйвера USB, находящемся в LUFA/Drivers/USB/USB.h.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines