{"id":20351,"date":"2023-01-28T23:58:15","date_gmt":"2023-01-28T23:58:15","guid":{"rendered":"https:\/\/lemon-iot.com\/?p=20351"},"modified":"2023-02-10T14:55:46","modified_gmt":"2023-02-10T04:25:46","slug":"zephyr-device-tree-overlay-with-gpio-bindings","status":"publish","type":"post","link":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/","title":{"rendered":"Zephyr device tree overlay with GPIO bindings"},"content":{"rendered":"<div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:1216.8px;margin-left: calc(-4% \/ 2 );margin-right: calc(-4% \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:0px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\"><div class=\"fusion-column-wrapper fusion-flex-justify-content-flex-start fusion-content-layout-column\"><div class=\"fusion-text fusion-text-1\"><p>With the world still overcoming chip shortages, firmware portability has not been a more advantageous feature in embedded firmware design! This is where the Zephyr OS fits in nicely.<\/p>\n<p>Using Zephyr, your code is written for a particular hardware target, and if that target needs to change (not uncommon these days), the code can be fairly easily ported over (fingered crossed) to another target.<\/p>\n<p>The magic is in the use of device trees which include board files and device overlays. Board files tell the OS about the hardware configuration of your target while device overlays are used to specify new hardware or re-assign existing hardware e.g. the project specific pin assignments of GPIO or an I2C bus.<\/p>\n<p>In this post, we go through a simple firmware example that uses the Zephyr OS, device trees and bindings to control GPIO.<\/p>\n<p><strong>Our set-up<\/strong><\/p>\n<ul>\n<li>A Lemon IoT &#8211; BLE nRF52832 board (target)<\/li>\n<li>A nRF9160 DK (as an ARM programmer)<\/li>\n<li>A Lemon IoT &#8211; Development board (to power the target and provide USB-UART used for debugging)<\/li>\n<li>Visual studio code with the nRF connect extension installed<\/li>\n<li>nRF Connect 2.2.0 SDK<\/li>\n<\/ul>\n<\/div><div class=\"fusion-text fusion-text-2\"><h3>Step 1 &#8211; Create a new application<\/h3>\n<p>In <strong>Visual Studio Code<\/strong> (VCS), and in the <strong>nRF connect<\/strong> extension, click on <strong>Create a new application<\/strong><\/p>\n<p><img decoding=\"async\" class=\"lazyload aligncenter wp-image-20353 size-full\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27680%27%20height%3D%27811%27%20viewBox%3D%270%200%20680%20811%27%3E%3Crect%20width%3D%27680%27%20height%3D%27811%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/screenshot-newApplication.png\" alt=\"\" width=\"680\" height=\"811\" \/><\/p>\n<p>For our example, we&#8217;ll use Zephyr&#8217;s &#8220;hello_world&#8221; example as a starting point, however you can choose whatever best suits your project and we&#8217;re naming our application &#8220;basic-gpio&#8221;.<\/p>\n<p><img decoding=\"async\" class=\"lazyload aligncenter wp-image-20353 size-full\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27680%27%20height%3D%27811%27%20viewBox%3D%270%200%20680%20811%27%3E%3Crect%20width%3D%27680%27%20height%3D%27811%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/screenshot-newApplication.png\" alt=\"\" width=\"680\" height=\"811\" \/><\/p>\n<\/div><div class=\"fusion-text fusion-text-3\"><h3>Step 2 &#8211; Create a build configuration<\/h3>\n<p>This step tells the compiler what hardware we are going to target.<\/p>\n<p>Under <strong>Applications\u00a0<\/strong>&gt;\u00a0<strong>basic_gpio\u00a0<\/strong>(or whatever you&#8217;ve called yours), click on <strong>No build configurations Click to create one<\/strong><\/p>\n<p><img decoding=\"async\" class=\"lazyload size-full wp-image-20354 aligncenter\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27382%27%20height%3D%27413%27%20viewBox%3D%270%200%20382%20413%27%3E%3Crect%20width%3D%27382%27%20height%3D%27413%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/screenshot-createNewBuildConfiguration.png\" alt=\"\" width=\"382\" height=\"413\" \/><\/p>\n<p>Select the board you are targeting and change the default Build directory name, if needed. In this example we are targeting is the Lemon IoT &#8211; BLE nRF82532 board. If you have not installed the board file for you board, follow this guide to do so: LINK&#8230;<\/p>\n<p><img decoding=\"async\" class=\"lazyload aligncenter wp-image-20355 size-full\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27667%27%20height%3D%27742%27%20viewBox%3D%270%200%20667%20742%27%3E%3Crect%20width%3D%27667%27%20height%3D%27742%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/screenshot-addBuildConfiguration.png\" alt=\"\" width=\"667\" height=\"742\" \/><\/p>\n<p>Click on <strong>Build Configuration\u00a0<\/strong>to create and build this new configuration. This might take a couple of minutes&#8230;<\/p>\n<\/div><div class=\"fusion-text fusion-text-4\"><h3>Step 3 &#8211; Create a build configuration<\/h3>\n<p>This step helps describe the file structure and the files that we\u2019ll be modifying\/adding.<\/p>\n<p>Once you have your application built, a new section should appear bellow\u00a0<strong>Applications.\u00a0<\/strong>In our example, we now have\u00a0<strong>BASIC_GPIO<\/strong>\u00a0which are going to expand and explore. You\u2019ll notice:<\/p>\n<ul>\n<li><strong>main.c\u00a0<\/strong>under\u00a0<strong>Sourcefiles\/Application\/src\u00a0<\/strong>which as the name suggests, is your main application file.<\/li>\n<li><strong>lemon_iot_ble_nrf52832.dts\u00a0<\/strong>under\u00a0<strong>Inputs files<\/strong>, which is the Lemon IoT \u2013 BLE nRF52832 board file. This contains all the default\/generic board configurations.<\/li>\n<li><strong>No overlay files Click to create one<\/strong>, under\u00a0<strong>Input files<\/strong>, which is what we are going to address in this post. This is where you can added application\/project-specific configurations (or overwrite board level ones!).<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"lazyload size-full wp-image-20359 aligncenter\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27368%27%20height%3D%27613%27%20viewBox%3D%270%200%20368%20613%27%3E%3Crect%20width%3D%27368%27%20height%3D%27613%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/screenshot-fileStructure.png\" alt=\"\" width=\"368\" height=\"613\" \/><\/p>\n<p>This is a great time to explore the board file (*.dts) and especially the areas where\u00a0<strong>leds\u00a0<\/strong>and\u00a0<strong>buttons\u00a0<\/strong>are defined, along with\u00a0<strong>aliases<\/strong>. These are the things that we\u2019ll be adding to our application-specific overlay.<\/p>\n<\/div><div class=\"fusion-text fusion-text-5\"><h3 class=\"fusion-responsive-typography-calculated\" data-fontsize=\"16\" data-lineheight=\"19.2px\">Step 4 \u2013 Creating an overlay<\/h3>\n<p>Under\u00a0<strong>BASIC_GPIO<\/strong><strong>\/<\/strong><strong>Input files<\/strong>\u00a0click on\u00a0<strong>No overlay files Click to create<\/strong>\u00a0<strong>one<\/strong>. This will create an overlay and prompt you to perform a\u00a0<strong>Pristine build<\/strong>.<\/p>\n<p>In similar format to the device board, add a section that starts with\u00a0<strong>\/{\u00a0<\/strong>and ends with\u00a0<strong>};\u00a0<\/strong>Between these brackets, we\u2019ll add our output and input definitions along with aliases (sometimes not needed).<\/p>\n<p><img decoding=\"async\" class=\"lazyload size-full wp-image-20362 aligncenter\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27755%27%20height%3D%27777%27%20viewBox%3D%270%200%20755%20777%27%3E%3Crect%20width%3D%27755%27%20height%3D%27777%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/screenshot-overlay-1.png\" alt=\"\" width=\"755\" height=\"777\" \/><\/p>\n<\/div><div class=\"fusion-text fusion-text-6\"><h3>Step 5 &#8211; Device\/GPIO binding<\/h3>\n<p>Back in\u00a0<strong>main.c <\/strong>and somewhere <strong>outside <\/strong>of the<strong> main<\/strong> function<strong>,<\/strong> we need to define the GPIO bindings. There are a few ways of performing this task, but we&#8217;ll focus on the one that we have found to be more straight forward. We&#8217;ll be defining the GPIO bindings using aliases. Notice that bindings for devices\/GPIO in the overlay are similar to the one in the board file.<\/p>\n<p><img decoding=\"async\" class=\"lazyload size-full wp-image-20383 aligncenter\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27922%27%20height%3D%27227%27%20viewBox%3D%270%200%20922%20227%27%3E%3Crect%20width%3D%27922%27%20height%3D%27227%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/screenshot-devicebindings-1.png\" alt=\"\" width=\"922\" height=\"227\" \/><\/p>\n<\/div><div class=\"fusion-text fusion-text-7\"><h3>Step 6 &#8211; Configure the GPIO<\/h3>\n<p>In this step, let&#8217;s configure all the inputs and outputs. While we are at it, lets configure an interrupt for an input and set up a callback function.<\/p>\n<p><img decoding=\"async\" class=\"lazyload size-full wp-image-20380 aligncenter\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27860%27%20height%3D%27197%27%20viewBox%3D%270%200%20860%20197%27%3E%3Crect%20width%3D%27860%27%20height%3D%27197%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/screenshot-callbackFunction-1.png\" alt=\"\" width=\"860\" height=\"197\" \/><\/p>\n<p>In the\u00a0<strong>main\u00a0<\/strong>function, lets configure the inputs and outputs. Here&#8217;s a snapshot.<\/p>\n<p><img decoding=\"async\" class=\"lazyload size-full wp-image-20365 aligncenter\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27955%27%20height%3D%27482%27%20viewBox%3D%270%200%20955%20482%27%3E%3Crect%20width%3D%27955%27%20height%3D%27482%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/screenshot-gpioConfiguration.png\" alt=\"\" width=\"955\" height=\"482\" \/><\/p>\n<\/div><div class=\"fusion-text fusion-text-8\"><h3>Step 7 &#8211; Access the GPIO!<\/h3>\n<p>The final step is to access the GPIO via the bindings we set up! Here are an example easy-to-use defines for inputs and outputs. Note whether each pin is <strong>ACTIVE_LOW<\/strong> or <strong>ACTIVE_HIGH<\/strong> in the overlay or board file!<\/p>\n<p><img decoding=\"async\" class=\"lazyload aligncenter wp-image-20366 size-full\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27906%27%20height%3D%27296%27%20viewBox%3D%270%200%20906%20296%27%3E%3Crect%20width%3D%27906%27%20height%3D%27296%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/screenshot-accessGpio.png\" alt=\"\" width=\"906\" height=\"296\" \/><\/p>\n<p>And we are done &#8211; finally! This might&#8217;ve not been the easiest way of accessing\/controlling GPIO, but wait until you have to change your target hardware because it suddenly went our of stock!<\/p>\n<\/div><\/div><\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":20504,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[116],"tags":[],"class_list":["post-20351","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Zephyr device tree overlay with GPIO bindings - Lemon IoT<\/title>\n<meta name=\"description\" content=\"This post goes through the process of creating and using a Zephyr device tree overlay for GPIO access and control.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Zephyr device tree overlay with GPIO bindings - Lemon IoT\" \/>\n<meta property=\"og:description\" content=\"This post goes through the process of creating and using a Zephyr device tree overlay for GPIO access and control.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/\" \/>\n<meta property=\"og:site_name\" content=\"Lemon IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/aaron.mohtar.co\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-28T23:58:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-10T04:25:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/post_image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"443\" \/>\n\t<meta property=\"og:image:height\" content=\"445\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Aaron\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Aaron\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/2023\\\/01\\\/28\\\/zephyr-device-tree-overlay-with-gpio-bindings\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/2023\\\/01\\\/28\\\/zephyr-device-tree-overlay-with-gpio-bindings\\\/\"},\"author\":{\"name\":\"Aaron\",\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/#\\\/schema\\\/person\\\/b7eedd40e344b659bda74061578164da\"},\"headline\":\"Zephyr device tree overlay with GPIO bindings\",\"datePublished\":\"2023-01-28T23:58:15+00:00\",\"dateModified\":\"2023-02-10T04:25:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/2023\\\/01\\\/28\\\/zephyr-device-tree-overlay-with-gpio-bindings\\\/\"},\"wordCount\":1589,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/2023\\\/01\\\/28\\\/zephyr-device-tree-overlay-with-gpio-bindings\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lemon-iot.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/post_image.png\",\"articleSection\":[\"General\"],\"inLanguage\":\"en-AU\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/2023\\\/01\\\/28\\\/zephyr-device-tree-overlay-with-gpio-bindings\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/2023\\\/01\\\/28\\\/zephyr-device-tree-overlay-with-gpio-bindings\\\/\",\"url\":\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/2023\\\/01\\\/28\\\/zephyr-device-tree-overlay-with-gpio-bindings\\\/\",\"name\":\"Zephyr device tree overlay with GPIO bindings - Lemon IoT\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/2023\\\/01\\\/28\\\/zephyr-device-tree-overlay-with-gpio-bindings\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/2023\\\/01\\\/28\\\/zephyr-device-tree-overlay-with-gpio-bindings\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lemon-iot.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/post_image.png\",\"datePublished\":\"2023-01-28T23:58:15+00:00\",\"dateModified\":\"2023-02-10T04:25:46+00:00\",\"description\":\"This post goes through the process of creating and using a Zephyr device tree overlay for GPIO access and control.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/2023\\\/01\\\/28\\\/zephyr-device-tree-overlay-with-gpio-bindings\\\/#breadcrumb\"},\"inLanguage\":\"en-AU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/2023\\\/01\\\/28\\\/zephyr-device-tree-overlay-with-gpio-bindings\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-AU\",\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/2023\\\/01\\\/28\\\/zephyr-device-tree-overlay-with-gpio-bindings\\\/#primaryimage\",\"url\":\"https:\\\/\\\/lemon-iot.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/post_image.png\",\"contentUrl\":\"https:\\\/\\\/lemon-iot.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/post_image.png\",\"width\":443,\"height\":445},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/2023\\\/01\\\/28\\\/zephyr-device-tree-overlay-with-gpio-bindings\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/lemon-iot.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Zephyr device tree overlay with GPIO bindings\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/#website\",\"url\":\"https:\\\/\\\/lemon-iot.com\\\/\",\"name\":\"Lemon IoT\",\"description\":\"Connecting your projects to the cloud\",\"publisher\":{\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/lemon-iot.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-AU\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/#organization\",\"name\":\"Aaron Mohtar & Co\",\"url\":\"https:\\\/\\\/lemon-iot.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-AU\",\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/lemon-iot.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/AMCo-colors.jpg\",\"contentUrl\":\"https:\\\/\\\/lemon-iot.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/AMCo-colors.jpg\",\"width\":1475,\"height\":567,\"caption\":\"Aaron Mohtar & Co\"},\"image\":{\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/aaron.mohtar.co\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/aaron-mohtar-co\\\/\",\"https:\\\/\\\/www.instagram.com\\\/aaron.mohtar.co\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/lemon-iot.com\\\/#\\\/schema\\\/person\\\/b7eedd40e344b659bda74061578164da\",\"name\":\"Aaron\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-AU\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7a1c772ccc3be330272e4bed3e20dea89bf7c80306d113011d191ee36f851740?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7a1c772ccc3be330272e4bed3e20dea89bf7c80306d113011d191ee36f851740?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7a1c772ccc3be330272e4bed3e20dea89bf7c80306d113011d191ee36f851740?s=96&d=mm&r=g\",\"caption\":\"Aaron\"},\"description\":\"Aaron is passionate about helping people and businesses reaching their full potential. He has 12 years of experience working with product-based start-ups (mainly medical devices), and has a background in electronics engineering. He is also a trained coach and presenter.\",\"sameAs\":[\"https:\\\/\\\/lemon-iot.com\"],\"url\":\"https:\\\/\\\/lemon-iot.com\\\/index.php\\\/author\\\/aaronmoh\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Zephyr device tree overlay with GPIO bindings - Lemon IoT","description":"This post goes through the process of creating and using a Zephyr device tree overlay for GPIO access and control.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/","og_locale":"en_US","og_type":"article","og_title":"Zephyr device tree overlay with GPIO bindings - Lemon IoT","og_description":"This post goes through the process of creating and using a Zephyr device tree overlay for GPIO access and control.","og_url":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/","og_site_name":"Lemon IoT","article_publisher":"https:\/\/www.facebook.com\/aaron.mohtar.co","article_published_time":"2023-01-28T23:58:15+00:00","article_modified_time":"2023-02-10T04:25:46+00:00","og_image":[{"width":443,"height":445,"url":"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/post_image.png","type":"image\/png"}],"author":"Aaron","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Aaron","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/#article","isPartOf":{"@id":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/"},"author":{"name":"Aaron","@id":"https:\/\/lemon-iot.com\/#\/schema\/person\/b7eedd40e344b659bda74061578164da"},"headline":"Zephyr device tree overlay with GPIO bindings","datePublished":"2023-01-28T23:58:15+00:00","dateModified":"2023-02-10T04:25:46+00:00","mainEntityOfPage":{"@id":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/"},"wordCount":1589,"commentCount":1,"publisher":{"@id":"https:\/\/lemon-iot.com\/#organization"},"image":{"@id":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/#primaryimage"},"thumbnailUrl":"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/post_image.png","articleSection":["General"],"inLanguage":"en-AU","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/","url":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/","name":"Zephyr device tree overlay with GPIO bindings - Lemon IoT","isPartOf":{"@id":"https:\/\/lemon-iot.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/#primaryimage"},"image":{"@id":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/#primaryimage"},"thumbnailUrl":"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/post_image.png","datePublished":"2023-01-28T23:58:15+00:00","dateModified":"2023-02-10T04:25:46+00:00","description":"This post goes through the process of creating and using a Zephyr device tree overlay for GPIO access and control.","breadcrumb":{"@id":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/#breadcrumb"},"inLanguage":"en-AU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/"]}]},{"@type":"ImageObject","inLanguage":"en-AU","@id":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/#primaryimage","url":"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/post_image.png","contentUrl":"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/post_image.png","width":443,"height":445},{"@type":"BreadcrumbList","@id":"https:\/\/lemon-iot.com\/index.php\/2023\/01\/28\/zephyr-device-tree-overlay-with-gpio-bindings\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lemon-iot.com\/"},{"@type":"ListItem","position":2,"name":"Zephyr device tree overlay with GPIO bindings"}]},{"@type":"WebSite","@id":"https:\/\/lemon-iot.com\/#website","url":"https:\/\/lemon-iot.com\/","name":"Lemon IoT","description":"Connecting your projects to the cloud","publisher":{"@id":"https:\/\/lemon-iot.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/lemon-iot.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-AU"},{"@type":"Organization","@id":"https:\/\/lemon-iot.com\/#organization","name":"Aaron Mohtar & Co","url":"https:\/\/lemon-iot.com\/","logo":{"@type":"ImageObject","inLanguage":"en-AU","@id":"https:\/\/lemon-iot.com\/#\/schema\/logo\/image\/","url":"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/AMCo-colors.jpg","contentUrl":"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/AMCo-colors.jpg","width":1475,"height":567,"caption":"Aaron Mohtar & Co"},"image":{"@id":"https:\/\/lemon-iot.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/aaron.mohtar.co","https:\/\/www.linkedin.com\/company\/aaron-mohtar-co\/","https:\/\/www.instagram.com\/aaron.mohtar.co"]},{"@type":"Person","@id":"https:\/\/lemon-iot.com\/#\/schema\/person\/b7eedd40e344b659bda74061578164da","name":"Aaron","image":{"@type":"ImageObject","inLanguage":"en-AU","@id":"https:\/\/secure.gravatar.com\/avatar\/7a1c772ccc3be330272e4bed3e20dea89bf7c80306d113011d191ee36f851740?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7a1c772ccc3be330272e4bed3e20dea89bf7c80306d113011d191ee36f851740?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7a1c772ccc3be330272e4bed3e20dea89bf7c80306d113011d191ee36f851740?s=96&d=mm&r=g","caption":"Aaron"},"description":"Aaron is passionate about helping people and businesses reaching their full potential. He has 12 years of experience working with product-based start-ups (mainly medical devices), and has a background in electronics engineering. He is also a trained coach and presenter.","sameAs":["https:\/\/lemon-iot.com"],"url":"https:\/\/lemon-iot.com\/index.php\/author\/aaronmoh\/"}]}},"jetpack_featured_media_url":"https:\/\/lemon-iot.com\/wp-content\/uploads\/2023\/01\/post_image.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lemon-iot.com\/index.php\/wp-json\/wp\/v2\/posts\/20351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lemon-iot.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lemon-iot.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lemon-iot.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lemon-iot.com\/index.php\/wp-json\/wp\/v2\/comments?post=20351"}],"version-history":[{"count":13,"href":"https:\/\/lemon-iot.com\/index.php\/wp-json\/wp\/v2\/posts\/20351\/revisions"}],"predecessor-version":[{"id":20513,"href":"https:\/\/lemon-iot.com\/index.php\/wp-json\/wp\/v2\/posts\/20351\/revisions\/20513"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lemon-iot.com\/index.php\/wp-json\/wp\/v2\/media\/20504"}],"wp:attachment":[{"href":"https:\/\/lemon-iot.com\/index.php\/wp-json\/wp\/v2\/media?parent=20351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lemon-iot.com\/index.php\/wp-json\/wp\/v2\/categories?post=20351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lemon-iot.com\/index.php\/wp-json\/wp\/v2\/tags?post=20351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}