ugfx/demos/drawing/main.c

28 lines
528 B
C
Raw Normal View History

2012-06-13 08:14:02 +00:00
#include "ch.h"
#include "hal.h"
#include "glcd.h"
2012-06-19 21:48:19 +00:00
static GLCDDriver GLCDD1;
2012-06-13 08:14:02 +00:00
int main(void) {
halInit();
chSysInit();
2012-06-19 21:48:19 +00:00
lcdInit(&GLCDD1);
2012-06-13 08:14:02 +00:00
lcdClear(Black);
lcdDrawString(100, 100, "Hello World", White, Black);
2012-06-19 21:48:19 +00:00
lcdMoveCursor(10,10,White, Black);
chprintf((BaseSequentialStream *)&GLCDD1, "chTimeNow: %d", chTimeNow());
2012-06-13 08:14:02 +00:00
lcdDrawCircle(150, 150, 10, filled, Green);
lcdDrawLine(0, 0, lcdGetWidth(), lcdGetHeight(), Yellow);
while (TRUE) {
chThdSleepMilliseconds(200);
}
return 0;
}