Added pin descriptions for NUCLEO-F303RE. Tested

Fork of FastPWM by Erik -

Revision:
13:cdefd9d75b64
Child:
15:49a7eff133b3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Device/FastPWM_STM_TIM_PinOut.cpp	Sun Jul 20 19:49:43 2014 +0000
@@ -0,0 +1,47 @@
+#include "mbed.h"
+
+#ifdef TARGET_NUCLEO_F030R8
+__IO uint32_t* getChannel(TIM_TypeDef* pwm, PinName pin) {
+    switch (pin) {
+        // Channels 1
+        case PA_4: case PA_6: case PB_1: case PB_4: case PB_8: case PB_9: case PB_14: case PC_6: case PB_6: case PB_7:
+            return &pwm->CCR1;
+            
+        // Channels 2
+        case PA_7: case PB_5: case PC_7:
+            return &pwm->CCR2;
+            
+        // Channels 3
+        case PB_0: case PC_8:
+            return &pwm->CCR3;
+            
+        // Channels 4
+        case PC_9:
+            return &pwm->CCR4;
+    }        
+    return NULL;
+}
+#endif
+
+#ifdef TARGET_NUCLEO_F401RE
+__IO uint32_t* getChannel(TIM_TypeDef* pwm, PinName pin) {
+    switch (pin) {
+        // Channels 1
+        case PA_0: case PA_5: case PA_6: case PA_8: case PA_15: case PB_4: case PB_6: case PC_6: case PA_7: case PB_13:
+            return &pwm->CCR1;
+        
+        // Channels 2
+        case PA_1: case PA_9: case PB_3: case PB_5: case PB_7: case PC_7: case PB_0: case PB_14:
+            return &pwm->CCR2;
+            
+        // Channels 3
+        case PA_2: case PA_10: case PB_8: case PB_10: case PC_8: case PB_1: case PB_15:
+            return &pwm->CCR3;
+ 
+        // Channels 4
+        case PA_3: case PA_11: case PB_9: case PC_9: 
+            return &pwm->CCR4;
+    }
+    return NULL;
+}
+#endif
\ No newline at end of file