Skip to content
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

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/ieee802154/ieee802154_nrf5.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ static uint8_t nrf5_get_acc(const struct device *dev)
{
ARG_UNUSED(dev);

return CONFIG_IEEE802154_NRF5_DELAY_TRX_ACC;
Copy link
Contributor

@fgrandel fgrandel Oct 19, 2023

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.

return CONFIG_CLOCK_CONTROL_NRF_ACCURACY;
}

static int nrf5_start(const struct device *dev)
Expand Down
Loading