diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index ac60b9384f..f3483b3e99 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -608,15 +608,11 @@ msgstr "" msgid "Can't set CCCD on local Characteristic" msgstr "" -#: shared-bindings/usb_cdc/__init__.c shared-bindings/usb_hid/__init__.c -#: shared-bindings/usb_midi/__init__.c +#: shared-bindings/storage/__init__.c shared-bindings/usb_cdc/__init__.c +#: shared-bindings/usb_hid/__init__.c shared-bindings/usb_midi/__init__.c msgid "Cannot change USB devices now" msgstr "" -#: shared-bindings/storage/__init__.c -msgid "Cannot change usb devices now" -msgstr "" - #: shared-bindings/_bleio/Adapter.c msgid "Cannot create a new Adapter; use _bleio.adapter;" msgstr "" @@ -1638,10 +1634,6 @@ msgstr "" msgid "Not connected" msgstr "" -#: supervisor/shared/usb/usb_desc.c -msgid "Not enough USB endpoints" -msgstr "" - #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c #: shared-bindings/audiopwmio/PWMAudioOut.c msgid "Not playing" @@ -2149,10 +2141,6 @@ msgstr "" msgid "To exit, please reset the board without " msgstr "" -#: supervisor/shared/usb/usb_desc.c -msgid "Too many USB interface names" -msgstr "" - #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." @@ -2206,6 +2194,14 @@ msgstr "" msgid "USB Error" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "USB devices need more endpoints than are available." +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "USB devices specify too many interface names." +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "UUID integer value must be 0-0xffff" msgstr "" diff --git a/ports/atmel-samd/asf4_conf/samd21/hpl_usb_config.h b/ports/atmel-samd/asf4_conf/samd21/hpl_usb_config.h deleted file mode 100644 index 51c71cb823..0000000000 --- a/ports/atmel-samd/asf4_conf/samd21/hpl_usb_config.h +++ /dev/null @@ -1,382 +0,0 @@ -/* Auto-generated config file hpl_usb_config.h */ -#ifndef HPL_USB_CONFIG_H -#define HPL_USB_CONFIG_H - -// CIRCUITPY: Since we have dynamic USB descriptors, we may end up using all endpoints. -// So provide cache space for all of them. - -#define CONF_USB_EP1_CACHE 64 -#define CONF_USB_EP1_I_CACHE 64 - -#define CONF_USB_EP2_CACHE 64 -#define CONF_USB_EP2_I_CACHE 64 - -#define CONF_USB_EP3_CACHE 64 -#define CONF_USB_EP3_I_CACHE 64 - -#define CONF_USB_EP4_CACHE 64 -#define CONF_USB_EP4_I_CACHE 64 - -#define CONF_USB_EP5_CACHE 64 -#define CONF_USB_EP5_I_CACHE 64 - -#define CONF_USB_EP6_CACHE 64 -#define CONF_USB_EP6_I_CACHE 64 - -#define CONF_USB_EP7_CACHE 64 -#define CONF_USB_EP7_I_CACHE 64 - - -// <<< Use Configuration Wizard in Context Menu >>> - -#define CONF_USB_N_0 0 -#define CONF_USB_N_1 1 -#define CONF_USB_N_2 2 -#define CONF_USB_N_3 3 -#define CONF_USB_N_4 4 -#define CONF_USB_N_5 5 -#define CONF_USB_N_6 6 -#define CONF_USB_N_7 7 -#define CONF_USB_N_8 8 -#define CONF_USB_N_9 9 -#define CONF_USB_N_10 10 -#define CONF_USB_N_11 11 -#define CONF_USB_N_12 12 -#define CONF_USB_N_13 13 -#define CONF_USB_N_14 14 -#define CONF_USB_N_15 15 - -#define CONF_USB_D_EP_N_MAX (USB_EPT_NUM - 1) -#define CONF_USB_D_N_EP_MAX (CONF_USB_D_EP_N_MAX * 2 - 1) - -// USB Device HAL Configuration - -// Max number of endpoints supported -// Limits the number of endpoints (described by EP address) can be used in app. -// NOTE(tannewt): This not only limits the number of endpoints but also the -// addresses. In other words, even if you use endpoint 6 you need to set this to 11. -// 1 (EP0 only) -// 2 (EP0 + 1 endpoint) -// 3 (EP0 + 2 endpoints) -// 4 (EP0 + 3 endpoints) -// 5 (EP0 + 4 endpoints) -// 6 (EP0 + 5 endpoints) -// 7 (EP0 + 6 endpoints) -// 8 (EP0 + 7 endpoints) -// Max possible (by "Max Endpoint Number" config) -// usbd_num_ep_sp -#ifndef CONF_USB_D_NUM_EP_SP -#define CONF_USB_D_NUM_EP_SP CONF_USB_D_N_EP_MAX -#endif - -// - -// Max Endpoint Number supported -// Limits the max endpoint number. -// USB endpoint address is constructed by direction and endpoint number. Bit 8 of address set indicates the direction is IN. E.g., EP0x81 and EP0x01 have the same endpoint number, 1. -// Reduce the value according to specific device design, to cut-off memory usage. -// 0 (only EP0) -// 1 (EP 0x81 or 0x01) -// 2 (EP 0x82 or 0x02) -// 3 (EP 0x83 or 0x03) -// 4 (EP 0x84 or 0x04) -// 5 (EP 0x85 or 0x05) -// 6 (EP 0x86 or 0x06) -// 7 (EP 0x87 or 0x07) -// Max possible (by HW) -// The number of physical endpoints - 1 -// usbd_arch_max_ep_n -#ifndef CONF_USB_D_MAX_EP_N -#define CONF_USB_D_MAX_EP_N CONF_USB_D_EP_N_MAX -#endif - -// USB Speed Limit -// Limits the working speed of the device. -// Full speed -// Low Speed -// usbd_arch_speed -#ifndef CONF_USB_D_SPEED -#define CONF_USB_D_SPEED USB_SPEED_FS -#endif - -// Cache buffer size for EP0 -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// EP0 is default control endpoint, so cache must be used to be able to receive SETUP packet at any time. -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// usb_arch_ep0_cache -#ifndef CONF_USB_EP0_CACHE -#define CONF_USB_EP0_CACHE 64 -#endif - -// Cache configuration EP1 -// Cache buffer size for EP1 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep1_cache -#ifndef CONF_USB_EP1_CACHE -#define CONF_USB_EP1_CACHE 0 -#endif - -// Cache buffer size for EP1 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep1_I_CACHE -#ifndef CONF_USB_EP1_I_CACHE -#define CONF_USB_EP1_I_CACHE 0 -#endif -// - -// Cache configuration EP2 -// Cache buffer size for EP2 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep2_cache -#ifndef CONF_USB_EP2_CACHE -#define CONF_USB_EP2_CACHE 0 -#endif - -// Cache buffer size for EP2 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep2_I_CACHE -#ifndef CONF_USB_EP2_I_CACHE -#define CONF_USB_EP2_I_CACHE 0 -#endif -// - -// Cache configuration EP3 -// Cache buffer size for EP3 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep3_cache -#ifndef CONF_USB_EP3_CACHE -#define CONF_USB_EP3_CACHE 0 -#endif - -// Cache buffer size for EP3 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep3_I_CACHE -#ifndef CONF_USB_EP3_I_CACHE -#define CONF_USB_EP3_I_CACHE 0 -#endif -// - -// Cache configuration EP4 -// Cache buffer size for EP4 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep4_cache -#ifndef CONF_USB_EP4_CACHE -#define CONF_USB_EP4_CACHE 0 -#endif - -// Cache buffer size for EP4 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep4_I_CACHE -#ifndef CONF_USB_EP4_I_CACHE -#define CONF_USB_EP4_I_CACHE 0 -#endif -// - -// Cache configuration EP5 -// Cache buffer size for EP5 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep5_cache -#ifndef CONF_USB_EP5_CACHE -#define CONF_USB_EP5_CACHE 0 -#endif - -// Cache buffer size for EP5 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep5_I_CACHE -#ifndef CONF_USB_EP5_I_CACHE -#define CONF_USB_EP5_I_CACHE 0 -#endif -// - -// Cache configuration EP6 -// Cache buffer size for EP6 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep6_cache -#ifndef CONF_USB_EP6_CACHE -#define CONF_USB_EP6_CACHE 0 -#endif - -// Cache buffer size for EP6 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep6_I_CACHE -#ifndef CONF_USB_EP6_I_CACHE -#define CONF_USB_EP6_I_CACHE 0 -#endif -// - -// Cache configuration EP7 -// Cache buffer size for EP7 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep7_cache -#ifndef CONF_USB_EP7_CACHE -#define CONF_USB_EP7_CACHE 0 -#endif - -// Cache buffer size for EP7 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep7_I_CACHE -#ifndef CONF_USB_EP7_I_CACHE -#define CONF_USB_EP7_I_CACHE 0 -#endif -// - -// <<< end of configuration section >>> - -#endif // HPL_USB_CONFIG_H diff --git a/ports/atmel-samd/asf4_conf/samd21/usbd_config.h b/ports/atmel-samd/asf4_conf/samd21/usbd_config.h deleted file mode 100644 index b0f570b5e5..0000000000 --- a/ports/atmel-samd/asf4_conf/samd21/usbd_config.h +++ /dev/null @@ -1,850 +0,0 @@ -/* Auto-generated config file usbd_config.h */ -#ifndef USBD_CONFIG_H -#define USBD_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// ---- USB Device Stack Core Options ---- - -// High Speed Support -// Enable high speed specific descriptors support, e.g., DeviceQualifierDescriptor and OtherSpeedConfiguration Descriptor. -// High speed support require descriptors description array on start, for LS/FS and HS support in first and second place. -// usbd_hs_sp -#ifndef CONF_USBD_HS_SP -#define CONF_USBD_HS_SP 0 -#endif - -// ---- USB Device Stack Composite Options ---- - -// Enable String Descriptors -// usb_composite_str_en -#ifndef CONF_USB_COMPOSITE_STR_EN -#define CONF_USB_COMPOSITE_STR_EN 0 -#endif -// Language IDs -// Language IDs in c format, split by comma (E.g., 0x0409 ...) -// usb_composite_langid -#ifndef CONF_USB_COMPOSITE_LANGID -#define CONF_USB_COMPOSITE_LANGID "0x0409" -#endif - -#ifndef CONF_USB_COMPOSITE_LANGID_DESC -#define CONF_USB_COMPOSITE_LANGID_DESC -#endif -// - -// Composite Device Descriptor - -// bcdUSB -// <0x0200=> USB 2.0 version -// <0x0210=> USB 2.1 version -// usb_composite_bcdusb -#ifndef CONF_USB_COMPOSITE_BCDUSB -#define CONF_USB_COMPOSITE_BCDUSB 0x200 -#endif - -// bMaxPackeSize0 -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// usb_composite_bmaxpksz0 -#ifndef CONF_USB_COMPOSITE_BMAXPKSZ0 -#define CONF_USB_COMPOSITE_BMAXPKSZ0 0x40 -#endif - -// idVender <0x0000-0xFFFF> -// usb_composite_idvender -#ifndef CONF_USB_COMPOSITE_IDVENDER -#define CONF_USB_COMPOSITE_IDVENDER 0x3eb -#endif - -// idProduct <0x0000-0xFFFF> -// usb_composite_idproduct -#ifndef CONF_USB_COMPOSITE_IDPRODUCT -#define CONF_USB_COMPOSITE_IDPRODUCT 0x2421 -#endif - -// bcdDevice <0x0000-0xFFFF> -// usb_composite_bcddevice -#ifndef CONF_USB_COMPOSITE_BCDDEVICE -#define CONF_USB_COMPOSITE_BCDDEVICE 0x100 -#endif - -// Enable string descriptor of iManufact -// usb_composite_imanufact_en -#ifndef CONF_USB_COMPOSITE_IMANUFACT_EN -#define CONF_USB_COMPOSITE_IMANUFACT_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_IMANUFACT -#define CONF_USB_COMPOSITE_IMANUFACT (CONF_USB_COMPOSITE_IMANUFACT_EN * (CONF_USB_COMPOSITE_IMANUFACT_EN)) -#endif - -// Unicode string of iManufact -// usb_composite_imanufact_str -#ifndef CONF_USB_COMPOSITE_IMANUFACT_STR -#define CONF_USB_COMPOSITE_IMANUFACT_STR "Atmel" -#endif - -#ifndef CONF_USB_COMPOSITE_IMANUFACT_STR_DESC -#define CONF_USB_COMPOSITE_IMANUFACT_STR_DESC -#endif - -// - -// Enable string descriptor of iProduct -// usb_composite_iproduct_en -#ifndef CONF_USB_COMPOSITE_IPRODUCT_EN -#define CONF_USB_COMPOSITE_IPRODUCT_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_IPRODUCT -#define CONF_USB_COMPOSITE_IPRODUCT \ - (CONF_USB_COMPOSITE_IPRODUCT_EN * (CONF_USB_COMPOSITE_IMANUFACT_EN + CONF_USB_COMPOSITE_IPRODUCT_EN)) -#endif - -// Unicode string of iProduct -// usb_composite_iproduct_str -#ifndef CONF_USB_COMPOSITE_IPRODUCT_STR -#define CONF_USB_COMPOSITE_IPRODUCT_STR "Composite Demo" -#endif - -#ifndef CONF_USB_COMPOSITE_IPRODUCT_STR_DESC -#define CONF_USB_COMPOSITE_IPRODUCT_STR_DESC -#endif - -// - -// Enable string descriptor of iSerialNum -// usb_composite_iserialnum_en -#ifndef CONF_USB_COMPOSITE_ISERIALNUM_EN -#define CONF_USB_COMPOSITE_ISERIALNUM_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_ISERIALNUM -#define CONF_USB_COMPOSITE_ISERIALNUM \ - (CONF_USB_COMPOSITE_ISERIALNUM_EN \ - * (CONF_USB_COMPOSITE_IMANUFACT_EN + CONF_USB_COMPOSITE_IPRODUCT_EN + CONF_USB_COMPOSITE_ISERIALNUM_EN)) -#endif - -// Unicode string of iSerialNum -// usb_composite_iserialnum_str -#ifndef CONF_USB_COMPOSITE_ISERIALNUM_STR -#define CONF_USB_COMPOSITE_ISERIALNUM_STR "123456789ABCDEF" -#endif - -#ifndef CONF_USB_COMPOSITE_ISERIALNUM_STR_DESC -#define CONF_USB_COMPOSITE_ISERIALNUM_STR_DESC -#endif - -// - -// bNumConfigurations <0x01-0xFF> -// usb_composite_bnumconfig -#ifndef CONF_USB_COMPOSITE_BNUMCONFIG -#define CONF_USB_COMPOSITE_BNUMCONFIG 0x1 -#endif - -// - -// Composite Configuration Descriptor -// bConfigurationValue <0x01-0xFF> -// usb_composite_bconfigval -#ifndef CONF_USB_COMPOSITE_BCONFIGVAL -#define CONF_USB_COMPOSITE_BCONFIGVAL 0x1 -#endif -// Enable string descriptor of iConfig -// usb_composite_iconfig_en -#ifndef CONF_USB_COMPOSITE_ICONFIG_EN -#define CONF_USB_COMPOSITE_ICONFIG_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_ICONFIG -#define CONF_USB_COMPOSITE_ICONFIG \ - (CONF_USB_COMPOSITE_ICONFIG_EN \ - * (CONF_USB_COMPOSITE_IMANUFACT_EN + CONF_USB_COMPOSITE_IPRODUCT_EN + CONF_USB_COMPOSITE_ISERIALNUM_EN \ - + CONF_USB_COMPOSITE_ICONFIG_EN)) -#endif - -// Unicode string of iConfig -// usb_composite_iconfig_str -#ifndef CONF_USB_COMPOSITE_ICONFIG_STR -#define CONF_USB_COMPOSITE_ICONFIG_STR "" -#endif - -#ifndef CONF_USB_COMPOSITE_ICONFIG_STR_DESC -#define CONF_USB_COMPOSITE_ICONFIG_STR_DESC -#endif - -// - -// bmAttributes -// <0x80=> Bus power supply, not support for remote wakeup -// <0xA0=> Bus power supply, support for remote wakeup -// <0xC0=> Self powered, not support for remote wakeup -// <0xE0=> Self powered, support for remote wakeup -// usb_composite_bmattri -#ifndef CONF_USB_COMPOSITE_BMATTRI -#define CONF_USB_COMPOSITE_BMATTRI 0x80 -#endif - -// bMaxPower <0x00-0xFF> -// usb_composite_bmaxpower -#ifndef CONF_USB_COMPOSITE_BMAXPOWER -#define CONF_USB_COMPOSITE_BMAXPOWER 0x32 -#endif -// - -// CDC ACM Support -// usb_composite_cdc_acm_support -#ifndef CONF_USB_COMPOSITE_CDC_ACM_EN -#define CONF_USB_COMPOSITE_CDC_ACM_EN 1 -#endif - -// CDC ACM Comm Interrupt IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_cdc_acm_epaddr -#ifndef CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_EPADDR -#define CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_EPADDR 0x82 -#endif - -// CDC ACM Comm Interrupt IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_cdc_acm_comm_int_maxpksz -#ifndef CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_MAXPKSZ -#define CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_MAXPKSZ 0x40 -#endif - -// CDC ACM Data BULK IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_cdc_acm_data_bulkin_epaddr -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_EPADDR -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_EPADDR 0x81 -#endif - -// CDC ACM Data BULK IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_cdc_acm_data_builin_maxpksz -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ 0x40 -#endif - -// CDC ACM Data BULK IN Endpoint wMaxPacketSize for High Speed -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// <0x0080=> 128 bytes -// <0x0100=> 256 bytes -// <0x0200=> 512 bytes - -// usb_composite_cdc_acm_data_builin_maxpksz_hs -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ_HS -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ_HS 0x0200 -#endif - -// CDC ACM Data BULK OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_cdc_acm_data_bulkout_epaddr -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_EPADDR -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_EPADDR 0x1 -#endif - -// CDC ACM Data BULK OUT Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_cdc_acm_data_buckout_maxpksz -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ 0x40 -#endif - -// CDC ACM Data BULK OUT Endpoint wMaxPacketSize for High Speed -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// <0x0080=> 128 bytes -// <0x0100=> 256 bytes -// <0x0200=> 512 bytes - -// usb_composite_cdc_acm_data_buckout_maxpksz_hs -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ_HS -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ_HS 0x0200 -#endif - -// CDC ACM Echo Demo generation -// conf_usb_composite_cdc_echo_demo -// Invoke cdcdf_acm_demo_init(buf[wMaxPacketSize]) to enable the echo demo. -// Buf is packet buffer for data receive and echo back. -// The buffer is 4 byte aligned to support DMA. -#ifndef CONF_USB_COMPOSITE_CDC_ECHO_DEMO -#define CONF_USB_COMPOSITE_CDC_ECHO_DEMO 0 -#endif - -// - -// HID Mouse Support -// usb_composite_hid_mouse_support -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_EN -#define CONF_USB_COMPOSITE_HID_MOUSE_EN 0 -#endif - -// HID Mouse INTERRUPT IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_hid_mouse_intin_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_INTIN_EPADDR -#define CONF_USB_COMPOSITE_HID_MOUSE_INTIN_EPADDR 0x83 -#endif - -// HID Mouse INTERRUPT IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_mouse_intin_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_INTIN_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_MOUSE_INTIN_MAXPKSZ 0x8 -#endif - -// HID Mouse Move Demo generation -// conf_usb_composite_hid_mouse_demo -// Invoke hiddf_demo_init(button1, button2, button3) to enabled the move demo. -// Button1 and button3 are the pins used for mouse moving left and right. -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_DEMO -#define CONF_USB_COMPOSITE_HID_MOUSE_DEMO 0 -#endif - -// - -// HID Keyboard Support -// usb_composite_hid_keyboard_support -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_EN -#define CONF_USB_COMPOSITE_HID_KEYBOARD_EN 0 -#endif - -// HID Keyboard INTERRUPT IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_hid_keyboard_intin_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_EPADDR -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_EPADDR 0x84 -#endif - -// HID Keyboard INTERRUPT IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_keyboard_intin_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_MAXPKSZ 0x8 -#endif - -// HID Keyboard INTERRUPT OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_hid_keyboard_intout_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_EPADDR -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_EPADDR 0x2 -#endif - -// HID Keyboard INTERRUPT OUT Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_keyboard_intout_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_MAXPKSZ 0x8 -#endif - -// HID Keyboard Caps Lock Demo generation -// conf_usb_composite_hid_keyboard_demo -// Invoke hiddf_demo_init(button1, button2, button3) to enabled the move demo. -// Buffon2 is the pin used for keyboard CAPS LOCK simulation. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_DEMO -#define CONF_USB_COMPOSITE_HID_KEYBOARD_DEMO 0 -#endif - -// - -// HID Generic Support -// usb_composite_hid_generic_support -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_EN -#define CONF_USB_COMPOSITE_HID_GENERIC_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_REPORT_LEN -#define CONF_USB_COMPOSITE_HID_GENERIC_REPORT_LEN 53 -#endif - -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_REPORT -#define CONF_USB_COMPOSITE_HID_GENERIC_REPORT \ - 0x06, 0xFF, 0xFF, 0x09, 0x01, 0xA1, 0x01, 0x09, 0x02, 0x09, 0x03, 0x15, 0x00, 0x26, 0xFF, 0x00, 0x75, 0x08, 0x95, \ - 0x40, 0x81, 0x02, 0x09, 0x04, 0x09, 0x05, 0x15, 0x00, 0x26, 0xFF, 0x00, 0x75, 0x08, 0x95, 0x40, 0x91, 0x02, \ - 0x09, 0x06, 0x09, 0x07, 0x15, 0x00, 0x26, 0xFF, 0x00, 0x75, 0x08, 0x95, 0x04, 0xB1, 0x02, 0xC0 -#endif - -// HID Generic INTERRUPT IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_hid_generic_intin_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTIN_EPADDR -#define CONF_USB_COMPOSITE_HID_GENERIC_INTIN_EPADDR 0x85 -#endif - -// HID Generic INTERRUPT IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_generic_intin_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTIN_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_GENERIC_INTIN_MAXPKSZ 0x40 -#endif - -// HID Generic INTERRUPT OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_hid_generic_intout_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_EPADDR -#define CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_EPADDR 0x3 -#endif - -// HID Generic INTERRUPT OUT Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// usb_composite_hid_generic_intout_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_MAXPKSZ 0x40 -#endif - -// - -// MSC Support -// usb_composite_msc_support -#ifndef CONF_USB_COMPOSITE_MSC_EN -#define CONF_USB_COMPOSITE_MSC_EN 0 -#endif - -// MSC BULK Endpoints wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_msc_bulk_maxpksz -#ifndef CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ -#define CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ 0x0040 -#endif - -// MSC BULK Endpoints wMaxPacketSize for High Speed -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// <0x0080=> 128 bytes -// <0x0100=> 256 bytes -// <0x0200=> 512 bytes - -// usb_composite_msc_bulk_maxpksz_hs -#ifndef CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ_HS -#define CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ_HS 0x0200 -#endif - -// MSC BULK IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_msc_bulkin_epaddr -#ifndef CONF_USB_COMPOSITE_MSC_BULKIN_EPADDR -#define CONF_USB_COMPOSITE_MSC_BULKIN_EPADDR 0x86 -#endif - -// MSC BULK OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_msc_bulkout_epaddr -#ifndef CONF_USB_COMPOSITE_MSC_BULKOUT_EPADDR -#define CONF_USB_COMPOSITE_MSC_BULKOUT_EPADDR 0x04 -#endif - -// Enable Demo code for Disk LUN handling -// usb_composite_msc_demo_en -#ifndef CONF_USB_COMPOSITE_MSC_LUN_DEMO -#define CONF_USB_COMPOSITE_MSC_LUN_DEMO 1 -#endif - -// Disk access cache/buffer of sectors if non-RAM disk (e.g., SD/MMC) enabled <1-64> -// conf_usb_msc_lun_buf_sectors -#ifndef CONF_USB_MSC_LUN_BUF_SECTORS -#define CONF_USB_MSC_LUN_BUF_SECTORS 4 -#endif - -// Enable Demo for RAM Disk -// conf_usb_msc_lun0_enable -#ifndef CONF_USB_MSC_LUN0_ENABLE -#define CONF_USB_MSC_LUN0_ENABLE 1 -#endif - -#ifndef CONF_USB_MSC_LUN0_TYPE -#define CONF_USB_MSC_LUN0_TYPE 0x00 -#endif - -// The disk is removable -// conf_usb_msc_lun0_rmb -#ifndef CONF_USB_MSC_LUN0_RMB -#define CONF_USB_MSC_LUN0_RMB 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN0_ISO -#define CONF_USB_MSC_LUN0_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_ECMA -#define CONF_USB_MSC_LUN0_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_ANSI -#define CONF_USB_MSC_LUN0_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_REPO -#define CONF_USB_MSC_LUN0_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN0_FACTORY -#define CONF_USB_MSC_LUN0_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_PRODUCT -#define CONF_USB_MSC_LUN0_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_PRODUCT_VERSION -#define CONF_USB_MSC_LUN0_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -// Disk Size (in KB) <0x1-0xFFFFFFFF> -// Windows will not show disk less than 20K, so 22K is used to reserve more RAM for APP -// conf_usb_msc_lun0_capacity - -#ifndef CONF_USB_MSC_LUN0_CAPACITY -#define CONF_USB_MSC_LUN0_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN0_BLOCK_SIZE -#define CONF_USB_MSC_LUN0_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN0_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN0_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN0_CAPACITY * 1024 / CONF_USB_MSC_LUN0_BLOCK_SIZE - 1) -#endif - -// - -// Enable Demo for SD/MMC Disk -// SD/MMC stack must be added before enable SD/MMC demo -// SD/MMC insert/eject not supported by this simple demo -// conf_usb_msc_lun1_enable -#ifndef CONF_USB_MSC_LUN1_ENABLE -#define CONF_USB_MSC_LUN1_ENABLE 0 -#endif - -#ifndef CONF_USB_MSC_LUN1_TYPE -#define CONF_USB_MSC_LUN1_TYPE 0x00 -#endif - -// The disk is removable -// SD/MMC stack must be added before enable SD/MMC demo -// SD/MMC insert/eject not supported by this simple demo -// conf_usb_msc_lun1_rmb -#ifndef CONF_USB_MSC_LUN1_RMB -#define CONF_USB_MSC_LUN1_RMB 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN1_ISO -#define CONF_USB_MSC_LUN1_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_ECMA -#define CONF_USB_MSC_LUN1_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_ANSI -#define CONF_USB_MSC_LUN1_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_REPO -#define CONF_USB_MSC_LUN1_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN1_FACTORY -#define CONF_USB_MSC_LUN1_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_PRODUCT -#define CONF_USB_MSC_LUN1_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_PRODUCT_VERSION -#define CONF_USB_MSC_LUN1_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_CAPACITY -#define CONF_USB_MSC_LUN1_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN1_BLOCK_SIZE -#define CONF_USB_MSC_LUN1_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN1_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN1_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN1_CAPACITY * 1024 / CONF_USB_MSC_LUN1_BLOCK_SIZE - 1) -#endif - -// - -// Enable Demo for LUN 2 -// conf_usb_msc_lun2_enable -#ifndef CONF_USB_MSC_LUN2_ENABLE -#define CONF_USB_MSC_LUN2_ENABLE 0 -#endif - -#ifndef CONF_USB_MSC_LUN2_TYPE -#define CONF_USB_MSC_LUN2_TYPE 0x00 -#endif - -// The disk is removable -// conf_usb_msc_lun2_rmb -#ifndef CONF_USB_MSC_LUN2_RMB -#define CONF_USB_MSC_LUN2_RMB 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN2_ISO -#define CONF_USB_MSC_LUN2_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_ECMA -#define CONF_USB_MSC_LUN2_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_ANSI -#define CONF_USB_MSC_LUN2_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_REPO -#define CONF_USB_MSC_LUN2_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN2_FACTORY -#define CONF_USB_MSC_LUN2_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_PRODUCT -#define CONF_USB_MSC_LUN2_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_PRODUCT_VERSION -#define CONF_USB_MSC_LUN2_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -// Disk Size (in KB) <0x1-0xFFFFFFFF> -// conf_usb_msc_lun2_capacity - -#ifndef CONF_USB_MSC_LUN2_CAPACITY -#define CONF_USB_MSC_LUN2_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN2_BLOCK_SIZE -#define CONF_USB_MSC_LUN2_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN2_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN2_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN2_CAPACITY * 1024 / CONF_USB_MSC_LUN2_BLOCK_SIZE - 1) -#endif - -// - -// Enable Demo for LUN 3 -// conf_usb_msc_lun3_enable -#ifndef CONF_USB_MSC_LUN3_ENABLE -#define CONF_USB_MSC_LUN3_ENABLE 0 -#endif - -#ifndef CONF_USB_MSC_LUN3_TYPE -#define CONF_USB_MSC_LUN3_TYPE 0x00 -#endif - -// The disk is removable -// conf_usb_msc_lun3_rmb -#ifndef CONF_USB_MSC_LUN3_RMB -#define CONF_USB_MSC_LUN3_RMB 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN3_ISO -#define CONF_USB_MSC_LUN3_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_ECMA -#define CONF_USB_MSC_LUN3_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_ANSI -#define CONF_USB_MSC_LUN3_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_REPO -#define CONF_USB_MSC_LUN3_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN3_FACTORY -#define CONF_USB_MSC_LUN3_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_PRODUCT -#define CONF_USB_MSC_LUN3_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_PRODUCT_VERSION -#define CONF_USB_MSC_LUN3_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -// Disk Size (in KB) <0x1-0xFFFFFFFF> -// conf_usb_msc_lun3_capacity - -#ifndef CONF_USB_MSC_LUN3_CAPACITY -#define CONF_USB_MSC_LUN3_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN3_BLOCK_SIZE -#define CONF_USB_MSC_LUN3_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN3_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN3_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN3_CAPACITY * 1024 / CONF_USB_MSC_LUN3_BLOCK_SIZE - 1) -#endif - -// - -// -// - -// <<< end of configuration section >>> - -#endif // USBD_CONFIG_H diff --git a/ports/atmel-samd/asf4_conf/samd51/hpl_usb_config.h b/ports/atmel-samd/asf4_conf/samd51/hpl_usb_config.h deleted file mode 100644 index 51c71cb823..0000000000 --- a/ports/atmel-samd/asf4_conf/samd51/hpl_usb_config.h +++ /dev/null @@ -1,382 +0,0 @@ -/* Auto-generated config file hpl_usb_config.h */ -#ifndef HPL_USB_CONFIG_H -#define HPL_USB_CONFIG_H - -// CIRCUITPY: Since we have dynamic USB descriptors, we may end up using all endpoints. -// So provide cache space for all of them. - -#define CONF_USB_EP1_CACHE 64 -#define CONF_USB_EP1_I_CACHE 64 - -#define CONF_USB_EP2_CACHE 64 -#define CONF_USB_EP2_I_CACHE 64 - -#define CONF_USB_EP3_CACHE 64 -#define CONF_USB_EP3_I_CACHE 64 - -#define CONF_USB_EP4_CACHE 64 -#define CONF_USB_EP4_I_CACHE 64 - -#define CONF_USB_EP5_CACHE 64 -#define CONF_USB_EP5_I_CACHE 64 - -#define CONF_USB_EP6_CACHE 64 -#define CONF_USB_EP6_I_CACHE 64 - -#define CONF_USB_EP7_CACHE 64 -#define CONF_USB_EP7_I_CACHE 64 - - -// <<< Use Configuration Wizard in Context Menu >>> - -#define CONF_USB_N_0 0 -#define CONF_USB_N_1 1 -#define CONF_USB_N_2 2 -#define CONF_USB_N_3 3 -#define CONF_USB_N_4 4 -#define CONF_USB_N_5 5 -#define CONF_USB_N_6 6 -#define CONF_USB_N_7 7 -#define CONF_USB_N_8 8 -#define CONF_USB_N_9 9 -#define CONF_USB_N_10 10 -#define CONF_USB_N_11 11 -#define CONF_USB_N_12 12 -#define CONF_USB_N_13 13 -#define CONF_USB_N_14 14 -#define CONF_USB_N_15 15 - -#define CONF_USB_D_EP_N_MAX (USB_EPT_NUM - 1) -#define CONF_USB_D_N_EP_MAX (CONF_USB_D_EP_N_MAX * 2 - 1) - -// USB Device HAL Configuration - -// Max number of endpoints supported -// Limits the number of endpoints (described by EP address) can be used in app. -// NOTE(tannewt): This not only limits the number of endpoints but also the -// addresses. In other words, even if you use endpoint 6 you need to set this to 11. -// 1 (EP0 only) -// 2 (EP0 + 1 endpoint) -// 3 (EP0 + 2 endpoints) -// 4 (EP0 + 3 endpoints) -// 5 (EP0 + 4 endpoints) -// 6 (EP0 + 5 endpoints) -// 7 (EP0 + 6 endpoints) -// 8 (EP0 + 7 endpoints) -// Max possible (by "Max Endpoint Number" config) -// usbd_num_ep_sp -#ifndef CONF_USB_D_NUM_EP_SP -#define CONF_USB_D_NUM_EP_SP CONF_USB_D_N_EP_MAX -#endif - -// - -// Max Endpoint Number supported -// Limits the max endpoint number. -// USB endpoint address is constructed by direction and endpoint number. Bit 8 of address set indicates the direction is IN. E.g., EP0x81 and EP0x01 have the same endpoint number, 1. -// Reduce the value according to specific device design, to cut-off memory usage. -// 0 (only EP0) -// 1 (EP 0x81 or 0x01) -// 2 (EP 0x82 or 0x02) -// 3 (EP 0x83 or 0x03) -// 4 (EP 0x84 or 0x04) -// 5 (EP 0x85 or 0x05) -// 6 (EP 0x86 or 0x06) -// 7 (EP 0x87 or 0x07) -// Max possible (by HW) -// The number of physical endpoints - 1 -// usbd_arch_max_ep_n -#ifndef CONF_USB_D_MAX_EP_N -#define CONF_USB_D_MAX_EP_N CONF_USB_D_EP_N_MAX -#endif - -// USB Speed Limit -// Limits the working speed of the device. -// Full speed -// Low Speed -// usbd_arch_speed -#ifndef CONF_USB_D_SPEED -#define CONF_USB_D_SPEED USB_SPEED_FS -#endif - -// Cache buffer size for EP0 -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// EP0 is default control endpoint, so cache must be used to be able to receive SETUP packet at any time. -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// usb_arch_ep0_cache -#ifndef CONF_USB_EP0_CACHE -#define CONF_USB_EP0_CACHE 64 -#endif - -// Cache configuration EP1 -// Cache buffer size for EP1 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep1_cache -#ifndef CONF_USB_EP1_CACHE -#define CONF_USB_EP1_CACHE 0 -#endif - -// Cache buffer size for EP1 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep1_I_CACHE -#ifndef CONF_USB_EP1_I_CACHE -#define CONF_USB_EP1_I_CACHE 0 -#endif -// - -// Cache configuration EP2 -// Cache buffer size for EP2 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep2_cache -#ifndef CONF_USB_EP2_CACHE -#define CONF_USB_EP2_CACHE 0 -#endif - -// Cache buffer size for EP2 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep2_I_CACHE -#ifndef CONF_USB_EP2_I_CACHE -#define CONF_USB_EP2_I_CACHE 0 -#endif -// - -// Cache configuration EP3 -// Cache buffer size for EP3 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep3_cache -#ifndef CONF_USB_EP3_CACHE -#define CONF_USB_EP3_CACHE 0 -#endif - -// Cache buffer size for EP3 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep3_I_CACHE -#ifndef CONF_USB_EP3_I_CACHE -#define CONF_USB_EP3_I_CACHE 0 -#endif -// - -// Cache configuration EP4 -// Cache buffer size for EP4 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep4_cache -#ifndef CONF_USB_EP4_CACHE -#define CONF_USB_EP4_CACHE 0 -#endif - -// Cache buffer size for EP4 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep4_I_CACHE -#ifndef CONF_USB_EP4_I_CACHE -#define CONF_USB_EP4_I_CACHE 0 -#endif -// - -// Cache configuration EP5 -// Cache buffer size for EP5 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep5_cache -#ifndef CONF_USB_EP5_CACHE -#define CONF_USB_EP5_CACHE 0 -#endif - -// Cache buffer size for EP5 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep5_I_CACHE -#ifndef CONF_USB_EP5_I_CACHE -#define CONF_USB_EP5_I_CACHE 0 -#endif -// - -// Cache configuration EP6 -// Cache buffer size for EP6 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep6_cache -#ifndef CONF_USB_EP6_CACHE -#define CONF_USB_EP6_CACHE 0 -#endif - -// Cache buffer size for EP6 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep6_I_CACHE -#ifndef CONF_USB_EP6_I_CACHE -#define CONF_USB_EP6_I_CACHE 0 -#endif -// - -// Cache configuration EP7 -// Cache buffer size for EP7 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep7_cache -#ifndef CONF_USB_EP7_CACHE -#define CONF_USB_EP7_CACHE 0 -#endif - -// Cache buffer size for EP7 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep7_I_CACHE -#ifndef CONF_USB_EP7_I_CACHE -#define CONF_USB_EP7_I_CACHE 0 -#endif -// - -// <<< end of configuration section >>> - -#endif // HPL_USB_CONFIG_H diff --git a/ports/atmel-samd/asf4_conf/samd51/usbd_config.h b/ports/atmel-samd/asf4_conf/samd51/usbd_config.h deleted file mode 100644 index b2629e1239..0000000000 --- a/ports/atmel-samd/asf4_conf/samd51/usbd_config.h +++ /dev/null @@ -1,850 +0,0 @@ -/* Auto-generated config file usbd_config.h */ -#ifndef USBD_CONFIG_H -#define USBD_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// ---- USB Device Stack Core Options ---- - -// High Speed Support -// Enable high speed specific descriptors support, e.g., DeviceQualifierDescriptor and OtherSpeedConfiguration Descriptor. -// High speed support require descriptors description array on start, for LS/FS and HS support in first and second place. -// usbd_hs_sp -#ifndef CONF_USBD_HS_SP -#define CONF_USBD_HS_SP 0 -#endif - -// ---- USB Device Stack Composite Options ---- - -// Enable String Descriptors -// usb_composite_str_en -#ifndef CONF_USB_COMPOSITE_STR_EN -#define CONF_USB_COMPOSITE_STR_EN 0 -#endif -// Language IDs -// Language IDs in c format, split by comma (E.g., 0x0409 ...) -// usb_composite_langid -#ifndef CONF_USB_COMPOSITE_LANGID -#define CONF_USB_COMPOSITE_LANGID "0x0409" -#endif - -#ifndef CONF_USB_COMPOSITE_LANGID_DESC -#define CONF_USB_COMPOSITE_LANGID_DESC -#endif -// - -// Composite Device Descriptor - -// bcdUSB -// <0x0200=> USB 2.0 version -// <0x0210=> USB 2.1 version -// usb_composite_bcdusb -#ifndef CONF_USB_COMPOSITE_BCDUSB -#define CONF_USB_COMPOSITE_BCDUSB 0x200 -#endif - -// bMaxPackeSize0 -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// usb_composite_bmaxpksz0 -#ifndef CONF_USB_COMPOSITE_BMAXPKSZ0 -#define CONF_USB_COMPOSITE_BMAXPKSZ0 0x40 -#endif - -// idVender <0x0000-0xFFFF> -// usb_composite_idvender -#ifndef CONF_USB_COMPOSITE_IDVENDER -#define CONF_USB_COMPOSITE_IDVENDER 0x3eb -#endif - -// idProduct <0x0000-0xFFFF> -// usb_composite_idproduct -#ifndef CONF_USB_COMPOSITE_IDPRODUCT -#define CONF_USB_COMPOSITE_IDPRODUCT 0x2421 -#endif - -// bcdDevice <0x0000-0xFFFF> -// usb_composite_bcddevice -#ifndef CONF_USB_COMPOSITE_BCDDEVICE -#define CONF_USB_COMPOSITE_BCDDEVICE 0x100 -#endif - -// Enable string descriptor of iManufact -// usb_composite_imanufact_en -#ifndef CONF_USB_COMPOSITE_IMANUFACT_EN -#define CONF_USB_COMPOSITE_IMANUFACT_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_IMANUFACT -#define CONF_USB_COMPOSITE_IMANUFACT (CONF_USB_COMPOSITE_IMANUFACT_EN * (CONF_USB_COMPOSITE_IMANUFACT_EN)) -#endif - -// Unicode string of iManufact -// usb_composite_imanufact_str -#ifndef CONF_USB_COMPOSITE_IMANUFACT_STR -#define CONF_USB_COMPOSITE_IMANUFACT_STR "Atmel" -#endif - -#ifndef CONF_USB_COMPOSITE_IMANUFACT_STR_DESC -#define CONF_USB_COMPOSITE_IMANUFACT_STR_DESC -#endif - -// - -// Enable string descriptor of iProduct -// usb_composite_iproduct_en -#ifndef CONF_USB_COMPOSITE_IPRODUCT_EN -#define CONF_USB_COMPOSITE_IPRODUCT_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_IPRODUCT -#define CONF_USB_COMPOSITE_IPRODUCT \ - (CONF_USB_COMPOSITE_IPRODUCT_EN * (CONF_USB_COMPOSITE_IMANUFACT_EN + CONF_USB_COMPOSITE_IPRODUCT_EN)) -#endif - -// Unicode string of iProduct -// usb_composite_iproduct_str -#ifndef CONF_USB_COMPOSITE_IPRODUCT_STR -#define CONF_USB_COMPOSITE_IPRODUCT_STR "Composite Demo" -#endif - -#ifndef CONF_USB_COMPOSITE_IPRODUCT_STR_DESC -#define CONF_USB_COMPOSITE_IPRODUCT_STR_DESC -#endif - -// - -// Enable string descriptor of iSerialNum -// usb_composite_iserialnum_en -#ifndef CONF_USB_COMPOSITE_ISERIALNUM_EN -#define CONF_USB_COMPOSITE_ISERIALNUM_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_ISERIALNUM -#define CONF_USB_COMPOSITE_ISERIALNUM \ - (CONF_USB_COMPOSITE_ISERIALNUM_EN \ - * (CONF_USB_COMPOSITE_IMANUFACT_EN + CONF_USB_COMPOSITE_IPRODUCT_EN + CONF_USB_COMPOSITE_ISERIALNUM_EN)) -#endif - -// Unicode string of iSerialNum -// usb_composite_iserialnum_str -#ifndef CONF_USB_COMPOSITE_ISERIALNUM_STR -#define CONF_USB_COMPOSITE_ISERIALNUM_STR "123456789ABCDEF" -#endif - -#ifndef CONF_USB_COMPOSITE_ISERIALNUM_STR_DESC -#define CONF_USB_COMPOSITE_ISERIALNUM_STR_DESC -#endif - -// - -// bNumConfigurations <0x01-0xFF> -// usb_composite_bnumconfig -#ifndef CONF_USB_COMPOSITE_BNUMCONFIG -#define CONF_USB_COMPOSITE_BNUMCONFIG 0x1 -#endif - -// - -// Composite Configuration Descriptor -// bConfigurationValue <0x01-0xFF> -// usb_composite_bconfigval -#ifndef CONF_USB_COMPOSITE_BCONFIGVAL -#define CONF_USB_COMPOSITE_BCONFIGVAL 0x1 -#endif -// Enable string descriptor of iConfig -// usb_composite_iconfig_en -#ifndef CONF_USB_COMPOSITE_ICONFIG_EN -#define CONF_USB_COMPOSITE_ICONFIG_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_ICONFIG -#define CONF_USB_COMPOSITE_ICONFIG \ - (CONF_USB_COMPOSITE_ICONFIG_EN \ - * (CONF_USB_COMPOSITE_IMANUFACT_EN + CONF_USB_COMPOSITE_IPRODUCT_EN + CONF_USB_COMPOSITE_ISERIALNUM_EN \ - + CONF_USB_COMPOSITE_ICONFIG_EN)) -#endif - -// Unicode string of iConfig -// usb_composite_iconfig_str -#ifndef CONF_USB_COMPOSITE_ICONFIG_STR -#define CONF_USB_COMPOSITE_ICONFIG_STR "" -#endif - -#ifndef CONF_USB_COMPOSITE_ICONFIG_STR_DESC -#define CONF_USB_COMPOSITE_ICONFIG_STR_DESC -#endif - -// - -// bmAttributes -// <0x80=> Bus power supply, not support for remote wakeup -// <0xA0=> Bus power supply, support for remote wakeup -// <0xC0=> Self powered, not support for remote wakeup -// <0xE0=> Self powered, support for remote wakeup -// usb_composite_bmattri -#ifndef CONF_USB_COMPOSITE_BMATTRI -#define CONF_USB_COMPOSITE_BMATTRI 0x80 -#endif - -// bMaxPower <0x00-0xFF> -// usb_composite_bmaxpower -#ifndef CONF_USB_COMPOSITE_BMAXPOWER -#define CONF_USB_COMPOSITE_BMAXPOWER 0x32 -#endif -// - -// CDC ACM Support -// usb_composite_cdc_acm_support -#ifndef CONF_USB_COMPOSITE_CDC_ACM_EN -#define CONF_USB_COMPOSITE_CDC_ACM_EN 0 -#endif - -// CDC ACM Comm Interrupt IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_cdc_acm_epaddr -#ifndef CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_EPADDR -#define CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_EPADDR 0x82 -#endif - -// CDC ACM Comm Interrupt IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_cdc_acm_comm_int_maxpksz -#ifndef CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_MAXPKSZ -#define CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_MAXPKSZ 0x40 -#endif - -// CDC ACM Data BULK IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_cdc_acm_data_bulkin_epaddr -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_EPADDR -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_EPADDR 0x81 -#endif - -// CDC ACM Data BULK IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_cdc_acm_data_builin_maxpksz -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ 0x40 -#endif - -// CDC ACM Data BULK IN Endpoint wMaxPacketSize for High Speed -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// <0x0080=> 128 bytes -// <0x0100=> 256 bytes -// <0x0200=> 512 bytes - -// usb_composite_cdc_acm_data_builin_maxpksz_hs -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ_HS -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ_HS 0x200 -#endif - -// CDC ACM Data BULK OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_cdc_acm_data_bulkout_epaddr -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_EPADDR -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_EPADDR 0x1 -#endif - -// CDC ACM Data BULK OUT Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_cdc_acm_data_buckout_maxpksz -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ 0x40 -#endif - -// CDC ACM Data BULK OUT Endpoint wMaxPacketSize for High Speed -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// <0x0080=> 128 bytes -// <0x0100=> 256 bytes -// <0x0200=> 512 bytes - -// usb_composite_cdc_acm_data_buckout_maxpksz_hs -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ_HS -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ_HS 0x200 -#endif - -// CDC ACM Echo Demo generation -// conf_usb_composite_cdc_echo_demo -// Invoke cdcdf_acm_demo_init(buf[wMaxPacketSize]) to enable the echo demo. -// Buf is packet buffer for data receive and echo back. -// The buffer is 4 byte aligned to support DMA. -#ifndef CONF_USB_COMPOSITE_CDC_ECHO_DEMO -#define CONF_USB_COMPOSITE_CDC_ECHO_DEMO 0 -#endif - -// - -// HID Mouse Support -// usb_composite_hid_mouse_support -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_EN -#define CONF_USB_COMPOSITE_HID_MOUSE_EN 0 -#endif - -// HID Mouse INTERRUPT IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_hid_mouse_intin_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_INTIN_EPADDR -#define CONF_USB_COMPOSITE_HID_MOUSE_INTIN_EPADDR 0x83 -#endif - -// HID Mouse INTERRUPT IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_mouse_intin_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_INTIN_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_MOUSE_INTIN_MAXPKSZ 0x8 -#endif - -// HID Mouse Move Demo generation -// conf_usb_composite_hid_mouse_demo -// Invoke hiddf_demo_init(button1, button2, button3) to enabled the move demo. -// Button1 and button3 are the pins used for mouse moving left and right. -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_DEMO -#define CONF_USB_COMPOSITE_HID_MOUSE_DEMO 0 -#endif - -// - -// HID Keyboard Support -// usb_composite_hid_keyboard_support -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_EN -#define CONF_USB_COMPOSITE_HID_KEYBOARD_EN 0 -#endif - -// HID Keyboard INTERRUPT IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_hid_keyboard_intin_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_EPADDR -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_EPADDR 0x84 -#endif - -// HID Keyboard INTERRUPT IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_keyboard_intin_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_MAXPKSZ 0x8 -#endif - -// HID Keyboard INTERRUPT OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_hid_keyboard_intout_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_EPADDR -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_EPADDR 0x2 -#endif - -// HID Keyboard INTERRUPT OUT Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_keyboard_intout_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_MAXPKSZ 0x8 -#endif - -// HID Keyboard Caps Lock Demo generation -// conf_usb_composite_hid_keyboard_demo -// Invoke hiddf_demo_init(button1, button2, button3) to enabled the move demo. -// Buffon2 is the pin used for keyboard CAPS LOCK simulation. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_DEMO -#define CONF_USB_COMPOSITE_HID_KEYBOARD_DEMO 0 -#endif - -// - -// HID Generic Support -// usb_composite_hid_generic_support -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_EN -#define CONF_USB_COMPOSITE_HID_GENERIC_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_REPORT_LEN -#define CONF_USB_COMPOSITE_HID_GENERIC_REPORT_LEN 53 -#endif - -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_REPORT -#define CONF_USB_COMPOSITE_HID_GENERIC_REPORT \ - 0x06, 0xFF, 0xFF, 0x09, 0x01, 0xA1, 0x01, 0x09, 0x02, 0x09, 0x03, 0x15, 0x00, 0x26, 0xFF, 0x00, 0x75, 0x08, 0x95, \ - 0x40, 0x81, 0x02, 0x09, 0x04, 0x09, 0x05, 0x15, 0x00, 0x26, 0xFF, 0x00, 0x75, 0x08, 0x95, 0x40, 0x91, 0x02, \ - 0x09, 0x06, 0x09, 0x07, 0x15, 0x00, 0x26, 0xFF, 0x00, 0x75, 0x08, 0x95, 0x04, 0xB1, 0x02, 0xC0 -#endif - -// HID Generic INTERRUPT IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_hid_generic_intin_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTIN_EPADDR -#define CONF_USB_COMPOSITE_HID_GENERIC_INTIN_EPADDR 0x85 -#endif - -// HID Generic INTERRUPT IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_generic_intin_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTIN_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_GENERIC_INTIN_MAXPKSZ 0x40 -#endif - -// HID Generic INTERRUPT OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_hid_generic_intout_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_EPADDR -#define CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_EPADDR 0x3 -#endif - -// HID Generic INTERRUPT OUT Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// usb_composite_hid_generic_intout_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_MAXPKSZ 0x40 -#endif - -// - -// MSC Support -// usb_composite_msc_support -#ifndef CONF_USB_COMPOSITE_MSC_EN -#define CONF_USB_COMPOSITE_MSC_EN 0 -#endif - -// MSC BULK Endpoints wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_msc_bulk_maxpksz -#ifndef CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ -#define CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ 0x40 -#endif - -// MSC BULK Endpoints wMaxPacketSize for High Speed -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// <0x0080=> 128 bytes -// <0x0100=> 256 bytes -// <0x0200=> 512 bytes - -// usb_composite_msc_bulk_maxpksz_hs -#ifndef CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ_HS -#define CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ_HS 0x200 -#endif - -// MSC BULK IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_msc_bulkin_epaddr -#ifndef CONF_USB_COMPOSITE_MSC_BULKIN_EPADDR -#define CONF_USB_COMPOSITE_MSC_BULKIN_EPADDR 0x86 -#endif - -// MSC BULK OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_msc_bulkout_epaddr -#ifndef CONF_USB_COMPOSITE_MSC_BULKOUT_EPADDR -#define CONF_USB_COMPOSITE_MSC_BULKOUT_EPADDR 0x4 -#endif - -// Enable Demo code for Disk LUN handling -// usb_composite_msc_demo_en -#ifndef CONF_USB_COMPOSITE_MSC_LUN_DEMO -#define CONF_USB_COMPOSITE_MSC_LUN_DEMO 1 -#endif - -// Disk access cache/buffer of sectors if non-RAM disk (e.g., SD/MMC) enabled <1-64> -// conf_usb_msc_lun_buf_sectors -#ifndef CONF_USB_MSC_LUN_BUF_SECTORS -#define CONF_USB_MSC_LUN_BUF_SECTORS 4 -#endif - -// Enable Demo for RAM Disk -// conf_usb_msc_lun0_enable -#ifndef CONF_USB_MSC_LUN0_ENABLE -#define CONF_USB_MSC_LUN0_ENABLE 1 -#endif - -#ifndef CONF_USB_MSC_LUN0_TYPE -#define CONF_USB_MSC_LUN0_TYPE 0x00 -#endif - -// The disk is removable -// conf_usb_msc_lun0_rmb -#ifndef CONF_USB_MSC_LUN0_RMB -#define CONF_USB_MSC_LUN0_RMB 0x1 -#endif - -#ifndef CONF_USB_MSC_LUN0_ISO -#define CONF_USB_MSC_LUN0_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_ECMA -#define CONF_USB_MSC_LUN0_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_ANSI -#define CONF_USB_MSC_LUN0_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_REPO -#define CONF_USB_MSC_LUN0_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN0_FACTORY -#define CONF_USB_MSC_LUN0_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_PRODUCT -#define CONF_USB_MSC_LUN0_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_PRODUCT_VERSION -#define CONF_USB_MSC_LUN0_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -// Disk Size (in KB) <0x1-0xFFFFFFFF> -// Windows will not show disk less than 20K, so 22K is used to reserve more RAM for APP -// conf_usb_msc_lun0_capacity - -#ifndef CONF_USB_MSC_LUN0_CAPACITY -#define CONF_USB_MSC_LUN0_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN0_BLOCK_SIZE -#define CONF_USB_MSC_LUN0_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN0_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN0_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN0_CAPACITY * 1024 / CONF_USB_MSC_LUN0_BLOCK_SIZE - 1) -#endif - -// - -// Enable Demo for SD/MMC Disk -// SD/MMC stack must be added before enable SD/MMC demo -// SD/MMC insert/eject not supported by this simple demo -// conf_usb_msc_lun1_enable -#ifndef CONF_USB_MSC_LUN1_ENABLE -#define CONF_USB_MSC_LUN1_ENABLE 0 -#endif - -#ifndef CONF_USB_MSC_LUN1_TYPE -#define CONF_USB_MSC_LUN1_TYPE 0x00 -#endif - -// The disk is removable -// SD/MMC stack must be added before enable SD/MMC demo -// SD/MMC insert/eject not supported by this simple demo -// conf_usb_msc_lun1_rmb -#ifndef CONF_USB_MSC_LUN1_RMB -#define CONF_USB_MSC_LUN1_RMB 0x1 -#endif - -#ifndef CONF_USB_MSC_LUN1_ISO -#define CONF_USB_MSC_LUN1_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_ECMA -#define CONF_USB_MSC_LUN1_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_ANSI -#define CONF_USB_MSC_LUN1_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_REPO -#define CONF_USB_MSC_LUN1_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN1_FACTORY -#define CONF_USB_MSC_LUN1_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_PRODUCT -#define CONF_USB_MSC_LUN1_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_PRODUCT_VERSION -#define CONF_USB_MSC_LUN1_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_CAPACITY -#define CONF_USB_MSC_LUN1_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN1_BLOCK_SIZE -#define CONF_USB_MSC_LUN1_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN1_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN1_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN1_CAPACITY * 1024 / CONF_USB_MSC_LUN1_BLOCK_SIZE - 1) -#endif - -// - -// Enable Demo for LUN 2 -// conf_usb_msc_lun2_enable -#ifndef CONF_USB_MSC_LUN2_ENABLE -#define CONF_USB_MSC_LUN2_ENABLE 0 -#endif - -#ifndef CONF_USB_MSC_LUN2_TYPE -#define CONF_USB_MSC_LUN2_TYPE 0x00 -#endif - -// The disk is removable -// conf_usb_msc_lun2_rmb -#ifndef CONF_USB_MSC_LUN2_RMB -#define CONF_USB_MSC_LUN2_RMB 0x1 -#endif - -#ifndef CONF_USB_MSC_LUN2_ISO -#define CONF_USB_MSC_LUN2_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_ECMA -#define CONF_USB_MSC_LUN2_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_ANSI -#define CONF_USB_MSC_LUN2_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_REPO -#define CONF_USB_MSC_LUN2_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN2_FACTORY -#define CONF_USB_MSC_LUN2_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_PRODUCT -#define CONF_USB_MSC_LUN2_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_PRODUCT_VERSION -#define CONF_USB_MSC_LUN2_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -// Disk Size (in KB) <0x1-0xFFFFFFFF> -// conf_usb_msc_lun2_capacity - -#ifndef CONF_USB_MSC_LUN2_CAPACITY -#define CONF_USB_MSC_LUN2_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN2_BLOCK_SIZE -#define CONF_USB_MSC_LUN2_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN2_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN2_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN2_CAPACITY * 1024 / CONF_USB_MSC_LUN2_BLOCK_SIZE - 1) -#endif - -// - -// Enable Demo for LUN 3 -// conf_usb_msc_lun3_enable -#ifndef CONF_USB_MSC_LUN3_ENABLE -#define CONF_USB_MSC_LUN3_ENABLE 0 -#endif - -#ifndef CONF_USB_MSC_LUN3_TYPE -#define CONF_USB_MSC_LUN3_TYPE 0x00 -#endif - -// The disk is removable -// conf_usb_msc_lun3_rmb -#ifndef CONF_USB_MSC_LUN3_RMB -#define CONF_USB_MSC_LUN3_RMB 0x1 -#endif - -#ifndef CONF_USB_MSC_LUN3_ISO -#define CONF_USB_MSC_LUN3_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_ECMA -#define CONF_USB_MSC_LUN3_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_ANSI -#define CONF_USB_MSC_LUN3_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_REPO -#define CONF_USB_MSC_LUN3_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN3_FACTORY -#define CONF_USB_MSC_LUN3_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_PRODUCT -#define CONF_USB_MSC_LUN3_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_PRODUCT_VERSION -#define CONF_USB_MSC_LUN3_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -// Disk Size (in KB) <0x1-0xFFFFFFFF> -// conf_usb_msc_lun3_capacity - -#ifndef CONF_USB_MSC_LUN3_CAPACITY -#define CONF_USB_MSC_LUN3_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN3_BLOCK_SIZE -#define CONF_USB_MSC_LUN3_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN3_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN3_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN3_CAPACITY * 1024 / CONF_USB_MSC_LUN3_BLOCK_SIZE - 1) -#endif - -// - -// -// - -// <<< end of configuration section >>> - -#endif // USBD_CONFIG_H diff --git a/ports/atmel-samd/asf4_conf/same51/hpl_usb_config.h b/ports/atmel-samd/asf4_conf/same51/hpl_usb_config.h deleted file mode 100644 index 51c71cb823..0000000000 --- a/ports/atmel-samd/asf4_conf/same51/hpl_usb_config.h +++ /dev/null @@ -1,382 +0,0 @@ -/* Auto-generated config file hpl_usb_config.h */ -#ifndef HPL_USB_CONFIG_H -#define HPL_USB_CONFIG_H - -// CIRCUITPY: Since we have dynamic USB descriptors, we may end up using all endpoints. -// So provide cache space for all of them. - -#define CONF_USB_EP1_CACHE 64 -#define CONF_USB_EP1_I_CACHE 64 - -#define CONF_USB_EP2_CACHE 64 -#define CONF_USB_EP2_I_CACHE 64 - -#define CONF_USB_EP3_CACHE 64 -#define CONF_USB_EP3_I_CACHE 64 - -#define CONF_USB_EP4_CACHE 64 -#define CONF_USB_EP4_I_CACHE 64 - -#define CONF_USB_EP5_CACHE 64 -#define CONF_USB_EP5_I_CACHE 64 - -#define CONF_USB_EP6_CACHE 64 -#define CONF_USB_EP6_I_CACHE 64 - -#define CONF_USB_EP7_CACHE 64 -#define CONF_USB_EP7_I_CACHE 64 - - -// <<< Use Configuration Wizard in Context Menu >>> - -#define CONF_USB_N_0 0 -#define CONF_USB_N_1 1 -#define CONF_USB_N_2 2 -#define CONF_USB_N_3 3 -#define CONF_USB_N_4 4 -#define CONF_USB_N_5 5 -#define CONF_USB_N_6 6 -#define CONF_USB_N_7 7 -#define CONF_USB_N_8 8 -#define CONF_USB_N_9 9 -#define CONF_USB_N_10 10 -#define CONF_USB_N_11 11 -#define CONF_USB_N_12 12 -#define CONF_USB_N_13 13 -#define CONF_USB_N_14 14 -#define CONF_USB_N_15 15 - -#define CONF_USB_D_EP_N_MAX (USB_EPT_NUM - 1) -#define CONF_USB_D_N_EP_MAX (CONF_USB_D_EP_N_MAX * 2 - 1) - -// USB Device HAL Configuration - -// Max number of endpoints supported -// Limits the number of endpoints (described by EP address) can be used in app. -// NOTE(tannewt): This not only limits the number of endpoints but also the -// addresses. In other words, even if you use endpoint 6 you need to set this to 11. -// 1 (EP0 only) -// 2 (EP0 + 1 endpoint) -// 3 (EP0 + 2 endpoints) -// 4 (EP0 + 3 endpoints) -// 5 (EP0 + 4 endpoints) -// 6 (EP0 + 5 endpoints) -// 7 (EP0 + 6 endpoints) -// 8 (EP0 + 7 endpoints) -// Max possible (by "Max Endpoint Number" config) -// usbd_num_ep_sp -#ifndef CONF_USB_D_NUM_EP_SP -#define CONF_USB_D_NUM_EP_SP CONF_USB_D_N_EP_MAX -#endif - -// - -// Max Endpoint Number supported -// Limits the max endpoint number. -// USB endpoint address is constructed by direction and endpoint number. Bit 8 of address set indicates the direction is IN. E.g., EP0x81 and EP0x01 have the same endpoint number, 1. -// Reduce the value according to specific device design, to cut-off memory usage. -// 0 (only EP0) -// 1 (EP 0x81 or 0x01) -// 2 (EP 0x82 or 0x02) -// 3 (EP 0x83 or 0x03) -// 4 (EP 0x84 or 0x04) -// 5 (EP 0x85 or 0x05) -// 6 (EP 0x86 or 0x06) -// 7 (EP 0x87 or 0x07) -// Max possible (by HW) -// The number of physical endpoints - 1 -// usbd_arch_max_ep_n -#ifndef CONF_USB_D_MAX_EP_N -#define CONF_USB_D_MAX_EP_N CONF_USB_D_EP_N_MAX -#endif - -// USB Speed Limit -// Limits the working speed of the device. -// Full speed -// Low Speed -// usbd_arch_speed -#ifndef CONF_USB_D_SPEED -#define CONF_USB_D_SPEED USB_SPEED_FS -#endif - -// Cache buffer size for EP0 -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// EP0 is default control endpoint, so cache must be used to be able to receive SETUP packet at any time. -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// usb_arch_ep0_cache -#ifndef CONF_USB_EP0_CACHE -#define CONF_USB_EP0_CACHE 64 -#endif - -// Cache configuration EP1 -// Cache buffer size for EP1 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep1_cache -#ifndef CONF_USB_EP1_CACHE -#define CONF_USB_EP1_CACHE 0 -#endif - -// Cache buffer size for EP1 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep1_I_CACHE -#ifndef CONF_USB_EP1_I_CACHE -#define CONF_USB_EP1_I_CACHE 0 -#endif -// - -// Cache configuration EP2 -// Cache buffer size for EP2 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep2_cache -#ifndef CONF_USB_EP2_CACHE -#define CONF_USB_EP2_CACHE 0 -#endif - -// Cache buffer size for EP2 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep2_I_CACHE -#ifndef CONF_USB_EP2_I_CACHE -#define CONF_USB_EP2_I_CACHE 0 -#endif -// - -// Cache configuration EP3 -// Cache buffer size for EP3 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep3_cache -#ifndef CONF_USB_EP3_CACHE -#define CONF_USB_EP3_CACHE 0 -#endif - -// Cache buffer size for EP3 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep3_I_CACHE -#ifndef CONF_USB_EP3_I_CACHE -#define CONF_USB_EP3_I_CACHE 0 -#endif -// - -// Cache configuration EP4 -// Cache buffer size for EP4 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep4_cache -#ifndef CONF_USB_EP4_CACHE -#define CONF_USB_EP4_CACHE 0 -#endif - -// Cache buffer size for EP4 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep4_I_CACHE -#ifndef CONF_USB_EP4_I_CACHE -#define CONF_USB_EP4_I_CACHE 0 -#endif -// - -// Cache configuration EP5 -// Cache buffer size for EP5 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep5_cache -#ifndef CONF_USB_EP5_CACHE -#define CONF_USB_EP5_CACHE 0 -#endif - -// Cache buffer size for EP5 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep5_I_CACHE -#ifndef CONF_USB_EP5_I_CACHE -#define CONF_USB_EP5_I_CACHE 0 -#endif -// - -// Cache configuration EP6 -// Cache buffer size for EP6 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep6_cache -#ifndef CONF_USB_EP6_CACHE -#define CONF_USB_EP6_CACHE 0 -#endif - -// Cache buffer size for EP6 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep6_I_CACHE -#ifndef CONF_USB_EP6_I_CACHE -#define CONF_USB_EP6_I_CACHE 0 -#endif -// - -// Cache configuration EP7 -// Cache buffer size for EP7 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep7_cache -#ifndef CONF_USB_EP7_CACHE -#define CONF_USB_EP7_CACHE 0 -#endif - -// Cache buffer size for EP7 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep7_I_CACHE -#ifndef CONF_USB_EP7_I_CACHE -#define CONF_USB_EP7_I_CACHE 0 -#endif -// - -// <<< end of configuration section >>> - -#endif // HPL_USB_CONFIG_H diff --git a/ports/atmel-samd/asf4_conf/same51/usbd_config.h b/ports/atmel-samd/asf4_conf/same51/usbd_config.h deleted file mode 100644 index b2629e1239..0000000000 --- a/ports/atmel-samd/asf4_conf/same51/usbd_config.h +++ /dev/null @@ -1,850 +0,0 @@ -/* Auto-generated config file usbd_config.h */ -#ifndef USBD_CONFIG_H -#define USBD_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// ---- USB Device Stack Core Options ---- - -// High Speed Support -// Enable high speed specific descriptors support, e.g., DeviceQualifierDescriptor and OtherSpeedConfiguration Descriptor. -// High speed support require descriptors description array on start, for LS/FS and HS support in first and second place. -// usbd_hs_sp -#ifndef CONF_USBD_HS_SP -#define CONF_USBD_HS_SP 0 -#endif - -// ---- USB Device Stack Composite Options ---- - -// Enable String Descriptors -// usb_composite_str_en -#ifndef CONF_USB_COMPOSITE_STR_EN -#define CONF_USB_COMPOSITE_STR_EN 0 -#endif -// Language IDs -// Language IDs in c format, split by comma (E.g., 0x0409 ...) -// usb_composite_langid -#ifndef CONF_USB_COMPOSITE_LANGID -#define CONF_USB_COMPOSITE_LANGID "0x0409" -#endif - -#ifndef CONF_USB_COMPOSITE_LANGID_DESC -#define CONF_USB_COMPOSITE_LANGID_DESC -#endif -// - -// Composite Device Descriptor - -// bcdUSB -// <0x0200=> USB 2.0 version -// <0x0210=> USB 2.1 version -// usb_composite_bcdusb -#ifndef CONF_USB_COMPOSITE_BCDUSB -#define CONF_USB_COMPOSITE_BCDUSB 0x200 -#endif - -// bMaxPackeSize0 -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// usb_composite_bmaxpksz0 -#ifndef CONF_USB_COMPOSITE_BMAXPKSZ0 -#define CONF_USB_COMPOSITE_BMAXPKSZ0 0x40 -#endif - -// idVender <0x0000-0xFFFF> -// usb_composite_idvender -#ifndef CONF_USB_COMPOSITE_IDVENDER -#define CONF_USB_COMPOSITE_IDVENDER 0x3eb -#endif - -// idProduct <0x0000-0xFFFF> -// usb_composite_idproduct -#ifndef CONF_USB_COMPOSITE_IDPRODUCT -#define CONF_USB_COMPOSITE_IDPRODUCT 0x2421 -#endif - -// bcdDevice <0x0000-0xFFFF> -// usb_composite_bcddevice -#ifndef CONF_USB_COMPOSITE_BCDDEVICE -#define CONF_USB_COMPOSITE_BCDDEVICE 0x100 -#endif - -// Enable string descriptor of iManufact -// usb_composite_imanufact_en -#ifndef CONF_USB_COMPOSITE_IMANUFACT_EN -#define CONF_USB_COMPOSITE_IMANUFACT_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_IMANUFACT -#define CONF_USB_COMPOSITE_IMANUFACT (CONF_USB_COMPOSITE_IMANUFACT_EN * (CONF_USB_COMPOSITE_IMANUFACT_EN)) -#endif - -// Unicode string of iManufact -// usb_composite_imanufact_str -#ifndef CONF_USB_COMPOSITE_IMANUFACT_STR -#define CONF_USB_COMPOSITE_IMANUFACT_STR "Atmel" -#endif - -#ifndef CONF_USB_COMPOSITE_IMANUFACT_STR_DESC -#define CONF_USB_COMPOSITE_IMANUFACT_STR_DESC -#endif - -// - -// Enable string descriptor of iProduct -// usb_composite_iproduct_en -#ifndef CONF_USB_COMPOSITE_IPRODUCT_EN -#define CONF_USB_COMPOSITE_IPRODUCT_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_IPRODUCT -#define CONF_USB_COMPOSITE_IPRODUCT \ - (CONF_USB_COMPOSITE_IPRODUCT_EN * (CONF_USB_COMPOSITE_IMANUFACT_EN + CONF_USB_COMPOSITE_IPRODUCT_EN)) -#endif - -// Unicode string of iProduct -// usb_composite_iproduct_str -#ifndef CONF_USB_COMPOSITE_IPRODUCT_STR -#define CONF_USB_COMPOSITE_IPRODUCT_STR "Composite Demo" -#endif - -#ifndef CONF_USB_COMPOSITE_IPRODUCT_STR_DESC -#define CONF_USB_COMPOSITE_IPRODUCT_STR_DESC -#endif - -// - -// Enable string descriptor of iSerialNum -// usb_composite_iserialnum_en -#ifndef CONF_USB_COMPOSITE_ISERIALNUM_EN -#define CONF_USB_COMPOSITE_ISERIALNUM_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_ISERIALNUM -#define CONF_USB_COMPOSITE_ISERIALNUM \ - (CONF_USB_COMPOSITE_ISERIALNUM_EN \ - * (CONF_USB_COMPOSITE_IMANUFACT_EN + CONF_USB_COMPOSITE_IPRODUCT_EN + CONF_USB_COMPOSITE_ISERIALNUM_EN)) -#endif - -// Unicode string of iSerialNum -// usb_composite_iserialnum_str -#ifndef CONF_USB_COMPOSITE_ISERIALNUM_STR -#define CONF_USB_COMPOSITE_ISERIALNUM_STR "123456789ABCDEF" -#endif - -#ifndef CONF_USB_COMPOSITE_ISERIALNUM_STR_DESC -#define CONF_USB_COMPOSITE_ISERIALNUM_STR_DESC -#endif - -// - -// bNumConfigurations <0x01-0xFF> -// usb_composite_bnumconfig -#ifndef CONF_USB_COMPOSITE_BNUMCONFIG -#define CONF_USB_COMPOSITE_BNUMCONFIG 0x1 -#endif - -// - -// Composite Configuration Descriptor -// bConfigurationValue <0x01-0xFF> -// usb_composite_bconfigval -#ifndef CONF_USB_COMPOSITE_BCONFIGVAL -#define CONF_USB_COMPOSITE_BCONFIGVAL 0x1 -#endif -// Enable string descriptor of iConfig -// usb_composite_iconfig_en -#ifndef CONF_USB_COMPOSITE_ICONFIG_EN -#define CONF_USB_COMPOSITE_ICONFIG_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_ICONFIG -#define CONF_USB_COMPOSITE_ICONFIG \ - (CONF_USB_COMPOSITE_ICONFIG_EN \ - * (CONF_USB_COMPOSITE_IMANUFACT_EN + CONF_USB_COMPOSITE_IPRODUCT_EN + CONF_USB_COMPOSITE_ISERIALNUM_EN \ - + CONF_USB_COMPOSITE_ICONFIG_EN)) -#endif - -// Unicode string of iConfig -// usb_composite_iconfig_str -#ifndef CONF_USB_COMPOSITE_ICONFIG_STR -#define CONF_USB_COMPOSITE_ICONFIG_STR "" -#endif - -#ifndef CONF_USB_COMPOSITE_ICONFIG_STR_DESC -#define CONF_USB_COMPOSITE_ICONFIG_STR_DESC -#endif - -// - -// bmAttributes -// <0x80=> Bus power supply, not support for remote wakeup -// <0xA0=> Bus power supply, support for remote wakeup -// <0xC0=> Self powered, not support for remote wakeup -// <0xE0=> Self powered, support for remote wakeup -// usb_composite_bmattri -#ifndef CONF_USB_COMPOSITE_BMATTRI -#define CONF_USB_COMPOSITE_BMATTRI 0x80 -#endif - -// bMaxPower <0x00-0xFF> -// usb_composite_bmaxpower -#ifndef CONF_USB_COMPOSITE_BMAXPOWER -#define CONF_USB_COMPOSITE_BMAXPOWER 0x32 -#endif -// - -// CDC ACM Support -// usb_composite_cdc_acm_support -#ifndef CONF_USB_COMPOSITE_CDC_ACM_EN -#define CONF_USB_COMPOSITE_CDC_ACM_EN 0 -#endif - -// CDC ACM Comm Interrupt IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_cdc_acm_epaddr -#ifndef CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_EPADDR -#define CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_EPADDR 0x82 -#endif - -// CDC ACM Comm Interrupt IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_cdc_acm_comm_int_maxpksz -#ifndef CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_MAXPKSZ -#define CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_MAXPKSZ 0x40 -#endif - -// CDC ACM Data BULK IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_cdc_acm_data_bulkin_epaddr -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_EPADDR -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_EPADDR 0x81 -#endif - -// CDC ACM Data BULK IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_cdc_acm_data_builin_maxpksz -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ 0x40 -#endif - -// CDC ACM Data BULK IN Endpoint wMaxPacketSize for High Speed -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// <0x0080=> 128 bytes -// <0x0100=> 256 bytes -// <0x0200=> 512 bytes - -// usb_composite_cdc_acm_data_builin_maxpksz_hs -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ_HS -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ_HS 0x200 -#endif - -// CDC ACM Data BULK OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_cdc_acm_data_bulkout_epaddr -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_EPADDR -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_EPADDR 0x1 -#endif - -// CDC ACM Data BULK OUT Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_cdc_acm_data_buckout_maxpksz -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ 0x40 -#endif - -// CDC ACM Data BULK OUT Endpoint wMaxPacketSize for High Speed -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// <0x0080=> 128 bytes -// <0x0100=> 256 bytes -// <0x0200=> 512 bytes - -// usb_composite_cdc_acm_data_buckout_maxpksz_hs -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ_HS -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ_HS 0x200 -#endif - -// CDC ACM Echo Demo generation -// conf_usb_composite_cdc_echo_demo -// Invoke cdcdf_acm_demo_init(buf[wMaxPacketSize]) to enable the echo demo. -// Buf is packet buffer for data receive and echo back. -// The buffer is 4 byte aligned to support DMA. -#ifndef CONF_USB_COMPOSITE_CDC_ECHO_DEMO -#define CONF_USB_COMPOSITE_CDC_ECHO_DEMO 0 -#endif - -// - -// HID Mouse Support -// usb_composite_hid_mouse_support -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_EN -#define CONF_USB_COMPOSITE_HID_MOUSE_EN 0 -#endif - -// HID Mouse INTERRUPT IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_hid_mouse_intin_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_INTIN_EPADDR -#define CONF_USB_COMPOSITE_HID_MOUSE_INTIN_EPADDR 0x83 -#endif - -// HID Mouse INTERRUPT IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_mouse_intin_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_INTIN_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_MOUSE_INTIN_MAXPKSZ 0x8 -#endif - -// HID Mouse Move Demo generation -// conf_usb_composite_hid_mouse_demo -// Invoke hiddf_demo_init(button1, button2, button3) to enabled the move demo. -// Button1 and button3 are the pins used for mouse moving left and right. -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_DEMO -#define CONF_USB_COMPOSITE_HID_MOUSE_DEMO 0 -#endif - -// - -// HID Keyboard Support -// usb_composite_hid_keyboard_support -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_EN -#define CONF_USB_COMPOSITE_HID_KEYBOARD_EN 0 -#endif - -// HID Keyboard INTERRUPT IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_hid_keyboard_intin_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_EPADDR -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_EPADDR 0x84 -#endif - -// HID Keyboard INTERRUPT IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_keyboard_intin_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_MAXPKSZ 0x8 -#endif - -// HID Keyboard INTERRUPT OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_hid_keyboard_intout_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_EPADDR -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_EPADDR 0x2 -#endif - -// HID Keyboard INTERRUPT OUT Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_keyboard_intout_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_MAXPKSZ 0x8 -#endif - -// HID Keyboard Caps Lock Demo generation -// conf_usb_composite_hid_keyboard_demo -// Invoke hiddf_demo_init(button1, button2, button3) to enabled the move demo. -// Buffon2 is the pin used for keyboard CAPS LOCK simulation. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_DEMO -#define CONF_USB_COMPOSITE_HID_KEYBOARD_DEMO 0 -#endif - -// - -// HID Generic Support -// usb_composite_hid_generic_support -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_EN -#define CONF_USB_COMPOSITE_HID_GENERIC_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_REPORT_LEN -#define CONF_USB_COMPOSITE_HID_GENERIC_REPORT_LEN 53 -#endif - -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_REPORT -#define CONF_USB_COMPOSITE_HID_GENERIC_REPORT \ - 0x06, 0xFF, 0xFF, 0x09, 0x01, 0xA1, 0x01, 0x09, 0x02, 0x09, 0x03, 0x15, 0x00, 0x26, 0xFF, 0x00, 0x75, 0x08, 0x95, \ - 0x40, 0x81, 0x02, 0x09, 0x04, 0x09, 0x05, 0x15, 0x00, 0x26, 0xFF, 0x00, 0x75, 0x08, 0x95, 0x40, 0x91, 0x02, \ - 0x09, 0x06, 0x09, 0x07, 0x15, 0x00, 0x26, 0xFF, 0x00, 0x75, 0x08, 0x95, 0x04, 0xB1, 0x02, 0xC0 -#endif - -// HID Generic INTERRUPT IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_hid_generic_intin_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTIN_EPADDR -#define CONF_USB_COMPOSITE_HID_GENERIC_INTIN_EPADDR 0x85 -#endif - -// HID Generic INTERRUPT IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_generic_intin_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTIN_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_GENERIC_INTIN_MAXPKSZ 0x40 -#endif - -// HID Generic INTERRUPT OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_hid_generic_intout_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_EPADDR -#define CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_EPADDR 0x3 -#endif - -// HID Generic INTERRUPT OUT Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// usb_composite_hid_generic_intout_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_MAXPKSZ 0x40 -#endif - -// - -// MSC Support -// usb_composite_msc_support -#ifndef CONF_USB_COMPOSITE_MSC_EN -#define CONF_USB_COMPOSITE_MSC_EN 0 -#endif - -// MSC BULK Endpoints wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_msc_bulk_maxpksz -#ifndef CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ -#define CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ 0x40 -#endif - -// MSC BULK Endpoints wMaxPacketSize for High Speed -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// <0x0080=> 128 bytes -// <0x0100=> 256 bytes -// <0x0200=> 512 bytes - -// usb_composite_msc_bulk_maxpksz_hs -#ifndef CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ_HS -#define CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ_HS 0x200 -#endif - -// MSC BULK IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_msc_bulkin_epaddr -#ifndef CONF_USB_COMPOSITE_MSC_BULKIN_EPADDR -#define CONF_USB_COMPOSITE_MSC_BULKIN_EPADDR 0x86 -#endif - -// MSC BULK OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_msc_bulkout_epaddr -#ifndef CONF_USB_COMPOSITE_MSC_BULKOUT_EPADDR -#define CONF_USB_COMPOSITE_MSC_BULKOUT_EPADDR 0x4 -#endif - -// Enable Demo code for Disk LUN handling -// usb_composite_msc_demo_en -#ifndef CONF_USB_COMPOSITE_MSC_LUN_DEMO -#define CONF_USB_COMPOSITE_MSC_LUN_DEMO 1 -#endif - -// Disk access cache/buffer of sectors if non-RAM disk (e.g., SD/MMC) enabled <1-64> -// conf_usb_msc_lun_buf_sectors -#ifndef CONF_USB_MSC_LUN_BUF_SECTORS -#define CONF_USB_MSC_LUN_BUF_SECTORS 4 -#endif - -// Enable Demo for RAM Disk -// conf_usb_msc_lun0_enable -#ifndef CONF_USB_MSC_LUN0_ENABLE -#define CONF_USB_MSC_LUN0_ENABLE 1 -#endif - -#ifndef CONF_USB_MSC_LUN0_TYPE -#define CONF_USB_MSC_LUN0_TYPE 0x00 -#endif - -// The disk is removable -// conf_usb_msc_lun0_rmb -#ifndef CONF_USB_MSC_LUN0_RMB -#define CONF_USB_MSC_LUN0_RMB 0x1 -#endif - -#ifndef CONF_USB_MSC_LUN0_ISO -#define CONF_USB_MSC_LUN0_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_ECMA -#define CONF_USB_MSC_LUN0_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_ANSI -#define CONF_USB_MSC_LUN0_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_REPO -#define CONF_USB_MSC_LUN0_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN0_FACTORY -#define CONF_USB_MSC_LUN0_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_PRODUCT -#define CONF_USB_MSC_LUN0_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_PRODUCT_VERSION -#define CONF_USB_MSC_LUN0_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -// Disk Size (in KB) <0x1-0xFFFFFFFF> -// Windows will not show disk less than 20K, so 22K is used to reserve more RAM for APP -// conf_usb_msc_lun0_capacity - -#ifndef CONF_USB_MSC_LUN0_CAPACITY -#define CONF_USB_MSC_LUN0_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN0_BLOCK_SIZE -#define CONF_USB_MSC_LUN0_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN0_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN0_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN0_CAPACITY * 1024 / CONF_USB_MSC_LUN0_BLOCK_SIZE - 1) -#endif - -// - -// Enable Demo for SD/MMC Disk -// SD/MMC stack must be added before enable SD/MMC demo -// SD/MMC insert/eject not supported by this simple demo -// conf_usb_msc_lun1_enable -#ifndef CONF_USB_MSC_LUN1_ENABLE -#define CONF_USB_MSC_LUN1_ENABLE 0 -#endif - -#ifndef CONF_USB_MSC_LUN1_TYPE -#define CONF_USB_MSC_LUN1_TYPE 0x00 -#endif - -// The disk is removable -// SD/MMC stack must be added before enable SD/MMC demo -// SD/MMC insert/eject not supported by this simple demo -// conf_usb_msc_lun1_rmb -#ifndef CONF_USB_MSC_LUN1_RMB -#define CONF_USB_MSC_LUN1_RMB 0x1 -#endif - -#ifndef CONF_USB_MSC_LUN1_ISO -#define CONF_USB_MSC_LUN1_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_ECMA -#define CONF_USB_MSC_LUN1_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_ANSI -#define CONF_USB_MSC_LUN1_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_REPO -#define CONF_USB_MSC_LUN1_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN1_FACTORY -#define CONF_USB_MSC_LUN1_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_PRODUCT -#define CONF_USB_MSC_LUN1_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_PRODUCT_VERSION -#define CONF_USB_MSC_LUN1_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_CAPACITY -#define CONF_USB_MSC_LUN1_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN1_BLOCK_SIZE -#define CONF_USB_MSC_LUN1_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN1_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN1_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN1_CAPACITY * 1024 / CONF_USB_MSC_LUN1_BLOCK_SIZE - 1) -#endif - -// - -// Enable Demo for LUN 2 -// conf_usb_msc_lun2_enable -#ifndef CONF_USB_MSC_LUN2_ENABLE -#define CONF_USB_MSC_LUN2_ENABLE 0 -#endif - -#ifndef CONF_USB_MSC_LUN2_TYPE -#define CONF_USB_MSC_LUN2_TYPE 0x00 -#endif - -// The disk is removable -// conf_usb_msc_lun2_rmb -#ifndef CONF_USB_MSC_LUN2_RMB -#define CONF_USB_MSC_LUN2_RMB 0x1 -#endif - -#ifndef CONF_USB_MSC_LUN2_ISO -#define CONF_USB_MSC_LUN2_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_ECMA -#define CONF_USB_MSC_LUN2_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_ANSI -#define CONF_USB_MSC_LUN2_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_REPO -#define CONF_USB_MSC_LUN2_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN2_FACTORY -#define CONF_USB_MSC_LUN2_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_PRODUCT -#define CONF_USB_MSC_LUN2_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_PRODUCT_VERSION -#define CONF_USB_MSC_LUN2_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -// Disk Size (in KB) <0x1-0xFFFFFFFF> -// conf_usb_msc_lun2_capacity - -#ifndef CONF_USB_MSC_LUN2_CAPACITY -#define CONF_USB_MSC_LUN2_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN2_BLOCK_SIZE -#define CONF_USB_MSC_LUN2_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN2_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN2_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN2_CAPACITY * 1024 / CONF_USB_MSC_LUN2_BLOCK_SIZE - 1) -#endif - -// - -// Enable Demo for LUN 3 -// conf_usb_msc_lun3_enable -#ifndef CONF_USB_MSC_LUN3_ENABLE -#define CONF_USB_MSC_LUN3_ENABLE 0 -#endif - -#ifndef CONF_USB_MSC_LUN3_TYPE -#define CONF_USB_MSC_LUN3_TYPE 0x00 -#endif - -// The disk is removable -// conf_usb_msc_lun3_rmb -#ifndef CONF_USB_MSC_LUN3_RMB -#define CONF_USB_MSC_LUN3_RMB 0x1 -#endif - -#ifndef CONF_USB_MSC_LUN3_ISO -#define CONF_USB_MSC_LUN3_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_ECMA -#define CONF_USB_MSC_LUN3_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_ANSI -#define CONF_USB_MSC_LUN3_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_REPO -#define CONF_USB_MSC_LUN3_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN3_FACTORY -#define CONF_USB_MSC_LUN3_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_PRODUCT -#define CONF_USB_MSC_LUN3_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_PRODUCT_VERSION -#define CONF_USB_MSC_LUN3_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -// Disk Size (in KB) <0x1-0xFFFFFFFF> -// conf_usb_msc_lun3_capacity - -#ifndef CONF_USB_MSC_LUN3_CAPACITY -#define CONF_USB_MSC_LUN3_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN3_BLOCK_SIZE -#define CONF_USB_MSC_LUN3_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN3_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN3_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN3_CAPACITY * 1024 / CONF_USB_MSC_LUN3_BLOCK_SIZE - 1) -#endif - -// - -// -// - -// <<< end of configuration section >>> - -#endif // USBD_CONFIG_H diff --git a/ports/atmel-samd/asf4_conf/same54/hpl_usb_config.h b/ports/atmel-samd/asf4_conf/same54/hpl_usb_config.h deleted file mode 100644 index 51c71cb823..0000000000 --- a/ports/atmel-samd/asf4_conf/same54/hpl_usb_config.h +++ /dev/null @@ -1,382 +0,0 @@ -/* Auto-generated config file hpl_usb_config.h */ -#ifndef HPL_USB_CONFIG_H -#define HPL_USB_CONFIG_H - -// CIRCUITPY: Since we have dynamic USB descriptors, we may end up using all endpoints. -// So provide cache space for all of them. - -#define CONF_USB_EP1_CACHE 64 -#define CONF_USB_EP1_I_CACHE 64 - -#define CONF_USB_EP2_CACHE 64 -#define CONF_USB_EP2_I_CACHE 64 - -#define CONF_USB_EP3_CACHE 64 -#define CONF_USB_EP3_I_CACHE 64 - -#define CONF_USB_EP4_CACHE 64 -#define CONF_USB_EP4_I_CACHE 64 - -#define CONF_USB_EP5_CACHE 64 -#define CONF_USB_EP5_I_CACHE 64 - -#define CONF_USB_EP6_CACHE 64 -#define CONF_USB_EP6_I_CACHE 64 - -#define CONF_USB_EP7_CACHE 64 -#define CONF_USB_EP7_I_CACHE 64 - - -// <<< Use Configuration Wizard in Context Menu >>> - -#define CONF_USB_N_0 0 -#define CONF_USB_N_1 1 -#define CONF_USB_N_2 2 -#define CONF_USB_N_3 3 -#define CONF_USB_N_4 4 -#define CONF_USB_N_5 5 -#define CONF_USB_N_6 6 -#define CONF_USB_N_7 7 -#define CONF_USB_N_8 8 -#define CONF_USB_N_9 9 -#define CONF_USB_N_10 10 -#define CONF_USB_N_11 11 -#define CONF_USB_N_12 12 -#define CONF_USB_N_13 13 -#define CONF_USB_N_14 14 -#define CONF_USB_N_15 15 - -#define CONF_USB_D_EP_N_MAX (USB_EPT_NUM - 1) -#define CONF_USB_D_N_EP_MAX (CONF_USB_D_EP_N_MAX * 2 - 1) - -// USB Device HAL Configuration - -// Max number of endpoints supported -// Limits the number of endpoints (described by EP address) can be used in app. -// NOTE(tannewt): This not only limits the number of endpoints but also the -// addresses. In other words, even if you use endpoint 6 you need to set this to 11. -// 1 (EP0 only) -// 2 (EP0 + 1 endpoint) -// 3 (EP0 + 2 endpoints) -// 4 (EP0 + 3 endpoints) -// 5 (EP0 + 4 endpoints) -// 6 (EP0 + 5 endpoints) -// 7 (EP0 + 6 endpoints) -// 8 (EP0 + 7 endpoints) -// Max possible (by "Max Endpoint Number" config) -// usbd_num_ep_sp -#ifndef CONF_USB_D_NUM_EP_SP -#define CONF_USB_D_NUM_EP_SP CONF_USB_D_N_EP_MAX -#endif - -// - -// Max Endpoint Number supported -// Limits the max endpoint number. -// USB endpoint address is constructed by direction and endpoint number. Bit 8 of address set indicates the direction is IN. E.g., EP0x81 and EP0x01 have the same endpoint number, 1. -// Reduce the value according to specific device design, to cut-off memory usage. -// 0 (only EP0) -// 1 (EP 0x81 or 0x01) -// 2 (EP 0x82 or 0x02) -// 3 (EP 0x83 or 0x03) -// 4 (EP 0x84 or 0x04) -// 5 (EP 0x85 or 0x05) -// 6 (EP 0x86 or 0x06) -// 7 (EP 0x87 or 0x07) -// Max possible (by HW) -// The number of physical endpoints - 1 -// usbd_arch_max_ep_n -#ifndef CONF_USB_D_MAX_EP_N -#define CONF_USB_D_MAX_EP_N CONF_USB_D_EP_N_MAX -#endif - -// USB Speed Limit -// Limits the working speed of the device. -// Full speed -// Low Speed -// usbd_arch_speed -#ifndef CONF_USB_D_SPEED -#define CONF_USB_D_SPEED USB_SPEED_FS -#endif - -// Cache buffer size for EP0 -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// EP0 is default control endpoint, so cache must be used to be able to receive SETUP packet at any time. -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// usb_arch_ep0_cache -#ifndef CONF_USB_EP0_CACHE -#define CONF_USB_EP0_CACHE 64 -#endif - -// Cache configuration EP1 -// Cache buffer size for EP1 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep1_cache -#ifndef CONF_USB_EP1_CACHE -#define CONF_USB_EP1_CACHE 0 -#endif - -// Cache buffer size for EP1 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep1_I_CACHE -#ifndef CONF_USB_EP1_I_CACHE -#define CONF_USB_EP1_I_CACHE 0 -#endif -// - -// Cache configuration EP2 -// Cache buffer size for EP2 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep2_cache -#ifndef CONF_USB_EP2_CACHE -#define CONF_USB_EP2_CACHE 0 -#endif - -// Cache buffer size for EP2 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep2_I_CACHE -#ifndef CONF_USB_EP2_I_CACHE -#define CONF_USB_EP2_I_CACHE 0 -#endif -// - -// Cache configuration EP3 -// Cache buffer size for EP3 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep3_cache -#ifndef CONF_USB_EP3_CACHE -#define CONF_USB_EP3_CACHE 0 -#endif - -// Cache buffer size for EP3 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep3_I_CACHE -#ifndef CONF_USB_EP3_I_CACHE -#define CONF_USB_EP3_I_CACHE 0 -#endif -// - -// Cache configuration EP4 -// Cache buffer size for EP4 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep4_cache -#ifndef CONF_USB_EP4_CACHE -#define CONF_USB_EP4_CACHE 0 -#endif - -// Cache buffer size for EP4 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep4_I_CACHE -#ifndef CONF_USB_EP4_I_CACHE -#define CONF_USB_EP4_I_CACHE 0 -#endif -// - -// Cache configuration EP5 -// Cache buffer size for EP5 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep5_cache -#ifndef CONF_USB_EP5_CACHE -#define CONF_USB_EP5_CACHE 0 -#endif - -// Cache buffer size for EP5 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep5_I_CACHE -#ifndef CONF_USB_EP5_I_CACHE -#define CONF_USB_EP5_I_CACHE 0 -#endif -// - -// Cache configuration EP6 -// Cache buffer size for EP6 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep6_cache -#ifndef CONF_USB_EP6_CACHE -#define CONF_USB_EP6_CACHE 0 -#endif - -// Cache buffer size for EP6 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep6_I_CACHE -#ifndef CONF_USB_EP6_I_CACHE -#define CONF_USB_EP6_I_CACHE 0 -#endif -// - -// Cache configuration EP7 -// Cache buffer size for EP7 OUT -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_arch_ep7_cache -#ifndef CONF_USB_EP7_CACHE -#define CONF_USB_EP7_CACHE 0 -#endif - -// Cache buffer size for EP7 IN -// Cache is used because the USB hardware always uses DMA which requires specific memory feature. -// This cache must not be allocated if you plan to use the endpoint as control endpoint. -// No cache means IN transaction not support data buffer outside of RAM, OUT transaction not support unaligned buffer and buffer size less than endpoint max packet size -// <0=> No cache -// <8=> Cached by 8 bytes buffer -// <16=> Cached by 16 bytes buffer -// <32=> Cached by 32 bytes buffer -// <64=> Cached by 64 bytes buffer -// <128=> Cached by 128 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <256=> Cached by 256 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <512=> Cached by 512 bytes buffer (HS Bulk or interrupt or isochronous EP) -// <1024=> Cached by 1024 bytes buffer (interrupt or isochronous EP) -// usb_ep7_I_CACHE -#ifndef CONF_USB_EP7_I_CACHE -#define CONF_USB_EP7_I_CACHE 0 -#endif -// - -// <<< end of configuration section >>> - -#endif // HPL_USB_CONFIG_H diff --git a/ports/atmel-samd/asf4_conf/same54/usbd_config.h b/ports/atmel-samd/asf4_conf/same54/usbd_config.h deleted file mode 100644 index b2629e1239..0000000000 --- a/ports/atmel-samd/asf4_conf/same54/usbd_config.h +++ /dev/null @@ -1,850 +0,0 @@ -/* Auto-generated config file usbd_config.h */ -#ifndef USBD_CONFIG_H -#define USBD_CONFIG_H - -// <<< Use Configuration Wizard in Context Menu >>> - -// ---- USB Device Stack Core Options ---- - -// High Speed Support -// Enable high speed specific descriptors support, e.g., DeviceQualifierDescriptor and OtherSpeedConfiguration Descriptor. -// High speed support require descriptors description array on start, for LS/FS and HS support in first and second place. -// usbd_hs_sp -#ifndef CONF_USBD_HS_SP -#define CONF_USBD_HS_SP 0 -#endif - -// ---- USB Device Stack Composite Options ---- - -// Enable String Descriptors -// usb_composite_str_en -#ifndef CONF_USB_COMPOSITE_STR_EN -#define CONF_USB_COMPOSITE_STR_EN 0 -#endif -// Language IDs -// Language IDs in c format, split by comma (E.g., 0x0409 ...) -// usb_composite_langid -#ifndef CONF_USB_COMPOSITE_LANGID -#define CONF_USB_COMPOSITE_LANGID "0x0409" -#endif - -#ifndef CONF_USB_COMPOSITE_LANGID_DESC -#define CONF_USB_COMPOSITE_LANGID_DESC -#endif -// - -// Composite Device Descriptor - -// bcdUSB -// <0x0200=> USB 2.0 version -// <0x0210=> USB 2.1 version -// usb_composite_bcdusb -#ifndef CONF_USB_COMPOSITE_BCDUSB -#define CONF_USB_COMPOSITE_BCDUSB 0x200 -#endif - -// bMaxPackeSize0 -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// usb_composite_bmaxpksz0 -#ifndef CONF_USB_COMPOSITE_BMAXPKSZ0 -#define CONF_USB_COMPOSITE_BMAXPKSZ0 0x40 -#endif - -// idVender <0x0000-0xFFFF> -// usb_composite_idvender -#ifndef CONF_USB_COMPOSITE_IDVENDER -#define CONF_USB_COMPOSITE_IDVENDER 0x3eb -#endif - -// idProduct <0x0000-0xFFFF> -// usb_composite_idproduct -#ifndef CONF_USB_COMPOSITE_IDPRODUCT -#define CONF_USB_COMPOSITE_IDPRODUCT 0x2421 -#endif - -// bcdDevice <0x0000-0xFFFF> -// usb_composite_bcddevice -#ifndef CONF_USB_COMPOSITE_BCDDEVICE -#define CONF_USB_COMPOSITE_BCDDEVICE 0x100 -#endif - -// Enable string descriptor of iManufact -// usb_composite_imanufact_en -#ifndef CONF_USB_COMPOSITE_IMANUFACT_EN -#define CONF_USB_COMPOSITE_IMANUFACT_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_IMANUFACT -#define CONF_USB_COMPOSITE_IMANUFACT (CONF_USB_COMPOSITE_IMANUFACT_EN * (CONF_USB_COMPOSITE_IMANUFACT_EN)) -#endif - -// Unicode string of iManufact -// usb_composite_imanufact_str -#ifndef CONF_USB_COMPOSITE_IMANUFACT_STR -#define CONF_USB_COMPOSITE_IMANUFACT_STR "Atmel" -#endif - -#ifndef CONF_USB_COMPOSITE_IMANUFACT_STR_DESC -#define CONF_USB_COMPOSITE_IMANUFACT_STR_DESC -#endif - -// - -// Enable string descriptor of iProduct -// usb_composite_iproduct_en -#ifndef CONF_USB_COMPOSITE_IPRODUCT_EN -#define CONF_USB_COMPOSITE_IPRODUCT_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_IPRODUCT -#define CONF_USB_COMPOSITE_IPRODUCT \ - (CONF_USB_COMPOSITE_IPRODUCT_EN * (CONF_USB_COMPOSITE_IMANUFACT_EN + CONF_USB_COMPOSITE_IPRODUCT_EN)) -#endif - -// Unicode string of iProduct -// usb_composite_iproduct_str -#ifndef CONF_USB_COMPOSITE_IPRODUCT_STR -#define CONF_USB_COMPOSITE_IPRODUCT_STR "Composite Demo" -#endif - -#ifndef CONF_USB_COMPOSITE_IPRODUCT_STR_DESC -#define CONF_USB_COMPOSITE_IPRODUCT_STR_DESC -#endif - -// - -// Enable string descriptor of iSerialNum -// usb_composite_iserialnum_en -#ifndef CONF_USB_COMPOSITE_ISERIALNUM_EN -#define CONF_USB_COMPOSITE_ISERIALNUM_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_ISERIALNUM -#define CONF_USB_COMPOSITE_ISERIALNUM \ - (CONF_USB_COMPOSITE_ISERIALNUM_EN \ - * (CONF_USB_COMPOSITE_IMANUFACT_EN + CONF_USB_COMPOSITE_IPRODUCT_EN + CONF_USB_COMPOSITE_ISERIALNUM_EN)) -#endif - -// Unicode string of iSerialNum -// usb_composite_iserialnum_str -#ifndef CONF_USB_COMPOSITE_ISERIALNUM_STR -#define CONF_USB_COMPOSITE_ISERIALNUM_STR "123456789ABCDEF" -#endif - -#ifndef CONF_USB_COMPOSITE_ISERIALNUM_STR_DESC -#define CONF_USB_COMPOSITE_ISERIALNUM_STR_DESC -#endif - -// - -// bNumConfigurations <0x01-0xFF> -// usb_composite_bnumconfig -#ifndef CONF_USB_COMPOSITE_BNUMCONFIG -#define CONF_USB_COMPOSITE_BNUMCONFIG 0x1 -#endif - -// - -// Composite Configuration Descriptor -// bConfigurationValue <0x01-0xFF> -// usb_composite_bconfigval -#ifndef CONF_USB_COMPOSITE_BCONFIGVAL -#define CONF_USB_COMPOSITE_BCONFIGVAL 0x1 -#endif -// Enable string descriptor of iConfig -// usb_composite_iconfig_en -#ifndef CONF_USB_COMPOSITE_ICONFIG_EN -#define CONF_USB_COMPOSITE_ICONFIG_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_ICONFIG -#define CONF_USB_COMPOSITE_ICONFIG \ - (CONF_USB_COMPOSITE_ICONFIG_EN \ - * (CONF_USB_COMPOSITE_IMANUFACT_EN + CONF_USB_COMPOSITE_IPRODUCT_EN + CONF_USB_COMPOSITE_ISERIALNUM_EN \ - + CONF_USB_COMPOSITE_ICONFIG_EN)) -#endif - -// Unicode string of iConfig -// usb_composite_iconfig_str -#ifndef CONF_USB_COMPOSITE_ICONFIG_STR -#define CONF_USB_COMPOSITE_ICONFIG_STR "" -#endif - -#ifndef CONF_USB_COMPOSITE_ICONFIG_STR_DESC -#define CONF_USB_COMPOSITE_ICONFIG_STR_DESC -#endif - -// - -// bmAttributes -// <0x80=> Bus power supply, not support for remote wakeup -// <0xA0=> Bus power supply, support for remote wakeup -// <0xC0=> Self powered, not support for remote wakeup -// <0xE0=> Self powered, support for remote wakeup -// usb_composite_bmattri -#ifndef CONF_USB_COMPOSITE_BMATTRI -#define CONF_USB_COMPOSITE_BMATTRI 0x80 -#endif - -// bMaxPower <0x00-0xFF> -// usb_composite_bmaxpower -#ifndef CONF_USB_COMPOSITE_BMAXPOWER -#define CONF_USB_COMPOSITE_BMAXPOWER 0x32 -#endif -// - -// CDC ACM Support -// usb_composite_cdc_acm_support -#ifndef CONF_USB_COMPOSITE_CDC_ACM_EN -#define CONF_USB_COMPOSITE_CDC_ACM_EN 0 -#endif - -// CDC ACM Comm Interrupt IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_cdc_acm_epaddr -#ifndef CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_EPADDR -#define CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_EPADDR 0x82 -#endif - -// CDC ACM Comm Interrupt IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_cdc_acm_comm_int_maxpksz -#ifndef CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_MAXPKSZ -#define CONF_USB_COMPOSITE_CDC_ACM_COMM_INT_MAXPKSZ 0x40 -#endif - -// CDC ACM Data BULK IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_cdc_acm_data_bulkin_epaddr -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_EPADDR -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_EPADDR 0x81 -#endif - -// CDC ACM Data BULK IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_cdc_acm_data_builin_maxpksz -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ 0x40 -#endif - -// CDC ACM Data BULK IN Endpoint wMaxPacketSize for High Speed -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// <0x0080=> 128 bytes -// <0x0100=> 256 bytes -// <0x0200=> 512 bytes - -// usb_composite_cdc_acm_data_builin_maxpksz_hs -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ_HS -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKIN_MAXPKSZ_HS 0x200 -#endif - -// CDC ACM Data BULK OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_cdc_acm_data_bulkout_epaddr -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_EPADDR -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_EPADDR 0x1 -#endif - -// CDC ACM Data BULK OUT Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_cdc_acm_data_buckout_maxpksz -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ 0x40 -#endif - -// CDC ACM Data BULK OUT Endpoint wMaxPacketSize for High Speed -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// <0x0080=> 128 bytes -// <0x0100=> 256 bytes -// <0x0200=> 512 bytes - -// usb_composite_cdc_acm_data_buckout_maxpksz_hs -#ifndef CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ_HS -#define CONF_USB_COMPOSITE_CDC_ACM_DATA_BULKOUT_MAXPKSZ_HS 0x200 -#endif - -// CDC ACM Echo Demo generation -// conf_usb_composite_cdc_echo_demo -// Invoke cdcdf_acm_demo_init(buf[wMaxPacketSize]) to enable the echo demo. -// Buf is packet buffer for data receive and echo back. -// The buffer is 4 byte aligned to support DMA. -#ifndef CONF_USB_COMPOSITE_CDC_ECHO_DEMO -#define CONF_USB_COMPOSITE_CDC_ECHO_DEMO 0 -#endif - -// - -// HID Mouse Support -// usb_composite_hid_mouse_support -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_EN -#define CONF_USB_COMPOSITE_HID_MOUSE_EN 0 -#endif - -// HID Mouse INTERRUPT IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_hid_mouse_intin_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_INTIN_EPADDR -#define CONF_USB_COMPOSITE_HID_MOUSE_INTIN_EPADDR 0x83 -#endif - -// HID Mouse INTERRUPT IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_mouse_intin_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_INTIN_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_MOUSE_INTIN_MAXPKSZ 0x8 -#endif - -// HID Mouse Move Demo generation -// conf_usb_composite_hid_mouse_demo -// Invoke hiddf_demo_init(button1, button2, button3) to enabled the move demo. -// Button1 and button3 are the pins used for mouse moving left and right. -#ifndef CONF_USB_COMPOSITE_HID_MOUSE_DEMO -#define CONF_USB_COMPOSITE_HID_MOUSE_DEMO 0 -#endif - -// - -// HID Keyboard Support -// usb_composite_hid_keyboard_support -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_EN -#define CONF_USB_COMPOSITE_HID_KEYBOARD_EN 0 -#endif - -// HID Keyboard INTERRUPT IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_hid_keyboard_intin_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_EPADDR -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_EPADDR 0x84 -#endif - -// HID Keyboard INTERRUPT IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_keyboard_intin_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTIN_MAXPKSZ 0x8 -#endif - -// HID Keyboard INTERRUPT OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_hid_keyboard_intout_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_EPADDR -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_EPADDR 0x2 -#endif - -// HID Keyboard INTERRUPT OUT Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_keyboard_intout_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_KEYBOARD_INTOUT_MAXPKSZ 0x8 -#endif - -// HID Keyboard Caps Lock Demo generation -// conf_usb_composite_hid_keyboard_demo -// Invoke hiddf_demo_init(button1, button2, button3) to enabled the move demo. -// Buffon2 is the pin used for keyboard CAPS LOCK simulation. -#ifndef CONF_USB_COMPOSITE_HID_KEYBOARD_DEMO -#define CONF_USB_COMPOSITE_HID_KEYBOARD_DEMO 0 -#endif - -// - -// HID Generic Support -// usb_composite_hid_generic_support -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_EN -#define CONF_USB_COMPOSITE_HID_GENERIC_EN 0 -#endif - -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_REPORT_LEN -#define CONF_USB_COMPOSITE_HID_GENERIC_REPORT_LEN 53 -#endif - -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_REPORT -#define CONF_USB_COMPOSITE_HID_GENERIC_REPORT \ - 0x06, 0xFF, 0xFF, 0x09, 0x01, 0xA1, 0x01, 0x09, 0x02, 0x09, 0x03, 0x15, 0x00, 0x26, 0xFF, 0x00, 0x75, 0x08, 0x95, \ - 0x40, 0x81, 0x02, 0x09, 0x04, 0x09, 0x05, 0x15, 0x00, 0x26, 0xFF, 0x00, 0x75, 0x08, 0x95, 0x40, 0x91, 0x02, \ - 0x09, 0x06, 0x09, 0x07, 0x15, 0x00, 0x26, 0xFF, 0x00, 0x75, 0x08, 0x95, 0x04, 0xB1, 0x02, 0xC0 -#endif - -// HID Generic INTERRUPT IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_hid_generic_intin_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTIN_EPADDR -#define CONF_USB_COMPOSITE_HID_GENERIC_INTIN_EPADDR 0x85 -#endif - -// HID Generic INTERRUPT IN Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_hid_generic_intin_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTIN_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_GENERIC_INTIN_MAXPKSZ 0x40 -#endif - -// HID Generic INTERRUPT OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_hid_generic_intout_epaddr -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_EPADDR -#define CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_EPADDR 0x3 -#endif - -// HID Generic INTERRUPT OUT Endpoint wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// usb_composite_hid_generic_intout_maxpksz -// Please make sure that the setting here is coincide with the endpoint setting in USB device driver. -#ifndef CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_MAXPKSZ -#define CONF_USB_COMPOSITE_HID_GENERIC_INTOUT_MAXPKSZ 0x40 -#endif - -// - -// MSC Support -// usb_composite_msc_support -#ifndef CONF_USB_COMPOSITE_MSC_EN -#define CONF_USB_COMPOSITE_MSC_EN 0 -#endif - -// MSC BULK Endpoints wMaxPacketSize -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes - -// usb_composite_msc_bulk_maxpksz -#ifndef CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ -#define CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ 0x40 -#endif - -// MSC BULK Endpoints wMaxPacketSize for High Speed -// <0x0008=> 8 bytes -// <0x0010=> 16 bytes -// <0x0020=> 32 bytes -// <0x0040=> 64 bytes -// <0x0080=> 128 bytes -// <0x0100=> 256 bytes -// <0x0200=> 512 bytes - -// usb_composite_msc_bulk_maxpksz_hs -#ifndef CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ_HS -#define CONF_USB_COMPOSITE_MSC_BULK_MAXPKSZ_HS 0x200 -#endif - -// MSC BULK IN Endpoint Address -// <0x81=> EndpointAddress = 0x81 -// <0x82=> EndpointAddress = 0x82 -// <0x83=> EndpointAddress = 0x83 -// <0x84=> EndpointAddress = 0x84 -// <0x85=> EndpointAddress = 0x85 -// <0x86=> EndpointAddress = 0x86 -// <0x87=> EndpointAddress = 0x87 -// <0x88=> EndpointAddress = 0x88 -// <0x89=> EndpointAddress = 0x89 - -// usb_composite_msc_bulkin_epaddr -#ifndef CONF_USB_COMPOSITE_MSC_BULKIN_EPADDR -#define CONF_USB_COMPOSITE_MSC_BULKIN_EPADDR 0x86 -#endif - -// MSC BULK OUT Endpoint Address -// <0x01=> EndpointAddress = 0x01 -// <0x02=> EndpointAddress = 0x02 -// <0x03=> EndpointAddress = 0x03 -// <0x04=> EndpointAddress = 0x04 -// <0x05=> EndpointAddress = 0x05 -// <0x06=> EndpointAddress = 0x06 -// <0x07=> EndpointAddress = 0x07 -// <0x08=> EndpointAddress = 0x08 -// <0x09=> EndpointAddress = 0x09 - -// usb_composite_msc_bulkout_epaddr -#ifndef CONF_USB_COMPOSITE_MSC_BULKOUT_EPADDR -#define CONF_USB_COMPOSITE_MSC_BULKOUT_EPADDR 0x4 -#endif - -// Enable Demo code for Disk LUN handling -// usb_composite_msc_demo_en -#ifndef CONF_USB_COMPOSITE_MSC_LUN_DEMO -#define CONF_USB_COMPOSITE_MSC_LUN_DEMO 1 -#endif - -// Disk access cache/buffer of sectors if non-RAM disk (e.g., SD/MMC) enabled <1-64> -// conf_usb_msc_lun_buf_sectors -#ifndef CONF_USB_MSC_LUN_BUF_SECTORS -#define CONF_USB_MSC_LUN_BUF_SECTORS 4 -#endif - -// Enable Demo for RAM Disk -// conf_usb_msc_lun0_enable -#ifndef CONF_USB_MSC_LUN0_ENABLE -#define CONF_USB_MSC_LUN0_ENABLE 1 -#endif - -#ifndef CONF_USB_MSC_LUN0_TYPE -#define CONF_USB_MSC_LUN0_TYPE 0x00 -#endif - -// The disk is removable -// conf_usb_msc_lun0_rmb -#ifndef CONF_USB_MSC_LUN0_RMB -#define CONF_USB_MSC_LUN0_RMB 0x1 -#endif - -#ifndef CONF_USB_MSC_LUN0_ISO -#define CONF_USB_MSC_LUN0_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_ECMA -#define CONF_USB_MSC_LUN0_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_ANSI -#define CONF_USB_MSC_LUN0_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_REPO -#define CONF_USB_MSC_LUN0_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN0_FACTORY -#define CONF_USB_MSC_LUN0_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_PRODUCT -#define CONF_USB_MSC_LUN0_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN0_PRODUCT_VERSION -#define CONF_USB_MSC_LUN0_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -// Disk Size (in KB) <0x1-0xFFFFFFFF> -// Windows will not show disk less than 20K, so 22K is used to reserve more RAM for APP -// conf_usb_msc_lun0_capacity - -#ifndef CONF_USB_MSC_LUN0_CAPACITY -#define CONF_USB_MSC_LUN0_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN0_BLOCK_SIZE -#define CONF_USB_MSC_LUN0_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN0_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN0_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN0_CAPACITY * 1024 / CONF_USB_MSC_LUN0_BLOCK_SIZE - 1) -#endif - -// - -// Enable Demo for SD/MMC Disk -// SD/MMC stack must be added before enable SD/MMC demo -// SD/MMC insert/eject not supported by this simple demo -// conf_usb_msc_lun1_enable -#ifndef CONF_USB_MSC_LUN1_ENABLE -#define CONF_USB_MSC_LUN1_ENABLE 0 -#endif - -#ifndef CONF_USB_MSC_LUN1_TYPE -#define CONF_USB_MSC_LUN1_TYPE 0x00 -#endif - -// The disk is removable -// SD/MMC stack must be added before enable SD/MMC demo -// SD/MMC insert/eject not supported by this simple demo -// conf_usb_msc_lun1_rmb -#ifndef CONF_USB_MSC_LUN1_RMB -#define CONF_USB_MSC_LUN1_RMB 0x1 -#endif - -#ifndef CONF_USB_MSC_LUN1_ISO -#define CONF_USB_MSC_LUN1_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_ECMA -#define CONF_USB_MSC_LUN1_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_ANSI -#define CONF_USB_MSC_LUN1_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_REPO -#define CONF_USB_MSC_LUN1_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN1_FACTORY -#define CONF_USB_MSC_LUN1_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_PRODUCT -#define CONF_USB_MSC_LUN1_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_PRODUCT_VERSION -#define CONF_USB_MSC_LUN1_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN1_CAPACITY -#define CONF_USB_MSC_LUN1_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN1_BLOCK_SIZE -#define CONF_USB_MSC_LUN1_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN1_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN1_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN1_CAPACITY * 1024 / CONF_USB_MSC_LUN1_BLOCK_SIZE - 1) -#endif - -// - -// Enable Demo for LUN 2 -// conf_usb_msc_lun2_enable -#ifndef CONF_USB_MSC_LUN2_ENABLE -#define CONF_USB_MSC_LUN2_ENABLE 0 -#endif - -#ifndef CONF_USB_MSC_LUN2_TYPE -#define CONF_USB_MSC_LUN2_TYPE 0x00 -#endif - -// The disk is removable -// conf_usb_msc_lun2_rmb -#ifndef CONF_USB_MSC_LUN2_RMB -#define CONF_USB_MSC_LUN2_RMB 0x1 -#endif - -#ifndef CONF_USB_MSC_LUN2_ISO -#define CONF_USB_MSC_LUN2_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_ECMA -#define CONF_USB_MSC_LUN2_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_ANSI -#define CONF_USB_MSC_LUN2_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_REPO -#define CONF_USB_MSC_LUN2_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN2_FACTORY -#define CONF_USB_MSC_LUN2_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_PRODUCT -#define CONF_USB_MSC_LUN2_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN2_PRODUCT_VERSION -#define CONF_USB_MSC_LUN2_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -// Disk Size (in KB) <0x1-0xFFFFFFFF> -// conf_usb_msc_lun2_capacity - -#ifndef CONF_USB_MSC_LUN2_CAPACITY -#define CONF_USB_MSC_LUN2_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN2_BLOCK_SIZE -#define CONF_USB_MSC_LUN2_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN2_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN2_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN2_CAPACITY * 1024 / CONF_USB_MSC_LUN2_BLOCK_SIZE - 1) -#endif - -// - -// Enable Demo for LUN 3 -// conf_usb_msc_lun3_enable -#ifndef CONF_USB_MSC_LUN3_ENABLE -#define CONF_USB_MSC_LUN3_ENABLE 0 -#endif - -#ifndef CONF_USB_MSC_LUN3_TYPE -#define CONF_USB_MSC_LUN3_TYPE 0x00 -#endif - -// The disk is removable -// conf_usb_msc_lun3_rmb -#ifndef CONF_USB_MSC_LUN3_RMB -#define CONF_USB_MSC_LUN3_RMB 0x1 -#endif - -#ifndef CONF_USB_MSC_LUN3_ISO -#define CONF_USB_MSC_LUN3_ISO 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_ECMA -#define CONF_USB_MSC_LUN3_ECMA 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_ANSI -#define CONF_USB_MSC_LUN3_ANSI 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_REPO -#define CONF_USB_MSC_LUN3_REPO 0x01 -#endif - -#ifndef CONF_USB_MSC_LUN3_FACTORY -#define CONF_USB_MSC_LUN3_FACTORY 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_PRODUCT -#define CONF_USB_MSC_LUN3_PRODUCT 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#endif - -#ifndef CONF_USB_MSC_LUN3_PRODUCT_VERSION -#define CONF_USB_MSC_LUN3_PRODUCT_VERSION 0x00, 0x00, 0x00, 0x00 -#endif - -// Disk Size (in KB) <0x1-0xFFFFFFFF> -// conf_usb_msc_lun3_capacity - -#ifndef CONF_USB_MSC_LUN3_CAPACITY -#define CONF_USB_MSC_LUN3_CAPACITY 22 -#endif - -#ifndef CONF_USB_MSC_LUN3_BLOCK_SIZE -#define CONF_USB_MSC_LUN3_BLOCK_SIZE 512 -#endif - -#ifndef CONF_USB_MSC_LUN3_LAST_BLOCK_ADDR -#define CONF_USB_MSC_LUN3_LAST_BLOCK_ADDR \ - ((uint32_t)CONF_USB_MSC_LUN3_CAPACITY * 1024 / CONF_USB_MSC_LUN3_BLOCK_SIZE - 1) -#endif - -// - -// -// - -// <<< end of configuration section >>> - -#endif // USBD_CONFIG_H diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index fe212f6fb6..295682e905 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -145,6 +145,20 @@ CFLAGS += -DCIRCUITPY_COUNTIO=$(CIRCUITPY_COUNTIO) CIRCUITPY_DISPLAYIO ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_DISPLAYIO=$(CIRCUITPY_DISPLAYIO) +# bitmaptools and framebufferio rely on displayio +ifeq ($(CIRCUITPY_DISPLAYIO),1) +CIRCUITPY_BITMAPTOOLS ?= $(CIRCUITPY_FULL_BUILD) +CIRCUITPY_FRAMEBUFFERIO ?= $(CIRCUITPY_FULL_BUILD) +CIRCUITPY_VECTORIO ?= 1 +else +CIRCUITPY_BITMAPTOOLS ?= 0 +CIRCUITPY_FRAMEBUFFERIO ?= 0 +CIRCUITPY_VECTORIO ?= 0 +endif +CFLAGS += -DCIRCUITPY_BITMAPTOOLS=$(CIRCUITPY_BITMAPTOOLS) +CFLAGS += -DCIRCUITPY_FRAMEBUFFERIO=$(CIRCUITPY_FRAMEBUFFERIO) +CFLAGS += -DCIRCUITPY_VECTORIO=$(CIRCUITPY_VECTORIO) + CIRCUITPY_DUALBANK ?= 0 CFLAGS += -DCIRCUITPY_DUALBANK=$(CIRCUITPY_DUALBANK) @@ -161,20 +175,6 @@ CFLAGS += -DCIRCUITPY_ERRNO=$(CIRCUITPY_ERRNO) CIRCUITPY_ESPIDF ?= 0 CFLAGS += -DCIRCUITPY_ESPIDF=$(CIRCUITPY_ESPIDF) -# bitmaptools and framebufferio rely on displayio -ifeq ($(CIRCUITPY_DISPLAYIO),1) -CIRCUITPY_BITMAPTOOLS ?= $(CIRCUITPY_FULL_BUILD) -CIRCUITPY_FRAMEBUFFERIO ?= $(CIRCUITPY_FULL_BUILD) -else -CIRCUITPY_BITMAPTOOLS ?= 0 -CIRCUITPY_FRAMEBUFFERIO ?= 0 -endif -CFLAGS += -DCIRCUITPY_BITMAPTOOLS=$(CIRCUITPY_BITMAPTOOLS) -CFLAGS += -DCIRCUITPY_FRAMEBUFFERIO=$(CIRCUITPY_FRAMEBUFFERIO) - -CIRCUITPY_VECTORIO ?= $(CIRCUITPY_DISPLAYIO) -CFLAGS += -DCIRCUITPY_VECTORIO=$(CIRCUITPY_VECTORIO) - CIRCUITPY_FREQUENCYIO ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_FREQUENCYIO=$(CIRCUITPY_FREQUENCYIO) diff --git a/shared-bindings/storage/__init__.c b/shared-bindings/storage/__init__.c index 75a271f64d..754b6866c8 100644 --- a/shared-bindings/storage/__init__.c +++ b/shared-bindings/storage/__init__.c @@ -166,7 +166,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(storage_erase_filesystem_obj, storage_erase_filesystem //| STATIC mp_obj_t storage_disable_usb_drive(void) { if (!common_hal_storage_disable_usb_drive()) { - mp_raise_RuntimeError(translate("Cannot change usb devices now")); + mp_raise_RuntimeError(translate("Cannot change USB devices now")); } return mp_const_none; } @@ -181,7 +181,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(storage_disable_usb_drive_obj, storage_disable_usb_dri //| STATIC mp_obj_t storage_enable_usb_drive(void) { if (!common_hal_storage_enable_usb_drive()) { - mp_raise_RuntimeError(translate("Cannot change usb devices now")); + mp_raise_RuntimeError(translate("Cannot change USB devices now")); } return mp_const_none; } diff --git a/shared-bindings/usb_hid/Device.c b/shared-bindings/usb_hid/Device.c index de9cb8bfef..67247c8f64 100644 --- a/shared-bindings/usb_hid/Device.c +++ b/shared-bindings/usb_hid/Device.c @@ -31,14 +31,6 @@ //| class Device: //| """HID Device //| -//| Usage:: -//| -//| import usb_hid -//| -//| mouse = usb_hid.devices[0] -//| mouse.send_report()""" -//| - //| def __init__(self, *, descriptor: ReadableBuffer, usage_page: int, usage: int, in_report_length: int, out_report_length: int = 0, report_id_index: Optional[int]) -> None: //| """Create a description of a USB HID device. The actual device is created when you //| pass a `Device` to `usb_hid.enable()`. @@ -57,6 +49,17 @@ //| """ //| ... //| +//| KEYBOARD: Device +//| """Standard keyboard device supporting keycodes 0x00-0xDD, modifiers 0xE-0xE7, and five LED indicators.""" +//| +//| MOUSE: Device +//| """Standard mouse device supporting five mouse buttons, X and Y relative movements from -127 to 127 +//| in each report, and a relative mouse wheel change from -127 to 127 in each report.""" +//| +//| CONSUMER_CONTROL: Device +//| """Consumer Control device supporting sent values from 1-652, with no rollover.""" +//| + STATIC mp_obj_t usb_hid_device_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { usb_hid_device_obj_t *self = m_new_obj(usb_hid_device_obj_t); self->base.type = &usb_hid_device_type; diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index cd73e1b9f9..661fd79af8 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -165,38 +165,47 @@ void print_safe_mode_message(safe_mode_t reason) { } serial_write_compressed(translate("CircuitPython core code crashed hard. Whoops!\n")); + + const compressed_string_t *message = NULL; switch (reason) { case HARD_CRASH: - serial_write_compressed(translate("Crash into the HardFault_Handler.")); - return; + message = translate("Crash into the HardFault_Handler."); + break; case MICROPY_NLR_JUMP_FAIL: - serial_write_compressed(translate("NLR jump failed. Likely memory corruption.")); - return; + message = translate("NLR jump failed. Likely memory corruption."); + break; case MICROPY_FATAL_ERROR: - serial_write_compressed(translate("Fatal error.")); + message = translate("Fatal error."); break; case GC_ALLOC_OUTSIDE_VM: - serial_write_compressed(translate("Attempted heap allocation when VM not running.")); + message = translate("Attempted heap allocation when VM not running."); break; #ifdef SOFTDEVICE_PRESENT // defined in ports/nrf/bluetooth/bluetooth_common.mk // will print "Unknown reason" if somehow encountered on other ports case NORDIC_SOFT_DEVICE_ASSERT: - serial_write_compressed(translate("Nordic system firmware failure assertion.")); + message = translate("Nordic system firmware failure assertion."); break; #endif case FLASH_WRITE_FAIL: - serial_write_compressed(translate("Failed to write internal flash.")); + message = translate("Failed to write internal flash."); break; case MEM_MANAGE: - serial_write_compressed(translate("Invalid memory access.")); + message = translate("Invalid memory access."); break; case WATCHDOG_RESET: - serial_write_compressed(translate("Watchdog timer expired.")); + message = translate("Watchdog timer expired."); + break; + case USB_TOO_MANY_ENDPOINTS: + message = translate("USB devices need more endpoints than are available."); + break; + case USB_TOO_MANY_INTERFACE_NAMES: + message = translate("USB devices specify too many interface names."); break; default: - serial_write_compressed(translate("Unknown reason.")); + message = translate("Unknown reason."); break; } + serial_write_compressed(message); serial_write_compressed(FILE_AN_ISSUE); } diff --git a/supervisor/shared/safe_mode.h b/supervisor/shared/safe_mode.h index 722e970333..01aed37d63 100644 --- a/supervisor/shared/safe_mode.h +++ b/supervisor/shared/safe_mode.h @@ -44,6 +44,8 @@ typedef enum { FLASH_WRITE_FAIL, MEM_MANAGE, WATCHDOG_RESET, + USB_TOO_MANY_ENDPOINTS, + USB_TOO_MANY_INTERFACE_NAMES, NO_HEAP, } safe_mode_t; diff --git a/supervisor/shared/usb/usb_desc.c b/supervisor/shared/usb/usb_desc.c index 38289552d6..99a769c704 100644 --- a/supervisor/shared/usb/usb_desc.c +++ b/supervisor/shared/usb/usb_desc.c @@ -29,6 +29,7 @@ #include "py/objstr.h" #include "py/runtime.h" #include "supervisor/memory.h" +#include "supervisor/shared/safe_mode.h" #include "supervisor/usb.h" #if CIRCUITPY_USB_CDC @@ -231,7 +232,7 @@ static void usb_build_configuration_descriptor(void) { // Did we run out of endpoints? if (current_endpoint - 1 > USB_NUM_EP) { - mp_raise_RuntimeError(translate("Not enough USB endpoints")); + reset_into_safe_mode(USB_TOO_MANY_ENDPOINTS); } } @@ -239,7 +240,7 @@ static void usb_build_configuration_descriptor(void) { // str must not be on the heap. void usb_add_interface_string(uint8_t interface_string_index, const char str[]) { if (interface_string_index > MAX_INTERFACE_STRINGS) { - mp_raise_RuntimeError(translate("Too many USB interface names")); + reset_into_safe_mode(USB_TOO_MANY_INTERFACE_NAMES); } collected_interface_strings[interface_string_index].char_str = str;