-
Notifications
You must be signed in to change notification settings - Fork 14
pico-sdk: Rename adc_read() to adc_read_pico() #2
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
Conversation
|
Hi, @petejohanson, @andrei-edward-popa, |
|
@stephanosio @carlescufi @nashif @anangl I think we should merge this patch, despite the maintenance headache it implies. CI results are available in the zephyr PR linked above. Any objections? |
|
Not to nitpick (nitpico?), But would prefixing it be more standard? |
adc_read() that defined in adc.h of PICO-SDK conflicts with zephyr's ADC API. Rename it to avoid compile errors. PICO-SDK doesn't reference adc_read() from itself, so we can change the definition only. Signed-off-by: TOKITA Hiroshi <[email protected]>
3023485 to
cd0bef7
Compare
|
Hi, @petejohanson Thank you for reviewing.
😆
Change #1 is avoiding conflict using by prefixing. Thanks for insightful pointing out! |
|
May I suggest to create a list of such patches either in the README.md, the CONTRIBUTING.md, or a new file such that these patches won't be forgotten in future sdk updates. |
Given the status quo that Zephyr functions are not prefixed with a Zephyr-specific prefix, agreed. |
|
Hi, @stephanosio @str4t0m
Added |
ChangeLog.zephyr.md
Outdated
| ## [cd0bef7](https://github.com/zephyrproject-rtos/hal_rpi_pico/commit/cd0bef7) - 2022-08-26 | ||
| - Rename adc_read() to pico_adc_read() | ||
| ## [191f5ba](https://github.com/zephyrproject-rtos/hal_rpi_pico/commit/191f5ba) - 2022-02-02 | ||
| - Patch occurrences of KHZ/MHZ to PICO_KHZ/PICO_MHZ |
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.
The commit SHAs given here are from the PR branch and will no longer be valid once this branch is merged.
I would suggest adopting the approach documenting the list of patches and the files changed: https://github.com/zephyrproject-rtos/hal_st/blob/cccbc24c14decfd3f93959f7b14514536af973c7/sensor/stmemsc/README#L60-L62
If one wants to find out which commit, they can easily do so by using git blame anyway.
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.
Yep, please do the suggested change @soburi
| @@ -0,0 +1,12 @@ | |||
| # The List of changes to fit zephyr. | |||
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 the last two commits.
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.
@stephanosio
Thank you for checking.
Rebasing done. Could you verify it?
a2df41f to
eda88df
Compare
Add ChangeLog.zephyr.md file to log changes in the Zephyr. Signed-off-by: TOKITA Hiroshi <[email protected]>
eda88df to
0c30f03
Compare
adc_read() that defined in adc.h of PICO-SDK conflicts with zephyr's ADC API.
Rename it to avoid compile errors.
PICO-SDK doesn't reference adc_read() from itself,
so we can change the definition only.
Signed-off-by: TOKITA Hiroshi [email protected]