<?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>nrf51822 Button Pull Up</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1434/nrf51822-button-pull-up</link><description>Hi, I am working my way through the Nan 36 document and everything seems to be working fine. Have a question regarding Button Pullup. 
 Little confused on this piece of code: 
 static app_button_cfg_t buttons[] =
{
 {WAKEUP_BUTTON_PIN, false, NRF_GPIO_PIN_PULLUP</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Jan 2014 12:54:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1434/nrf51822-button-pull-up" /><item><title>RE: nrf51822 Button Pull Up</title><link>https://devzone.nordicsemi.com/thread/6417?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2014 12:54:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f749c498-f1d8-4740-ac0d-2ac2a911cc73</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi John,&lt;/p&gt;
&lt;p&gt;The example works in the way that it stores the last state of the button in function &amp;quot;button_event_handler()&amp;quot;. See variable &amp;quot;send_push&amp;quot;.&lt;/p&gt;
&lt;p&gt;This means that each time you press the button, the button event handler will execute, send the &amp;quot;send_push&amp;quot; variable to the ble_lbs-handler, then invert the state of &amp;quot;send_push&amp;quot;.&lt;/p&gt;
&lt;p&gt;This way you will get &amp;#39;0&amp;#39; first, then &amp;#39;1&amp;#39;, then &amp;#39;0&amp;#39;, and so on.&lt;/p&gt;
&lt;p&gt;Best regards
Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>