From be84308e01ecc9e8de2997ab030420b401e06596 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Mon, 9 May 2022 14:58:59 +0200 Subject: added boilerplate source and header files --- robot/main.c | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) (limited to 'robot/main.c') 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 -#include +#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; } -- cgit v1.2.3