Repos / kernel.git / commitdiff
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c724f6f)
raw | patch | inline | side by side (parent: c724f6f)
| author | zhaoyanbai <zhaoyanbai@126.com> | |
| Fri, 10 May 2024 14:01:50 +0000 (22:01 +0800) | ||
| committer | zhaoyanbai <zhaoyanbai@126.com> | |
| Fri, 10 May 2024 14:01:50 +0000 (22:01 +0800) |
| kernel/clock.c | patch | blob | history |
diff --git a/kernel/clock.c b/kernel/clock.c
--- a/kernel/clock.c
+++ b/kernel/clock.c
const uint8_t read_write_latch = 3; // 0 锁存数据供CPU读;1只读写低字节;2只读写高字节;3先读写低字节,后读写高字节
const uint8_t mode = 2; //
- const uint8_t cmd = (counter_no << 6) | (read_write_latch << 4) || (mode << 1); // 第0位为0表示二进制,为1表示BCD
+ const uint8_t cmd = (counter_no << 6) | (read_write_latch << 4) | (mode << 1); // 第0位为0表示二进制,为1表示BCD
const uint8_t i8253_cmd_port = 0x43;
const uint8_t i8253_data_port = 0x40 + counter_no;