Added pin descriptions for NUCLEO-F303RE. Tested

Fork of FastPWM by Erik -

Files at this revision

API Documentation at this revision

Comitter:
Sissors
Date:
Thu Jul 12 19:26:43 2012 +0000
Parent:
1:1aed61747ed6
Child:
3:3094d3806cfc
Commit message:
ms and us functions were multiplying by 1k(k) instead of dividing

Changed in this revision

FastPWM.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/FastPWM.cpp	Thu Jul 12 11:23:31 2012 +0000
+++ b/FastPWM.cpp	Thu Jul 12 19:26:43 2012 +0000
@@ -28,15 +28,15 @@
 }
 
 void FastPWM::period_ms(int ms) {
-    period((double)ms*1000.0);
+    period((double)ms/1000.0);
 }
 
 void FastPWM::period_us(int us) {
-    period((double)us*1000000.0);
+    period((double)us/1000000.0);
 }
 
 void FastPWM::period_us(double us) {
-    period(us*1000000.0);
+    period(us/1000000.0);
 }
 
 void FastPWM::pulsewidth(double seconds) {
@@ -44,15 +44,15 @@
 }
 
 void FastPWM::pulsewidth_ms(int ms) {
-    pulsewidth((double)ms*1000.0);
+    pulsewidth((double)ms/1000.0);
 }
 
 void FastPWM::pulsewidth_us(int us) {
-    pulsewidth((double)us*1000000.0);
+    pulsewidth((double)us/1000000.0);
 }
 
 void FastPWM::pulsewidth_us(double us) {
-    pulsewidth(us*1000000.0);
+    pulsewidth(us/1000000.0);
 }
 
 void FastPWM::write(double duty) {