[chore] EVERYTHING!
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
// 存放各类参数定义,后续给CI用
|
||||
|
||||
#define ENABLE_SERIAL_PRINTS true
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
unsigned int strlen(char* arr) {
|
||||
#define ASM asm volatile
|
||||
|
||||
static unsigned int strlen(const char* arr) { // 获取string长度
|
||||
int i = 0;
|
||||
while (arr[i++] != '\0');
|
||||
return i - 1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
// Hankaku 字体
|
||||
// Hankaku 字体,不动
|
||||
static unsigned char hankaku_pixels[256][16] = {
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x10, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x10, 0x00, 0x00},
|
||||
@@ -2,5 +2,7 @@
|
||||
|
||||
#include <graphics/context.h>
|
||||
|
||||
void pf_print_char(char c, unsigned int basex, unsigned int basey, EFI_GRAPHICS_OUTPUT_BLT_PIXEL color = {255, 255, 255, 255});
|
||||
void pf_print(char* text, unsigned int basex, unsigned int basey, EFI_GRAPHICS_OUTPUT_BLT_PIXEL color = {255, 255, 255, 255});
|
||||
void pf_print_char(char c, unsigned int basex, unsigned int basey,
|
||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL color = {255, 255, 255, 255}); // Pixel Font 打印字符
|
||||
void pf_print(const char* text, EFI_GRAPHICS_OUTPUT_BLT_PIXEL color = {255, 255, 255, 255}); // Pixel Font 打印string
|
||||
void pf_reset_position(void); // 重设Pixel Font Cursor位置
|
||||
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
// 这个文件存在的目的是让graphics的draw功能不用每次传 GOP hr vr base
|
||||
|
||||
#include <efi.h>
|
||||
|
||||
struct gfx_context {
|
||||
@@ -11,4 +13,5 @@ struct gfx_context {
|
||||
|
||||
extern gfx_context g_gfx;
|
||||
|
||||
void gfx_init(EFI_GRAPHICS_OUTPUT_PROTOCOL *GOP);
|
||||
void gfx_init(EFI_GRAPHICS_OUTPUT_PROTOCOL *GOP); // 初始化 GFX
|
||||
void gfx_clear(void); // 清空 GFX(相当于重置)
|
||||
@@ -3,4 +3,4 @@
|
||||
#include <efi.h>
|
||||
#include <graphics/context.h>
|
||||
|
||||
void draw_pixel(unsigned int x, unsigned int y, EFI_GRAPHICS_OUTPUT_BLT_PIXEL color);
|
||||
void draw_pixel(unsigned int x, unsigned int y, EFI_GRAPHICS_OUTPUT_BLT_PIXEL color); // 画像素
|
||||
+5
-5
@@ -3,13 +3,13 @@
|
||||
#include <efi.h>
|
||||
#include <efiser.h>
|
||||
|
||||
struct serial_context {
|
||||
struct serial_context { // 串行内容结构体
|
||||
EFI_SERIAL_IO_PROTOCOL *SerialIo;
|
||||
};
|
||||
|
||||
extern serial_context g_serial;
|
||||
|
||||
void serial_init(EFI_SERIAL_IO_PROTOCOL *SerialIo);
|
||||
void serial_write(const char *str);
|
||||
void serial_write_char(char c);
|
||||
char serial_read_char();
|
||||
void serial_init(EFI_SERIAL_IO_PROTOCOL *SerialIo); // 初始化串行驱动
|
||||
void serial_write(const char *str); // 往串行写string
|
||||
void serial_write_char(char c); // 往串行写char(不推荐使用)
|
||||
char serial_read_char(); // 读串行
|
||||
Reference in New Issue
Block a user