<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/5773" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2011-06-29T22:43:53+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/5773</id>

		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2011-06-29T22:43:53+02:00</updated>

		<published>2011-06-29T22:43:53+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5773&amp;p=18819#p18819</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5773&amp;p=18819#p18819"/>
		<title type="html"><![CDATA[Re: Code in for loop outside of if (usbInterruptIsReady()) {...}]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5773&amp;p=18819#p18819"><![CDATA[
Use the code below, this may help a little. <br /><br />When ( ! usbInterruptIsReady() ) , You are limited to a very small amount of code space before the next pull must be done.  I have tried using that section of code to preform a check on the d- line. My need was for a line Low for x amount of time.  I realized there was little room to do anything. The amount of time is much less for Win7 then XP. Almost no time at all!.  I added a cli  and sli to try to get more room but still was not enough. I would like to know how to cheet this, as thus far I have not had much luck.<br /><br /><br /><div class="codebox"><p>Code: </p><pre><code>//You can put anything here you want but you still have a limit from what I know. <br />// i have never hit it and its well over a second. <br /><br />while (!usbInterruptIsReady()){   /*  limited to a short amount of time.   */  usbPoll();}  <br /><br />//You can put anything here you want but you still have a limit from what I know.  <br />//i have never hit it and its well over a second.<br /></code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Wed Jun 29, 2011 10:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[yardleydobon]]></name></author>
		<updated>2011-06-27T08:17:27+02:00</updated>

		<published>2011-06-27T08:17:27+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5773&amp;p=18811#p18811</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5773&amp;p=18811#p18811"/>
		<title type="html"><![CDATA[Code in for loop outside of if (usbInterruptIsReady()) {...}]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5773&amp;p=18811#p18811"><![CDATA[
Is it not OK to do work in the for loop outside of the if (usbInterruptIsReady()) code block?<br />I have code between wdt_reset() and usbPoll(). Sometimes the device enumerates correctly<br />but usually not. Why doesn't this work or why shouldn't I do this? Does the amount of<br />work done there matter? Do I need to call wdt_reset() multiple times?<br /><br /><div class="codebox"><p>Code: </p><pre><code>        for(;;)<br />        {<br />                wdt_reset();<br /><br />                //doing some work here<br />                foo = froobulate(foo, bar, baz);<br /><br />                usbPoll();<br />                if (usbInterruptIsReady())<br />                {<br />                        my_report.foo = foo;<br />                        usbSetInterrupt((void *)&amp;my_report, sizeof(my_report));<br />                }<br />        }<br /></code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=5332">yardleydobon</a> — Mon Jun 27, 2011 8:17 am</p><hr />
]]></content>
	</entry>
	</feed>
