Beispiel #1
0
 public bool Read()
 {
     lock (_syncRoot)
     {
         var value = _connection.Read();
         //Logger.Log(_pin + " < " + value);
         return(value);
     }
 }
Beispiel #2
0
 private void SendData(uint data)
 {
     // Send 16 bit data
     for (int i = 0; i < 16; i++)
     {
         bool state = ((data & 0x8000) > 0);
         dataPin.Write(state);
         state = !clockPin.Read();
         clockPin.Write(state);
         data <<= 1;
     }
 }