Martin Johnson / STM32F3-Discovery

Dependents:   Space_Invaders_Demo neopixels gpio_test_stm32f3_discovery gpio_test_systimer ... more

Embed: (wiki syntax)

« Back to documentation index

Data transfers functions

Data transfers functions
[SPI_Private_Functions]

Data transfers functions. More...

Functions

void SPI_SendData8 (SPI_TypeDef *SPIx, uint8_t Data)
 Transmits a Data through the SPIx peripheral.
void SPI_I2S_SendData16 (SPI_TypeDef *SPIx, uint16_t Data)
 Transmits a Data through the SPIx/I2Sx peripheral.
uint8_t SPI_ReceiveData8 (SPI_TypeDef *SPIx)
 Returns the most recent received data by the SPIx peripheral.
uint16_t SPI_I2S_ReceiveData16 (SPI_TypeDef *SPIx)
 Returns the most recent received data by the SPIx peripheral.

Detailed Description

Data transfers functions.

 ===============================================================================
                    ##### Data transfers functions #####
 ===============================================================================  
    [..] This section provides a set of functions allowing to manage the SPI or I2S 
         data transfers.
    [..] In reception, data are received and then stored into an internal Rx buffer while 
         In transmission, data are first stored into an internal Tx buffer before being 
         transmitted.
    [..] The read access of the SPI_DR register can be done using the SPI_I2S_ReceiveData()
         function and returns the Rx buffered value. Whereas a write access to the SPI_DR 
         can be done using SPI_I2S_SendData() function and stores the written data into 
         Tx buffer.


Function Documentation

uint16_t SPI_I2S_ReceiveData16 ( SPI_TypeDef *  SPIx )

Returns the most recent received data by the SPIx peripheral.

Parameters:
SPIx,:To select the SPIx/I2Sx peripheral, where x can be: 1, 2, 3 or 4 in SPI mode or 2 or 3 in I2S mode or I2Sxext for I2S full duplex mode.
Return values:
Thevalue of the received data.

Definition at line 889 of file stm32f30x_spi.c.

void SPI_I2S_SendData16 ( SPI_TypeDef *  SPIx,
uint16_t  Data 
)

Transmits a Data through the SPIx/I2Sx peripheral.

Parameters:
SPIx,:To select the SPIx/I2Sx peripheral, where x can be: 1, 2 or 3 in SPI mode or 2 or 3 in I2S mode or I2Sxext for I2S full duplex mode.
Data,:Data to be transmitted.
Return values:
None

Definition at line 857 of file stm32f30x_spi.c.

uint8_t SPI_ReceiveData8 ( SPI_TypeDef *  SPIx )

Returns the most recent received data by the SPIx peripheral.

Parameters:
SPIx,:where x can be 1, 2, 3 or 4 to select the SPI peripheral.
Return values:
Thevalue of the received data.

Definition at line 870 of file stm32f30x_spi.c.

void SPI_SendData8 ( SPI_TypeDef *  SPIx,
uint8_t  Data 
)

Transmits a Data through the SPIx peripheral.

Parameters:
SPIx,:where x can be 1, 2, 3 or 4 to select the SPI peripheral.
Data,:Data to be transmitted.
Return values:
None

Definition at line 837 of file stm32f30x_spi.c.