
An implementation to use for nrf24 with STM32F303RE.
Diff: main.cpp
- Revision:
- 2:4e8ad65c48b4
- Parent:
- 1:5be2682710c6
--- a/main.cpp Wed Jan 19 23:53:19 2011 +0000 +++ b/main.cpp Wed Jan 20 04:15:24 2021 +0000 @@ -3,7 +3,7 @@ Serial pc(USBTX, USBRX); // tx, rx -nRF24L01P my_nrf24l01p(p5, p6, p7, p8, p9, p10); // mosi, miso, sck, csn, ce, irq +nRF24L01P my_nrf24l01p(PB_15, PB_14, PB_13, PB_1, PB_2, PC_4); // mosi, miso, sck, csn, ce, irq DigitalOut myled1(LED1); DigitalOut myled2(LED2); @@ -13,12 +13,12 @@ // The nRF24L01+ supports transfers from 1 to 32 bytes, but Sparkfun's // "Nordic Serial Interface Board" (http://www.sparkfun.com/products/9019) // only handles 4 byte transfers in the ATMega code. -#define TRANSFER_SIZE 4 +#define TRANSFER_SIZE 1 char txData[TRANSFER_SIZE], rxData[TRANSFER_SIZE]; int txDataCnt = 0; int rxDataCnt = 0; - + my_nrf24l01p.powerUp(); // Display the (default) setup of the nRF24L01+ chip