Skip to content

Commit 9577cd7

Browse files
committed
stm32f0: eliminate outdated comments
Fixes: #229
1 parent 3a89116 commit 9577cd7

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

examples/stm32/f0/stm32f0-discovery/usart/usart.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ static void clock_setup(void)
2828
rcc_periph_clock_enable(RCC_GPIOC);
2929
rcc_periph_clock_enable(RCC_GPIOA);
3030

31-
/* Enable clocks for USART2. */
31+
/* Enable clocks for USART. */
3232
rcc_periph_clock_enable(RCC_USART1);
3333
}
3434

3535
static void usart_setup(void)
3636
{
37-
/* Setup USART2 parameters. */
37+
/* Setup USART parameters. */
3838
usart_set_baudrate(USART1, 115200);
3939
usart_set_databits(USART1, 8);
4040
usart_set_parity(USART1, USART_PARITY_NONE);
@@ -51,10 +51,10 @@ static void gpio_setup(void)
5151
/* Setup GPIO pin GPIO8/9 on GPIO port C for LEDs. */
5252
gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO8 | GPIO9);
5353

54-
/* Setup GPIO pins for USART2 transmit. */
54+
/* Setup GPIO pins for USART transmit. */
5555
gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO9);
5656

57-
/* Setup USART1 TX pin as alternate function. */
57+
/* Setup USART TX pin as alternate function. */
5858
gpio_set_af(GPIOA, GPIO_AF1, GPIO9);
5959
}
6060

@@ -66,7 +66,7 @@ int main(void)
6666
gpio_setup();
6767
usart_setup();
6868

69-
/* Blink the LED (PD12) on the board with every transmitted byte. */
69+
/* Blink the LED on the board with every transmitted byte. */
7070
while (1) {
7171
gpio_toggle(GPIOC, GPIO8); /* LED on/off */
7272
usart_send_blocking(USART1, c + '0'); /* USART1: Send byte. */

examples/stm32/f0/stm32f0-discovery/usart_stdio/usart_stdio.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static ssize_t _iowr(void *_cookie, const char *_buf, size_t _n)
5454

5555
static FILE *usart_setup(uint32_t dev)
5656
{
57-
/* Setup USART2 parameters. */
57+
/* Setup USART parameters. */
5858
usart_set_baudrate(dev, 115200);
5959
usart_set_databits(dev, 8);
6060
usart_set_parity(dev, USART_PARITY_NONE);
@@ -79,7 +79,7 @@ static void clock_setup(void)
7979
rcc_periph_clock_enable(RCC_GPIOC);
8080
rcc_periph_clock_enable(RCC_GPIOA);
8181

82-
/* Enable clocks for USART2. */
82+
/* Enable clocks for USART. */
8383
rcc_periph_clock_enable(RCC_USART1);
8484
}
8585

@@ -88,10 +88,10 @@ static void gpio_setup(void)
8888
/* Setup GPIO pin GPIO8/9 on GPIO port C for LEDs. */
8989
gpio_mode_setup(GPIOC, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO8 | GPIO9);
9090

91-
/* Setup GPIO pins for USART2 transmit. */
91+
/* Setup GPIO pins for USART transmit. */
9292
gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO9);
9393

94-
/* Setup USART1 TX pin as alternate function. */
94+
/* Setup USART TX pin as alternate function. */
9595
gpio_set_af(GPIOA, GPIO_AF1, GPIO9);
9696
}
9797

@@ -104,7 +104,7 @@ int main(void)
104104
gpio_setup();
105105
fp = usart_setup(USART1);
106106

107-
/* Blink the LED (PD12) on the board with every transmitted byte. */
107+
/* Blink the LED on the board with every transmitted byte. */
108108
while (1) {
109109
gpio_toggle(GPIOC, GPIO8); /* LED on/off */
110110

0 commit comments

Comments
 (0)