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.
Fork of FastPWM by
Revision 25:8b1bf34c72aa, committed 2015-09-30
- Comitter:
- alpsayin
- Date:
- Wed Sep 30 20:46:18 2015 +0000
- Parent:
- 24:1f451660d8c0
- Commit message:
- added pins for ST32F303RE
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 Jun 20 20:03:16 2015 +0000
+++ b/Device/FastPWM_STM_TIM_PinOut.cpp Wed Sep 30 20:46:18 2015 +0000
@@ -1,5 +1,36 @@
#include "mbed.h"
+#ifdef TARGET_NUCLEO_F303RE
+__IO uint32_t* getChannel(TIM_TypeDef* pwm, PinName pin) {
+ switch (pin) {
+ // Channels 1
+ case PC_0: case PB_8: case PB_9: case PA_6: case PA_8: case PB_4: case PB_5: case PA_2: case PC_6: case PA_12: case PB_14: case PB_15:
+ // Channels 1N
+ case PA_1: case PA_5: case PB_6: case PB_3: case PA_13: case PB_7: case PC_13:
+ return &pwm->CCR1;
+
+ // Channels 2
+ case PC_1: case PA_7: case PC_7: case PA_9: case PA_3: case PA_14:
+ // Channels 2N
+ case PB_0:
+ return &pwm->CCR2;
+
+ // Channels 3
+ case PA_10: case PC_2: case PC_8:
+ // Channels 3N
+ case PB_1:
+ return &pwm->CCR3;
+
+ // Channels 4
+ case PC_3: case PC_9: case PA_11:
+ // Channels 4N
+
+ return &pwm->CCR4;
+ }
+ return NULL;
+}
+#endif
+
#ifdef TARGET_NUCLEO_F030R8
__IO uint32_t* getChannel(TIM_TypeDef* pwm, PinName pin) {
switch (pin) {
