forked from PAWPAW-Mirror/lib_xua
Reduce power requirement and change flags in GetStatus
This commit is contained in:
@@ -239,7 +239,7 @@ unsigned char cfgDesc_Audio2[] =
|
|||||||
0x00, /* 6 iConfiguration */
|
0x00, /* 6 iConfiguration */
|
||||||
#ifdef SELF_POWERED
|
#ifdef SELF_POWERED
|
||||||
192, /* 7 bmAttributes */
|
192, /* 7 bmAttributes */
|
||||||
5, /* 8 bMaxPower */
|
0, /* 8 bMaxPower */
|
||||||
#else
|
#else
|
||||||
128, /* 7 bmAttributes */
|
128, /* 7 bmAttributes */
|
||||||
250, /* 8 bMaxPower */
|
250, /* 8 bMaxPower */
|
||||||
@@ -1347,7 +1347,7 @@ unsigned char cfgDesc_Audio1[] =
|
|||||||
0x00, /* Unused */
|
0x00, /* Unused */
|
||||||
#ifdef SELF_POWERED
|
#ifdef SELF_POWERED
|
||||||
192, /* 7 bmAttributes */
|
192, /* 7 bmAttributes */
|
||||||
5, /* 8 bMaxPower */
|
0, /* 8 bMaxPower */
|
||||||
#else
|
#else
|
||||||
128, /* 7 bmAttributes */
|
128, /* 7 bmAttributes */
|
||||||
250, /* 8 bMaxPower */
|
250, /* 8 bMaxPower */
|
||||||
|
|||||||
@@ -591,7 +591,11 @@ void Endpoint0( chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl,
|
|||||||
/* Get Status request */
|
/* Get Status request */
|
||||||
case GET_STATUS:
|
case GET_STATUS:
|
||||||
|
|
||||||
|
#ifdef SELF_POWERED
|
||||||
|
buffer[0] = 1; // self powered
|
||||||
|
#else
|
||||||
buffer[0] = 0; // bus powered
|
buffer[0] = 0; // bus powered
|
||||||
|
#endif
|
||||||
buffer[1] = 0; // remote wakeup not supported
|
buffer[1] = 0; // remote wakeup not supported
|
||||||
|
|
||||||
retVal = XUD_DoGetRequest(ep0_out, ep0_in, buffer, 2, sp.wLength);
|
retVal = XUD_DoGetRequest(ep0_out, ep0_in, buffer, 2, sp.wLength);
|
||||||
|
|||||||
Reference in New Issue
Block a user