<?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: Issue accessing TIMER1 register CR2</title>
		<link>http://forums.leaflabs.com/topic.php?id=1132</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:26:20 +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=1132" rel="self" type="application/rss+xml" />

		<item>
			<title>sokrasins on "Issue accessing TIMER1 register CR2"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1132#post-6969</link>
			<pubDate>Tue, 25 Oct 2011 10:04:39 +0000</pubDate>
			<dc:creator>sokrasins</dc:creator>
			<guid isPermaLink="false">6969@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks mbolivar! I'm still learning the C notation, so I'm still sorting out some of the the basic notation.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sokrasins on "Issue accessing TIMER1 register CR2"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1132#post-6968</link>
			<pubDate>Tue, 25 Oct 2011 10:02:41 +0000</pubDate>
			<dc:creator>sokrasins</dc:creator>
			<guid isPermaLink="false">6968@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Ahh, you know what, I just figured it out. After looking through the source again, I figured the correct way to access CR2 on TIMER1 is &#60;/p&#62;
&#60;p&#62;`TIMER1-&#38;gt;regs.adv-&#38;gt;CR2 &#124;= 1&#38;lt;&#38;lt;8;'&#60;/p&#62;
&#60;p&#62;because of the different register components of the different classes of timers.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "Issue accessing TIMER1 register CR2"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1132#post-6967</link>
			<pubDate>Tue, 25 Oct 2011 10:02:02 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">6967@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;See the timer documentation:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://leaflabs.com/docs/libmaple/api/timer.html#types&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/docs/libmaple/api/timer.html#types&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;What you want is&#60;/p&#62;
&#60;p&#62;&#60;code&#62;(TIMER1-&#38;gt;regs).adv-&#38;gt;CR2 &#124;= 1 &#38;lt;&#38;lt; 8;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Or, since you already know you're using timer 1,&#60;/p&#62;
&#60;p&#62;&#60;code&#62;TIMER1_BASE-&#38;gt;CR2 &#124;= 1 &#38;lt;&#38;lt; 8;&#60;/code&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>sokrasins on "Issue accessing TIMER1 register CR2"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1132#post-6966</link>
			<pubDate>Mon, 24 Oct 2011 22:14:55 +0000</pubDate>
			<dc:creator>sokrasins</dc:creator>
			<guid isPermaLink="false">6966@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi all,&#60;/p&#62;
&#60;p&#62;I'm having some trouble accessing the CR2 register of TIMER1. At the line &#60;/p&#62;
&#60;p&#62;&#60;code&#62;TIMER1-&#38;gt;regs-&#38;gt;CR2 &#124;= 1&#38;lt;&#38;lt;8;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;the compiler throws an error &#34;error: base operand of '-&#38;gt;' has non-pointer type 'timer_reg_map'&#34;. This is very confusing to me, as a similar bit of code for the ADC,&#60;/p&#62;
&#60;p&#62;&#60;code&#62;ADC1-&#38;gt;regs-&#38;gt;SR ^= 1&#38;lt;&#38;lt;1;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;will compile perfectly, and the variable all seem to be of similar types. I've poked around in the timer.h source and on the forum, though I haven't been able to find the source of my problem yet. I would appreciate some help! I'm new to developing in C and using the unix toolchain, so I apologize if it's a trivial issue. &#60;/p&#62;
&#60;p&#62;Thanks in advance!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
