public inbox for ecos-bugs@sourceware.org
help / color / mirror / Atom feed
From: bugzilla-daemon@bugs.ecos.sourceware.org
To: unassigned@bugs.ecos.sourceware.org
Subject: [Bug 1001024] STM32 USB driver and proposed USB API change
Date: Thu, 26 Aug 2010 09:14:00 -0000	[thread overview]
Message-ID: <20100826091353.2D0162F78008@mail.ecoscentric.com> (raw)
In-Reply-To: <bug-1001024-777@http.bugs.ecos.sourceware.org/>

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001024

John Dallaway <john@dallaway.org.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ecos-patches@ecos.sourcewar
                   |                            |e.org, john@dallaway.org.uk
          Component|USB driver                  |Patches and contributions

--- Comment #1 from John Dallaway <john@dallaway.org.uk> 2010-08-26 10:13:50 BST ---
(In reply to comment #0)

Chris, thank you for the contribution. In the absence of a complete
implementation, can you clarify how you envisage the new endpoint retrieval
scheme to work please?

At present, the Rx and Tx endpoint structures to be used by a function device
package are specified using CDL options in the function device package (eg
CYGDAT_IO_USB_SLAVE_SERIAL_EP0). The relationship between endpoints and
function devices is fixed at build time.

> 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:

Is specifying the endpoint structures at build time simply not possible? Or are
you proposing the new scheme to allow greater flexibility with more modern
hardware? What additional flexibility is achieved?

> // 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.

Can you explain what you mean by "multiple configurations" here?

> 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.

If we provide the following functions in the generic USB slave API:

  usbs_rx_endpoint* cyg_usbs_rx_endpoint (cyg_uint32 ep_id);
  usbs_rx_endpoint* cyg_usbs_tx_endpoint (cyg_uint32 ep_id);

how do you propose that the implementation of these functions looks up the
endpoint structure? Another parameter to specify the hardware device driver
lookup function?

How would the user of the USB function driver continue to specify the endpoints
using CDL options?

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


  reply	other threads:[~2010-08-26  9:14 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-25 20:36 [Bug 1001024] New: " bugzilla-daemon
2010-08-26  9:14 ` bugzilla-daemon [this message]
2010-08-26 11:00 ` [Bug 1001024] " bugzilla-daemon
2010-09-03 14:00 ` bugzilla-daemon
2010-09-13 19:31 ` bugzilla-daemon
2010-09-13 19:32 ` bugzilla-daemon
2010-09-13 19:51 ` bugzilla-daemon
2010-09-17 13:11 ` bugzilla-daemon
2010-09-17 18:03 ` bugzilla-daemon
2010-10-07 10:13 ` bugzilla-daemon
2010-10-07 19:23 ` bugzilla-daemon
2010-10-09 14:38 ` bugzilla-daemon
2010-10-15 13:51 ` bugzilla-daemon
2010-08-25 20:36 [Bug 1001024] New: " bugzilla-daemon
2010-08-26  9:14 ` [Bug 1001024] " bugzilla-daemon
2010-08-26 11:00 ` bugzilla-daemon
2010-09-03 14:00 ` bugzilla-daemon
2010-09-13 19:31 ` bugzilla-daemon
2010-09-13 19:32 ` bugzilla-daemon
2010-09-13 19:51 ` bugzilla-daemon
2010-09-17 13:11 ` bugzilla-daemon
2010-09-17 18:03 ` bugzilla-daemon
2010-10-07 10:13 ` bugzilla-daemon
2010-10-07 19:23 ` bugzilla-daemon
2010-10-09 14:38 ` bugzilla-daemon
2010-10-15 13:51 ` bugzilla-daemon
2010-10-15 16:13 ` bugzilla-daemon
2010-10-15 17:07 ` bugzilla-daemon
2010-10-15 20:52 ` bugzilla-daemon
2010-10-16  7:41 ` bugzilla-daemon
2010-10-16 10:12 ` bugzilla-daemon
2010-10-16 10:55 ` bugzilla-daemon
2010-10-16 12:18 ` bugzilla-daemon
2010-10-16 13:53 ` bugzilla-daemon
2010-10-16 14:34 ` bugzilla-daemon
2010-10-16 19:30 ` bugzilla-daemon
2010-10-17 14:21 ` bugzilla-daemon
2010-10-17 15:06 ` bugzilla-daemon
2010-10-17 15:29 ` bugzilla-daemon
2010-10-17 18:08 ` bugzilla-daemon
2010-10-17 18:34 ` bugzilla-daemon
2010-10-18  9:36 ` bugzilla-daemon
2010-10-20 18:27 ` bugzilla-daemon
2010-10-21  8:57 ` bugzilla-daemon
2010-10-21 15:40 ` bugzilla-daemon
2010-10-21 18:32 ` bugzilla-daemon
2010-10-21 18:47 ` bugzilla-daemon
2010-10-21 21:20 ` bugzilla-daemon
2010-10-25  8:48 ` bugzilla-daemon
2010-10-26 10:50 ` bugzilla-daemon
2010-10-26 19:15 ` bugzilla-daemon
2010-10-27 10:25 ` bugzilla-daemon
2010-10-27 13:04 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100826091353.2D0162F78008@mail.ecoscentric.com \
    --to=bugzilla-daemon@bugs.ecos.sourceware.org \
    --cc=unassigned@bugs.ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).