Skip to content

Commit b6cf76f

Browse files
author
Matthew West
committed
Small bugfix to setting frequency
1 parent ac1104c commit b6cf76f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

source/c_pwm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ BBIO_err pwm_set_frequency(const char *key, float freq) {
150150
}
151151

152152
} else if (period_ns > pwm->period_ns) {
153+
pwm->period_ns = period_ns;
153154
// Ordinarily update the period first,
154155
// to avoid the opposite bug - kernel won't
155156
// let us set duty greater than period

0 commit comments

Comments
 (0)