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
Show file tree
Hide file tree
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
4 changes: 0 additions & 4 deletions mcux/mcux-sdk/CMSIS/Core_A/Include/mmu_armv8a.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
extern "C" {
#endif

#ifndef KB
#define KB(x) ((x) << 10)
#endif

/******************************************************************************/

/* Following Memory types supported through MAIR encodings can be passed
Expand Down
4 changes: 4 additions & 0 deletions mcux/mcux-sdk/CMSIS/Core_A/Source/mmu_armv8a.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif

#ifndef KB
#define KB(x) ((x) << 10)
#endif

#ifndef CONFIG_MMU_PAGE_SIZE
#define CONFIG_MMU_PAGE_SIZE 4096
#endif
Expand Down
4 changes: 4 additions & 0 deletions mcux/mcux-sdk/drivers/common/fsl_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
* @{
Expand All @@ -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 */
/* @{ */
Expand Down