kopia lustrzana https://github.com/Hamlib/Hamlib
rodzic
d425c8af70
commit
7a9e909b61
|
@ -619,6 +619,7 @@
|
|||
#define RIG_BARRETT 32
|
||||
#define RIG_BACKEND_BARRETT "barrett"
|
||||
#define RIG_MODEL_BARRETT_2050 RIG_MAKE_MODEL(RIG_BARRETT, 1)
|
||||
#define RIG_MODEL_BARRETT_950 RIG_MAKE_MODEL(RIG_BARRETT, 2)
|
||||
|
||||
/*
|
||||
* Elad
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
BARRETTSRC = barrett.c barrett.h
|
||||
BARRETTSRC = barrett.c barrett.h 950.c
|
||||
|
||||
noinst_LTLIBRARIES = libhamlib-barrett.la
|
||||
libhamlib_barrett_la_SOURCES = $(BARRETTSRC)
|
||||
|
|
|
@ -46,21 +46,21 @@
|
|||
#define BARRETT_LEVELS (RIG_LEVEL_STRENGTH)
|
||||
|
||||
|
||||
static int barrett_init(RIG *rig);
|
||||
static int barrett_cleanup(RIG *rig);
|
||||
int barrett_init(RIG *rig);
|
||||
int barrett_cleanup(RIG *rig);
|
||||
static int barrett_set_freq(RIG *rig, vfo_t vfo, freq_t freq);
|
||||
static int barrett_get_freq(RIG *rig, vfo_t vfo, freq_t *freq);
|
||||
static int barrett_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt);
|
||||
int barrett_get_freq(RIG *rig, vfo_t vfo, freq_t *freq);
|
||||
int barrett_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt);
|
||||
static int barrett_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt);
|
||||
static int barrett_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
|
||||
static int barrett_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode,
|
||||
int barrett_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
|
||||
int barrett_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode,
|
||||
pbwidth_t *width);
|
||||
|
||||
static int barrett_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq);
|
||||
static int barrett_set_split_vfo(RIG *rig, vfo_t rxvfo, split_t split,
|
||||
int barrett_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq);
|
||||
int barrett_set_split_vfo(RIG *rig, vfo_t rxvfo, split_t split,
|
||||
vfo_t txvfo);
|
||||
|
||||
static int barrett_get_split_vfo(RIG *rig, vfo_t rxvfo, split_t *split,
|
||||
int barrett_get_split_vfo(RIG *rig, vfo_t rxvfo, split_t *split,
|
||||
vfo_t *txvfo);
|
||||
|
||||
static int barrett_get_level(RIG *rig, vfo_t vfo, setting_t level,
|
||||
|
@ -211,6 +211,7 @@ DECLARE_INITRIG_BACKEND(barrett)
|
|||
rig_debug(RIG_DEBUG_VERBOSE, "%s: _init called\n", __func__);
|
||||
|
||||
rig_register(&barrett_caps);
|
||||
rig_register(&barrett950_caps);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: _init back from rig_register\n", __func__);
|
||||
|
||||
return RIG_OK;
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#define BARRETT_DATA_LEN 64
|
||||
|
||||
extern const struct rig_caps barrett_caps;
|
||||
extern const struct rig_caps barrett950_caps;
|
||||
|
||||
struct barrett_priv_data {
|
||||
char cmd_str[BARRETT_DATA_LEN]; /* command string buffer */
|
||||
|
@ -46,4 +47,23 @@ struct barrett_priv_data {
|
|||
char split; /* split on/off */
|
||||
};
|
||||
|
||||
extern int barrett_transaction(RIG *rig, char *cmd, int expected, char **result);
|
||||
|
||||
extern int barrett_init(RIG *rig);
|
||||
extern int barrett_cleanup(RIG *rig);
|
||||
extern int barrett_get_freq(RIG *rig, vfo_t vfo, freq_t *freq);
|
||||
extern int barrett_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
|
||||
extern int barrett_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode,
|
||||
pbwidth_t *width);
|
||||
extern int barrett_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt);
|
||||
extern int barrett_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq);
|
||||
extern int barrett_set_split_vfo(RIG *rig, vfo_t rxvfo, split_t split,
|
||||
vfo_t txvfo);
|
||||
|
||||
extern int barrett_get_split_vfo(RIG *rig, vfo_t rxvfo, split_t *split,
|
||||
vfo_t *txvfo);
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* _BARRETT_H */
|
||||
|
|
|
@ -83,6 +83,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
printf("Port %s opened ok\n", SERIAL_PORT);
|
||||
|
||||
printf("Offset of vfo_list=%p\n", &my_rig->state.vfo_list);
|
||||
/*
|
||||
* Below are examples of set/get routines.
|
||||
* Must add checking of functionality map prior to command execution -- FS
|
||||
|
|
Ładowanie…
Reference in New Issue