UART driver modules
更多...
|
| void | UART_DeInit (UART_TypeDef *UARTx) |
| | Deinitializes the UARTx peripheral registers to their default reset values. 更多...
|
| |
| void | UART_Init (UART_TypeDef *UARTx, UART_InitTypeDef *UART_InitStruct) |
| | Initializes the UARTx peripheral according to the specified parameters in the UART_InitStruct. 更多...
|
| |
| void | UART_StructInit (UART_InitTypeDef *UART_InitStruct) |
| | Fills each UART_InitStruct member with its default value. 更多...
|
| |
| void | UART_Cmd (UART_TypeDef *UARTx, FunctionalState NewState) |
| | Enables or disables the specified UART peripheral. 更多...
|
| |
| void | UART_WriteData (UART_TypeDef *UARTx, uint8_t Data) |
| | Write data to SBUF register. 更多...
|
| |
| uint8_t | UART_ReadData (UART_TypeDef *UARTx) |
| | Read data from SBUF register. 更多...
|
| |
| void | UART_MultideviceCmd (UART_TypeDef *UARTx, FunctionalState NewState) |
| | Enables or disables the UARTx's Multidevice function. 更多...
|
| |
| void | UART_SetAddress (UART_TypeDef *UARTx, uint8_t UART_Address) |
| | Sets the address of the UART node. 更多...
|
| |
| void | UART_SetAddressMask (UART_TypeDef *UARTx, uint8_t UART_AddressMask) |
| | Sets the address mask of the UART node. 更多...
|
| |
| void | UART_IrDACmd (UART_TypeDef *UARTx, FunctionalState NewState) |
| | Enables or disables the UARTx's IrDA Mode. 更多...
|
| |
| void | UART_ITConfig (UART_TypeDef *UARTx, uint8_t UART_IT, FunctionalState NewState) |
| | Enables or disables the UARTx's interrupts. 更多...
|
| |
| FlagStatus | UART_GetFlagStatus (UART_TypeDef *UARTx, uint32_t UART_FLAG) |
| | Checks whether the specified UART flag is set or not. 更多...
|
| |
| void | UART_ClearFlag (UART_TypeDef *UARTx, uint32_t UART_FLAG) |
| | Clear the specified UART flag. 更多...
|
| |
UART driver modules
◆ UART_ClearFlag()
| void UART_ClearFlag |
( |
UART_TypeDef * |
UARTx, |
|
|
uint32_t |
UART_FLAG |
|
) |
| |
Clear the specified UART flag.
- 参数
-
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
| UART_FLAG | specifies the flag to clear. This parameter can be one of the following values:
- UART_FLAG_FE: Busy flag.
- UART_FLAG_TI: Transmit FIFO Not Full flag.
- UART_FLAG_RI: Transmit FIFO Empty flag.
|
- 返回值
-
| The | new state of UART_FLAG (SET or RESET). |
◆ UART_Cmd()
| void UART_Cmd |
( |
UART_TypeDef * |
UARTx, |
|
|
FunctionalState |
NewState |
|
) |
| |
Enables or disables the specified UART peripheral.
- 参数
-
| UARTx | Select the UART peripheral. This parameter can be one of the following values: UART1, UART2. |
| NewState | new state of the UARTx peripheral. This parameter can be: ENABLE or DISABLE. |
- 返回值
-
◆ UART_DeInit()
Deinitializes the UARTx peripheral registers to their default reset values.
- 参数
-
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
- 返回值
-
◆ UART_GetFlagStatus()
| FlagStatus UART_GetFlagStatus |
( |
UART_TypeDef * |
UARTx, |
|
|
uint32_t |
UART_FLAG |
|
) |
| |
Checks whether the specified UART flag is set or not.
- 参数
-
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
| UART_FLAG | specifies the flag to check. This parameter can be one of the following values:
- UART_FLAG_FE: Busy flag.
- UART_FLAG_TI: Transmit FIFO Not Full flag.
- UART_FLAG_RI: Transmit FIFO Empty flag.
|
- 返回值
-
| The | new state of UART_FLAG (SET or RESET). |
◆ UART_Init()
Initializes the UARTx peripheral according to the specified parameters in the UART_InitStruct.
- 参数
-
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
| UART_InitStruct | pointer to a UART_InitTypeDef structure that contains the configuration information for the specified UART peripheral. |
- 返回值
-
◆ UART_IrDACmd()
| void UART_IrDACmd |
( |
UART_TypeDef * |
UARTx, |
|
|
FunctionalState |
NewState |
|
) |
| |
Enables or disables the UARTx's IrDA Mode.
- 参数
-
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
| NewState | new state of the IrDA Mode. This parameter can be: ENABLE or DISABLE. |
- 返回值
-
◆ UART_ITConfig()
| void UART_ITConfig |
( |
UART_TypeDef * |
UARTx, |
|
|
uint8_t |
UART_IT, |
|
|
FunctionalState |
NewState |
|
) |
| |
Enables or disables the UARTx's interrupts.
- 参数
-
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
| UART_IT | specifies the UART interrupt sources to be enabled or disabled. This parameter can be a combination of the following values:
- UART_IT_FEFN
- UART_IT_TIEN
- UART_IT_RIEN
|
| NewState | new state of the interrupts. This parameter can be: ENABLE or DISABLE. |
- 返回值
-
◆ UART_MultideviceCmd()
| void UART_MultideviceCmd |
( |
UART_TypeDef * |
UARTx, |
|
|
FunctionalState |
NewState |
|
) |
| |
Enables or disables the UARTx's Multidevice function.
- 参数
-
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
| NewState | new state of the UART Multidevice function. This parameter can be: ENABLE or DISABLE. |
- 返回值
-
◆ UART_ReadData()
Read data from SBUF register.
- 参数
-
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
- 返回值
-
◆ UART_SetAddress()
| void UART_SetAddress |
( |
UART_TypeDef * |
UARTx, |
|
|
uint8_t |
UART_Address |
|
) |
| |
Sets the address of the UART node.
- 参数
-
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
| UART_Address | Indicates the address of the UART node. |
- 返回值
-
◆ UART_SetAddressMask()
| void UART_SetAddressMask |
( |
UART_TypeDef * |
UARTx, |
|
|
uint8_t |
UART_AddressMask |
|
) |
| |
Sets the address mask of the UART node.
- 参数
-
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
| UART_AddressMask | Indicates the address mask of the UART node. |
- 返回值
-
◆ UART_StructInit()
Fills each UART_InitStruct member with its default value.
- 参数
-
| UART_InitStruct | pointer to a UART_InitTypeDef structure which will be initialized. |
- 返回值
-
◆ UART_WriteData()
Write data to SBUF register.
- 参数
-
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2. |
| Data | the data to write. |
- 返回值
-