<?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 indication state setup</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32032/bsp-indication-state-setup</link><description>Hello Nordic Team, 
 i use SDK 12.3 and SoftDevice S130. 
 In the template project ( \examples\ble_peripheral\ble_app_template ), the BSP module is used to indicate advertising and connection as described in the table of BSP indication states. 
 In the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 Mar 2018 08:42:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32032/bsp-indication-state-setup" /><item><title>RE: BSP indication state setup</title><link>https://devzone.nordicsemi.com/thread/124296?ContentTypeID=1</link><pubDate>Wed, 14 Mar 2018 08:42:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9524a86e-1ee0-490a-9b50-cd557f719d27</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;So you do not want to have the setup for the buttons in BSP?&lt;/p&gt;
&lt;p&gt;Have you looked at one of the examples using the BSP pack in the SDK? Such as in the experimental_ble_app_blinky example that you mention?&lt;/p&gt;
&lt;p&gt;I see that this example has a &amp;quot;simpler&amp;quot; LED indication, as it turns on different LEDs for the different states, while the other examples typically blink the led for &amp;quot;advertising&amp;quot;, turns the LED on for &amp;quot;in a connection&amp;quot; and off for &amp;quot;not advertising and not in a connection&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to do the simple version, like in the experimental_ble_app_blinky, you only need to call bsp_boards_leds_init();&lt;/p&gt;
&lt;p&gt;Then you can use&amp;nbsp;bsp_board_led_on() and bsp_board_led_off(), which both takes LED number as arguments.&lt;/p&gt;
&lt;p&gt;The leds are defined:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BSP_BOARD_LED_0 = 0&lt;/p&gt;
&lt;p&gt;BSP_BOARD_LED_1 = 1&lt;/p&gt;
&lt;p&gt;BSP_BOARD_LED_2 = 2&lt;/p&gt;
&lt;p&gt;BSP_BOARD_LED_3 = 3&lt;/p&gt;
&lt;p&gt;and the bsp_board_led_***() maps this to the correct pin (pin&amp;nbsp;21-24 for the nRF51 DK).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to use the blinking LED states, such as e.g. in the ble_app_uart example, you will have to use the&amp;nbsp;buttons_leds_init(); function to initialize the buttons and LEDs, and the function&amp;nbsp;&lt;/p&gt;
&lt;p&gt;err_code = bsp_indication_set(BSP_INDICATE_CONNECTED); to set the different states. The list of the different states is found in bsp.h on line 118.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BSP indication state setup</title><link>https://devzone.nordicsemi.com/thread/124218?ContentTypeID=1</link><pubDate>Tue, 13 Mar 2018 16:28:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a451bba2-2af3-4e2c-aa6f-a89240c91666</guid><dc:creator>DanKA</dc:creator><description>&lt;p&gt;I&amp;#39;ve made a stupid mistake&amp;nbsp;setting up the timer.&amp;nbsp;The blinking works fine now.&lt;/p&gt;
&lt;p&gt;But if you&amp;nbsp;know how&amp;nbsp;to use the bsp indication states, it&amp;nbsp;is a help for further tasks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>