diff --git a/bsp/imxrt/libraries/drivers/drv_can.c b/bsp/imxrt/libraries/drivers/drv_can.c index d360c5f432..2296f1ecfe 100644 --- a/bsp/imxrt/libraries/drivers/drv_can.c +++ b/bsp/imxrt/libraries/drivers/drv_can.c @@ -181,12 +181,12 @@ static rt_err_t can_cfg(struct rt_can_device *can_dev, struct can_configure *cfg #ifdef SOC_IMXRT1170_SERIES flexcan_timing_config_t timing_config; - memset(&timing_config, 0, sizeof(flexcan_timing_config_t)); + rt_memset(&timing_config, 0, sizeof(flexcan_timing_config_t)); if(FLEXCAN_CalculateImprovedTimingValues(can->base, config.baudRate, GetCanSrcFreq(can->base), &timing_config)) { /* Update the improved timing configuration*/ - memcpy(&(config.timingConfig), &timing_config, sizeof(flexcan_timing_config_t)); + rt_memcpy(&(config.timingConfig), &timing_config, sizeof(flexcan_timing_config_t)); } else { diff --git a/bsp/imxrt/libraries/drivers/drv_eth.c b/bsp/imxrt/libraries/drivers/drv_eth.c index 532ed5ad40..3d15bb5750 100644 --- a/bsp/imxrt/libraries/drivers/drv_eth.c +++ b/bsp/imxrt/libraries/drivers/drv_eth.c @@ -703,7 +703,7 @@ static status_t _ENET_SendFrame(ENET_Type *base, if (sizeleft > handle->txBuffSizeAlign[ringId]) { /* Data copy. */ - (void)memcpy((void *)(uint32_t *)address, (void *)(uint32_t *)src, + (void)rt_memcpy((void *)(uint32_t *)address, (void *)(uint32_t *)src, handle->txBuffSizeAlign[ringId]); #if defined(FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL) && FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL if (handle->txMaintainEnable[ringId]) @@ -733,7 +733,7 @@ static status_t _ENET_SendFrame(ENET_Type *base, } else { - (void)memcpy((void *)(uint32_t *)address, (void *)(uint32_t *)src, sizeleft); + (void)rt_memcpy((void *)(uint32_t *)address, (void *)(uint32_t *)src, sizeleft); #if defined(FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL) && FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL if (handle->txMaintainEnable[ringId]) { @@ -893,7 +893,7 @@ static status_t _ENET_SendFrame(ENET_Type *base, enet_handle_t *handle, const ui #else address = (uint32_t)curBuffDescrip->buffer; #endif /* FSL_FEATURE_MEMORY_HAS_ADDRESS_OFFSET */ - memcpy((void *)address, data + len, handle->txBuffSizeAlign[0]); + rt_memcpy((void *)address, data + len, handle->txBuffSizeAlign[0]); /* Data length update. */ curBuffDescrip->length = handle->txBuffSizeAlign[0]; len += handle->txBuffSizeAlign[0]; @@ -910,7 +910,7 @@ static status_t _ENET_SendFrame(ENET_Type *base, enet_handle_t *handle, const ui #else address = (uint32_t)curBuffDescrip->buffer; #endif /* FSL_FEATURE_MEMORY_HAS_ADDRESS_OFFSET */ - memcpy((void *)address, data + len, sizeleft); + rt_memcpy((void *)address, data + len, sizeleft); curBuffDescrip->length = sizeleft; /* Set Last buffer wrap flag. */ curBuffDescrip->control |= ENET_BUFFDESCRIPTOR_TX_READY_MASK | ENET_BUFFDESCRIPTOR_TX_LAST_MASK; diff --git a/bsp/imxrt/libraries/drivers/drv_flexspi.c b/bsp/imxrt/libraries/drivers/drv_flexspi.c index ee731e1e13..e943dde048 100644 --- a/bsp/imxrt/libraries/drivers/drv_flexspi.c +++ b/bsp/imxrt/libraries/drivers/drv_flexspi.c @@ -124,7 +124,7 @@ static void flexspi_test(void) *(flexspi + 3) = send_buf[0]; LOG_D("FLEXSPI Memory 32 bit Write End\n"); - memset(recv_buf, 0, sizeof(recv_buf)); + rt_memset(recv_buf, 0, sizeof(recv_buf)); LOG_D("FLEXSPI Memory 32 bit Read Start\n"); recv_buf[2] = *(flexspi + 11); diff --git a/bsp/imxrt/libraries/drivers/drv_sdio.c b/bsp/imxrt/libraries/drivers/drv_sdio.c index 8961b3abe3..9c756bba5a 100644 --- a/bsp/imxrt/libraries/drivers/drv_sdio.c +++ b/bsp/imxrt/libraries/drivers/drv_sdio.c @@ -174,7 +174,7 @@ static void _mmc_request(struct rt_mmcsd_host *host, struct rt_mmcsd_req *req) data = cmd->data; - memset(&dmaConfig, 0, sizeof(usdhc_adma_config_t)); + rt_memset(&dmaConfig, 0, sizeof(usdhc_adma_config_t)); /* config adma */ dmaConfig.dmaMode = USDHC_DMA_MODE; #if !(defined(FSL_FEATURE_USDHC_HAS_NO_RW_BURST_LEN) && FSL_FEATURE_USDHC_HAS_NO_RW_BURST_LEN) diff --git a/bsp/imxrt/libraries/drivers/drv_sdram.c b/bsp/imxrt/libraries/drivers/drv_sdram.c index 5daae7c401..d8a80af0f1 100644 --- a/bsp/imxrt/libraries/drivers/drv_sdram.c +++ b/bsp/imxrt/libraries/drivers/drv_sdram.c @@ -34,8 +34,8 @@ int rt_hw_sdram_init(void) #endif /* Initializes the MAC configure structure to zero. */ - memset(&config, 0, sizeof(semc_config_t)); - memset(&sdramconfig, 0, sizeof(semc_sdram_config_t)); + rt_memset(&config, 0, sizeof(semc_config_t)); + rt_memset(&sdramconfig, 0, sizeof(semc_sdram_config_t)); /* Initialize SEMC. */ SEMC_GetDefaultConfig(&config);