
                       Diamond Systems Corporation
                      Universal Driver Version 5.91

About This Package
------------------

This package contains the base driver software needed to develop for Diamond
Systems PC104 boards for RTLinuxPro version 2.1 and newer by FSMLabs.  See the
FSMLabs website at http://www.fsmlabs.com/ for more information about this
product.

The online manual for DSCUD is at http://docs.diamondsystems.com/dscud/
See the RT Linux section of this manual for more help with installation.


Installing Driver Files
-----------------------

The base driver software and board software are packaged as a simple gzip'd tar
archive.  To install the base driver software type the following command at the
root user prompt:

    $ tar zfx dscud-5.91.tar.gz
	$ mv dscud5 /usr/local/

Later if you wish to uninstall the package you can simply delete this 
directory.


Driver Components
-----------------

The driver contains two key components.

* The "dscud.h" header file must be included in any program which uses
  this driver.
* The "dscud5.rtl" RTLinuxPro module which must be loaded before any
other RTL modules that use the DSCUD API.


Selecting Your RTLinuxPro Version
---------------------------------

The user must select the "dscud5.rtl" which was built for their version
of RTLinuxPro.  There is a directory for each supported version. 


RTLinux Driver Overview
-----------------------

The driver for RTLinux is implemented as an RTL module called "dscud5.rtl".
After loading this module, you can load your own RTL modules which depend
on the DSCUD API.  

You must load the "rtl.o" RTLinux module before loading the "dscud5.rtl" module. 
You will get "unresolved symbol" errors if you don't do this since our module
depends on the symbols provided by the core RTLinux module.

The DSCUD API is only available in RTLinux kernel space, so if you must access
the DAQ from userspace you will have to implement your own methods such as a
real-time FIFO or shared memory.  See the examples provided with the RTLinux
kit or the RTLinux user manul for more information on this.

For more information see the online manual for DSCUD which is available at
http://docs.diamondsystems.com/dscud/.


Development Instructions
------------------------

See the "examples" directory for demo programs which show how to call DSCUD
functions from RTLinux.  This directory includes a Makefile which compiles
these example programs.

Driver demo programs are also available on the Diamond Systems website
for each board, but because of the unique pthread based API used by RTLinux
these demos won't work as is on RTLinux.  However, you can still use them
as a reference when writing your own software.

	http://www.diamondsystems.com/support/software

RTLinux Driver Notes
--------------------

Here are some very important notes to keep in mind when using this driver.

* The Diamond Systems Zircon-MM DAQ board interrupt driven features are not
supported on RTLinux.

* You must always call dscFreeBoard() before exiting your program.  Failure
to do this will "leak" driver resources and ultimately disable the driver.  Any
DSCB board handle allocated by dscInitBoard() must always be freed by calling
dscFreeBoard().

* The board specific driver functions are not thread safe.  If you have
multiple threads or programs interacting with the same board at the same time
using DSCUD you must implement your own sychronization methods.

* There is only a single instance of the driver running at a time.  All user
programs calling the functions provided by DSCUD are sharing the same memory
space inside the driver.  The driver uses a mutex to make dscInit(), dscFree(),
dscInitBoard() and dscFreeBoard() safe across threads and programs.  

*  User interrupt functions are called directly from the interrupt service
routine and run in a hard real-time interrupt context.



Getting Additional Help
-----------------------

Please review the online documentation for the driver, especially
the RTLinux installation section, before contacting support, as many
of the most frequently asked questions are answered there.

The Diamond Systems website at http://www.diamondsystems.com/

Call toll-free 800-367-2104.

Outside North America call 510-456-7800.

