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: experiment_example motor_shield_example Position_ctrl Lab3_experiment_example ... more
Diff: HardwareSetup.cpp
- Revision:
- 3:2f46953e7c8b
- Parent:
- 2:30503be9a375
- Child:
- 5:d2dffc88e94d
--- a/HardwareSetup.cpp Wed Aug 26 00:24:51 2020 +0000
+++ b/HardwareSetup.cpp Wed Aug 26 02:43:57 2020 +0000
@@ -9,6 +9,7 @@
TIM_HandleTypeDef htim16;
TIM_HandleTypeDef htim17;
+int PWM_PERIOD;
void SystemClock_Config(void);
void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim);
static void MX_TIM12_Init(void);
@@ -18,7 +19,8 @@
static void MX_TIM16_Init(void);
static void MX_TIM17_Init(void);
-void initHardware(){
+void initHardware(int periodTicks){
+ PWM_PERIOD = periodTicks;
/* Initialise the HAL Layer */
HAL_Init();