F51可以支持基于2.4G的互相通信、與NRF24LE1的通信、與NRF24LU1的通信、與NRF24L01的通信。
一、nRF51822基于2.4G和nRF51822通信
其中nRF51互相通信和之前用51操作nRF24L01很像,涉及到的只有幾個核心的函數:
o nrf_esb_init---初始化ESB
o nrf_esb_enable---使能ESB
o nrf_esb_add_packet_to_tx_fifo---將數據送入發送隊列
如果想知道發送是否成功等狀態可以用:
o void nrf_esb_tx_success(uint32_t tx_pipe, int32_t rssi)// If an ACK was received, we send another packet.
o void nrf_esb_tx_failed(uint32_t tx_pipe)
o void nrf_esb_rx_data_ready(uint32_t rx_pipe, int32_t rssi)
o void nrf_esb_disabled(void)
整個架構比較簡單:技術支持:13682455391:2355239042
4.png (59.32 KB, 下載次數: 41)
下載附件
2019-2-21 09:34 上傳
|