<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Union</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/14040/union</link><description> 
I need to set up the following union type definition in a global header (.h) file 
 
typedef union 
{ 
 struct 
 { 
 unsigned char App_Data_Type; 
 
 //Power on tests 
 unsigned char DPort_RAM_Fail_Flag :1; 
 unsigned char EEPROM_Fail_Flag	:1; 
 unsigned</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Union</title><link>https://community.arm.com/thread/94734?ContentTypeID=1</link><pubDate>Mon, 05 Mar 2001 03:57:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d03cab7a-9895-4c3a-b7cb-8a931c7a0db1</guid><dc:creator>Andrew Neil</dc:creator><description>&lt;p&gt;Now that you&amp;#39;ve got it to compile, have you seen the following Keil knowledgebase articles for a couple of gotchas! with bitfields &amp;amp; unions:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;GENERAL: UNION INVOLVING A BITFIELD IS THE WRONG SIZE&lt;/i&gt;&lt;br /&gt;
&lt;a href="http://www.keil.com/support/docs/928.htm"&gt;http://www.keil.com/support/docs/928.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;C51: BIT FIELD UNIONS DON&amp;#39;T WORK AS EXPECTED&lt;/i&gt;&lt;br /&gt;
&lt;a href="http://www.keil.com/support/docs/1279.htm"&gt;http://www.keil.com/support/docs/1279.htm&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Union</title><link>https://community.arm.com/thread/53571?ContentTypeID=1</link><pubDate>Mon, 05 Mar 2001 03:13:18 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:eb72bdfe-fa16-4903-85a2-996059048f24</guid><dc:creator>Robin Shields</dc:creator><description>&lt;p&gt;OOPS &lt;br /&gt;
&lt;br /&gt;
I did make that mistake.&lt;br /&gt;
&lt;br /&gt;
I was the first time I used Unions, however I shouldn&amp;#39;t have made this error as I use structures all the time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Union</title><link>https://community.arm.com/thread/53572?ContentTypeID=1</link><pubDate>Mon, 05 Mar 2001 02:59:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3dc672e2-8eb1-4b2a-a1d9-7a5ae6aed113</guid><dc:creator>Robin Shields</dc:creator><description>&lt;p&gt;Thank you for your reply,&lt;br /&gt;
&lt;br /&gt;
Yes I do feel a chump,&lt;br /&gt;
&lt;br /&gt;
how ever that was a mistake in my email rather than the code. I am still having the same problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Union</title><link>https://community.arm.com/thread/37300?ContentTypeID=1</link><pubDate>Thu, 01 Mar 2001 07:31:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4061bcb0-6e66-4c95-851b-d4e9607b919b</guid><dc:creator>Dan Henry</dc:creator><description>&lt;p&gt;Instead, try:&lt;br /&gt;
&lt;pre&gt;
Def_Var Def_Var_Mem;
&lt;/pre&gt;
--Dan Henry&lt;br /&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>