<?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>How do I use button Push Interrupt</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5385/how-do-i-use-button-push-interrupt</link><description>I want to change Variable state( 0-&amp;gt;1 or 1-&amp;gt;0) when I push the button. 
 I was searching for example relating to the GPIO. 
 but I did not find that i want. 
 Everything is a timer example 
 I would like to implement a function that operates when</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 10 Dec 2016 13:49:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5385/how-do-i-use-button-push-interrupt" /><item><title>RE: How do I use button Push Interrupt</title><link>https://devzone.nordicsemi.com/thread/18805?ContentTypeID=1</link><pubDate>Sat, 10 Dec 2016 13:49:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdfbed58-b164-4abd-b13e-4d45c317f6e3</guid><dc:creator>HarshD</dc:creator><description>&lt;p&gt;Hii all,&lt;/p&gt;
&lt;p&gt;I used same code for nrf51422 DK. But I&amp;#39;m not getting whats going wrong as I&amp;#39;m new to this environment. As pca10028.h is configured for Nrf51422 hence BSP_LED_0 is pin 21 and BSP_Button_0 is pin17.&lt;/p&gt;
&lt;p&gt;Please help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I use button Push Interrupt</title><link>https://devzone.nordicsemi.com/thread/18803?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2016 09:39:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95baee19-f50f-45f6-aa85-732b3909fe27</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;I think most of the examples in the SDK (If you are using the newest version 11) already have the gpiote driver in included in the project, and then you will get a conflict. You can run the above code if you remove all .c files from the project except main.c, and it should compile. The nrf_gpio_* and nrf_gpiote_* functions are defined in nrf_gpiote.h and nrf_gpio.h, so you should include these.&lt;/p&gt;
&lt;p&gt;Anyways, I don&amp;#39;t think it is a good solution to use the above code instead of the drivers, it was just provided as a simple example on how to use the GPIOTEs directly. You should use the driver and the callback functions provided by the driver.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I use button Push Interrupt</title><link>https://devzone.nordicsemi.com/thread/18804?ContentTypeID=1</link><pubDate>Sat, 09 Apr 2016 14:20:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6304eea-00da-4bcf-8fda-e37a2af5bb45</guid><dc:creator>Nour_l</dc:creator><description>&lt;p&gt;Hi , sorry fo bothering in here but I had a question about this ... being a beginner I copied the code as it is (I&amp;#39;ve changed the nrf_gpiote_event_configure ) and yet it didn&amp;#39;t work : it says something about a duplicated definition of the GPIOTE_IRQHandler() so I&amp;#39;m wondering how to solve that knowing that I&amp;#39;ve already tried to delete the default definition of that function and yet the led didn&amp;#39;t respond to the button&amp;#39;s press&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I use button Push Interrupt</title><link>https://devzone.nordicsemi.com/thread/18802?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2015 08:45:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:626d51fa-3683-44e2-ad48-c9820b6d7165</guid><dc:creator>Primož Kralj</dc:creator><description>&lt;p&gt;samet, function was renamed to &lt;strong&gt;nrf_gpiote_event_configure&lt;/strong&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I use button Push Interrupt</title><link>https://devzone.nordicsemi.com/thread/18801?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 20:46:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:409413e0-58ac-4ecb-be2e-5543692fca1f</guid><dc:creator>samet kocatepe</dc:creator><description>&lt;p&gt;hi, i could not find &lt;strong&gt;nrf_gpiote_event_config&lt;/strong&gt; function in sdk9 nrf_gpiote.h or any where. am i wrong?
regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I use button Push Interrupt</title><link>https://devzone.nordicsemi.com/thread/18800?ContentTypeID=1</link><pubDate>Mon, 02 Feb 2015 13:13:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45a954bc-1708-460b-8137-dbdd0f2210ef</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;You can use the GPIOTE module (nRF51 Series Reference Manual section 14). Here is a small example that will toggle a LED when you push a button:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;quot;nrf_gpiote.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;

#define GPIOTE_CHANNEL_0 0

// Interrupt handler
void GPIOTE_IRQHandler(){
	  nrf_gpio_pin_toggle(BSP_LED_0);
	  NRF_GPIOTE-&amp;gt;EVENTS_IN[0] = 0;
}

int main(void)
{
    nrf_gpio_cfg_output(BSP_LED_0);  //Configure LED 0 as output
	nrf_gpio_cfg_input(BSP_BUTTON_0,BUTTON_PULL); //Configure button 0 as input
    //Configure GPIOTE channel 0, to generate an event from button 0:
	nrf_gpiote_event_config(GPIOTE_CHANNEL_0, BSP_BUTTON_0, NRF_GPIOTE_POLARITY_HITOLO); 
	NRF_GPIOTE-&amp;gt;INTENSET = GPIOTE_INTENSET_IN0_Enabled; //Set GPIOTE interrupt register on channel 0
	NVIC_EnableIRQ(GPIOTE_IRQn); //Enable interrupts
    for(;;){}
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>