Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: RC_Green Drown RC_RX
Diff: nRF24L01P.cpp
- Revision:
- 1:c41959327807
- Parent:
- 0:4caead137300
- Child:
- 2:bee3d3ba881f
--- a/nRF24L01P.cpp Mon Dec 09 03:07:01 2019 +0000
+++ b/nRF24L01P.cpp Mon Dec 09 06:23:05 2019 +0000
@@ -1,5 +1,6 @@
#include "nRF24L01P.h"
+
uint8_t NRF24L01_RXDATA[32];
uint8_t NRF24L01_TXDATA[32];
static uint8_t TX_ADDRESS[5]= {0x00,0x00,0x00,0x00,0x08};
@@ -90,6 +91,8 @@
spi_.frequency(9000000);
spi_.format(8,0);
wait_us(4); // Wait for Power-on reset
+ NRF24L01_Init(40,1);
+ NRF24L01_Check();
}
@@ -170,3 +173,16 @@
// }
NRF_Write_Reg(NRF_WRITE_REG + NRFRegSTATUS, status);//Çå³ýÖжϱê־λ
}
+void nRF24L01P::Nrf_Connect(void)//500HZ
+{
+ Nrf_Erro++;
+ if(Nrf_Erro%50==0)
+ {
+ NRF24L01_IRQ();
+ }
+ if(Nrf_Erro>=500)
+ {
+ Nrf_Erro = 1;
+ }
+}
+