<?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>Kinetis Design StudioのトピックWhy does the user need to provide DeviceData in every Processor Expert LDD API call?</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Why-does-the-user-need-to-provide-DeviceData-in-every-Processor/m-p/316306#M267</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I create an instance of a driver using Processor Expert, why do I have to pass a DeviceData pointer into the API?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, if I create a component for the blue LED on my FRDM-KL25Z board named 'LED_BLUE' and of type 'BitIO_LDD', files are created called 'LED_BLUE.c' and 'LED_BLUE.h' and the API functions are prefixed by the name LED_BLUE (e.g. LED_BLUE_Init(), LED_BLUE_PutVal()).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would have thought that this would be enough context for the component to know what object we are talking about without also having to pass LED_BLUE_DeviceData as the first parameter of each function.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Couldn't the component store a reference to its own DeviceData? Is there something I am missing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 Jul 2014 18:40:19 GMT</pubDate>
    <dc:creator>stephenlangstaf</dc:creator>
    <dc:date>2014-07-06T18:40:19Z</dc:date>
    <item>
      <title>Why does the user need to provide DeviceData in every Processor Expert LDD API call?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Why-does-the-user-need-to-provide-DeviceData-in-every-Processor/m-p/316306#M267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I create an instance of a driver using Processor Expert, why do I have to pass a DeviceData pointer into the API?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, if I create a component for the blue LED on my FRDM-KL25Z board named 'LED_BLUE' and of type 'BitIO_LDD', files are created called 'LED_BLUE.c' and 'LED_BLUE.h' and the API functions are prefixed by the name LED_BLUE (e.g. LED_BLUE_Init(), LED_BLUE_PutVal()).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would have thought that this would be enough context for the component to know what object we are talking about without also having to pass LED_BLUE_DeviceData as the first parameter of each function.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Couldn't the component store a reference to its own DeviceData? Is there something I am missing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jul 2014 18:40:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Why-does-the-user-need-to-provide-DeviceData-in-every-Processor/m-p/316306#M267</guid>
      <dc:creator>stephenlangstaf</dc:creator>
      <dc:date>2014-07-06T18:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the user need to provide DeviceData in every Processor Expert LDD API call?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Why-does-the-user-need-to-provide-DeviceData-in-every-Processor/m-p/316307#M268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stephen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some components require this DeviceData pointer to maintain portability or RTOS compatibility, since this handler stores configuration parameters, component status, events, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However in the case of BitIO_LDD, you are correct that this is a weakness of Processor Expert generated code. Colleague Erich Styger suggests a workaround in his blog:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://mcuoneclipse.com/2013/09/29/optimized-bitio_ldd-programming-with-processor-expert/" title="http://mcuoneclipse.com/2013/09/29/optimized-bitio_ldd-programming-with-processor-expert/"&gt;Optimized BitIO_LDD Programming with Processor Expert | MCU on Eclipse&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge_Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jul 2014 22:17:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Why-does-the-user-need-to-provide-DeviceData-in-every-Processor/m-p/316307#M268</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2014-07-06T22:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the user need to provide DeviceData in every Processor Expert LDD API call?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Why-does-the-user-need-to-provide-DeviceData-in-every-Processor/m-p/316308#M269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see now there is a high(er) level driver 'BitIO' that wraps the 'BitIO_LDD' driver calls, providing the useless DeviceData pointer so I don't have to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 09:28:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Why-does-the-user-need-to-provide-DeviceData-in-every-Processor/m-p/316308#M269</guid>
      <dc:creator>stephenlangstaf</dc:creator>
      <dc:date>2014-07-07T09:28:40Z</dc:date>
    </item>
  </channel>
</rss>

