mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/spi_flash_cs_setup_xiaomi_v4.0' into customer/maintain_v4.0_xiaomi_tsf_issue
See merge request espressif/esp-idf!13893
This commit is contained in:
commit
b24a5e78f2
@ -340,3 +340,9 @@ static inline void spi_flash_ll_set_dummy(spi_dev_t *dev, uint32_t dummy_n)
|
|||||||
dev->user.usr_dummy = dummy_n ? 1 : 0;
|
dev->user.usr_dummy = dummy_n ? 1 : 0;
|
||||||
dev->user1.usr_dummy_cyclelen = dummy_n - 1;
|
dev->user1.usr_dummy_cyclelen = dummy_n - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void spi_flash_ll_set_cs_setup(spi_dev_t *dev, uint32_t cs_setup_time)
|
||||||
|
{
|
||||||
|
dev->user.cs_setup = (cs_setup_time > 0 ? 1 : 0);
|
||||||
|
dev->ctrl2.setup_time = cs_setup_time - 1;
|
||||||
|
}
|
||||||
|
@ -38,6 +38,7 @@ esp_err_t spi_flash_hal_device_config(spi_flash_host_driver_t *host)
|
|||||||
spi_flash_ll_reset(dev);
|
spi_flash_ll_reset(dev);
|
||||||
spi_flash_ll_set_cs_pin(dev, drv_data->cs_num);
|
spi_flash_ll_set_cs_pin(dev, drv_data->cs_num);
|
||||||
spi_flash_ll_set_clock(dev, &drv_data->clock_conf);
|
spi_flash_ll_set_clock(dev, &drv_data->clock_conf);
|
||||||
|
spi_flash_ll_set_cs_setup(dev, 1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* workaround for the ROM: the ROM, as well as the OpenOCD, don't know the
|
* workaround for the ROM: the ROM, as well as the OpenOCD, don't know the
|
||||||
|
Loading…
Reference in New Issue
Block a user