[refactor] 整理注释
This commit is contained in:
@@ -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},
|
||||
|
||||
@@ -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});
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
// 这个文件存在的目的是让graphics的draw功能不用每次传 GOP hr vr base
|
||||
|
||||
#include <efi.h>
|
||||
#include <common.h>
|
||||
|
||||
|
||||
+12
-6
@@ -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();
|
||||
Reference in New Issue
Block a user