3      Copyright (C) Dean Camera, 2009. 
   5   dean [at] fourwalledcubicle [dot] com 
   6       www.fourwalledcubicle.com 
  10   Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com) 
  12   Permission to use, copy, modify, and distribute this software 
  13   and its documentation for any purpose and without fee is hereby 
  14   granted, provided that the above copyright notice appear in all 
  15   copies and that both that the copyright notice and this 
  16   permission notice and warranty disclaimer appear in supporting 
  17   documentation, and that the name of the author not be used in 
  18   advertising or publicity pertaining to distribution of the 
  19   software without specific, written prior permission. 
  21   The author disclaim all warranties with regard to this 
  22   software, including all implied warranties of merchantability 
  23   and fitness.  In no event shall the author be liable for any 
  24   special, indirect or consequential damages or any damages 
  25   whatsoever resulting from loss of use, data or profits, whether 
  26   in an action of contract, negligence or other tortious action, 
  27   arising out of or in connection with the use or performance of 
  31 #ifndef _SIDESHOW_COMMON_H_ 
  32 #define _SIDESHOW_COMMON_H_ 
  38                 #include <LUFA/Drivers/USB/USB.h> 
  41                 #define GUID_COMPARE(a, b)                (memcmp(a, b, sizeof(GUID_t)) == 0) 
  43                 #define ARRAY_ELEMENTS(x)                 (sizeof(x) / sizeof(x[0])) 
  45                 #define UNICODE_STRING_t(x)               struct                          \ 
  47                                                               uint16_t LengthInBytes;     \ 
  48                                                               int      UnicodeString[x];  \ 
  51                 // {A33F248B-882F-4531-82C2-ED3B90C5C520} 
  52                 #define STANDARD_PROTOCOL_GUID            {0xA33F248B, 0x4531882F, 0x3BEDC282, 0x20C5C590} 
  53                 // {A9A5353F-2D4B-47CE-93EE-759F3A7DDA4F} 
  54                 #define SIMPLE_CONTENT_FORMAT_GUID        {0xA9A5353F, 0x47CE2D4B, 0x9F75EE93, 0x4FDA7D3A} 
  55                 // {8ABC88A8-857B-4ad7-A35A-B5942F492B99} 
  56                 #define SIDESHOW_PROPERTY_GUID            {0x8ABC88A8, 0x4AD7857B, 0x94B55AA3, 0x992B492F} 
  57                 // {26D4979A-E643-4626-9E2B-736DC0C92FDC} 
  58                 #define DEVICE_PROPERTY_GUID              {0x26D4979A, 0x4626E643, 0x6D732B9E, 0xDC2FC9C0} 
  60                 #define SECURITY_INTERACTIVE_RID_SID      L"S-1-5-4" 
  62                 #define MAX_APPLICATIONS                  4 
  63                 #define MAX_CONTENTBUFFER_PER_APP         1024 
  73                         uint16_t         LengthInBytes
; 
  89                 } SideShowPacketType_t
; 
  94                         SideShowPacketType_t   Type
; 
  96                 } SideShow_PacketHeader_t
; 
  98         /* Function Prototypes: */ 
  99                 uint16_t SideShow_Read_Unicode_String(void* UnicodeString
, uint16_t MaxBytes
); 
 100                 void     SideShow_Write_Unicode_String(void* UnicodeString
); 
 101                 void     SideShow_Discard_Byte_Stream(void);