public static void Strobe(SerialPort sp, byte dataToWrite) { Serial.SelectRf(sp); Serial.WaitMISO(sp); Serial.SPITransfer(sp, dataToWrite); Serial.DeselectRf(sp); }
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); }
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); }