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_LPC11U6X/pwmout_api.c
- Revision:
- 234:37acebda271b
- Parent:
- 193:cff126de7aaf
- Child:
- 250:a49055e7a707
diff -r 1bbc1451db33 -r 37acebda271b targets/hal/TARGET_NXP/TARGET_LPC11U6X/pwmout_api.c --- a/targets/hal/TARGET_NXP/TARGET_LPC11U6X/pwmout_api.c Tue Jun 17 11:30:08 2014 +0100 +++ b/targets/hal/TARGET_NXP/TARGET_LPC11U6X/pwmout_api.c Wed Jun 18 09:00:08 2014 +0100 @@ -57,7 +57,7 @@ void pwmout_init(pwmout_t* obj, PinName pin) { // determine the SPI to use PWMName pwm_mapped = (PWMName)pinmap_peripheral(pin, PinMap_PWM); - if (pwm_mapped == (uint32_t)NC) { + if (pwm_mapped == (PWMName)NC) { error("PwmOut pin mapping failed"); } int sct_n = get_available_sct(); @@ -146,7 +146,6 @@ } else if (value > 1.0f) { value = 1.0; } - uint32_t t_off = obj->pwm->MATCHREL0 - (uint32_t)((float)(obj->pwm->MATCHREL0) * value); uint32_t t_on = (uint32_t)((float)(obj->pwm->MATCHREL0) * value); obj->pwm->MATCHREL1 = t_on; }