Add example USART driver
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
#include "library.h"
|
||||
|
||||
volatile unsigned int *const USART1_PTR = (unsigned int *)0x40011004;
|
||||
#include "os/driver/usart.h"
|
||||
|
||||
void puts(const char *s) {
|
||||
while(*s != '\0') { /* Loop until end of string */
|
||||
*USART1_PTR= (unsigned int)(*s); /* Transmit char */
|
||||
s++; /* Next char */
|
||||
}
|
||||
usart_tx_write_string(s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user