kpic.h

00001 /***************************************************************************
00002                           kpic.h  -  description
00003                              -------------------
00004     begin                : Fri Jan 2 2004
00005     copyright            : (C) 2004 by Dynacube Team
00006     email                : mdshah82@yahoo.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018  #ifndef __KPIC_H
00019  #define __KPIC_H
00020 
00021   #include "common/ktypes.h"
00022 
00023                                 #define PIC1            0x20
00024                                 #define PIC2            0xA0
00025                                 #define PIC1_COMMAND    PIC1
00026                                 #define PIC1_DATA       (PIC1+1)
00027                                 #define PIC2_COMMAND    PIC2
00028                                 #define PIC2_DATA       (PIC2+1)
00029                                 #define PIC_EOI         0x20
00030 
00031                                 #define ICW1_ICW4       0x01            /* ICW4 (not) needed */
00032                                 #define ICW1_SINGLE     0x02            /* Single (cascade) mode */
00033                                 #define ICW1_INTERVAL4  0x04            /* Call address interval 4 (8) */
00034                                 #define ICW1_LEVEL      0x08            /* Level triggered (edge) mode */
00035                                 #define ICW1_INIT       0x10            /* Initialization - required! */
00036 
00037                                 #define ICW4_8086       0x01            /* 8086/88 (MCS-80/85) mode */
00038                                 #define ICW4_AUTO       0x02            /* Auto (normal) EOI */
00039                                 #define ICW4_BUF_SLAVE  0x08            /* Buffered mode/slave */
00040                                 #define ICW4_BUF_MASTER 0x0C            /* Buffered mode/master */
00041                                 #define ICW4_SFNM       0x10            /* Special fully nested (not) */
00042 
00043                                 //Device Codes
00044                                 #define TIMER           (0x1<<0)
00045                                 #define KEYBOARD        (0x1<<1)
00046                         #define FLOPPY    (0x1<<6)
00047                         #define PS2_MOUSE (0x1<<9)
00048 
00049                         void pic_init();
00050                                 void pic_enable(DW dev_code);
00051                                 void pic_disable(DW dev_code);
00052  #endif

Generated on Thu Jul 27 23:52:27 2006 for Dynacube by  doxygen 1.4.7