Add base code
This commit is contained in:
10
libc/library.c
Normal file
10
libc/library.c
Normal 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
1
libc/library.h
Normal file
@@ -0,0 +1 @@
|
||||
void puts(const char *s);
|
||||
Reference in New Issue
Block a user