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); } }
private void sw_spi_end() { // Stop 'soft' SPI SWSpiDataPin.SetDriveMode(GpioPinDriveMode.Input); SWSpiClockPin.SetDriveMode(GpioPinDriveMode.Input); }