Re: [libopenstm32-devel] USB driver abstraction
Status: Inactive
Brought to you by:
uh1763
From: Uwe H. <uw...@he...> - 2011-01-30 21:09:36
|
Hi, On Sun, Jan 30, 2011 at 05:18:39PM +1300, Gareth McMullin wrote: > I'm planning on adding support for the OTG_FS hardware to the usb > stack soon, but this requires some restructuring to keep the interface > clean. > > I've put all the functions in usb_f103.c into a driver structure, and > a pointer to this structure is passed to usbd_init(). The idea is to > add another driver structure for each hardware implementation. > An application developer then only needs to change the driver pointer > when porting across hardware implementations. Yeah, I like this approach. > Please have a look at my repo on github and let me know what you > think of this approach: > git://github.com/gsmcmullin/libusbdev.git > > Any comments would be appreciated. If everybody likes this it can be > pulled into the main repo. I pulled it, looks good. Thanks a lot! This also pulled your OTG patch and the fixes from "Minor USB issue". How much does the stack depend on a STM32 controller? Would it be sufficient to supply another driver struct to it to support other Cortex-M3's easily? It would be awesome if we could reuse (most of) the code for other microcontrollers. Uwe. -- http://hermann-uwe.de | http://sigrok.org http://randomprojects.org | http://unmaintained-free-software.org |