提交 1d1376e7 编写于 作者: liuduanfei's avatar liuduanfei

clean code

上级 5db00fa7
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
* *
* Change Logs: * Change Logs:
* Date Author Notes * Date Author Notes
* 2020-05-23 liuduanfei first version * 2020-05-23 liuduanfei first version
*/ */
#include "board.h" #include "board.h"
#include "drv_sdio.h" #include "drv_sdio.h"
#include <dfs_fs.h>
#ifdef BSP_USING_SDMMC #ifdef BSP_USING_SDMMC
...@@ -193,11 +194,9 @@ static void rthw_sdio_send_command(struct rthw_sdio *sdio, struct sdio_pkg *pkg) ...@@ -193,11 +194,9 @@ static void rthw_sdio_send_command(struct rthw_sdio *sdio, struct sdio_pkg *pkg)
/* data pre configuration */ /* data pre configuration */
if (data != RT_NULL) if (data != RT_NULL)
{ {
SCB_CleanInvalidateDCache(); SCB_CleanInvalidateDCache();
reg_cmd |= SDMMC_CMD_CMDTRANS; reg_cmd |= SDMMC_CMD_CMDTRANS;
hw_sdio->mask &= ~(SDMMC_MASK_CMDRENDIE | SDMMC_MASK_CMDSENTIE); hw_sdio->mask &= ~(SDMMC_MASK_CMDRENDIE | SDMMC_MASK_CMDSENTIE);
hw_sdio->dtimer = HW_SDIO_DATATIMEOUT; hw_sdio->dtimer = HW_SDIO_DATATIMEOUT;
hw_sdio->dlen = data->blks * data->blksize; hw_sdio->dlen = data->blks * data->blksize;
...@@ -232,7 +231,6 @@ static void rthw_sdio_send_command(struct rthw_sdio *sdio, struct sdio_pkg *pkg) ...@@ -232,7 +231,6 @@ static void rthw_sdio_send_command(struct rthw_sdio *sdio, struct sdio_pkg *pkg)
} }
} }
/* data post configuration */ /* data post configuration */
if (data != RT_NULL) if (data != RT_NULL)
{ {
...@@ -452,9 +450,6 @@ int rt_hw_sdio_init(void) ...@@ -452,9 +450,6 @@ int rt_hw_sdio_init(void)
} }
INIT_DEVICE_EXPORT(rt_hw_sdio_init); INIT_DEVICE_EXPORT(rt_hw_sdio_init);
#include <dfs_fs.h>
int mnt_init(void) int mnt_init(void)
{ {
rt_thread_delay(RT_TICK_PER_SECOND); rt_thread_delay(RT_TICK_PER_SECOND);
......
/* /*
* Copyright (c) 2006-2018, RT-Thread Development Team * Copyright (c) 2006-2020, RT-Thread Development Team
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
* Change Logs: * Change Logs:
* Date Author Notes * Date Author Notes
* * 2020-05-23 liuduanfei first version
*/ */
#ifndef __DRV_SDIO_H__ #ifndef __DRV_SDIO_H__
#define __DRV_SDIO_H__ #define __DRV_SDIO_H__
#include <rtthread.h> #include <rtthread.h>
#include "rtdevice.h" #include "rtdevice.h"
#include <rthw.h> #include <rthw.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册