// Construct the object. Set this class to handle the emulated
            // hardware's button interrupts.
            public ButtonPad(GPIOButtonInputProvider sink, Button button, Cpu.Pin pin)
            {
                this.sink   = sink;
                this.button = button;

                // When this GPIO pin is true, call the Interrupt method.
                port              = new InterruptPort(pin, true, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeBoth);
                port.OnInterrupt += new NativeEventHandler(this.Interrupt);
            }
Пример #2
0
        public static void Main()
        {
            FirstWindow firstWindow = new FirstWindow();

            // Create the object that configures the GPIO pins to buttons.
            GPIOButtonInputProvider inputProvider = new GPIOButtonInputProvider(null);

            Application myApplication = new Application();
            // Start the application
            myApplication.Run(firstWindow);
        }
        public static void Main()
        {
            FirstWindow firstWindow = new FirstWindow();

            // Create the object that configures the GPIO pins to buttons.
            GPIOButtonInputProvider inputProvider = new GPIOButtonInputProvider(null);

            Application myApplication = new Application();

            // Start the application
            myApplication.Run(firstWindow);
        }
            // Construct the object. Set this class to handle the emulated
            // hardware's button interrupts.
            public ButtonPad(GPIOButtonInputProvider sink, Button button, Cpu.Pin pin)
            {
                this.sink = sink;
                this.button = button;

                // When this GPIO pin is true, call the Interrupt method.
                port = new InterruptPort(pin, true, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeBoth);
                port.OnInterrupt += new NativeEventHandler(this.Interrupt);
            }