diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-04-02 10:13:12 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-04-02 10:13:12 +0000 |
commit | 58f550dfb3b2035fccb4c046ad067cebddba7d61 (patch) | |
tree | f94aba46451e4ffb63ce4c42786214ff5919af9b | |
parent | 6933f2e1a543b066ebe734bd126a7ff2f1c2777f (diff) | |
download | lufa-58f550dfb3b2035fccb4c046ad067cebddba7d61.tar.gz lufa-58f550dfb3b2035fccb4c046ad067cebddba7d61.tar.bz2 lufa-58f550dfb3b2035fccb4c046ad067cebddba7d61.zip |
Added new PIMA_DATA_SIZE() define to the Still Image Host demo.
-rw-r--r-- | Demos/Host/StillImageHost/StillImageCommands.h | 12 | ||||
-rw-r--r-- | LUFA/ChangeLog.txt | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Demos/Host/StillImageHost/StillImageCommands.h b/Demos/Host/StillImageHost/StillImageCommands.h index 2ac6afd8b..38bbadf70 100644 --- a/Demos/Host/StillImageHost/StillImageCommands.h +++ b/Demos/Host/StillImageHost/StillImageCommands.h @@ -54,13 +54,21 @@ /** Timeout period between the issuing of a command to a device, and the reception of the first packet */
#define COMMAND_DATA_TIMEOUT_MS 5000
- /** Used in the DataLength field of a PIMA container, to give the total container size in bytes.
+ /** Used in the DataLength field of a PIMA container, to give the total container size in bytes for
+ * a command container.
*
* \param 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])))
+ /** Used in the DataLength field of a PIMA container, to give the total container size in bytes for
+ * a data container.
+ *
+ * \param datalen Length in bytes of the data in the container
+ */
+ #define PIMA_DATA_SIZE(datalen) ((sizeof(PIMA_SendBlock) - sizeof(PIMA_SendBlock.Params)) + datalen)
+
/* Type Defines: */
/** Type define for a PIMA container, use to send commands and receive responses to and from an
* attached Still Image device.
@@ -71,7 +79,7 @@ uint16_t Type; /**< Container type, a value from the PIMA_Container_Types_t enum */
uint16_t Code; /**< Command, event or response code of the container */
uint32_t TransactionID; /**< Unique container ID to link blocks together */
- uint32_t Params[4]; /**< Block parameters to be issued along with the block code */
+ uint32_t Params[4]; /**< Block parameters to be issued along with the block code (command blocks only) */
} PIMA_Container_t;
/* Enums: */
diff --git a/LUFA/ChangeLog.txt b/LUFA/ChangeLog.txt index 036e0314c..3622f66e9 100644 --- a/LUFA/ChangeLog.txt +++ b/LUFA/ChangeLog.txt @@ -14,6 +14,7 @@ * - Changed GenericHID device demo to use the LUFA scheduler, added INTERRUPT_DATA_ENDPOINT and INTERRUPT_CONTROL_ENDPOINT compile
* time options
* - All comments in the library, bootloaders, demos and projects have now been spell-checked and spelling mistakes/typos corrected
+ * - Added new PIMA_DATA_SIZE() define to the Still Image Host demo
*
* \section Sec_ChangeLog090401 Version 090401
*
|