|
F51可以支持基于2.4G的互相通信、與NRF24LE1的通信、與NRF24LU1的通信、與NRF24L01的通信。
一、nRF51822基于2.4G和nRF51822通信
其中nRF51互相通信和之前用51操作nRF24L01很像,涉及到的只有幾個核心的函數(shù):
o nrf_esb_init---初始化ESB
o nrf_esb_enable---使能ESB
o nrf_esb_add_packet_to_tx_fifo---將數(shù)據(jù)送入發(fā)送隊列
如果想知道發(fā)送是否成功等狀態(tài)可以用:
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)
整個架構(gòu)比較簡單:技術(shù)支持:13682455391:2355239042
4.png (59.32 KB, 下載次數(shù): 41)
下載附件
2019-2-21 09:34 上傳
|
|