Fork of mbed-dev build 137, last build before FAT file system appears to be broken. Also reduced HSE timeout time in STM4XX HAL
Fork of mbed-dev by
Diff: targets/TARGET_NUVOTON/TARGET_M451/pwmout_api.c
- Revision:
- 165:e614a9f1c9e2
- Parent:
- 161:2cc1468da177
--- a/targets/TARGET_NUVOTON/TARGET_M451/pwmout_api.c Wed May 10 12:06:41 2017 +0100 +++ b/targets/TARGET_NUVOTON/TARGET_M451/pwmout_api.c Fri May 26 12:39:01 2017 +0100 @@ -99,11 +99,9 @@ ((struct nu_pwm_var *) modinit->var)->en_msk |= 1 << chn; - if (((struct nu_pwm_var *) modinit->var)->en_msk) { - // Mark this module to be inited. - int i = modinit - pwm_modinit_tab; - pwm_modinit_mask |= 1 << i; - } + // Mark this module to be inited. + int i = modinit - pwm_modinit_tab; + pwm_modinit_mask |= 1 << i; } void pwmout_free(pwmout_t* obj) @@ -122,11 +120,9 @@ CLK_DisableModuleClock(modinit->clkidx); } - if (((struct nu_pwm_var *) modinit->var)->en_msk == 0) { - // Mark this module to be deinited. - int i = modinit - pwm_modinit_tab; - pwm_modinit_mask &= ~(1 << i); - } + // Mark this module to be deinited. + int i = modinit - pwm_modinit_tab; + pwm_modinit_mask &= ~(1 << i); } void pwmout_write(pwmout_t* obj, float value)