drivers: flash: stm32wba flash driver moves sem functions

When the CONFIG_BT_STM32WBA the stm32wba_fm flash driver is compiled
and must takes flash_stm32_sem_take/give functions from the
flash_stm32.h header file, like other stm32 series.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2024-12-11 15:34:58 +01:00 committed by Fabio Baltieri
parent 06a58412ac
commit 424c187e2a
2 changed files with 1 additions and 12 deletions

View file

@ -97,7 +97,7 @@ if(CONFIG_SOC_FLASH_STM32)
zephyr_library_sources_ifdef(CONFIG_DT_HAS_ST_STM32H7_FLASH_CONTROLLER_ENABLED flash_stm32h7x.c)
elseif(CONFIG_SOC_SERIES_STM32WBAX)
if(CONFIG_BT_STM32WBA)
# BLE is enabled. Use implementation over Flash Manager for coexistence wit RF activities
# BLE is enabled. Use implementation over Flash Manager for coexistence with RF activities
zephyr_library_sources(flash_stm32wba_fm.c)
else()
zephyr_library_sources_ifdef(CONFIG_DT_HAS_ST_STM32_FLASH_CONTROLLER_ENABLED flash_stm32.c flash_stm32wbax.c)

View file

@ -66,17 +66,6 @@ bool flash_stm32_valid_range(const struct device *dev, off_t offset,
return flash_stm32_range_exists(dev, offset, len);
}
static inline void flash_stm32_sem_take(const struct device *dev)
{
k_sem_take(&FLASH_STM32_PRIV(dev)->sem, K_FOREVER);
}
static inline void flash_stm32_sem_give(const struct device *dev)
{
k_sem_give(&FLASH_STM32_PRIV(dev)->sem);
}
static int flash_stm32_read(const struct device *dev, off_t offset,
void *data,
size_t len)