Commit 424c187e authored by Francois Ramu's avatar Francois Ramu Committed by Fabio Baltieri
Browse files

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: default avatarFrancois Ramu <francois.ramu@st.com>
parent 06a58412
Loading
Loading
Loading
Loading
+1 −1
Changes for drivers/flash/CMakeLists.txt: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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)
+0 −11
Changes for drivers/flash/flash_stm32wba_fm.c: 0 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -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)