Skip to content

Commit

Permalink
drivers: bmm350
Browse files Browse the repository at this point in the history
Add release-ready BMM350.
This driver will be added to Zephyr soon,
but with this, customers can already try it out
on their Thingy:91 X devices.

Signed-off-by: Maximilian Deubel <[email protected]>
  • Loading branch information
maxd-nordic committed Jan 24, 2025
1 parent 2e8ae9b commit 5d9adcd
Show file tree
Hide file tree
Showing 17 changed files with 2,018 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/sensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ add_subdirectory_ifdef(CONFIG_SENSOR_STUB sensor_stub)
add_subdirectory_ifdef(CONFIG_PMW3360 pmw3360)
add_subdirectory_ifdef(CONFIG_PAW3212 paw3212)
add_subdirectory_ifdef(CONFIG_BME68X_IAQ bme68x_iaq)
add_subdirectory_ifdef(CONFIG_BMM350 bmm350)
1 change: 1 addition & 0 deletions drivers/sensor/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ rsource "sensor_stub/Kconfig"
rsource "pmw3360/Kconfig"
rsource "paw3212/Kconfig"
rsource "bme68x_iaq/Kconfig"
rsource "bmm350/Kconfig"

endif # SENSOR
8 changes: 8 additions & 0 deletions drivers/sensor/bmm350/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2024 Bosch Sensortec GmbH

Check failure on line 1 in drivers/sensor/bmm350/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / call-workflow / Run license checks on patch series (PR)

License Problem

"APACHE-2.0" license is not allowed for this file.

# SPDX-License-Identifier: Apache-2.0


zephyr_library()
zephyr_library_sources(bmm350.c bmm350_i2c.c)
zephyr_library_sources_ifdef(CONFIG_BMM350_TRIGGER bmm350_trigger.c)
60 changes: 60 additions & 0 deletions drivers/sensor/bmm350/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# BMM350 Geomagnetic sensor configuration options

Check failure on line 1 in drivers/sensor/bmm350/Kconfig

View workflow job for this annotation

GitHub Actions / call-workflow / Run license checks on patch series (PR)

License Problem

"APACHE-2.0" license is not allowed for this file.

# Copyright (c) 2024 Bosch Sensortec GmbH

# SPDX-License-Identifier: Apache-2.0


menuconfig BMM350
bool "BMM350 I2C Geomagnetic Chip"
default y
depends on DT_HAS_BOSCH_BMM350_ENABLED
select I2C
help
Enable driver for BMM350 I2C-based Geomagnetic sensor.
if BMM350

choice BMM350_TRIGGER_MODE
prompt "Trigger mode"
default BMM350_TRIGGER_NONE
help
Specify the type of triggering to be used by the driver.

config BMM350_TRIGGER_NONE
bool "No trigger"

config BMM350_TRIGGER_GLOBAL_THREAD
bool "Use global thread"
select BMM350_TRIGGER

config BMM350_TRIGGER_OWN_THREAD
bool "Use own thread"
select BMM350_TRIGGER

config BMM350_TRIGGER_DIRECT
bool "Use IRQ handler"
select BMM350_TRIGGER
endchoice

config BMM350_TRIGGER
bool

config BMM350_SAMPLING_RATE_RUNTIME
bool "Dynamic sampling rate"
help
Enable alteration of sampling rate attribute at runtime.
config BMM350_THREAD_PRIORITY
int "Own thread priority"
depends on BMM350_TRIGGER_OWN_THREAD
default 10
help
Priority of the thread used by the driver to handle interrupts.

config BMM350_THREAD_STACK_SIZE
int "Own thread stack size"
depends on BMM350_TRIGGER_OWN_THREAD
default 1024
help
Stack size of thread used by the driver to handle interrupts.

endif # BMM350
Loading

0 comments on commit 5d9adcd

Please sign in to comment.