|
MG32F10x Standard Peripherals Firmware Library
|
Functions | |
| void | UART_DeInit (UART_TypeDef *UARTx) |
| Deinitializes the UARTx peripheral registers to their default reset values. More... | |
| void | UART_Init (UART_TypeDef *UARTx, UART_InitTypeDef *UART_InitStruct) |
| Initializes the UARTx peripheral according to the specified parameters in the UART_InitStruct. More... | |
| void | UART_StructInit (UART_InitTypeDef *UART_InitStruct) |
| Fills each UART_InitStruct member with its default value. More... | |
| void | UART_WriteData (UART_TypeDef *UARTx, uint16_t Data) |
| Write data to THR register or Tx FIFO. More... | |
| uint16_t | UART_ReadData (UART_TypeDef *UARTx) |
| Read data from RBR register or Rx FIFO. More... | |
| void | UART_RxFIFOThresholdConfig (UART_TypeDef *UARTx, uint8_t Threshold) |
| Configure UARTx's Rx FIFO trigger threshold. More... | |
| void | UART_TxFIFOThresholdConfig (UART_TypeDef *UARTx, uint8_t Threshold) |
| Configure UARTx's Tx FIFO trigger threshold. More... | |
| void | UART_FIFOCmd (UART_TypeDef *UARTx, FunctionalState NewState) |
| Enables or disables the UARTx's FIFO. More... | |
| void | UART_ResetRxFIFO (UART_TypeDef *UARTx) |
| Reset the UART's Rx FIFO. More... | |
| void | UART_ResetTxFIFO (UART_TypeDef *UARTx) |
| Reset the UART's Tx FIFO. More... | |
| void | UART_ForceBreakCmd (UART_TypeDef *UARTx, FunctionalState NewState) |
| Force the serial out to spacing state or not. More... | |
| void | UART_IrDACmd (UART_TypeDef *UARTx, FunctionalState NewState) |
| Enables or disables the UARTx's IrDA SIR Mode. More... | |
| void | UART_ProgrammableTHREModeCmd (UART_TypeDef *UARTx, FunctionalState NewState) |
| Enables or disables the UARTx's Programmable THRE Interrupt Mode. More... | |
| void | UART_LineStatusClearModeConfig (UART_TypeDef *UARTx, uint8_t Mode) |
| Select the method for clearing the status in the LSR register. More... | |
| void | UART_ITConfig (UART_TypeDef *UARTx, uint8_t UART_IT, FunctionalState NewState) |
| Enables or disables the UARTx's interrupts. More... | |
| uint8_t | UART_GetIntID (UART_TypeDef *UARTx) |
| Get UARTx's Interrupt ID. More... | |
| FlagStatus | UART_GetFlagStatus (UART_TypeDef *UARTx, uint32_t UART_FLAG) |
| Checks whether the specified UART flag is set or not. More... | |
| uint32_t | UART_GetLineStatus (UART_TypeDef *UARTx) |
| Get UARTx's Line status. More... | |
| uint32_t | UART_GetModemStatus (UART_TypeDef *UARTx) |
| Get UARTx's Modem Status. More... | |
| void | UART_LoopBackModeCmd (UART_TypeDef *UARTx, FunctionalState NewState) |
| Enables or disables the UARTx's LoopBack Mode. More... | |
| void | UART_ModemForceRtsPinState (UART_TypeDef *UARTx, SignalState NewState) |
| Control RTS Pin State. More... | |
| void UART_DeInit | ( | UART_TypeDef * | UARTx | ) |
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, UART3. |
| void UART_FIFOCmd | ( | UART_TypeDef * | UARTx, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the UARTx's FIFO.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| NewState | new state of the FIFO. This parameter can be: ENABLE or DISABLE. |
| void UART_ForceBreakCmd | ( | UART_TypeDef * | UARTx, |
| FunctionalState | NewState | ||
| ) |
Force the serial out to spacing state or not.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| NewState | new state of the Break control bit. This parameter can be: ENABLE or DISABLE. |
| 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, UART3. |
| UART_FLAG | specifies the flag to check. This parameter can be one of the following values:
|
| uint8_t UART_GetIntID | ( | UART_TypeDef * | UARTx | ) |
Get UARTx's Interrupt ID.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| uint32_t UART_GetLineStatus | ( | UART_TypeDef * | UARTx | ) |
Get UARTx's Line status.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| uint32_t UART_GetModemStatus | ( | UART_TypeDef * | UARTx | ) |
Get UARTx's Modem Status.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| void UART_Init | ( | UART_TypeDef * | UARTx, |
| UART_InitTypeDef * | UART_InitStruct | ||
| ) |
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, UART3. |
| UART_InitStruct | pointer to a UART_InitTypeDef structure that contains the configuration information for the specified UART peripheral. |
| void UART_IrDACmd | ( | UART_TypeDef * | UARTx, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the UARTx's IrDA SIR Mode.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| NewState | new state of the IrDA SIR Mode. This parameter can be: ENABLE or DISABLE. |
| 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, UART3. |
| UART_IT | specifies the UART interrupt sources to be enabled or disabled. This parameter can be a combination of the following values:
|
| NewState | new state of the interrupts. This parameter can be: ENABLE or DISABLE. |
| void UART_LineStatusClearModeConfig | ( | UART_TypeDef * | UARTx, |
| uint8_t | Mode | ||
| ) |
Select the method for clearing the status in the LSR register.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| Mode | the method for clearing the status in the LSR register. This parameter can be: 0 or 1.
|
| void UART_LoopBackModeCmd | ( | UART_TypeDef * | UARTx, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the UARTx's LoopBack Mode.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| NewState | new state of the LoopBack Mode. This parameter can be: ENABLE or DISABLE. |
| void UART_ModemForceRtsPinState | ( | UART_TypeDef * | UARTx, |
| SignalState | NewState | ||
| ) |
Control RTS Pin State.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| NewState | new state of the RTS Pin State. This parameter can be: ACTIVE or INACTIVE. |
| void UART_ProgrammableTHREModeCmd | ( | UART_TypeDef * | UARTx, |
| FunctionalState | NewState | ||
| ) |
Enables or disables the UARTx's Programmable THRE Interrupt Mode.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| NewState | new state of the Programmable THRE Interrupt Mode. This parameter can be: ENABLE or DISABLE. |
| uint16_t UART_ReadData | ( | UART_TypeDef * | UARTx | ) |
Read data from RBR register or Rx FIFO.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| void UART_ResetRxFIFO | ( | UART_TypeDef * | UARTx | ) |
Reset the UART's Rx FIFO.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| void UART_ResetTxFIFO | ( | UART_TypeDef * | UARTx | ) |
Reset the UART's Tx FIFO.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| void UART_RxFIFOThresholdConfig | ( | UART_TypeDef * | UARTx, |
| uint8_t | Threshold | ||
| ) |
Configure UARTx's Rx FIFO trigger threshold.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| Threshold | This parameter can be one of the following values:
|
| void UART_StructInit | ( | UART_InitTypeDef * | UART_InitStruct | ) |
Fills each UART_InitStruct member with its default value.
| UART_InitStruct | pointer to a UART_InitTypeDef structure which will be initialized. |
| void UART_TxFIFOThresholdConfig | ( | UART_TypeDef * | UARTx, |
| uint8_t | Threshold | ||
| ) |
Configure UARTx's Tx FIFO trigger threshold.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| Threshold | This parameter can be one of the following values:
|
| void UART_WriteData | ( | UART_TypeDef * | UARTx, |
| uint16_t | Data | ||
| ) |
Write data to THR register or Tx FIFO.
| UARTx | Pointer to selected UART peripheral. This parameter can be one of the following values: UART1, UART2, UART3. |
| Data | the data to write. |