<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16">
  <compounddef id="8259_8c" kind="file" language="C++">
    <compoundname>8259.c</compoundname>
    <includes refid="8259_8h" local="no">isa/8259.h</includes>
    <includes refid="io_8h" local="no">sys/io.h</includes>
    <includes refid="kprintf_8h" local="no">lib/kprintf.h</includes>
    <incdepgraph>
      <node id="12">
        <label>stdarg.h</label>
        <link refid="stdarg_8h"/>
      </node>
      <node id="10">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
      <node id="5">
        <label>sys/select.h</label>
        <link refid="select_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
      </node>
      <node id="9">
        <label>sys/_sigset.h</label>
        <link refid="__sigset_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>isa/8259.h</label>
        <link refid="8259_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>sys/types.h</label>
        <link refid="include_2sys_2types_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/isa/8259.c</label>
        <link refid="8259_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="6">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="4">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="7">
        <label>sys/_timespec.h</label>
        <link refid="__timespec_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="8">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="var">
      <memberdef kind="variable" id="8259_8c_1ac1c08e908fa26e3c59fd4989c5290c58" prot="public" static="yes" mutable="no">
        <type>unsigned int</type>
        <definition>unsigned int irqMask</definition>
        <argsstring></argsstring>
        <name>irqMask</name>
        <initializer>= 0xFFFF</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/isa/8259.c" line="33" column="21" bodyfile="C:/Dev/git/UbixOS/sys/isa/8259.c" bodystart="33" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="8259_8c_1a8045101c57cc1791817412b1016794b4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int i8259_init</definition>
        <argsstring>()</argsstring>
        <name>i8259_init</name>
        <briefdescription>
<para>initialize the 8259 PIC </para>
        </briefdescription>
        <detaileddescription>
<para>This will initialize both PICs for all of our IRQs </para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/isa/8259.c" line="41" column="5" bodyfile="C:/Dev/git/UbixOS/sys/isa/8259.c" bodystart="41" bodyend="59"/>
        <references refid="8259_8h_1a543896e13206abea73704f0f87f65d7e" compoundref="8259_8h" startline="39">icw1</references>
        <references refid="8259_8h_1a16fcea0b8e8fb321710ee3fe0788b2a6" compoundref="8259_8h" startline="40">icw4</references>
        <references refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" compoundref="kprintf_8c" startline="259" endline="276">kprintf</references>
        <references refid="8259_8h_1ab5e84ca4c143a8b9a34b575201aaffd5" compoundref="8259_8h" startline="35">mImr</references>
        <references refid="8259_8h_1a0195451428bc646f820202dc15f25d9f" compoundref="8259_8h" startline="34">mPic</references>
        <references refid="8259_8h_1a7d84962c1a1c225344a94545309f92fc" compoundref="8259_8h" startline="41">mVec</references>
        <references refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" compoundref="io_8c" startline="72" endline="78">outportByte</references>
        <references refid="8259_8h_1a13b25eb31f4b435fdb1ed81c10b07315" compoundref="8259_8h" startline="37">sImr</references>
        <references refid="8259_8h_1a7d4efc593ecc4ace3d92e1f4ee919b99" compoundref="8259_8h" startline="36">sPic</references>
        <references refid="8259_8h_1a2f7f6ebf05739e77a7c20aee806b771c" compoundref="8259_8h" startline="42">sVec</references>
      </memberdef>
      <memberdef kind="function" id="8259_8c_1ad53c4c3d65338bf63d4efd4da1cf7703" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void irqDisable</definition>
        <argsstring>(uint16_t irqNo)</argsstring>
        <name>irqDisable</name>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a281b4b5562236420969a830503b0ba19" kindref="member">uint16_t</ref></type>
          <declname>irqNo</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/isa/8259.c" line="104" column="6" bodyfile="C:/Dev/git/UbixOS/sys/isa/8259.c" bodystart="104" bodyend="117"/>
        <references refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" compoundref="io_8c" startline="38" endline="46">inportByte</references>
        <references refid="8259_8h_1ab5e84ca4c143a8b9a34b575201aaffd5" compoundref="8259_8h" startline="35">mImr</references>
        <references refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" compoundref="io_8c" startline="72" endline="78">outportByte</references>
        <references refid="8259_8h_1a13b25eb31f4b435fdb1ed81c10b07315" compoundref="8259_8h" startline="37">sImr</references>
      </memberdef>
      <memberdef kind="function" id="8259_8c_1adda76540a4a9d97a033b99f0bc42cf0b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void irqDisable_old</definition>
        <argsstring>(u_int16_t irqNo)</argsstring>
        <name>irqDisable_old</name>
        <param>
          <type><ref refid="include_2sys_2types_8h_1af7b042408b9b104606f8a9b5035329f3" kindref="member">u_int16_t</ref></type>
          <declname>irqNo</declname>
        </param>
        <briefdescription>
<para>disable specified IRQ </para>
        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>irqNo</parametername>
</parameternamelist>
<parameterdescription>
<para>IRQ to disable </para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/isa/8259.c" line="95" column="6" bodyfile="C:/Dev/git/UbixOS/sys/isa/8259.c" bodystart="95" bodyend="102"/>
      </memberdef>
      <memberdef kind="function" id="8259_8c_1a7d628ae64fdc8f3433b4930cefa8ae4a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void irqEnable</definition>
        <argsstring>(uint16_t irqNo)</argsstring>
        <name>irqEnable</name>
        <param>
          <type><ref refid="include_2sys_2types_8h_1a281b4b5562236420969a830503b0ba19" kindref="member">uint16_t</ref></type>
          <declname>irqNo</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/isa/8259.c" line="75" column="6" bodyfile="C:/Dev/git/UbixOS/sys/isa/8259.c" bodystart="75" bodyend="88"/>
        <references refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" compoundref="io_8c" startline="38" endline="46">inportByte</references>
        <references refid="8259_8h_1ab5e84ca4c143a8b9a34b575201aaffd5" compoundref="8259_8h" startline="35">mImr</references>
        <references refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" compoundref="io_8c" startline="72" endline="78">outportByte</references>
        <references refid="8259_8h_1a13b25eb31f4b435fdb1ed81c10b07315" compoundref="8259_8h" startline="37">sImr</references>
      </memberdef>
      <memberdef kind="function" id="8259_8c_1aa2757e398a25b05d82816891d135d4af" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void irqEnable_old</definition>
        <argsstring>(u_int16_t irqNo)</argsstring>
        <name>irqEnable_old</name>
        <param>
          <type><ref refid="include_2sys_2types_8h_1af7b042408b9b104606f8a9b5035329f3" kindref="member">u_int16_t</ref></type>
          <declname>irqNo</declname>
        </param>
        <briefdescription>
<para>enable specified IRQ </para>
        </briefdescription>
        <detaileddescription>
<para><parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>irqNo</parametername>
</parameternamelist>
<parameterdescription>
<para>IRQ to enable </para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/isa/8259.c" line="66" column="6" bodyfile="C:/Dev/git/UbixOS/sys/isa/8259.c" bodystart="66" bodyend="73"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*-</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2002-2018<sp/>The<sp/>UbixOS<sp/>Project.</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="4"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>*<sp/>This<sp/>was<sp/>developed<sp/>by<sp/>Christopher<sp/>W.<sp/>Olsen<sp/>for<sp/>the<sp/>UbixOS<sp/>Project.</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,<sp/>are<sp/>permitted</highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/>1)<sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors.</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/>2)<sp/>Redistributions<sp/>in<sp/>binary<sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors<sp/>in<sp/>the<sp/>documentation<sp/>and/or</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/>3)<sp/>Neither<sp/>the<sp/>name<sp/>of<sp/>the<sp/>UbixOS<sp/>Project<sp/>nor<sp/>the<sp/>names<sp/>of<sp/>its<sp/>contributors<sp/>may<sp/>be<sp/>used<sp/>to</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>endorse<sp/>or<sp/>promote<sp/>products<sp/>derived<sp/>from<sp/>this<sp/>software<sp/>without<sp/>specific<sp/>prior<sp/>written</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>permission.</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>AND<sp/>CONTRIBUTORS<sp/>&quot;AS<sp/>IS&quot;<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>COPYRIGHT<sp/>OWNER<sp/>OR<sp/>CONTRIBUTORS</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>*<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>*<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN</highlight></codeline>
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT</highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="27"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="8259_8h" kindref="compound">isa/8259.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="io_8h" kindref="compound">sys/io.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kprintf_8h" kindref="compound">lib/kprintf.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>irqMask<sp/>=<sp/>0xFFFF;</highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight></codeline>
<codeline lineno="41" refid="8259_8c_1a8045101c57cc1791817412b1016794b4" refkind="member"><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="8259_8c_1a8045101c57cc1791817412b1016794b4" kindref="member">i8259_init</ref>()<sp/>{</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1a0195451428bc646f820202dc15f25d9f" kindref="member">mPic</ref>,<sp/><ref refid="8259_8h_1a543896e13206abea73704f0f87f65d7e" kindref="member">icw1</ref>);<sp/></highlight><highlight class="comment">/*<sp/>Initialize<sp/>Master<sp/>PIC<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1a7d4efc593ecc4ace3d92e1f4ee919b99" kindref="member">sPic</ref>,<sp/><ref refid="8259_8h_1a543896e13206abea73704f0f87f65d7e" kindref="member">icw1</ref>);<sp/></highlight><highlight class="comment">/*<sp/>Initialize<sp/>Seconary<sp/>PIC<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1a0195451428bc646f820202dc15f25d9f" kindref="member">mPic</ref><sp/>+<sp/>1,<sp/><ref refid="8259_8h_1a7d84962c1a1c225344a94545309f92fc" kindref="member">mVec</ref>);<sp/></highlight><highlight class="comment">/*<sp/>Master<sp/>Interrup<sp/>Vector<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1a7d4efc593ecc4ace3d92e1f4ee919b99" kindref="member">sPic</ref><sp/>+<sp/>1,<sp/><ref refid="8259_8h_1a2f7f6ebf05739e77a7c20aee806b771c" kindref="member">sVec</ref>);<sp/></highlight><highlight class="comment">/*<sp/>Secondary<sp/>Interrupt<sp/>Vector<sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1a0195451428bc646f820202dc15f25d9f" kindref="member">mPic</ref><sp/>+<sp/>1,<sp/>1<sp/>&lt;&lt;<sp/>2);<sp/></highlight><highlight class="comment">/*<sp/>Bitmask<sp/>for<sp/>cascade<sp/>on<sp/>IRQ<sp/>2<sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1a7d4efc593ecc4ace3d92e1f4ee919b99" kindref="member">sPic</ref><sp/>+<sp/>1,<sp/>2);<sp/></highlight><highlight class="comment">/*<sp/>Cascade<sp/>on<sp/>IRQ<sp/>2<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1a0195451428bc646f820202dc15f25d9f" kindref="member">mPic</ref><sp/>+<sp/>1,<sp/><ref refid="8259_8h_1a16fcea0b8e8fb321710ee3fe0788b2a6" kindref="member">icw4</ref>);<sp/></highlight><highlight class="comment">/*<sp/>Finish<sp/>Primary<sp/>Initialization<sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1a7d4efc593ecc4ace3d92e1f4ee919b99" kindref="member">sPic</ref><sp/>+<sp/>1,<sp/><ref refid="8259_8h_1a16fcea0b8e8fb321710ee3fe0788b2a6" kindref="member">icw4</ref>);<sp/></highlight><highlight class="comment">/*<sp/>Finish<sp/>Seconary<sp/>Initialization<sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1ab5e84ca4c143a8b9a34b575201aaffd5" kindref="member">mImr</ref>,<sp/>0xff);<sp/></highlight><highlight class="comment">/*<sp/>Mask<sp/>All<sp/>Primary<sp/>Interrupts<sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1a13b25eb31f4b435fdb1ed81c10b07315" kindref="member">sImr</ref>,<sp/>0xff);<sp/></highlight><highlight class="comment">/*<sp/>Mask<sp/>All<sp/>Seconary<sp/>Interrupts<sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Print<sp/>out<sp/>the<sp/>system<sp/>info<sp/>for<sp/>this<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;pic0<sp/>-<sp/>Port:<sp/>[0x%X]\n&quot;</highlight><highlight class="normal">,<sp/><ref refid="8259_8h_1a0195451428bc646f820202dc15f25d9f" kindref="member">mPic</ref>);</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;pic1<sp/>-<sp/>Port:<sp/>[0x%X]\n&quot;</highlight><highlight class="normal">,<sp/><ref refid="8259_8h_1a7d4efc593ecc4ace3d92e1f4ee919b99" kindref="member">sPic</ref>);</highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>so<sp/>the<sp/>system<sp/>knows<sp/>it<sp/>went<sp/>well<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="59"><highlight class="normal">}</highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight></codeline>
<codeline lineno="66" refid="8259_8c_1aa2757e398a25b05d82816891d135d4af" refkind="member"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="8259_8c_1aa2757e398a25b05d82816891d135d4af" kindref="member">irqEnable_old</ref>(<ref refid="include_2sys_2types_8h_1af7b042408b9b104606f8a9b5035329f3" kindref="member">u_int16_t</ref><sp/>irqNo)<sp/>{</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/>irqMask<sp/>&amp;=<sp/>~(1<sp/>&lt;&lt;<sp/>irqNo);</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(irqNo<sp/>&gt;=<sp/>8)<sp/>{</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/>irqMask<sp/>&amp;=<sp/>~(1<sp/>&lt;&lt;<sp/>2);</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1a0195451428bc646f820202dc15f25d9f" kindref="member">mPic</ref><sp/>+<sp/>1,<sp/>irqMask<sp/>&amp;<sp/>0xFF);</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1a7d4efc593ecc4ace3d92e1f4ee919b99" kindref="member">sPic</ref><sp/>+<sp/>1,<sp/>(irqMask<sp/>&gt;&gt;<sp/>8)<sp/>&amp;<sp/>0xFF);</highlight></codeline>
<codeline lineno="73"><highlight class="normal">}</highlight></codeline>
<codeline lineno="74"><highlight class="normal"></highlight></codeline>
<codeline lineno="75" refid="8259_8c_1a7d628ae64fdc8f3433b4930cefa8ae4a" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="8259_8c_1a7d628ae64fdc8f3433b4930cefa8ae4a" kindref="member">irqEnable</ref>(<ref refid="include_2sys_2types_8h_1a281b4b5562236420969a830503b0ba19" kindref="member">uint16_t</ref><sp/>irqNo)<sp/>{</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a281b4b5562236420969a830503b0ba19" kindref="member">uint16_t</ref><sp/>port;</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a2aff71146ab4942b2b38860c749c4074" kindref="member">uint8_t</ref><sp/>value;</highlight></codeline>
<codeline lineno="78"><highlight class="normal"></highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(irqNo<sp/>&lt;<sp/>8)<sp/>{</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/>port<sp/>=<sp/><ref refid="8259_8h_1ab5e84ca4c143a8b9a34b575201aaffd5" kindref="member">mImr</ref>;</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/>port<sp/>=<sp/><ref refid="8259_8h_1a13b25eb31f4b435fdb1ed81c10b07315" kindref="member">sImr</ref>;</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/>irqNo<sp/>-=<sp/>8;</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/>value<sp/>=<sp/><ref refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(port)<sp/>&amp;<sp/>~(1<sp/>&lt;&lt;<sp/>irqNo);</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(port,<sp/>value);</highlight></codeline>
<codeline lineno="88"><highlight class="normal">}</highlight></codeline>
<codeline lineno="89"><highlight class="normal"></highlight></codeline>
<codeline lineno="95" refid="8259_8c_1adda76540a4a9d97a033b99f0bc42cf0b" refkind="member"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="8259_8c_1adda76540a4a9d97a033b99f0bc42cf0b" kindref="member">irqDisable_old</ref>(<ref refid="include_2sys_2types_8h_1af7b042408b9b104606f8a9b5035329f3" kindref="member">u_int16_t</ref><sp/>irqNo)<sp/>{</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/>irqMask<sp/>|=<sp/>(1<sp/>&lt;&lt;<sp/>irqNo);</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((irqMask<sp/>&amp;<sp/>0xFF00)<sp/>==<sp/>0xFF00)<sp/>{</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/>irqMask<sp/>|=<sp/>(1<sp/>&lt;&lt;<sp/>2);</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1a0195451428bc646f820202dc15f25d9f" kindref="member">mPic</ref><sp/>+<sp/>1,<sp/>irqMask<sp/>&amp;<sp/>0xFF);</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(<ref refid="8259_8h_1a7d4efc593ecc4ace3d92e1f4ee919b99" kindref="member">sPic</ref><sp/>+<sp/>1,<sp/>(irqMask<sp/>&gt;&gt;<sp/>8)<sp/>&amp;<sp/>0xFF);</highlight></codeline>
<codeline lineno="102"><highlight class="normal">}</highlight></codeline>
<codeline lineno="103"><highlight class="normal"></highlight></codeline>
<codeline lineno="104" refid="8259_8c_1ad53c4c3d65338bf63d4efd4da1cf7703" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="8259_8c_1ad53c4c3d65338bf63d4efd4da1cf7703" kindref="member">irqDisable</ref>(<ref refid="include_2sys_2types_8h_1a281b4b5562236420969a830503b0ba19" kindref="member">uint16_t</ref><sp/>irqNo)<sp/>{</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a281b4b5562236420969a830503b0ba19" kindref="member">uint16_t</ref><sp/>port;</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><ref refid="include_2sys_2types_8h_1a2aff71146ab4942b2b38860c749c4074" kindref="member">uint8_t</ref><sp/>value;</highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(irqNo<sp/>&lt;<sp/>8)<sp/>{</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/>port<sp/>=<sp/><ref refid="8259_8h_1ab5e84ca4c143a8b9a34b575201aaffd5" kindref="member">mImr</ref>;</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/>port<sp/>=<sp/><ref refid="8259_8h_1a13b25eb31f4b435fdb1ed81c10b07315" kindref="member">sImr</ref>;</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/>irqNo<sp/>-=<sp/>8;</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/>value<sp/>=<sp/><ref refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(port)<sp/>|<sp/>(1<sp/>&lt;&lt;<sp/>irqNo);</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(port,<sp/>value);</highlight></codeline>
<codeline lineno="117"><highlight class="normal">}</highlight></codeline>
<codeline lineno="118"><highlight class="normal"></highlight></codeline>
<codeline lineno="119"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline>
<codeline lineno="120"><highlight class="comment"><sp/>END</highlight></codeline>
<codeline lineno="121"><highlight class="comment"><sp/>***/</highlight><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/isa/8259.c"/>
  </compounddef>
</doxygen>
