X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/6bda628718f67c04ed43e8328f55bdce5319c504..3c1b28cf5ff16fede61f2abf37d5616f3e661036:/Demos/Device/Incomplete/Sideshow/Lib/SideshowCommon.h?ds=inline diff --git a/Demos/Device/Incomplete/Sideshow/Lib/SideshowCommon.h b/Demos/Device/Incomplete/Sideshow/Lib/SideshowCommon.h index b801ecfa5..fb06a1b15 100644 --- a/Demos/Device/Incomplete/Sideshow/Lib/SideshowCommon.h +++ b/Demos/Device/Incomplete/Sideshow/Lib/SideshowCommon.h @@ -1,21 +1,21 @@ /* LUFA Library - Copyright (C) Dean Camera, 2010. - + Copyright (C) Dean Camera, 2012. + dean [at] fourwalledcubicle [dot] com - www.fourwalledcubicle.com + www.lufa-lib.org */ /* - Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2012 Dean Camera (dean [at] fourwalledcubicle [dot] com) - Permission to use, copy, modify, distribute, and sell this + Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted - without fee, provided that the above copyright notice appear in + without fee, provided that the above copyright notice appear in all copies and that both that the copyright notice and this - permission notice and warranty disclaimer appear in supporting - documentation, and that the name of the author not be used in - advertising or publicity pertaining to distribution of the + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the software without specific, written prior permission. The author disclaim all warranties with regard to this @@ -33,15 +33,15 @@ /* Includes: */ #include - #include - + #include + #include /* Macros: */ #define GUID_COMPARE(a, b) (memcmp(a, b, sizeof(GUID_t)) == 0) - + #define ARRAY_ELEMENTS(x) (sizeof(x) / sizeof(x[0])) - + #define UNICODE_STRING_t(x) struct \ { \ uint16_t LengthInBytes; \ @@ -65,14 +65,14 @@ /* Type Defines: */ typedef struct { - uint32_t Chunks[4]; + uint32_t Chunks[4]; } GUID_t; - + typedef struct { - uint16_t LengthInBytes; - int UnicodeString[]; - } Unicode_String_t; + uint16_t LengthInBytes; + int UnicodeString[]; + } Unicode_String_t; typedef union { @@ -80,19 +80,19 @@ struct { - uint8_t TypeBytes[3]; + uint8_t TypeBytes[3]; - int ErrorCode : 6; - int NAK : 1; - int Response : 1; - }; + unsigned ErrorCode : 6; + unsigned NAK : 1; + unsigned Response : 1; + } TypeFields; } SideShowPacketType_t; - + typedef struct { - uint32_t Length; - SideShowPacketType_t Type; - uint16_t Number; + uint32_t Length; + SideShowPacketType_t Type; + uint16_t Number; } SideShow_PacketHeader_t; /* Function Prototypes: */ @@ -101,4 +101,5 @@ void SideShow_Write_Unicode_String(void* UnicodeString); void SideShow_Discard_Byte_Stream(void); -#endif \ No newline at end of file +#endif +