From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 12 07:00:50 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13D7637B401 for ; Thu, 12 Jun 2003 07:00:50 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3854843FBF for ; Thu, 12 Jun 2003 07:00:48 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) by srv1.cosmo-project.de (8.12.9/8.12.9) with ESMTP id h5CE0hHq099244 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Thu, 12 Jun 2003 16:00:45 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.9/8.12.9) with ESMTP id h5CE0fIf073886 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 12 Jun 2003 16:00:42 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.9/8.12.9) with ESMTP id h5CE0f9F038374; Thu, 12 Jun 2003 16:00:41 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.9/8.12.9/Submit) id h5CE0eCP038373; Thu, 12 Jun 2003 16:00:40 +0200 (CEST) Date: Thu, 12 Jun 2003 16:00:40 +0200 From: Bernd Walter To: Andrew Message-ID: <20030612140040.GI26807@cicely12.cicely.de> References: <20030612134327.GH26807@cicely12.cicely.de> <20030612234638.R82617-100000@starbug.ugh.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030612234638.R82617-100000@starbug.ugh.net.au> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-RELEASE alpha User-Agent: Mutt/1.5.4i cc: freebsd-hackers@freebsd.org cc: ticso@cicely.de Subject: Re: ugen example X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2003 14:00:50 -0000 On Thu, Jun 12, 2003 at 11:47:55PM +1000, Andrew wrote: > > > On Thu, 12 Jun 2003, Bernd Walter wrote: > > > Not all endpoints have to be available in the current configuration. > > If you show me the output for your device I can tell you what is > > available under which condition. > > Thanks, output below. > > Andrew > > -- > > DEVICE addr 2 > DEVICE descriptor: > bLength=18 bDescriptorType=device(1) bcdUSB=1.00 bDeviceClass=255 > bDeviceSubClass=255 > bDeviceProtocol=255 bMaxPacketSize=64 idVendor=0x0743 idProduct=0x0002 > bcdDevice=1 > iManufacturer=0() iProduct=0() iSerialNumber=0() bNumConfigurations=1 > > CONFIGURATION descriptor 0: > bLength=9 bDescriptorType=config(2) wTotalLength=218 bNumInterface=1 > bConfigurationValue=1 iConfiguration=0() bmAttributes=80 bMaxPower=100 mA > > INTERFACE descriptor 0: > bLength=9 bDescriptorType=interface(4) bInterfaceNumber=0 > bAlternateSetting=0 > bNumEndpoints=0 bInterfaceClass=255 bInterfaceSubClass=255 > bInterfaceProtocol=255 iInterface=0() This is interface 0, which is used by default. It has no endpoints of it's own. Beside endpoint 0 which is always available. > INTERFACE descriptor 1: > bLength=9 bDescriptorType=interface(4) bInterfaceNumber=0 > bAlternateSetting=1 > bNumEndpoints=13 bInterfaceClass=255 bInterfaceSubClass=255 > bInterfaceProtocol=255 iInterface=0() > > ENDPOINT descriptor: > bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=1-in > bmAttributes=interrupt wMaxPacketSize=16 bInterval=10 This one and the following endpoints are for interface 1. This is an alternate Interface, which means, that you can either use this or another interface - therefor ugen doesn't offer you the endpoint of interface 1 - it's not active. You have to select this interface with USB_SET_ALTINTERFACE. > INTERFACE descriptor 2: > bLength=9 bDescriptorType=interface(4) bInterfaceNumber=0 > bAlternateSetting=2 > bNumEndpoints=13 bInterfaceClass=255 bInterfaceSubClass=255 > bInterfaceProtocol=255 iInterface=0() The same for Interface 2 and his endpoints. It's an alternate interface. Which one you want to use depends on your application and device. You may want to read the device documentation to select the interface which offers you the features that your application needs. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de