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:
parent
0de655e371
commit
fa90b5c243
5 changed files with 15 additions and 10 deletions
|
@ -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)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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)
|
|
||||||
|
|
|
@ -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.
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue