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:
- 2:bee3d3ba881f
- Parent:
- 1:c41959327807
- Child:
- 4:756125f83a27
--- a/nRF24L01P.cpp Mon Dec 09 06:23:05 2019 +0000
+++ b/nRF24L01P.cpp Tue Dec 10 00:13:53 2019 +0000
@@ -79,6 +79,24 @@
ledtick=0;
}
}
+void nRF24L01P::NRF_Send_TX(int * tx_buf, uint8_t len)
+{
+ uint8_t i;
+ uint8_t tx_buff[32];
+ for(i=0;i<len;i++)
+ tx_buff[i]=tx_buf[i]&0xFF;
+ nRF24L01P::NRF24L01_Set_TX();
+ ce_=0;
+ nRF24L01P::NRF_Write_Buf(WR_TX_PLOAD, tx_buf, len);
+ ce_=1;
+ wait_us(10);
+ ledtick++;
+ if(ledtick>=50)
+ {
+ check_led=!check_led;
+ ledtick=0;
+ }
+}
nRF24L01P::nRF24L01P(PinName mosi,
PinName miso,
PinName sck,