aboutsummaryrefslogtreecommitdiff
path: root/stm-init.c
diff options
context:
space:
mode:
Diffstat (limited to 'stm-init.c')
-rw-r--r--stm-init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/stm-init.c b/stm-init.c
index 4fd9dd4..d2d8d65 100644
--- a/stm-init.c
+++ b/stm-init.c
@@ -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();