<?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>LEDs inverted with nRF Connect SDK DK Button and LEDs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78153/leds-inverted-with-nrf-connect-sdk-dk-button-and-leds</link><description>Greetings, 
 CPU = nRF5340 
 SDK = nRF Connect SDK v1.6.1 and 1.6.0 
 Board = custom 
 For the nRF5430, we have a custom board that uses active high logic to turn LEDs on. In the custom board&amp;#39;s DTS files, we set GPIO_ACTIVE_HIGH: 
 
 When using the peripheral_lbs</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Aug 2021 19:45:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78153/leds-inverted-with-nrf-connect-sdk-dk-button-and-leds" /><item><title>RE: LEDs inverted with nRF Connect SDK DK Button and LEDs</title><link>https://devzone.nordicsemi.com/thread/323611?ContentTypeID=1</link><pubDate>Thu, 05 Aug 2021 19:45:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0d66c0b-a847-42f1-8817-b9faf47f2d64</guid><dc:creator>brec</dc:creator><description>&lt;p&gt;Thanks Stian, That did the trick.&lt;/p&gt;
&lt;p&gt;I placed CONFIG_DK_LIBRARY_INVERT_LEDS=n in the &amp;lt;boardname&amp;gt;_cpuapp_defconfig, &amp;lt;boardname&amp;gt;_cpuappns_defconfig, and &amp;lt;boardname&amp;gt;_cpunet_defconfig to cover all cases for this board.&lt;/p&gt;
&lt;p&gt;Bob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LEDs inverted with nRF Connect SDK DK Button and LEDs</title><link>https://devzone.nordicsemi.com/thread/323580?ContentTypeID=1</link><pubDate>Thu, 05 Aug 2021 14:32:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b27f09d-c6d1-4118-a4b6-5e8839ff2cc0</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi, it the peripheral_lbs sample is using the &lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/dk_buttons_and_leds.html"&gt;dk_buttons_and_leds library&lt;/a&gt; which is setting the output of the GPIO based on the&amp;nbsp;&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/CONFIG_DK_LIBRARY_INVERT_LEDS.html"&gt;CONFIG_DK_LIBRARY_INVERT_LEDS&lt;/a&gt; config:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;err = gpio_pin_set_raw(led_devs[led_idx], led_pins[led_idx].number, IS_ENABLED(CONFIG_DK_LIBRARY_INVERT_LEDS) ? !val : val);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/41202f304f0e67423448afc5368fd4d640cb73e6/lib/dk_buttons_and_leds/dk_buttons_and_leds.c#L388"&gt;https://github.com/nrfconnect/sdk-nrf/blob/41202f304f0e67423448afc5368fd4d640cb73e6/lib/dk_buttons_and_leds/dk_buttons_and_leds.c#L388&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The config is set to =y by default, so changing this to =n should give you an active high output.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>