aboutsummaryrefslogtreecommitdiffstats
path: root/demos/drawing/main.c
blob: c22668984519effb27c90f3eebb3c001fe096c45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "ch.h"
#include "hal.h"
#include "glcd.h"

static GLCDDriver GLCDD1;

int main(void) {
	halInit();
	chSysInit();
	
	lcdInit(&GLCDD1);
	lcdClear(Black);
	lcdDrawString(100, 100, "Hello World", White, Black);

	lcdMoveCursor(10,10,White, Black);
	chprintf((BaseSequentialStream *)&GLCDD1, "chTimeNow: %d", chTimeNow());

	lcdDrawCircle(150, 150, 10, filled, Green);
	lcdDrawLine(0, 0, lcdGetWidth(), lcdGetHeight(), Yellow);

	while (TRUE) {
		
		chThdSleepMilliseconds(200);	
	}

	return 0;
}