aboutsummaryrefslogtreecommitdiff
path: root/stm32f091/setup.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-10-27 15:37:35 +0200
committerlonkaars <loek@pipeframe.xyz>2022-10-27 15:37:35 +0200
commit94e31069df88c3d5e50b4160705c2b7aa27e152b (patch)
treefac20382f2055fc47fdee182b0b12d3dc564a888 /stm32f091/setup.c
parent4dbb57fe63d3c59893d1a670fecdde7ea20c9a4a (diff)
WIP server parser
Diffstat (limited to 'stm32f091/setup.c')
-rw-r--r--stm32f091/setup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/stm32f091/setup.c b/stm32f091/setup.c
index 2110e03..9ed4174 100644
--- a/stm32f091/setup.c
+++ b/stm32f091/setup.c
@@ -133,12 +133,15 @@ static void ws_io_usart1_setup() {
HAL_UART_Receive_DMA(&huart1, g_ws_esp8266_dma_rx_buffer, WS_DMA_RX_BUFFER_SIZE);
__HAL_DMA_DISABLE_IT(&hdma_usart1_rx, DMA_IT_HT);
+
+ __HAL_UART_ENABLE_IT(&huart1, UART_IT_RXNE); // enable receive intterupts
+ __HAL_UART_ENABLE_IT(&huart1, UART_IT_IDLE); // enable idle line detection
}
static void ws_io_usart2_setup() {
if (HAL_UART_Init(&huart2) != HAL_OK)
return ws_setup_error_handler();
-}
+}
static void ws_io_dma_setup() {
__HAL_RCC_DMA1_CLK_ENABLE();