STM32F0 Standard Peripheral bibliotheek  1.0
ST Microelectronics standard peripheral bibliotheek documentatie voor de STM32F0 familie
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
Data transfers functions

Data transfers functions. More...

Functions

void USART_SendData (USART_TypeDef *USARTx, uint16_t Data)
 Transmits single data through the USARTx peripheral. More...
 
uint16_t USART_ReceiveData (USART_TypeDef *USARTx)
 Returns the most recent received data by the USARTx peripheral. More...
 

Detailed Description

Data transfers functions.

 ===============================================================================
                    ##### Data transfers functions #####
 ===============================================================================
    [..] This subsection provides a set of functions allowing to manage 
         the USART data transfers.
    [..] During an USART reception, data shifts in least significant bit first 
         through the RX pin. When a transmission is taking place, a write instruction to 
         the USART_TDR register stores the data in the shift register.
    [..] The read access of the USART_RDR register can be done using 
         the USART_ReceiveData() function and returns the RDR value.
         Whereas a write access to the USART_TDR can be done using USART_SendData()
         function and stores the written data into TDR.

Function Documentation

uint16_t USART_ReceiveData ( USART_TypeDef *  USARTx)

Returns the most recent received data by the USARTx peripheral.

Parameters
USARTx,:where x can be 1 or 2 to select the USART peripheral.
Return values
Thereceived data.
void USART_SendData ( USART_TypeDef *  USARTx,
uint16_t  Data 
)

Transmits single data through the USARTx peripheral.

Parameters
USARTx,:where x can be 1 or 2 to select the USART peripheral.
Data,:the data to transmit.
Return values
None