LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
spi_8xx.h File Reference

Go to the source code of this file.

Data Structures

struct  CHIP_SPI_DATA_SETUP_T
 SPI data setup structure. More...
 

Typedefs

typedef IP_SPI_CONFIG_T SPI_CONFIG_T
 
typedef IP_SPI_DELAY_CONFIG_T SPI_DELAY_CONFIG_T
 

Functions

void Chip_SPI_Init (LPC_SPI_T *pSPI, SPI_CONFIG_T *pConfig)
 Initialize the SPI.
 
uint32_t Chip_SPI_CalClkRateDivider (LPC_SPI_T *pSPI, uint32_t bitRate)
 Calculate the divider for SPI clock.
 
STATIC INLINE void Chip_SPI_DelayConfig (LPC_SPI_T *pSPI, SPI_DELAY_CONFIG_T *pConfig)
 Config SPI Delay parameters.
 
void Chip_SPI_DeInit (LPC_SPI_T *pSPI)
 Disable SPI operation.
 
void Chip_SPI_Int_Cmd (LPC_SPI_T *pSPI, uint32_t IntMask, FunctionalState NewState)
 Enable/Disable SPI interrupt.
 
STATIC INLINE void Chip_SPI_Enable (IP_SPI_002_T *pSPI)
 Enable SPI peripheral.
 
STATIC INLINE void Chip_SPI_Disable (IP_SPI_002_T *pSPI)
 Disable SPI peripheral.
 
STATIC INLINE void Chip_SPI_EnableLoopBack (LPC_SPI_T *pSPI)
 Enable loopback mode.
 
STATIC INLINE void Chip_SPI_DisableLoopBack (LPC_SPI_T *pSPI)
 Disable loopback mode.
 
STATIC INLINE uint32_t Chip_SPI_GetStatus (LPC_SPI_T *pSPI)
 Get the current status of SPI controller.
 
STATIC INLINE void Chip_SPI_SendFirstFrame_RxIgnore (LPC_SPI_T *pSPI, uint16_t Data, uint8_t DataSize)
 Send the first Frame of a transfer (Rx Ignore)
 
STATIC INLINE void Chip_SPI_SendFirstFrame (LPC_SPI_T *pSPI, uint16_t Data, uint8_t DataSize)
 Send the first Frame of a transfer.
 
STATIC INLINE void Chip_SPI_SendMidFrame (LPC_SPI_T *pSPI, uint16_t Data)
 Send the middle Frame of a transfer.
 
STATIC INLINE void Chip_SPI_SendLastFrame_RxIgnore (LPC_SPI_T *pSPI, uint16_t Data, uint8_t DataSize)
 Send the last Frame of a transfer (Rx Ignore)
 
STATIC INLINE void Chip_SPI_SendLastFrame (LPC_SPI_T *pSPI, uint16_t Data, uint8_t DataSize)
 Send the last Frame of a transfer.
 
STATIC INLINE uint16_t Chip_SPI_ReceiveFrame (LPC_SPI_T *pSPI)
 Read data received.
 
Status Chip_SPI_Int_RWFrames (LPC_SPI_T *pSPI, CHIP_SPI_DATA_SETUP_T *xf_setup)
 SPI Interrupt Read/Write.
 
uint32_t Chip_SPI_RWFrames_Blocking (LPC_SPI_T *pSPI, CHIP_SPI_DATA_SETUP_T *pXfSetup)
 SPI Polling Read/Write in blocking mode.
 
uint32_t Chip_SPI_WriteFrames_Blocking (LPC_SPI_T *pSPI, CHIP_SPI_DATA_SETUP_T *pXfSetup)
 SPI Polling Write in blocking mode.
 
uint32_t Chip_SPI_ReadFrames_Blocking (LPC_SPI_T *pSPI, CHIP_SPI_DATA_SETUP_T *pXfSetup)
 SPI Polling Read in blocking mode.