Get GPIO number using le_gpio

Hi

I am trying to make an app i can run on both mangOH Yellow and mangOH Red.
Due to some differences in hardware, I have to make a different binding in my .adef regarding the board type:

bindings:
{
#if ${MANGOH_BOARD} = yellow
    appAccel.appAccelComponent.le_gpioPinAccel -> gpioService.le_gpioPin38
#elif ${MANGOH_BOARD} = red
    appAccel.appAccelComponent.le_gpioPinAccel -> gpioService.le_gpioPin36
#endif
}

Then i can use any function from le_gpio API in my .c correctly.
Now i would like to get the selected GPIO number from the source code of my app.

For example if I built my code for a mangOH Yellow, the accelerometer pin would have been bound to the GPIO 38 and in my .c I want to be able to get the “38” value somewhere.

I’ve looked into the GPIO API but I can’t find a function that returns the GPIO number.

Is there a way to do this easily ? So far I’ve been using an environment variable defined in the .adef to get the board type in the .c and compute the correct GPIO number but i feel like there is a cleaner way to do this…

Best regards,

Paul

@pmeis, I fear that this functionality does not exist in Legato API