summaryrefslogtreecommitdiff
path: root/example/raw_mode.c
blob: 449a824272f569ea34baacf16bf97398b9c54885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#define FBGL_IMPLEMENTATION
#include "../fbgl.h"
#include <stdio.h>

int main(int argc, char *argv[])
{
	fbgl_t fb;
	fbgl_init("/dev/fb0", &fb);

	fbgl_set_bg(&fb, 0xFFFFFF);

	while (1) {
		if (fbgl_check_esc_key()) {
			printf("pressed");
			fbgl_set_bg(&fb, 0x000000);
		}
	}

	return 0;
}