diff --git a/src/fbinit.c b/src/fbinit.c index c77706d..a25dfd0 100644 --- a/src/fbinit.c +++ b/src/fbinit.c @@ -84,6 +84,9 @@ HRESULT Fb_setup(void) return hr; } + /* display the splash screen */ + memcpy(Fb_ptr, _binary_splash_bin_start, (size_t)(&_binary_splash_bin_size)); + /* additional setup here */ return hr; @@ -100,3 +103,8 @@ void Fb_cleanup(void) close(fb_fd); fb_fd = -1; } + +void Fb_clear(void) +{ + memset(Fb_Ptr, 0, local_info.screenbytes); +} diff --git a/src/fbinit.h b/src/fbinit.h index 2b5d256..11f4d8b 100644 --- a/src/fbinit.h +++ b/src/fbinit.h @@ -28,5 +28,6 @@ extern UINT16 *Fb_Ptr; extern HRESULT Fb_setup(void); extern void Fb_cleanup(void); +extern void Fb_clear(void); #endif /* __FBINIT_H_INCLUDED */ diff --git a/src/main.c b/src/main.c index 915a990..1d8525b 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,6 @@ #include #include +#include #include "scode.h" #include "gpio.h" #include "log.h" @@ -39,7 +40,10 @@ int main(int argc, char *argv[]) if (FAILED(Sys_enable_input())) return EXIT_FAILURE; atexit(Sys_disable_input); + Log(LINFO, "Pausing at startup."); + sleep(5); /* wait to show off splash screen */ + Fb_clear(); /* temporary drawing here */ do_draw();