<?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>Perfoming an action after pressing two buttons ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12753/perfoming-an-action-after-pressing-two-buttons</link><description>I want to develop an app that wakes app from sleep mode after pressing 2 buttons, then if these buttons are still pressed for 5 secondes i want to do an action .. 
 Any idea how to implement this ? 
 Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Mar 2016 21:33:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12753/perfoming-an-action-after-pressing-two-buttons" /><item><title>RE: Perfoming an action after pressing two buttons ?</title><link>https://devzone.nordicsemi.com/thread/48448?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2016 21:33:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28e67070-994d-409e-9fd9-69fa3f5344ea</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;GPIOTE event on each button. When a button is toggled, set a flag for this button (true if button was toggled first time, i.e pressed, false next time you get the event).&lt;/p&gt;
&lt;p&gt;In gpiote callback/ISR, start a timer when both flags are set. Connect toggle event to timer STOP task through PPI after starting the timer. This way, if a button toggle happens when the timer is running, it will be stopped and the timer that is set to interrupt you after 5 seconds will not fire.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>