Date: Thu, 13 Aug 1998 09:05:06 +0100 From: Karl Pielorz <kpielorz@tdx.co.uk> To: hackers@FreeBSD.ORG Subject: Device / Driver presentation advice needed... Message-ID: <35D29E32.81A62F7D@tdx.co.uk>
next in thread | raw e-mail | index | archive | help
Hi All, I'm now getting on quite well with the device driver I'm writing, but I'm stuck as to how best it is to present the 'device' to the outside world... If I reserve 3 bits of the minor number to indicate the actual card in the system, I can then use the remaining 5 bits to give different 'presentations' of the device (Is this good practice?) The device in question has 8 x 16 bit input registers. I can either let the application software select these via ioctl(), or I can use the minor bits to map out say, /dev/daqb0a /dev/daqb0b ... (With 1 /dev/daqb device for each channel). Latency when switching between channels is fairly high (though exactly how high I haven't measured yet - when you switch channels you have to wait for the hardware to become ready again) Which is the preferred method? - by using the minor bits to map out multiple devices (one per channel) or by making the application issue ioctl()'s to control it? - Or is it just a design decision? <G> Regards, Karl Pielorz To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35D29E32.81A62F7D>