refactor(spi_flash): Use new spi_flash register sturct and deperecate the old one

This commit is contained in:
Cao Sen Miao
2024-01-04 10:24:17 +08:00
parent 8325b507e0
commit 2e83fa1c69
28 changed files with 663 additions and 5241 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -447,6 +447,26 @@ static inline void spi_flash_ll_set_extra_address(spi_dev_t *dev, uint32_t extra
// Not supported on ESP32.
}
/**
* @brief Write protect signal output when SPI is idle
* @param level 1: 1: output high, 0: output low
*/
static inline void spi_flash_ll_set_wp_level(spi_dev_t *dev, bool level)
{
dev->ctrl.wp = level;
}
/**
* @brief Get the ctrl value of mspi
*
* @return uint32_t The value of ctrl register
*/
static inline uint32_t spi_flash_ll_get_ctrl_val(spi_dev_t *dev)
{
return dev->ctrl.val;
}
#ifdef __cplusplus
}
#endif