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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2008-04-29T22:07:04+02:00</updated>

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

		<entry>
		<author><name><![CDATA[MasterAlexei]]></name></author>
		<updated>2008-04-29T22:07:04+02:00</updated>

		<published>2008-04-29T22:07:04+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1415&amp;p=5204#p5204</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1415&amp;p=5204#p5204"/>
		<title type="html"><![CDATA[AVR USB, two IN Endpoints, two devices &amp; two Report Desc]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1415&amp;p=5204#p5204"><![CDATA[
Hello everyone.<br />Firstly - AVR USB is great thing!<br />So. My problem is that i build a Keyboard, that must to know a boot protcol and also it has a Multimedia keys, such as Vol Up, Dn, Mute oan so on. 18 Buttons at all. All this buttons are in Consumer device section. also i need one annother endpoint to create. <br />I have expanded usbDescriptorConfiguration[]<br />for one endpoint. Now it looks like this:<br /><div class="codebox"><p>Code: </p><pre><code>PROGMEM char usbDescriptorConfiguration&#91;&#93; = &#123;                                       //  USB configuration descriptor<br />    9,                                                                              //  0 // sizeof&#40;usbDescriptorConfiguration&#41;: length of descriptor in bytes<br />    USBDESCR_CONFIG,                                                                //  1 // descriptor type <br />    18 + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT + &#40;USB_CFG_DESCR_PROPS_HID &amp; 0xff&#41;, 0,    //  2 // total length of data returned &#40;including inlined descriptors&#41;<br /><br />    1,                                                                              //  4 // number of interfaces in this configuration<br />    1,                                                                              //  5 // index of this configuration<br />    0,                                                                              //  6 // configuration name string index<br />    &#40;char&#41;USBATTR_BUSPOWER,                                                         //  7 // attributes<br />    USB_CFG_MAX_BUS_POWER / 2,                                                      //  8 // max USB current in 2mA units<br /><br />                                                                                    // interface descriptor Keyboard:<br /><br />    9,                                                                              //  0 // sizeof&#40;usbDescrInterface&#41;: length of descriptor in bytes<br />    USBDESCR_INTERFACE,                                                             //  1 // descriptor type<br />    0,                                                                              //  2 // index of this interface<br />    0,                                                                              //  3 // alternate setting for this interface<br />    USB_CFG_HAVE_INTRIN_ENDPOINT,                                                   //  4 // endpoints excl 0: number of endpoint descriptors to follow<br />    USB_CFG_INTERFACE_CLASS,                                                        //  5<br />    USB_CFG_INTERFACE_SUBCLASS,                                                     //  6<br />    USB_CFG_INTERFACE_PROTOCOL,                                                     //  7<br />    0,                                                                              //  8 // string index for interface <br /><br />    9,                                                                              //  0 // sizeof&#40;usbDescrHID&#41;: length of descriptor in bytes<br />    USBDESCR_HID,                                                                   //  1 // descriptor type: HID <br />    0x01, 0x01,                                                                     //  2 // BCD representation of HID version <br />    0x00,                                                                           //  4 // target country code <br />    0x01,                                                                           //  5 // number of HID Report &#40;or other HID class&#41; Descriptor infos to follow <br />    0x22,                                                                           //  6 // descriptor type: report <br />    USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH, 0,                                        //  7 // total length of report descriptor <br /><br />    7,                                                                              //  0 // sizeof&#40;usbDescrEndpoint&#41; <br />    USBDESCR_ENDPOINT,                                                              //  1 // descriptor type = endpoint <br />    &#40;char&#41;0x81,                                                                     //  2 // IN endpoint number 1 <br />    0x03,                                                                           //  4 // attrib: Interrupt endpoint <br />    8, 0,                                                                           //  5 // maximum packet size <br />    USB_CFG_INTR_POLL_INTERVAL,                                                     //  6 // in ms <br /><br />                                                                                    // interface descriptor Consumer Device:<br /><br />    9,                                                                              //  0 // sizeof&#40;usbDescrInterface&#41;: length of descriptor in bytes<br />    USBDESCR_INTERFACE,                                                             //  1 // descriptor type<br />    1,                                                                              //  2 // index of this interface<br />    0,                                                                              //  3 // alternate setting for this interface<br />    USB_CFG_HAVE_INTRIN_ENDPOINT3,                                                  //  4 // endpoints excl 0: number of endpoint descriptors to follow<br />    USB_CFG_INTERFACE_CLASS_1,                                                      //  5<br />    USB_CFG_INTERFACE_SUBCLASS_1,                                                   //  6<br />    USB_CFG_INTERFACE_PROTOCOL_1,                                                   //  7<br />    0,                                                                              //  8 // string index for interface <br /><br />    9,                                                                              //  0 // sizeof&#40;usbDescrHID&#41;: length of descriptor in bytes<br />    USBDESCR_HID,                                                                   //  1 // descriptor type: HID <br />    0x01, 0x01,                                                                     //  2 // BCD representation of HID version <br />    0x00,                                                                           //  4 // target country code <br />    0x01,                                                                           //  5 // number of HID Report &#40;or other HID class&#41; Descriptor infos to follow <br />    0x22,                                                                           //  6 // descriptor type: report <br />    USB_CFG_HID_REPORT_DESCRIPTOR_1_LENGTH, 0,                                        //  7 // total length of report descriptor <br /><br />    7,                                                                              //  0 // sizeof&#40;usbDescrEndpoint&#41; <br />    USBDESCR_ENDPOINT,                                                              //  1 // descriptor type = endpoint <br />    &#40;char&#41;0x82,                                                                     //  2 // IN endpoint number 1 <br />    0x03,                                                                           //  4 // attrib: Interrupt endpoint <br />    8, 0,                                                                           //  5 // maximum packet size <br />    USB_CFG_INTR_POLL_INTERVAL,                                                     //  6 // in ms <br /><br />&#125;;<br /></code></pre></div><br /><br />What schould i do next?<br />How to send second Hid Report Decriptor to the host. I have seen, that the actualy Hid descriptor is send on request from host. Where can i see info, what Report Descriptor is requested? Or do i have to expand the old one with Consumer Devices Page too?<br /><br />Thanks in advance,<br /><br />Alexei<br /><br />PS. thouse number in comment are offsets, for better to find it in documentation.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1055">MasterAlexei</a> — Tue Apr 29, 2008 10:07 pm</p><hr />
]]></content>
	</entry>
	</feed>
