- Usage of generated dts *_GPIO_FLAGS
Re: Usage of generated dts *_GPIO_FLAGS
toggle quoted messageShow quoted text
Having direct match between generated FLAGS/INT_CONF aliases and application symbols would be a good idea.
Though not sure which should converge to the other.
INT_CONF (Interrupt configuration I guess) is more restrictive than FLAGS.
Impacted field is used to configure GPIO in general, not interrupt only, so a more generic name might be a better choice.
On 4 May 2018 at 07:33, Diego Sueiro <diego.sueiro@...>
I'd like to know what is the usage of the *_GPIO_FLAGS macro.
For example in "dts/bindings/gpio/nxp,kinetis-gpio.yaml" file:
And "boards/arm/frdm_k64f/frdm_k64f.dts" file we have
gpios = <&gpioa 4 GPIO_INT_ACTIVE_LOW>;
This will generate in "zephyr/include/generated/generated_dts_board.h":
#define GPIO_KEYS_1_GPIO_CONTROLLER "GPIO_0"
#define GPIO_KEYS_1_GPIO_FLAGS_0 0
#define GPIO_KEYS_1_GPIO_PIN_0 4
#define GPIO_KEYS_1_LABEL "User SW3"
#define GPIO_KEYS_1_GPIO_FLAGS GPIO_KEYS_1_GPIO_FLAGS_0
#define GPIO_KEYS_1_GPIO_PIN GPIO_KEYS_1_GPIO_PIN_0
#define SW0_GPIO_CONTROLLER GPIO_KEYS_1_GPIO_CONTROLLER
#define SW0_GPIO_FLAGS GPIO_KEYS_1_GPIO_FLAGS
#define SW0_GPIO_PIN GPIO_KEYS_1_GPIO_PIN
#define SW0_LABEL GPIO_KEYS_1_LABEL
In this example SW0_GPIO_FLAGS is not "consumed" by any source code, but "samples/basic/button/src/main.c" application is using SW0_GPIO_CONTROLLER, SW0_GPIO_PIN and SW0_GPIO_INT_CONF.
I think we should name this gpio dts cell as "int_conf" instead of "flags", this way the dts configuration will be used in the button application, for example.
/*long live rock 'n roll*/
Join email@example.com to automatically receive all group messages.