From 9577cd71ebd2607fd1264bebc392187a9cce1da0 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Wed, 17 Nov 2021 12:47:55 +0000 Subject: [PATCH] stm32f0: eliminate outdated comments Fixes: https://github.com/libopencm3/libopencm3-examples/pull/229 --- examples/stm32/f0/stm32f0-discovery/usart/usart.c | 10 +++++----- .../f0/stm32f0-discovery/usart_stdio/usart_stdio.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/stm32/f0/stm32f0-discovery/usart/usart.c b/examples/stm32/f0/stm32f0-discovery/usart/usart.c index 8ea2a74..41cae02 100644 --- a/examples/stm32/f0/stm32f0-discovery/usart/usart.c +++ b/examples/stm32/f0/stm32f0-discovery/usart/usart.c @@ -28,13 +28,13 @@ static void clock_setup(void) rcc_periph_clock_enable(RCC_GPIOC); rcc_periph_clock_enable(RCC_GPIOA); - /* Enable clocks for USART2. */ + /* Enable clocks for USART. */ rcc_periph_clock_enable(RCC_USART1); } static void usart_setup(void) { - /* Setup USART2 parameters. */ + /* Setup USART parameters. */ usart_set_baudrate(USART1, 115200); usart_set_databits(USART1, 8); usart_set_parity(USART1, USART_PARITY_NONE); @@ -51,10 +51,10 @@ static void gpio_setup(void) /* Setup GPIO pin GPIO8/9 on GPIO port C for LEDs. */ gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO8 | GPIO9); - /* Setup GPIO pins for USART2 transmit. */ + /* Setup GPIO pins for USART transmit. */ gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO9); - /* Setup USART1 TX pin as alternate function. */ + /* Setup USART TX pin as alternate function. */ gpio_set_af(GPIOA, GPIO_AF1, GPIO9); } @@ -66,7 +66,7 @@ int main(void) gpio_setup(); usart_setup(); - /* Blink the LED (PD12) on the board with every transmitted byte. */ + /* Blink the LED on the board with every transmitted byte. */ while (1) { gpio_toggle(GPIOC, GPIO8); /* LED on/off */ usart_send_blocking(USART1, c + '0'); /* USART1: Send byte. */ diff --git a/examples/stm32/f0/stm32f0-discovery/usart_stdio/usart_stdio.c b/examples/stm32/f0/stm32f0-discovery/usart_stdio/usart_stdio.c index e1b2544..9a56650 100644 --- a/examples/stm32/f0/stm32f0-discovery/usart_stdio/usart_stdio.c +++ b/examples/stm32/f0/stm32f0-discovery/usart_stdio/usart_stdio.c @@ -54,7 +54,7 @@ static ssize_t _iowr(void *_cookie, const char *_buf, size_t _n) static FILE *usart_setup(uint32_t dev) { - /* Setup USART2 parameters. */ + /* Setup USART parameters. */ usart_set_baudrate(dev, 115200); usart_set_databits(dev, 8); usart_set_parity(dev, USART_PARITY_NONE); @@ -79,7 +79,7 @@ static void clock_setup(void) rcc_periph_clock_enable(RCC_GPIOC); rcc_periph_clock_enable(RCC_GPIOA); - /* Enable clocks for USART2. */ + /* Enable clocks for USART. */ rcc_periph_clock_enable(RCC_USART1); } @@ -88,10 +88,10 @@ static void gpio_setup(void) /* Setup GPIO pin GPIO8/9 on GPIO port C for LEDs. */ gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO8 | GPIO9); - /* Setup GPIO pins for USART2 transmit. */ + /* Setup GPIO pins for USART transmit. */ gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO9); - /* Setup USART1 TX pin as alternate function. */ + /* Setup USART TX pin as alternate function. */ gpio_set_af(GPIOA, GPIO_AF1, GPIO9); } @@ -104,7 +104,7 @@ int main(void) gpio_setup(); fp = usart_setup(USART1); - /* Blink the LED (PD12) on the board with every transmitted byte. */ + /* Blink the LED on the board with every transmitted byte. */ while (1) { gpio_toggle(GPIOC, GPIO8); /* LED on/off */