nucleo version

Fork of PololuLedStrip by David Grayson

Revision:
22:7a2bda46a606
Parent:
19:46d7ab0ba3e7
Child:
23:aa89fb2a5769
diff -r 87fd6273e0ff -r 7a2bda46a606 PololuLedStrip.cpp
--- a/PololuLedStrip.cpp	Tue Nov 26 23:05:08 2013 +0000
+++ b/PololuLedStrip.cpp	Wed Dec 24 18:15:59 2014 +0000
@@ -1,4 +1,5 @@
 #include "PololuLedStrip.h"
+extern Serial pc;
 
 bool PololuLedStrip::interruptFriendly = false;
 
@@ -25,8 +26,10 @@
         // running; the most likely explanation is some kind of flash caching that affects the timing.
         // If you ever change these numbers, it is important to check the the subtractions below
         // will not overflow in the worst case (smallest possible f_mhz).
-        led_strip_write_delays[0] = 750*f_mhz/1000 - 33;
-        led_strip_write_delays[1] = 550*f_mhz/1000 - 20;    
+        //led_strip_write_delays[0] = 750*f_mhz/1000 - 33;
+        //led_strip_write_delays[1] = 550*f_mhz/1000 - 20;    
+        led_strip_write_delays[0] = 28; // for Nucleo F411RE
+        led_strip_write_delays[1] = 20;    
     }
  
     // Convert from units of cycles to units of half-cycles; it makes the assembly faster.   
@@ -38,7 +41,8 @@
 
 PololuLedStrip::PololuLedStrip(PinName pinName)
 {
-    gpio_init(&gpio, pinName, PIN_OUTPUT);
+//    gpio_init(&gpio, pinName, PIN_OUTPUT);
+    gpio_init_out(&gpio, pinName); // for Nucleo F411RE
 }
 
 void PololuLedStrip::write(rgb_color * colors, unsigned int count)