Просмотр исходного кода

修改内核名称长度到16,添加copyright

@lin12345678 4 лет назад
Родитель
Сommit
05d7be97c7

+ 1 - 1
bsp/imx6ull-artpi-smart/applications/mnt.c

@@ -20,7 +20,7 @@ int mnt_init(void)
     int part_id = 1;
     rt_thread_mdelay(500);
 
-    if (dfs_mount("em","/","ext",0,(void *)part_id) != 0)
+    if (dfs_mount("emmc","/","ext",0,(void *)part_id) != 0)
     {
         rt_kprintf("Dir / mount failed!\n");
         return -1;

+ 2 - 2
bsp/imx6ull-artpi-smart/drivers/drv_sdio.c

@@ -616,7 +616,7 @@ rt_int32_t imxrt_mci_init(void)
     mmcsd1->usdhc_div = kCLOCK_Usdhc1Div;
     mmcsd1->usdhc_adma2_table = g_usdhcAdma2Table;
 
-    strncpy(host1->name, "sd", 8);
+    strncpy(host1->name, "sd", sizeof(host1->name)-1);
     host1->ops = &ops;
     host1->freq_min = 375000;
     host1->freq_max = 25000000;
@@ -658,7 +658,7 @@ rt_int32_t imxrt_mci_init(void)
     mmcsd2->usdhc_div = kCLOCK_Usdhc1Div;
     mmcsd2->usdhc_adma2_table = g_usdhcAdma2Table;
 
-    strncpy(host2->name, "em", 8);
+    strncpy(host2->name, "emmc", sizeof(host2->name)-1);
     host2->ops = &ops;
     host2->freq_min = 375000;
     host2->freq_max = 52000000;

+ 9 - 0
bsp/imx6ull-artpi-smart/drivers/drv_sdio.h

@@ -1,3 +1,12 @@
+/*
+ * Copyright (c) 2006-2021, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
+ * Date           Author       Notes
+ * 2021-07-14     linzhenxing  first version
+ */
 #ifndef __DRV_SDIO_H__
 #define __DRV_SDIO_H__
 

+ 1 - 1
bsp/imx6ull-artpi-smart/rtconfig.h

@@ -6,7 +6,7 @@
 
 /* RT-Thread Kernel */
 
-#define RT_NAME_MAX 8
+#define RT_NAME_MAX 16
 #define RT_USING_SMART
 #define RT_ALIGN_SIZE 4
 #define RT_THREAD_PRIORITY_32