Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. ## Write to registry on chip
  2.  
  3. Serial.print("frequency: ");
  4. Serial.println(frequency);
  5.  
  6. // frequency: 1422114
  7.  
  8. /* 0x07 */ {REG_FRFMSB, (uint8_t)(frequency >> 16)},
  9. /* 0x08 */ {REG_FRFMID, (uint8_t)(frequency >> 8)},
  10. /* 0x09 */ {REG_FRFLSB, (uint8_t)(frequency)},
  11.  
  12.  
  13.  
  14. ## Read from registry on chip
  15.  
  16. frequency = (
  17.     ((uint32_t)readReg(REG_FRFMSB) << 16) +
  18.     ((uint16_t)readReg(REG_FRFMID) << 8) +
  19.     (uint8_t)readReg(REG_FRFLSB)
  20. )
  21.  
  22.  
  23. Serial.print("frequency: ");
  24. Serial.println(frequency);
  25.  
  26. // frequency: 16777215
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement