4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-07 04:44:34 +08:00

[components][driver]: Store SPI configuration information to msd device

This commit is contained in:
SummerGift 2018-11-22 14:52:02 +08:00
parent 025951939a
commit 92fac771b1

View File

@ -1215,6 +1215,10 @@ static rt_err_t rt_msd_init(rt_device_t dev)
cfg.mode = RT_SPI_MODE_0 | RT_SPI_MSB; /* SPI Compatible Modes 0 */
cfg.max_hz = msd->max_clock;
msd->spi_device->config.data_width = 8;
msd->spi_device->config.mode = RT_SPI_MODE_0 | RT_SPI_MSB;
msd->spi_device->config.max_hz = msd->max_clock;
rt_spi_configure(msd->spi_device, &cfg);
} /* config spi */