コード例 #1
0
            /// <summary>
            /// Constructs the ButtonPad object and sets the ButtonPad class to
            /// handle the emulated hardware's button interrupts.
            /// </summary>
            /// <param name="sink"></param>
            /// <param name="button"></param>
            /// <param name="pin"></param>
            public ButtonPad(GPIOButtonInputProvider sink, Button button,
                             Cpu.Pin pin)
            {
                this.sink         = sink;
                this.button       = button;
                this.buttonDevice = InputManager.CurrentInputManager.ButtonDevice;

                // 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
ファイル: Program.cs プロジェクト: koson/.NETMF_for_LPC17xx
        /// <summary>
        /// The executable entry point.
        /// </summary>
        public static void Main()
        {
            // Create a new program object.
            MyTemperature myApplication = new MyTemperature();

            // Create the main window.
            Window mainWindow = myApplication.CreateWindow();

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

            // Start the application.
            myApplication.Run(mainWindow);
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: leeholder/Netduino_SDK
        /// <summary>
        /// The executable entry point.
        /// </summary>
        public static void Main()
        {
            // Create a new program object.
            MyTemperature myApplication = new MyTemperature();

            // Create the main window.
            Window mainWindow = myApplication.CreateWindow();

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

            // Start the application.
            myApplication.Run(mainWindow);
        }
コード例 #4
0
            /// <summary>
            /// Constructs the ButtonPad object and sets the ButtonPad class to 
            /// handle the emulated hardware's button interrupts.
            /// </summary>
            /// <param name="sink"></param>
            /// <param name="button"></param>
            /// <param name="pin"></param>
            public ButtonPad(GPIOButtonInputProvider sink, Button button,
                Cpu.Pin pin)
            {
                this.sink = sink;
                this.button = button;
                this.buttonDevice = InputManager.CurrentInputManager.ButtonDevice;

                // 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);
            }