#ifndef __HOST_H_
#define __HOST_H_

#include "io.h"

/* Initialize access from host.
   Return device if ok, NULL if error.  */
struct libwr2rf_dev *libwr2rf_host_init (int argc, char **argv);

/* Initialize access from host with VME slot.
   Returns NULL in case of failure (usually due to permission error).
   This function does *no* access to the board, so it may succeed even if
   the board is not present.
   NOTE: in RF crates, there is no geographical addresses so the DIP-switches
   must be programmed.  As there are 15 slots, the convention is to use
   address A23-A20 as the slot number.  So switches 1 to 4 must be set
   according to the slot number and switch 0 set to 0.
   As a consequence, the SLOT parameter must be twice the slot number.
   (So for a cord in RF slot 3, use 6 for the parameter).  */
struct libwr2rf_dev *libwr2rf_host_init_by_slot (unsigned int slot);
struct libwr2rf_dev *libwr2rf_host_init_by_slot_verbose (unsigned int slot,
                                                         int verbose);

#endif /* __HOST_H_ */
