mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
apa102: apa102_init(): return the created context
Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
parent
db05211516
commit
e9b0deaf75
@ -70,6 +70,8 @@ apa102_context apa102_init(int ledcount, int bus, int cs) {
|
|||||||
}
|
}
|
||||||
mraa_gpio_dir(dev->cs, MRAA_GPIO_OUT);
|
mraa_gpio_dir(dev->cs, MRAA_GPIO_OUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
void apa102_close(apa102_context 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);
|
mraa_gpio_write(dev->cs, 0);
|
||||||
}
|
}
|
||||||
return UPM_SUCCESS;
|
return UPM_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user