From 91788897b152b17fe4e53a9adc2c6359f29858f9 Mon Sep 17 00:00:00 2001 From: hugogogo Date: Fri, 7 Mar 2025 17:58:11 +0100 Subject: [PATCH] backspace works --- module02/ex00/main.c | 3 ++- module02/ex01/main.c | 40 ++++++++++++++++++++-------------------- module02/ex04/main.c | 8 +++++++- 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/module02/ex00/main.c b/module02/ex00/main.c index b456e75..8cddfff 100644 --- a/module02/ex00/main.c +++ b/module02/ex00/main.c @@ -104,7 +104,8 @@ void uart_tx(char c) { UDR0 = (unsigned char) c; // 20.11.1 : Put data into buffer, UDRn – USART I/O Data Register (read and write) } -// screen /dev/ttyUSB0 115200 +// write Z on serial port, at a !Hz frequency +// `screen /dev/ttyUSB0 115200` int main() { uart_init(); while (1) { diff --git a/module02/ex01/main.c b/module02/ex01/main.c index eb5f809..9f9244f 100644 --- a/module02/ex01/main.c +++ b/module02/ex01/main.c @@ -62,29 +62,29 @@ // USART // Table 20-1 : Baud Rate Calculation -#define USART_BAUDRATE 115200 -#define BAUD_PRESCALER (DIV_ROUND_CLOSEST(F_CPU, (16 * USART_BAUDRATE)) - 1) +#define USART_BAUDRATE 115200 +#define BAUD_PRESCALER (DIV_ROUND_CLOSEST(F_CPU, (16 * USART_BAUDRATE)) - 1) // Table 20-8 : Mode Selection (USART Mode SELect) -#define ASYNCHRONOUS (0<