Date: Sat, 28 Aug 2010 01:47:16 -0500 From: Jim Bryant <kc5vdj.freebsd@gmail.com> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: writing usb drivers under 8.x Message-ID: <4C78B0F4.4020002@gmail.com> In-Reply-To: <201008271053.27731.hselasky@c2i.net> References: <4C76AB76.4070806@gmail.com> <201008270856.43512.hselasky@c2i.net> <4C777D12.3040900@gmail.com> <201008271053.27731.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
thanks. am doing that now. I already have one patch for this one.... what kind of idiot defines a constant assignment for a 32k buffer as a 15 bit left shift of 1? clever, yes. but in production, stupid. a constant should be just that, a constant, and thus require no computation at runtime. i'm old school, and what a lot of kids don't understand today is that small and efficient is still as applicable today as it was then. *** ulpt.c~ Thu May 6 22:28:17 2010 --- ulpt.c Sat Aug 28 01:42:11 2010 *************** *** 87,93 **** &ulpt_debug, 0, "Debug level"); #endif ! #define ULPT_BSIZE (1<<15) /* bytes */ #define ULPT_IFQ_MAXLEN 2 /* units */ #define UR_GET_DEVICE_ID 0x00 --- 87,93 ---- &ulpt_debug, 0, "Debug level"); #endif ! #define ULPT_BSIZE 0x8000 /* bytes */ #define ULPT_IFQ_MAXLEN 2 /* units */ #define UR_GET_DEVICE_ID 0x00 Hans Petter Selasky wrote: > On Friday 27 August 2010 10:53:38 Jim Bryant wrote: > >> it'll be a pair of character devices. >> >> > > >> lirc compat is a goal of this project though. most of the work is done >> on that front, i just need to port that over from linux. the features >> of the imon remote control are well-supported in lirc. /dev/lirc will >> exist in my driver. >> > > See sys/dev/usb/input/ulpt.c driver for how to create cdevs. Don't use cdev > directly in the kernel. > > --HPS > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C78B0F4.4020002>