Przeglądaj źródła

fix: sdio的返回值写法有问题,修正之

Wendal Chen 2 lat temu
rodzic
commit
974474ada1
2 zmienionych plików z 4 dodań i 7 usunięć
  1. 3 6
      app/port/luat_sdio_air101.c
  2. 1 1
      platform/drivers/uart/wm_uart.c

+ 3 - 6
app/port/luat_sdio_air101.c

@@ -95,7 +95,7 @@ DSTATUS sdhc_sdio_initialize (
 	luat_fatfs_sdio_t* userdata
 )
 {
-		int ret;
+	int ret;
 	luat_sdio_init(0);
 	ret= sdh_card_init(&fs_rca);
 	if(ret)
@@ -107,7 +107,6 @@ DSTATUS sdhc_sdio_initialize (
 	if(ret)
 		goto end;
 end:
-	return ret;
 	return 0;
 }
 
@@ -128,7 +127,7 @@ DRESULT sdhc_sdio_read (
 	UINT count			/* Sector count (1..128) */
 )
 {
-		int ret, i;
+	int ret = 0, i;
 	int buflen = BLOCK_SIZE*count;
     BYTE *rdbuff = buff;
 
@@ -165,7 +164,6 @@ DRESULT sdhc_sdio_read (
     }
 
 	return ret;
-	return 0;
 }
 
 DRESULT sdhc_sdio_write (
@@ -175,7 +173,7 @@ DRESULT sdhc_sdio_write (
 	UINT count			/* Sector count (1..128) */
 )
 {
-		int ret, i;
+	int ret = 0, i;
 	int buflen = BLOCK_SIZE*count;
     BYTE *wrbuff = buff;
     
@@ -211,7 +209,6 @@ DRESULT sdhc_sdio_write (
     }
 
 	return ret;
-	return 0;
 }
 
 DRESULT sdhc_sdio_ioctl (

+ 1 - 1
platform/drivers/uart/wm_uart.c

@@ -761,7 +761,7 @@ ATTRIBUTE_ISR void UART2_4_IRQHandler(void)
     u32 fifos;
     u8 escapefifocnt = 0;	
     u32 rxlen = 0;
-    u8 ch;
+    u8 ch = 0;
     csi_kernel_intrpt_enter();
 
     intr_src = port->regs->UR_INTS;