Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.83 KB | None | 0 0
  1. RFM12B_t *RFM12B = RFM12B_new(SPIsendByte, CS_LOW, CS_HIGH);
  2.     if(Status_Ok != RFM12B->reset(RFM12B))
  3.     {
  4.         while(1);
  5.     }
  6.     RFM12B->frequency(RFM12B, 868000000);
  7.     RFM12B->dataRate(RFM12B, RFM12B_DataRate_9600);
  8.     RFM12B->receiverControl(RFM12B, (RFM12B_receiverControl_t){
  9.                                     .pin16Function = 1,
  10.                                     .VDI = VDI_Fast,
  11.                                     .LNA_gain = LNA_Gain_0,
  12.                                     .RSSI_threshold = RSSI_threshold_103,
  13.                                     .BW = BW_134});
  14.     RFM12B->powerManagment(RFM12B, (RFM12B_powerManagment_t){
  15.                                     .enRx = 1,
  16.                                     .enBaseband = 1,
  17.                                     .enOsc = 1,
  18.                                     .enSynth = 1,
  19.                                     .enPLL_PA_TX = 1,
  20.                                     .disClockOut = 1});
  21.     RFM12B->configuration(RFM12B, (RFM12B_configurationSet_t){
  22.                                     .frequencyBand = frequencyBand_868,
  23.                                     .crystalLoadCap = 0,
  24.                                     .enFifoMode = 1,
  25.                                     .enIntDataReg = 1});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement