Exemple #1
0
        public static void Main()
        {
            m_sampleSimpleStateMachine = new SampleSimpleStateMachineNETMF();
            GPIOButtonInputProvider buttonInputProvider = new GPIOButtonInputProvider(GPIOButtonInputProvider_ButtonInput);

            Dispatcher.Run();
        }
Exemple #2
0
            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);
                }
            }
Exemple #3
0
        public static void Main()
        {
            GPIOButtonInputProvider buttonInputProvider = new GPIOButtonInputProvider(GPIOButtonInputProvider_ButtonInput);

            Dispatcher.Run();
        }