<?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>app_gpiote.c doesn&amp;#39;t include NRF_GPIOTE-&amp;gt;EVENTS_IN&amp;#39;s</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7553/app_gpiote-c-doesn-t-include-nrf_gpiote--events_in-s</link><description>I am using NRF_GPIOTE-&amp;gt;EVENTS_IN[0] and NRF_GPIOTE-&amp;gt;EVENTS_IN[1] in my software. I had my own GPIOTE_IRQHandler working.
Today I am adding UART module into my source code, compiler tells me that app_gpiote.c has a GPIOTE_IRQHandler too. 
 I checked</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Jun 2015 01:07:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7553/app_gpiote-c-doesn-t-include-nrf_gpiote--events_in-s" /><item><title>RE: app_gpiote.c doesn't include NRF_GPIOTE-&gt;EVENTS_IN's</title><link>https://devzone.nordicsemi.com/thread/26904?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2015 01:07:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7302fe20-dc00-4a76-88ba-30c328a54ae3</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;I would say that &amp;#39;proper way&amp;#39;, if you&amp;#39;re using the gpiote module for one thing, is to use it for your other code too, I see an app_gpiote_input_event_handler_register() function which may do what you want.&lt;/p&gt;
&lt;p&gt;I see now the uart module uses the gpiote for low power mode. That&amp;#39;s frustrating.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_gpiote.c doesn't include NRF_GPIOTE-&gt;EVENTS_IN's</title><link>https://devzone.nordicsemi.com/thread/26903?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2015 00:43:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8fcd81b-5d27-42c8-ba4d-3b9e4fc6eb9d</guid><dc:creator>Paul</dc:creator><description>&lt;p&gt;Yes, this is what I have done. rename and rewrite some code. I was looking for a &amp;quot;proper&amp;quot; way to avoid breaking away from SDK&amp;#39;s updates.
The reason for the gpiote used for UART is for CTS RTS signal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_gpiote.c doesn't include NRF_GPIOTE-&gt;EVENTS_IN's</title><link>https://devzone.nordicsemi.com/thread/26902?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2015 00:35:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66965b4b-6c7f-46a0-b3af-e11e0ce6386b</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Not trivially. There&amp;#39;s one handler for each IRQ, that&amp;#39;s it, it&amp;#39;s in the interrupt vector table.&lt;/p&gt;
&lt;p&gt;So if you want to send some types of interrupt one way and some types another way then you need to&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;rename the SDK&amp;#39;s GPIOTE handler to something different, say SDK_GPIOTE_IRQHandler and make it public so you can call it&lt;/li&gt;
&lt;li&gt;rename your GPIOTE handler to something different and make that public as well&lt;/li&gt;
&lt;li&gt;Write one new GPIOTE_IRQHandler which checks the events which are set and calls one or the other or both of the handlers&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You could just do 1) above and write the code to send events into your current handler, same effect, but breaking it out makes it clearer and more maintainable.&lt;/p&gt;
&lt;p&gt;However one question is .. why does adding a UART module need the app_gpiote.c to be added at all? I didn&amp;#39;t think they were related and see nothing in the Nordic uart code which uses it.&lt;/p&gt;
&lt;p&gt;One other option is not to use the GPIOTE directly in your code but rewrite your use of NRG_GPIOTE-&amp;gt;EVENTS_IN[] to use the gpiote module if you have to include that anyway for other reasons.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>