# 8259.h

Go to the documentation of this file.

    00001 /*****************************************************************************************
    00002  Copyright (c) 2002-2004 The UbixOS Project
    00003  All rights reserved.
    00004
    00005  Redistribution and use in source and binary forms, with or without modification, are
    00006  permitted provided that the following conditions are met:
    00007
    00008  Redistributions of source code must retain the above copyright notice, this list of
    00009  conditions, the following disclaimer and the list of authors.  Redistributions in binary
    00010  form must reproduce the above copyright notice, this list of conditions, the following
    00011  disclaimer and the list of authors in the documentation and/or other materials provided
    00012  with the distribution. Neither the name of the UbixOS Project nor the names of its
    00013  contributors may be used to endorse or promote products derived from this software
    00014  without specific prior written permission.
    00015
    00016  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
    00017  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    00018  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
    00019  THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    00020  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
    00021  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    00022  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
    00023  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    00024  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    00025
    00026  $Id: 8259_8h-source.html 88 2016-01-12 00:11:29Z reddawg $
    00027
    00028 *****************************************************************************************/
    00029
    00030 #ifndef _8259_H
    00031 #define _8259_H
    00032
    00033 #include <ubixos/types.h>
    00034
    00035 #define mPic    0x20 // I/O for master PIC
    00036 #define mImr    0x21 // I/O for master IMR
    00037 #define sPic    0xA0 // I/O for slave PIC
    00038 #define sImr    0xA1 // I/O for slace IMR
    00039 #define eoi     0x20 // EOI command
    00040 #define icw1    0x11 // Cascade, Edge triggered
    00041 #define icw4    0x01 // 8088 mode
    00042 #define mVec    0x68 // Vector for master
    00043 #define sVec    0x70 // Vector for slave
    00044 #define ocw3Irr 0x0A // Read IRR
    00045 #define ocw3Isr 0x0B // Read ISR
    00046
    00047 int i8259_init();
    00048 void irqEnable(uInt16 irqNo);
    00049 void irqDisable(uInt16 irqNo);
    00050
    00051 #endif
    00052
    00053 /***
    00054  $Log: 8259_8h-source.html,v $
    00054  Revision 1.7  2006/12/15 17:47:04  reddawg
    00054  Updates
    00054
    00055  Revision 1.1.1.1  2006/06/01 12:46:14  reddawg
    00056  ubix2
    00057
    00058  Revision 1.2  2005/10/12 00:13:36  reddawg
    00059  Removed
    00060
    00061  Revision 1.1.1.1  2005/09/26 17:23:39  reddawg
    00062  no message
    00063
    00064  Revision 1.4  2004/07/09 13:20:08  reddawg
    00065  Oh yeah duh you can not name functions with numbers
    00066
    00067  Revision 1.3  2004/07/09 13:14:29  reddawg
    00068  8259: changed init8259 to 8259_init
    00069  Adjusted Startup Routines
    00070
    00071  Revision 1.2  2004/05/21 14:57:16  reddawg
    00072  Cleaned up
    00073
    00074  END
    00075  ***/