[riot-notifications] [RIOT-OS/RIOT] drivers/saul: Improved stringification (#11394)

Marian Buschsieweke notifications at github.com
Mon Apr 15 12:26:33 CEST 2019

### Contribution description
- Changed declaration of SAUL classes (while keeping the format)
    - Termed "class of SAUL classes" category of SAUL classes in the doc to avoid confusion. (E.g. a SAUL class will now be in category sensor or  actuator.)
    - Separate enums for SAUL category and intra-category ID. Numbers will now but auto-assigned by the compiler
- Use constant look-up tables for stringification (one table per SAUL category).
  ==> This saves 512B in .data section of AVR


- Smaller RAM footprint
- No manual management of class numbers

- Adding new classes requires changing 2 lines instead of 1 (or 3 lines instead of 2 when counting stringification)

### Testing procedure
`examples/saul` should still work with your favorite board

### Issues/PRs references
Split off from https://github.com/RIOT-OS/RIOT/pull/11392
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * drivers/saul: Improved stringification

-- File Changes --

    M drivers/include/saul.h (156)
    M drivers/saul/saul_str.c (106)

-- Patch Links --


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

More information about the notifications mailing list