uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SPI Public Macros

Macros

#define SPI_CPHA_FIRST   ((uint32_t)(0))
 
#define SPI_CPHA_SECOND   ((uint32_t)(1<<3))
 
#define SPI_CPOL_HI   ((uint32_t)(0))
 
#define SPI_CPOL_LO   ((uint32_t)(1<<4))
 
#define SPI_SLAVE_MODE   ((uint32_t)(0))
 
#define SPI_MASTER_MODE   ((uint32_t)(1<<5))
 
#define SPI_DATA_MSB_FIRST   ((uint32_t)(0))
 
#define SPI_DATA_LSB_FIRST   ((uint32_t)(1<<6))
 
#define SPI_DATABIT_16   SPI_SPCR_BITS(0)
 
#define SPI_DATABIT_8   SPI_SPCR_BITS(0x08)
 
#define SPI_DATABIT_9   SPI_SPCR_BITS(0x09)
 
#define SPI_DATABIT_10   SPI_SPCR_BITS(0x0A)
 
#define SPI_DATABIT_11   SPI_SPCR_BITS(0x0B)
 
#define SPI_DATABIT_12   SPI_SPCR_BITS(0x0C)
 
#define SPI_DATABIT_13   SPI_SPCR_BITS(0x0D)
 
#define SPI_DATABIT_14   SPI_SPCR_BITS(0x0E)
 
#define SPI_DATABIT_15   SPI_SPCR_BITS(0x0F)
 
#define SPI_STAT_ABRT   SPI_SPSR_ABRT
 
#define SPI_STAT_MODF   SPI_SPSR_MODF
 
#define SPI_STAT_ROVR   SPI_SPSR_ROVR
 
#define SPI_STAT_WCOL   SPI_SPSR_WCOL
 
#define SPI_STAT_SPIF   SPI_SPSR_SPIF
 
#define SPI_STAT_DONE   (1UL<<8)
 
#define SPI_STAT_ERROR   (1UL<<9)
 

Detailed Description

Macro Definition Documentation

#define SPI_CPHA_FIRST   ((uint32_t)(0))

SPI configuration parameter definesClock phase control bit

Definition at line 49 of file lpc17xx_spi.h.

#define SPI_CPHA_SECOND   ((uint32_t)(1<<3))

Definition at line 50 of file lpc17xx_spi.h.

#define SPI_CPOL_HI   ((uint32_t)(0))

Clock polarity control bit

Definition at line 53 of file lpc17xx_spi.h.

#define SPI_CPOL_LO   ((uint32_t)(1<<4))

Definition at line 54 of file lpc17xx_spi.h.

#define SPI_DATA_LSB_FIRST   ((uint32_t)(1<<6))

Definition at line 62 of file lpc17xx_spi.h.

#define SPI_DATA_MSB_FIRST   ((uint32_t)(0))

LSB enable bit

Definition at line 61 of file lpc17xx_spi.h.

#define SPI_DATABIT_10   SPI_SPCR_BITS(0x0A)

Databit number = 10

Definition at line 68 of file lpc17xx_spi.h.

#define SPI_DATABIT_11   SPI_SPCR_BITS(0x0B)

Databit number = 11

Definition at line 69 of file lpc17xx_spi.h.

#define SPI_DATABIT_12   SPI_SPCR_BITS(0x0C)

Databit number = 12

Definition at line 70 of file lpc17xx_spi.h.

#define SPI_DATABIT_13   SPI_SPCR_BITS(0x0D)

Databit number = 13

Definition at line 71 of file lpc17xx_spi.h.

#define SPI_DATABIT_14   SPI_SPCR_BITS(0x0E)

Databit number = 14

Definition at line 72 of file lpc17xx_spi.h.

#define SPI_DATABIT_15   SPI_SPCR_BITS(0x0F)

Databit number = 15

Definition at line 73 of file lpc17xx_spi.h.

#define SPI_DATABIT_16   SPI_SPCR_BITS(0)

SPI data bit number defines Databit number = 16

Definition at line 65 of file lpc17xx_spi.h.

#define SPI_DATABIT_8   SPI_SPCR_BITS(0x08)

Databit number = 8

Definition at line 66 of file lpc17xx_spi.h.

#define SPI_DATABIT_9   SPI_SPCR_BITS(0x09)

Databit number = 9

Definition at line 67 of file lpc17xx_spi.h.

#define SPI_MASTER_MODE   ((uint32_t)(1<<5))

Definition at line 58 of file lpc17xx_spi.h.

#define SPI_SLAVE_MODE   ((uint32_t)(0))

SPI master mode enable

Definition at line 57 of file lpc17xx_spi.h.

#define SPI_STAT_ABRT   SPI_SPSR_ABRT

SPI Status Flag definesSlave abort

Definition at line 79 of file lpc17xx_spi.h.

#define SPI_STAT_DONE   (1UL<<8)

Done

Definition at line 90 of file lpc17xx_spi.h.

#define SPI_STAT_ERROR   (1UL<<9)

Error

Definition at line 91 of file lpc17xx_spi.h.

#define SPI_STAT_MODF   SPI_SPSR_MODF

Mode fault

Definition at line 81 of file lpc17xx_spi.h.

#define SPI_STAT_ROVR   SPI_SPSR_ROVR

Read overrun

Definition at line 83 of file lpc17xx_spi.h.

#define SPI_STAT_SPIF   SPI_SPSR_SPIF

SPI transfer complete flag

Definition at line 87 of file lpc17xx_spi.h.

#define SPI_STAT_WCOL   SPI_SPSR_WCOL

Write collision

Definition at line 85 of file lpc17xx_spi.h.