Added new USB_Host_GetDeviceStatus() function for USB Host mode.
This commit is contained in:
parent
f152ff26c7
commit
065ed4da20
4 changed files with 44 additions and 15 deletions
|
@ -238,6 +238,22 @@ uint8_t USB_Host_GetDeviceStringDescriptor(const uint8_t Index,
|
|||
return USB_Host_SendControlRequest(Buffer);
|
||||
}
|
||||
|
||||
uint8_t USB_Host_GetDeviceStatus(uint8_t* const FeatureStatus)
|
||||
{
|
||||
USB_ControlRequest = (USB_Request_Header_t)
|
||||
{
|
||||
.bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_STANDARD | REQREC_DEVICE),
|
||||
.bRequest = REQ_GetFeature,
|
||||
.wValue = 0,
|
||||
.wIndex = 0,
|
||||
.wLength = 0,
|
||||
};
|
||||
|
||||
Pipe_SelectPipe(PIPE_CONTROLPIPE);
|
||||
|
||||
return USB_Host_SendControlRequest(FeatureStatus);
|
||||
}
|
||||
|
||||
uint8_t USB_Host_ClearPipeStall(const uint8_t EndpointAddress)
|
||||
{
|
||||
USB_ControlRequest = (USB_Request_Header_t)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue