1# Bosch BMG160 gyroscope configuration options
2
3# Copyright (c) 2016 Intel Corporation
4# SPDX-License-Identifier: Apache-2.0
5
6menuconfig BMG160
7	bool "Bosch BMG160 gyroscope support"
8	default y
9	depends on DT_HAS_BOSCH_BMG160_ENABLED
10	select I2C
11	help
12	  Enable Bosch BMG160 gyroscope support.
13
14if BMG160
15
16choice
17	prompt "BMG160 I2C bus speed"
18	default BMG160_I2C_SPEED_STANDARD
19
20config BMG160_I2C_SPEED_STANDARD
21	bool "Standard"
22	help
23	  Standard bus speed of up to 100kHz.
24
25config BMG160_I2C_SPEED_FAST
26	bool "Fast"
27	help
28	  Fast bus speed of up to 400KHz.
29endchoice
30
31choice
32	prompt "Trigger mode"
33	default BMG160_TRIGGER_GLOBAL_THREAD
34	help
35	  Specify the type of triggering to be used by the driver.
36
37config BMG160_TRIGGER_NONE
38	bool "No trigger"
39
40config BMG160_TRIGGER_GLOBAL_THREAD
41	bool "Use global thread"
42	depends on GPIO
43	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_BOSCH_BMG160),int-gpios)
44	select BMG160_TRIGGER
45
46config BMG160_TRIGGER_OWN_THREAD
47	bool "Use own thread"
48	depends on GPIO
49	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_BOSCH_BMG160),int-gpios)
50	select BMG160_TRIGGER
51endchoice
52
53config BMG160_TRIGGER
54	bool
55
56config BMG160_THREAD_PRIORITY
57	int "Own thread priority"
58	depends on BMG160_TRIGGER_OWN_THREAD
59	default 10
60	help
61	  The priority of the thread used for handling interrupts.
62
63config BMG160_THREAD_STACK_SIZE
64	int "Own thread stack size"
65	depends on BMG160_TRIGGER_OWN_THREAD
66	default 1024
67	help
68	  The thread stack size.
69
70choice
71	prompt "Gyroscope range setting."
72	default BMG160_RANGE_RUNTIME
73
74config BMG160_RANGE_RUNTIME
75	bool "Set at runtime."
76
77config BMG160_RANGE_2000DPS
78	bool "2000 DPS"
79
80config BMG160_RANGE_1000DPS
81	bool "1000 DPS"
82
83config BMG160_RANGE_500DPS
84	bool "500 DPS"
85
86config BMG160_RANGE_250DPS
87	bool "250 DPS"
88
89config BMG160_RANGE_125DPS
90	bool "125 DPS"
91endchoice
92
93choice
94	prompt "Gyroscope sampling frequency."
95	default BMG160_ODR_RUNTIME
96
97config BMG160_ODR_RUNTIME
98	bool "Set at runtime."
99
100config BMG160_ODR_100
101	bool "100 Hz"
102
103config BMG160_ODR_200
104	bool "200 Hz"
105
106config BMG160_ODR_400
107	bool "400 Hz"
108
109config BMG160_ODR_1000
110	bool "1000 Hz"
111
112config BMG160_ODR_2000
113	bool "2000 Hz"
114endchoice
115
116endif # BMG160
117