<?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>Difference between gpio flags &amp;quot;GPIO_OUTPUT_HIGH&amp;quot; and &amp;quot;GPIO_OUTPUT_ACTIVE&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93613/difference-between-gpio-flags-gpio_output_high-and-gpio_output_active</link><description>Hi, 
 
 What is the difference between the gpio flags &amp;quot; GPIO_OUTPUT_ACTIVE&amp;quot; and &amp;quot;GPIO_OUTPUT_HIGH&amp;quot;..? They both do the same thing..? 
 
 
 Thanks,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Nov 2022 05:00:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93613/difference-between-gpio-flags-gpio_output_high-and-gpio_output_active" /><item><title>RE: Difference between gpio flags "GPIO_OUTPUT_HIGH" and "GPIO_OUTPUT_ACTIVE"</title><link>https://devzone.nordicsemi.com/thread/394569?ContentTypeID=1</link><pubDate>Tue, 08 Nov 2022 05:00:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cf2963b-8c1b-432e-84af-3d8ded646476</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Difference between gpio flags "GPIO_OUTPUT_HIGH" and "GPIO_OUTPUT_ACTIVE"</title><link>https://devzone.nordicsemi.com/thread/394532?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2022 17:41:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9cdd5a7-6890-4b8e-8cb8-00f2fa4a750c</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;Hi Ubaid,&lt;/p&gt;
&lt;p&gt;Sometimes it&amp;#39;s &lt;a href="https://electronics.stackexchange.com/questions/60401/why-does-active-low-even-exist"&gt;useful&lt;/a&gt; to define your GPIO&amp;#39;s logical &amp;quot;1&amp;quot; level to be the low voltage state, and the logical &amp;quot;0&amp;quot; level to be the high voltage state. This configuration is called &amp;quot;active low&amp;quot; - opposite of the usual which is &amp;quot;active high&amp;quot;&lt;/p&gt;
&lt;p&gt;So, the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/peripherals/gpio.html"&gt;GPIO API&lt;/a&gt; offers alternative options to set a pin output level:&lt;/p&gt;
&lt;p&gt;GPIO_OUTPUT_HIGH will let you configure a pin as output and immediately set it to a &amp;quot;high voltage&amp;quot; state (regardless of whether that means logical 1 or 0).&lt;/p&gt;
&lt;p&gt;GPIO_OUTPUT_ACTIVE will let you configure a pin as output and immediately set it to the active &amp;quot;logical 1&amp;quot; state, without having to think about whether the pin is configured as active high or active low.&lt;/p&gt;
&lt;p&gt;I hope this clarifies things.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Raoul Pathak&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>