emul: spi: bmi160: Move to top-level directory

This emulator currently only supports SPI. Before making it also
support I2C, move it up a directory to avoid I2C uses missing it.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2020-10-22 13:18:29 -06:00 committed by Carles Cufí
commit fa90b5c243
5 changed files with 15 additions and 10 deletions

View file

@ -3,5 +3,9 @@
zephyr_library() zephyr_library()
zephyr_library_sources_ifdef(CONFIG_EMUL emul.c) zephyr_library_sources_ifdef(CONFIG_EMUL emul.c)
zephyr_include_directories_ifdef(CONFIG_EMUL_BMI160 ${ZEPHYR_BASE}/drivers/sensor/bmi160)
zephyr_library_sources_ifdef(CONFIG_EMUL_BMI160 emul_bmi160.c)
add_subdirectory(i2c) add_subdirectory(i2c)
add_subdirectory(spi) add_subdirectory(spi)

View file

@ -34,6 +34,17 @@ module = EMUL
module-str = emul module-str = emul
source "subsys/logging/Kconfig.template.log_config" source "subsys/logging/Kconfig.template.log_config"
config EMUL_BMI160
bool "Emulate a Bosch BMI160 accelerometer"
help
This is an emulator for the Bosch BMI160 accelerometer.
It provides readings which follow a simple sequence, thus allowing
test code to check that things are working as expected.
It supports both I2C and SPI which is why it is not in one of the
i2c/ or spi/ directories.
source "subsys/emul/i2c/Kconfig" source "subsys/emul/i2c/Kconfig"
source "subsys/emul/spi/Kconfig" source "subsys/emul/spi/Kconfig"

View file

@ -2,5 +2,3 @@
# Once we have more than 10 devices we should consider splitting them into # Once we have more than 10 devices we should consider splitting them into
# subdirectories to match the drivers/ structure. # subdirectories to match the drivers/ structure.
zephyr_include_directories_ifdef(CONFIG_EMUL_BMI160 ${ZEPHYR_BASE}/drivers/sensor/bmi160)
zephyr_library_sources_ifdef(CONFIG_EMUL_BMI160 emul_bmi160.c)

View file

@ -2,11 +2,3 @@
# Copyright 2020 Google LLC # Copyright 2020 Google LLC
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
config EMUL_BMI160
bool "Emulate a Bosch BMI160 accelerometer"
help
This is an emulator for the Bosch BMI160 accelerometer.
It provides readings which follow a simple sequence, thus allowing
test code to check that things are working as expected.