summaryrefslogtreecommitdiffstats
path: root/libk8055
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-03-01 10:38:14 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2011-03-01 10:38:14 +0100
commitfea1f737c457d037a345c2b006e8b4d07e142f89 (patch)
tree9aa6c484eea89ce261c6de965c34b16a60b4fd89 /libk8055
parent14027fa03285c7b58c342263f172b0c879b3f9a5 (diff)
downloadk8055-fea1f737c457d037a345c2b006e8b4d07e142f89.zip
k8055-fea1f737c457d037a345c2b006e8b4d07e142f89.tar.gz
fix k8055_read_digital_channel channel check
Diffstat (limited to 'libk8055')
-rw-r--r--libk8055/libk8055.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libk8055/libk8055.c b/libk8055/libk8055.c
index e8eee8c..4fbb8d5 100644
--- a/libk8055/libk8055.c
+++ b/libk8055/libk8055.c
@@ -347,7 +347,7 @@ int k8055_set_all_digital( struct k8055_dev* dev ) {
int k8055_read_digital_channel( struct k8055_dev* dev, int channel ) {
int rval;
- if ( channel<1 || channel>8 ) return K8055_ERROR;
+ if ( channel<1 || channel>5 ) return K8055_ERROR;
if ( ( rval = k8055_read_all_digital( dev ) ) == K8055_ERROR ) return K8055_ERROR;
return ( ( rval & ( 1 << ( channel-1 ) ) ) > 0 );
}