|
97 | 97 |
|
98 | 98 | // bMaxPower in Configuration Descriptor
|
99 | 99 | #define USB_CONFIG_POWER_MA(mA) ((mA)/2)
|
| 100 | +#ifndef USB_CONFIG_POWER |
| 101 | + #define USB_CONFIG_POWER (500) |
| 102 | +#endif |
100 | 103 |
|
101 | 104 | // bEndpointAddress in Endpoint Descriptor
|
102 | 105 | #define USB_ENDPOINT_DIRECTION_MASK 0x80
|
@@ -267,7 +270,7 @@ typedef struct
|
267 | 270 | { 18, 1, USB_VERSION, _class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs }
|
268 | 271 |
|
269 | 272 | #define D_CONFIG(_totalLength,_interfaces) \
|
270 | | - { 9, 2, _totalLength,_interfaces, 1, 0, USB_CONFIG_BUS_POWERED | USB_CONFIG_REMOTE_WAKEUP, USB_CONFIG_POWER_MA(500) } |
| 273 | + { 9, 2, _totalLength,_interfaces, 1, 0, USB_CONFIG_BUS_POWERED | USB_CONFIG_REMOTE_WAKEUP, USB_CONFIG_POWER_MA(USB_CONFIG_POWER) } |
271 | 274 |
|
272 | 275 | #define D_INTERFACE(_n,_numEndpoints,_class,_subClass,_protocol) \
|
273 | 276 | { 9, 4, _n, 0, _numEndpoints, _class,_subClass, _protocol, 0 }
|
|
0 commit comments