<?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 to move code out of main.c</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40550/how-to-move-code-out-of-main-c</link><description>I am using multilink (version doesn&amp;#39;t matter) 
 In main.c, certain variables, i.e., m_lbs_c, are declared and used in, i.e., led_status_send_to_all. 
 BLE_LBS_C_ARRAY_DEF( m_lbs_c , NRF_SDH_BLE_CENTRAL_LINK_COUNT); /**&amp;lt; LED button client instances. *</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Nov 2018 16:00:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40550/how-to-move-code-out-of-main-c" /><item><title>RE: How to move code out of main.c</title><link>https://devzone.nordicsemi.com/thread/157783?ContentTypeID=1</link><pubDate>Fri, 16 Nov 2018 16:00:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a40bc90a-4614-4a1d-a526-3777f532f361</guid><dc:creator>awneil</dc:creator><description>[quote userid="21676" url="~/f/nordic-q-a/40550/how-to-move-code-out-of-main-c/157779"]Thanks, I got it.[/quote]
&lt;p&gt;Apparently not!&lt;/p&gt;
&lt;p&gt;You didn&amp;#39;t follow the instructions to post the source code.&lt;/p&gt;
&lt;p&gt;The &amp;#39;extern&amp;#39; declaration should be in the header file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to move code out of main.c</title><link>https://devzone.nordicsemi.com/thread/157779?ContentTypeID=1</link><pubDate>Fri, 16 Nov 2018 15:43:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0227a0cd-af28-4ae0-8a9f-9e072e1e552e</guid><dc:creator>Ricco</dc:creator><description>&lt;p&gt;Thanks, I got it.&lt;/p&gt;
&lt;p&gt;To gain access to glo_c, I put this in my function sub.c&lt;/p&gt;
&lt;p&gt;#include &amp;quot;ble_glo_c.h&amp;quot;&lt;br /&gt;extern ble_c_t m_glo_c[NRF_SDH_BLE_CENTRAL_LINK_COUNT]; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to move code out of main.c</title><link>https://devzone.nordicsemi.com/thread/157588?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 17:49:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62c0b866-5729-47c2-b73b-63e02152012a</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;These are basic &amp;#39;C&amp;#39; programming questions - nothing specifically to do with Nordic.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://c-faq.com/decl/decldef.html"&gt;http://c-faq.com/decl/decldef.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BTW - how to properly post source code:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/1803._5F00_Insert-Code-_2D00_-Nordic.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>