Skip to content

Commit 10fbd1d

Browse files
lucien-nxpmmahadevan108
authored andcommitted
mcux: mcux-sdk: drivers: s3mu: Update BIT macro name
BIT macro is defined in util_macro.h in zephyr, let's rename this macro to avoid conflicts. Signed-off-by: Lucien Zhao <[email protected]>
1 parent 1800b17 commit 10fbd1d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

mcux/mcux-sdk-ng/README

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ Origin:
4242
Patch List:
4343
- drivers/caam/fsl_caam.c: Move used job descriptors in the CAAM driver from the stack to noncacheable section. At time of writing, there should
4444
be four being used for entropy in zephyr.
45+
- drivers/s3mu/fsl_s3mu.c: rename _BIT macro to avoid collision from util_macro.h in Zephyr

mcux/mcux-sdk-ng/drivers/s3mu/fsl_s3mu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* Definitions
2020
*******************************************************************************/
2121

22-
#define BIT(x) (uint32_t)(1UL << (x))
22+
#define _BIT(x) (uint32_t)(1UL << (x))
2323
#define MU_READ_HEADER (0x01u)
2424
#define GET_HDR_SIZE(x) (((x) & (uint32_t)0xFF00) >> 8u)
2525

@@ -79,7 +79,7 @@ status_t S3MU_SendMessage(S3MU_Type *mu, void *buf, size_t wordCount)
7979
/* Static function to write one word to transmit register specified by index */
8080
static void s3mu_hal_send_data(S3MU_Type *mu, uint32_t regid, uint32_t *data)
8181
{
82-
uint32_t mask = (BIT(regid));
82+
uint32_t mask = (_BIT(regid));
8383
while ((mu->TSR & mask) == 0u)
8484
{
8585
}
@@ -167,7 +167,7 @@ status_t S3MU_ReadMessage(S3MU_Type *mu, uint32_t *buf, size_t *size, uint8_t re
167167
/* Static function to retrieve one word from receive register specified by index */
168168
static void s3mu_hal_receive_data(S3MU_Type *mu, uint32_t regid, uint32_t *data)
169169
{
170-
uint32_t mask = BIT(regid);
170+
uint32_t mask = _BIT(regid);
171171

172172
while ((mu->RSR & mask) == 0u)
173173
{
@@ -248,7 +248,7 @@ static status_t s3mu_read_data_wait(S3MU_Type *mu, uint32_t *buf, uint8_t *size,
248248
/* Static function to retrieve one word from receive register specified by index with wait */
249249
static status_t s3mu_hal_receive_data_wait(S3MU_Type *mu, uint8_t regid, uint32_t *data, uint32_t wait)
250250
{
251-
uint32_t mask = BIT(regid);
251+
uint32_t mask = _BIT(regid);
252252
status_t ret = kStatus_Fail;
253253
while ((mu->RSR & mask) == 0u)
254254
{

0 commit comments

Comments
 (0)