TMS320F28335 Library  1.0
Documentation
spi.h
Go to the documentation of this file.
1 
5 #include "global_defines.h"
6 
7 #ifndef SPI_SPI_H_
8 #define SPI_SPI_H_
9 
12 typedef struct _SPIInterface{
19 
22 void SPI_setTxInterrupt(void * isr);
23 void SPI_setRxInterrupt(void * isr);
24 void SPI_send(Uint16);
25 void SPI_read(Uint16 *);
26 void SPI_interruptAck(void);
27 void SPI_clearRxInterruptFlag(void);
28 void SPI_clearTxInterruptFlag(void);
29 
30 #endif /* SPI_SPI_H_ */
int16
int int16
16 Bit Variable: - 32.768 .. 32.767
Definition: global_defines.h:17
SPI_send
void SPI_send(Uint16)
Send data via SPI.
Definition: spi.c:258
SPI_read
void SPI_read(Uint16 *)
Read Rx-data of SPI module.
Definition: spi.c:269
_SPIInterface::spi_somi
Uint16 spi_somi
SPI-SOMI-GPIO (GPIO17)
Definition: spi.h:14
SPIInterface
struct _SPIInterface SPIInterface
SPI Interface: Assign GPIOs to SPI module.
SPI_clearTxInterruptFlag
void SPI_clearTxInterruptFlag(void)
Clear Interrupt Flag for transmit operation.
Definition: spi.c:298
_SPIInterface::spi_simo
Uint16 spi_simo
SPI-SIMO-GPIO (GPIO16)
Definition: spi.h:13
SPI_setTxInterrupt
void SPI_setTxInterrupt(void *isr)
Configuration of SPI Tx ISR.
Definition: spi.c:226
SPI_clearRxInterruptFlag
void SPI_clearRxInterruptFlag(void)
Clear Interrupt Flag for receive operation.
Definition: spi.c:289
init_SPIMasterMode
int16 init_SPIMasterMode(SPIInterface, Uint32)
Initialization of SPI Interface for Master mode.
Definition: spi.c:22
global_defines.h
Header file for global defines.
_SPIInterface::wordlength_in_bit
Uint16 wordlength_in_bit
Amount of Databits to be transmitted per SPI-Tx- and Rx-Operation.
Definition: spi.h:17
_SPIInterface::spi_clk
Uint16 spi_clk
SPI-CLOCK-GPIO (GPIO18)
Definition: spi.h:15
init_SPISlaveMode
int16 init_SPISlaveMode(SPIInterface)
Initialization of SPI Interface for slave mode.
Definition: spi.c:127
Uint16
unsigned int Uint16
16 Bit Variable: 0 .. 65.535
Definition: global_defines.h:21
SPI_setRxInterrupt
void SPI_setRxInterrupt(void *isr)
Configuration of SPI Rx ISR.
Definition: spi.c:242
_SPIInterface
SPI Interface: Assign GPIOs to SPI module.
Definition: spi.h:12
SPI_interruptAck
void SPI_interruptAck(void)
Giving interrupts acknowledge to interrupt again.
Definition: spi.c:280
Uint32
unsigned long Uint32
32 Bit Variable: 0 .. 4.294.967.295
Definition: global_defines.h:22
_SPIInterface::spi_ss
Uint16 spi_ss
SPI-SlaveSelect-GPIO (GPIO19)
Definition: spi.h:16