Skip to content

Commit

Permalink
psgroove should use the PORT1_NUM_CONFIGS to determine how many confi…
Browse files Browse the repository at this point in the history
…gs there is to send for port1
  • Loading branch information
Youness Alaoui committed Oct 17, 2010
1 parent eb9e6ee commit 958e99f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions psgroove.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,15 +468,16 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
// 4 configurations are the same.
// For the initial 8-byte request, we give a different
// length response than in the full request.
if (DescriptorNumber < 4) {
if (DescriptorNumber < PORT1_NUM_CONFIGS) {
if (wLength == 8) {
Address = (void *) port1_short_config_descriptor;
Size = sizeof(port1_short_config_descriptor);
} else {
Address = (void *) port1_config_descriptor;
Size = PORT1_DESC_LEN;
}
if (DescriptorNumber == 3 && wLength > 8) {
if (DescriptorNumber == (PORT1_NUM_CONFIGS - 1) &&
wLength > 8) {
state = p1_ready;
expire = 10;
}
Expand Down

0 comments on commit 958e99f

Please sign in to comment.