Move out many of the common class driver constants into grouped enums, to make them more managable.
Add new CDC descriptor structs to the CDC class driver, so that the CDC demos can use human readable field names. Rename prefix for Still Image Host class driver functions from "SImage_" to "SI_" to remain consistent with the rest of the driver.
This commit is contained in:
parent
800485bd95
commit
713670043a
80 changed files with 924 additions and 766 deletions
|
@ -48,7 +48,7 @@ void MS_Device_ProcessControlRequest(USB_ClassInfo_MS_Device_t* const MSInterfac
|
|||
|
||||
switch (USB_ControlRequest.bRequest)
|
||||
{
|
||||
case REQ_MassStorageReset:
|
||||
case MS_REQ_MassStorageReset:
|
||||
if (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))
|
||||
{
|
||||
Endpoint_ClearSETUP();
|
||||
|
@ -58,7 +58,7 @@ void MS_Device_ProcessControlRequest(USB_ClassInfo_MS_Device_t* const MSInterfac
|
|||
}
|
||||
|
||||
break;
|
||||
case REQ_GetMaxLUN:
|
||||
case MS_REQ_GetMaxLUN:
|
||||
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))
|
||||
{
|
||||
Endpoint_ClearSETUP();
|
||||
|
@ -107,12 +107,12 @@ void MS_Device_USBTask(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo)
|
|||
Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber);
|
||||
|
||||
MSInterfaceInfo->State.CommandStatus.Status = CALLBACK_MS_Device_SCSICommandReceived(MSInterfaceInfo) ?
|
||||
SCSI_Command_Pass : SCSI_Command_Fail;
|
||||
MS_SCSI_COMMAND_Pass : MS_SCSI_COMMAND_Fail;
|
||||
MSInterfaceInfo->State.CommandStatus.Signature = MS_CSW_SIGNATURE;
|
||||
MSInterfaceInfo->State.CommandStatus.Tag = MSInterfaceInfo->State.CommandBlock.Tag;
|
||||
MSInterfaceInfo->State.CommandStatus.DataTransferResidue = MSInterfaceInfo->State.CommandBlock.DataTransferLength;
|
||||
|
||||
if ((MSInterfaceInfo->State.CommandStatus.Status == SCSI_Command_Fail) &&
|
||||
if ((MSInterfaceInfo->State.CommandStatus.Status == MS_SCSI_COMMAND_Fail) &&
|
||||
(MSInterfaceInfo->State.CommandStatus.DataTransferResidue))
|
||||
{
|
||||
Endpoint_StallTransaction();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue