++
Fork of mbed-stm32l0/l1-src by
Revision 599:efb83a170500, committed 2015-07-31
- Comitter:
- mbed_official
- Date:
- Fri Jul 31 14:00:09 2015 +0100
- Parent:
- 598:2d5fc5624619
- Child:
- 600:7d17ca308cd1
- Commit message:
- Synchronized with git revision 5b1dc60c03fa1b3a5d082ac137d15d6584f7fe1a
Full URL: https://github.com/mbedmicro/mbed/commit/5b1dc60c03fa1b3a5d082ac137d15d6584f7fe1a/
MAXWSNENV, MAX32600MBED - Fixing pwm array search.
Changed in this revision
--- a/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/hal_tick.c Wed Jul 29 09:45:09 2015 +0100 +++ b/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/hal_tick.c Fri Jul 31 14:00:09 2015 +0100 @@ -89,7 +89,7 @@ // Prepare next interrupt __HAL_TIM_SetCompare(&TimMasterHandle, TIM_CHANNEL_2, val + HAL_TICK_DELAY); PreviousVal = val; -#if 1 // For DEBUG only +#if 0 // For DEBUG only HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_6); #endif } @@ -140,7 +140,7 @@ // Enable timer HAL_TIM_Base_Start(&TimMasterHandle); -#if 1 // For DEBUG only +#if 0 // For DEBUG only __GPIOB_CLK_ENABLE(); GPIO_InitTypeDef GPIO_InitStruct; GPIO_InitStruct.Pin = GPIO_PIN_6;
--- a/targets/hal/TARGET_Maxim/TARGET_MAX32600/pwmout_api.c Wed Jul 29 09:45:09 2015 +0100 +++ b/targets/hal/TARGET_Maxim/TARGET_MAX32600/pwmout_api.c Fri Jul 31 14:00:09 2015 +0100 @@ -77,9 +77,9 @@ } // If all instances are in use, overwrite the last - pwm = PinMap_PWM[++i]; + pwm = PinMap_PWM[i++]; if(pwm.pin != pin) { - pwm = PinMap_PWM[--i]; + pwm = PinMap_PWM[(i-1)]; i = -1; break; }
--- a/targets/hal/TARGET_Maxim/TARGET_MAX32610/pwmout_api.c Wed Jul 29 09:45:09 2015 +0100 +++ b/targets/hal/TARGET_Maxim/TARGET_MAX32610/pwmout_api.c Fri Jul 31 14:00:09 2015 +0100 @@ -77,9 +77,9 @@ } // If all instances are in use, overwrite the last - pwm = PinMap_PWM[++i]; + pwm = PinMap_PWM[i++]; if(pwm.pin != pin) { - pwm = PinMap_PWM[--i]; + pwm = PinMap_PWM[(i-1)]; i = -1; break; }