summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 );
}