crashtest-r0ket/simulat0r/tui/simulat0r.c

32 lines
692 B
C
Raw Normal View History

2011-07-19 08:09:03 +00:00
#include "simulator.h"
#include "../firmware/basic/basic.h"
#include "../firmware/basic/config.h"
2011-07-19 08:09:03 +00:00
#include "../firmware/lcd/display.h"
#include <unistd.h>
void simlcdDisplayUpdate() {
write(1,"\033[H",3);
const char* symbolOff=GLOBAL(lcdinvert)?"_":"@";
const char* symbolOn=GLOBAL(lcdinvert)?"#":".";
2011-07-19 08:09:03 +00:00
for(int y=0; y<RESY; ++y) {
for(int x=0; x<RESX; ++x) {
write(1,(lcdGetPixel((GLOBAL(lcdmirror) /* LCD_MIRRORX */ )?(RESX-x-1):x,(0 /* & LCD_MIRRORY */)?(RESY-y-1):y)?symbolOn:symbolOff),1);
2011-07-19 08:09:03 +00:00
}
write(1,("\n"),1);
}
}
int simButtonPressed(int button) {
return 1; // TODO
}
void simSetLEDHook(int led) {
// TODO
}
int main(void) {
simulator_main();
}