<?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>About BSP button and related events</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8426/about-bsp-button-and-related-events</link><description>Hi all, 
 I have two questions about BSP buttons management. 
 I see that the BSP supports the short press and long press for a button. However it seems to handle only one of the features at time, is it right ?
I can&amp;#39;t handle both short and long press</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Dec 2020 05:01:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8426/about-bsp-button-and-related-events" /><item><title>RE: About BSP button and related events</title><link>https://devzone.nordicsemi.com/thread/286402?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2020 05:01:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58adc4d8-f25e-4ce5-88a9-24aef0faf3ab</guid><dc:creator>Ela</dc:creator><description>&lt;p&gt;Hi Paolo,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can you share me the code for implementing both long and short press with one button.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Regards,&lt;/p&gt;
&lt;p&gt;Ekta&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About BSP button and related events</title><link>https://devzone.nordicsemi.com/thread/30641?ContentTypeID=1</link><pubDate>Thu, 30 Jul 2015 12:32:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b976606-7d28-4056-a1e6-9998bf9dfd37</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Hi Paolo,&lt;/p&gt;
&lt;p&gt;Firstly have a look at the &lt;a href="https://devzone.nordicsemi.com/tutorials/13/board-support-packagebsp/"&gt;introductory tutorial to BSP&lt;/a&gt;. You are right that some lights are seemingly assigned to advertising etc., however it is only assigned so that that specific LED will become lit if the relevant function is called.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = bsp_indication_set(BSP_INDICATE_ADVERTISING);
APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So if you don&amp;#39;t want the BSP to this, don&amp;#39;t call bsp_indication_set().&lt;/p&gt;
&lt;p&gt;To add custom events you add the action you want to do to the BSP event handler. For instance you can wait for 1s and check if the button is still pressed.&lt;/p&gt;
&lt;p&gt;Hopefully this answers your question. Best regards,&lt;/p&gt;
&lt;p&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About BSP button and related events</title><link>https://devzone.nordicsemi.com/thread/30640?ContentTypeID=1</link><pubDate>Wed, 29 Jul 2015 10:33:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6df04c2-731c-4d50-9043-7a6f797178c2</guid><dc:creator>ppatierno</dc:creator><description>&lt;p&gt;Regarding the first question I&amp;#39;m wrong .. I can set action both for push (short), long push and release on a single button. Now the question is ... how to change the long press time ? It&amp;#39;s fixed to 1000 ms.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>