aboutsummaryrefslogtreecommitdiffstats
path: root/demos/console/main.c
blob: c629e2cd3ec54c1355f63b316baf9e87b7a667fe (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
28
29
30
#include "ch.h"
#include "hal.h"
#include "glcd.h"
#include "test.h"
#include "console.h"

static GLCDDriver GLCDD1;
static GLCDConsole CON1;

int main(void) {
	halInit();
	chSysInit();

	// init LCD and clear it
    lcdInit(&GLCDD1);
    lcdClear(Black);

	// init console
	lcdConsoleInit(&CON1, 0, 0, lcdGetWidth(), lcdGetHeight(), font_Small, Black, White);

	// use test thread for console output
	TestThread((BaseSequentialStream*)&CON1);

	while (TRUE) {

		chThdSleepMilliseconds(200);	
	}

	return 0;
}