libsurf is a C function library written to facilitate programmer interaction with the SURF board. The library provides two conveniences. The intricacies of dealing with the hardware on the board are abstracted, allowing the programmer to think in natural units (volts, ampères and degrees) and natural operations (setting supply voltages etc). The intricacies of the serial bus are also abstracted, allowing the programmer to address modules by their names rather than by USB device and channel number.
Most libsurf functions exist in two forms: board-based and module-based.
The board-based functions take a board serial number and channel number
as arguments, while the module-based functions take a module serial
number as their argument. The bottom-most layer of libsurf keeps
track of the location of each board on the bus; unplugging and
replugging of boards is transparent. (This doesn't work on windows
yet.) Because each SURF board knows its unique serial number, the
board-based functions do not need any configuration files; the
module-based functions, however, require a map that says which module is
plugged into which channel on which SURF board.
Please read the man page for surf_load_mod_tbl
below
(Sec. 4.1.10).