From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5206 invoked by alias); 25 Aug 2010 20:36:51 -0000 Received: (qmail 5190 invoked by uid 22791); 25 Aug 2010 20:36:51 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_20,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Aug 2010 20:36:45 +0000 Received: by mail.ecoscentric.com (Postfix, from userid 48) id 7A7482F78003; Wed, 25 Aug 2010 21:36:43 +0100 (BST) From: bugzilla-daemon@bugs.ecos.sourceware.org To: unassigned@bugs.ecos.sourceware.org Subject: [Bug 1001024] New: STM32 USB driver and proposed USB API change X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: USB driver X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: chris@zynaptic.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Wed, 25 Aug 2010 20:36:00 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org X-SW-Source: 2010/txt/msg00026.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001024 Summary: STM32 USB driver and proposed USB API change Product: eCos Version: 3.0 Platform: stm32e_eval (ST STM3210E EVAL board) OS/Version: Cortex-M Status: UNCONFIRMED Severity: enhancement Priority: low Component: USB driver AssignedTo: unassigned@bugs.ecos.sourceware.org ReportedBy: chris@zynaptic.com CC: ecos-bugs@ecos.sourceware.org Class: Advice Request Created an attachment (id=963) --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=963) STM32 USB slave driver package Attached is the STM32 USB driver which has been developed and tested against the 3.0 release. It has had extensive testing with a proprietary USB class driver, but there are issues with using it in conjunction with the standard eCos class drivers which could best be fixed by an enhancement to the USB slave API. Instead of using static endpoint references as per existing USB slave drivers, STM32 USB endpoints may only be accessed after USB device configuration via the two following 'getter' functions: // Get a handle on the specified transmit (in) endpoint. Calling this function // with a given logical endpoint ID will return the transmit endpoint data // structure associated with that endpoint ID. extern usbs_tx_endpoint* cyg_usbs_cortexm_stm32_tx_endpoint (cyg_uint32 ep_id); // Get a handle on the specified receive (out) endpoint. Calling this function // with a given logical endpoint ID will return the receive endpoint data // structure associated with that endpoint ID. extern usbs_rx_endpoint* cyg_usbs_cortexm_stm32_rx_endpoint (cyg_uint32 ep_id); This approach allows the STM32 USB driver to support multiple USB configurations if required. However, the existing standard eCos class drivers assume the use of static endpoint definitions which will require changes to work against this driver. IMHO, the best way to resolve this would be to introduce a new pair of functions to the standard USB slave API, which are generic variants of the ones given above for the STM32. This would be easy to add to existing drivers and would provide a consistent way of accessing old-style fixed endpoint USB hardware and more modern configurable USB hardware. In addition they will hide the native types of the endpoint data structures which currently 'leak' from hardware specific slave drivers into class driver implementations. -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.