We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c842d61 + b369396 commit 3cad30dCopy full SHA for 3cad30d
cores/arduino/Adafruit_TinyUSB_Core/Adafruit_USBD_Device.cpp
@@ -34,6 +34,10 @@
34
#define USB_PRODUCT "Unknown"
35
#endif
36
37
+#ifndef USB_CONFIG_POWER
38
+ #define USB_CONFIG_POWER 100
39
+#endif
40
+
41
extern uint8_t load_serial_number(uint16_t* serial_str);
42
43
Adafruit_USBD_Device USBDevice;
@@ -76,7 +80,7 @@ Adafruit_USBD_Device::Adafruit_USBD_Device(void)
76
80
.bConfigurationValue = 1,
77
81
.iConfiguration = 0x00,
78
82
.bmAttributes = TU_BIT(7) | TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP,
79
- .bMaxPower = TUSB_DESC_CONFIG_POWER_MA(100)
83
+ .bMaxPower = TUSB_DESC_CONFIG_POWER_MA(USB_CONFIG_POWER)
84
};
85
86
memcpy(_desc_cfg, &dev_cfg, sizeof(tusb_desc_configuration_t));
0 commit comments