MuSTARD User Routines
The following describes the routines in the MuSTARD user library (mus_user.c).
They are intended to provide higher level functionality that users might find
useful but were not appropriate for the basic library. All the routines return
an int status, which is zero for a non-error return.
The routines are listed in the order that they appear in the code.
- mus_enables(short identifier, short *val)
Set the enable flags for all streams. val is a pointer to an array
of at least 12 elements. Basically calls mus_set_stream_enable for
each stream, then reads the enable flags (several times) to check that they
are correct. This is a relic of early problems with the enable registers.
If any call to set or read the registers returns a non-zero value, this
is passed as a return from this routine.
- mus_delays(short identifier, short *var)
Sets the stream enable registers. var is a pointer to an array of
at least 12 elements, which are used to set the delay registers via calls
to mus_set_stream_delay. A non-zero return from these calls will be
passed back from this routine.
- mus_init(short identifier
Initialise the MuSTARD. The various registers of the MuSTARD are set to
reasonable values. These values are set up in global variables at the start
of mus_user.c, and are believed to be sensible default values. If the user
wished to change the defaults for their own setup, they could simply edit
these values and recompile mus_user.c. However, it is probably better to
call specific routines to do this, to avoid confusion as to settings used.
If any of the routines called internally returns an error, this code is
returned to the caller.
- mus_print_inits(short identifier)
Print the current default settings. This routine reports the contents of
the global variables - it does not talk to the MuSTARD at all. Could be useful
if the defaults have been changed and you want to be sure what they are.
- mus_print_status(short st)
Decode the argument st assuming it is the MuSTARD status register and
report the results in mnemonic form.
- pr16bits(unsigned short v)
Prints the input argument in binary form. This is a general purpose routine
which probably ought to be in a utility library.
John Hill
Last update 10 September 1999