LUFA Library  120219
SPI_AVR8.h File Reference

SPI Peripheral Driver (AVR8) More...

Defines

SPI Prescaler Configuration Masks
#define SPI_SPEED_FCPU_DIV_2   SPI_USE_DOUBLESPEED
#define SPI_SPEED_FCPU_DIV_4   0
#define SPI_SPEED_FCPU_DIV_8   (SPI_USE_DOUBLESPEED | (1 << SPR0))
#define SPI_SPEED_FCPU_DIV_16   (1 << SPR0)
#define SPI_SPEED_FCPU_DIV_32   (SPI_USE_DOUBLESPEED | (1 << SPR1))
#define SPI_SPEED_FCPU_DIV_64   (SPI_USE_DOUBLESPEED | (1 << SPR1) | (1 << SPR0))
#define SPI_SPEED_FCPU_DIV_128   ((1 << SPR1) | (1 << SPR0))
SPI SCK Polarity Configuration Masks
#define SPI_SCK_LEAD_RISING   (0 << CPOL)
#define SPI_SCK_LEAD_FALLING   (1 << CPOL)
SPI Sample Edge Configuration Masks
#define SPI_SAMPLE_LEADING   (0 << CPHA)
#define SPI_SAMPLE_TRAILING   (1 << CPHA)
SPI Data Ordering Configuration Masks
#define SPI_ORDER_MSB_FIRST   (0 << DORD)
#define SPI_ORDER_LSB_FIRST   (1 << DORD)
SPI Mode Configuration Masks
#define SPI_MODE_SLAVE   (0 << MSTR)
#define SPI_MODE_MASTER   (1 << MSTR)

Functions

static void SPI_Init (const uint8_t SPIOptions)
static void SPI_Disable (void)
static uint8_t SPI_GetCurrentMode (void) ATTR_ALWAYS_INLINE
static uint8_t SPI_TransferByte (const uint8_t Byte) ATTR_ALWAYS_INLINE
static void SPI_SendByte (const uint8_t Byte) ATTR_ALWAYS_INLINE
static uint8_t SPI_ReceiveByte (void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT

Detailed Description

On-chip SPI driver for the 8-bit AVR microcontrollers.

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