New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isrpipe: split isrpipe_read_timeout to isolate xtimer dependency #11267
isrpipe: split isrpipe_read_timeout to isolate xtimer dependency #11267
Conversation
I am not that used to write module headers and the doxygen so I welcome feedback on this :) I kept the original license as I was moving the functions around files, tell me if this is wrong. |
Note for me, I noticed a missing word in the first commit message (needs squashing label) |
Please feel free to do so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for the module doc I'm fine. The code and documentation of the functions was just copy-pasted.
sys/include/isrpipe/read_timeout.h
Outdated
*/ | ||
|
||
/** | ||
* @defgroup isr_pipe ISR Pipe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just copy-pasted from isrpipe
. You have two options here either remove the @defgroup
and @brief
tag and just do @ingroup isr_pipe
or (since you did not explicitly document that a separate module is needed, I would prefer that)
/**
* @defgroup isr_pipe_read_timeout Read timeouts with ISR pipe
* @ingroup isr_pipe
* @brief ISR -> userspace pipe with timeout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I do the second one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I aligned the arguments to column 17 to match the other ones.
I also updated the C file to match the isr_pipe_read_timeout.
65a0603
to
b1f6418
Compare
I forced push to update the commit message then added the other one after. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash |
c10c469
to
875bfaa
Compare
Squashed, now waiting for the CI queue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from some label issues this is what murdock complains about. Please squash immediately
This defines a new 'isrpipe_read_timeout' module 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.
`at` is not using the `xtimer` module directly but only through 'isrpipe_read_timeout'.
875bfaa
to
29fc58b
Compare
I indeed missed that the module is called "isrpipe" and the group "isr_pipe" which I applied to the new group name. |
we should fix the group naming actually, but not in this PR... |
Thanks for the review. |
Contribution description
This defines a new 'isrpipe_read_timeout' module 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 (#11246)With this pull request there is no reported error anymore. It also removes all the issues with
isrpipe.c
in #11246Issues/PRs references
Part of enabling error at link time for esp #11246
It was found while trying to run the test suite on esp32.