On Mon, Aug 18, 2014 at 8:13 AM, Isaac Marino Bavaresco wrote: > The typedef could be declared using anonymous structures instead named on= es: > > typedef union { > struct { > uint32_t rgb: 24; > uint32_t alpha:8; /* <=3D Alpha channel may be useful instead of a > useless padding */ > }; /* <=3D Notice the lack of name here */ > struct { > uint8_t red; > uint8_t green; > uint8_t blue; > }; /* <=3D Notice the lack of name here */ > } rgb32_t; > > This way you could use: > > rgb32_t Color1; > > Color1.rgb =3D 0x123456; > > or > > Color1.red =3D 0x12; > Color1.green =3D 0x34; > Color1.blue =3D 0x56; > > > Anonymous structures are not supported by C89 standard, only from C99 > onwards. Ah, even more interesting! I will by trying to change my data type over once I get my sending routing a bit more solid. Thanks! Josh --=20 A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .