WaitMISO() public static method

public static WaitMISO ( SerialPort sp ) : bool
sp System.IO.Ports.SerialPort
return bool
Example #1
0
 public static void Strobe(SerialPort sp, byte dataToWrite)
 {
     Serial.SelectRf(sp);
     Serial.WaitMISO(sp);
     Serial.SPITransfer(sp, dataToWrite);
     Serial.DeselectRf(sp);
 }
Example #2
0
 public static void WriteRegister(SerialPort sp, byte registerAddress, byte dataToWrite)
 {
     Serial.SelectRf(sp);
     Serial.WaitMISO(sp);
     Serial.SPITransfer(sp, registerAddress);
     Serial.SPITransfer(sp, dataToWrite);
     Serial.DeselectRf(sp);
 }
Example #3
0
 public static void WriteBurstRegister(SerialPort sp, byte registerAddress, byte[] buffer)
 {
     Serial.SelectRf(sp);
     Serial.WaitMISO(sp);
     Serial.SPITransfer(sp, (byte)(registerAddress | CCRegister.WRITE_BURST));
     foreach (byte dataToTransfer in buffer)
     {
         Serial.SPITransfer(sp, dataToTransfer);
     }
     Serial.DeselectRf(sp);
 }