LUFA Library  120219
SPI_XMEGA.h File Reference

SPI Peripheral Driver (XMEGA) 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 << SPI_PRESCALER_gp))
#define SPI_SPEED_FCPU_DIV_16   (1 << SPI_PRESCALER_gp)
#define SPI_SPEED_FCPU_DIV_32   (SPI_USE_DOUBLESPEED | (2 << SPI_PRESCALER_gp))
#define SPI_SPEED_FCPU_DIV_64   (2 << SPI_PRESCALER_gp)
#define SPI_SPEED_FCPU_DIV_128   (3 << SPI_PRESCALER_gp)
SPI SCK Polarity Configuration Masks
#define SPI_SCK_LEAD_RISING   0
#define SPI_SCK_LEAD_FALLING   SPI_MODE1_bm
SPI Sample Edge Configuration Masks
#define SPI_SAMPLE_LEADING   0
#define SPI_SAMPLE_TRAILING   SPI_MODE0_bm
SPI Data Ordering Configuration Masks
#define SPI_ORDER_MSB_FIRST   0
#define SPI_ORDER_LSB_FIRST   SPI_DORD_bm
SPI Mode Configuration Masks
#define SPI_MODE_SLAVE   0
#define SPI_MODE_MASTER   SPI_MASTER_bm

Functions

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

Detailed Description

On-chip SPI driver for the XMEGA 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