summaryrefslogtreecommitdiff
path: root/example/raw_mode.c
diff options
context:
space:
mode:
authordario-loi <loi.1940849@studenti.uniroma1.it>2024-11-24 20:21:45 +0100
committerdario-loi <loi.1940849@studenti.uniroma1.it>2024-11-24 20:21:45 +0100
commita3bfd065071e2dd4e772fae9da7908ce523148c6 (patch)
tree68b062d79a1b5e59c2bcba2ca8df1cef9852f656 /example/raw_mode.c
parent274cacc5fadb3c3a220b833f027eee47cbda824c (diff)
parentcd0a47245a54c249eca7ef1c0d86bc4aa3489e9b (diff)
Merge branch 'master' into bugfixes
Diffstat (limited to 'example/raw_mode.c')
-rw-r--r--example/raw_mode.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/example/raw_mode.c b/example/raw_mode.c
new file mode 100644
index 0000000..449a824
--- /dev/null
+++ b/example/raw_mode.c
@@ -0,0 +1,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;
+}