[riot-notifications] [RIOT-OS/RIOT] isrpipe: split isrpipe_read_timeout to isolate xtimer dependency (#11267)

Gaƫtan Harter notifications at github.com
Mon Mar 25 17:59:32 CET 2019


### Contribution description

This defines a new 'isrpipe_read_timeout' that should be used when using
the timeout based function of isrpipe.

This fix the implicit dependency to 'xtimer' that is only needed for the
'_timeout' functions.

It prevents 'stdio_uart' that uses 'isrpipe' to need to depend on xtimer.
This was silently solved at link time for most platforms but not for the
'esp32' for example.

'drivers/at' needed to be updated at the same time to follow the api change.


### Testing procedure

In master, the esp32 actually provides warning when compiling some of the applications regarding the missing `xtimer` symbols. But there are only handled as warnings (https://github.com/RIOT-OS/RIOT/pull/11246)

```
RIOT_CI_BUILD=1 DOCKER="sudo docker" BOARD=esp32-wroom-32 BUILD_IN_DOCKER=1 make -C tests/pkg_cn-cbor/
...
make" -C /data/riotbuild/riotbase/tests/pkg_cn-cbor/bin/pkg/esp32-wroom-32/cn-cbor/src -f /data/riotbuild/riotbase/pkg/cn-cbor/Makefile.cn-cbor
/data/riotbuild/riotbase/tests/pkg_cn-cbor/bin/esp32-wroom-32/isrpipe.a(isrpipe.o): In function `isrpipe_read':
isrpipe.c:(.text+0x84): warning: undefined reference to `_xtimer_set'
isrpipe.c:(.text+0x88): warning: undefined reference to `xtimer_remove'
isrpipe.c:(.text+0xb2): warning: undefined reference to `_xtimer_set'
/data/riotbuild/riotbase/tests/pkg_cn-cbor/bin/esp32-wroom-32/isrpipe.a(isrpipe.o): In function `isrpipe_read_timeout':
```

With this pull request there is no reported error anymore. It also removes all the issues with `isrpipe.c` in https://github.com/RIOT-OS/RIOT/pull/11246


### Issues/PRs references

Part of enabling error at link time for esp https://github.com/RIOT-OS/RIOT/pull/11246
It was found while trying to run the test suite on esp32.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * isrpipe: split isrpipe_read_timeout to isolate xtimer dependency
  * drivers/at: remove the direct dependency to xtimer

-- File Changes --

    M Makefile.dep (5)
    M drivers/Makefile.dep (2)
    M drivers/at/at.c (2)
    M sys/Makefile (3)
    M sys/include/isrpipe.h (34)
    A sys/include/isrpipe/read_timeout.h (69)
    M sys/isrpipe/isrpipe.c (56)
    A sys/isrpipe/read_timeout/Makefile (3)
    A sys/isrpipe/read_timeout/read_timeout.c (76)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11267.patch
https://github.com/RIOT-OS/RIOT/pull/11267.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/11267
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190325/bfba4614/attachment-0001.html>


More information about the notifications mailing list