-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
net: ieee802154: Fix nrf5_get_acc
to return value selected for board.
#64131
net: ieee802154: Fix nrf5_get_acc
to return value selected for board.
#64131
Conversation
`nrf5_get_acc` was returning value hardcoded from the Kconfig related to openthread rather than actual value selected for the board. Signed-off-by: Przemyslaw Bida <[email protected]>
@@ -640,7 +640,7 @@ static uint8_t nrf5_get_acc(const struct device *dev) | |||
{ | |||
ARG_UNUSED(dev); | |||
|
|||
return CONFIG_IEEE802154_NRF5_DELAY_TRX_ACC; |
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 orphanes IEEE802154_NRF5_DELAY_TRX_ACC in Kconfig.nrf5, correct? I cannot see any other instance where it's used. Should be deprecated or removed then.
Additionally the previous implementation limited the range to 255 - is that no longer required?
return MIN(UINT8_MAX, CONFIG_CLOCK_CONTROL_NRF_ACCURACY);
The return value is uint8_t - so if this is not clamped, then it will return bad values.
Will be fixed elsewhere. |
@canisLupus1313 Could you at least elaborate please? We get two approvals and when I take the time to review then it's suddenly solved elsewhere? Otherwise it's just a waste of time to review that stuff from my side. |
@fgrandel this PR war closed after discussion with @edmont . Changing default value of Secondly the issue isn't actually introduced in zephyr but rather in NCS by overriding the default in here: https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/net/openthread/Kconfig.defconfig#L188 And @fgrandel thanks for review. |
@canisLupus1313 Thanks for the explanation. Makes sense. |
nrf5_get_acc
was returning value hardcoded from the Kconfig related to openthread rather than actual value selected for the board.