Adapting nRF24L01p sample to Bluepill

Dependencies:   mbed-STM32F103C8T6 mbed nRF24L01P

Fork of nRF24L01P_Hello_World by Owen Edwards

Still under tests

Used for frameworks evaluations : https://hackaday.io/project/21045-stm32-bluepill-frameworks-evaluation

Target HW : https://hackaday.io/project/21396-stm32-blue-pill-iot-expansion-boards

Revision:
2:0315a394b1a3
Parent:
1:5be2682710c6
--- a/main.cpp	Wed Jan 19 23:53:19 2011 +0000
+++ b/main.cpp	Mon May 01 08:48:24 2017 +0000
@@ -1,14 +1,17 @@
+#include "stm32f103c8t6.h"
 #include "mbed.h"
 #include "nRF24L01P.h"
 
 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_12, PA_8, PA_9);    // mosi, miso, sck, csn, ce, irq
 
 DigitalOut myled1(LED1);
-DigitalOut myled2(LED2);
+//DigitalOut myled2(LED2);
 
-int main() {
+int main() 
+{
+    confSysClock();     //Configure system clock (72MHz HSE clock, 48MHz USB clock)
 
 // The nRF24L01+ supports transfers from 1 to 32 bytes, but Sparkfun's
 //  "Nordic Serial Interface Board" (http://www.sparkfun.com/products/9019)
@@ -69,7 +72,7 @@
             }
 
             // Toggle LED2 (to help debug nRF24L01+ -> Host communication)
-            myled2 = !myled2;
+            //myled2 = !myled2;
         }
     }
 }