Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sensors: Add Bosch BMA4xx-series driver
This is a driver targetting the Bosch BMA 4-series accelerometers. It has been specifically developed for the BMA422 but should be compatible with others in that line, excepting the BMA400. Supports key attributes and async RTIO one-shot operation. I2C operation is supported, with stubs for a SPI implementation provided for future improvement. Signed-off-by: Tristan Honscheid <honscheid@google.com>
- Loading branch information
1 parent
3c2a896
commit 674da2c
Showing
12 changed files
with
1,171 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
zephyr_library() | ||
|
||
zephyr_library_sources(bma4xx.c) | ||
zephyr_library_sources(bma4xx_i2c.c) | ||
zephyr_library_sources(bma4xx_spi.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# BMA422 3-axis accelerometer config options | ||
# | ||
# Copyright (c) 2023 Google LLC | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BMA4XX | ||
bool "BMA4XX 3-axis acceleration sensor" | ||
default y | ||
depends on DT_HAS_BOSCH_BMA4XX_ENABLED | ||
depends on SENSOR_ASYNC_API | ||
select I2C | ||
help | ||
Enable driver for Bosch BMA4XX (I2C-based) | ||
|
||
config BMA4XX_TEMPERATURE | ||
bool "Allow reading the BMA4XX die temperature" | ||
default n | ||
depends on BMA4XX | ||
help | ||
Allow reading the BMA4xx's on-chip temperature sensor. This creates | ||
extra bus activity and increases code size. | ||
|
||
config EMUL_BMA4XX | ||
bool "Emulator for the BMA4XX" | ||
default y | ||
depends on BMA4XX | ||
depends on EMUL | ||
help | ||
Enable the hardware emulator for the BMA4XX. Doing so allows exercising | ||
sensor APIs for this sensor in native_posix and qemu. |
Oops, something went wrong.