<?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>nRF9160 where are driver symbols defined?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70895/nrf9160-where-are-driver-symbols-defined</link><description>I&amp;#39;m trying to write a driver for an SPI peripheral. 
 west says: 
 ``` 
 ../ncs/zephyr/samples/sensor/mydriver/prj.conf:5: warning: attempt to assign the value &amp;#39;y&amp;#39; to the undefined symbol MYDRIVER 
 ``` 
 prj.conf is: 
 ``` 
 CONFIG_SENSOR=y CONFIG_SPI</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Mar 2021 14:33:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70895/nrf9160-where-are-driver-symbols-defined" /><item><title>RE: nRF9160 where are driver symbols defined?</title><link>https://devzone.nordicsemi.com/thread/299314?ContentTypeID=1</link><pubDate>Thu, 11 Mar 2021 14:33:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:410cea4c-8d43-4621-b45a-0f093b1a7da0</guid><dc:creator>paul_tanner</dc:creator><description>&lt;p&gt;Sorry, I forgot to close this.&lt;/p&gt;
&lt;p&gt;zephyr/drivers/sensor/Kconfig&amp;nbsp; needed&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;source &amp;quot;drivers/sensor/mydriver/Kconfig&amp;quot;&lt;/p&gt;
&lt;p&gt;zephyr/drivers/sensor/CMakeLists.txt needed&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;add_subdirectory_ifdef(CONFIG_MYDRIVER&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mydriver)&lt;/p&gt;
&lt;p&gt;zephyr/include/drivers/sensor.h&amp;nbsp; needed sensor channels defined e.g.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; SENSOR_CHAN_O3,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;zephyr/drivers/sensor/&lt;/span&gt;sensor_shell.c needed the same. e.g.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; [SENSOR_CHAN_O3] =&lt;span&gt; &lt;/span&gt;&amp;quot;o3&amp;quot;,&lt;/p&gt;
&lt;p&gt;After that I got a clean build.&amp;nbsp; Still testing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 where are driver symbols defined?</title><link>https://devzone.nordicsemi.com/thread/291175?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 07:39:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43b33f54-df5c-46bd-ad16-ce5c9034fcf3</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to create your own configuration, I would recommend that you look at the zephyr docs related to kconfig:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/guides/kconfig/index.html"&gt;https://docs.zephyrproject.org/latest/guides/kconfig/index.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can look at other samples that has a Kconfig file for local configuration, for instance the aws_fota sample:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/samples/nrf9160/aws_fota/Kconfig"&gt;https://github.com/nrfconnect/sdk-nrf/blob/master/samples/nrf9160/aws_fota/Kconfig&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>