Prusa MINI Firmware overview
UART Exported Types
Collaboration diagram for UART Exported Types:

Classes

struct  UART_InitTypeDef
 UART Init Structure definition. More...
 
struct  UART_HandleTypeDef
 UART handle Structure definition. More...
 

Enumerations

enum  HAL_UART_StateTypeDef {
  HAL_UART_STATE_RESET = 0x00U, HAL_UART_STATE_READY = 0x20U, HAL_UART_STATE_BUSY = 0x24U, HAL_UART_STATE_BUSY_TX = 0x21U,
  HAL_UART_STATE_BUSY_RX = 0x22U, HAL_UART_STATE_BUSY_TX_RX = 0x23U, HAL_UART_STATE_TIMEOUT = 0xA0U, HAL_UART_STATE_ERROR = 0xE0U
}
 HAL UART State structures definition. More...
 

Detailed Description

Enumeration Type Documentation

◆ HAL_UART_StateTypeDef

HAL UART State structures definition.

Note
HAL UART State value is a combination of 2 different substates: gState and RxState.
  • gState contains UART state information related to global Handle management and also information related to Tx operations. gState value coding follow below described bitmap : b7-b6 Error information 00 : No Error 01 : (Not Used) 10 : Timeout 11 : Error b5 IP initilisation status 0 : Reset (IP not initialized) 1 : Init done (IP not initialized. HAL UART Init function already called) b4-b3 (not used) xx : Should be set to 00 b2 Intrinsic process state 0 : Ready 1 : Busy (IP busy with some configuration or internal operations) b1 (not used) x : Should be set to 0 b0 Tx state 0 : Ready (no Tx operation ongoing) 1 : Busy (Tx operation ongoing)
  • RxState contains information related to Rx operations. RxState value coding follow below described bitmap : b7-b6 (not used) xx : Should be set to 00 b5 IP initilisation status 0 : Reset (IP not initialized) 1 : Init done (IP not initialized) b4-b2 (not used) xxx : Should be set to 000 b1 Rx state 0 : Ready (no Rx operation ongoing) 1 : Busy (Rx operation ongoing) b0 (not used) x : Should be set to 0.
Enumerator
HAL_UART_STATE_RESET 

Peripheral is not yet Initialized Value is allowed for gState and RxState

HAL_UART_STATE_READY 

Peripheral Initialized and ready for use Value is allowed for gState and RxState

HAL_UART_STATE_BUSY 

an internal process is ongoing Value is allowed for gState only

HAL_UART_STATE_BUSY_TX 

Data Transmission process is ongoing Value is allowed for gState only

HAL_UART_STATE_BUSY_RX 

Data Reception process is ongoing Value is allowed for RxState only

HAL_UART_STATE_BUSY_TX_RX 

Data Transmission and Reception process is ongoing Not to be used for neither gState nor RxState. Value is result of combination (Or) between gState and RxState values

HAL_UART_STATE_TIMEOUT 

Timeout state Value is allowed for gState only

HAL_UART_STATE_ERROR 

Error Value is allowed for gState only

135 {
136  HAL_UART_STATE_RESET = 0x00U, /*!< Peripheral is not yet Initialized
137  Value is allowed for gState and RxState */
138  HAL_UART_STATE_READY = 0x20U, /*!< Peripheral Initialized and ready for use
139  Value is allowed for gState and RxState */
140  HAL_UART_STATE_BUSY = 0x24U, /*!< an internal process is ongoing
141  Value is allowed for gState only */
142  HAL_UART_STATE_BUSY_TX = 0x21U, /*!< Data Transmission process is ongoing
143  Value is allowed for gState only */
144  HAL_UART_STATE_BUSY_RX = 0x22U, /*!< Data Reception process is ongoing
145  Value is allowed for RxState only */
146  HAL_UART_STATE_BUSY_TX_RX = 0x23U, /*!< Data Transmission and Reception process is ongoing
147  Not to be used for neither gState nor RxState.
148  Value is result of combination (Or) between gState and RxState values */
149  HAL_UART_STATE_TIMEOUT = 0xA0U, /*!< Timeout state
150  Value is allowed for gState only */
151  HAL_UART_STATE_ERROR = 0xE0U /*!< Error
152  Value is allowed for gState only */
HAL_UART_STATE_ERROR
Definition: stm32f4xx_hal_uart.h:151
HAL_UART_STATE_TIMEOUT
Definition: stm32f4xx_hal_uart.h:149
HAL_UART_STATE_RESET
Definition: stm32f4xx_hal_uart.h:136
HAL_UART_STATE_BUSY_RX
Definition: stm32f4xx_hal_uart.h:144
HAL_UART_StateTypeDef
HAL_UART_StateTypeDef
HAL UART State structures definition.
Definition: stm32f4xx_hal_uart.h:134
HAL_UART_STATE_BUSY_TX
Definition: stm32f4xx_hal_uart.h:142
HAL_UART_STATE_BUSY
Definition: stm32f4xx_hal_uart.h:140
HAL_UART_STATE_BUSY_TX_RX
Definition: stm32f4xx_hal_uart.h:146
HAL_UART_STATE_READY
Definition: stm32f4xx_hal_uart.h:138