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

Files at this revision

API Documentation at this revision

Comitter:
wassfila
Date:
Mon May 01 08:48:24 2017 +0000
Parent:
1:5be2682710c6
Commit message:
Adapting the nRF sample to the Blue pill STM32F103C8T6

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-STM32F103C8T6.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 5be2682710c6 -r 0315a394b1a3 main.cpp
--- 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;
         }
     }
 }
diff -r 5be2682710c6 -r 0315a394b1a3 mbed-STM32F103C8T6.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-STM32F103C8T6.lib	Mon May 01 08:48:24 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/hudakz/code/mbed-STM32F103C8T6/#9fbbea76d6f6
diff -r 5be2682710c6 -r 0315a394b1a3 mbed.bld
--- a/mbed.bld	Wed Jan 19 23:53:19 2011 +0000
+++ b/mbed.bld	Mon May 01 08:48:24 2017 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e
+https://mbed.org/users/mbed_official/code/mbed/builds/794e51388b66
\ No newline at end of file