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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2016-12-14T22:17:34+02:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2016-12-14T22:17:34+02:00</updated>

		<published>2016-12-14T22:17:34+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=10658&amp;p=31759#p31759</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=10658&amp;p=31759#p31759"/>
		<title type="html"><![CDATA[Re: HID Gamepad Report Descriptor issue]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=10658&amp;p=31759#p31759"><![CDATA[
Just wanted to post my solution in case someone else has this issue:<br /><br />&quot;Got the issue sorted out after having a simple realization. Just did a find in files of: usbHidReportDescriptor and found that there was a definition for length in the usbconfig.h file that I needed to adjust. Just posting this in case anyone has the same issue down the line!&quot;<p>Statistics: Posted by Guest — Wed Dec 14, 2016 10:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2016-12-13T22:12:49+02:00</updated>

		<published>2016-12-13T22:12:49+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=10658&amp;p=31749#p31749</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=10658&amp;p=31749#p31749"/>
		<title type="html"><![CDATA[Re: HID Gamepad Report Descriptor issue]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=10658&amp;p=31749#p31749"><![CDATA[
I guess I can't edit since I didnt login. Worth noting that the line without the comment description is //COLLECTION (APPLICATION)<br /><br />And when I use the device with the second block, it throws the &quot;This device cannot start. (Code 10)&quot; in the device profile. So this is breaking it somehow xD<p>Statistics: Posted by Guest — Tue Dec 13, 2016 10:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2016-12-13T22:09:03+02:00</updated>

		<published>2016-12-13T22:09:03+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=10658&amp;p=31748#p31748</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=10658&amp;p=31748#p31748"/>
		<title type="html"><![CDATA[HID Gamepad Report Descriptor issue]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=10658&amp;p=31748#p31748"><![CDATA[
I am working on a usbHidReportDescriptor and am having an issue with adding buttons to the report.<br /><br />When I use this descriptor that I did not make (only stick axis, no buttons):<br /><div class="codebox"><p>Code: </p><pre><code>PROGMEM const char usbHidReportDescriptor&#91;36&#93; = {<br />0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)<br />0x09, 0x05,                    // USAGE (Game Pad)<br />0xa1, 0x01,                    // COLLECTION (Application)<br />0xa1, 0x00,                    //   COLLECTION (Physical)<br />0x05, 0x01,                    //     USAGE_PAGE (Generic Desktop)<br />0x09, 0x30,                    //     USAGE (X)<br />0x09, 0x31,                    //     USAGE (Y)<br />0x09, 0x32,                    //     USAGE (Z) rx<br />0x09, 0x35,                    //     USAGE (Rx) ry<br />0x35, 0x00,                    //     PHYSICAL_MINIMUM (0)<br />0x46, 0xff, 0x00,              //     PHYSICAL_MAXIMUM (255)<br />0x15, 0x00,                    //     LOGICAL_MINIMUM (-127)<br />0x26, 0xff, 0x00,                    //     LOGICAL_MAXIMUM (127)<br />0x75, 0x08,                    //     REPORT_SIZE (8)<br />0x95, 0x04,                    //     REPORT_COUNT (4)<br />0x81, 0x02,                    //     INPUT (Data,Var,Abs)<br />0xc0,                          //   END_COLLECTION<br />0xc0                           // END_COLLECTION<br />};</code></pre></div><br /><br />My device gets recognized just fine and works how I hope, minus the buttons.   I created a custom report to add buttons, and this is what I have:<br /><div class="codebox"><p>Code: </p><pre><code>PROGMEM const char usbHidReportDescriptor&#91;46&#93; = {<br />  0x05, 0x01,               //USAGE_PAGE (Generic Desktop)<br />  0x09, 0x05,               //USAGE (Game Pad)<br />  0xa1, 0x01,               //<br />  0xa1, 0x00,                    //   COLLECTION (Physical)<br />  0x05, 0x09,                   //USAGE_PAGE (Button)<br />  0x19, 0x01,               //USAGE_MINIMUM (Button1)<br />  0x29, 0x10,               //USAGE_MAXIMUM (Button 16)<br />  0x15, 0x00,               //LOGICAL_MINIMUM (0)<br />  0x25, 0x01,               //LOGICAL_MAXIMUM(1)<br />  0x95, 0x10,               //REPORT_COUNT (16)<br />  0x75, 0x01,               //REPORT_SIZE (1)<br />  0x81, 0x02,               //INPUT(Data, Var, Abs)<br />  0x05, 0x01,               //USAGE_PAGE (Generic Desktop)<br />  0x09, 0x30,               //USAGE (X)<br />  0x09, 0x31,               //USAGE (Y)<br />  0x09, 0x32,               //USAGE (Z)<br />  0x09, 0x33,               //USAGE (Rx)<br />  0x15, 0x81,               //LOGICAL_MINIMUM(-127)<br />  0x25, 0x7f,               //LOGICAL_MAXIMUM(127)<br />  0x75, 0x08,               //REPORT_SIZE(8)<br />  0x95, 0x04,               //REPORT_COUNT(4)<br />  0x81, 0x02,               //INPUT(Data,Var,Abs)<br />  0xc0,                  //END_Collection<br />  0xc0                  //END_Collection</code></pre></div><br /><br />This is the only code change I'm making, even though the code is set to handle button inputs in the gamepad_report struct and method calling it. Does anyone see anything I'm doing wrong in the second iteration? I'm getting no compiler errors. Thank you very much for any help!<p>Statistics: Posted by Guest — Tue Dec 13, 2016 10:09 pm</p><hr />
]]></content>
	</entry>
	</feed>
