FastPWM clone
Diff: Device/FastPWM_STM_TIM.cpp
- Revision:
- 35:d6c2b73d71f5
- Parent:
- 32:e880dcb178f4
--- a/Device/FastPWM_STM_TIM.cpp Sun Sep 03 19:40:01 2017 +0000 +++ b/Device/FastPWM_STM_TIM.cpp Wed Oct 30 03:00:00 2019 +0000 @@ -20,7 +20,7 @@ #endif void FastPWM::initFastPWM( void ) { - fast_obj = new fastpwm_struct; + fast_obj = malloc(sizeof(fastpwm_struct)); #if defined(TARGET_STM32F0) || defined (TARGET_STM32F1) || defined (TARGET_STM32L1) PWM_CHANNEL = getChannel(PWM_TIMER, _pwm.pin); #else