4242//--------------------------------------------------------------------+
4343// Device Descriptors
4444//--------------------------------------------------------------------+
45- tusb_desc_device_t const desc_device = {
45+ static tusb_desc_device_t const desc_device = {
4646 .bLength = sizeof (tusb_desc_device_t ),
4747 .bDescriptorType = TUSB_DESC_DEVICE ,
4848 .bcdUSB = USB_BCD ,
@@ -125,7 +125,7 @@ enum {
125125#define CONFIG_TOTAL_LEN (TUD_CONFIG_DESC_LEN + TUD_CDC_DESC_LEN + TUD_MSC_DESC_LEN)
126126
127127// full speed configuration
128- uint8_t const desc_fs_configuration [] = {
128+ static uint8_t const desc_fs_configuration [] = {
129129 // Config number, interface count, string index, total length, attribute, power in mA
130130 TUD_CONFIG_DESCRIPTOR (1 , ITF_NUM_TOTAL , 0 , CONFIG_TOTAL_LEN , 0x00 , 100 ),
131131
@@ -140,7 +140,7 @@ uint8_t const desc_fs_configuration[] = {
140140// Per USB specs: high speed capable device must report device_qualifier and other_speed_configuration
141141
142142// high speed configuration
143- uint8_t const desc_hs_configuration [] = {
143+ static uint8_t const desc_hs_configuration [] = {
144144 // Config number, interface count, string index, total length, attribute, power in mA
145145 TUD_CONFIG_DESCRIPTOR (1 , ITF_NUM_TOTAL , 0 , CONFIG_TOTAL_LEN , 0x00 , 100 ),
146146
@@ -152,10 +152,10 @@ uint8_t const desc_hs_configuration[] = {
152152};
153153
154154// other speed configuration
155- uint8_t desc_other_speed_config [CONFIG_TOTAL_LEN ];
155+ static uint8_t desc_other_speed_config [CONFIG_TOTAL_LEN ];
156156
157157// device qualifier is mostly similar to device descriptor since we don't change configuration based on speed
158- tusb_desc_device_qualifier_t const desc_device_qualifier = {
158+ static tusb_desc_device_qualifier_t const desc_device_qualifier = {
159159 .bLength = sizeof (tusb_desc_device_qualifier_t ),
160160 .bDescriptorType = TUSB_DESC_DEVICE_QUALIFIER ,
161161 .bcdUSB = USB_BCD ,
@@ -223,7 +223,7 @@ enum {
223223};
224224
225225// array of pointer to string descriptors
226- char const * string_desc_arr [] = {
226+ static char const * string_desc_arr [] = {
227227 (const char []) { 0x09 , 0x04 }, // 0: is supported language is English (0x0409)
228228 "TinyUSB" , // 1: Manufacturer
229229 "TinyUSB Device" , // 2: Product
0 commit comments