summaryrefslogtreecommitdiff
path: root/project/Core/Src/Homework/hw6.c
blob: a925d54b7f68cdde83e465e19e908e5490350877 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * hw6.c
 *
 *  Created on: Oct 30, 2025
 *      Author: sowgro
 */

#include "stm32l476xx.h"
#include "stdio.h"
#include "UART.h"

void hw6_run() {

	UART2_Init();
	USART2->CR1 |= USART_CR1_RXNEIE;   // Enable RX interrupt
	NVIC_EnableIRQ(USART2_IRQn);
}

//void USART2_IRQHandler() {
//	int ch = USART_Read(USART2);
//	putchar(ch);
//}