Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bsp/bouffalo_lab/bl61x/board/cherryusb_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ INIT_COMPONENT_EXPORT(cherryusb_devinit);

int cherryusb_hostinit(void)
{
usbh_initialize(0, 0x20072000);
usbh_initialize(0, 0x20072000, NULL);
return 0;
}
INIT_COMPONENT_EXPORT(cherryusb_hostinit);
Expand Down
7 changes: 6 additions & 1 deletion bsp/bouffalo_lab/bl61x/board/usb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,12 @@
#define CONFIG_USBHOST_MAX_INTF_ALTSETTINGS 8
#define CONFIG_USBHOST_MAX_ENDPOINTS 4

#define CONFIG_USBHOST_MAX_CDC_ACM_CLASS 4
#define CONFIG_USBHOST_MAX_SERIAL_CLASS 4
#define CONFIG_USBHOST_MAX_HID_CLASS 4
#define CONFIG_USBHOST_MAX_MSC_CLASS 2
#define CONFIG_USBHOST_MAX_AUDIO_CLASS 1
#define CONFIG_USBHOST_MAX_VIDEO_CLASS 1
//#define CONFIG_USBHOST_MAX_XBOX_CLASS 2

#define CONFIG_USBHOST_DEV_NAMELEN 16

Expand All @@ -191,6 +192,10 @@
#define CONFIG_USBHOST_CONTROL_TRANSFER_TIMEOUT 500
#endif

#ifndef CONFIG_USBHOST_SERIAL_RX_SIZE
#define CONFIG_USBHOST_SERIAL_RX_SIZE 2048
#endif

#ifndef CONFIG_USBHOST_MSC_TIMEOUT
#define CONFIG_USBHOST_MSC_TIMEOUT 5000
#endif
Expand Down
41 changes: 0 additions & 41 deletions bsp/hpmicro/hpm6750evk/board/cherryusb_port.c

This file was deleted.

2 changes: 1 addition & 1 deletion bsp/hpmicro/hpm6750evk2/board/cherryusb_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int cherryusb_hostinit(void)
{
board_init_usb_pins();

usbh_initialize(0, HPM_USB0_BASE);
usbh_initialize(0, HPM_USB0_BASE, NULL);
return 0;
}
INIT_COMPONENT_EXPORT(cherryusb_hostinit);
Expand Down
7 changes: 6 additions & 1 deletion bsp/hpmicro/hpm6750evk2/board/usb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,12 @@
#define CONFIG_USBHOST_MAX_INTF_ALTSETTINGS 8
#define CONFIG_USBHOST_MAX_ENDPOINTS 4

#define CONFIG_USBHOST_MAX_CDC_ACM_CLASS 4
#define CONFIG_USBHOST_MAX_SERIAL_CLASS 4
#define CONFIG_USBHOST_MAX_HID_CLASS 4
#define CONFIG_USBHOST_MAX_MSC_CLASS 2
#define CONFIG_USBHOST_MAX_AUDIO_CLASS 1
#define CONFIG_USBHOST_MAX_VIDEO_CLASS 1
//#define CONFIG_USBHOST_MAX_XBOX_CLASS 2

#define CONFIG_USBHOST_DEV_NAMELEN 16

Expand All @@ -188,6 +189,10 @@
#define CONFIG_USBHOST_CONTROL_TRANSFER_TIMEOUT 500
#endif

#ifndef CONFIG_USBHOST_SERIAL_RX_SIZE
#define CONFIG_USBHOST_SERIAL_RX_SIZE 2048
#endif

#ifndef CONFIG_USBHOST_MSC_TIMEOUT
#define CONFIG_USBHOST_MSC_TIMEOUT 5000
#endif
Expand Down
2 changes: 1 addition & 1 deletion bsp/nxp/mcx/mcxn/frdm-mcxn947/board/cherryusb_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ INIT_COMPONENT_EXPORT(cherryusb_devinit);

int cherryusb_hostinit(void)
{
usbh_initialize(0, USBHS1__USBC_BASE);
usbh_initialize(0, USBHS1__USBC_BASE, NULL);
return 0;
}
INIT_COMPONENT_EXPORT(cherryusb_hostinit);
Expand Down
7 changes: 6 additions & 1 deletion bsp/nxp/mcx/mcxn/frdm-mcxn947/board/usb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,12 @@
#define CONFIG_USBHOST_MAX_INTF_ALTSETTINGS 8
#define CONFIG_USBHOST_MAX_ENDPOINTS 4

#define CONFIG_USBHOST_MAX_CDC_ACM_CLASS 4
#define CONFIG_USBHOST_MAX_SERIAL_CLASS 4
#define CONFIG_USBHOST_MAX_HID_CLASS 4
#define CONFIG_USBHOST_MAX_MSC_CLASS 2
#define CONFIG_USBHOST_MAX_AUDIO_CLASS 1
#define CONFIG_USBHOST_MAX_VIDEO_CLASS 1
//#define CONFIG_USBHOST_MAX_XBOX_CLASS 2

#define CONFIG_USBHOST_DEV_NAMELEN 16

Expand All @@ -186,6 +187,10 @@
#define CONFIG_USBHOST_CONTROL_TRANSFER_TIMEOUT 500
#endif

#ifndef CONFIG_USBHOST_SERIAL_RX_SIZE
#define CONFIG_USBHOST_SERIAL_RX_SIZE 2048
#endif

#ifndef CONFIG_USBHOST_MSC_TIMEOUT
#define CONFIG_USBHOST_MSC_TIMEOUT 5000
#endif
Expand Down
38 changes: 28 additions & 10 deletions components/drivers/usb/cherryusb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,26 @@ if RT_USING_CHERRYUSB
prompt "Enable usb dfu device"
default n

config RT_CHERRYUSB_DEVICE_DISPLAY
bool
prompt "Enable usb display device"
default n

config RT_CHERRYUSB_DEVICE_CDC_ACM_CHARDEV
bool
prompt "Enable chardev for cdc acm device"
default n

config RT_CHERRYUSB_DEVICE_MSC_BLKDEV
bool
prompt "Enable blkdev for msc device"
default n

config CONFIG_USBDEV_MSC_BLOCK_DEV_NAME
string "usb device msc block device name"
depends on RT_CHERRYUSB_DEVICE_MSC_BLKDEV
default "sd0"

config CONFIG_USBDEV_REQUEST_BUFFER_LEN
int
prompt "Set device control transfer max buffer size"
Expand Down Expand Up @@ -184,7 +199,7 @@ if RT_USING_CHERRYUSB
config RT_CHERRYUSB_DEVICE_TEMPLATE_MSC_BLKDEV
bool
prompt "msc_blkdev"
depends on RT_CHERRYUSB_DEVICE_MSC
depends on RT_CHERRYUSB_DEVICE_MSC && RT_CHERRYUSB_DEVICE_MSC_BLKDEV
config RT_CHERRYUSB_DEVICE_TEMPLATE_HID_KEYBOARD
bool
prompt "hid_keyboard"
Expand Down Expand Up @@ -221,6 +236,10 @@ if RT_USING_CHERRYUSB
bool
prompt "cdc_ncm"
depends on RT_CHERRYUSB_DEVICE_CDC_NCM
config RT_CHERRYUSB_DEVICE_TEMPLATE_DFU
bool
prompt "dfu"
depends on RT_CHERRYUSB_DEVICE_DFU
config RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM_MSC
bool
prompt "cdc_acm_msc"
Expand All @@ -243,6 +262,10 @@ if RT_USING_CHERRYUSB
bool
prompt "webusb_hid"
depends on RT_CHERRYUSB_DEVICE_HID
config RT_CHERRYUSB_DEVICE_TEMPLATE_DISPLAY
bool
prompt "display"
depends on RT_CHERRYUSB_DEVICE_DISPLAY
config RT_CHERRYUSB_DEVICE_TEMPLATE_ADB
bool
prompt "adb"
Expand All @@ -253,11 +276,6 @@ if RT_USING_CHERRYUSB
depends on RT_CHERRYUSB_DEVICE_CDC_ACM_CHARDEV
endchoice

config CONFIG_USBDEV_MSC_BLOCK_DEV_NAME
string "usb device msc block device name"
depends on RT_CHERRYUSB_DEVICE_TEMPLATE_MSC_BLKDEV
default "sd0"

endif

menuconfig RT_CHERRYUSB_HOST
Expand Down Expand Up @@ -470,22 +488,22 @@ if RT_USING_CHERRYUSB
default "/"

menu "Select USB host template, please select class driver first"
config CONFIG_TEST_USBH_SERIAL
config RT_TEST_USBH_SERIAL
bool
prompt "demo for test seial, cannot enable this demo, you can use rt-thread device api to test"
default n
depends on CONFIG_USBHOST_SERIAL
config CONFIG_TEST_USBH_HID
config RT_TEST_USBH_HID
int
prompt "demo for test hid"
default 0
depends on RT_CHERRYUSB_HOST_HID
config CONFIG_TEST_USBH_MSC
config RT_TEST_USBH_MSC
bool
prompt "demo for test msc, cannot enable this demo, you can use rt-thread dfs api to test"
default n
depends on RT_CHERRYUSB_HOST_MSC
config CONFIG_TEST_USBH_NET
config RT_TEST_USBH_NET
bool
prompt "demo for test net, cannot enable this demo, you can use lwip api to test"
default n
Expand Down
Loading
Loading