summaryrefslogtreecommitdiff
path: root/components/drivers/i2c/Kconfig
blob: 40f04d1d2fd3ebdf38d5ef957d57a5c9ae6a20e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
config RT_USING_I2C
    bool "Using I2C device drivers"
    default n

if RT_USING_I2C
    config RT_I2C_DEBUG
        bool "Use I2C debug message"
        default n

    config RT_USING_I2C_BITOPS
        bool "Use GPIO to simulate I2C"
        default y

    if RT_USING_I2C_BITOPS
        config RT_I2C_BITOPS_DEBUG
            bool "Use simulate I2C debug message"
            default n
    endif

    config RT_USING_SOFT_I2C
        bool "Use GPIO to soft simulate I2C"
        default n
        select RT_USING_PIN
        select RT_USING_I2C_BITOPS
    if RT_USING_SOFT_I2C
        config RT_USING_SOFT_I2C1
            bool "Enable I2C1 Bus (software simulation)"
            default y
            if RT_USING_SOFT_I2C1
                config RT_SOFT_I2C1_SCL_PIN
                    int "SCL pin number"
                    range 0 32767
                    default 1
                config RT_SOFT_I2C1_SDA_PIN
                    int "SDA pin number"
                    range 0 32767
                    default 2
                config RT_SOFT_I2C1_BUS_NAME
                    string "Bus name"
                    default "i2c1"
                config RT_SOFT_I2C1_TIMING_DELAY
                    int "Timing delay (us)"
                    range 0 32767
                    default 10
                config RT_SOFT_I2C1_TIMING_TIMEOUT
                    int "Timing timeout (tick)"
                    range 0 32767
                    default 10
            endif
        config RT_USING_SOFT_I2C2
            bool "Enable I2C2 Bus (software simulation)"
            default n
            if RT_USING_SOFT_I2C2
                config RT_SOFT_I2C2_SCL_PIN
                    int "SCL pin number"
                    range 0 32767
                    default 3
                config RT_SOFT_I2C2_SDA_PIN
                    int "SDA pin number"
                    range 0 32767
                    default 4
                config RT_SOFT_I2C2_BUS_NAME
                    string "Bus name"
                    default "i2c2"
                config RT_SOFT_I2C2_TIMING_DELAY
                    int "Timing delay (us)"
                    range 0 32767
                    default 10
                config RT_SOFT_I2C2_TIMING_TIMEOUT
                    int "Timing timeout (tick)"
                    range 0 32767
                    default 10
            endif
        config RT_USING_SOFT_I2C3
            bool "Enable I2C3 Bus (software simulation)"
            default n
            if RT_USING_SOFT_I2C3
                config RT_SOFT_I2C3_SCL_PIN
                    int "SCL pin number"
                    range 0 32767
                    default 5
                config RT_SOFT_I2C3_SDA_PIN
                    int "SDA pin number"
                    range 0 32767
                    default 6
                config RT_SOFT_I2C3_BUS_NAME
                    string "Bus name"
                    default "i2c3"
                config RT_SOFT_I2C3_TIMING_DELAY
                    int "Timing delay (us)"
                    range 0 32767
                    default 10
                config RT_SOFT_I2C3_TIMING_TIMEOUT
                    int "Timing timeout (tick)"
                    range 0 32767
                    default 10
            endif
        config RT_USING_SOFT_I2C4
            bool "Enable I2C4 Bus (software simulation)"
            default n
            if RT_USING_SOFT_I2C4
                config RT_SOFT_I2C4_SCL_PIN
                    int "SCL pin number"
                    range 0 32767
                    default 7
                config RT_SOFT_I2C4_SDA_PIN
                    int "SDA pin number"
                    range 0 32767
                    default 8
                config RT_SOFT_I2C4_BUS_NAME
                    string "Bus name"
                    default "i2c4"
                config RT_SOFT_I2C4_TIMING_DELAY
                    int "Timing delay (us)"
                    range 0 32767
                    default 10
                config RT_SOFT_I2C4_TIMING_TIMEOUT
                    int "Timing timeout (tick)"
                    range 0 32767
                    default 10
            endif
        config RT_USING_SOFT_I2C5
            bool "Enable I2C5 Bus (software simulation)"
            default n
            if RT_USING_SOFT_I2C5
                config RT_SOFT_I2C5_SCL_PIN
                    int "SCL pin number"
                    range 0 32767
                    default 9
                config RT_SOFT_I2C5_SDA_PIN
                    int "SDA pin number"
                    range 0 32767
                    default 10
                config RT_SOFT_I2C5_BUS_NAME
                    string "Bus name"
                    default "i2c5"
                config RT_SOFT_I2C5_TIMING_DELAY
                    int "Timing delay (us)"
                    range 0 32767
                    default 10
                config RT_SOFT_I2C5_TIMING_TIMEOUT
                    int "Timing timeout (tick)"
                    range 0 32767
                    default 10
            endif
        config RT_USING_SOFT_I2C6
            bool "Enable I2C6 Bus (software simulation)"
            default n
            if RT_USING_SOFT_I2C6
                config RT_SOFT_I2C6_SCL_PIN
                    int "SCL pin number"
                    range 0 32767
                    default 11
                config RT_SOFT_I2C6_SDA_PIN
                    int "SDA pin number"
                    range 0 32767
                    default 12
                config RT_SOFT_I2C6_BUS_NAME
                    string "Bus name"
                    default "i2c6"
                config RT_SOFT_I2C6_TIMING_DELAY
                    int "Timing delay (us)"
                    range 0 32767
                    default 10
                config RT_SOFT_I2C6_TIMING_TIMEOUT
                    int "Timing timeout (tick)"
                    range 0 32767
                    default 10
            endif
        config RT_USING_SOFT_I2C7
            bool "Enable I2C7 Bus (software simulation)"
            default n
            if RT_USING_SOFT_I2C7
                config RT_SOFT_I2C7_SCL_PIN
                    int "SCL pin number"
                    range 0 32767
                    default 13
                config RT_SOFT_I2C7_SDA_PIN
                    int "SDA pin number"
                    range 0 32767
                    default 14
                config RT_SOFT_I2C7_BUS_NAME
                    string "Bus name"
                    default "i2c7"
                config RT_SOFT_I2C7_TIMING_DELAY
                    int "Timing delay (us)"
                    range 0 32767
                    default 10
                config RT_SOFT_I2C7_TIMING_TIMEOUT
                    int "Timing timeout (tick)"
                    range 0 32767
                    default 10
            endif
        config RT_USING_SOFT_I2C8
            bool "Enable I2C8 Bus (software simulation)"
            default n
            if RT_USING_SOFT_I2C8
                config RT_SOFT_I2C8_SCL_PIN
                    int "SCL pin number"
                    range 0 32767
                    default 15
                config RT_SOFT_I2C8_SDA_PIN
                    int "SDA pin number"
                    range 0 32767
                    default 16
                config RT_SOFT_I2C8_BUS_NAME
                    string "Bus name"
                    default "i2c8"
                config RT_SOFT_I2C8_TIMING_DELAY
                    int "Timing delay (us)"
                    range 0 32767
                    default 10
                config RT_SOFT_I2C8_TIMING_TIMEOUT
                    int "Timing timeout (tick)"
                    range 0 32767
                    default 10
            endif
    endif
endif