<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nAN-36 + nRF51822 PCA10028 APP_BUTTON_INIT [SOLVED]</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5987/nan-36-nrf51822-pca10028-app_button_init-solved</link><description>in the code below, the keil IDE is flagging with red squiggly APP_BUTTON_INIT, claiming that it is an undefined symbol. It also says that this implicit declaration of &amp;#39;APP_BUTTON_INIT&amp;#39; is not valid for c99 
 I called out the proper GPIOTE function before</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 10 Apr 2015 15:02:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5987/nan-36-nrf51822-pca10028-app_button_init-solved" /><item><title>RE: nAN-36 + nRF51822 PCA10028 APP_BUTTON_INIT [SOLVED]</title><link>https://devzone.nordicsemi.com/thread/20894?ContentTypeID=1</link><pubDate>Fri, 10 Apr 2015 15:02:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9b29846-d088-4a51-8a2d-96571be422ea</guid><dc:creator>gwayne</dc:creator><description>&lt;p&gt;I just spent an entire day updating my project from SDK 7.1 components to 8.0.  I ran into this and a number of other issues I still haven&amp;#39;t resolved. Nordic should really publish a thorough migration app note for major releases like this.&lt;/p&gt;
&lt;p&gt;I found nAN-36 to be one of the most informative and useful documents Nordic publishes on developing applications for the nRF51.  It should be updated along with the Github example or replaced with something just as comprehensive encompassing SDK 8.0 and implementation via IAR (not just Keil).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nAN-36 + nRF51822 PCA10028 APP_BUTTON_INIT [SOLVED]</title><link>https://devzone.nordicsemi.com/thread/20893?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2015 09:29:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81d24b9a-2796-4779-b101-532ccd09640b</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;You are correct that if you got the most recent SDK (which is version 8.0) &lt;code&gt;APP_BUTTON_INIT()&lt;/code&gt; is not defined. Thank you for pointing this out. The Github version of the lbs example is based on SDK 7.1 (which is stated in the readme file). The nAN-36 app note is really old now, and in my opinion should have been removed from the site, so I understand you frustration, sorry about that. We are working on an alternative to the app note. We sure also have to update the Github example to the recent SDK 8 version which was released a few days ago.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nAN-36 + nRF51822 PCA10028 APP_BUTTON_INIT [SOLVED]</title><link>https://devzone.nordicsemi.com/thread/20892?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2015 18:56:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07d81dfc-2f05-4bb8-9078-2a0b9cb3d6f4</guid><dc:creator>bulbse</dc:creator><description>&lt;p&gt;out of the box it fails, I got the most recent sdk and keil. I grabbed the git hub example because there were a lot of inconsistencies with the app note and the current release. since the git hub project did not compile i took the source files from that directory and added it to a new template project to make this thing work. which it didn&amp;#39;t. however the app_button_init is defined differently in the current sdk then it was from when the app note was written. I would seriously consider re-writing that app note.  Thanks for allowing me to identify the answer.&lt;/p&gt;
&lt;p&gt;The Correct solution was to replace&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;APP_BUTTON_INIT(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY, true);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;with&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;app_button_init(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nAN-36 + nRF51822 PCA10028 APP_BUTTON_INIT [SOLVED]</title><link>https://devzone.nordicsemi.com/thread/20891?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2015 09:50:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c6b884a-f909-4e7d-8c96-1d97902cfb9c</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;APP_BUTTON_INIT() is defined on line 92 in &lt;strong&gt;app_button.h&lt;/strong&gt; if you are using SDK 7.1. If it is not there, where did you download the SDK? Are you sure you haven&amp;#39;t altered the file in another project or something? It should compile right out of the box.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nAN-36 + nRF51822 PCA10028 APP_BUTTON_INIT [SOLVED]</title><link>https://devzone.nordicsemi.com/thread/20890?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2015 02:07:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f625a36-75e1-4199-a299-a02598a77e18</guid><dc:creator>bulbse</dc:creator><description>&lt;p&gt;I also tried replacing the call, you included an additional parameter that was not defined in the header file definition ..., app_button_evt_schedule)... I removed that last parameter and it compiled.&lt;/p&gt;
&lt;p&gt;the app note calls out a function that is not defined in my header why is that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nAN-36 + nRF51822 PCA10028 APP_BUTTON_INIT [SOLVED]</title><link>https://devzone.nordicsemi.com/thread/20887?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2015 02:02:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e7169db-9be3-4949-b4fc-5ba14994dd7f</guid><dc:creator>bulbse</dc:creator><description>&lt;p&gt;Yes the header file is correctly mapped, it seems like the header doesn&amp;#39;t define APP_BUTTON_INIT
I need to find a header file in which this is defined or will need to define it myself. I still have to verify the proposed solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nAN-36 + nRF51822 PCA10028 APP_BUTTON_INIT [SOLVED]</title><link>https://devzone.nordicsemi.com/thread/20889?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2015 01:59:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6108569b-d7de-44e3-a628-bf2a206d5a13</guid><dc:creator>bulbse</dc:creator><description>&lt;p&gt;I couldn&amp;#39;t find &amp;quot;#define APP_BUTTON_INIT()&amp;quot; in my app_button.h, Am i supposed to define it? I didn&amp;#39;t touch any files other than what the app note instructs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nAN-36 + nRF51822 PCA10028 APP_BUTTON_INIT [SOLVED]</title><link>https://devzone.nordicsemi.com/thread/20896?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2015 01:53:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9a3780f-f39e-4e64-b9a1-e75351be8dad</guid><dc:creator>bulbse</dc:creator><description>&lt;p&gt;No the code does not compile.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nAN-36 + nRF51822 PCA10028 APP_BUTTON_INIT [SOLVED]</title><link>https://devzone.nordicsemi.com/thread/20886?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2015 01:51:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60382171-c0a1-4dcb-9e28-d0008d81c8f4</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;If you right click on &amp;quot;app_button.h&amp;quot; does it open the header file? If not maybe there is a typo in c_user_include_directories. If you are using macro expansion maybe try and use the full path and see if that fixes the problem. This happened to me recently using CrossWorks on OSX.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nAN-36 + nRF51822 PCA10028 APP_BUTTON_INIT [SOLVED]</title><link>https://devzone.nordicsemi.com/thread/20895?ContentTypeID=1</link><pubDate>Thu, 12 Mar 2015 01:10:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9615134e-0a3c-4420-9abc-c8bd7d1d44e4</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Does the code compile even though Keil shows this problem? There&amp;#39;s been a few posts here recently where people have had similar issues, code showing errors on the preview screen but actually compiling correctly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nAN-36 + nRF51822 PCA10028 APP_BUTTON_INIT [SOLVED]</title><link>https://devzone.nordicsemi.com/thread/20888?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2015 12:32:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cee0cd25-2f9d-4094-8157-7594d48a0fbd</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;The only way I can reproduce this is if I deliberately delete the &lt;code&gt;#define APP_BUTTON_INIT(...)&lt;/code&gt; definition in &lt;strong&gt;app_button.h&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Are you sure there are no typos or something in &lt;strong&gt;app_button.h&lt;/strong&gt;? Is the file added to the include paths?&lt;/p&gt;
&lt;p&gt;If you download the example from git again (&lt;a href="https://github.com/NordicSemiconductor/nrf51-ble-app-lbs)"&gt;github.com/.../nrf51-ble-app-lbs)&lt;/a&gt;, and put it in the SDK 7.1 &lt;strong&gt;examples/ble_peripheral&lt;/strong&gt; folder without modifying it, does it compile?&lt;/p&gt;
&lt;p&gt;What happens if you replace the call to the &lt;code&gt;APP_BUTTON_INIT&lt;/code&gt; macro in &lt;strong&gt;main.c&lt;/strong&gt; with a direct call to &lt;code&gt;app_button_init()&lt;/code&gt;? like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;app_button_init(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY, app_button_evt_schedule);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>