mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
spi_flash: refactor spi_flash.h to esp_rom_spiflash.h but keep the content in spi_flash.h
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
const static char *TAG = "Octal Flash";
|
||||
// default value is rom_default_spiflash_legacy_flash_func
|
||||
extern const spiflash_legacy_funcs_t *rom_spiflash_legacy_funcs;
|
||||
extern int SPI_write_enable(void *spi);
|
||||
static uint32_t s_chip_id;
|
||||
|
||||
|
||||
@@ -78,7 +77,7 @@ static void s_set_flash_dtr_str_opi_mode(int spi_num, uint8_t val)
|
||||
int dummy = 0;
|
||||
int data_bit_len = 8;
|
||||
|
||||
SPI_write_enable(&g_rom_flashchip);
|
||||
esp_rom_spiflash_write_enable(&g_rom_flashchip);
|
||||
//SPI command, WRCR2
|
||||
esp_rom_opiflash_exec_cmd(spi_num, ESP_ROM_SPIFLASH_FASTRD_MODE,
|
||||
SPI_FLASH_SPI_CMD_WRCR2, cmd_len,
|
||||
@@ -129,7 +128,7 @@ static void s_set_flash_ouput_driver_strength(int spi_num, uint8_t strength)
|
||||
//Write
|
||||
//SPI command, WRSR/WRCR
|
||||
data_bit_len = 16;
|
||||
SPI_write_enable(&g_rom_flashchip);
|
||||
esp_rom_spiflash_write_enable(&g_rom_flashchip);
|
||||
esp_rom_opiflash_exec_cmd(spi_num, ESP_ROM_SPIFLASH_FASTRD_MODE,
|
||||
SPI_FLASH_SPI_CMD_WRSRCR, cmd_len,
|
||||
addr, addr_bit_len,
|
||||
|
Reference in New Issue
Block a user