Created
October 11, 2013 09:05
-
-
Save fboris/6931808 to your computer and use it in GitHub Desktop.
USART Init Structure definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @brief USART Init Structure definition | |
*/ | |
typedef struct | |
{ | |
uint32_t USART_BaudRate; /*!< This member configures the USART communication baud rate. | |
The baud rate is computed using the following formula: | |
- IntegerDivider = ((PCLKx) / (16 * (USART_InitStruct->USART_BaudRate))) | |
- FractionalDivider = ((IntegerDivider - ((u32) IntegerDivider)) * 16) + 0.5 */ | |
uint16_t USART_WordLength; /*!< Specifies the number of data bits transmitted or received in a frame. | |
This parameter can be a value of @ref USART_Word_Length */ | |
uint16_t USART_StopBits; /*!< Specifies the number of stop bits transmitted. | |
This parameter can be a value of @ref USART_Stop_Bits */ | |
uint16_t USART_Parity; /*!< Specifies the parity mode. | |
This parameter can be a value of @ref USART_Parity | |
@note When parity is enabled, the computed parity is inserted | |
at the MSB position of the transmitted data (9th bit when | |
the word length is set to 9 data bits; 8th bit when the | |
word length is set to 8 data bits). */ | |
uint16_t USART_Mode; /*!< Specifies wether the Receive or Transmit mode is enabled or disabled. | |
This parameter can be a value of @ref USART_Mode */ | |
uint16_t USART_HardwareFlowControl; /*!< Specifies wether the hardware flow control mode is enabled | |
or disabled. | |
This parameter can be a value of @ref USART_Hardware_Flow_Control */ | |
} USART_InitTypeDef; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment