public ButtonPad(GPIOButtonInputProvider sink, Button button, Cpu.Pin pin, Port.InterruptMode mode) { _sink = sink; _button = button; _buttonDevice = InputManager.CurrentInputManager.ButtonDevice; _port = new InterruptPort( pin, true, Port.ResistorMode.PullUp, mode ); _port.OnInterrupt += new NativeEventHandler(this.Interrupt); }
public ButtonPad(GPIOButtonInputProvider sink, Button button, Cpu.Pin pin, Port.InterruptMode mode) { _sink = sink; _button = button; _buttonDevice = InputManager.CurrentInputManager.ButtonDevice; _port = new InterruptPort(pin, true, Port.ResistorMode.PullUp, mode); _port.OnInterrupt += new NativeEventHandler(this.Interrupt); }
public static void Main() { GPIOButtonInputProvider inputProvider = new GPIOButtonInputProvider(null); SampleApplication myApplication = new SampleApplication(); Window mainWindow = myApplication.CreateUI(); mainWindow.Background = new SolidColorBrush(Colors.Black); mainWindow.Visibility = Visibility.Visible; myApplication.Run(mainWindow); }
public static void Main() { GPIOButtonInputProvider inputProvider = new GPIOButtonInputProvider(null); SampleApplication myApplication = new SampleApplication(); Window mainWindow = myApplication.CreateUI(); mainWindow.Background = new SolidColorBrush(Colors.Black); mainWindow.Visibility = Visibility.Visible; myApplication.Run(mainWindow); }