Lines Matching refs:UartHandle
35 static UART_HandleTypeDef UartHandle; variable
72 UartHandle.Instance = USART2; in UartMcuConfig()
73 UartHandle.Init.BaudRate = baudrate; in UartMcuConfig()
81 UartHandle.Init.Mode = UART_MODE_TX; in UartMcuConfig()
89 UartHandle.Init.Mode = UART_MODE_RX; in UartMcuConfig()
97 UartHandle.Init.Mode = UART_MODE_TX_RX; in UartMcuConfig()
106 UartHandle.Init.WordLength = UART_WORDLENGTH_8B; in UartMcuConfig()
110 UartHandle.Init.WordLength = UART_WORDLENGTH_9B; in UartMcuConfig()
116 UartHandle.Init.StopBits = UART_STOPBITS_2; in UartMcuConfig()
120 UartHandle.Init.StopBits = UART_STOPBITS_1; in UartMcuConfig()
126 UartHandle.Init.Parity = UART_PARITY_NONE; in UartMcuConfig()
130 UartHandle.Init.Parity = UART_PARITY_EVEN; in UartMcuConfig()
134 UartHandle.Init.Parity = UART_PARITY_ODD; in UartMcuConfig()
139 UartHandle.Init.HwFlowCtl = UART_HWCONTROL_NONE; in UartMcuConfig()
143 UartHandle.Init.HwFlowCtl = UART_HWCONTROL_RTS; in UartMcuConfig()
147 UartHandle.Init.HwFlowCtl = UART_HWCONTROL_CTS; in UartMcuConfig()
151 UartHandle.Init.HwFlowCtl = UART_HWCONTROL_RTS_CTS; in UartMcuConfig()
154 UartHandle.Init.OverSampling = UART_OVERSAMPLING_16; in UartMcuConfig()
156 if( HAL_UART_Init( &UartHandle ) != HAL_OK ) in UartMcuConfig()
165 HAL_UART_Receive_IT( &UartHandle, &RxData, 1 ); in UartMcuConfig()
208 __HAL_UART_ENABLE_IT( &UartHandle, UART_IT_TC ); in UartMcuPutChar()
307 HAL_UART_Transmit_IT( &UartHandle, &TxData, 1 ); in HAL_UART_TxCpltCallback()
329 HAL_UART_Receive_IT( &UartHandle, &RxData, 1 ); in HAL_UART_RxCpltCallback()
334 HAL_UART_Receive_IT( &UartHandle, &RxData, 1 ); in HAL_UART_ErrorCallback()
342 tmpFlag = __HAL_UART_GET_FLAG( &UartHandle, UART_FLAG_TC ); in USART2_IRQHandler()
343 tmpItSource = __HAL_UART_GET_IT_SOURCE( &UartHandle, UART_IT_TC ); in USART2_IRQHandler()
347 …if( ( UartHandle.State == HAL_UART_STATE_BUSY_RX ) || UartHandle.State == HAL_UART_STATE_BUSY_TX_R… in USART2_IRQHandler()
349 UartHandle.State = HAL_UART_STATE_BUSY_TX_RX; in USART2_IRQHandler()
354 HAL_UART_IRQHandler( &UartHandle ); in USART2_IRQHandler()