File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,16 @@ void uart_poweron(uart_t uart)
334
334
if (isr_ctx [uart ].rx_cb ) {
335
335
pm_block (STM32_PM_STOP );
336
336
}
337
+ #endif
338
+ #ifdef MODULE_STM32_PERIPH_UART_HW_FC
339
+ if (uart_config [uart ].cts_pin != GPIO_UNDEF ) {
340
+ gpio_init (uart_config [uart ].rts_pin , GPIO_OUT );
341
+ #ifdef CPU_FAM_STM32F1
342
+ gpio_init_af (uart_config [uart ].rts_pin , GPIO_AF_OUT_PP );
343
+ #else
344
+ gpio_init_af (uart_config [uart ].rts_pin , uart_config [uart ].rts_af );
345
+ #endif
346
+ }
337
347
#endif
338
348
periph_clk_en (uart_config [uart ].bus , uart_config [uart ].rcc_mask );
339
349
}
@@ -343,6 +353,12 @@ void uart_poweroff(uart_t uart)
343
353
assert (uart < UART_NUMOF );
344
354
345
355
periph_clk_dis (uart_config [uart ].bus , uart_config [uart ].rcc_mask );
356
+ #ifdef MODULE_STM32_PERIPH_UART_HW_FC
357
+ if (uart_config [uart ].cts_pin != GPIO_UNDEF ) {
358
+ gpio_init (uart_config [uart ].rts_pin , GPIO_OUT );
359
+ gpio_set (uart_config [uart ].rts_pin );
360
+ }
361
+ #endif
346
362
#ifdef STM32_PM_STOP
347
363
if (isr_ctx [uart ].rx_cb ) {
348
364
pm_unblock (STM32_PM_STOP );
You can’t perform that action at this time.
0 commit comments