| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
spi.c File Reference
`#include "board.h"`

Go to the source code of this file.

## Macros
#define | RW_TEST 1
#define | LOOPBACK_TEST 1
#define | BUFFER_SIZE 10
#define | SPI_MODE_TEST (SPI_MODE_MASTER)
#define | POLLING_MODE 1
#define | INTERRUPT_MODE 0
#define | LPC_SPI LPC_SPI1
#define | SPI_IRQ SPI1_IRQn
#define | SPIIRQHANDLER SPI1_IRQHandler

## Functions
static void | bufferInit (void)
static uint8_t | bufferVerify (void)
int | main (void)
| Main routine for SPI example.

## Variables
static uint16_t | TxBuf [BUFFER_SIZE]
static uint16_t | RxBuf [BUFFER_SIZE]
static SPI_CONFIG_T | ConfigStruct
static SPI_DELAY_CONFIG_T | DelayConfigStruct
static CHIP_SPI_DATA_SETUP_T | XfSetup
static volatile uint8_t | isXferCompleted = 0

## Macro Definition Documentation

#define BUFFER_SIZE 10

Definition at line 89 of file spi.c.

#define INTERRUPT_MODE 0

Definition at line 94 of file spi.c.

#define LOOPBACK_TEST 1

Definition at line 88 of file spi.c.

#define LPC_SPI LPC_SPI1

Definition at line 99 of file spi.c.

#define POLLING_MODE 1

Definition at line 92 of file spi.c.

#define RW_TEST 1

Definition at line 87 of file spi.c.

#define SPI_IRQ SPI1_IRQn

Definition at line 100 of file spi.c.

#define SPI_MODE_TEST (SPI_MODE_MASTER)

Definition at line 90 of file spi.c.

#define SPIIRQHANDLER SPI1_IRQHandler

Definition at line 101 of file spi.c.

## Function Documentation

static void bufferInit | ( | void |  | ) |
| static

Definition at line 124 of file spi.c.

static uint8_t bufferVerify | ( | void |  | ) |
| static

Definition at line 137 of file spi.c.

## Variable Documentation

SPI_CONFIG_T ConfigStruct
| static

Definition at line 109 of file spi.c.

SPI_DELAY_CONFIG_T DelayConfigStruct
| static

Definition at line 110 of file spi.c.

volatile uint8_t isXferCompleted = 0
| static

Definition at line 113 of file spi.c.

uint16_t RxBuf[BUFFER_SIZE]
| static

Definition at line 107 of file spi.c.

uint16_t TxBuf[BUFFER_SIZE]
| static

Definition at line 104 of file spi.c.

CHIP_SPI_DATA_SETUP_T XfSetup
| static

Definition at line 112 of file spi.c.