add fb_ready()
This commit is contained in:
1 parent
5bc844649b
commit
a66df19edc
3 files changed
+12
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "fb.h"
|
||||
#include <stddef.h>
|
||||
|
||||
static uint32_t * fb;
|
||||
static uint32_t fb_width;
|
||||
@@ -28,3 +29,8 @@ void fb_init(uint32_t * addr, uint32_t width, uint32_t height, uint32_t pitch)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool fb_ready(void)
|
||||
{
|
||||
return fb != NULL;
|
||||
}
|
||||
@@ -2,7 +2,9 @@
|
||||
#define FB_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
void fb_init(uint32_t * addr, uint32_t width, uint32_t height, uint32_t pitch);
|
||||
bool fb_ready(void);
|
||||
|
||||
#endif
|
||||
@@ -5,4 +5,8 @@
|
||||
void hos_main(uint32_t mbinfo_addr)
|
||||
{
|
||||
mbinfo_init(mbinfo_addr);
|
||||
if (!fb_ready())
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user