X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fstmf0%2Fao_serial_stm.c;fp=src%2Fstmf0%2Fao_serial_stm.c;h=ef35394aab53dec6bbf9f64d816d11ab2c5b5186;hp=5097041a7e10693cb55a25598acb06490087745b;hb=bdcb3653bd9fb97f98773ac3bc1f87a6f52b1121;hpb=009d56b4f03c1ba3c9a36bdb54c772ad21844057 diff --git a/src/stmf0/ao_serial_stm.c b/src/stmf0/ao_serial_stm.c index 5097041a..ef35394a 100644 --- a/src/stmf0/ao_serial_stm.c +++ b/src/stmf0/ao_serial_stm.c @@ -375,6 +375,17 @@ ao_serial_set_sw_rts_cts(struct ao_stm_usart *usart, } #endif +void +ao_serial_shutdown(void) +{ +#if HAS_SERIAL_1 + stm_rcc.apb2enr &= ~(1 << STM_RCC_APB2ENR_USART1EN); +#endif +#if HAS_SERIAL_2 + stm_rcc.apb1enr &= ~(1 << STM_RCC_APB1ENR_USART2EN); +#endif +} + void ao_serial_init(void) {