Why USB must be so hard to use ?
Luigi Rizzo
rizzo at icir.org
Sun Sep 23 12:17:11 PDT 2007
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
> @@ -256,6 +260,15 @@
> 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
More information about the freebsd-current
mailing list