diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-09-01 13:35:30 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-09-01 13:35:30 +0000 |
commit | 5908e28e8d301ab5688966311bc769247ba98363 (patch) | |
tree | 570754562965cf412f860c8ccfff67bb53b0ee34 /LUFA/Drivers/USB/Class/Common | |
parent | bda4bd45016714e892252fc7aaee88f6d20af231 (diff) | |
download | lufa-5908e28e8d301ab5688966311bc769247ba98363.tar.gz lufa-5908e28e8d301ab5688966311bc769247ba98363.tar.bz2 lufa-5908e28e8d301ab5688966311bc769247ba98363.zip |
Fixed StillImageHost not correctly freezing and unfreezing data pipes while waiting for a response block header.
Added basic PIMA commands to the StillImage Host Class driver - need to extend to PIMA specific command functions.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Common')
-rw-r--r-- | LUFA/Drivers/USB/Class/Common/StillImage.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/LUFA/Drivers/USB/Class/Common/StillImage.h b/LUFA/Drivers/USB/Class/Common/StillImage.h index 2723aeb44..804b31255 100644 --- a/LUFA/Drivers/USB/Class/Common/StillImage.h +++ b/LUFA/Drivers/USB/Class/Common/StillImage.h @@ -66,15 +66,15 @@ *
* \param[in] params Number of parameters which are to be sent in the Param field of the container
*/
- #define PIMA_COMMAND_SIZE(params) ((sizeof(PIMA_SendBlock) - sizeof(PIMA_SendBlock.Params)) + \
- (params * sizeof(PIMA_SendBlock.Params[0])))
+ #define PIMA_COMMAND_SIZE(params) ((sizeof(SI_PIMA_Container_t) - sizeof(((SI_PIMA_Container_t*)NULL)->Params)) + \
+ (params * sizeof(((SI_PIMA_Container_t*)NULL)->Params[0])))
/** Used in the DataLength field of a PIMA container, to give the total container size in bytes for
* a data container.
*
* \param[in] datalen Length in bytes of the data in the container
*/
- #define PIMA_DATA_SIZE(datalen) ((sizeof(PIMA_SendBlock) - sizeof(PIMA_SendBlock.Params)) + datalen)
+ #define PIMA_DATA_SIZE(datalen) ((sizeof(SI_PIMA_Container_t) - sizeof(((SI_PIMA_Container_t*)NULL)->Params)) + datalen)
/* Type defines: */
/** Type define for a PIMA container, use to send commands and receive responses to and from an
@@ -101,7 +101,15 @@ };
/* Enums: */
-
+ enum SI_PIMA_ResponseCodes_t
+ {
+ PIMA_RESPONSE_OK = 1,
+ PIMA_RESPONSE_GeneralError = 2,
+ PIMA_RESPONSE_SessionNotOpen = 3,
+ PIMA_RESPONSE_InvalidTransaction = 4,
+ PIMA_RESPONSE_OperationNotSupported = 5,
+ PIMA_RESPONSE_ParameterNotSupported = 6,
+ };
/* Type Defines: */
|