From d78b2308f0b7197f87f5330c3fc62b0d676fab1d Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Wed, 16 Jul 2025 19:33:35 +0200 Subject: [PATCH] Cleaning --- system.c | 3 ++- uart.c | 11 +++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/system.c b/system.c index 8d1e06a..6a8dfd1 100644 --- a/system.c +++ b/system.c @@ -5,7 +5,8 @@ volatile uint64_t ticks; __attribute__((interrupt)) void sys_tick_handler(void); -void sys_tick_handler(void) { ticks++; } + +void sys_tick_handler(void) { ticks++; } uint64_t sys_ticks_get(void) { return ticks; } diff --git a/uart.c b/uart.c index f0b4bc8..79dcb15 100644 --- a/uart.c +++ b/uart.c @@ -6,9 +6,13 @@ #include int _write(int file, char *ptr, int len); +int _close(int file); +int _fstat(int file, struct stat *st); +int _isatty(int file); +int _lseek(int file, int ptr, int dir); +int _read(int file, char *ptr, int len); void usart_setup(void) { - /* Setup GPIO pin GPIO_USART1_RE_TX on GPIO port B for transmit. */ gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ, GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART1_TX); usart_set_baudrate(USART1, 115200); @@ -35,26 +39,22 @@ int _write(int file, char *ptr, int len) { return -1; } -int _close(int file); int _close(int file) { (void)file; return -1; } -int _fstat(int file, struct stat *st); int _fstat(int file, struct stat *st) { (void)file; st->st_mode = S_IFCHR; return 0; } -int _isatty(int file); int _isatty(int file) { (void)file; return 1; } -int _lseek(int file, int ptr, int dir); int _lseek(int file, int ptr, int dir) { (void)file; (void)ptr; @@ -63,7 +63,6 @@ int _lseek(int file, int ptr, int dir) { } // Optional — stubbed read (e.g. for scanf), returns 0 bytes -int _read(int file, char *ptr, int len); int _read(int file, char *ptr, int len) { (void)file; (void)ptr;