X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=rpikern;a=blobdiff_plain;f=src%2Fmain.c;h=18ed725e308ac4b85934e04f83fa4a5286ccd98a;hp=8bab5a178f05d7d7457bee36c4e944d824f60518;hb=574147e84aafb61db3cf8b595d2a12ce5ba160de;hpb=99bdc8838f189f79ba77bfbbf41d7f1b4839ce0f diff --git a/src/main.c b/src/main.c index 8bab5a1..18ed725 100644 --- a/src/main.c +++ b/src/main.c @@ -8,7 +8,9 @@ #include "rpi.h" #include "contty.h" #include "serial.h" +#include "timer.h" #include "video.h" +#include "intr.h" void dbgled(int x); @@ -30,9 +32,13 @@ int main(void) printf("Main RAM base: %x, size: %u bytes\n", rpi_mem_base, rpi_mem_size); printf("Video RAM base: %x, size: %u bytes\n", rpi_vmem_base, rpi_vmem_size); + timer_init(); video_init(); + enable_intr(); + printf("Going interactive\n"); + for(;;) { while(ser_pending()) { int c = getchar(); @@ -99,6 +105,9 @@ static void cmdrun(char *cmd) cur_y -= 10; video_scroll(cur_x, cur_y); + } else if(strcmp(cmd, "ticks") == 0) { + printf("%lu\n", num_ticks); + } else if(strcmp(cmd, "help") == 0) { printf("help not implemented yet\n"); } else if(strcmp(cmd, "ver") == 0) {