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
Merged
Changes from 1 commit
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
Next Next commit
mcux-sdk: use Zephyr's MIN/MAX/ARRAY_SIZE
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 <gerard.marull@nordicsemi.no>
gmarull committed Oct 18, 2022
commit d787257bd339cde76919132b7f21ccfbc27f897c
4 changes: 4 additions & 0 deletions mcux/mcux-sdk/drivers/common/fsl_common.h
Original file line number Diff line number Diff line change
@@ -218,6 +218,9 @@ enum
/*! @brief Type used for all status and error return values. */
typedef int32_t status_t;

#ifdef __ZEPHYR__
#include <zephyr/sys/util.h>
#else
/*!
* @name Min/max macros
* @{
@@ -235,6 +238,7 @@ typedef int32_t status_t;
#if !defined(ARRAY_SIZE)
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif
#endif /* __ZEPHYR__ */

/*! @name UINT16_MAX/UINT32_MAX value */
/* @{ */