Skip to content

Conversation

@kentjhall
Copy link

Optional counter API function which allows for a driver to determine counter
frequency at runtime; if set, this supersedes whatever is set statically in the
counter_config_info struct.

This is to address an issue which came up in my other PR #39414, where I was told that setting freq in the counter_config_info struct at runtime is a bad idea; this remedy was suggested by @nordic-krch.

If this goes through, I suggest drivers/counter/counter_imx_epit.c and drivers/counter/counter_mcux_ctimer.c be updated to use get_freq as well, since they similarly update freq in their timer initialization routines.

@github-actions github-actions bot added the area: API Changes to public APIs label Dec 8, 2021
Optional counter API function which allows for a driver to determine
counter frequency at runtime; if set, this supersedes whatever is set
statically in the counter_config_info struct.

Signed-off-by: Kent Hall <[email protected]>
@kentjhall kentjhall force-pushed the counter-api-get-freq branch from c3b4022 to f7adb53 Compare December 8, 2021 20:19
@kentjhall
Copy link
Author

Note: force-pushed a re-dated commit (code unchanged) because one of the automated tests had failed without explanation. I suspect this must have been a bug, as the test now passes.

@cfriedt cfriedt merged commit c67b44c into zephyrproject-rtos:main Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: API Changes to public APIs area: Counter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants