<?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: serial receive buffer size</title>
		<link>http://forums.leaflabs.com/topic.php?id=13424</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:20:44 +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=13424" rel="self" type="application/rss+xml" />

		<item>
			<title>seandeg on "serial receive buffer size"</title>
			<link>http://forums.leaflabs.com/topic.php?id=13424#post-28512</link>
			<pubDate>Tue, 20 Aug 2013 16:30:54 +0000</pubDate>
			<dc:creator>seandeg</dc:creator>
			<guid isPermaLink="false">28512@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks to all who helped out - mlundinse,gbulmer and ala42.&#60;/p&#62;
&#60;p&#62;Got it done!&#60;br /&#62;
In windows XP found usart.h in MapleIDE_toplevel_directory\hardware\leaflabs\cores\maple&#60;/p&#62;
&#60;p&#62;commented out the default and added my own line, saved, and went back to my sketch. Compiled, uploaded and executed --- new buffer size has taken effect&#60;/p&#62;
&#60;p&#62;Seán
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mlundinse on "serial receive buffer size"</title>
			<link>http://forums.leaflabs.com/topic.php?id=13424#post-28511</link>
			<pubDate>Tue, 20 Aug 2013 13:09:32 +0000</pubDate>
			<dc:creator>mlundinse</dc:creator>
			<guid isPermaLink="false">28511@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;The exact place is a bit dependent on what OS you use, but look for&#60;br /&#62;
something like &#34;hardware/leaflabs/core/maple/usart.h&#34;&#60;/p&#62;
&#60;p&#62;Just make a copy of this file and rename it to someting like usart.h.original&#60;br /&#62;
and then edit the usart.h&#60;/p&#62;
&#60;p&#62;The reason why a redefinition of USART_RX_BUF_SIZE in your main file before including&#60;br /&#62;
usart.h doesnt work is that this redefinition will not be valid when the usart.c is compiled, separatly from your main sketch.&#60;/p&#62;
&#60;p&#62;The usart.c will be recompiled every time you recompile your project, if you&#60;br /&#62;
are working inside the IDE.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "serial receive buffer size"</title>
			<link>http://forums.leaflabs.com/topic.php?id=13424#post-28510</link>
			<pubDate>Tue, 20 Aug 2013 10:01:53 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">28510@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;seandeg - I think you have a couple of obstacles to overcome.&#60;/p&#62;
&#60;p&#62;First, the macro name is USART_RX_BUF_SIZE and not USART_RX_BUFFER_SIZE.&#60;/p&#62;
&#60;p&#62;Second, the usart_dev struct, which contains the USART_RX_BUF_SIZE buffer for each USART, are statically defined in usart.c. So you might be able to persuade the code to use a smaller part of that buffer, but the buffer can't be increased in size unless usart.c is recompiled and linked to your program.&#60;/p&#62;
&#60;p&#62;The value of USART_RX_BUF_SIZE could be redefined by defining it, e.g.&#60;br /&#62;
#define USART_RX_BUF_SIZE               128&#60;br /&#62;
before including uasrt.h. However, if it is to take effect, usart.c needs to be compiled too, with this change. So either usart.h needs to be edited to change the 64 to 128, or usart.c needs the #define added before including usart.h. &#60;/p&#62;
&#60;p&#62;I'd probably make a copy of usart.h and usart.c, into the project's directory, edit (at least) one of them, and add usart.c as a tab in the IDE. WARNING: I haven't checked this, it might be that the include path doesn't include the current directory. So you might want to change the #include &#38;lt;...&#38;gt; to #include &#34;...&#34; to ensure the project's copy is the one used.&#60;/p&#62;
&#60;p&#62;(Edit: removed error about libmaple)&#60;/p&#62;
&#60;p&#62;(Full disclosure: I am not a member of LeafLabs staff)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>seandeg on "serial receive buffer size"</title>
			<link>http://forums.leaflabs.com/topic.php?id=13424#post-28509</link>
			<pubDate>Tue, 20 Aug 2013 02:19:38 +0000</pubDate>
			<dc:creator>seandeg</dc:creator>
			<guid isPermaLink="false">28509@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi ala42,&#60;br /&#62;
thanks for your reply.&#60;/p&#62;
&#60;p&#62;When you say &#34;at the place where it is originally defined&#34; that would be in the usart.h file. Is that where you mean?&#60;/p&#62;
&#60;p&#62;I don't know if I can get at that file using the IDE,at least I did not find that file or any of the library source files under the IDE directory. Thats why I hope that putting a #define line in the application program to override the definition from the usart.h file will work.&#60;/p&#62;
&#60;p&#62;Thanks, Seán
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ala42 on "serial receive buffer size"</title>
			<link>http://forums.leaflabs.com/topic.php?id=13424#post-28507</link>
			<pubDate>Mon, 19 Aug 2013 18:35:45 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">28507@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;You have to change the setting at the place where it is originally defined. Set it to a low value for a test, e.g. 8, so you have a good chance to see the difference.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>seandeg on "serial receive buffer size"</title>
			<link>http://forums.leaflabs.com/topic.php?id=13424#post-28505</link>
			<pubDate>Mon, 19 Aug 2013 10:38:14 +0000</pubDate>
			<dc:creator>seandeg</dc:creator>
			<guid isPermaLink="false">28505@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi All,&#60;br /&#62;
when using Maple IDE I have changed in my sketch the recieve buffer size from default 64 by using the&#60;br /&#62;
#define USART_RX_BUFFER_SIZE   128&#60;/p&#62;
&#60;p&#62;However it looks like the receive buffer still has never more than 64 bytes in it. May well be an issue not related to Maple at all at the sending side.&#60;br /&#62;
My question --- is it valid to use the above #define to override the setting from usart.h when building with the IDE ?&#60;/p&#62;
&#60;p&#62;Thanks, Seán
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
