diff options
Diffstat (limited to 'stm-init.c')
-rw-r--r-- | stm-init.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -120,6 +120,10 @@ static void MX_USART1_UART_Init(void) huart_mgmt.Init.HwFlowCtl = UART_HWCONTROL_RTS_CTS; huart_mgmt.Init.OverSampling = UART_OVERSAMPLING_16; +#ifdef HAL_DMA_MODULE_ENABLED + __HAL_LINKDMA(&huart_mgmt, hdmarx, hdma_usart_mgmt_rx); +#endif + if (HAL_UART_Init(&huart_mgmt) != HAL_OK) { /* Initialization Error */ Error_Handler(); @@ -137,6 +141,10 @@ static void MX_USART2_UART_Init(void) huart_user.Init.HwFlowCtl = UART_HWCONTROL_RTS_CTS; huart_user.Init.OverSampling = UART_OVERSAMPLING_16; +#ifdef HAL_DMA_MODULE_ENABLED + __HAL_LINKDMA(&huart_user, hdmarx, hdma_usart_user_rx); +#endif + if (HAL_UART_Init(&huart_user) != HAL_OK) { /* Initialization Error */ Error_Handler(); |