spi.h File Reference
SPI Routines.
More...
Go to the source code of this file.
Detailed Description
SPI Routines.
File Name: spi.h Project: TIMotorLIB
TI Doc: SPRUEU3A
- Author:
- Pablo Garcia (pgarcia@isa.uniovi.es)
- Date:
- 2011
Definition in file spi.h.
Enumeration Type Documentation
Loopback mode.
- Enumerator:
SPILBKDIS |
SPI disable loopback.
|
SPILBKENA |
SPI enable loopback.
|
Definition at line 48 of file spi.h.
SPI Network Mode Control.
- Enumerator:
SPISLAVE |
SPI configured as a slave.
|
SPIMASTER |
SPI configured as a master.
|
Definition at line 42 of file spi.h.
Function Documentation
void ConfigureSPIA |
( |
void(*)(void) |
interruptRX, |
|
|
void(*)(void) |
interruptTX, |
|
|
SPINMC |
networkModeControl, |
|
|
SPILBK |
spiLoopBack, |
|
|
Uint32 |
speed, |
|
|
Uint16 |
SPIcharLength, |
|
|
Uint16 |
txFIFO, |
|
|
Uint16 |
rxFIFO | |
|
) |
| | |
Intializes SPIA
- Parameters:
-
| interruptRX,: | pointer to ISR executed when new data is received |
| interruptTX,: | pointer to ISR executed when there is enough room in the txFIFO. |
| networkModeControl,: | device as master or slave (SPIMASTER/SPISLAVE) |
| spiLoopBack,: | enable/disable loopback mode (SPILBKENA/SPILBKDIS) |
| speed,: | baud rate configuration in Mhz |
| SPIcharLength,: | Character Length Control. Number of bits to be shifted in or out as a single character during one shift sequence. |
| txFIFO,: | transmit FIFO interrupt level bits. |
| rxFIFO,: | receive FIFO interrupt level bits. |
Definition at line 28 of file spi.c.
static void EndTransmission |
( |
void |
|
) |
[inline, static] |
void InitSpiaGpio |
( |
void |
|
) |
|
Definition at line 91 of file spi.c.
static void SendDataCharSpiA |
( |
volatile char * |
a |
) |
[inline, static] |
static void SendDataCharSpiANow |
( |
volatile char * |
a |
) |
[inline, static] |
static void SendDataIntSpiA |
( |
volatile Uint16 * |
a |
) |
[inline, static] |
static void SendDataIntSpiANow |
( |
volatile Uint16 * |
a |
) |
[inline, static] |
static void SendDataIQSpiA |
( |
volatile Uint32 * |
a |
) |
[inline, static] |
static void SendDataIQSpiANow |
( |
volatile Uint32 * |
a |
) |
[inline, static] |
static void SPIARxPIEAck |
( |
void |
|
) |
[inline, static] |
static void SPIATxPIEAck |
( |
void |
|
) |
[inline, static] |
static void StartTransmission |
( |
void |
|
) |
[inline, static] |
Definition at line 93 of file spi.h.