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.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 3:a6e155687c6a
- Parent:
- 2:c5f455885df7
- Child:
- 5:bc710d77d801
diff -r c5f455885df7 -r a6e155687c6a main.cpp --- a/main.cpp Fri Apr 29 14:59:26 2016 +0000 +++ b/main.cpp Fri Apr 29 15:58:05 2016 +0000 @@ -48,8 +48,13 @@ /* Definitions ---------------------------------------------------------------*/ #ifdef TARGET_NUCLEO_F334R8 #define VREFA_PWM_PIN D11 +#define VREFB_PWM_PIN D9 +#elif TARGET_NUCLEO_F302R8 +#define VREFA_PWM_PIN D11 +#define VREFB_PWM_PIN D15 /* HW mandatory patch: bridge manually D9 with D15 */ #else #define VREFA_PWM_PIN D3 +#define VREFB_PWM_PIN D9 #endif /* Variables -----------------------------------------------------------------*/ @@ -125,7 +130,7 @@ //----- Initialization /* Initializing Motor Control Component. */ - motor = new L6208(D2, D8, D7, D4, D5, D6, VREFA_PWM_PIN, D9); + motor = new L6208(D2, D8, D7, D4, D5, D6, VREFA_PWM_PIN, VREFB_PWM_PIN); if (motor->Init(&initDeviceParameters) != COMPONENT_OK) exit(EXIT_FAILURE); /* Attaching and enabling an interrupt handler. */