spi.h File Reference

SPI Routines. More...

Go to the source code of this file.

Enumerations

enum  SPINMC { SPISLAVE = 0, SPIMASTER = 1 }
 

SPI Network Mode Control.

More...
enum  SPILBK { SPILBKDIS = 0, SPILBKENA = 1 }
 

Loopback mode.

More...

Functions

void ConfigureSPIA (void(*interruptRX)(void), void(*interruptTX)(void), SPINMC networkModeControl, SPILBK spiLoopBack, Uint32 speed, Uint16 SPIcharLength, Uint16 txFIFO, Uint16 rxFIFO)
void InitSpiaGpio (void)
static void StartTransmission (void)
static void EndTransmission (void)
static void SPIATxPIEAck (void)
static void SPIARxPIEAck (void)
static void SendDataCharSpiA (volatile char *a)
static void SendDataCharSpiANow (volatile char *a)
static void SendDataIntSpiA (volatile Uint16 *a)
static void SendDataIntSpiANow (volatile Uint16 *a)
static void SendDataIQSpiA (volatile Uint32 *a)
static void SendDataIQSpiANow (volatile Uint32 *a)

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

enum SPILBK

Loopback mode.

Enumerator:
SPILBKDIS 

SPI disable loopback.

SPILBKENA 

SPI enable loopback.

Definition at line 48 of file spi.h.

enum SPINMC

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]

Definition at line 103 of file spi.h.

void InitSpiaGpio ( void   ) 

Definition at line 91 of file spi.c.

static void SendDataCharSpiA ( volatile char *  a  )  [inline, static]

Definition at line 129 of file spi.h.

static void SendDataCharSpiANow ( volatile char *  a  )  [inline, static]

Definition at line 162 of file spi.h.

static void SendDataIntSpiA ( volatile Uint16 *  a  )  [inline, static]

Definition at line 138 of file spi.h.

static void SendDataIntSpiANow ( volatile Uint16 *  a  )  [inline, static]

Definition at line 170 of file spi.h.

static void SendDataIQSpiA ( volatile Uint32 *  a  )  [inline, static]

Definition at line 150 of file spi.h.

static void SendDataIQSpiANow ( volatile Uint32 *  a  )  [inline, static]

Definition at line 181 of file spi.h.

static void SPIARxPIEAck ( void   )  [inline, static]

Definition at line 120 of file spi.h.

static void SPIATxPIEAck ( void   )  [inline, static]

Definition at line 112 of file spi.h.

static void StartTransmission ( void   )  [inline, static]

Definition at line 93 of file spi.h.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated on Mon Apr 23 12:59:21 2012 for TIMotorLIB by  doxygen 1.6.3