diff options
| author | SummerGift <[email protected]> | 2018-11-22 14:52:02 +0800 |
|---|---|---|
| committer | SummerGift <[email protected]> | 2018-11-22 14:52:02 +0800 |
| commit | 92fac771b143b25a2c813e2f1f5e5bcbef777cfd (patch) | |
| tree | 585626b8ea276a5c7571797edfa37399bff84bcb /components/drivers | |
| parent | 025951939ae1f665a7e0dd276c94bdfb4051bd25 (diff) | |
[components][driver]: Store SPI configuration information to msd device
Diffstat (limited to 'components/drivers')
| -rw-r--r-- | components/drivers/spi/spi_msd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/components/drivers/spi/spi_msd.c b/components/drivers/spi/spi_msd.c index 86969f3180..a8f97a8de8 100644 --- a/components/drivers/spi/spi_msd.c +++ b/components/drivers/spi/spi_msd.c @@ -1214,7 +1214,11 @@ static rt_err_t rt_msd_init(rt_device_t dev) cfg.data_width = 8; 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 */ |
