|
|
@ -54,13 +54,21 @@
|
|
|
|
/** Timeout period between the issuing of a command to a device, and the reception of the first packet */
|
|
|
|
/** Timeout period between the issuing of a command to a device, and the reception of the first packet */
|
|
|
|
#define COMMAND_DATA_TIMEOUT_MS 5000
|
|
|
|
#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
|
|
|
|
* \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)) + \
|
|
|
|
#define PIMA_COMMAND_SIZE(params) ((sizeof(PIMA_SendBlock) - sizeof(PIMA_SendBlock.Params)) + \
|
|
|
|
(params * sizeof(PIMA_SendBlock.Params[0])))
|
|
|
|
(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 Defines: */
|
|
|
|
/** Type define for a PIMA container, use to send commands and receive responses to and from an
|
|
|
|
/** Type define for a PIMA container, use to send commands and receive responses to and from an
|
|
|
|
* attached Still Image device.
|
|
|
|
* attached Still Image device.
|
|
|
@ -71,7 +79,7 @@
|
|
|
|
uint16_t Type; /**< Container type, a value from the PIMA_Container_Types_t enum */
|
|
|
|
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 */
|
|
|
|
uint16_t Code; /**< Command, event or response code of the container */
|
|
|
|
uint32_t TransactionID; /**< Unique container ID to link blocks together */
|
|
|
|
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;
|
|
|
|
} PIMA_Container_t;
|
|
|
|
|
|
|
|
|
|
|
|
/* Enums: */
|
|
|
|
/* Enums: */
|
|
|
|