<?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>LED Button Service Server GATT code Question:)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64276/led-button-service-server-gatt-code-question</link><description>Hi! I&amp;#39;m studying the basic codes of the BLE Blinky Application for peripheral! ( https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fble_sdk_app_blinky.html ) Here I have some questions. Can someone help me find out</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Jul 2020 22:33:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64276/led-button-service-server-gatt-code-question" /><item><title>RE: LED Button Service Server GATT code Question:)</title><link>https://devzone.nordicsemi.com/thread/262074?ContentTypeID=1</link><pubDate>Tue, 28 Jul 2020 22:33:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fad74de7-b612-4ccb-9bde-874d25e66708</guid><dc:creator>Soojin</dc:creator><description>&lt;p&gt;Thanks! It really helped alot:)&lt;br /&gt;Have a nice day&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LED Button Service Server GATT code Question:)</title><link>https://devzone.nordicsemi.com/thread/262064?ContentTypeID=1</link><pubDate>Tue, 28 Jul 2020 17:29:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f0b8c38-78c6-45a1-a1ee-5b151dc0da30</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;For example, we find the definition of NRF_BLE_GATT_DEF() in &lt;strong&gt;nrf_ble_gatt.h:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief   Macro for defining a nrf_ble_gatt instance.
 *
 * @param   _name   Name of the instance.
 * @hideinitializer
 */
#define NRF_BLE_GATT_DEF(_name)                        \
static nrf_ble_gatt_t _name;                           \
NRF_SDH_BLE_OBSERVER(_name ## _obs,                    \
                     NRF_BLE_GATT_BLE_OBSERVER_PRIO,   \
                     nrf_ble_gatt_on_ble_evt, &amp;amp;_name)
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note that the created variable is &lt;strong&gt;static&lt;/strong&gt; - Nordic use the &lt;strong&gt;m_&lt;/strong&gt; prefix to identify file-scope statics&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LED Button Service Server GATT code Question:)</title><link>https://devzone.nordicsemi.com/thread/262061?ContentTypeID=1</link><pubDate>Tue, 28 Jul 2020 17:22:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed931d7a-2622-428b-9d09-35245d38111d</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;They are #defined &lt;strong&gt;macros&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Use your IDE&amp;#39;s code browsing facilities to find the definitions of those macros.&lt;/p&gt;
&lt;p&gt;What they do is to create the variable given within the parentheses:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;BLE_LBS_DEF(&lt;strong&gt;m_lbs&lt;/strong&gt;) creates a variable called &amp;#39;&lt;strong&gt;m_lbs&lt;/strong&gt;&amp;#39; - this is the data structure used to control the&amp;nbsp;LED Button Service&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;NRF_BLE_GATT_DEF(&lt;strong&gt;m_gatt&lt;/strong&gt;)&amp;nbsp;creates a variable called &amp;#39;&lt;strong&gt;m_gatt&lt;/strong&gt;&amp;#39; - this is the data structure used to control the GATT module&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;You will find that Nordic is this approach a lot throughout the SDK.&lt;/span&gt;&lt;/p&gt;
[quote userid="92004" url="~/f/nordic-q-a/64276/led-button-service-server-gatt-code-question"]what does &amp;quot;instance&amp;quot; exactly mean here[/quote]
&lt;p&gt;&lt;span&gt;&lt;a href="https://en.wiktionary.org/wiki/instantiation"&gt;https://en.wiktionary.org/wiki/instantiation&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2337._5F00_Insert-Code-_2D00_-Nordic-2.png" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>