예제 #1
0
        private void sw_spi_init()
        {
            var gpio = GpioController.GetDefault();

            if (gpio != null)
            {
                SWSpiDataPin = gpio.OpenPin(DataPin);
                SWSpiDataPin.Write(GpioPinValue.Low);
                SWSpiDataPin.SetDriveMode(GpioPinDriveMode.Output);

                SWSpiClockPin = gpio.OpenPin(ClockPin);
                SWSpiClockPin.Write(GpioPinValue.Low);
                SWSpiClockPin.SetDriveMode(GpioPinDriveMode.Output);
            }
        }
예제 #2
0
 private void sw_spi_end()
 { // Stop 'soft' SPI
     SWSpiDataPin.SetDriveMode(GpioPinDriveMode.Input);
     SWSpiClockPin.SetDriveMode(GpioPinDriveMode.Input);
 }