From 7dd8b67378f74c1834ec0da7b3572298d1450869 Mon Sep 17 00:00:00 2001 From: "Sebastian H. Gabrielli" Date: Wed, 6 Mar 2024 15:55:56 +0100 Subject: [PATCH] Add comments --- prosjekt.X/uart.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/prosjekt.X/uart.h b/prosjekt.X/uart.h index 6259eee..7284552 100644 --- a/prosjekt.X/uart.h +++ b/prosjekt.X/uart.h @@ -20,9 +20,14 @@ extern "C" { #endif #define USART3_BAUD_RATE(BAUD_RATE) ((float)(F_CPU * 64 / (16 * (float)BAUD_RATE)) + 0.5) - + +// Initialize the USART3 controller void init_uart(uint16_t baud); + +// Send a single character over UART void USART3_sendChar(char c); + +// Send a string of characters over UART int USART3_printChar(char c, FILE *stream); static FILE USART_stream = FDEV_SETUP_STREAM(USART3_printChar, NULL, _FDEV_SETUP_WRITE);