[refactor] 整理注释

This commit is contained in:
2026-06-06 10:31:20 +08:00
Unverified
parent a9ba4457c6
commit 30d48d2881
19 changed files with 177 additions and 192 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#include <common.h>
// Hankaku 字体,不动
// Hankaku 8x16 点阵字体数据
static SUINT8 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},
+4 -2
View File
@@ -3,6 +3,8 @@
#include <graphics/context.h>
#include <string_utils.h>
// 打印单个字符
void pf_print_char(char c, SUINT32 basex, SUINT32 basey,
EFI_GRAPHICS_OUTPUT_BLT_PIXEL color = {255, 255, 255, 255}); // Pixel Font 打印字符
void pf_print(String text, SUINT32 basex, SUINT32 basey, EFI_GRAPHICS_OUTPUT_BLT_PIXEL color = {255, 255, 255, 255}); // Pixel Font 打印string
EFI_GRAPHICS_OUTPUT_BLT_PIXEL color = {255, 255, 255, 255});
// 打印字符串
void pf_print(String text, SUINT32 basex, SUINT32 basey, EFI_GRAPHICS_OUTPUT_BLT_PIXEL color = {255, 255, 255, 255});
-2
View File
@@ -1,7 +1,5 @@
#pragma once
// 这个文件存在的目的是让graphics的draw功能不用每次传 GOP hr vr base
#include <efi.h>
#include <common.h>
+12 -6
View File
@@ -4,14 +4,20 @@
#include <efiser.h>
#include <string_utils.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(String str); // 往串行写string
void serial_write_char(char c); // 往串行写char(不推荐使用)
void serial_write_hex(UINTN val); // 往串行写十六进制数字
char serial_read_char(); // 读串行
// 初始化串行驱动
void serial_init(EFI_SERIAL_IO_PROTOCOL *SerialIo);
// 写字符串到串行
void serial_write(String str);
// 写单个字符到串行(不推荐直接使用)
void serial_write_char(char c);
// 写十六进制数字到串行
void serial_write_hex(UINTN val);
// 从串行读取一个字符
char serial_read_char();