<?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: Including header files in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Including-header-files/m-p/535905#M4832</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Mon Feb 07 02:05:30 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The math.h header provided with LPCXpresso IDE does include the standard inverse trig functions - acos(), asin(), atan() and atan2(). For more information on these functions, see &lt;/SPAN&gt;&lt;A href="http://" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.cplusplus.com/reference/clibrary/cmath/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All you should need to do is add the line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;#include &amp;lt;math.h&amp;gt; &lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to your source file, and you should then be able to call these functions. If you are still having problems, then I suggest that you post a code snippet, together with the warning/errors that you are seeing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With regards to your problems with GPIO and timers, these should typically "just work" if you code includes appropriate headers and calls the appropriate functions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However you will need to explain in more detail exactly which examples you are basing your own development off. There have been several revisions of examples over time, and, for example, the latest examples from NXP are structured somewhat differently to previous revisions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would always suggest that you start with the examples provided with the latest version of LPCXpresso IDE (3.6.2 at present), and then make sure that you read any documentation/readmes provided as part of example projects to understand how they are structured before trying to modify them extensively.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 03:01:40 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T03:01:40Z</dc:date>
    <item>
      <title>Including header files</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Including-header-files/m-p/535902#M4829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by charithjperera on Sun Feb 06 01:13:14 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for that seems to be an extremely noob question - how do I define header files so I am able to use the functions defined in them and their corresponding c files?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also - how could I get trig functions? including math.h seemed to do nothing - I am looking for the inverse trig functions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am prototyping a tilt sensor that includes an lpcxpresso 1114 talking to two sensors through I2C. I started off with the I2C example and now I have modified it completely so it collects, process and returns the data over the console through semihosting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I require GPIO functionality and the timer for interrupts and to get the change in time for numerical integration. including the gpio.h and timer headers as is done in the blinker example did nothing, are there any settings that need to be changed or is there another way to define them?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also - how could I implement inverse trig functions? Is there a standard library such as math that i'd be able to use with the lpcxpresso?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Charith&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 03:01:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Including-header-files/m-p/535902#M4829</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T03:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Including header files</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Including-header-files/m-p/535903#M4830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by charithjperera on Sun Feb 06 22:36:09 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just an update - it seemed to be related to these two types of icons the drivers can take, see the screenshot.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The I2C example could only make use of some of thoese drivers; the ones that had the drop down option on the side and as such - I was unable to use the timer. GPIO and I2C worked fine though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The blinker example however had the dropdown option for all of the drivers and upon copying my code to that directory - I was able to make use of all the drivers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody know what's going on here? My best guess is that there are some project parameters that are being annoying.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Charith&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 03:01:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Including-header-files/m-p/535903#M4830</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T03:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Including header files</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Including-header-files/m-p/535904#M4831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ex-kayoda on Sun Feb 06 22:51:41 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;This are no drivers, this are source (*.c) and header (.h) files of your project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Use right button to copy and paste this files between your projects.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So copy timer.h / timer.c from blinky project, paste them in your actual project and use them in your main (as in blinky main).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To read more about including math.h search for math.h in:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/WikiHome&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 03:01:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Including-header-files/m-p/535904#M4831</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T03:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Including header files</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Including-header-files/m-p/535905#M4832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Mon Feb 07 02:05:30 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The math.h header provided with LPCXpresso IDE does include the standard inverse trig functions - acos(), asin(), atan() and atan2(). For more information on these functions, see &lt;/SPAN&gt;&lt;A href="http://" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.cplusplus.com/reference/clibrary/cmath/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All you should need to do is add the line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;#include &amp;lt;math.h&amp;gt; &lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to your source file, and you should then be able to call these functions. If you are still having problems, then I suggest that you post a code snippet, together with the warning/errors that you are seeing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With regards to your problems with GPIO and timers, these should typically "just work" if you code includes appropriate headers and calls the appropriate functions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However you will need to explain in more detail exactly which examples you are basing your own development off. There have been several revisions of examples over time, and, for example, the latest examples from NXP are structured somewhat differently to previous revisions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would always suggest that you start with the examples provided with the latest version of LPCXpresso IDE (3.6.2 at present), and then make sure that you read any documentation/readmes provided as part of example projects to understand how they are structured before trying to modify them extensively.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 03:01:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Including-header-files/m-p/535905#M4832</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T03:01:40Z</dc:date>
    </item>
  </channel>
</rss>

