From b5c31822879bc93ce42cfd1496a2c3d23c7c3ad8 Mon Sep 17 00:00:00 2001 From: acevest Date: Sun, 9 Aug 2026 15:26:15 +0800 Subject: [PATCH] =?utf8?q?serial=20=E6=B3=A2=E7=89=B9=E7=8E=87=E4=BB=8E960?= =?utf8?q?0=E6=8F=90=E9=AB=98=E5=88=B0115200?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- drivers/serial.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/serial.c b/drivers/serial.c index 1059bc2..09c1786 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -20,11 +20,13 @@ #define SERIAL_PORT COMM1_PORT +const uint32_t baud_rate = 115200; + void init_serial() { uint32_t port = SERIAL_PORT; outb(0x00, port + 1); // 禁用中断 outb(0x80, port + 3); - outb(115200 / 9600, port + 0); + outb(115200 / baud_rate, port + 0); outb(0x00, port + 1); outb(0x03, port + 3); outb(0xC7, port + 2); -- 2.47.0