mirror of
https://github.com/eclipse/upm.git
synced 2025-07-26 05:31:17 +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:
@ -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)
|
||||||
|
Reference in New Issue
Block a user