From 5bc0adee61f7bf4593aad9410d10809b88409170 Mon Sep 17 00:00:00 2001 From: Yourtion Date: Fri, 13 May 2016 11:54:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E5=BE=97=E6=9B=B4=E5=83=8F=E7=9C=9F?= =?UTF-8?q?=E6=AD=A3=E7=9A=84=E6=93=8D=E4=BD=9C=E7=B3=BB=E7=BB=9F=EF=BC=88?= =?UTF-8?q?2=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 25_day/bootpack.c | 5 +++-- 25_day/console.c | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/25_day/bootpack.c b/25_day/bootpack.c index 95e569d..8a2a773 100644 --- a/25_day/bootpack.c +++ b/25_day/bootpack.c @@ -14,7 +14,7 @@ void HariMain(void) struct SHTCTL *shtctl; char s[40]; struct FIFO32 fifo, keycmd; - int fifobuf[128], keycmd_buf[32]; + int fifobuf[128], keycmd_buf[32], *cons_fifo[2]; int mx, my, i; unsigned int memtotal; struct MOUSE_DEC mdec; @@ -97,6 +97,8 @@ void HariMain(void) task_run(task_cons[i], 2, 2); /* level=2, priority=2 */ sht_cons[i]->task = task_cons[i]; sht_cons[i]->flags |= 0x20; /*有光标*/ + cons_fifo[i] = (int *) memman_alloc_4k(memman, 128 * 4); + fifo32_init(&task_cons[i]->fifo, 128, cons_fifo[i], task_cons[i]); } /* sht_mouse */ @@ -116,7 +118,6 @@ void HariMain(void) sheet_updown(sht_cons[0], 2); sheet_updown(sht_mouse, 3); key_win = sht_cons[0]; - keywin_on(key_win); /*为了避免和键盘当前状态冲突,在一开始先进行设置*/ fifo32_put(&keycmd, KEYCMD_LED); diff --git a/25_day/console.c b/25_day/console.c index 1b58cd6..2cfb82a 100644 --- a/25_day/console.c +++ b/25_day/console.c @@ -9,7 +9,7 @@ void console_task(struct SHEET *sheet, unsigned int memtotal) struct TIMER *timer; struct TASK *task = task_now(); struct MEMMAN *memman = (struct MEMMAN *) MEMMAN_ADDR; - int i, fifobuf[128], *fat = (int *) memman_alloc_4k(memman, 4 * 2880); + int i, *fat = (int *) memman_alloc_4k(memman, 4 * 2880); struct CONSOLE cons; char cmdline[30]; cons.sht = sheet; @@ -18,7 +18,6 @@ void console_task(struct SHEET *sheet, unsigned int memtotal) cons.cur_c = -1; task->cons = &cons; - fifo32_init(&task->fifo, 128, fifobuf, task); timer = timer_alloc(); timer_init(timer, &task->fifo, 1); timer_settime(timer, 50);