public static void Main() { m_sampleSimpleStateMachine = new SampleSimpleStateMachineNETMF(); GPIOButtonInputProvider buttonInputProvider = new GPIOButtonInputProvider(GPIOButtonInputProvider_ButtonInput); Dispatcher.Run(); }
public ButtonPad(GPIOButtonInputProvider sink, Button button, Cpu.Pin pin) { m_sink = sink; m_button = button; m_buttonDevice = InputManager.CurrentInputManager.ButtonDevice; // Do not set an InterruptPort with GPIO_NONE. if (pin != Cpu.Pin.GPIO_NONE) { // When this GPIO pin is true, call the Interrupt method. m_port = new InterruptPort(pin, true, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeBoth); m_port.OnInterrupt += new NativeEventHandler(this.Interrupt); } }
public static void Main() { GPIOButtonInputProvider buttonInputProvider = new GPIOButtonInputProvider(GPIOButtonInputProvider_ButtonInput); Dispatcher.Run(); }