diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-05-09 14:58:59 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-05-09 14:58:59 +0200 |
commit | be84308e01ecc9e8de2997ab030420b401e06596 (patch) | |
tree | 1efcc385a197800e2b26497e16bf0e59d9e5265f /robot/main.c | |
parent | c30c9250c18513899cee2ddc35071d98d36a7470 (diff) |
added boilerplate source and header files
Diffstat (limited to 'robot/main.c')
-rw-r--r-- | robot/main.c | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/robot/main.c b/robot/main.c index 21d0e5c..fbfd38b 100644 --- a/robot/main.c +++ b/robot/main.c @@ -1,34 +1,12 @@ -#include <pololu/orangutan.h> -#include <stdlib.h> +#include "main.h" +#include "hypervisor.h" +#include "setup.h" int main() { - play("L50 c>c"); - serial_set_baud_rate(9600); + w2_setup_main(); - char *buf = malloc(20); - unsigned int counter = 0; - - while (1) { - serial_receive_blocking(buf, 1, 65e3); - - switch (buf[0]) { - case 0x7f: { - counter--; - lcd_goto_xy(counter, 0); - print(" "); - lcd_goto_xy(counter, 0); - break; - } - default: { - print(&buf[0]); - counter++; - if (counter > 20) { - counter = 0; - lcd_goto_xy(0, 0); - } - } - } - } + for (;;) w2_hypervisor_main(); + // satisfy compiler return 0; } |