Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public GpioPin(int address, GpioType type)
 {
     this.Type        = type;
     this.GpioAddress = address;
     this.GpioValue   = false;
 }