We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fcffd4 commit 441a665Copy full SHA for 441a665
hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822/pwmout_api.c
@@ -160,7 +160,8 @@ void pwmout_write(pwmout_t *obj, float value)
160
if (value > 1.0f) {
161
value = 1.0f;
162
}
163
- uint16_t ticks = (uint16_t)((float)app_pwm_cycle_ticks_get(pwm->instance) * value);
+
164
+ app_pwm_channel_duty_set(pwm->instance, obj->pwm_channel, (app_pwm_duty_t)(value * 100.0f) );
165
166
167
float pwmout_read(pwmout_t *obj)
0 commit comments