Feat: lab 4

This commit is contained in:
2025-03-21 03:39:25 +08:00
parent ed2ced5caf
commit 45ebb20cf2
35 changed files with 833 additions and 174 deletions

View File

@@ -2,24 +2,11 @@
#include <stddef.h>
#define DEBUG(x) { \
uart_puts(#x " = "); \
uart_hex((unsigned int)(unsigned long)x); \
uart_puts(ENDL); \
}
#define DEBUG_s(x) { \
uart_puts(#x " = "); \
uart_puts(x); \
uart_puts(ENDL); \
}
void uart_init();
void uart_send(unsigned int c);
uint8_t uart_getb();
char uart_getc();
void uart_puts(const char *s);
void uart_hex(unsigned int d);
void uart_int(int d);
void uart_hex(uint64_t d);
extern int is_uart_init;