mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +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)
|
||||
return NULL;
|
||||
|
||||
dev->gpioA = NULL;
|
||||
dev->gpioB = NULL;
|
||||
|
||||
// make sure MRAA is initialized
|
||||
int mraa_rv;
|
||||
if ((mraa_rv = mraa_init()) != MRAA_SUCCESS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user