STM8L15x Standard Peripherals Drivers: Data transfers functions

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

Data transfers functions

Data transfers functions. More...

Functions

uint8_t SPI_ReceiveData (SPI_TypeDef *SPIx)
 Returns the most recent received data by the SPI peripheral.
void SPI_SendData (SPI_TypeDef *SPIx, uint8_t Data)
 Transmits a Data through the SPI peripheral.

Detailed Description

Data transfers functions.

 ===============================================================================
                         Data transfers functions
 ===============================================================================  

  This section provides a set of functions allowing to manage the SPI 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_ReceiveData()
  function and returns the Rx buffered value. Whereas a write access to the SPI_DR 
  can be done using SPI_SendData() function and stores the written data into 
  Tx buffer.


Function Documentation

uint8_t SPI_ReceiveData ( SPI_TypeDef SPIx)

Returns the most recent received data by the SPI peripheral.

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

Definition at line 323 of file stm8l15x_spi.c.

References SPI_struct::DR.

void SPI_SendData ( SPI_TypeDef SPIx,
uint8_t  Data 
)

Transmits a Data through the SPI peripheral.

Parameters:
SPIx,:where x can be 1 to select the specified SPI peripheral.
Data,:Byte to be transmitted.
Return values:
None

Definition at line 313 of file stm8l15x_spi.c.

References SPI_struct::DR.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com