public static void WriteByte(this LedDriver driver, byte value) { for (int i = 0; i < 8; i++) { int bit = value & 0x80; value <<= 1; driver.WriteBit(bit != 0); } }
public static void WriteBit(this LedDriver driver, bool value) { driver.WriteBit(value ? PinValue.High : PinValue.Low); }