summaryrefslogtreecommitdiff
path: root/project/Core/Src/Activties/activity5.c
blob: f214ca2453ce958bf663da15fa5054cf3d9ae23f (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 activity5_run() {
	for(;;) {
		read_and_print_char();
	}
}