summaryrefslogtreecommitdiff
path: root/project/Core/Src/Activties/activity5.c
blob: 9201f70894f40efb39e19535dec771c31b2cc6b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * activity5.c
 *
 *  Created on: Sep 23, 2025
 *      Author: sowgro
 */


#include <UART.h>
#include "printf.h"

void read_and_print_char() {
	uint8_t ch = USART_Read(USART2);
	printf("%c", ch);
	if (ch == '\r') {
		printf("\n");
	}
}

void run2() {
	for(;;) {
		read_and_print_char();
	}
}