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 95dc61d commit c83307eCopy full SHA for c83307e
targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/pwmout_api.c
@@ -297,7 +297,7 @@ void pwmout_pulsewidth(pwmout_t *obj, float pulse)
297
DEBUG_PRINTF("pwmout_pulsewidt: %f\r\n", pulse);
298
299
/* Cap pulsewidth to period before setting it. */
300
- if ((pulse * 1000000) > (float) (obj->pulse & ~SEQ_POLARITY_BIT)) {
+ if ((pulse * 1000000) > (float) obj->period) {
301
obj->pulse &= SEQ_POLARITY_BIT;
302
obj->pulse |= obj->period;
303
pwmout_pulsewidth_us(obj, obj->pulse);
@@ -354,4 +354,3 @@ const PinMap *pwmout_pinmap()
354
}
355
356
#endif // DEVICE_PWMOUT
357
-
0 commit comments