iLLD_TC27xC  1.0
Communication Functions
Collaboration diagram for Communication Functions:

Functions

IFX_EXTERN IfxAsclin_Spi_Status IfxAsclin_Spi_exchange (IfxAsclin_Spi *asclin, void *src, void *dest, uint32 count)
 starts the data exchange More...
 
IFX_EXTERN void IfxAsclin_Spi_read (IfxAsclin_Spi *asclin)
 Reads data from the Rx FIFO based on the outlet width. More...
 
IFX_EXTERN void IfxAsclin_Spi_write (IfxAsclin_Spi *asclin)
 Writes data into the Tx FIFO based on the inlet width. More...
 

Detailed Description

Function Documentation

IFX_EXTERN IfxAsclin_Spi_Status IfxAsclin_Spi_exchange ( IfxAsclin_Spi asclin,
void *  src,
void *  dest,
uint32  count 
)

starts the data exchange

Parameters
asclinmodule handle
srcpointer to transmit data buffer
destpointer to receive data buffer
countcount of the data
Returns
status

Usage Example:

following buffers are assumed to be declared globally:

uint8 spiTxBuffer[SPI_BUFFER_SIZE] = { 1, 2, 3, 4, 5, 6, 7, 8 };
uint8 spiRxBuffer[SPI_BUFFER_SIZE] = { 0, 0, 0, 0, 0, 0, 0, 0 };

Sending and Receiving a data stream:

// wait until transfer of previous data stream is finished
// send/receive new stream
IfxAsclin_Spi_exchange(&spi, &spiTxBuffer[i], &spiRxBuffer[i], 8);

Send only, discard received data:

// wait until transfer of previous data stream is finished
// send new stream
IfxAsclin_Spi_exchange(&spi, &spiTxBuffer[i], NULL_PTR, 8);

Receive only, send all 1's

// wait until transfer of previous data stream is finished
// receive new stream
IfxAsclin_Spi_exchange(&spi, NULL_PTR, &spiRxBuffer[i], 8);

Definition at line 62 of file IfxAsclin_Spi.c.

IFX_EXTERN void IfxAsclin_Spi_read ( IfxAsclin_Spi asclin)

Reads data from the Rx FIFO based on the outlet width.

Parameters
asclinmodule handle
Returns
None

Definition at line 357 of file IfxAsclin_Spi.c.

Referenced by IfxAsclin_Spi_isrReceive().

IFX_EXTERN void IfxAsclin_Spi_write ( IfxAsclin_Spi asclin)

Writes data into the Tx FIFO based on the inlet width.

Parameters
asclinmodule handle
Returns
None

Definition at line 408 of file IfxAsclin_Spi.c.

Referenced by IfxAsclin_Spi_exchange(), and IfxAsclin_Spi_isrTransmit().