Skip to content
Open
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
26f5806
initial commit of new cdc_msc and updated msc
May 29, 2020
db11e1b
added endpoint configuration
May 29, 2020
1c247ed
added endpoint define changes
May 29, 2020
0b9e38e
added default msc interface
May 29, 2020
162ade3
fixed cdc handle nad renamed cdc msc flag
May 29, 2020
8d7e9d8
added usb class
May 29, 2020
4b489ef
add new include dirs
May 30, 2020
a144bca
formatting changes, improved usbd_ep_conf and now compiles in marlin
Jun 1, 2020
6717196
fixed bug in descriptor, small changes to USB class
Jun 1, 2020
6f3ebfc
fixed duplicate endpoint definition and somewhat fixed endpoint confi…
Jun 2, 2020
ccef556
fixed styling and changed dummy sd usb so it is always not ready
Jun 2, 2020
ff6cecf
fixed small type and more formatting
Jun 2, 2020
da5c702
added ifdef for USB.c
Jun 2, 2020
ffd635d
fixed bug in ST MSC SCSI library
Jun 2, 2020
7676e07
fixed formatting
Jun 2, 2020
3761125
introduced usb msc abstract class
Jun 3, 2020
6f00830
changes to formatting
Jun 3, 2020
f578d6c
more formatting changes
Jun 3, 2020
805113d
and more formatting changes
Jun 3, 2020
5df8d9c
small bugfixes
Jun 3, 2020
5b3e972
added back early usb initialisation and fixed write protection bug in…
Jun 3, 2020
77d673b
fixed hs/fs/other speed interface descriptors for cdc msc
Jun 3, 2020
3f3783e
small changes to ep conf
Jun 3, 2020
3c4d73d
fixed bug where usb device library relies on pdev->pClassData to dete…
Jun 4, 2020
f0e3993
update msc and cdc classes
Jun 4, 2020
a7fd6e2
fixed ep addresses
Jun 4, 2020
df73d28
fixed formatting
Jun 4, 2020
760d8e3
added back cdc clear buffer
Jun 4, 2020
f7dbf85
remove reference to userdata
Jun 4, 2020
6d0023f
fixed pointer error and warning
Jun 4, 2020
4d0f562
changes to cdc msc interface definitions
Jun 4, 2020
b29c3ea
remove SOF from MSC+CDC
Jun 4, 2020
2207a41
further changes during merging
Jun 4, 2020
a341011
set cdc usb handle to usb handle
Jun 4, 2020
8709e8f
refactored cdc msc descriptor and fixed for windowsn
Jun 7, 2020
def0867
fixed formatting
Jun 7, 2020
4447803
added extra board configurations
Jun 7, 2020
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
Prev Previous commit
Next Next commit
changes to cdc msc interface definitions
  • Loading branch information
Rudi Horn committed Jun 4, 2020
commit 4d0f56282a12d6a196dc097597a5b8ba5fa1a46e
50 changes: 25 additions & 25 deletions cores/arduino/stm32/usb/cdc_msc/usbd_cdc_msc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ static uint8_t USBD_COMPOSITE_HSCfgDesc[USB_CDC_MSC_CONFIG_DESC_SIZ] = {
0x09, /* bLength: Interface Descriptor size */
USB_DESC_TYPE_INTERFACE, /* bDescriptorType: Interface */
/* Interface descriptor type */
0x00, /* bInterfaceNumber: Number of Interface */
CDC_ACM_INTERFACE, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x01, /* bNumEndpoints: One endpoints used */
0x02, /* bInterfaceClass: Communication Interface Class */
0x02, /* bInterfaceSubClass: Abstract Control Model */
0x01, /* bInterfaceProtocol: Common AT commands */
0x00, /* iInterface: */
0x05, /* iInterface: */

/*Header Functional Descriptor*/
0x05, /* bLength: Endpoint Descriptor size */
Expand All @@ -128,7 +128,7 @@ static uint8_t USBD_COMPOSITE_HSCfgDesc[USB_CDC_MSC_CONFIG_DESC_SIZ] = {
0x24, /* bDescriptorType: CS_INTERFACE */
0x01, /* bDescriptorSubtype: Call Management Func Desc */
0x00, /* bmCapabilities: D0+D1 */
0x01, /* bDataInterface: 1 */
CDC_COM_INTERFACE, /* bDataInterface: 1 */

/*ACM Functional Descriptor*/
0x04, /* bFunctionLength */
Expand All @@ -140,8 +140,8 @@ static uint8_t USBD_COMPOSITE_HSCfgDesc[USB_CDC_MSC_CONFIG_DESC_SIZ] = {
0x05, /* bFunctionLength */
0x24, /* bDescriptorType: CS_INTERFACE */
0x06, /* bDescriptorSubtype: Union func desc */
0x00, /* bMasterInterface: Communication class interface */
0x01, /* bSlaveInterface0: Data Class Interface */
CDC_ACM_INTERFACE, /* bMasterInterface: Communication class interface */
CDC_COM_INTERFACE, /* bSlaveInterface0: Data Class Interface */

/*Endpoint 2 Descriptor*/
0x07, /* bLength: Endpoint Descriptor size */
Expand All @@ -156,13 +156,13 @@ static uint8_t USBD_COMPOSITE_HSCfgDesc[USB_CDC_MSC_CONFIG_DESC_SIZ] = {
/*Data class interface descriptor*/
0x09, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_INTERFACE, /* bDescriptorType: */
0x01, /* bInterfaceNumber: Number of Interface */
CDC_COM_INTERFACE, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x02, /* bNumEndpoints: Two endpoints used */
0x0A, /* bInterfaceClass: CDC */
0x00, /* bInterfaceSubClass: */
0x00, /* bInterfaceProtocol: */
0x00, /* iInterface: */
0x05, /* iInterface: */

/*Endpoint OUT Descriptor*/
0x07, /* bLength: Endpoint Descriptor size */
Expand All @@ -186,7 +186,7 @@ static uint8_t USBD_COMPOSITE_HSCfgDesc[USB_CDC_MSC_CONFIG_DESC_SIZ] = {
/******************** Mass Storage interface ********************/
0x09, /* bLength: Interface Descriptor size */
0x04, /* bDescriptorType: */
0x02, /* bInterfaceNumber: Number of Interface */
MSC_INTERFACE, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x02, /* bNumEndpoints */
0x08, /* bInterfaceClass: MSC Class */
Expand Down Expand Up @@ -235,13 +235,13 @@ static uint8_t USBD_COMPOSITE_FSCfgDesc[USB_CDC_MSC_CONFIG_DESC_SIZ] = {
0x09, /* bLength: Interface Descriptor size */
USB_DESC_TYPE_INTERFACE, /* bDescriptorType: Interface */
/* Interface descriptor type */
0x00, /* bInterfaceNumber: Number of Interface */
CDC_ACM_INTERFACE, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x01, /* bNumEndpoints: One endpoints used */
0x02, /* bInterfaceClass: Communication Interface Class */
0x02, /* bInterfaceSubClass: Abstract Control Model */
0x01, /* bInterfaceProtocol: Common AT commands */
0x00, /* iInterface: */
0x05, /* iInterface: */

/*Header Functional Descriptor*/
0x05, /* bLength: Endpoint Descriptor size */
Expand All @@ -267,29 +267,29 @@ static uint8_t USBD_COMPOSITE_FSCfgDesc[USB_CDC_MSC_CONFIG_DESC_SIZ] = {
0x05, /* bFunctionLength */
0x24, /* bDescriptorType: CS_INTERFACE */
0x06, /* bDescriptorSubtype: Union func desc */
0x00, /* bMasterInterface: Communication class interface */
0x01, /* bSlaveInterface0: Data Class Interface */
CDC_ACM_INTERFACE, /* bMasterInterface: Communication class interface */
CDC_COM_INTERFACE, /* bSlaveInterface0: Data Class Interface */

/*Endpoint 2 Descriptor*/
0x07, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_ENDPOINT, /* bDescriptorType: Endpoint */
USB_DESC_TYPE_ENDPOINT, /* bDescriptorType: Endpoint */
CDC_CMD_EP, /* bEndpointAddress */
0x03, /* bmAttributes: Interrupt */
LOBYTE(CDC_CMD_PACKET_SIZE), /* wMaxPacketSize: */
LOBYTE(CDC_CMD_PACKET_SIZE), /* wMaxPacketSize: */
HIBYTE(CDC_CMD_PACKET_SIZE),
CDC_FS_BINTERVAL, /* bInterval: */
CDC_FS_BINTERVAL, /* bInterval: */
/*---------------------------------------------------------------------------*/

/*Data class interface descriptor*/
0x09, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_INTERFACE, /* bDescriptorType: */
0x01, /* bInterfaceNumber: Number of Interface */
CDC_COM_INTERFACE, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x02, /* bNumEndpoints: Two endpoints used */
0x0A, /* bInterfaceClass: CDC */
0x00, /* bInterfaceSubClass: */
0x00, /* bInterfaceProtocol: */
0x00, /* iInterface: */
0x05, /* iInterface: */

/*Endpoint OUT Descriptor*/
0x07, /* bLength: Endpoint Descriptor size */
Expand All @@ -313,7 +313,7 @@ static uint8_t USBD_COMPOSITE_FSCfgDesc[USB_CDC_MSC_CONFIG_DESC_SIZ] = {
/******************** Mass Storage interface ********************/
0x09, /* bLength: Interface Descriptor size */
0x04, /* bDescriptorType: */
0x02, /* bInterfaceNumber: Number of Interface */
MSC_INTERFACE, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x02, /* bNumEndpoints */
0x08, /* bInterfaceClass: MSC Class */
Expand Down Expand Up @@ -362,13 +362,13 @@ static uint8_t USBD_COMPOSITE_OtherSpeedCfgDesc[USB_CDC_MSC_CONFIG_DESC_SIZ] = {
0x09, /* bLength: Interface Descriptor size */
USB_DESC_TYPE_INTERFACE, /* bDescriptorType: Interface */
/* Interface descriptor type */
0x00, /* bInterfaceNumber: Number of Interface */
CDC_ACM_INTERFACE, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x01, /* bNumEndpoints: One endpoints used */
0x02, /* bInterfaceClass: Communication Interface Class */
0x02, /* bInterfaceSubClass: Abstract Control Model */
0x01, /* bInterfaceProtocol: Common AT commands */
0x00, /* iInterface: */
0x05, /* iInterface: */

/*Header Functional Descriptor*/
0x05, /* bLength: Endpoint Descriptor size */
Expand All @@ -394,8 +394,8 @@ static uint8_t USBD_COMPOSITE_OtherSpeedCfgDesc[USB_CDC_MSC_CONFIG_DESC_SIZ] = {
0x05, /* bFunctionLength */
0x24, /* bDescriptorType: CS_INTERFACE */
0x06, /* bDescriptorSubtype: Union func desc */
0x00, /* bMasterInterface: Communication class interface */
0x01, /* bSlaveInterface0: Data Class Interface */
CDC_ACM_INTERFACE, /* bMasterInterface: Communication class interface */
CDC_COM_INTERFACE, /* bSlaveInterface0: Data Class Interface */

/*Endpoint 2 Descriptor*/
0x07, /* bLength: Endpoint Descriptor size */
Expand All @@ -410,13 +410,13 @@ static uint8_t USBD_COMPOSITE_OtherSpeedCfgDesc[USB_CDC_MSC_CONFIG_DESC_SIZ] = {
/*Data class interface descriptor*/
0x09, /* bLength: Endpoint Descriptor size */
USB_DESC_TYPE_INTERFACE, /* bDescriptorType: */
0x01, /* bInterfaceNumber: Number of Interface */
CDC_COM_INTERFACE, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x02, /* bNumEndpoints: Two endpoints used */
0x0A, /* bInterfaceClass: CDC */
0x00, /* bInterfaceSubClass: */
0x00, /* bInterfaceProtocol: */
0x00, /* iInterface: */
0x05, /* iInterface: */

/*Endpoint OUT Descriptor*/
0x07, /* bLength: Endpoint Descriptor size */
Expand All @@ -440,7 +440,7 @@ static uint8_t USBD_COMPOSITE_OtherSpeedCfgDesc[USB_CDC_MSC_CONFIG_DESC_SIZ] = {
/******************** Mass Storage interface ********************/
0x09, /* bLength: Interface Descriptor size */
0x04, /* bDescriptorType: */
0x02, /* bInterfaceNumber: Number of Interface */
MSC_INTERFACE, /* bInterfaceNumber: Number of Interface */
0x00, /* bAlternateSetting: Alternate setting */
0x02, /* bNumEndpoints */
0x08, /* bInterfaceClass: MSC Class */
Expand Down