Add base code

This commit is contained in:
2024-11-02 19:07:52 +01:00
parent 9c1b7d0321
commit 6587c8498f
10 changed files with 184 additions and 0 deletions

10
libc/library.c Normal file
View File

@@ -0,0 +1,10 @@
#include "library.h"
volatile unsigned int *const USART1_PTR = (unsigned int *)0x40011004;
void puts(const char *s) {
while(*s != '\0') { /* Loop until end of string */
*USART1_PTR= (unsigned int)(*s); /* Transmit char */
s++; /* Next char */
}
}

1
libc/library.h Normal file
View File

@@ -0,0 +1 @@
void puts(const char *s);