You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the max power is limited to the uint8_t type, but the system expects the power to be set in mA, not the 2mA units that the USB spec describes, so amounts like 500 get capped to 244. Would it be appropriate to change the type in this struct, or bit shift the value provided here before passing it along to gadget? Composite specifies MaxPower as u16.
The text was updated successfully, but these errors were encountered:
Taken into account that we expose this structure publicly and that the name is comes straight from the spec (bMaxPower) I'd prefer to keep the same meaning as has been defined in USB spec.
Having said that I'd rather prefer to keep the meaning of this field as defined in USB spec, improve the documentation and multiply this value by 2 while writing it to the kernel.
In this struct:
the max power is limited to the uint8_t type, but the system expects the power to be set in mA, not the 2mA units that the USB spec describes, so amounts like
500
get capped to244
. Would it be appropriate to change the type in this struct, or bit shift the value provided here before passing it along to gadget? Composite specifies MaxPower as u16.The text was updated successfully, but these errors were encountered: