/*
LUFA Library
- Copyright (C) Dean Camera, 2010.
+ Copyright (C) Dean Camera, 2011.
dean [at] fourwalledcubicle [dot] com
- www.fourwalledcubicle.com
+ www.lufa-lib.org
*/
/*
- Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+ Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, distribute, and sell this
software and its documentation for any purpose is hereby granted
*/
/** \ingroup Group_USBClassSI
- * @defgroup Group_USBClassSICommon Common Class Definitions
+ * \defgroup Group_USBClassSICommon Common Class Definitions
*
- * \section Module Description
+ * \section Sec_ModDescription Module Description
* Constants, Types and Enum definitions that are common to both Device and Host modes for the USB
* Still Image Class.
*
#define _SI_CLASS_COMMON_H_
/* Includes: */
- #include "../../HighLevel/StdDescriptors.h"
-
- #include <string.h>
+ #include "../../Core/StdDescriptors.h"
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
/** Used in the DataLength field of a PIMA container, to give the total container size in bytes for
* a command container.
*
- * \param[in] Params Number of parameters which are to be sent in the Param field of the container.
+ * \param[in] Params Number of parameters which are to be sent in the \c Param field of the container.
*/
#define PIMA_COMMAND_SIZE(Params) ((sizeof(PIMA_Container_t) - 12) + ((Params) * sizeof(uint32_t)))
};
/* Enums: */
+ /** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the
+ * Still Image device class.
+ */
+ enum SI_Descriptor_ClassSubclassProtocol_t
+ {
+ SI_CSCP_StillImageClass = 0x06, /**< Descriptor Class value indicating that the device or interface
+ * belongs to the Still Image class.
+ */
+ SI_CSCP_StillImageSubclass = 0x01, /**< Descriptor Subclass value indicating that the device or interface
+ * belongs to the Still Image subclass.
+ */
+ SI_CSCP_BulkOnlyProtocol = 0x01, /**< Descriptor Protocol value indicating that the device or interface
+ * belongs to the Bulk Only Transport protocol of the Still Image class.
+ */
+ };
+
/** Enums for the possible status codes of a returned Response Block from an attached PIMA compliant Still Image device. */
enum PIMA_ResponseCodes_t
{
*
* Type define for a PIMA container, use to send commands and receive responses to and from an
* attached Still Image device.
+ *
+ * \note Regardless of CPU architecture, these values should be stored as little endian.
*/
typedef struct
{
uint16_t Code; /**< Command, event or response code of the container. */
uint32_t TransactionID; /**< Unique container ID to link blocks together. */
uint32_t Params[3]; /**< Block parameters to be issued along with the block code (command blocks only). */
- } PIMA_Container_t;
+ } ATTR_PACKED PIMA_Container_t;
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)