apa102: apa102_init(): return the created context

Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
Jon Trulson 2016-09-13 13:32:19 -06:00 committed by Noel Eck
parent db05211516
commit e9b0deaf75

View File

@ -70,6 +70,8 @@ apa102_context apa102_init(int ledcount, int bus, int cs) {
}
mraa_gpio_dir(dev->cs, MRAA_GPIO_OUT);
}
return dev;
}
void apa102_close(apa102_context dev) {
@ -129,4 +131,4 @@ upm_result_t apa102_refresh(apa102_context dev) {
mraa_gpio_write(dev->cs, 0);
}
return UPM_SUCCESS;
}
}