未验证 提交 eedb4e19 编写于 作者: o777788's avatar o777788 提交者: GitHub

[imxrt] 消除编译警告

上级 6a225fff
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
static struct rt_memheap system_heap; static struct rt_memheap system_heap;
#endif #endif
static int rt_hw_sdram_init(void) int rt_hw_sdram_init(void)
{ {
int result = RT_EOK; int result = RT_EOK;
semc_config_t config; semc_config_t config;
...@@ -104,7 +104,7 @@ static void sdram_test(void) ...@@ -104,7 +104,7 @@ static void sdram_test(void)
rt_uint32_t *sdram = (rt_uint32_t *)SDRAM_BANK_ADDR; /* SDRAM start address. */ rt_uint32_t *sdram = (rt_uint32_t *)SDRAM_BANK_ADDR; /* SDRAM start address. */
bool result = true; bool result = true;
LOG_D("\r\n SEMC SDRAM Memory 32 bit Write Start, Start Address 0x%x, Data Length %d !\r\n", sdram, datalen); LOG_D("SEMC SDRAM Memory 32 bit Write Start, Start Address 0x%x, Data Length %d !", sdram, datalen);
/* Prepare data and write to SDRAM. */ /* Prepare data and write to SDRAM. */
for (index = 0; index < datalen; index++) for (index = 0; index < datalen; index++)
{ {
...@@ -112,14 +112,14 @@ static void sdram_test(void) ...@@ -112,14 +112,14 @@ static void sdram_test(void)
sdram[index] = sdram_writeBuffer[index]; sdram[index] = sdram_writeBuffer[index];
} }
LOG_D("\r\n SEMC SDRAM Read 32 bit Data Start, Start Address 0x%x, Data Length %d !\r\n", sdram, datalen); LOG_D("SEMC SDRAM Read 32 bit Data Start, Start Address 0x%x, Data Length %d !", sdram, datalen);
/* Read data from the SDRAM. */ /* Read data from the SDRAM. */
for (index = 0; index < datalen; index++) for (index = 0; index < datalen; index++)
{ {
sdram_readBuffer[index] = sdram[index]; sdram_readBuffer[index] = sdram[index];
} }
LOG_D("\r\n SEMC SDRAM 32 bit Data Write and Read Compare Start!\r\n"); LOG_D("SEMC SDRAM 32 bit Data Write and Read Compare Start!");
/* Compare the two buffers. */ /* Compare the two buffers. */
while (datalen--) while (datalen--)
{ {
...@@ -132,11 +132,11 @@ static void sdram_test(void) ...@@ -132,11 +132,11 @@ static void sdram_test(void)
if (!result) if (!result)
{ {
LOG_E("\r\n SEMC SDRAM 32 bit Data Write and Read Compare Failed!\r\n"); LOG_E("SEMC SDRAM 32 bit Data Write and Read Compare Failed!");
} }
else else
{ {
LOG_D("\r\n SEMC SDRAM 32 bit Data Write and Read Compare Succeed!\r\n"); LOG_D("SEMC SDRAM 32 bit Data Write and Read Compare Succeed!");
} }
} }
MSH_CMD_EXPORT(sdram_test, sdram test) MSH_CMD_EXPORT(sdram_test, sdram test)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册