📄 pic.h
字号:
/* * OSV * Copyright (C) 2002 Ciprian DOSOFTEI <rocksoul@mail.com> * All rights reserved. * * http://backster.free.fr/osv * * This file is part of the OSV project. OSV is free software, also known as * "open source"; you can redistribute it and/or modify it under the terms * of the GNU General Public License (GPL), version 2, as published by the Free * Software Foundation (FSF). To explore alternate licensing terms, contact * the author at rocksoul@mail.com or +40740649907. * * OSV is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GPL for more details. You should have * received a copy of the GPL along with OSV; see the file COPYING. If * not, write to the FSF, 59 Temple Place #330, Boston, MA 02111-1307, USA. */#ifndef INCPIC#define INCPIC#include <asm/io.h>#include <types.h>#include <sys/params.h>#include <exception.h>extern void reprogramPIC(ushort master, ushort slave);extern void unmaskIRQ(int irq);extern void maskIRQ(int irq);extern void refreshIRQs(void);extern void registerIRQ(int irq, dword handler, int level);/* other names */#define enable_irq(x) unmaskIRQ(x)#define disable_irq(x) maskIRQ(x)#define INTERRUPT_HANDLER(handler) \ void handler(void); \ void isr_ ## handler(void)#define INTERRUPT_STUB(handler) \ asm( \ ".globl isr_" #handler " \n" \ "isr_" #handler ": \n" \ " pusha \n" \ " pushw %ds \n" \ " pushw %es \n" \ " pushw %fs \n" \ " pushw %gs \n" \ " pushw %ss \n" \ " popw %ds \n" \ " call " #handler " \n" \ " popw %gs \n" \ " popw %fs \n" \ " popw %es \n" \ " popw %ds \n" \ " popa \n" \ " iret \n" \ ); \ void handler(void)#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -