Private
Public Access
2
0

blink-io: make sure maa_gpio_init was successful

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-05-15 10:41:23 +01:00
parent acfc804f26
commit 8460b1f743

View File

@@ -62,6 +62,10 @@ main(int argc, char **argv)
maa_gpio_context* gpio;
gpio = maa_gpio_init(iopin);
if (gpio == NULL) {
fprintf(stderr, "Are you sure that pin%d you requested is valid on your platform?", iopin);
exit(1);
}
printf("Initialised pin%d which is atually pin%d\n", iopin, gpio->pin);
// set direction to OUT