From: Martin Mares Date: Sun, 6 Feb 2022 16:01:32 +0000 (+0100) Subject: usart1 example: fix RXD direction X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=eba654c1e688ec99fbaa2ee652b48173af0070be;p=home-hw.git usart1 example: fix RXD direction --- diff --git a/protab/usart1/usart.c b/protab/usart1/usart.c index cca6770..cbf82f0 100644 --- a/protab/usart1/usart.c +++ b/protab/usart1/usart.c @@ -13,7 +13,7 @@ int main(void) gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO13); // PA10 = RX1, PA9 = TX1 - gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO10); + gpio_set_mode(GPIOA, GPIO_MODE_INPUT, GPIO_CNF_INPUT_FLOAT, GPIO10); gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO9); usart_set_baudrate(USART1, 115200);