Skip to content

Commit 73ea172

Browse files
committed
remove polarity "hack" for PWM #170
1 parent d75e0c8 commit 73ea172

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

source/c_pwm.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -581,12 +581,11 @@ BBIO_err pwm_start(const char *key, float duty, float freq, int polarity)
581581
return BBIO_GEN;
582582
}
583583

584-
//FIXME: polarity set broken in v4.9.x/v4.14.x
585-
// err = pwm_set_polarity(key, polarity);
586-
// if (err != BBIO_OK) {
587-
// syslog(LOG_ERR, "pwm_start: %s couldn't set polarity: %i", key, err);
588-
// return err;
589-
// }
584+
err = pwm_set_polarity(key, polarity);
585+
if (err != BBIO_OK) {
586+
syslog(LOG_ERR, "pwm_start: %s couldn't set polarity: %i", key, err);
587+
return err;
588+
}
590589

591590
// Read out current period_ns from the file, in order for it to behave
592591
// properly

0 commit comments

Comments
 (0)