Skip to content

Commit 3d2dc22

Browse files
authored
Update cherryusb to v1.6.1#11362
1 parent 4e46e97 commit 3d2dc22

98 files changed

Lines changed: 2111 additions & 3063 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bsp/bouffalo_lab/bl61x/board/cherryusb_port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ INIT_COMPONENT_EXPORT(cherryusb_devinit);
3030

3131
int cherryusb_hostinit(void)
3232
{
33-
usbh_initialize(0, 0x20072000);
33+
usbh_initialize(0, 0x20072000, NULL);
3434
return 0;
3535
}
3636
INIT_COMPONENT_EXPORT(cherryusb_hostinit);

bsp/bouffalo_lab/bl61x/board/usb_config.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,12 @@
160160
#define CONFIG_USBHOST_MAX_INTF_ALTSETTINGS 8
161161
#define CONFIG_USBHOST_MAX_ENDPOINTS 4
162162

163-
#define CONFIG_USBHOST_MAX_CDC_ACM_CLASS 4
163+
#define CONFIG_USBHOST_MAX_SERIAL_CLASS 4
164164
#define CONFIG_USBHOST_MAX_HID_CLASS 4
165165
#define CONFIG_USBHOST_MAX_MSC_CLASS 2
166166
#define CONFIG_USBHOST_MAX_AUDIO_CLASS 1
167167
#define CONFIG_USBHOST_MAX_VIDEO_CLASS 1
168+
//#define CONFIG_USBHOST_MAX_XBOX_CLASS 2
168169

169170
#define CONFIG_USBHOST_DEV_NAMELEN 16
170171

@@ -191,6 +192,10 @@
191192
#define CONFIG_USBHOST_CONTROL_TRANSFER_TIMEOUT 500
192193
#endif
193194

195+
#ifndef CONFIG_USBHOST_SERIAL_RX_SIZE
196+
#define CONFIG_USBHOST_SERIAL_RX_SIZE 2048
197+
#endif
198+
194199
#ifndef CONFIG_USBHOST_MSC_TIMEOUT
195200
#define CONFIG_USBHOST_MSC_TIMEOUT 5000
196201
#endif

bsp/hpmicro/hpm6750evk/board/cherryusb_port.c

Lines changed: 0 additions & 41 deletions
This file was deleted.

bsp/hpmicro/hpm6750evk2/board/cherryusb_port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ int cherryusb_hostinit(void)
3434
{
3535
board_init_usb_pins();
3636

37-
usbh_initialize(0, HPM_USB0_BASE);
37+
usbh_initialize(0, HPM_USB0_BASE, NULL);
3838
return 0;
3939
}
4040
INIT_COMPONENT_EXPORT(cherryusb_hostinit);

bsp/hpmicro/hpm6750evk2/board/usb_config.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,12 @@
157157
#define CONFIG_USBHOST_MAX_INTF_ALTSETTINGS 8
158158
#define CONFIG_USBHOST_MAX_ENDPOINTS 4
159159

160-
#define CONFIG_USBHOST_MAX_CDC_ACM_CLASS 4
160+
#define CONFIG_USBHOST_MAX_SERIAL_CLASS 4
161161
#define CONFIG_USBHOST_MAX_HID_CLASS 4
162162
#define CONFIG_USBHOST_MAX_MSC_CLASS 2
163163
#define CONFIG_USBHOST_MAX_AUDIO_CLASS 1
164164
#define CONFIG_USBHOST_MAX_VIDEO_CLASS 1
165+
//#define CONFIG_USBHOST_MAX_XBOX_CLASS 2
165166

166167
#define CONFIG_USBHOST_DEV_NAMELEN 16
167168

@@ -188,6 +189,10 @@
188189
#define CONFIG_USBHOST_CONTROL_TRANSFER_TIMEOUT 500
189190
#endif
190191

192+
#ifndef CONFIG_USBHOST_SERIAL_RX_SIZE
193+
#define CONFIG_USBHOST_SERIAL_RX_SIZE 2048
194+
#endif
195+
191196
#ifndef CONFIG_USBHOST_MSC_TIMEOUT
192197
#define CONFIG_USBHOST_MSC_TIMEOUT 5000
193198
#endif

bsp/nxp/mcx/mcxn/frdm-mcxn947/board/cherryusb_port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ INIT_COMPONENT_EXPORT(cherryusb_devinit);
3030

3131
int cherryusb_hostinit(void)
3232
{
33-
usbh_initialize(0, USBHS1__USBC_BASE);
33+
usbh_initialize(0, USBHS1__USBC_BASE, NULL);
3434
return 0;
3535
}
3636
INIT_COMPONENT_EXPORT(cherryusb_hostinit);

bsp/nxp/mcx/mcxn/frdm-mcxn947/board/usb_config.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,12 @@
155155
#define CONFIG_USBHOST_MAX_INTF_ALTSETTINGS 8
156156
#define CONFIG_USBHOST_MAX_ENDPOINTS 4
157157

158-
#define CONFIG_USBHOST_MAX_CDC_ACM_CLASS 4
158+
#define CONFIG_USBHOST_MAX_SERIAL_CLASS 4
159159
#define CONFIG_USBHOST_MAX_HID_CLASS 4
160160
#define CONFIG_USBHOST_MAX_MSC_CLASS 2
161161
#define CONFIG_USBHOST_MAX_AUDIO_CLASS 1
162162
#define CONFIG_USBHOST_MAX_VIDEO_CLASS 1
163+
//#define CONFIG_USBHOST_MAX_XBOX_CLASS 2
163164

164165
#define CONFIG_USBHOST_DEV_NAMELEN 16
165166

@@ -186,6 +187,10 @@
186187
#define CONFIG_USBHOST_CONTROL_TRANSFER_TIMEOUT 500
187188
#endif
188189

190+
#ifndef CONFIG_USBHOST_SERIAL_RX_SIZE
191+
#define CONFIG_USBHOST_SERIAL_RX_SIZE 2048
192+
#endif
193+
189194
#ifndef CONFIG_USBHOST_MSC_TIMEOUT
190195
#define CONFIG_USBHOST_MSC_TIMEOUT 5000
191196
#endif

components/drivers/usb/cherryusb/Kconfig

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,26 @@ if RT_USING_CHERRYUSB
139139
prompt "Enable usb dfu device"
140140
default n
141141

142+
config RT_CHERRYUSB_DEVICE_DISPLAY
143+
bool
144+
prompt "Enable usb display device"
145+
default n
146+
142147
config RT_CHERRYUSB_DEVICE_CDC_ACM_CHARDEV
143148
bool
144149
prompt "Enable chardev for cdc acm device"
145150
default n
146151

152+
config RT_CHERRYUSB_DEVICE_MSC_BLKDEV
153+
bool
154+
prompt "Enable blkdev for msc device"
155+
default n
156+
157+
config CONFIG_USBDEV_MSC_BLOCK_DEV_NAME
158+
string "usb device msc block device name"
159+
depends on RT_CHERRYUSB_DEVICE_MSC_BLKDEV
160+
default "sd0"
161+
147162
config CONFIG_USBDEV_REQUEST_BUFFER_LEN
148163
int
149164
prompt "Set device control transfer max buffer size"
@@ -184,7 +199,7 @@ if RT_USING_CHERRYUSB
184199
config RT_CHERRYUSB_DEVICE_TEMPLATE_MSC_BLKDEV
185200
bool
186201
prompt "msc_blkdev"
187-
depends on RT_CHERRYUSB_DEVICE_MSC
202+
depends on RT_CHERRYUSB_DEVICE_MSC && RT_CHERRYUSB_DEVICE_MSC_BLKDEV
188203
config RT_CHERRYUSB_DEVICE_TEMPLATE_HID_KEYBOARD
189204
bool
190205
prompt "hid_keyboard"
@@ -221,6 +236,10 @@ if RT_USING_CHERRYUSB
221236
bool
222237
prompt "cdc_ncm"
223238
depends on RT_CHERRYUSB_DEVICE_CDC_NCM
239+
config RT_CHERRYUSB_DEVICE_TEMPLATE_DFU
240+
bool
241+
prompt "dfu"
242+
depends on RT_CHERRYUSB_DEVICE_DFU
224243
config RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM_MSC
225244
bool
226245
prompt "cdc_acm_msc"
@@ -243,6 +262,10 @@ if RT_USING_CHERRYUSB
243262
bool
244263
prompt "webusb_hid"
245264
depends on RT_CHERRYUSB_DEVICE_HID
265+
config RT_CHERRYUSB_DEVICE_TEMPLATE_DISPLAY
266+
bool
267+
prompt "display"
268+
depends on RT_CHERRYUSB_DEVICE_DISPLAY
246269
config RT_CHERRYUSB_DEVICE_TEMPLATE_ADB
247270
bool
248271
prompt "adb"
@@ -253,11 +276,6 @@ if RT_USING_CHERRYUSB
253276
depends on RT_CHERRYUSB_DEVICE_CDC_ACM_CHARDEV
254277
endchoice
255278

256-
config CONFIG_USBDEV_MSC_BLOCK_DEV_NAME
257-
string "usb device msc block device name"
258-
depends on RT_CHERRYUSB_DEVICE_TEMPLATE_MSC_BLKDEV
259-
default "sd0"
260-
261279
endif
262280

263281
menuconfig RT_CHERRYUSB_HOST
@@ -470,22 +488,22 @@ if RT_USING_CHERRYUSB
470488
default "/"
471489

472490
menu "Select USB host template, please select class driver first"
473-
config CONFIG_TEST_USBH_SERIAL
491+
config RT_TEST_USBH_SERIAL
474492
bool
475493
prompt "demo for test seial, cannot enable this demo, you can use rt-thread device api to test"
476494
default n
477495
depends on CONFIG_USBHOST_SERIAL
478-
config CONFIG_TEST_USBH_HID
496+
config RT_TEST_USBH_HID
479497
int
480498
prompt "demo for test hid"
481499
default 0
482500
depends on RT_CHERRYUSB_HOST_HID
483-
config CONFIG_TEST_USBH_MSC
501+
config RT_TEST_USBH_MSC
484502
bool
485503
prompt "demo for test msc, cannot enable this demo, you can use rt-thread dfs api to test"
486504
default n
487505
depends on RT_CHERRYUSB_HOST_MSC
488-
config CONFIG_TEST_USBH_NET
506+
config RT_TEST_USBH_NET
489507
bool
490508
prompt "demo for test net, cannot enable this demo, you can use lwip api to test"
491509
default n

0 commit comments

Comments
 (0)