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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2007-12-04T10:11:17+02:00</updated>

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

		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2007-12-04T10:11:17+02:00</updated>

		<published>2007-12-04T10:11:17+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1006&amp;p=3372#p3372</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1006&amp;p=3372#p3372"/>
		<title type="html"><![CDATA[Interupt Out Heeelp :)]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1006&amp;p=3372#p3372"><![CDATA[
Please see my reply in the other thread: <!-- m --><a class="postlink" href="http://forums.obdev.at/viewtopic.php?t=1002">http://forums.obdev.at/viewtopic.php?t=1002</a><!-- m --> . When you move the descriptor to your own code, you can remove all the #ifs and many definitions because the values are known. That makes it MUCH easier to see the structure and find potential bugs.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Tue Dec 04, 2007 10:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Rukus]]></name></author>
		<updated>2007-12-04T03:41:11+02:00</updated>

		<published>2007-12-04T03:41:11+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=1006&amp;p=3365#p3365</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=1006&amp;p=3365#p3365"/>
		<title type="html"><![CDATA[Interupt Out Heeelp :)]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=1006&amp;p=3365#p3365"><![CDATA[
I have 2 endpoints other than 0. I have interupt in 1 and interupt 1 out.<br /><br />I can get either the interupt in or the interupt out working,  but never both together.<br /><br /><div class="codebox"><p>Code: </p><pre><code>PROGMEM char usbDescriptorConfiguration&#91;&#93; = &#123;    /* USB configuration descriptor */<br />    9,          /* sizeof&#40;usbDescriptorConfiguration&#41;: length of descriptor in bytes */<br />    USBDESCR_CONFIG,    /* descriptor type */<br />    18 + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT + &#40;USB_CFG_DESCR_PROPS_HID &amp; 0xff&#41;, 0,<br />                /* total length of data returned &#40;including inlined descriptors&#41; */<br />    1,          /* number of interfaces in this configuration */<br />    1,          /* index of this configuration */<br />    0,          /* configuration name string index */<br />#if USB_CFG_IS_SELF_POWERED<br />    USBATTR_SELFPOWER,  /* attributes */<br />#else<br />    USBATTR_BUSPOWER,   /* attributes */<br />#endif<br />    USB_CFG_MAX_BUS_POWER/2,            /* max USB current in 2mA units */<br />/* interface descriptor follows inline: */<br />    9,          /* sizeof&#40;usbDescrInterface&#41;: length of descriptor in bytes */<br />    USBDESCR_INTERFACE, /* descriptor type */<br />    0,          /* index of this interface */<br />    0,          /* alternate setting for this interface */<br />    2,   /* endpoints excl 0: number of endpoint descriptors to follow */<br />    USB_CFG_INTERFACE_CLASS,<br />    USB_CFG_INTERFACE_SUBCLASS,<br />    USB_CFG_INTERFACE_PROTOCOL,<br />    0,          /* string index for interface */<br />#if &#40;USB_CFG_DESCR_PROPS_HID &amp; 0xff&#41;    /* HID descriptor */<br />    9,          /* sizeof&#40;usbDescrHID&#41;: length of descriptor in bytes */<br />    USBDESCR_HID,   /* descriptor type: HID */<br />    0x01, 0x01, /* BCD representation of HID version */<br />    0x00,       /* target country code */<br />    0x01,       /* number of HID Report &#40;or other HID class&#41; Descriptor infos to follow */<br />    0x22,       /* descriptor type: report */<br />    USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH, 0,  /* total length of report descriptor */<br />#endif<br />#if USB_CFG_HAVE_INTRIN_ENDPOINT    /* endpoint descriptor for endpoint 1 */<br />    7,          /* sizeof&#40;usbDescrEndpoint&#41; */<br />    USBDESCR_ENDPOINT,  /* descriptor type = endpoint */<br />    0x81,       /* IN endpoint number 1 */<br />    0x03,       /* attrib: Interrupt endpoint */<br />    8, 0,       /* maximum packet size */<br />    USB_CFG_INTR_POLL_INTERVAL, /* in ms */<br />#endif<br />#if USB_CFG_IMPLEMENT_FN_WRITEOUT  /* endpoint descriptor for endpoint 1 out */<br />    7,          /* sizeof&#40;usbDescrEndpoint&#41; */<br />    USBDESCR_ENDPOINT,  /* descriptor type = endpoint */<br />    0x01,       /* Out endpoint number 1 */<br />    0x03,       /* attrib: Interrupt endpoint */<br />    8, 0,       /* maximum packet size */<br />    USB_CFG_INTR_POLL_INTERVAL+25 /* in ms */<br />#endif<br />&#125;;</code></pre></div><br /><br />When i place the endpoint descriptors as shown above,  I only get the interupt in 1 to work....When I swap them,  then only the interupt out 1 will work.<br /><br />Can anyone see a problem with the above discriptor?  The logic I have written must be ok because one or the other will work, but never both.<br /><br />Also,  I've been able to get a Hid report with both 16bit inputs and 16bit outputs.  All seems well there,  so you can ignor my other post.<br /><br />Update:<br /><div class="codebox"><p>Code: </p><pre><code>18 + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT + &#40;USB_CFG_DESCR_PROPS_HID &amp; 0xff&#41;, </code></pre></div><br /><br />It appears that I needed to update this sum of this value.  I just added the size of the extra endpoint to this line and it all works <img class="smilies" src="./../../../images/smilies/icon_smile.gif" alt=":)" title="Smile" /><br /><br /><div class="codebox"><p>Code: </p><pre><code>18 + 7 * USB_CFG_HAVE_INTRIN_ENDPOINT + 7 * USB_CFG_IMPLEMENT_FN_WRITEOUT + &#40;USB_CFG_DESCR_PROPS_HID &amp; 0xff&#41;</code></pre></div><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=544">Rukus</a> — Tue Dec 04, 2007 3:41 am</p><hr />
]]></content>
	</entry>
	</feed>
