1# ST Microelectronics STTS751 temperature sensor 2 3# Copyright (c) 2019 STMicroelectronics 4# SPDX-License-Identifier: Apache-2.0 5 6menuconfig STTS751 7 bool "STTS751 temperature sensor" 8 default y 9 depends on DT_HAS_ST_STTS751_ENABLED 10 depends on ZEPHYR_HAL_ST_MODULE 11 select I2C 12 select HAS_STMEMSC 13 select USE_STDC_STTS751 14 help 15 Enable driver for STTS751 I2C-based temperature sensor. 16 17if STTS751 18 19choice STTS751_TRIGGER_MODE 20 prompt "Trigger mode" 21 default STTS751_TRIGGER_GLOBAL_THREAD 22 help 23 Specify the type of triggering to be used by the driver. 24 25config STTS751_TRIGGER_NONE 26 bool "No trigger" 27 28config STTS751_TRIGGER_GLOBAL_THREAD 29 bool "Use global thread" 30 depends on GPIO 31 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_STTS751),drdy-gpios) 32 select STTS751_TRIGGER 33 34config STTS751_TRIGGER_OWN_THREAD 35 bool "Use own thread" 36 depends on GPIO 37 depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ST_STTS751),drdy-gpios) 38 select STTS751_TRIGGER 39 40endchoice # STTS751_TRIGGER_MODE 41 42config STTS751_TRIGGER 43 bool 44 45config STTS751_THREAD_PRIORITY 46 int "Thread priority" 47 depends on STTS751_TRIGGER_OWN_THREAD 48 default 10 49 help 50 Priority of thread used by the driver to handle interrupts. 51 52config STTS751_THREAD_STACK_SIZE 53 int "Thread stack size" 54 depends on STTS751_TRIGGER_OWN_THREAD 55 default 1024 56 help 57 Stack size of thread used by the driver to handle interrupts. 58 59menu "Attributes" 60 61config STTS751_TEMP_HI_THRESHOLD 62 depends on STTS751_TRIGGER 63 int "High temperature threshold alarm" 64 default 50 65 help 66 HIGH temperature threshold to trigger an alarm 67 68config STTS751_TEMP_LO_THRESHOLD 69 depends on STTS751_TRIGGER 70 int "Low temperature threshold alarm" 71 default 10 72 help 73 LOW temperature threshold to trigger an alarm 74 75config STTS751_SAMPLING_RATE 76 int "Output data rate" 77 range 0 9 78 default 4 79 help 80 Sensor output data rate expressed in conversions per second. 81 Data rates supported by the chip are: 82 0: 1 conv every 16 sec 83 1: 1 conv every 8 sec 84 2: 1 conv every 4 sec 85 3: 1 conv every 2 sec 86 4: 1 conv every sec 87 5: 2 convs every sec 88 6: 4 convs every sec 89 7: 8 convs every sec 90 8: 16 convs every sec 91 9: 32 convs every sec 92 93endmenu 94 95endif # STTS751 96