<?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>the lib source err</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9175/the-lib-source-err</link><description>while (button_count--)//botton_count = 4
{
 app_button_cfg_t * p_btn = &amp;amp;p_buttons[button_count];

 nrf_drv_gpiote_in_config_t config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false);
 config.pull = p_btn-&amp;gt;pull_cfg;
 
 err_code = nrf_drv_gpiote_in_init(p_btn</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Sep 2015 11:54:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9175/the-lib-source-err" /><item><title>RE: the lib source err</title><link>https://devzone.nordicsemi.com/thread/33811?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2015 11:54:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3479a3d-a87e-4d30-a6c9-6e835698ec76</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Fanqh,
Maximum number of GPIOTE hardware channel is 4. I&amp;#39;m seeing that you are trying to use 4 and 5 which is more than 4. This is not allowed. See the define of NUMBER_OF_GPIO_TE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: the lib source err</title><link>https://devzone.nordicsemi.com/thread/33810?ContentTypeID=1</link><pubDate>Tue, 15 Sep 2015 09:23:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecd3660b-0024-415e-91df-c56e4b27bcb8</guid><dc:creator>fanqh</dc:creator><description>&lt;p&gt;static int8_t channel_port_alloc(uint32_t pin,nrf_drv_gpiote_evt_handler_t handler, bool channel) { int8_t channel_id = NO_CHANNELS; uint32_t i;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t start_idx = channel ? 0 : NUMBER_OF_GPIO_TE;
uint32_t end_idx = channel ? NUMBER_OF_GPIO_TE : (NUMBER_OF_GPIO_TE+GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS);
//critical section

for (i = start_idx; i &amp;lt; end_idx; i++)   //start= 4; end_id = 5   when button =2,the function  will  return 0xff, if somewherr is erro?
{
    if (m_cb.handlers[i] == FORBIDDEN_HANDLER_ADDRESS)
    {
        pin_in_use_by_te_set(pin, i, handler, channel);
        channel_id = i;
        break;
    }
}
//critical section
return channel_id;

}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;i use s110 9.0.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: the lib source err</title><link>https://devzone.nordicsemi.com/thread/33809?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2015 13:24:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5a14d1c-3241-4f40-a78d-9878c13864cb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Fanqh: Next time when you ask a question please put more description in. We need to know which SDK version you use. what you plan to do , and how the issue occurs.&lt;/p&gt;
&lt;p&gt;From the information you provide, most likely you wanted to use more than 4 GPIOTE IN channels so you will receive NRF_ERROR_NO_MEM. I know you mentioned botton_count = 4, but if you have allocated 4 channels before and then try to add more you will receive the error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>