mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2026-08-15 05:18:32 +00:00
lib: Implement simplefb driver for framebuffer management
Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
This commit is contained in:
1 parent
94b2cf0c4a
commit
e364dfbc1b
10 files changed
+1999
-3
No files matched your search
@@ -9,4 +9,9 @@
|
||||
#define PAYLOAD_ENTRY 0x90000000
|
||||
#define PAYLOAD_SIZE 0x2000000
|
||||
|
||||
#define FRAMEBUFFER_BASE 0xcc000000
|
||||
#define FRAMEBUFFER_WIDTH 1440
|
||||
#define FRAMEBUFFER_HEIGHT 2960
|
||||
#define FRAMEBUFFER_STRIDE 4
|
||||
|
||||
#endif // BOARD_DREAMLTE_H_
|
||||
@@ -10,4 +10,10 @@
|
||||
#define PAYLOAD_ENTRY 0x830000000
|
||||
#define PAYLOAD_SIZE 0x2000000
|
||||
|
||||
#define FRAMEBUFFER_BASE 0x83e900000
|
||||
/* Width is offsetted by 2 */
|
||||
#define FRAMEBUFFER_WIDTH 752
|
||||
#define FRAMEBUFFER_HEIGHT 1334
|
||||
#define FRAMEBUFFER_STRIDE 4
|
||||
|
||||
#endif // BOARD_N61AP_H_
|
||||
+1830
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,35 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) 2022, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
|
||||
* Copyright (c) 2022, Markuss Broks <markuss.broks@gmail.com>
|
||||
* Copyright (c) 2022, Michael Srba <Michael.Srba@seznam.cz>
|
||||
*/
|
||||
|
||||
#ifndef SIMPLEFB_H_ /* Include guard */
|
||||
#define SIMPLEFB_H_
|
||||
|
||||
typedef struct _color {
|
||||
int r;
|
||||
int g;
|
||||
int b;
|
||||
} color;
|
||||
|
||||
typedef struct _font_params {
|
||||
int width;
|
||||
int height;
|
||||
} font_params;
|
||||
|
||||
font_params get_font_params(void);
|
||||
|
||||
long unsigned int strlen(const char *p) {
|
||||
unsigned int i = 0;
|
||||
|
||||
while(*p != '\0') {
|
||||
i++;
|
||||
p++;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -10,6 +10,9 @@ extern void load_kernel(void* dtb, void* x1, void* x2, void* x3, void* kernel);
|
||||
extern void soc_init(void);
|
||||
extern void board_init(void);
|
||||
|
||||
extern void draw_text(volatile char *fb, char *text, int textX, int textY);
|
||||
extern void debug_printfb(volatile char *fb, char *text, int textX, int width, int stride);
|
||||
|
||||
/* Define our own 128 bit memcpy */
|
||||
void memcpy(void *dest, void *src, int size)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user