summaryrefslogtreecommitdiff
path: root/examples/raw_mode.c
blob: de97e7812e9a6b13813e5e404409d5b2dd890b03 (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;
}