From: Jeremy Tan Date: Sun, 29 Sep 2013 12:40:16 +0000 (+0800) Subject: Fix GPIO limits X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=c579f7d79d74965f51e96b1c047406be7c5583be;p=matches%2FMCTX3420.git Fix GPIO limits --- diff --git a/server/pin_test.c b/server/pin_test.c index 86685e8..2ef0612 100644 --- a/server/pin_test.c +++ b/server/pin_test.c @@ -118,7 +118,7 @@ void Pin_Handler(FCGIContext *context, char * params) if (strcmp(type, "gpo") == 0) { - if (num <= 0 || num > GPIO_NUM_PINS) + if (num <= 0 || num > GPIO_MAX_NUMBER) { FCGI_RejectJSON(context, "Invalid GPIO pin"); return; @@ -137,7 +137,7 @@ void Pin_Handler(FCGIContext *context, char * params) } else if (strcmp(type, "gpi") == 0) { - if (num < 0 || num >= GPIO_NUM_PINS) + if (num < 0 || num > GPIO_MAX_NUMBER) { FCGI_RejectJSON(context, "Invalid GPIO pin"); return;