usb: Return configuration = 0 in Addressed state.
This is as per USB 2.0 chapter 9 specifications, and enables passing of USB-IF Chapter 9 tests.
This commit is contained in:
@@ -312,9 +312,13 @@ static int usb_standard_get_configuration(usbd_device *usbd_dev,
|
|||||||
if (*len > 1) {
|
if (*len > 1) {
|
||||||
*len = 1;
|
*len = 1;
|
||||||
}
|
}
|
||||||
const struct usb_config_descriptor *cfg =
|
if (usbd_dev->current_config > 0) {
|
||||||
&usbd_dev->config[usbd_dev->current_config - 1];
|
const struct usb_config_descriptor *cfg =
|
||||||
(*buf)[0] = cfg->bConfigurationValue;
|
&usbd_dev->config[usbd_dev->current_config - 1];
|
||||||
|
(*buf)[0] = cfg->bConfigurationValue;
|
||||||
|
} else {
|
||||||
|
(*buf)[0] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user