code to actually display the splash screen

This commit is contained in:
Amy G. Bowersox 2019-12-06 20:57:44 -07:00
parent 6538ddeb53
commit 2663de9d42
3 changed files with 13 additions and 0 deletions

View File

@ -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);
}

View File

@ -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 */

View File

@ -1,5 +1,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#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();