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

mcux-sdk: use Zephyr's MIN/MAX/ARRAY_SIZE #197

Merged
merged 2 commits into from
Oct 20, 2022

Conversation

gmarull
Copy link
Member

@gmarull gmarull commented Oct 18, 2022

When HAL is used in the context of Zephyr, use Zephyr's MIN/MAX/ARRAY_SIZE to avoid namespace collisions.

Also moved KB definition to the only source file using it (was also causing collisions in Zephyr).

Signed-off-by: Gerard Marull-Paretas [email protected]

When HAL is used in the context of Zephyr, use Zephyr's
MIN/MAX/ARRAY_SIZE to avoid namespace collisions.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
@gmarull
Copy link
Member Author

gmarull commented Oct 18, 2022

Alternative to #196

The KB define is unnecessarily polluting the namespace (clashes with
zephyr/sys/util.h definition) since it is only used once in a source
file. To fix the problem, definition has been moved to the source file.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
Copy link

@de-nordic de-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Love the idea of removing common defines out of interface headers.

@dleach02 dleach02 merged commit 9bc1e79 into zephyrproject-rtos:master Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants