[riot-notifications] [RIOT-OS/RIOT] byteorder: Add to/from little endian conversion functions (#10986)

Koen Zandberg notifications at github.com
Mon Feb 11 13:22:31 CET 2019

### Contribution description

This PR adds functions to `byteorder.h` for converting from/to little endian based on the host byte order. Function names are based on `endian.h` from glibc (man 3 endian). While currently all supported platforms are little endian, this might change in the future.

### Testing procedure

Additional tests provided in `unittests/tests-core`, run `make -C tests/unittests -j tests-core test` to test

### Issues/PRs references

Technically required for a USB stack as the USB protocol is little endian.
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * byteorder: Add to/from little endian conversion functions
  * tests/core: Add tests for little endian functions

-- File Changes --

    M core/include/byteorder.h (167)
    M tests/unittests/tests-core/tests-core-byteorder.c (27)

-- 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/20190211/00614883/attachment.html>

More information about the notifications mailing list