<?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>Custom Board pin definitions in Zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79596/custom-board-pin-definitions-in-zephyr</link><description>Migrating from nRF5 SDK to nRF Connect (Zephyr) what is the best way to define pin names using a custom board? in nRF5 SDK the header file custom_board.h usually defines the pins. Here is a snippet: 
 
 What is the best way to define a gpio pin (e.g.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Sep 2021 12:47:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79596/custom-board-pin-definitions-in-zephyr" /><item><title>RE: Custom Board pin definitions in Zephyr</title><link>https://devzone.nordicsemi.com/thread/329445?ContentTypeID=1</link><pubDate>Tue, 14 Sep 2021 12:47:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f2d59d3-38c5-4b5f-b4ed-ce512fa29e8d</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi Bard,&lt;/p&gt;
&lt;p&gt;I would recommend editing the dts file. To access the dts value in C/C++ code, you could use the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/dts/api-usage.html"&gt;Devicetree API&lt;/a&gt;. You could also take a look at &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/devicetree/api.html?highlight=dt_gpio_pin#c.DT_GPIO_PIN_BY_IDX"&gt;this&lt;/a&gt; for the required macros.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>