<?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>bsp_button_is_pressed failed to detect the state</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21334/bsp_button_is_pressed-failed-to-detect-the-state</link><description>Chip: nRF51422 
 Board: PCA10028 
 Firmware: S130_nRF51_2.0.1 
 void timer_accel_update_handler(void * p_context){
 bool p_state;
 bsp_button_is_pressed(BUTTON_3, &amp;amp;p_state);
 printf(&amp;quot;%d&amp;quot;,p_state);
 if (p_state == true){
 start_accel_update_flag</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Apr 2017 15:13:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21334/bsp_button_is_pressed-failed-to-detect-the-state" /><item><title>RE: bsp_button_is_pressed failed to detect the state</title><link>https://devzone.nordicsemi.com/thread/83556?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2017 15:13:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bde3abb-ae05-4c92-9560-cc49383e5a52</guid><dc:creator>makerTim</dc:creator><description>&lt;p&gt;I defined BSP_SIMPLE in C compiler which affect bsp.h, so the button event didn&amp;#39;t initial.
Also, I add app_button.c and include app_button.h to avoid the compile error because there were some  app_button.h function included by bsp.h #ifndef BSP_SIMPLE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>