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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2011-01-29T00:58:24+02:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2011-01-29T00:58:24+02:00</updated>

		<published>2011-01-29T00:58:24+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3965&amp;p=17410#p17410</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3965&amp;p=17410#p17410"/>
		<title type="html"><![CDATA[Re: two transactions to send the report?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3965&amp;p=17410#p17410"><![CDATA[
ok, I found out by myself.<br />In my case, where I have a 10 byte descriptor, I use the following code:<br /><div class="codebox"><p>Code: </p><pre><code>   for(;;){                // main event loop<br />      while (!usbInterruptIsReady()){<br />         wdt_reset();<br />         usbPoll();<br />      }<br />      get_data();<br />      make_sense();<br />      usbSetInterrupt((void *)&amp;reportBuffer + 0, 8);<br />      while (!usbInterruptIsReady()){<br />         wdt_reset();<br />         usbPoll();<br />      }<br />      usbSetInterrupt((void *)&amp;reportBuffer + 8, 2);<br />   }<br /></code></pre></div><br /><br />If the last piece of the buffer is of length 8, another Interrupt has to be set with length zero, in order to signal end of buffer.<br />Also, it is important that the buffer length corresponds to the length implied by the hid descriptor. Initially I had a 19 byte descriptor, but would only use the first 10 bytes. This did not work until I commented out the unused descriptor portion.<p>Statistics: Posted by Guest — Sat Jan 29, 2011 12:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2011-01-28T01:35:39+02:00</updated>

		<published>2011-01-28T01:35:39+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3965&amp;p=17401#p17401</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3965&amp;p=17401#p17401"/>
		<title type="html"><![CDATA[Re: two transactions to send the report?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3965&amp;p=17401#p17401"><![CDATA[
Hi, could you please explain what you are doing?<br /><br />I am in a similar situation, in fact I am trying to emulate a PS3 controller. The reportDescriptor is rather complex (for me at least), but I think that the first 9 bytes contain controller data: report id, 19 buttons, 13 bits of unknown data (padding? if so why 13 and not just 5?), then 4 bytes for 4 axes.<br />There's also a lot of other stuff after this (about 282 bytes!?!) but no idea what that is (maybe accelerometer?)<br /><br />Anyway, I have these 9 bytes to send. Currently I have the following code:<br /><br /><br /><div class="codebox"><p>Code: </p><pre><code>   <br />   for(;;){                // main event loop<br />      wdt_reset();<br />      usbPoll();<br />      if(usbInterruptIsReady()){<br />      // called after every poll of the interrupt endpoint<br />         <br />      get_data();<br />      make_sense();<br />      usbSetInterrupt(reportBuffer, sizeof(reportBuffer));<br />      }<br />   }<br /><br /></code></pre></div><br /><br />would I just repeat everything inside the loop twice as per your example?<p>Statistics: Posted by Guest — Fri Jan 28, 2011 1:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2010-03-06T00:35:23+02:00</updated>

		<published>2010-03-06T00:35:23+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3965&amp;p=13535#p13535</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3965&amp;p=13535#p13535"/>
		<title type="html"><![CDATA[Re: two transactions to send the report?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3965&amp;p=13535#p13535"><![CDATA[
ok got it.<br /><br /> while (!usbInterruptIsReady()) usbPoll(); // need to wait<br />usbSetInterrupt((void *)&amp;reportBuffer + 0, curGamepad-&gt;report_size);<br /> while (!usbInterruptIsReady()) usbPoll();//need to wait<br /> usbSetInterrupt((void *)&amp;reportBuffer + 8, curGamepad-&gt;report_size); <br /><br />no need for any fancy endpoints.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Sat Mar 06, 2010 12:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2010-03-05T01:55:33+02:00</updated>

		<published>2010-03-05T01:55:33+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=3965&amp;p=13514#p13514</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=3965&amp;p=13514#p13514"/>
		<title type="html"><![CDATA[two transactions to send the report?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=3965&amp;p=13514#p13514"><![CDATA[
Basically I have 9 packets I need to send and maybe more in the future. I can only send 8 with 1.1 spec, so I need to to a multi endpoint, or hoping for a better method. Any project examples out there? Is there something that I could do with the control endpoint?<br /><br />I see how to set up the mutli in endpoints but dont see how I send more then one?I guess I would have expected a usbSetInterrupt( endPoint, report, size ); but ts not done that way.<br /><br />er wait, just saw usbSetInterrupt3 , so Do I need do so something like<br /><br />usbSetInterrupt(reportBuffer1, curGamepad-&gt;report_size);<br />usbSetInterrupt3(reportBuffer2, curGamepad-&gt;report_size);<br /><br />? going to try this.<br /><br />ok didnt work..<br /><br />what iuf I did somthign like this<br /><br />usbSetInterrupt((void *)&amp;reportBuffer + 0, curGamepad-&gt;report_size);<br />          while (!usbInterruptIsReady()) usbPoll();<br />         usbSetInterrupt((void *)&amp;reportBuffer + 8, curGamepad-&gt;report_size); <br /><br />The hid still only sees the first 8 ?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Fri Mar 05, 2010 1:55 am</p><hr />
]]></content>
	</entry>
	</feed>
