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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2010-05-05T01:02:12+02:00</updated>

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

		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2010-05-05T01:02:12+02:00</updated>

		<published>2010-05-05T01:02:12+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=4231&amp;p=14351#p14351</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=4231&amp;p=14351#p14351"/>
		<title type="html"><![CDATA[So how do you get data from ENDPOINT ?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=4231&amp;p=14351#p14351"><![CDATA[
If usbSetInterrupt is to send data to the host, how to you capture data?<br /><br /><br />I added USBRQ_HID_SET_REPOR to my function set up.<br /><div class="codebox"><p>Code: </p><pre><code>unsigned  usbFunctionSetup(uchar data&#91;8&#93;)<br />{<br /><br />   usbRequest_t    *rq = (void *)data;<br />   if((rq-&gt;bmRequestType &amp; USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){    /* class request type */<br />      if(rq-&gt;bRequest == USBRQ_HID_GET_REPORT){  /* wValue: ReportType (highbyte), ReportID (lowbyte) */<br />         /* we only have one report type, so don't look at wValue */<br />         return 8;<br />      }<br />   }<br />   else if(rq-&gt;bRequest == USBRQ_HID_SET_REPORT){<br />      if (rq-&gt;wLength.word == 1) { /* We expect one byte reports */<br />        expectReport=1;<br />        return 0xFF; /* Call usbFunctionWrite with data */<br />      }<br />    }<br />   else<br />   {<br />   /* no vendor specific requests implemented */<br />   }<br />   return 0;<br />}<br /></code></pre></div><br /><br />and I added a <br /><div class="codebox"><p>Code: </p><pre><code>uchar   usbFunctionWrite(uchar *data, uchar len)<br />{<br />   blinkLed(1);<br /><br />}</code></pre></div><br />but I'm never hitting the blink.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Wed May 05, 2010 1:02 am</p><hr />
]]></content>
	</entry>
	</feed>
