예제 #1
0
파일: int.c 프로젝트: hirokazuya/hello_os
void inthandler21(int *esp)
// PS/2キーボードからの割り込み
{
//	struct BOOTINFO *binfo = (struct BOOTINFO *) ADR_BOOTINFO;
	unsigned char data;
	io_out8(PIC0_OCW2, 0x61); //IRQ-01受付完了をPICに通知
	data = io_in8(PORT_KEYDAT);//キーボード割込みデータの受け取り
	fifo8_put(&keyfifo, data);//割り込みデータをFIFOへ格納
	//&変数=変数のアドレスを意味するらしい

/*	if (keybuf.len < 32) {
		keybuf.data[keybuf.next_w] = data;
		keybuf.len++;
		keybuf.next_w++;
		if (keybuf.next_w == 32) {
			keybuf.next_w = 0;
		}
	}
//	if (keybuf.flag == 0) {
//		keybuf.data = data;
//		keybuf.flag = 1;
//	}
//	sprintf(s, "%02X", data);
//	boxfill8(binfo->vram, binfo->scrnx, COL8_008484, 0, 16, 15, 31);
//	putfonts8_asc(binfo->vram, binfo->scrnx, 0, 16, COL8_FFFFFF, s);*/
	return;
}
예제 #2
0
파일: int.c 프로젝트: xuzhenglun/Goo-OS
void int_handler_2c(int *esp){
    unsigned char data;
    io_out8(PIC1_OCW2, 0x64);
    io_out8(PIC0_OCW2, 0x62);
    data = io_in8(PORT_KEYDAT);
    fifo8_put(&mousefifo, data);
}
예제 #3
0
파일: int.c 프로젝트: xuzhenglun/Goo-OS
void int_handler_20(int *esp){
    extern struct TIMERCTRL timerctrl;
    extern struct TIMER *task_timer;
    char ts_flag = 0;
    io_out8(PIC0_OCW2, 0x60);
    timerctrl.count++;
    if(timerctrl.next > timerctrl.count){
        return;
    }
    else{
         while(timerctrl.head->timeout <= timerctrl.count){
            timerctrl.head->flags = TIMER_FLAGS_ALLOC;
            if(timerctrl.head != task_timer)
                fifo8_put(timerctrl.head->fifo, timerctrl.head->data);
            else{
                ts_flag = 1;
            }
            timerctrl.head = timerctrl.head->next;
         }
    }
    timerctrl.next = timerctrl.head->timeout;

    if(ts_flag != 0){
        task_switch();
    }
}
예제 #4
0
파일: int.c 프로젝트: baojy/sysbjy
void inthandler21(int *esp)
{
	unsigned char data;
	io_out8(PIC0_OCW2, 0x61);	/* IRQ-01受付完了をPICに通知 */
	data = io_in8(PORT_KEYDAT);
	fifo8_put(&keyfifo, data);
	return;
}
예제 #5
0
파일: int.c 프로젝트: MOOOWOOO/OS
void inthandler21(int *esp) {
	unsigned char data;
	io_out8(PIC0_OCW2, 0x61);	// 通知 PIC "IRQ-01已经受理完毕"
	data = io_in8(PORT_KEYDAT);

	fifo8_put(&keyfifo, data);

	return;
}
예제 #6
0
/* PS/2鼠标的中断 */
void inthandler2c(int *esp)
{
    unsigned char data;
    io_out8(PIC1_OCW2, 0x64);							/* 通知PIC IRQ-12已经受理完毕 */
    io_out8(PIC0_OCW2, 0x62);							/* 通知PIC IRQ-02已经受理完毕 */
    data = io_in8(PORT_KEYDAT);
    fifo8_put(&mousefifo, data);
    return;
}
예제 #7
0
파일: int.c 프로젝트: baojy/sysbjy
void inthandler2c(int *esp)
/* PS/2マウスからの割り込み */
{
	unsigned char data;
	io_out8(PIC1_OCW2, 0x64);	/* IRQ-12受付完了をPIC1に通知 */
	io_out8(PIC0_OCW2, 0x62);	/* IRQ-02受付完了をPIC0に通知 */
	data = io_in8(PORT_KEYDAT);
	fifo8_put(&mousefifo, data);
	return;
}
예제 #8
0
void inthandler21(int *esp)
/* PS/2キーボードからの割り込み */
{
  struct BOOTINFO *binfo = (struct BOOTINFO *) ADR_BOOTINFO;
  unsigned char data;
  io_out8(PIC0_OCW2, 0x61);
  data = io_in8(PORT_KEYDAT);
  fifo8_put (&keyfifo, data);
  return;
}
예제 #9
0
파일: mouse.c 프로젝트: RogerTsang/osask
/* Mouse Interrupt */
void inthandler2c(int *esp) {
    unsigned char data;
    /* Indicates PIC1 IRQ-12 is handled */
    io_out8(PIC1_OCW2, 0x64);
    /* Indicates PIC0 IRQ-2  is handled */
    io_out8(PIC0_OCW2, 0x62);
    /* Write data to buffer (same port as KB) */
    data = io_in8(PORT_KEYDAT);
    fifo8_put(&moufifo, data);
    return;
}
예제 #10
0
파일: timer.c 프로젝트: LastAvenger/OSASK
void inthandler20(int *esp)
{
	io_out8(PIC0_OCW2, 0x60);	/* 通知PIC IRQ 0 的中断已经收到 */
	timerctl.count++;
	if (timerctl.timeout > 0) { /*  如果设定了超时 */
		timerctl.timeout--;
		if (timerctl.timeout == 0) {
			fifo8_put(timerctl.fifo, timerctl.data);
		}
	}
	return;
}
예제 #11
0
파일: timer.c 프로젝트: FuDesign2008/mess
void inthandler20(int *esp)
{
	io_out8(PIC0_OCW2, 0x60);	/* IRQ-00受付完了をPICに通知 */
	timerctl.count++;
	if (timerctl.timeout > 0) { /* タイムアウトが設定されている */
		timerctl.timeout--;
		if (timerctl.timeout == 0) {
			fifo8_put(timerctl.fifo, timerctl.data);
		}
	}
	return;
}
예제 #12
0
void inthandler20(int *esp)
{
	/* 把IRQ-00信号接受完了的信息通知给PIC. */
	io_out8(PIC0_OCW2, 0x60);
	++timerctl.count;
	if (timerctl.timeout > 0) 
		{
			timerctl.timeout--;
			if (timerctl.timeout == 0)
				fifo8_put(timerctl.fifo, timerctl.data);
		}
	return;
}
예제 #13
0
파일: timer.c 프로젝트: SeanHAu/OSASK
void inthandler20(int *esp)
{
	int i;
	io_out8(PIC0_OCW2, 0x60); /* 把IRQ-00信号接收完了的信息通知给PIC */
	timerctl.count ++;
	for (i = 0; i < MAX_TIMER; i++){
		if (timerctl.timer[i].flags == TIMER_FLAGS_USING) {
			if (timerctl.timer[i].timeout <= timerctl.count ) {
				timerctl.timer[i].flags = TIMER_FLAGS_ALLOC;
				fifo8_put(timerctl.timer[i].fifo, timerctl.timer[i].data);
			}
		}
	}
	return;
}
예제 #14
0
void inthandler20(int *esp)
{
  io_out8 (PIC0_OCW2, 0x60);
  timerctl.count ++;
  int i;
  for (i = 0; i < MAX_TIMER; i++) {
	if (timerctl.timer[i].flags == TIMER_FLAGS_USING) {
	  timerctl.timer[i].timeout --;
	  if (timerctl.timer[i].timeout == 0) {
		timerctl.timer[i].flags = TIMER_FLAGS_ALLOC;
		fifo8_put(timerctl.timer[i].fifo, timerctl.timer[i].data);
	  }
    }
  }
  
  return;
}
예제 #15
0
파일: int.c 프로젝트: xuzhenglun/Goo-OS
void int_handler_21(int *esp){
	io_out8(PIC0_OCW2,0x61);
	unsigned char data = io_in8(PORT_KEYDAT);
    fifo8_put(&keyfifo,data);
}