LUFA Library
Common Class Definitions

Data Structures

struct  PIMA_Container_t
 PIMA Still Image Device Command/Response Container. More...
 

Macros

#define PIMA_COMMAND_SIZE(Params)   ((sizeof(PIMA_Container_t) - 12) + ((Params) * sizeof(uint32_t)))
 
#define PIMA_DATA_SIZE(DataLen)   ((sizeof(PIMA_Container_t) - 12) + (DataLen))
 
#define UNICODE_STRING_LENGTH(Chars)   ((Chars) << 1)
 

Enumerations

enum  PIMA_Container_Types_t {
  PIMA_CONTAINER_Undefined = 0,
  PIMA_CONTAINER_CommandBlock = 1,
  PIMA_CONTAINER_DataBlock = 2,
  PIMA_CONTAINER_ResponseBlock = 3,
  PIMA_CONTAINER_EventBlock = 4
}
 
enum  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
}
 
enum  SI_Descriptor_ClassSubclassProtocol_t {
  SI_CSCP_StillImageClass = 0x06,
  SI_CSCP_StillImageSubclass = 0x01,
  SI_CSCP_BulkOnlyProtocol = 0x01
}
 

Detailed Description

Module Description

Constants, Types and Enum definitions that are common to both Device and Host modes for the USB Still Image Class.

Macro Definition Documentation

◆ PIMA_COMMAND_SIZE

#define PIMA_COMMAND_SIZE (   Params)    ((sizeof(PIMA_Container_t) - 12) + ((Params) * sizeof(uint32_t)))

Used in the DataLength field of a PIMA container, to give the total container size in bytes for a command container.

Parameters
[in]ParamsNumber of parameters which are to be sent in the Param field of the container.

◆ PIMA_DATA_SIZE

#define PIMA_DATA_SIZE (   DataLen)    ((sizeof(PIMA_Container_t) - 12) + (DataLen))

Used in the DataLength field of a PIMA container, to give the total container size in bytes for a data container.

Parameters
[in]DataLenLength in bytes of the data in the container.

◆ UNICODE_STRING_LENGTH

#define UNICODE_STRING_LENGTH (   Chars)    ((Chars) << 1)

Length in bytes of a given Unicode string's character length.

Parameters
[in]CharsTotal number of Unicode characters in the string.
Returns
Number of bytes of the given unicode string.

Enumeration Type Documentation

◆ PIMA_Container_Types_t

Enum for the possible PIMA contains types.

Enumerator
PIMA_CONTAINER_Undefined 

Undefined container type.

PIMA_CONTAINER_CommandBlock 

Command Block container type.

PIMA_CONTAINER_DataBlock 

Data Block container type.

PIMA_CONTAINER_ResponseBlock 

Response container type.

PIMA_CONTAINER_EventBlock 

Event Block container type.

◆ PIMA_ResponseCodes_t

Enums for the possible status codes of a returned Response Block from an attached PIMA compliant Still Image device.

Enumerator
PIMA_RESPONSE_OK 

Response code indicating no error in the issued command.

PIMA_RESPONSE_GeneralError 

Response code indicating a general error while processing the issued command.

PIMA_RESPONSE_SessionNotOpen 

Response code indicating that the sent command requires an open session before being issued.

PIMA_RESPONSE_InvalidTransaction 

Response code indicating an invalid transaction occurred.

PIMA_RESPONSE_OperationNotSupported 

Response code indicating that the issued command is not supported by the attached device.

PIMA_RESPONSE_ParameterNotSupported 

Response code indicating that one or more of the issued command's parameters are not supported by the device.

◆ SI_Descriptor_ClassSubclassProtocol_t

Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Still Image device class.

Enumerator
SI_CSCP_StillImageClass 

Descriptor Class value indicating that the device or interface belongs to the Still Image class.

SI_CSCP_StillImageSubclass 

Descriptor Subclass value indicating that the device or interface belongs to the Still Image subclass.

SI_CSCP_BulkOnlyProtocol 

Descriptor Protocol value indicating that the device or interface belongs to the Bulk Only Transport protocol of the Still Image class.