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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2018-03-21T21:00:12+02:00</updated>

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

		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2018-03-21T21:00:12+02:00</updated>

		<published>2018-03-21T21:00:12+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33946#p33946</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33946#p33946"/>
		<title type="html"><![CDATA[Re: HID Variable data length]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33946#p33946"><![CDATA[
512 is the max (usb 1.1 spec) , weather v-usb can do it, i'm not sure.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Wed Mar 21, 2018 9:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drquark]]></name></author>
		<updated>2018-03-21T15:02:32+02:00</updated>

		<published>2018-03-21T15:02:32+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33944#p33944</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33944#p33944"/>
		<title type="html"><![CDATA[Re: HID Variable data length]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33944#p33944"><![CDATA[
Ok, I've got it working on a <em class="text-italics">ATMEGA328P</em> with <em class="text-italics">Arduino bootloader</em>. Thank you for your support !<br />I can read/write 511 bytes of data, that is enough for my use. BTW, what's the max size we can transfer in HID get/set report ? I've used 0x1ff (511) is it possible to go to 512 (0x200) ? As the max size in with <strong class="text-strong">USB_CFG_LONG_TRANSFERS=0</strong> is 0xff (255), I assumed that 0x1ff is the max with <strong class="text-strong">USB_CFG_LONG_TRANSFERS=1</strong>.<br />Just need to add CAN ISO_TP code and it'll be ready. If you are interested, I will put the code on GitHub.<br /> <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=":wink:" title="Wink" /> <br />Thank you again.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23475">drquark</a> — Wed Mar 21, 2018 3:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2018-03-16T17:07:17+02:00</updated>

		<published>2018-03-16T17:07:17+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33916#p33916</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33916#p33916"/>
		<title type="html"><![CDATA[Re: HID Variable data length]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33916#p33916"><![CDATA[
v-usb only uses one interrupt and it does not disable it at any time.  I see no issues.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Fri Mar 16, 2018 5:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drquark]]></name></author>
		<updated>2018-03-15T22:14:44+02:00</updated>

		<published>2018-03-15T22:14:44+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33912#p33912</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33912#p33912"/>
		<title type="html"><![CDATA[Re: HID Variable data length]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33912#p33912"><![CDATA[
I'm almost ready to start my project, I have a last question : I'd like to use the millis() function from Arduino code, but it uses TIMER 0 overflow interrupt. I read in the wiki :<br /><blockquote class="uncited"><div>Make sure that you're not using interrupts higher than the interrupt you have set for VUSB. Also make sure you're not disabling interrupts for longer than a few millisecond</div></blockquote><br />Knowing that this interrupt function is very fast to execute and its priority is lower, do I need to find an alternative method for millis() or it should be fine ?<br />Regards<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23475">drquark</a> — Thu Mar 15, 2018 10:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2018-03-15T13:42:10+02:00</updated>

		<published>2018-03-15T13:42:10+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33908#p33908</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33908#p33908"/>
		<title type="html"><![CDATA[Re: HID Variable data length]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33908#p33908"><![CDATA[
0x96 is correct.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Thu Mar 15, 2018 1:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drquark]]></name></author>
		<updated>2018-03-14T18:10:37+02:00</updated>

		<published>2018-03-14T18:10:37+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33899#p33899</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33899#p33899"/>
		<title type="html"><![CDATA[Re: HID Variable data length]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33899#p33899"><![CDATA[
Ok, I think I found that macro to set to a higher value  <img class="smilies" src="./../../../images/smilies/icon_biggrin.gif" alt=":D" title="Very Happy" /> <br /><div class="codebox"><p>Code: </p><pre><code>#define HID_ReportCountS(x)     0x96,(x&amp;0xFF),((x&gt;&gt;8)&amp;0xFF)</code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23475">drquark</a> — Wed Mar 14, 2018 6:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drquark]]></name></author>
		<updated>2018-03-14T16:48:27+02:00</updated>

		<published>2018-03-14T16:48:27+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33897#p33897</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33897#p33897"/>
		<title type="html"><![CDATA[Re: HID Variable data length]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33897#p33897"><![CDATA[
Good,<br />How do I transfer 512 bytes, as REPORT_COUNT is a byte with a max value of 0xFF (255) ?<br />I understand that I can define USB_CFG_LONG_TRANSFERS to 1 to make it possible, but finally what's the use of REPORT_COUNT in the usb report descriptor ?<br />in the wiki, I found this code snippet :<br /><div class="codebox"><p>Code: </p><pre><code>static uchar buffer&#91;64&#93;;<br /> <br />usbMsgLen_t usbFunctionSetup(uchar setupData&#91;8&#93;)<br />{<br />    usbRequest_t *rq = (void *)setupData;   // cast to structured data for parsing<br />    switch(rq-&gt;bRequest){<br />    case VENDOR_RQ_READ_BUFFER:<br />        usbMsgLen_t len = 64;                     // we return up to 64 bytes<br />        if(len &gt; rq-&gt;wLength.word)          // if the host requests less than we have<br />            len = rq-&gt;wLength.word;         // return only the amount requested<br />        usbMsgPtr = buffer;                 // tell driver where the buffer starts<br />        return len;                         // tell driver how many bytes to send<br />    }<br />    return 0;                               // ignore all unknown requests<br />}</code></pre></div><br /><br />That helps me understand, but I'm in trouble with this famous REPORT_COUNT value... <img class="smilies" src="./../../../images/smilies/icon_question.gif" alt=":?:" title="Question" /><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23475">drquark</a> — Wed Mar 14, 2018 4:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2018-03-14T13:30:15+02:00</updated>

		<published>2018-03-14T13:30:15+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33896#p33896</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33896#p33896"/>
		<title type="html"><![CDATA[Re: HID Variable data length]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33896#p33896"><![CDATA[
The host software can do anything you want  in software obviously. It can not do anything driver wise (killing/resetting  the port) unles you are low level like C or use devcon or like. Again though you are not showing your design. <br /><br />Say you create a loop in your code. <br /><br />while(x)<br />  checkForData();<br /><br />in checkForData you have feature reports as earlier discussed. You could always set X to false to stop communication. Feature reports are controlled by the host only as why I suggested them.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Wed Mar 14, 2018 1:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[drquark]]></name></author>
		<updated>2018-03-13T22:11:34+02:00</updated>

		<published>2018-03-13T22:11:34+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33895#p33895</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33895#p33895"/>
		<title type="html"><![CDATA[Re: HID Variable data length]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33895#p33895"><![CDATA[
Great !<br />If I set the first byte of the buffer with the message length to the host, is it possible to abort USB communication when I get the desired buffer size ?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=23475">drquark</a> — Tue Mar 13, 2018 10:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2018-03-13T20:04:12+02:00</updated>

		<published>2018-03-13T20:04:12+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33894#p33894</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33894#p33894"/>
		<title type="html"><![CDATA[Re: HID Variable data length]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=11274&amp;p=33894#p33894"><![CDATA[
<!-- m --><a class="postlink" href="https://github.com/obdev/v-usb/tree/master/examples/hid-data">https://github.com/obdev/v-usb/tree/mas ... s/hid-data</a><!-- m --><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Tue Mar 13, 2018 8:04 pm</p><hr />
]]></content>
	</entry>
	</feed>
