Minor documentation page updates.

Redocumented all device demos, now that they have changed over to the new USB class drivers.

Added C linkage to class drivers for C++ support.

Added prefixes to most of the class driver constants to prevent name clashes.
This commit is contained in:
Dean Camera 2009-06-04 02:55:30 +00:00
parent 7c5444b89a
commit a67bd74e3e
47 changed files with 653 additions and 153 deletions

View file

@ -102,16 +102,16 @@ void USB_MS_USBTask(USB_ClassInfo_MS_t* MSInterfaceInfo)
{
if (USB_MS_ReadInCommandBlock(MSInterfaceInfo))
{
if (MSInterfaceInfo->CommandBlock.Flags & COMMAND_DIRECTION_DATA_IN)
if (MSInterfaceInfo->CommandBlock.Flags & MS_COMMAND_DIR_DATA_IN)
Endpoint_SelectEndpoint(MSInterfaceInfo->DataINEndpointNumber);
MSInterfaceInfo->CommandStatus.Status = CALLBACK_USB_MS_SCSICommandReceived(MSInterfaceInfo) ?
Command_Pass : Command_Fail;
MSInterfaceInfo->CommandStatus.Signature = CSW_SIGNATURE;
SCSI_Command_Pass : SCSI_Command_Fail;
MSInterfaceInfo->CommandStatus.Signature = MS_CSW_SIGNATURE;
MSInterfaceInfo->CommandStatus.Tag = MSInterfaceInfo->CommandBlock.Tag;
MSInterfaceInfo->CommandStatus.DataTransferResidue = MSInterfaceInfo->CommandBlock.DataTransferLength;
if ((MSInterfaceInfo->CommandStatus.Status == Command_Fail) && (MSInterfaceInfo->CommandStatus.DataTransferResidue))
if ((MSInterfaceInfo->CommandStatus.Status == SCSI_Command_Fail) && (MSInterfaceInfo->CommandStatus.DataTransferResidue))
Endpoint_StallTransaction();
USB_MS_ReturnCommandStatus(MSInterfaceInfo);
@ -138,12 +138,12 @@ static bool USB_MS_ReadInCommandBlock(USB_ClassInfo_MS_t* MSInterfaceInfo)
CallbackMSInterfaceInfo = MSInterfaceInfo;
Endpoint_Read_Stream_LE(&MSInterfaceInfo->CommandBlock,
(sizeof(CommandBlockWrapper_t) - MAX_SCSI_COMMAND_LENGTH),
(sizeof(CommandBlockWrapper_t) - 16),
StreamCallback_AbortOnMassStoreReset);
if ((MSInterfaceInfo->CommandBlock.Signature != CBW_SIGNATURE) ||
if ((MSInterfaceInfo->CommandBlock.Signature != MS_CBW_SIGNATURE) ||
(MSInterfaceInfo->CommandBlock.LUN >= MSInterfaceInfo->TotalLUNs) ||
(MSInterfaceInfo->CommandBlock.SCSICommandLength > MAX_SCSI_COMMAND_LENGTH))
(MSInterfaceInfo->CommandBlock.SCSICommandLength > 16))
{
Endpoint_StallTransaction();
Endpoint_SelectEndpoint(MSInterfaceInfo->DataINEndpointNumber);