forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpio: add support for node label based lookup in the shell
Use some new kernel features to make the experience of finding and dealing with GPIO devices much more ergonomic by allowing the use of devicetree node labels to identify GPIO devices by default. Users who wish to avoid the associated footprint penalty can set CONFIG_DEVICE_DT_METADATA=n by hand, but I think the convenience is worth the price as a default. If we're running a shell, then we've already paid a heavy footprint penalty. Example output for qemu_cortex_m3: uart:~$ gpio devices Device Other names gpio@40004000 gpio0 gpio@40005000 gpio1 gpio@40006000 gpio2 gpio@40007000 gpio3 gpio@40024000 gpio4 gpio@40025000 gpio5 gpio@40026000 gpio6 Signed-off-by: Martí Bolívar <[email protected]>
- Loading branch information
1 parent
15c9d37
commit 48a14dc
Showing
2 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters