[riot-notifications] [RIOT-OS/RIOT] Extract name form saul_gpio_params (#11396)

Leandro Lanzieri notifications at github.com
Mon Apr 15 14:24:32 CEST 2019


### Contribution description
For almost all devices in SAUL we currently have a `saul_reg_info_t` structure that holds the information for the SAUL registry and some other structure that holds the parameters needed for its initialization. There are two exceptions to that: GPIOs and ADCs. This difference breaks the pattern and makes it more difficult to treat all devices in a generic way.

This PR extracts the information that actually belongs to a `saul_reg_info_t` structure from the `saul_gpio_params_t` (currently just the name), and creates an array of structures that holds that information, like all other drivers do, making everything more consistent.

Right now moving the names out of the structure might seem a little strange, but there are plans to expand the metadata for the SAUL registry entries, and the place for it is the `saul_reg_info_t` structure.

### Testing procedure
Run `examples/saul` and check that the names of the GPIOs are correctly displayed.

### Issues/PRs references

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/11396

-- Commit Summary --

  * saul_gpio: Use saul_reg_info_t
  * boards: Define saul_gpio_info

-- File Changes --

    M boards/acd52832/include/gpio_params.h (13)
    M boards/arduino-zero/include/gpio_params.h (10)
    M boards/b-l072z-lrwan1/include/gpio_params.h (20)
    M boards/b-l475e-iot01a/include/gpio_params.h (16)
    M boards/blackpill/include/gpio_params.h (10)
    M boards/bluepill/include/gpio_params.h (10)
    M boards/calliope-mini/include/gpio_params.h (12)
    M boards/cc2650stk/include/gpio_params.h (16)
    M boards/common/arduino-atmega/include/gpio_params.h (10)
    M boards/common/arduino-due/include/gpio_params.h (10)
    M boards/common/arduino-mkr/include/gpio_params.h (10)
    M boards/common/iotlab/include/gpio_params.h (14)
    M boards/common/nrf52xxxdk/include/gpio_params.h (37)
    M boards/common/nucleo144/include/gpio_params.h (16)
    M boards/common/nucleo32/include/gpio_params.h (11)
    M boards/common/nucleo64/include/gpio_params.h (14)
    M boards/common/saml1x/include/gpio_params.h (12)
    M boards/esp32-mh-et-live-minikit/include/gpio_params.h (10)
    M boards/esp32-olimex-evb/include/gpio_params.h (14)
    M boards/esp32-wemos-lolin-d32-pro/include/gpio_params.h (10)
    M boards/esp32-wroom-32/include/gpio_params.h (10)
    M boards/esp32-wrover-kit/include/gpio_params.h (20)
    M boards/esp8266-esp-12x/include/gpio_params.h (10)
    M boards/esp8266-olimex-mod/include/gpio_params.h (10)
    M boards/esp8266-sparkfun-thing/include/gpio_params.h (10)
    M boards/firefly/include/gpio_params.h (16)
    M boards/frdm-k22f/include/gpio_params.h (14)
    M boards/frdm-kw41z/include/gpio_params.h (20)
    M boards/ikea-tradfri/include/gpio_params.h (12)
    M boards/lobaro-lorabox/include/gpio_params.h (10)
    M boards/maple-mini/include/gpio_params.h (12)
    M boards/mbed_lpc1768/include/gpio_params.h (16)
    M boards/mega-xplained/include/gpio_params.h (16)
    M boards/microbit/include/gpio_params.h (12)
    M boards/msbiot/include/gpio_params.h (18)
    M boards/mulle/include/gpio_params.h (14)
    M boards/nrf51dk/include/gpio_params.h (24)
    M boards/nrf52832-mdk/include/gpio_params.h (13)
    M boards/nrf52840-mdk/include/gpio_params.h (15)
    M boards/nz32-sc151/include/gpio_params.h (10)
    M boards/pba-d-01-kw2x/include/gpio_params.h (18)
    M boards/phynode-kw41z/include/gpio_params.h (30)
    M boards/pyboard/include/gpio_params.h (12)
    M boards/reel/include/gpio_params.h (17)
    M boards/remote-pa/include/gpio_params.h (16)
    M boards/remote-reva/include/gpio_params.h (16)
    M boards/remote-revb/include/gpio_params.h (16)
    M boards/samd21-xpro/include/gpio_params.h (12)
    M boards/samr21-xpro/include/gpio_params.h (12)
    M boards/samr30-xpro/include/gpio_params.h (14)
    M boards/seeeduino_arch-pro/include/gpio_params.h (16)
    M boards/sensebox_samd21/include/gpio_params.h (14)
    M boards/slstk3401a/include/gpio_params.h (16)
    M boards/slstk3402a/include/gpio_params.h (16)
    M boards/sltb001a/include/gpio_params.h (16)
    M boards/slwstk6000b/include/gpio_params.h (16)
    M boards/sodaq-autonomo/include/gpio_params.h (10)
    M boards/sodaq-explorer/include/gpio_params.h (12)
    M boards/sodaq-one/include/gpio_params.h (16)
    M boards/sodaq-sara-aff/include/gpio_params.h (16)
    M boards/stk3600/include/gpio_params.h (16)
    M boards/stk3700/include/gpio_params.h (16)
    M boards/stm32f0discovery/include/gpio_params.h (14)
    M boards/stm32f3discovery/include/gpio_params.h (26)
    M boards/stm32f429i-disc1/include/gpio_params.h (14)
    M boards/stm32f4discovery/include/gpio_params.h (18)
    M boards/stm32f769i-disco/include/gpio_params.h (18)
    M boards/stm32l476g-disco/include/gpio_params.h (22)
    M boards/ublox-c030-u201/include/gpio_params.h (17)
    M boards/usb-kw41z/include/gpio_params.h (19)
    M drivers/include/saul/periph.h (1)
    M sys/auto_init/saul/auto_init_gpio.c (9)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11396.patch
https://github.com/RIOT-OS/RIOT/pull/11396.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11396
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190415/80802218/attachment-0001.html>


More information about the notifications mailing list