STM8L15x Standard Peripherals Drivers
|
stm8l15x_usart.c File Reference
This file provides firmware functions to manage the following functionalities of the Universal synchronous asynchronous receiver transmitter (USART):
- Initialization and Configuration
- Data transfers
- Multi-Processor Communication
- Half-duplex mode
- Smartcard mode
- IrDA mode
- DMA transfers management
- Interrupts and flags management.
#include "stm8l15x_usart.h"
Go to the source code of this file.
Functions | |
void | USART_ClearFlag (USART_TypeDef *USARTx, USART_FLAG_TypeDef USART_FLAG) |
Clears the USARTx's pending flags. | |
void | USART_ClearITPendingBit (USART_TypeDef *USARTx, USART_IT_TypeDef USART_IT) |
Clears the USARTx�s interrupt pending bits. | |
void | USART_ClockInit (USART_TypeDef *USARTx, USART_Clock_TypeDef USART_Clock, USART_CPOL_TypeDef USART_CPOL, USART_CPHA_TypeDef USART_CPHA, USART_LastBit_TypeDef USART_LastBit) |
Initializes the USART Clock according to the specified parameters. | |
void | USART_Cmd (USART_TypeDef *USARTx, FunctionalState NewState) |
Enable the USART peripheral. | |
void | USART_DeInit (USART_TypeDef *USARTx) |
Deinitializes the USART peripheral. | |
void | USART_DMACmd (USART_TypeDef *USARTx, USART_DMAReq_TypeDef USART_DMAReq, FunctionalState NewState) |
Enables or disables the USART DMA interface. | |
FlagStatus | USART_GetFlagStatus (USART_TypeDef *USARTx, USART_FLAG_TypeDef USART_FLAG) |
Checks whether the specified USART flag is set or not. | |
ITStatus | USART_GetITStatus (USART_TypeDef *USARTx, USART_IT_TypeDef USART_IT) |
Checks whether the specified USART interrupt has occurred or not. | |
void | USART_HalfDuplexCmd (USART_TypeDef *USARTx, FunctionalState NewState) |
Enables or disables the USART�s Half Duplex communication. | |
void | USART_Init (USART_TypeDef *USARTx, uint32_t BaudRate, USART_WordLength_TypeDef USART_WordLength, USART_StopBits_TypeDef USART_StopBits, USART_Parity_TypeDef USART_Parity, USART_Mode_TypeDef USART_Mode) |
Initializes the USART according to the specified parameters. | |
void | USART_IrDACmd (USART_TypeDef *USARTx, FunctionalState NewState) |
Enables or disables the USART�s IrDA interface. | |
void | USART_IrDAConfig (USART_TypeDef *USARTx, USART_IrDAMode_TypeDef USART_IrDAMode) |
Configures the USART�s IrDA interface. | |
void | USART_ITConfig (USART_TypeDef *USARTx, USART_IT_TypeDef USART_IT, FunctionalState NewState) |
Enables or disables the specified USART interrupts. | |
uint8_t | USART_ReceiveData8 (USART_TypeDef *USARTx) |
Returns the most recent received data by the USART peripheral. | |
uint16_t | USART_ReceiveData9 (USART_TypeDef *USARTx) |
Returns the most recent received data by the USART peripheral. | |
void | USART_ReceiverWakeUpCmd (USART_TypeDef *USARTx, FunctionalState NewState) |
Determines if the USART is in mute mode or not. | |
void | USART_SendBreak (USART_TypeDef *USARTx) |
Transmits break characters. | |
void | USART_SendData8 (USART_TypeDef *USARTx, uint8_t Data) |
Transmits 8 bit data through the USART peripheral. | |
void | USART_SendData9 (USART_TypeDef *USARTx, uint16_t Data) |
Transmits 9 bit data through the USART peripheral. | |
void | USART_SetAddress (USART_TypeDef *USARTx, uint8_t USART_Address) |
Sets the address of the USART node. | |
void | USART_SetGuardTime (USART_TypeDef *USARTx, uint8_t USART_GuardTime) |
Sets the specified USART guard time. | |
void | USART_SetPrescaler (USART_TypeDef *USARTx, uint8_t USART_Prescaler) |
Sets the system clock prescaler. | |
void | USART_SmartCardCmd (USART_TypeDef *USARTx, FunctionalState NewState) |
Enables or disables the USART Smart Card mode. | |
void | USART_SmartCardNACKCmd (USART_TypeDef *USARTx, FunctionalState NewState) |
Enables or disables NACK transmission. | |
void | USART_WakeUpConfig (USART_TypeDef *USARTx, USART_WakeUp_TypeDef USART_WakeUp) |
Selects the USART WakeUp method. |
Detailed Description
This file provides firmware functions to manage the following functionalities of the Universal synchronous asynchronous receiver transmitter (USART):
- Initialization and Configuration
- Data transfers
- Multi-Processor Communication
- Half-duplex mode
- Smartcard mode
- IrDA mode
- DMA transfers management
- Interrupts and flags management.
- Attention:
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
© COPYRIGHT 2011 STMicroelectronics
Definition in file stm8l15x_usart.c.