/*------------------------------------------------------------------------------ * MDK Middleware - Component ::USB:Device * Copyright (c) 2004-2023 Arm Limited (or its affiliates). All rights reserved. *------------------------------------------------------------------------------ * Name: USBD_Config_0.c * Purpose: USB Device Configuration * Rev.: V5.3.0 *------------------------------------------------------------------------------ * Use the following configuration settings in the Device Class configuration * files to assign a Device Class to this USB Device 0. * * Configuration Setting Value * --------------------- ----- * Assign Device Class to USB Device # = 0 *----------------------------------------------------------------------------*/ //-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- // USB Device 0 // Connect to hardware via Driver_USBD# <0-255> // Select driver control block for hardware interface. #define USBD0_PORT 0 // High-speed // Enable High-speed functionality (if device supports it). #define USBD0_HS 0 // Device Settings // These settings are used to create the Device Descriptor // Max Endpoint 0 Packet Size // Maximum packet size for Endpoint 0 (bMaxPacketSize0). // <8=>8 Bytes <16=>16 Bytes <32=>32 Bytes <64=>64 Bytes #define USBD0_MAX_PACKET0 8 // Vendor ID <0x0000-0xFFFF> // Vendor ID assigned by USB-IF (idVendor). #define USBD0_DEV_DESC_IDVENDOR 0xC251 // Product ID <0x0000-0xFFFF> // Product ID assigned by manufacturer (idProduct). #define USBD0_DEV_DESC_IDPRODUCT 0x0000 // Device Release Number <0x0000-0xFFFF> // Device Release Number in binary-coded decimal (bcdDevice) #define USBD0_DEV_DESC_BCDDEVICE 0x0100 // // Configuration Settings // These settings are used to create the Configuration Descriptor. // Power // Default Power Setting (D6: of bmAttributes). // <0=>Bus-powered // <1=>Self-powered // Remote Wakeup // Configuration support for Remote Wakeup (D5: of bmAttributes). #define USBD0_CFG_DESC_BMATTRIBUTES 0x80 // Maximum Power Consumption (in mA) <0-510><#/2> // Maximum Power Consumption of USB Device from bus in this // specific configuration when device is fully operational (bMaxPower). #define USBD0_CFG_DESC_BMAXPOWER 250 // // String Settings // These settings are used to create the String Descriptor. // Language ID <0x0000-0xFCFF> // English (United States) = 0x0409. #define USBD0_STR_DESC_LANGID 0x0409 // Manufacturer String // String Descriptor describing Manufacturer. #define USBD0_STR_DESC_MAN_RAW "Keil Software" // Product String // String Descriptor describing Product. #define USBD0_STR_DESC_PROD_RAW "Keil USB Device 0" // Serial Number String // Enable Serial Number String. // If disabled Serial Number String will not be assigned to USB Device. #define USBD0_STR_DESC_SER_EN 1 // Default value // Default device's Serial Number String. #define USBD0_STR_DESC_SER_RAW "0001A0000000" // Maximum Length (in characters) <0-126> // Specifies the maximum number of Serial Number String characters that can be set at run-time. // Maximum value is 126. Use value 0 to disable RAM allocation for string. #define USBD0_STR_DESC_SER_MAX_LEN 16 // // // Microsoft OS Descriptors Settings // These settings are used to create the Microsoft OS Descriptors. // OS String // Enable creation of Microsoft OS String and Extended Compat ID OS Feature Descriptors. #define USBD0_OS_DESC_EN 1 // Vendor Code <0x01-0xFF> // Specifies Vendor Code used to retrieve OS Feature Descriptors. #define USBD0_OS_DESC_VENDOR_CODE 0x01 // // // Control Transfer Buffer Size <64-65536:64> // Specifies size of buffer used for Control Transfers. // It should be at least as big as maximum packet size for Endpoint 0. #define USBD0_EP0_BUF_SIZE 128 // OS Resources Settings // These settings are used to optimize usage of OS resources. // Core Thread Stack Size <64-65536> #define USBD0_CORE_THREAD_STACK_SIZE 512 // Core Thread Priority #define USBD0_CORE_THREAD_PRIORITY osPriorityAboveNormal // // #include "usbd_config.h"