Example #1
0
 internal void InterruptFalling(GpioEnum EventPin, bool EventState, DateTime Time, EventData Data)
 {
     if (EventPin == IO.BeagleBone.Pin.PinToGPIO(this.Pin))
     {
         InputInterrupt Event = new InputInterrupt(Data.EvState);
         this.FallingHandlers?.Invoke(this, Event);
         this.IntPortFall.ClearInterrupt();
     }
 }
Example #2
0
        internal void InterruptAny()
        {
            InputInterrupt Event = new InputInterrupt(GetInput());

            this.AnyHandlers?.Invoke(this, Event);
        }
Example #3
0
        // Extra methods from Science code:

        /*
         * internal static void TestSPI()
         * {
         *  IDigitalOut CS_Thermo = new DigitalOutPi(7);
         *  MAX31855 Thermo = new MAX31855(new SPIBusPi(0), CS_Thermo);
         *  Log.SetSingleOutputLevel(Log.Source.SENSORS, Log.Severity.DEBUG);
         *  for (int i = 0; i < 100; i++)
         *  {
         *      Thermo.UpdateState();
         *      Log.Output(Log.Severity.DEBUG, Log.Source.SENSORS, "Thermocouple Data, Faults: " + string.Format("{0:G}", Thermo.GetFaults()) + ", Internal: " + Thermo.GetInternalTemp() + ", External: " + Thermo.GetExternalTemp() + " (Raw: " + Thermo.GetRawData() + ")");
         *      Thread.Sleep(500);
         *  }
         * }
         *
         * internal static void TestUART()
         * {
         *  IUARTBus UART = new UARTBusPi(0, 9600);
         *  for (byte i = 0; i < 255; i++)
         *  {
         *      UART.Write(new byte[] { i });
         *      Thread.Sleep(250);
         *  }
         * }
         *
         * internal static void TestI2C()
         * {
         *  II2CBus Bus = new I2CBusPi();
         *  VEML6070 UV = new VEML6070(Bus);
         *  Log.SetSingleOutputLevel(Log.Source.SENSORS, Log.Severity.DEBUG);
         *  for (int i = 0; i < 50; i++)
         *  {
         *      UV.UpdateState();
         *      Log.Output(Log.Severity.DEBUG, Log.Source.SENSORS, "UV Reading: " + UV.GetData());
         *      Thread.Sleep(200);
         *  }
         * }
         */

        public static void GetInterrupt(object senser, InputInterrupt evt) => Log.Output(Log.Severity.INFO, Log.Source.HARDWAREIO, "Interrupt Received! Now " + evt.NewState);
Example #4
0
        internal void InterruptFalling()
        {
            InputInterrupt Event = new InputInterrupt(GetInput());

            this.FallingHandlers?.Invoke(this, Event);
        }
Example #5
0
 public static void GetInterrupt(object Senser, InputInterrupt Event)
 {
     Log.Output(Log.Severity.DEBUG, Log.Source.HARDWAREIO, "Interrupt Received! Now " + Event.NewState);
 }