Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. void initWireless() {
  2.  
  3. //Initialize NRF24L01+ on channel 15 and 32bytes of payload
  4. //By default 2Mbps data rate and 0dBm output power
  5. //NRF24L01 goes to RX mode by default
  6. TM_NRF24L01_Init(15, 32);
  7.  
  8. //Set RF settings, Data rate to 2Mbps, Output power to -18dBm
  9. TM_NRF24L01_SetRF(TM_NRF24L01_DataRate_2M, TM_NRF24L01_OutputPower_0dBm);
  10.  
  11. //Set my address, 5 bytes
  12. TM_NRF24L01_SetMyAddress(MyAddress);
  13. //Set TX address, 5 bytes
  14. TM_NRF24L01_SetTxAddress(TxAddress);
  15.  
  16.  
  17. /*Configurazione interfaccia wireless (impostata staticamente)*/
  18. interf_context[1].buffer.content = NULL;
  19. interf_context[1].interface_type = SINGLE;
  20. interf_context[1].interface_nature = nRF24L01;
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement