summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorSummerGift <[email protected]>2018-11-22 13:57:28 +0800
committerSummerGift <[email protected]>2018-11-22 13:57:28 +0800
commit025951939ae1f665a7e0dd276c94bdfb4051bd25 (patch)
tree43ece80302b87d561438358e2f4760a9f60691e9 /components
parent63a6f6c4d2540b003296594c4b916cc1ba8d0b16 (diff)
[components][driver]: spi sd card, remove the extra reinitialization code
Diffstat (limited to 'components')
-rw-r--r--components/drivers/spi/spi_msd.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/components/drivers/spi/spi_msd.c b/components/drivers/spi/spi_msd.c
index ed121e184d..86969f3180 100644
--- a/components/drivers/spi/spi_msd.c
+++ b/components/drivers/spi/spi_msd.c
@@ -1249,16 +1249,6 @@ static rt_size_t rt_msd_read(rt_device_t dev, rt_off_t pos, void *buffer, rt_siz
goto _exit;
}
- /* config spi to high speed */
- {
- struct rt_spi_configuration cfg;
- cfg.data_width = 8;
- cfg.mode = RT_SPI_MODE_0 | RT_SPI_MSB; /* SPI Compatible Modes 0 */
- cfg.max_hz = msd->max_clock;
-
- rt_spi_configure(msd->spi_device, &cfg);
- } /* config spi */
-
/* SINGLE_BLOCK? */
if (size == 1)
{
@@ -1335,16 +1325,6 @@ static rt_size_t rt_msd_sdhc_read(rt_device_t dev, rt_off_t pos, void *buffer, r
goto _exit;
}
- /* config spi to high speed */
- {
- struct rt_spi_configuration cfg;
- cfg.data_width = 8;
- cfg.mode = RT_SPI_MODE_0 | RT_SPI_MSB; /* SPI Compatible Modes 0 */
- cfg.max_hz = msd->max_clock;
-
- rt_spi_configure(msd->spi_device, &cfg);
- } /* config spi */
-
/* SINGLE_BLOCK? */
if (size == 1)
{
@@ -1422,15 +1402,6 @@ static rt_size_t rt_msd_write(rt_device_t dev, rt_off_t pos, const void *buffer,
goto _exit;
}
- /* config spi to high speed */
- {
- struct rt_spi_configuration cfg;
- cfg.data_width = 8;
- cfg.mode = RT_SPI_MODE_0 | RT_SPI_MSB; /* SPI Compatible Modes 0 */
- cfg.max_hz = msd->max_clock;
-
- rt_spi_configure(msd->spi_device, &cfg);
- } /* config spi */
/* SINGLE_BLOCK? */
if (size == 1)
@@ -1550,16 +1521,6 @@ static rt_size_t rt_msd_sdhc_write(rt_device_t dev, rt_off_t pos, const void *bu
goto _exit;
}
- /* config spi to high speed */
- {
- struct rt_spi_configuration cfg;
- cfg.data_width = 8;
- cfg.mode = RT_SPI_MODE_0 | RT_SPI_MSB; /* SPI Compatible Modes 0 */
- cfg.max_hz = msd->max_clock;
-
- rt_spi_configure(msd->spi_device, &cfg);
- } /* config spi */
-
/* SINGLE_BLOCK? */
if (size == 1)
{