NXP's driver library for LPC17xx, ported to mbed's online compiler. Not tested! I had to fix a lot of warings and found a couple of pretty obvious bugs, so the chances are there are more. Original: http://ics.nxp.com/support/documents/microcontrollers/zip/lpc17xx.cmsis.driver.library.zip

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

SPI_CFG_Type Struct Reference

SPI_CFG_Type Struct Reference
[SPI_Public_Types]

SPI configuration structure. More...

#include <lpc17xx_spi.h>

Data Fields

uint32_t CPHA
 Databit number, should be SPI_DATABIT_x, where x is in range from 8 - 16.
uint32_t CPOL
 Clock phase, should be:

  • SPI_CPHA_FIRST: first clock edge
  • SPI_CPHA_SECOND: second clock edge.

uint32_t Mode
 Clock polarity, should be:

  • SPI_CPOL_HI: high level
  • SPI_CPOL_LO: low level.

uint32_t DataOrder
 SPI mode, should be:

  • SPI_MASTER_MODE: Master mode
  • SPI_SLAVE_MODE: Slave mode.

uint32_t ClockRate
 Data order, should be:

  • SPI_DATA_MSB_FIRST: MSB first
  • SPI_DATA_LSB_FIRST: LSB first.


Detailed Description

SPI configuration structure.

Definition at line 160 of file lpc17xx_spi.h.


Field Documentation

uint32_t ClockRate

Data order, should be:

  • SPI_DATA_MSB_FIRST: MSB first
  • SPI_DATA_LSB_FIRST: LSB first.

Definition at line 175 of file lpc17xx_spi.h.

uint32_t CPHA

Databit number, should be SPI_DATABIT_x, where x is in range from 8 - 16.

Definition at line 163 of file lpc17xx_spi.h.

uint32_t CPOL

Clock phase, should be:

  • SPI_CPHA_FIRST: first clock edge
  • SPI_CPHA_SECOND: second clock edge.

Definition at line 166 of file lpc17xx_spi.h.

uint32_t DataOrder

SPI mode, should be:

  • SPI_MASTER_MODE: Master mode
  • SPI_SLAVE_MODE: Slave mode.

Definition at line 172 of file lpc17xx_spi.h.

uint32_t Mode

Clock polarity, should be:

  • SPI_CPOL_HI: high level
  • SPI_CPOL_LO: low level.

Definition at line 169 of file lpc17xx_spi.h.