From 884572edddfd6755741cf434beee10c3b53416fc Mon Sep 17 00:00:00 2001 From: Sergiusz Bazanski <q3k@q3k.org> Date: Sun, 28 Jul 2019 21:48:47 +0200 Subject: [PATCH] wip --- epicardium/epicardium.h | 5 ----- l0dables/cube/main.c | 13 +++++++++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/epicardium/epicardium.h b/epicardium/epicardium.h index cf30e697..ed19fd76 100644 --- a/epicardium/epicardium.h +++ b/epicardium/epicardium.h @@ -320,11 +320,6 @@ API(API_DISP_CLOSE, int epic_disp_close()); * to be shown on the display */ API(API_DISP_UPDATE, int epic_disp_update()); -/** - * Returns the back framebuffer (the display buffer that's currently inactive - * that will be shown after the next call to ``epic_disp_update``. - */ -API(API_DISP_FRAMEBUFFER, uint16_t *epic_disp_framebuffer()); /** * Prints a string into the display framebuffer diff --git a/l0dables/cube/main.c b/l0dables/cube/main.c index 630acbcb..7f4f9796 100644 --- a/l0dables/cube/main.c +++ b/l0dables/cube/main.c @@ -16,8 +16,17 @@ int main(void) { float theta = 0.0f; int i = 0; for (;;) { - FB_Draw(framebuffer, theta); - epic_disp_update_fb(framebuffer); + struct disp_framebuffer *fb = epic_disp_framebuffer(); + //FB_Draw((uint16_t*)fb->fb, theta); + uint16_t red = 0b0000011111100000; + for (int y = 0; y < DISP_HEIGHT; y++) { + for (int x = 0; x < DISP_WIDTH; x++) { + fb->fb[y][x][0] = red >> 8; + fb->fb[y][x][1] = red & 0xFF; + } + } + + epic_disp_update(); theta += 0.1f; } -- GitLab