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.
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); }