I am trying to write a Kconfig menu to be able to choose the GPIO pin for a given use.
But it seems that I can only choose an integer value, e.g. :
Code: Select all
config PIN_STATUS_MAIN
int "Main LED GPIO number"
range 0 34
default 23
help
GPIO number (IOxx) for the 'Main status' LED.
Now, is there a mean to make this selection so that CONFIG_PIN_STATUS_MAIN will be e.g. GPIO_NUM_23 with the default value ?
Otherwise I plan to have a function that do the mapping, called to initialize a constant, but it's my last resort.