<?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>device_get_binding keep returning null</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76226/device_get_binding-keep-returning-null</link><description>Hello everyone, 
 
 I am working on an nRF52-DK and getting familiar with Zephyr. 
 In this process, I am trying to connect with the sensor API with a &amp;quot;fake&amp;quot; sensor whose driver just throws random values. So I am just exploring the possibilities. 
 On</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 11 Jun 2021 14:48:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76226/device_get_binding-keep-returning-null" /><item><title>RE: device_get_binding keep returning null</title><link>https://devzone.nordicsemi.com/thread/314955?ContentTypeID=1</link><pubDate>Fri, 11 Jun 2021 14:48:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d245f71a-5c0a-4e0e-b2b8-5b1741cde5ba</guid><dc:creator>mmnano</dc:creator><description>&lt;p&gt;It worked, thank you for your help !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device_get_binding keep returning null</title><link>https://devzone.nordicsemi.com/thread/314952?ContentTypeID=1</link><pubDate>Fri, 11 Jun 2021 14:42:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58104e22-9301-4844-8d30-38960598cf1f</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Try removing the line:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;zephyr_library()&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device_get_binding keep returning null</title><link>https://devzone.nordicsemi.com/thread/314946?ContentTypeID=1</link><pubDate>Fri, 11 Jun 2021 14:21:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6939a34f-3188-4b44-84d3-81b84f54b81d</guid><dc:creator>mmnano</dc:creator><description>&lt;p&gt;Forgot the CMakeLists in the sens123 folder:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;zephyr_library()

zephyr_library_sources_ifdef(CONFIG_SENS123 sens123.c)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device_get_binding keep returning null</title><link>https://devzone.nordicsemi.com/thread/314945?ContentTypeID=1</link><pubDate>Fri, 11 Jun 2021 14:20:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ed40705-2e36-4c8a-acca-55ed632899cd</guid><dc:creator>mmnano</dc:creator><description>&lt;p&gt;Here are the KConfig and CMakeLists in the app folder:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;source &amp;quot;$ZEPHYR_BASE/Kconfig.zephyr&amp;quot;

rsource &amp;quot;drivers/Kconfig&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cmake_minimum_required(VERSION 3.13.1)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(Demo_Null)

FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})

zephyr_library_include_directories(.)

add_subdirectory(drivers)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Now, in the drivers folder:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;comment &amp;quot;Simulated Sensor Drivers&amp;quot;

rsource &amp;quot;sens123/Kconfig&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;add_subdirectory_ifdef(CONFIG_SENS123 sens123)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And finally in the drivers/sens123 folder (where the sens123.c is):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Sensor Simulation configuration options

menuconfig SENS123
    bool &amp;quot;SENS 123 Simulated sensor&amp;quot;
    depends on (I2C)
    help
      Enable I2C-based driver for SENS 123&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: device_get_binding keep returning null</title><link>https://devzone.nordicsemi.com/thread/314934?ContentTypeID=1</link><pubDate>Fri, 11 Jun 2021 13:52:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38150941-a31d-42b3-afc3-fa8ffd7c322f</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you show me the KConfig and CMakeLists files?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>