From 494bcc17856629b9965f4b787ce1d35b036c149a Mon Sep 17 00:00:00 2001 From: Yourtion Date: Thu, 21 Apr 2016 11:09:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E6=B5=8B=E8=AF=95=E6=80=A7?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 13_day/bootpack.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/13_day/bootpack.c b/13_day/bootpack.c index 18cd32c..ac20b43 100644 --- a/13_day/bootpack.c +++ b/13_day/bootpack.c @@ -30,7 +30,8 @@ void HariMain(void) enable_mouse(&fifo, 512, &mdec); io_out8(PIC0_IMR, 0xf8); /* 设定PIT和PIC1以及键盘为许可(11111000) */ io_out8(PIC1_IMR, 0xef); /* 开放鼠标中断(11101111) */ - + + set490(&fifo,1); timer = timer_alloc(); timer_init(timer, &fifo, 10); timer_settime(timer, 1000); @@ -195,3 +196,16 @@ void putfonts8_asc_sht(struct SHEET *sht, int x, int y, int c, int b, char *s, i sheet_refresh(sht, x, y, x + l * 8, y + 16); return; } + +void set490(struct FIFO32 *fifo, int mode){ + int i; + struct TIMER *timer; + if (mode != 0) { + for (i = 0; i < 490; i++) { + timer = timer_alloc(); + timer_init(timer, fifo, 1024 + i); + timer_settime(timer, 100 * 60 * 60 * 24 * 50 + i * 100); + } + } + return; +}