/* * * ceddrv.c -- a driver for CED 1401 laboratory interface * * Copyright (C) 1995 Georg v. Zezschwitz * Copyright (C) 1995 Alessandro Rubini * * zezschwi@kogs26.informatik.uni-hamburg.de * rubini@ipvvis.unipv.it */ #if 0 /* only yo justify the comments above ;-) */ What's this? ------------ The CED 1401 is a laboratory interface providing 16 to 32 ADC-Chans, 4 DACs, 24 digital I/O lines and several event timers and clocks. It has its own processor and memory and is supported by several Macintosh and DOS programs. This code enables Linux 1.2 to read and write to an 1401 provided the right ISA-card is attached. Hopefully, no changes to the kernel are needed. This device driver is conceived as a module, and it should be compiled under the same kernel which will be used to run it. The ced device can then be used through the node /dev/ced0. The major device number is generated dynamically; thus the /dev node must be recreated after each module loading. This is no problem, since the module can only be loaded by root. Language interface ------------------ This package embeds a C library, to ease handling the acquisition board. The documentation *will_be* available in "info" and postscript format. Public symbols and definitions are prefixed in this way: Ced_ for functions, global variables (if any) and data types CED_ for preprocessor defines _ced_ for global variables within the library. Multiple devices ---------------- The module supports multiple devices (up to four of them). They can be accessed through the device nodes called /dev/ced0, /dev/ced1, /dev/ced2 and /dev/ced3. However, since each of us owns only one 1401 device, the feature is untested. Compiling and installing ------------------------ A simple "make" invocation will compile the module, the library and the test programs. A "make install" will install things in the proper places, i.e. /usr/local/bin, /usr/local/include and /usr/local/lib. The module is installed in /lib/modules/VERSION/misc, where VERSION is your current Linux version. If your kernel doesn't have it already, the symbol "mem_map" should be exported. Refer to the doc files. Loading the module ------------------ To load the module issue "ced_load"; the script is a simple wrapper around "insmod" which created the /dev nodes after loading the module. To unload the module issue "ced_unload"; the script is a simple wrapper around "rmmod" which removes the /dev nodes as well. The following variables can be set when loading the module: ced_base Can be used to select an I/O base address. Disables autodetection ced_major Select a device major number. Disables dynamic allocation ced_fake Allows a developer to load the module if the board is not there. For example "./ced_load ced_base=0x340 ced_fake=2". Remarks ------- We recommend using Linux 1.2.x. The driver is untested with previous kernels. Linux 1.2.x has to be modified slightly according to the documentation. Kernels since 1.3.7 should directly support it, but remember they are experimental :-) (Well, our stuff is momentary, too) Enjoy, but remember that the whole thing is under development. Georg v.Zezschwitz, zezschwi@kogs7.informatik.uni-hamburg.de Alessandro Rubini, rubini@ipvvis.unipv.it #endif /* Nice, isn't it? */