<?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/4895" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2010-10-24T05:27:15+02:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-10-24T05:27:15+02:00</updated>

		<published>2010-10-24T05:27:15+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16357#p16357</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16357#p16357"/>
		<title type="html"><![CDATA[Re: usbFunctionRead problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16357#p16357"><![CDATA[
I give up.It seems PS3 doesn't like compressed descriptor data <img class="smilies" src="./../../../images/smilies/icon_sad.gif" alt=":(" title="Sad" /><p>Statistics: Posted by Guest — Sun Oct 24, 2010 5:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-10-05T19:39:04+02:00</updated>

		<published>2010-10-05T19:39:04+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16114#p16114</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16114#p16114"/>
		<title type="html"><![CDATA[Re: usbFunctionRead problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16114#p16114"><![CDATA[
your 2nd code makes no sense, why is usbMsgPtr the source for memcpy_P?<br />also a 5ms delay si probably too long for USB stuff<p>Statistics: Posted by Guest — Tue Oct 05, 2010 7:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-10-05T15:41:21+02:00</updated>

		<published>2010-10-05T15:41:21+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16112#p16112</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16112#p16112"/>
		<title type="html"><![CDATA[Re: usbFunctionRead problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16112#p16112"><![CDATA[
I'm just follow tutorial from here:<a href="http://vusb.wikidot.com/driver-api" class="postlink">http://vusb.wikidot.com/driver-api</a> &quot;Receiving data from the device&quot; method 2.The point is that the latter usbFunctionRead can do work,the first usbFunctionRead can't.<p>Statistics: Posted by Guest — Tue Oct 05, 2010 3:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-10-05T14:26:03+02:00</updated>

		<published>2010-10-05T14:26:03+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16111#p16111</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16111#p16111"/>
		<title type="html"><![CDATA[Re: usbFunctionRead problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16111#p16111"><![CDATA[
&quot;device not recognized&quot; doesn't seem like a bug that would be caused by a malfunctioning usbFunctionRead, can you describe the problem more?<p>Statistics: Posted by Guest — Tue Oct 05, 2010 2:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2010-10-05T13:22:36+02:00</updated>

		<published>2010-10-05T13:22:36+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16110#p16110</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16110#p16110"/>
		<title type="html"><![CDATA[usbFunctionRead problem]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4895&amp;p=16110#p16110"><![CDATA[
I'm using USB_CFG_IMPLEMENT_FN_READ feature,descriptor data stored in flash are decompressed by usbFunctionRead on the fly,but it can't be recognized by host.<br /><br />code like this:<br /><div class="codebox"><p>Code: </p><pre><code>uchar buffer&#91;256&#93;;<br />uchar usbFunctionRead(uchar *data, uchar len)<br />{<br />   uchar *r = usbMsgPtr;    //compressed data ptr in flash<br /><br />                if(firstrun) mydepack(r,buffer);     //decompress needs about 5ms execute time<br />         <br />   memcpy(data,buffer+pos,len);<br />                pos+=len;<br />   return len;<br />}<br /></code></pre></div><br /><br />If I do not use compression it can do work,like this:<br /><br /><div class="codebox"><p>Code: </p><pre><code>uchar buffer&#91;256&#93;;<br />uchar usbFunctionRead(uchar *data, uchar len)<br />{<br />   uchar *r = usbMsgPtr;    //uncompressed data ptr in flash<br /><br />                if(firstrun){<br />                memcpy_P(buffer,r,256); <br />                _delay_ms(5);              //to ensure it's not some timing problem.<br />                }<br /><br />   memcpy(data,buffer+pos,len);<br />                pos+=len;<br />   return len;<br />}<br /></code></pre></div><br /><br />I checked decompress function,stack,can't figure out.Is there some transmit manager limit in V-USB interrupt service ?<p>Statistics: Posted by Guest — Tue Oct 05, 2010 1:22 pm</p><hr />
]]></content>
	</entry>
	</feed>
