Re: Why USB must be so hard to use ?

From: Luigi Rizzo <rizzo_at_icir.org>
Date: Sun, 23 Sep 2007 12:15:36 -0700
On Sat, Sep 22, 2007 at 11:35:58AM +0200, Bernd Walter wrote:
...
> Since it's using an Atmel ARM.
> I had to create the following umodem patch to get a pseudo serial
> port for accessing the sam-ba CDC for flashing the controller:
> Index: umodem.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/dev/usb/umodem.c,v
> retrieving revision 1.57
> diff -u -r1.57 umodem.c
> --- umodem.c	31 Jan 2005 13:58:10 -0000	1.57
> +++ umodem.c	20 Aug 2006 17:05:34 -0000
> _at__at_ -256,6 +260,15 _at__at_
>  	    id->bInterfaceProtocol == UIPROTO_CDC_AT)
>  		ret = UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO;
>  
> +#if 1
> +	if (ret == UMATCH_NONE &&
> +	    id->bInterfaceClass == UICLASS_CDC_DATA &&
> +	    id->bInterfaceSubClass == UISUBCLASS_DATA &&
> +	    id->bInterfaceProtocol == 0x00)
> +		ret = UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO;
> +		return ret;
> +#endif

yes, this is similar to what i did except that i only returned
UMATCH_IFACECLASS if the two other fields don't match.

...
> We should really have a generic CDC tty driver, since it is used
> very often for simple USB projects.

i totally agree.

cheers
luigi
Received on Sun Sep 23 2007 - 17:17:11 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:18 UTC