public static void ShowGpioState(GpioType type, int gpio, bool state) { byte gpioState = 1; gpioState <<= gpio; if (state) { buffer[(int)type] |= gpioState; } else { buffer[(int)type] &= (byte)~gpioState; } SR_OUTPUT_ENABLE.Write(true); ShiftOut(buffer[0]); PulsePin(SR_LATCH); ShiftOut(buffer[1]); PulsePin(SR_LATCH); SR_OUTPUT_ENABLE.Write(false); }
public GpioPin(int address, GpioType type) { this.Type = type; this.GpioAddress = address; this.GpioValue = false; }