<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Classic/Legacy CodeWarriorのトピックhow 64bit bitfield?</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/how-64bit-bitfield/m-p/602110#M7232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am porting a library from 32bit ARM to CW for MPC5644A. I have a structure like this that is sent ont a communication line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u64 time : 44; // msec since 1/1/1970&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u64 id : 6; // msg id&lt;BR /&gt; } field;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with u64 defined as unisigned long long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd prefer to avoid to break time in L and H part as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u32 pass_time_l; // msec since 1/1/1970&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u32 pass_time_h : 12; // msec since 1/1/1970&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u32 two_way_id : 6; // two_way_id&lt;BR /&gt; } field;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;beacuse there is a lot of code to change. Is there any solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Apr 2017 16:52:20 GMT</pubDate>
    <dc:creator>ivanzoli</dc:creator>
    <dc:date>2017-04-11T16:52:20Z</dc:date>
    <item>
      <title>how 64bit bitfield?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/how-64bit-bitfield/m-p/602110#M7232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am porting a library from 32bit ARM to CW for MPC5644A. I have a structure like this that is sent ont a communication line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u64 time : 44; // msec since 1/1/1970&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u64 id : 6; // msg id&lt;BR /&gt; } field;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with u64 defined as unisigned long long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd prefer to avoid to break time in L and H part as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u32 pass_time_l; // msec since 1/1/1970&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u32 pass_time_h : 12; // msec since 1/1/1970&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;u32 two_way_id : 6; // two_way_id&lt;BR /&gt; } field;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;beacuse there is a lot of code to change. Is there any solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2017 16:52:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/how-64bit-bitfield/m-p/602110#M7232</guid>
      <dc:creator>ivanzoli</dc:creator>
      <dc:date>2017-04-11T16:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: how 64bit bitfield?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/how-64bit-bitfield/m-p/602111#M7233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ivan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can definitely use the solution you described, but I do not know the use case and I do not know, what should be stored in pass_time_l and pass_time_h variables. But if you need somewhere in your calculation 64-bit integer, you must&amp;nbsp;concatenate pass_time_l and pass_time_h using bit shifting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 06:57:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/how-64bit-bitfield/m-p/602111#M7233</guid>
      <dc:creator>martin_kovar</dc:creator>
      <dc:date>2017-04-12T06:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: how 64bit bitfield?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/how-64bit-bitfield/m-p/602112#M7234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2017 16:21:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/how-64bit-bitfield/m-p/602112#M7234</guid>
      <dc:creator>ivanzoli</dc:creator>
      <dc:date>2017-04-18T16:21:37Z</dc:date>
    </item>
  </channel>
</rss>

