Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: qonly_controller foc-ed_in_the_bot_compact foc-ed_in_the_bot_compact CurrentModeSine ... more
Fork of FastPWM by
Revision 19:ba7a5bf634b3, committed 2014-11-10
- Comitter:
- Sissors
- Date:
- Mon Nov 10 16:36:19 2014 +0000
- Parent:
- 18:d91c0629e4e6
- Child:
- 20:3c609bc4ae9c
- Commit message:
- Added F334 (Untested but requested, hey that rhymes).
Changed in this revision
| Device/FastPWM_STM_TIM_PinOut.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Device/FastPWM_STM_TIM_PinOut.cpp Sat Oct 04 20:54:56 2014 +0000
+++ b/Device/FastPWM_STM_TIM_PinOut.cpp Mon Nov 10 16:36:19 2014 +0000
@@ -67,4 +67,29 @@
}
return NULL;
}
+#endif
+
+#ifdef TARGET_NUCLEO_F334R8
+__IO uint32_t* getChannel(TIM_TypeDef* pwm, PinName pin) {
+ switch (pin) {
+ // Channels 1
+ case PA_2: case PA_6: case PA_7: case PA_8: case PA_12: case PB_4: case PB_5: case PB_8: case PB_9: case PB_14: case PC_0: case PC_6:
+ case PA_1: case PA_13: case PB_6: case PB_13: case PC_13:
+ return &pwm->CCR1;
+
+ // Channels 2
+ case PA_3: case PA_4: case PA_9: case PB_15: case PC_1: case PC_7:
+ return &pwm->CCR2;
+
+ // Channels 3
+ case PA_10: case PB_0: case PC_2: case PC_8:
+ case PF_0:
+ return &pwm->CCR3;
+
+ // Channels 4
+ case PA_11: case PB_1: case PB_7: case PC_3: case PC_9:
+ return &pwm->CCR4;
+ }
+ return NULL;
+}
#endif
\ No newline at end of file
