mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_NXP/TARGET_LPC11UXX/pwmout_api.c
- Revision:
- 175:906e2386ace8
- Parent:
- 63:a46ad637dc84
- Child:
- 184:8b5ae2e87659
--- a/targets/hal/TARGET_NXP/TARGET_LPC11UXX/pwmout_api.c Tue Apr 29 11:15:07 2014 +0100 +++ b/targets/hal/TARGET_NXP/TARGET_LPC11UXX/pwmout_api.c Tue Apr 29 17:00:07 2014 +0100 @@ -144,8 +144,8 @@ uint32_t old_period_ticks = timer->MR3; // for 16bit timer, set prescaler to avoid overflow - uint16_t high_period_ticks = period_ticks >> 16; - if ((high_period_ticks) && (timer == LPC_CT16B0 || timer == LPC_CT16B1)) { + if (timer == LPC_CT16B0 || timer == LPC_CT16B1) { + uint16_t high_period_ticks = period_ticks >> 16; timer->PR = high_period_ticks; period_ticks /= (high_period_ticks + 1); }