mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
refactor(spi_flash): Use new spi_flash register sturct and deperecate the old one
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user