mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +03:00
rotaryencoder: make sure mraa contexts are NULL after context creation
Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
parent
07d0168a96
commit
78904ef2b8
@ -50,6 +50,9 @@ rotaryencoder_context rotaryencoder_init(int pin_a, int pin_b)
|
|||||||
if (!dev)
|
if (!dev)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
dev->gpioA = NULL;
|
||||||
|
dev->gpioB = NULL;
|
||||||
|
|
||||||
// make sure MRAA is initialized
|
// make sure MRAA is initialized
|
||||||
int mraa_rv;
|
int mraa_rv;
|
||||||
if ((mraa_rv = mraa_init()) != MRAA_SUCCESS)
|
if ((mraa_rv = mraa_init()) != MRAA_SUCCESS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user