From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 5 02:11:25 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8359016A4CE for ; Mon, 5 Jul 2004 02:11:25 +0000 (GMT) Received: from mailsrv2.tranzpeer.net (mailsrv2.tranzpeer.net [202.180.66.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24FFD43D58 for ; Mon, 5 Jul 2004 02:11:25 +0000 (GMT) (envelope-from idownes@slingshot.co.nz) Received: from websrv1.tranzpeer.net ([202.180.66.211] helo=Debug) by mailsrv2.tranzpeer.net with smtp (Exim 4.12) id 1BhIx1-00015A-02 for freebsd-hackers@freebsd.org; Mon, 05 Jul 2004 14:11:23 +1200 To: freebsd-hackers@freebsd.org From: Date: Mon, 5 Jul 2004 02:08:38 GMT X-Posting-IP: 202.180.117.207 X-Mailer: Endymion MailMan Professional Edition v3.2.9 Message-Id: Subject: Re: where to get info to write basic usb driver for own device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 02:11:25 -0000 Hi, Thanks for the reply. I'm building my own device based around the DSP (see below). It's basically a data logger storing video frames. I simply need to connect to it to dump the buffer to a file and then process it from there. Just the one tranfer is needed at a time, speed and efficiency isn't any real concern. I have control over the DSP code (i.e. I'm writing it) so I will know any protocol of course :) It's not worth putting it into any class, I have no need to write to it etc. so I wouldn't make it umass. Looking at ugen and libusb I think I'll start with them. The advantage I guess with libusb is that it'll be portable. There's an example of using libusb at http://www.linuxjournal.com/article. php?sid=7466 for anyone else reading this (Avleen) Are there any FreeBSD specific resources around? Any code that I can read? thanks Ian > What kind of device do you had build? > A HID? > If your device is not with heaven traffic, you can consider to > develop your driver at user space with ugen(4) or uhid(4) at first. > And then, move it into kernel space when you need. > I had wrote a drive for a touch panel device. > Actually, it is a input device for XFree86. > I worked it with uhid(4), all my work was finished at user space. > It would be a good entry point. > > > idownes@slingshot.co.nz wrote: > > >Hi all, > >As part of my uni honours project I need to write a basic USB driver for a > >device I am building. I need to talk to a Texas Instruments DSP (C5509) > >which has on chip USB (2.0 compliant, full speed). TI supply a library > >for the DSP side of the USB but I need to write a basic program to > >retrieve data from it, nothing fancy at all. I have full control over the > >software on the DSP. > >There is a basic generic Windows driver I could use (theyscon.de) but I > >don't really want to do it under Windows - instead I'd much rather do it > >with FreeBSD. > > > >So what I guess what I am asking is how hard would this be? (I have a > >reasonable knowledge of C and Java and have been using FreeBSD for a > >couple of years but have never written a device driver (for any OS)) Do I > >actually need to write a driver or can I use something already existing? > >Where would I get information on how to do this? So far I've been looking > >at the existing drivers; ugen, ufm etc., the programmers handbook and am > >starting to look at libusb...? > >Sorry for the long message. Any pointers etc. would be greatly > >appreciated. > >Thanks > >Ian