Fix keyboard test

This commit is contained in:
Niccolò Izzo 2020-12-07 19:56:17 +01:00
parent d7d363168a
commit 7971356d6d
1 changed files with 4 additions and 3 deletions

View File

@ -54,6 +54,8 @@ void *print_keys(keyboard_t keys) {
keys &= ~(1 << pos); keys &= ~(1 << pos);
i--; i--;
} }
gfx_render();
while (gfx_renderingInProgress());
} }
int main(void) { int main(void) {
@ -83,9 +85,8 @@ int main(void) {
gfx_clearScreen(); gfx_clearScreen();
gfx_print(title_origin, title_buf, FONT_SIZE_8PT, TEXT_ALIGN_CENTER, color_red); gfx_print(title_origin, title_buf, FONT_SIZE_8PT, TEXT_ALIGN_CENTER, color_red);
keyboard_t keys = kbd_getKeys(); keyboard_t keys = kbd_getKeys();
print_keys(keys); if (keys != 0)
gfx_render(); print_keys(keys);
while (gfx_renderingInProgress());
OSTimeDlyHMSM(0u, 0u, 0u, 100u, OS_OPT_TIME_HMSM_STRICT, &os_err); OSTimeDlyHMSM(0u, 0u, 0u, 100u, OS_OPT_TIME_HMSM_STRICT, &os_err);
} }
} }