<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Library using HardwareSPI class</title>
		<link>http://forums.leaflabs.com/topic.php?id=910</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:12:31 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=910" rel="self" type="application/rss+xml" />

		<item>
			<title>trunet on "Library using HardwareSPI class"</title>
			<link>http://forums.leaflabs.com/topic.php?id=910#post-5616</link>
			<pubDate>Mon, 11 Jul 2011 14:10:24 +0000</pubDate>
			<dc:creator>trunet</dc:creator>
			<guid isPermaLink="false">5616@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Figured out by myself, this is called C++ initialization lists.&#60;/p&#62;
&#60;p&#62;.h file:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;class SPIEEPROM : public HardwareSPI
{
public:
        SPIEEPROM(uint32 spi_num);
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;.cpp file:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;SPIEEPROM::SPIEEPROM(uint32 spi_num) : HardwareSPI(spi_num) {
        eeprom_type = 0;
        address = 0;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Now you can access SPI methods using this-&#38;gt;begin(spi_parameters) per example.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>trunet on "Library using HardwareSPI class"</title>
			<link>http://forums.leaflabs.com/topic.php?id=910#post-5614</link>
			<pubDate>Mon, 11 Jul 2011 13:05:31 +0000</pubDate>
			<dc:creator>trunet</dc:creator>
			<guid isPermaLink="false">5614@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I'm trying to implement a library that'll use HardwareSPI class.&#60;/p&#62;
&#60;p&#62;Is it better/recommended to declare HardwareSPI spi(1) and send the object to my class or inherit HardwareSPI class inside my library class?&#60;/p&#62;
&#60;p&#62;Also, I'm having hard time finding a way to pass spi(1) because of the parameter on constructor.&#60;/p&#62;
&#60;p&#62;Thanks,&#60;/p&#62;
&#60;p&#62;Wagner Sartori Junior
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
