<?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>topic Re: HCS08GT60 __isflag_int() in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08GT60-isflag-int/m-p/130463#M2468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;as final comment, after all the real things have been said by the other repliers.&lt;BR /&gt;The original sample does not compile because in ANSI-C, there has to be a statement after a label. So "void bug() {l:}" is illegal, void ok(void) { label:; } compiles.&lt;BR /&gt;But try to avoid labels &amp;amp; goto in the first place.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Mar 2006 01:55:27 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2006-03-30T01:55:27Z</dc:date>
    <item>
      <title>HCS08GT60 __isflag_int()</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08GT60-isflag-int/m-p/130460#M2465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I am trying to use the __isfalg_int() macro to poll the level of the ext int pin, I keep getting compiler errors? How can i do this? Is the following format correct?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;static void test(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (__isflag_int()) goto label;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;label:&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;}&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;Warning : C1801: Implicit parameter-declaration for '__isflag_int'&lt;/DIV&gt;&lt;DIV&gt;GPS_Buoy_Receiver.c line 1680&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Error&amp;nbsp;&amp;nbsp; : C2801: ';' missing&lt;/DIV&gt;&lt;DIV&gt;GPS_Buoy_Receiver.c line 1683&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Error&amp;nbsp;&amp;nbsp; : C2450: Expected:&amp;nbsp; { IDENT auto break case const continue default do extern for goto if register return static switch typedef&lt;BR /&gt;volatile while __asm __interrupt&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;GPS_Buoy_Receiver.c line 1684&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Error&amp;nbsp;&amp;nbsp; : Compile failed&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2006 05:00:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08GT60-isflag-int/m-p/130460#M2465</guid>
      <dc:creator>StevePratt</dc:creator>
      <dc:date>2006-03-29T05:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: HCS08GT60 __isflag_int()</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08GT60-isflag-int/m-p/130461#M2466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi:&lt;BR /&gt;&lt;BR /&gt;Chances are you're not including the .h file where the _isflag_int() function is declared (which is indicated by the Warning).&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;BR /&gt;Warning : C1801: Implicit parameter-declaration for '__isflag_int'&lt;DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;I would suggest enable the compile option 'Error on Implicit declaration', which will catch these errors and will prevent many headaches.&lt;BR /&gt;&lt;BR /&gt;Also, it is strongly suggested not to use the 'goto' statement. It leads to bad programming habits.&lt;BR /&gt;&lt;BR /&gt;I would do something like&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;&lt;BR /&gt;static void test(void)&lt;BR /&gt;{&lt;BR /&gt;if(EXT_INT_GetVal() == FALSE)&lt;BR /&gt;{&lt;BR /&gt;// External INT pin is LOW&lt;BR /&gt;// Do action&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;// External INT is HIGH&lt;BR /&gt;// Do other action&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The EXT_INT_GetVal() function can autogenerated if you have Processor Expert. Otherwise, you can create you own version by checking the IRQF flag in the IRQSC register (assuming you enable the Ext IRQ function and set up the correct edge/level).&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Alex R.&lt;P&gt;Message Edited by alex_spotw on &lt;SPAN class="date_text"&gt;03-28-2006&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;04:16 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2006 06:15:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08GT60-isflag-int/m-p/130461#M2466</guid>
      <dc:creator>alex_spotw</dc:creator>
      <dc:date>2006-03-29T06:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: HCS08GT60 __isflag_int()</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08GT60-isflag-int/m-p/130462#M2467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Which processor are you targeting?&lt;/DIV&gt;&lt;DIV&gt;Intrinsic function __isflag_int is available in CodeWarrior HC08 V5.0 and V3.1.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have used following code there and it links without trouble:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;if(__isflag_int())&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var = 2;&lt;BR /&gt;&amp;nbsp;} else&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var = 1;&lt;BR /&gt;&amp;nbsp;}&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2006 17:10:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08GT60-isflag-int/m-p/130462#M2467</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-03-29T17:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: HCS08GT60 __isflag_int()</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08GT60-isflag-int/m-p/130463#M2468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;as final comment, after all the real things have been said by the other repliers.&lt;BR /&gt;The original sample does not compile because in ANSI-C, there has to be a statement after a label. So "void bug() {l:}" is illegal, void ok(void) { label:; } compiles.&lt;BR /&gt;But try to avoid labels &amp;amp; goto in the first place.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2006 01:55:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08GT60-isflag-int/m-p/130463#M2468</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2006-03-30T01:55:27Z</dc:date>
    </item>
  </channel>
</rss>

