Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc0b0803

Browse files
authored
Merge pull request#4 from awatterott/master
No fixed value for USB power current.
2 parents319be02 +6ad770e commitc0b0803

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎cores/arduino/USBCore.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@
9797

9898
// bMaxPower in Configuration Descriptor
9999
#defineUSB_CONFIG_POWER_MA(mA) ((mA)/2)
100+
#ifndefUSB_CONFIG_POWER
101+
#defineUSB_CONFIG_POWER (500)
102+
#endif
100103

101104
// bEndpointAddress in Endpoint Descriptor
102105
#defineUSB_ENDPOINT_DIRECTION_MASK 0x80
@@ -267,7 +270,7 @@ typedef struct
267270
{ 18, 1, USB_VERSION, _class,_subClass,_proto,_packetSize0,_vid,_pid,_version,_im,_ip,_is,_configs }
268271

269272
#defineD_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) }
271274

272275
#defineD_INTERFACE(_n,_numEndpoints,_class,_subClass,_protocol) \
273276
{ 9, 4, _n, 0, _numEndpoints, _class,_subClass, _protocol, 0 }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp