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