<?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>OneWire on RedBearLab nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8570/onewire-on-redbearlab-nrf51822</link><description>Hello! 
 I recently purchased a RedBearLab nRF51822 board where I want to use several DS1820 temperature sensors. 
 For dealing with the OneWire (1-wire) protocol I found this really promising and helpful library . 
 The problem is that the mentions</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Aug 2015 12:57:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8570/onewire-on-redbearlab-nrf51822" /><item><title>RE: OneWire on RedBearLab nRF51822</title><link>https://devzone.nordicsemi.com/thread/31334?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2015 12:57:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5465daf3-c7d6-46c6-a058-bd389df5e56e</guid><dc:creator>Stefan</dc:creator><description>&lt;p&gt;No I&amp;#39;m getting the error &amp;quot;No more addresses.&amp;quot; Maybe one of the&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define PIN_TO_BASEREG(pin)             (0)
#define PIN_TO_BITMASK(pin)             (pin)
#define IO_REG_TYPE uint32_t
#define IO_REG_ASM
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;is incorrect? I don&amp;#39;t know what to configure there!? :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OneWire on RedBearLab nRF51822</title><link>https://devzone.nordicsemi.com/thread/31333?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2015 12:54:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecf635a3-1449-4184-a658-4573b02063d1</guid><dc:creator>Stefan</dc:creator><description>&lt;p&gt;Thank you very much! Since I&amp;#39; using the nRF51 SDK for &lt;a href="https://github.com/RedBearLab/nRF51822-Arduino"&gt;Arduino&lt;/a&gt; I came up with this version:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#elif defined(RBL_NRF51822)

#define PIN_TO_BASEREG(pin)             (0)
#define PIN_TO_BITMASK(pin)             (pin)
#define IO_REG_TYPE uint32_t
#define IO_REG_ASM
#define DIRECT_READ(base, pin)          nrf_gpio_pin_read(pin)
#define DIRECT_WRITE_LOW(base, pin)     nrf_gpio_pin_clear(pin)
#define DIRECT_WRITE_HIGH(base, pin)    nrf_gpio_pin_set(pin)
#define DIRECT_MODE_INPUT(base, pin)    nrf_gpio_cfg_input(pin, NRF_GPIO_PIN_NOPULL)
#define DIRECT_MODE_OUTPUT(base, pin)   nrf_gpio_cfg_output(pin)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is the &lt;code&gt;NRF_GPIO_PIN_NOPULL&lt;/code&gt; for &lt;code&gt;nrf_gpio_cfg_input&lt;/code&gt; correct? I&amp;#39;m able to compile everything and now the program does not hang at &lt;code&gt;ds.search()&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OneWire on RedBearLab nRF51822</title><link>https://devzone.nordicsemi.com/thread/31332?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2015 09:32:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05f486b3-61df-4d63-981c-933da6a5773a</guid><dc:creator>Oleh</dc:creator><description>&lt;p&gt;here is a starting point, just add a custom #elif with your board like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    #elif defined(BOARD_REDBEAR_XXX)


#define DIRECT_READ(base, pin)          nrf_gpio_pin_read(pin)
#define DIRECT_WRITE_LOW(base, pin)     nrf_gpio_pin_clear(pin)
#define DIRECT_WRITE_HIGH(base, pin)    nrf_gpio_pin_set(pin)
#define DIRECT_MODE_INPUT(base, pin)    nrf_gpio_cfg_input(pin)
#define DIRECT_MODE_OUTPUT(base, pin)   nrf_gpio_cfg_output(pin)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;nrf_gpio_ functions are documented here: &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk52.v0.9.0/group__nrf__gpio.html"&gt;gpio abstraction&lt;/a&gt; or open &amp;quot;sdk/components/drivers_nrf/hal/nrf_gpio.h&amp;quot;&lt;/p&gt;
&lt;p&gt;cheers!
OL&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>