Delay() public static method

public static Delay ( ) : void
return void
示例#1
0
        public static void DisableAllIRQs()
        {
            MasterIRQMask = (byte)0xFF;

            IO.WriteByte(IO.Port.Master_PIC_DataPort, MasterIRQMask);
            IO.Delay();

            SlaveIRQMask = (byte)0xFF;

            IO.WriteByte(IO.Port.Slave_PIC_DataPort, SlaveIRQMask);
            IO.Delay();
        }
示例#2
0
        public static void Setup()
        {
            byte mask1, mask2;

            // save masks
            mask1 = IO.ReadByte(IO.Port.Master_PIC_DataPort);
            mask2 = IO.ReadByte(IO.Port.Slave_PIC_DataPort);


            // Remap the IRQ
            IO.WriteByte(IO.Port.Master_PIC_CommandPort, MasterICW1);
            IO.Delay();

            IO.WriteByte(IO.Port.Master_PIC_DataPort, MasterIRQBase);
            IO.Delay();

            IO.WriteByte(IO.Port.Master_PIC_DataPort, MasterICW3);
            IO.Delay();

            IO.WriteByte(IO.Port.Master_PIC_DataPort, MasterICW4);
            IO.Delay();


            IO.WriteByte(IO.Port.Slave_PIC_CommandPort, SlaveICW1);
            IO.Delay();

            IO.WriteByte(IO.Port.Slave_PIC_DataPort, SlaveIRQBase);
            IO.Delay();

            IO.WriteByte(IO.Port.Slave_PIC_DataPort, SlaveICW3);
            IO.Delay();

            IO.WriteByte(IO.Port.Slave_PIC_DataPort, SlaveICW4);
            IO.Delay();


            // restore saved masks.
            IO.WriteByte(IO.Port.Master_PIC_DataPort, mask1);
            IO.WriteByte(IO.Port.Slave_PIC_DataPort, mask2);

            DisableAllIRQs();
        }