projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0137001
)
Fix build errors in host demos due to usage of pipe error codes which have now been...
author
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 3 May 2009 14:34:20 +0000
(14:34 +0000)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Sun, 3 May 2009 14:34:20 +0000
(14:34 +0000)
Demos/Host/MassStorageHost/MassStoreCommands.c
patch
|
blob
|
blame
|
history
Demos/Host/StillImageHost/StillImageCommands.c
patch
|
blob
|
blame
|
history
Demos/Host/StillImageHost/StillImageHost.c
patch
|
blob
|
blame
|
history
diff --git
a/Demos/Host/MassStorageHost/MassStoreCommands.c
b/Demos/Host/MassStorageHost/MassStoreCommands.c
index
16f1d60
..
95aafca
100644
(file)
--- a/
Demos/Host/MassStorageHost/MassStoreCommands.c
+++ b/
Demos/Host/MassStorageHost/MassStoreCommands.c
@@
-73,7
+73,7
@@
static uint32_t MassStore_Tag = 1;
*/
\r
static uint8_t MassStore_SendCommand(void)
\r
{
\r
*/
\r
static uint8_t MassStore_SendCommand(void)
\r
{
\r
- uint8_t ErrorCode = PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ uint8_t ErrorCode = PIPE_RWSTREAM_NoError;
\r
\r
/* Each transmission should have a unique tag value, excluding values 0 and 0xFFFFFFFF */
\r
if (++MassStore_Tag == 0xFFFFFFFF)
\r
\r
/* Each transmission should have a unique tag value, excluding values 0 and 0xFFFFFFFF */
\r
if (++MassStore_Tag == 0xFFFFFFFF)
\r
@@
-84,7
+84,7
@@
static uint8_t MassStore_SendCommand(void)
Pipe_Unfreeze();
\r
\r
/* Write the CBW command to the OUT pipe */
\r
Pipe_Unfreeze();
\r
\r
/* Write the CBW command to the OUT pipe */
\r
- if ((ErrorCode = Pipe_Write_Stream_LE(&SCSICommandBlock, sizeof(CommandBlockWrapper_t))) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ErrorCode = Pipe_Write_Stream_LE(&SCSICommandBlock, sizeof(CommandBlockWrapper_t))) != PIPE_RWSTREAM_NoError)
\r
return ErrorCode;
\r
\r
/* Send the data in the OUT pipe to the attached device */
\r
return ErrorCode;
\r
\r
/* Send the data in the OUT pipe to the attached device */
\r
@@
-95,7
+95,7
@@
static uint8_t MassStore_SendCommand(void)
/* Freeze pipe after use */
\r
Pipe_Freeze();
\r
\r
/* Freeze pipe after use */
\r
Pipe_Freeze();
\r
\r
- return PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ return PIPE_RWSTREAM_NoError;
\r
}
\r
\r
/** Waits until the attached device is ready to accept data following a CBW, checking
\r
}
\r
\r
/** Waits until the attached device is ready to accept data following a CBW, checking
\r
@@
-127,7
+127,7
@@
static uint8_t MassStore_WaitForDataReceived(void)
\r
/* Check to see if the timeout period for the command has elapsed */
\r
if (!(TimeoutMSRem))
\r
\r
/* Check to see if the timeout period for the command has elapsed */
\r
if (!(TimeoutMSRem))
\r
- return PIPE_RWSTREAM_
ERROR_
Timeout;
\r
+ return PIPE_RWSTREAM_Timeout;
\r
}
\r
\r
Pipe_SelectPipe(MASS_STORE_DATA_OUT_PIPE);
\r
}
\r
\r
Pipe_SelectPipe(MASS_STORE_DATA_OUT_PIPE);
\r
@@
-138,7
+138,7
@@
static uint8_t MassStore_WaitForDataReceived(void)
/* Clear the stall condition on the OUT pipe */
\r
MassStore_ClearPipeStall(MASS_STORE_DATA_OUT_PIPE);
\r
\r
/* Clear the stall condition on the OUT pipe */
\r
MassStore_ClearPipeStall(MASS_STORE_DATA_OUT_PIPE);
\r
\r
- return PIPE_RWSTREAM_
ERROR_
PipeStalled;
\r
+ return PIPE_RWSTREAM_PipeStalled;
\r
}
\r
\r
Pipe_SelectPipe(MASS_STORE_DATA_IN_PIPE);
\r
}
\r
\r
Pipe_SelectPipe(MASS_STORE_DATA_IN_PIPE);
\r
@@
-149,15
+149,15
@@
static uint8_t MassStore_WaitForDataReceived(void)
/* Clear the stall condition on the IN pipe */
\r
MassStore_ClearPipeStall(MASS_STORE_DATA_IN_PIPE);
\r
\r
/* Clear the stall condition on the IN pipe */
\r
MassStore_ClearPipeStall(MASS_STORE_DATA_IN_PIPE);
\r
\r
- return PIPE_RWSTREAM_
ERROR_
PipeStalled;
\r
+ return PIPE_RWSTREAM_PipeStalled;
\r
}
\r
\r
/* Check to see if the device was disconnected, if so exit function */
\r
if (!(USB_IsConnected))
\r
}
\r
\r
/* Check to see if the device was disconnected, if so exit function */
\r
if (!(USB_IsConnected))
\r
- return PIPE_RWSTREAM_
ERROR_
DeviceDisconnected;
\r
+ return PIPE_RWSTREAM_DeviceDisconnected;
\r
};
\r
\r
};
\r
\r
- return PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ return PIPE_RWSTREAM_NoError;
\r
}
\r
\r
/** Sends or receives the transaction's data stage to or from the attached device, reading or
\r
}
\r
\r
/** Sends or receives the transaction's data stage to or from the attached device, reading or
\r
@@
-169,7
+169,7
@@
static uint8_t MassStore_WaitForDataReceived(void)
*/
\r
static uint8_t MassStore_SendReceiveData(void* BufferPtr)
\r
{
\r
*/
\r
static uint8_t MassStore_SendReceiveData(void* BufferPtr)
\r
{
\r
- uint8_t ErrorCode = PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ uint8_t ErrorCode = PIPE_RWSTREAM_NoError;
\r
uint16_t BytesRem = SCSICommandBlock.Header.DataTransferLength;
\r
\r
/* Check the direction of the SCSI command data stage */
\r
uint16_t BytesRem = SCSICommandBlock.Header.DataTransferLength;
\r
\r
/* Check the direction of the SCSI command data stage */
\r
@@
-180,7
+180,7
@@
static uint8_t MassStore_SendReceiveData(void* BufferPtr)
Pipe_Unfreeze();
\r
\r
/* Read in the block data from the pipe */
\r
Pipe_Unfreeze();
\r
\r
/* Read in the block data from the pipe */
\r
- if ((ErrorCode = Pipe_Read_Stream_LE(BufferPtr, BytesRem)) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ErrorCode = Pipe_Read_Stream_LE(BufferPtr, BytesRem)) != PIPE_RWSTREAM_NoError)
\r
return ErrorCode;
\r
\r
/* Acknowledge the packet */
\r
return ErrorCode;
\r
\r
/* Acknowledge the packet */
\r
@@
-193,7
+193,7
@@
static uint8_t MassStore_SendReceiveData(void* BufferPtr)
Pipe_Unfreeze();
\r
\r
/* Write the block data to the pipe */
\r
Pipe_Unfreeze();
\r
\r
/* Write the block data to the pipe */
\r
- if ((ErrorCode = Pipe_Write_Stream_LE(BufferPtr, BytesRem)) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ErrorCode = Pipe_Write_Stream_LE(BufferPtr, BytesRem)) != PIPE_RWSTREAM_NoError)
\r
return ErrorCode;
\r
\r
/* Acknowledge the packet */
\r
return ErrorCode;
\r
\r
/* Acknowledge the packet */
\r
@@
-205,7
+205,7
@@
static uint8_t MassStore_SendReceiveData(void* BufferPtr)
/* Freeze used pipe after use */
\r
Pipe_Freeze();
\r
\r
/* Freeze used pipe after use */
\r
Pipe_Freeze();
\r
\r
- return PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ return PIPE_RWSTREAM_NoError;
\r
}
\r
\r
/** Routine to receive the current CSW from the device.
\r
}
\r
\r
/** Routine to receive the current CSW from the device.
\r
@@
-214,10
+214,10
@@
static uint8_t MassStore_SendReceiveData(void* BufferPtr)
*/
\r
static uint8_t MassStore_GetReturnedStatus(void)
\r
{
\r
*/
\r
static uint8_t MassStore_GetReturnedStatus(void)
\r
{
\r
- uint8_t ErrorCode = PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ uint8_t ErrorCode = PIPE_RWSTREAM_NoError;
\r
\r
/* If an error in the command ocurred, abort */
\r
\r
/* If an error in the command ocurred, abort */
\r
- if ((ErrorCode = MassStore_WaitForDataReceived()) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ErrorCode = MassStore_WaitForDataReceived()) != PIPE_RWSTREAM_NoError)
\r
return ErrorCode;
\r
\r
/* Select the IN data pipe for data reception */
\r
return ErrorCode;
\r
\r
/* Select the IN data pipe for data reception */
\r
@@
-225,7
+225,7
@@
static uint8_t MassStore_GetReturnedStatus(void)
Pipe_Unfreeze();
\r
\r
/* Load in the CSW from the attached device */
\r
Pipe_Unfreeze();
\r
\r
/* Load in the CSW from the attached device */
\r
- if ((ErrorCode = Pipe_Read_Stream_LE(&SCSICommandStatus, sizeof(CommandStatusWrapper_t))) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ErrorCode = Pipe_Read_Stream_LE(&SCSICommandStatus, sizeof(CommandStatusWrapper_t))) != PIPE_RWSTREAM_NoError)
\r
return ErrorCode;
\r
\r
/* Clear the data ready for next reception */
\r
return ErrorCode;
\r
\r
/* Clear the data ready for next reception */
\r
@@
-234,7
+234,7
@@
static uint8_t MassStore_GetReturnedStatus(void)
/* Freeze the IN pipe after use */
\r
Pipe_Freeze();
\r
\r
/* Freeze the IN pipe after use */
\r
Pipe_Freeze();
\r
\r
- return PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ return PIPE_RWSTREAM_NoError;
\r
}
\r
\r
/** Clears the stall condition in the attached device on the nominated endpoint number.
\r
}
\r
\r
/** Clears the stall condition in the attached device on the nominated endpoint number.
\r
@@
-327,7
+327,7
@@
uint8_t MassStore_GetMaxLUN(uint8_t* const MaxLUNIndex)
*/
\r
uint8_t MassStore_RequestSense(const uint8_t LUNIndex, const SCSI_Request_Sense_Response_t* const SensePtr)
\r
{
\r
*/
\r
uint8_t MassStore_RequestSense(const uint8_t LUNIndex, const SCSI_Request_Sense_Response_t* const SensePtr)
\r
{
\r
- uint8_t ReturnCode = PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ uint8_t ReturnCode = PIPE_RWSTREAM_NoError;
\r
\r
/* Create a CBW with a SCSI command to issue REQUEST SENSE command */
\r
SCSICommandBlock = (CommandBlockWrapper_t)
\r
\r
/* Create a CBW with a SCSI command to issue REQUEST SENSE command */
\r
SCSICommandBlock = (CommandBlockWrapper_t)
\r
@@
-357,27
+357,27
@@
uint8_t MassStore_RequestSense(const uint8_t LUNIndex, const SCSI_Request_Sense_
MassStore_SendCommand();
\r
\r
/* Wait until data received from the device */
\r
MassStore_SendCommand();
\r
\r
/* Wait until data received from the device */
\r
- if ((ReturnCode = MassStore_WaitForDataReceived()) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ReturnCode = MassStore_WaitForDataReceived()) != PIPE_RWSTREAM_NoError)
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
/* Read the returned sense data into the buffer */
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
/* Read the returned sense data into the buffer */
\r
- if ((ReturnCode = MassStore_SendReceiveData((uint8_t*)SensePtr)) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ReturnCode = MassStore_SendReceiveData((uint8_t*)SensePtr)) != PIPE_RWSTREAM_NoError)
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
/* Read in the returned CSW from the device */
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
/* Read in the returned CSW from the device */
\r
- if ((ReturnCode = MassStore_GetReturnedStatus()) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ReturnCode = MassStore_GetReturnedStatus()) != PIPE_RWSTREAM_NoError)
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
- return PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ return PIPE_RWSTREAM_NoError;
\r
}
\r
\r
/** Issues a SCSI Device Block Read command to the attached device, to read in one or more data blocks from the
\r
}
\r
\r
/** Issues a SCSI Device Block Read command to the attached device, to read in one or more data blocks from the
\r
@@
-394,7
+394,7
@@
uint8_t MassStore_RequestSense(const uint8_t LUNIndex, const SCSI_Request_Sense_
uint8_t MassStore_ReadDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAddress,
\r
const uint8_t Blocks, const uint16_t BlockSize, void* BufferPtr)
\r
{
\r
uint8_t MassStore_ReadDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAddress,
\r
const uint8_t Blocks, const uint16_t BlockSize, void* BufferPtr)
\r
{
\r
- uint8_t ReturnCode = PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ uint8_t ReturnCode = PIPE_RWSTREAM_NoError;
\r
\r
/* Create a CBW with a SCSI command to read in the given blocks from the device */
\r
SCSICommandBlock = (CommandBlockWrapper_t)
\r
\r
/* Create a CBW with a SCSI command to read in the given blocks from the device */
\r
SCSICommandBlock = (CommandBlockWrapper_t)
\r
@@
-428,27
+428,27
@@
uint8_t MassStore_ReadDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAd
MassStore_SendCommand();
\r
\r
/* Wait until data received from the device */
\r
MassStore_SendCommand();
\r
\r
/* Wait until data received from the device */
\r
- if ((ReturnCode = MassStore_WaitForDataReceived()) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ReturnCode = MassStore_WaitForDataReceived()) != PIPE_RWSTREAM_NoError)
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
/* Read the returned block data into the buffer */
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
/* Read the returned block data into the buffer */
\r
- if ((ReturnCode = MassStore_SendReceiveData(BufferPtr)) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ReturnCode = MassStore_SendReceiveData(BufferPtr)) != PIPE_RWSTREAM_NoError)
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
/* Read in the returned CSW from the device */
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
/* Read in the returned CSW from the device */
\r
- if ((ReturnCode = MassStore_GetReturnedStatus()) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ReturnCode = MassStore_GetReturnedStatus()) != PIPE_RWSTREAM_NoError)
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
- return PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ return PIPE_RWSTREAM_NoError;
\r
}
\r
\r
/** Issues a SCSI Device Block Write command to the attached device, to write one or more data blocks to the
\r
}
\r
\r
/** Issues a SCSI Device Block Write command to the attached device, to write one or more data blocks to the
\r
@@
-465,7
+465,7
@@
uint8_t MassStore_ReadDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAd
uint8_t MassStore_WriteDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAddress,
\r
const uint8_t Blocks, const uint16_t BlockSize, void* BufferPtr)
\r
{
\r
uint8_t MassStore_WriteDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockAddress,
\r
const uint8_t Blocks, const uint16_t BlockSize, void* BufferPtr)
\r
{
\r
- uint8_t ReturnCode = PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ uint8_t ReturnCode = PIPE_RWSTREAM_NoError;
\r
\r
/* Create a CBW with a SCSI command to write the given blocks to the device */
\r
SCSICommandBlock = (CommandBlockWrapper_t)
\r
\r
/* Create a CBW with a SCSI command to write the given blocks to the device */
\r
SCSICommandBlock = (CommandBlockWrapper_t)
\r
@@
-499,20
+499,20
@@
uint8_t MassStore_WriteDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockA
MassStore_SendCommand();
\r
\r
/* Write the data to the device from the buffer */
\r
MassStore_SendCommand();
\r
\r
/* Write the data to the device from the buffer */
\r
- if ((ReturnCode = MassStore_SendReceiveData(BufferPtr)) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ReturnCode = MassStore_SendReceiveData(BufferPtr)) != PIPE_RWSTREAM_NoError)
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
/* Read in the returned CSW from the device */
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
/* Read in the returned CSW from the device */
\r
- if ((ReturnCode = MassStore_GetReturnedStatus()) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ReturnCode = MassStore_GetReturnedStatus()) != PIPE_RWSTREAM_NoError)
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
- return PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ return PIPE_RWSTREAM_NoError;
\r
}
\r
\r
/** Issues a SCSI Device Test Unit Ready command to the attached device, to determine if the device is ready to accept
\r
}
\r
\r
/** Issues a SCSI Device Test Unit Ready command to the attached device, to determine if the device is ready to accept
\r
@@
-524,7
+524,7
@@
uint8_t MassStore_WriteDeviceBlock(const uint8_t LUNIndex, const uint32_t BlockA
*/
\r
uint8_t MassStore_TestUnitReady(const uint8_t LUNIndex)
\r
{
\r
*/
\r
uint8_t MassStore_TestUnitReady(const uint8_t LUNIndex)
\r
{
\r
- uint8_t ReturnCode = PIPE_RWSTREAM_
ERROR_NoError;
\r
+ uint8_t ReturnCode = PIPE_RWSTREAM_
NoError;
\r
\r
/* Create a CBW with a SCSI command to issue TEST UNIT READY command */
\r
SCSICommandBlock = (CommandBlockWrapper_t)
\r
\r
/* Create a CBW with a SCSI command to issue TEST UNIT READY command */
\r
SCSICommandBlock = (CommandBlockWrapper_t)
\r
@@
-554,13
+554,13
@@
uint8_t MassStore_TestUnitReady(const uint8_t LUNIndex)
MassStore_SendCommand();
\r
\r
/* Read in the returned CSW from the device */
\r
MassStore_SendCommand();
\r
\r
/* Read in the returned CSW from the device */
\r
- if ((ReturnCode = MassStore_GetReturnedStatus()) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ReturnCode = MassStore_GetReturnedStatus()) != PIPE_RWSTREAM_NoError)
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
- return PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ return PIPE_RWSTREAM_NoError;
\r
}
\r
\r
/** Issues a SCSI Device Read Capacity command to the attached device, to determine the capacity of the
\r
}
\r
\r
/** Issues a SCSI Device Read Capacity command to the attached device, to determine the capacity of the
\r
@@
-573,7
+573,7
@@
uint8_t MassStore_TestUnitReady(const uint8_t LUNIndex)
*/
\r
uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex, SCSI_Capacity_t* const CapacityPtr)
\r
{
\r
*/
\r
uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex, SCSI_Capacity_t* const CapacityPtr)
\r
{
\r
- uint8_t ReturnCode = PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ uint8_t ReturnCode = PIPE_RWSTREAM_NoError;
\r
\r
/* Create a CBW with a SCSI command to issue READ CAPACITY command */
\r
SCSICommandBlock = (CommandBlockWrapper_t)
\r
\r
/* Create a CBW with a SCSI command to issue READ CAPACITY command */
\r
SCSICommandBlock = (CommandBlockWrapper_t)
\r
@@
-607,14
+607,14
@@
uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex, SCSI_Capacity_t* const Ca
MassStore_SendCommand();
\r
\r
/* Wait until data received from the device */
\r
MassStore_SendCommand();
\r
\r
/* Wait until data received from the device */
\r
- if ((ReturnCode = MassStore_WaitForDataReceived()) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ReturnCode = MassStore_WaitForDataReceived()) != PIPE_RWSTREAM_NoError)
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
/* Read the returned capacity data into the buffer */
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
/* Read the returned capacity data into the buffer */
\r
- if ((ReturnCode = MassStore_SendReceiveData(CapacityPtr)) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ReturnCode = MassStore_SendReceiveData(CapacityPtr)) != PIPE_RWSTREAM_NoError)
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
@@
-625,13
+625,13
@@
uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex, SCSI_Capacity_t* const Ca
CapacityPtr->BlockSize = SwapEndian_32(CapacityPtr->BlockSize);
\r
\r
/* Read in the returned CSW from the device */
\r
CapacityPtr->BlockSize = SwapEndian_32(CapacityPtr->BlockSize);
\r
\r
/* Read in the returned CSW from the device */
\r
- if ((ReturnCode = MassStore_GetReturnedStatus()) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ReturnCode = MassStore_GetReturnedStatus()) != PIPE_RWSTREAM_NoError)
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
{
\r
Pipe_Freeze();
\r
return ReturnCode;
\r
}
\r
\r
- return PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ return PIPE_RWSTREAM_NoError;
\r
}
\r
\r
/** Issues a SCSI Device Prevent/Allow Medium Removal command to the attached device, to lock the physical media from
\r
}
\r
\r
/** Issues a SCSI Device Prevent/Allow Medium Removal command to the attached device, to lock the physical media from
\r
@@
-645,7
+645,7
@@
uint8_t MassStore_ReadCapacity(const uint8_t LUNIndex, SCSI_Capacity_t* const Ca
*/
\r
uint8_t MassStore_PreventAllowMediumRemoval(const uint8_t LUNIndex, const bool PreventRemoval)
\r
{
\r
*/
\r
uint8_t MassStore_PreventAllowMediumRemoval(const uint8_t LUNIndex, const bool PreventRemoval)
\r
{
\r
- uint8_t ReturnCode = PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ uint8_t ReturnCode = PIPE_RWSTREAM_NoError;
\r
\r
/* Create a CBW with a SCSI command to issue PREVENT ALLOW MEDIUM REMOVAL command */
\r
SCSICommandBlock = (CommandBlockWrapper_t)
\r
\r
/* Create a CBW with a SCSI command to issue PREVENT ALLOW MEDIUM REMOVAL command */
\r
SCSICommandBlock = (CommandBlockWrapper_t)
\r
@@
-681,5
+681,5
@@
uint8_t MassStore_PreventAllowMediumRemoval(const uint8_t LUNIndex, const bool P
return ReturnCode;
\r
}
\r
\r
return ReturnCode;
\r
}
\r
\r
- return PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ return PIPE_RWSTREAM_NoError;
\r
}
\r
}
\r
diff --git
a/Demos/Host/StillImageHost/StillImageCommands.c
b/Demos/Host/StillImageHost/StillImageCommands.c
index
49ab0df
..
8f05e48
100644
(file)
--- a/
Demos/Host/StillImageHost/StillImageCommands.c
+++ b/
Demos/Host/StillImageHost/StillImageCommands.c
@@
-119,7
+119,7
@@
uint8_t SImage_RecieveBlockHeader(void)
if (!(TimeoutMSRem))
\r
{
\r
/* Return error code */
\r
if (!(TimeoutMSRem))
\r
{
\r
/* Return error code */
\r
- return PIPE_RWSTREAM_
ERROR_
Timeout;
\r
+ return PIPE_RWSTREAM_Timeout;
\r
}
\r
}
\r
\r
}
\r
}
\r
\r
@@
-132,7
+132,7
@@
uint8_t SImage_RecieveBlockHeader(void)
SImage_ClearPipeStall(SIMAGE_DATA_OUT_PIPE);
\r
\r
/* Return error code and break out of the loop */
\r
SImage_ClearPipeStall(SIMAGE_DATA_OUT_PIPE);
\r
\r
/* Return error code and break out of the loop */
\r
- return PIPE_RWSTREAM_
ERROR_
PipeStalled;
\r
+ return PIPE_RWSTREAM_PipeStalled;
\r
}
\r
\r
Pipe_SelectPipe(SIMAGE_DATA_IN_PIPE);
\r
}
\r
\r
Pipe_SelectPipe(SIMAGE_DATA_IN_PIPE);
\r
@@
-144,14
+144,14
@@
uint8_t SImage_RecieveBlockHeader(void)
SImage_ClearPipeStall(SIMAGE_DATA_IN_PIPE);
\r
\r
/* Return error code */
\r
SImage_ClearPipeStall(SIMAGE_DATA_IN_PIPE);
\r
\r
/* Return error code */
\r
- return PIPE_RWSTREAM_
ERROR_
PipeStalled;
\r
+ return PIPE_RWSTREAM_PipeStalled;
\r
}
\r
\r
/* Check to see if the device was disconnected, if so exit function */
\r
if (!(USB_IsConnected))
\r
{
\r
/* Return error code */
\r
}
\r
\r
/* Check to see if the device was disconnected, if so exit function */
\r
if (!(USB_IsConnected))
\r
{
\r
/* Return error code */
\r
- return PIPE_RWSTREAM_
ERROR_
DeviceDisconnected;
\r
+ return PIPE_RWSTREAM_DeviceDisconnected;
\r
}
\r
};
\r
\r
}
\r
};
\r
\r
@@
-185,7
+185,7
@@
uint8_t SImage_RecieveBlockHeader(void)
/* Freeze the IN pipe after use */
\r
Pipe_Freeze();
\r
\r
/* Freeze the IN pipe after use */
\r
Pipe_Freeze();
\r
\r
- return PIPE_RWSTREAM_
ERROR_
NoError;
\r
+ return PIPE_RWSTREAM_NoError;
\r
}
\r
\r
/** Function to send the given data to the device, after a command block has been issued.
\r
}
\r
\r
/** Function to send the given data to the device, after a command block has been issued.
\r
diff --git
a/Demos/Host/StillImageHost/StillImageHost.c
b/Demos/Host/StillImageHost/StillImageHost.c
index
ca5292b
..
ceec151
100644
(file)
--- a/
Demos/Host/StillImageHost/StillImageHost.c
+++ b/
Demos/Host/StillImageHost/StillImageHost.c
@@
-222,7
+222,7
@@
TASK(USB_SImage_Host)
SImage_SendBlockHeader();
\r
\r
/* Receive the response data block */
\r
SImage_SendBlockHeader();
\r
\r
/* Receive the response data block */
\r
- if ((ErrorCode = SImage_RecieveBlockHeader()) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ErrorCode = SImage_RecieveBlockHeader()) != PIPE_RWSTREAM_NoError)
\r
{
\r
ShowCommandError(ErrorCode, false);
\r
break;
\r
{
\r
ShowCommandError(ErrorCode, false);
\r
break;
\r
@@
-273,7
+273,7
@@
TASK(USB_SImage_Host)
printf_P(PSTR(" Device Version: %s\r\n"), DeviceVersion);
\r
\r
/* Receive the final response block from the device */
\r
printf_P(PSTR(" Device Version: %s\r\n"), DeviceVersion);
\r
\r
/* Receive the final response block from the device */
\r
- if ((ErrorCode = SImage_RecieveBlockHeader()) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ErrorCode = SImage_RecieveBlockHeader()) != PIPE_RWSTREAM_NoError)
\r
{
\r
ShowCommandError(ErrorCode, false);
\r
break;
\r
{
\r
ShowCommandError(ErrorCode, false);
\r
break;
\r
@@
-301,7
+301,7
@@
TASK(USB_SImage_Host)
SImage_SendBlockHeader();
\r
\r
/* Receive the response block from the device */
\r
SImage_SendBlockHeader();
\r
\r
/* Receive the response block from the device */
\r
- if ((ErrorCode = SImage_RecieveBlockHeader()) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ErrorCode = SImage_RecieveBlockHeader()) != PIPE_RWSTREAM_NoError)
\r
{
\r
ShowCommandError(ErrorCode, false);
\r
break;
\r
{
\r
ShowCommandError(ErrorCode, false);
\r
break;
\r
@@
-329,7
+329,7
@@
TASK(USB_SImage_Host)
SImage_SendBlockHeader();
\r
\r
/* Receive the response block from the device */
\r
SImage_SendBlockHeader();
\r
\r
/* Receive the response block from the device */
\r
- if ((ErrorCode = SImage_RecieveBlockHeader()) != PIPE_RWSTREAM_
ERROR_
NoError)
\r
+ if ((ErrorCode = SImage_RecieveBlockHeader()) != PIPE_RWSTREAM_NoError)
\r
{
\r
ShowCommandError(ErrorCode, false);
\r
break;
\r
{
\r
ShowCommandError(ErrorCode, false);
\r
break;
\r