Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
drivers: nrf: Rework UARTE shim for uart ASYNC API and add power management #13064
drivers: nrf: Rework UARTE shim for uart ASYNC API and add power management #13064
Changes from all commits
ef33496
fd2f1d3
bafa4bd
587aa84
00f384f
d61351a
b1d41ba
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
what will be the default value? if 0 then it will enable TIMER0 instance and it may conflict with bluetooth as im afraid that it's using timer0 directly.
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.
There is no default value, user has to set it explicitly
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.
So as for now default value is
n
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.
If I understand kconfig properly (@ulfalizer can help) this will be a bit undefined, i.e. it's not really a "not-set", cause the value is not boolean. So, it appears to me that the macro is still generated (Without a value though)
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.
If value is not set then cmake will report an error and won't generate the project
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.
We should give the developer the option to build this without menuconfig, and as far as I can understand Kconfig, this requires a default value for int- Kconfig symbols.
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 value is taken into account only when developer selects hardware byte counting. When build with default configuration there are no issues with it. I don't want to select a default value here, as it should be explicitly set by developer if he decides to use hardware byte counting.
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.
Understood, now, thanks. So, I suggest you do as @ulfalizer has done in several similar cases, i.e. remove the "depends on" and add the whole Kconfig definition in i
f UART_0_NRF_HW_ASYNC ... endif #UART_0_NRF_HW_ASYNC
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.
There's some notes on
int
defaults on the best practices page.Usually, it's a good idea to give
int
symbols defaults, because they don't default to zero (for semi-messy reasons). If no default is given, then theprj.conf
(or boarddefconfig
files, etc.) must set the symbol. Otherwise, you'll get a.config
that generates warnings when read back in, and that probably breaks themenuconfig
, because warnings are turned into errors inscripts/kconfig/kconfig.py
(there's an issue for it).(Super nit: Trying to standardize making it
# UART_0_NRF_HW_ASYNC
instead of#UART_0_NRF_HW_ASYNC
too btw. It's more common.)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.
Re.
if
vsdepends on
,depends on
is cleaner if there's just a single symbol with the dependency.If there's many symbols with the same dependencies in a row,
if
is cleaner.It's a bit subjective when you have just two symbols or the like. It's good to be aware that
if FOO
is just a shorthand for addingdepends on FOO
to all the stuff within at least.People tend to read a bunch of things into Kconfig that aren't there (probably because the official docs aren't great). :)