Enumeraion cannot be resolved


#1

Hi all,

I had a error when build the program. It says that

Symbol ‘MANGOH_SIM2GPIO_ACTIVE_HIGH’ could not be resolved

The enumeration value MANGOH_SIM2GPIO_ACTIVE_HIGH is auto-generated from le_gpio.api. I think it’s a problem regarding the build environment setting but I don’t know for sure. Any ideas?


#2

You should have a line like this in your Component.cdef:

 mangoh_button = le_gpio.api 

You should have a line like this in YourApp.adef (this example uses the gpio expander, the part after the arrow will be different if you are using a GPIO on the WP module):

buttonToAirVantage.buttonToAirVantageComponent.mangoh_button -> gpioExpanderServiceRed.mangoh_gpioExpPin14

Then in your app’s C code, you will have the constant MANGOH_BUTTON_ACTIVE_HIGH.