<?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 function pointer does not call a function in CW 5.0 in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/function-pointer-does-not-call-a-function-in-CW-5-0/m-p/139319#M2276</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Under CW 5.0, I have declared a simple function pointer:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;void (*fp) ();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;the call:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;fp = &amp;amp;MCU_init;&amp;nbsp; // just an example&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In simulation,&amp;nbsp; fp = the address of MCU_init, but does not execute the function.&lt;/DIV&gt;&lt;DIV&gt;I am using the small memory model.&amp;nbsp; I also used a typedef, but still no luck.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is it a compiler setting?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Jun 2006 22:32:26 GMT</pubDate>
    <dc:creator>FC</dc:creator>
    <dc:date>2006-06-12T22:32:26Z</dc:date>
    <item>
      <title>function pointer does not call a function in CW 5.0</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/function-pointer-does-not-call-a-function-in-CW-5-0/m-p/139319#M2276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Under CW 5.0, I have declared a simple function pointer:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;void (*fp) ();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;the call:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;fp = &amp;amp;MCU_init;&amp;nbsp; // just an example&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In simulation,&amp;nbsp; fp = the address of MCU_init, but does not execute the function.&lt;/DIV&gt;&lt;DIV&gt;I am using the small memory model.&amp;nbsp; I also used a typedef, but still no luck.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is it a compiler setting?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2006 22:32:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/function-pointer-does-not-call-a-function-in-CW-5-0/m-p/139319#M2276</guid>
      <dc:creator>FC</dc:creator>
      <dc:date>2006-06-12T22:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: function pointer does not call a function in CW 5.0</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/function-pointer-does-not-call-a-function-in-CW-5-0/m-p/139320#M2277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;How are you calling the function?&lt;/P&gt;&lt;P&gt;fp = &amp;amp;MCU_init; will only initialize fp with the address of function MCU_init.&lt;/P&gt;&lt;P&gt;To call the function you have to write&lt;/P&gt;&lt;P&gt;fp();&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2006 13:40:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/function-pointer-does-not-call-a-function-in-CW-5-0/m-p/139320#M2277</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-06-13T13:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: function pointer does not call a function in CW 5.0</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/function-pointer-does-not-call-a-function-in-CW-5-0/m-p/139321#M2278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;DIV&gt;Forgot about the call.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Besides using function pointers in a table, what other practical uses are there?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2006 21:42:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/function-pointer-does-not-call-a-function-in-CW-5-0/m-p/139321#M2278</guid>
      <dc:creator>FC</dc:creator>
      <dc:date>2006-06-13T21:42:24Z</dc:date>
    </item>
  </channel>
</rss>

