projects
/
contrib
/
mraa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5a893b
)
pwm: fix writing of period
author
Thomas Ingleby
<thomas.c.ingleby@intel.com>
Wed, 21 May 2014 13:49:32 +0000
(14:49 +0100)
committer
Thomas Ingleby
<thomas.c.ingleby@intel.com>
Wed, 21 May 2014 13:49:32 +0000
(14:49 +0100)
Incorrect value attempted to be written
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
src/pwm/pwm.c
patch
|
blob
|
history
diff --git
a/src/pwm/pwm.c
b/src/pwm/pwm.c
index
50786e8
..
5e80d29
100644
(file)
--- a/
src/pwm/pwm.c
+++ b/
src/pwm/pwm.c
@@
-68,7
+68,7
@@
maa_pwm_write_period(maa_pwm_context dev, int period)
return MAA_ERROR_INVALID_RESOURCE;
}
char out[MAX_SIZE];
- int length = snprintf(out, MAX_SIZE, "%d",
dev->pin
);
+ int length = snprintf(out, MAX_SIZE, "%d",
period
);
if (write(period_f, out, length*sizeof(char)) == -1) {
close(period_f);
return MAA_ERROR_INVALID_RESOURCE;