Skip to content

Commit 0620b43

Browse files
author
Matthew West
committed
Bugfix: add missing read call
1 parent 6759d58 commit 0620b43

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
@@ -522,6 +522,7 @@ BBIO_err pwm_start(const char *key, float duty, float freq, int polarity)
522522
// behave properly
523523
memset(buffer, 0, sizeof(buffer));
524524
lseek(pwm->duty_fd, 0, SEEK_SET);
525+
len = read(pwm->duty_fd, buffer, sizeof(buffer));
525526
if (len < 0) {
526527
return BBIO_SYSFS;
527528
} else if (len >= sizeof(buffer)) {

0 commit comments

Comments
 (0)