private void Gpio_Closing(object sender, CancelEventArgs e) { _close = true; _thread.Join(); _gpio.ExitSuperIo(); e.Cancel = false; Console.WriteLine("gpio tool exit..."); }
private void Init() { _gpio = new Gpio(); bool initResult = _gpio.Initialize(); if (!initResult) { error.Visibility = Visibility.Visible; mode_btn.IsEnabled = false; out_btn.IsEnabled = false; } else { _gpio.InitSuperIO(); chip_type.Content = _gpio.GetChipName(); _gpio.InitGpioReg(); InitGpioModeAndVal(); _gpio.ExitSuperIo(); AddTextChangeEvent(); chip_type.Visibility = Visibility.Visible; chip_name.Visibility = Visibility.Visible; } }
private void Gpio_Closing(object sender, CancelEventArgs e) { GPIO.ExitSuperIo(); e.Cancel = false; Console.WriteLine("gpio tool exit..."); }