From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10535 invoked by alias); 7 Feb 2006 00:02:46 -0000 Received: (qmail 10526 invoked by uid 22791); 7 Feb 2006 00:02:45 -0000 X-Spam-Status: No, hits=0.5 required=5.0 tests=AWL,BAYES_50 X-Spam-Check-By: sourceware.org Received: from otoro.itis.ethz.ch (HELO otoro.itis.ethz.ch) (129.132.24.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 07 Feb 2006 00:02:43 +0000 Received: from localhost (localhost [127.0.0.1]) by otoro.itis.ethz.ch (Postfix) with ESMTP id 27F285B381 for ; Tue, 7 Feb 2006 01:02:38 +0100 (MET) Received: from otoro.itis.ethz.ch ([127.0.0.1]) by localhost (otoro [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29104-12 for ; Tue, 7 Feb 2006 01:02:38 +0100 (MET) Received: from cadpad (adsl-99-97-zh1.datacomm.ch [212.254.99.97]) by otoro.itis.ethz.ch (Postfix) with SMTP id 72F165B380 for ; Tue, 7 Feb 2006 01:02:37 +0100 (MET) Message-ID: <049901c62b7a$08013860$1f01a8c0@haus.hellmutstrasse.ch> Reply-To: "oliver munz @ s p e a g" From: "oliver munz @ s p e a g" To: Subject: Changing the USB-driver datas... Using an array: usb_working_endpoint ep[ENDPOINTS-1] Date: Tue, 07 Feb 2006 00:02:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Antivirus: avast! (VPS 0606-1, 06.02.2006), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: by amavisd-new at itis.ethz.ch Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2006-02/txt/msg00003.txt.bz2 I think the eCos-USB-slave endpoint data structures should be changed. The USB-slave-package should define one struct for all endpoint types whitout the control-endpoint. The device-driver should define an array of all working endpoint-structs ep1..n. All enndpoint-functions should get an index variable, so that they can address the right struct from the array. The device-driver and the USBS-interface should define a function to control the type and state of an working endpoint. I don't see any reason in using blabla_ep1(&ep1) and so on, instead of something like blabla_ep(ep_array, 1); Are there other ideas how to improve the USBS and USB-driver APIs? Thanks Oliver Munz