Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: bmm350 #20069

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading