This repository has been archived by the owner on Nov 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Kconfig
287 lines (241 loc) · 8.32 KB
/
Kconfig
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
menu "TinyUSB (esp32usb)"
config ESPUSB
bool "Enable Esp32USB"
default n
depends on IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
select FREERTOS_SUPPORT_STATIC_ALLOCATION
select FREERTOS_USE_AUTHENTIC_INCLUDE_PATHS
help
Adds support for TinyUSB
config ESPUSB_MAX_POWER_USAGE
int "Max power usage from USB port"
default 100
depends on ESPUSB
help
Max power used by device from USB port in mA.
config ESPUSB_CDC
bool "Enable USB Serial (CDC) driver"
default n
depends on ESPUSB
help
Enable USB Serial (CDC) Esp32USB driver.
config ESPUSB_MSC
bool "Enable Mass Storage (MSC) driver"
default n
depends on ESPUSB
help
Enable MSC TinyUSB driver. It is recomended to use Menuconfig-driven descriptor (.descriptor = NULL and
.string_descriptor = NULL in the tinyusb_config_t structure).
config ESPUSB_HID
bool "Enable HID driver"
default n
depends on ESPUSB
help
Enable HID TinyUSB driver. It is recomended to use Menuconfig-driven descriptor (.descriptor = NULL and
.string_descriptor = NULL in the tinyusb_config_t structure).
config ESPUSB_MIDI
bool "Enable MIDI driver"
default n
depends on ESPUSB
help
Enable MIDI TinyUSB driver. It is recomended to use Menuconfig-driven descriptor (.descriptor = NULL
and .string_descriptor = NULL in the tinyusb_config_t structure).
config ESPUSB_VENDOR
bool "Enable Vendor class driver"
default n
depends on ESPUSB
help
Enable USB vendor TinyUSB driver. Currently used by webusb driver.
config ESPUSB_DFU
bool "Enable DFU Runtime"
default n
depends on ESPUSB
help
Enable the DFU_RT TinyUSB driver.
config ESPUSB_CUSTOM_CLASS
bool "Enable a custom driver class"
default n
depends on ESPUSB
help
Enable a custom TinyUSB class.
config ESPUSB_DEBUG
bool "Debug mode"
default n
depends on ESPUSB
help
Debug mode
menu "USB Serial (CDC) Configuration"
depends on ESPUSB_CDC
config ESPUSB_CDC_RX_BUFSIZE
int "RX buffer size"
range 64 2048
default 128
help
CDC receive buffer size.
config ESPUSB_CDC_TX_BUFSIZE
int "TX buffer size"
range 64 2048
default 256
help
CDC transmit buffer size.
config ESPUSB_CDC_FIFO_SIZE
int
default 64
config ESPUSB_CDC_WRITE_FLUSH_TIMEOUT
int "Write timeout (milliseconds)"
default 10
endmenu
menu "Mass Stoarage (MSC) Configuration"
depends on ESPUSB_MSC
config ESPUSB_MSC_BUFSIZE
int
default 512
config ESPUSB_MSC_FIFO_SIZE
int
default 64
config ESPUSB_MSC_VENDOR_ID
string "MSC Vendor ID"
default "ESP32"
config ESPUSB_MSC_PRODUCT_ID
string "MSC Product ID"
default "ESP32 Disk"
config ESPUSB_MSC_PRODUCT_REVISION
string "MSC Product revision"
default "1.00"
config ESPUSB_MSC_VDISK_SECTOR_SIZE
int
default 512
config ESPUSB_MSC_VDISK_SECTOR_COUNT
int
default 8192
config ESPUSB_MSC_VDISK_RESERVED_SECTOR_COUNT
int
default 1
config ESPUSB_MSC_VDISK_FILE_COUNT
int "Max number of files"
default 64
range 16 256
help
Maximum number of files to present on the virtual disk. This is
used to calculate how many sectors to reserve for file entries.
Each sector can hold up to 16 files, the first sector has one
reserved file entry for the disk label. Note, if long filenames
are enabled a higher value should be used here as each long
filename will use at least two directory entries.
config ESPUSB_MSC_LONG_FILENAMES
bool "Enable long filename support"
default n
help
Enabling this option allows the usage of long filenames up to
39 characters. The length limit of 39 characters is derrived
from the usage of up to four directory entries per file with
three of them for the long filename and one for the file
attributes. The short filename will be generated as the first
six characters of the filename (without spaces) with ~1 added
and no filename extension.
endmenu
menu "Vendor Configuration"
depends on ESPUSB_VENDOR
config ESPUSB_VENDOR_RX_BUFSIZE
int "RX buffer size"
range 64 2048
default 64
help
Vendor receive buffer size in bytes.
config ESPUSB_VENDOR_TX_BUFSIZE
int "TX buffer size"
range 64 2048
default 64
help
Vendor transmit buffer size in bytes.
config ESPUSB_VENDOR_FIFO_SIZE
int
default 64
endmenu
menu "MIDI Configuration"
depends on ESPUSB_MIDI
config ESPUSB_MIDI_RX_BUFSIZE
int "RX buffer size"
range 64 2048
default 128
help
MIDI receive buffer size in bytes.
config ESPUSB_MIDI_TX_BUFSIZE
int "TX buffer size"
range 64 2048
default 128
help
MIDI transmit buffer size in bytes.
config ESPUSB_MIDI_FIFO_SIZE
int
default 64
endmenu
menu "HID Configuration"
depends on ESPUSB_HID
config ESPUSB_HID_BUFSIZE
int "Buffer size"
default 16
help
HID buffer size should be sufficient to hold ID (if any) + Data
endmenu
menu "DFU Runtime Configuration"
depends on ESPUSB_DFU
config ESPUSB_DFU_DISCONNECT_DELAY
int
default 1000
config ESPUSB_DFU_BUFSIZE
int "Buffer size"
range 512 4096
default 1024
help
The DFU buffer size is used for splitting the DFU payload into
smaller pieces which may be more managable.
endmenu
menu "USB descriptor configuration"
depends on ESPUSB
config ESPUSB_USB_VENDOR_ID
hex "USB Descriptor Vendor ID"
default 0x303A
help
This is used in the USB Descriptor for the device. The default
value of 0x303A is the Espressif Vendor ID.
config ESPUSB_DESC_BCDDEVICE
hex "USB Descriptor BCD Device"
default 0x0100
help
Version of the firmware of the USB device
endmenu
menu "Task configuration"
config ESPUSB_TASK_NAME
string "Name"
default "esp-usb"
config ESPUSB_TASK_STACK_SIZE
int "Stack size (bytes)"
default 4096
config ESPUSB_TASK_PRIORITY
int "Priority"
range 2 25
default 5
help
This is the priority for the Esp32USB executor task. It must be
at least one priority level higher than the app_main task.
choice ESPUSB_TASK_AFFINITY
bool "Core on which the EspUSB Task will run"
default ESPUSB_TASK_AFFINITY_NONE
help
Select core on which the EspUSB Task will run
config ESPUSB_TASK_AFFINITY_CORE0
bool "Core 0"
config ESPUSB_TASK_AFFINITY_CORE1
bool "Core 1"
depends on IDF_TARGET_ESP32S3
config ESPUSB_TASK_AFFINITY_NONE
bool "Any"
endchoice
config ESPUSB_TASK_AFFINITY
int
default 0 if ESPUSB_TASK_AFFINITY_CORE0
default 1 if ESPUSB_TASK_AFFINITY_CORE1
default -1 if ESPUSB_TASK_AFFINITY_NONE
endmenu
endmenu