Skip to content

Commit 13d7a97

Browse files
committed
drivers: sensor: Add driver for MAX32664C
- Add DTS for MAX32664C - Add driver for MAX32664C - Add example for MAX32664C Heart rate measurement with Bluetooth Closes: #93473 Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
1 parent 578ec1e commit 13d7a97

File tree

17 files changed

+2396
-31
lines changed

17 files changed

+2396
-31
lines changed

drivers/sensor/adi/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ add_subdirectory_ifdef(CONFIG_ADXL345 adxl345)
1010
add_subdirectory_ifdef(CONFIG_ADXL362 adxl362)
1111
add_subdirectory_ifdef(CONFIG_ADXL367 adxl367)
1212
add_subdirectory_ifdef(CONFIG_ADXL372 adxl372)
13+
add_subdirectory_ifdef(CONFIG_MAX32664C max32664c)
1314
# zephyr-keep-sorted-stop

drivers/sensor/adi/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ source "drivers/sensor/adi/adxl345/Kconfig"
1010
source "drivers/sensor/adi/adxl362/Kconfig"
1111
source "drivers/sensor/adi/adxl367/Kconfig"
1212
source "drivers/sensor/adi/adxl372/Kconfig"
13+
source "drivers/sensor/adi/max32664c/Kconfig"
1314
# zephyr-keep-sorted-stop
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
zephyr_library()
4+
5+
zephyr_sources_ifdef(CONFIG_MAX32664C_USE_FIRMWARE_LOADER max32664c_bl.c)
6+
7+
zephyr_sources_ifdef(CONFIG_MAX32664C max32664c.c
8+
max32664c_worker.c
9+
max32664c_init.c
10+
)

drivers/sensor/adi/max32664c/Kconfig

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# MAX62664 biometric sensor hub configuration options.
2+
3+
# Copyright (c) 2025, Daniel Kampert
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
config MAX32664C
8+
bool "MAX32664C Driver"
9+
default y
10+
depends on DT_HAS_MAXIM_MAX32664C_ENABLED
11+
select I2C
12+
help
13+
Enable the driver for the MAX32664C biometric sensor hub.
14+
15+
if MAX32664C
16+
config MAX32664C_USE_FIRMWARE_LOADER
17+
bool "Enable this option if you want to use the I2C firmware loader"
18+
default n
19+
20+
config MAX32664C_USE_EXTERNAL_ACC
21+
bool "Enable this option if you want to use an external accelerometer"
22+
default n
23+
24+
config MAX32664C_USE_EXTENDED_REPORTS
25+
bool "Enable this option if you want to use extended reports instead of the default reports"
26+
default n
27+
28+
config MAX32664C_USE_STATIC_MEMORY
29+
bool "Disable this option if the driver should use dynamic memory"
30+
default y
31+
32+
config MAX32664C_QUEUE_SIZE
33+
int "Length of the message queue"
34+
default 32
35+
36+
config MAX32664C_SAMPLE_BUFFER_SIZE
37+
depends on MAX32664C_USE_STATIC_MEMORY
38+
int "Length of the sample buffer for the I2C reading thread"
39+
default 64
40+
help
41+
This is the number of samples that will be read from the sensor hub in one go.
42+
The maximum value is 64, but you can set it lower if you want to reduce memory usage.
43+
44+
choice
45+
prompt "AFE sensor ID used by the sensor hub"
46+
default MAX32664C_USE_MAX86161
47+
48+
config MAX32664C_USE_MAX86141
49+
bool "MAX86141"
50+
51+
config MAX32664C_USE_MAX86161
52+
bool "MAX86161"
53+
endchoice
54+
55+
config MAX32664C_ACC_ID
56+
hex "Accelerometer ID sensor ID used by the sensor hub"
57+
default 0x1B
58+
59+
config MAX32664C_THREAD_STACK_SIZE
60+
int "MAX32664C sample thread stack size"
61+
default 4096
62+
63+
module = MAXIM_MAX32664C
64+
module-str = MAXIM_MAX32664C
65+
source "subsys/logging/Kconfig.template.log_config"
66+
67+
endif

0 commit comments

Comments
 (0)