Quadrotor from scratch
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

18 lines
516 B

#define U0THR (*((volatile unsigned char *) 0xE000C000)) /* UART0 transmitter holding register */
#define U0LSR (*((volatile unsigned char *) 0xE000C014)) /* UART0 line status register */
#define U0THRE ((U0LSR & (1<<5))) /* UART0 transmitter holding register is empty */
void putch(char c) {
while (!U0THRE);
U0THR = c;
}
void putstr(char *s) {
while (*s) putch(*s++);
}
int main(void) {
putstr("Your entire life has been a mathematical error... a mathematical error I'm about to correct!\n");
return 0;
}