kopia lustrzana https://github.com/Hamlib/Hamlib
astyle icom.c icom.h
rodzic
8bab7d6e46
commit
84ae165145
1911
icom/icom.c
1911
icom/icom.c
Plik diff jest za duży
Load Diff
69
icom/icom.h
69
icom/icom.h
|
@ -75,7 +75,8 @@
|
|||
#define UNKNOWN_IC_STR_CAL { 2, {{ 0, -60}, { 255, 60}} }
|
||||
|
||||
|
||||
struct ts_sc_list {
|
||||
struct ts_sc_list
|
||||
{
|
||||
shortfreq_t ts; /* tuning step */
|
||||
unsigned char sc; /* sub command */
|
||||
};
|
||||
|
@ -83,7 +84,8 @@ struct ts_sc_list {
|
|||
/**
|
||||
* \brief Pipelined tuning state data structure.
|
||||
*/
|
||||
typedef struct rig_pltstate {
|
||||
typedef struct rig_pltstate
|
||||
{
|
||||
freq_t freq;
|
||||
freq_t next_freq;
|
||||
rmode_t mode;
|
||||
|
@ -95,12 +97,16 @@ typedef struct rig_pltstate {
|
|||
int usleep_time; /* dependent on radio module & serial data rate */
|
||||
} pltstate_t;
|
||||
|
||||
struct icom_agc_level {
|
||||
enum agc_level_e level; /* Hamlib AGC level from agc_level_e enum, the last entry should have level -1 */
|
||||
unsigned char icom_level; /* Icom AGC level for C_CTL_FUNC (0x16), S_FUNC_AGC (0x12) command */
|
||||
struct icom_agc_level
|
||||
{
|
||||
enum agc_level_e
|
||||
level; /* Hamlib AGC level from agc_level_e enum, the last entry should have level -1 */
|
||||
unsigned char
|
||||
icom_level; /* Icom AGC level for C_CTL_FUNC (0x16), S_FUNC_AGC (0x12) command */
|
||||
};
|
||||
|
||||
struct icom_priv_caps {
|
||||
struct icom_priv_caps
|
||||
{
|
||||
unsigned char re_civ_addr; /* the remote dlft equipment's CI-V address*/
|
||||
int civ_731_mode; /* Off: freqs on 10 digits, On: freqs on 8 digits */
|
||||
int no_xchg; /* Off: use VFO XCHG to set other VFO, On: use set VFO to set other VFO */
|
||||
|
@ -119,11 +125,13 @@ struct icom_priv_caps {
|
|||
int offs_len; /* Number of bytes in offset frequency field. 0 defaults to 3 */
|
||||
int serial_USB_echo_check; /* Flag to test USB echo state */
|
||||
int agc_levels_present; /* Flag to indicate that agc_levels array is populated */
|
||||
struct icom_agc_level agc_levels[RIG_AGC_LAST + 1]; /* Icom rig-specific AGC levels, the last entry should have level -1 */
|
||||
struct icom_agc_level agc_levels[RIG_AGC_LAST +
|
||||
1]; /* Icom rig-specific AGC levels, the last entry should have level -1 */
|
||||
};
|
||||
|
||||
|
||||
struct icom_priv_data {
|
||||
struct icom_priv_data
|
||||
{
|
||||
unsigned char re_civ_addr; /* the remote equipment's CI-V address*/
|
||||
int civ_731_mode; /* Off: freqs on 10 digits, On: freqs on 8 digits */
|
||||
int no_xchg; /* Off: use VFO XCHG to set other VFO, On: use set VFO to set other VFO */
|
||||
|
@ -151,7 +159,8 @@ extern const struct ts_sc_list ic910_ts_sc_list[];
|
|||
extern const struct ts_sc_list ic718_ts_sc_list[];
|
||||
extern const struct ts_sc_list x108g_ts_sc_list[];
|
||||
|
||||
extern const pbwidth_t rtty_fil[]; /* rtty filter passband width; available on 746pro and 756pro rigs */
|
||||
extern const pbwidth_t
|
||||
rtty_fil[]; /* rtty filter passband width; available on 746pro and 756pro rigs */
|
||||
|
||||
pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode);
|
||||
|
||||
|
@ -166,7 +175,8 @@ int icom_set_rit_new(RIG *rig, vfo_t vfo, shortfreq_t ts);
|
|||
int icom_set_xit_new(RIG *rig, vfo_t vfo, shortfreq_t ts);
|
||||
int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
|
||||
int icom_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
|
||||
int icom_get_mode_with_data(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width);
|
||||
int icom_get_mode_with_data(RIG *rig, vfo_t vfo, rmode_t *mode,
|
||||
pbwidth_t *width);
|
||||
int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width);
|
||||
int icom_get_vfo(RIG *rig, vfo_t *vfo);
|
||||
int icom_set_vfo(RIG *rig, vfo_t vfo);
|
||||
|
@ -176,10 +186,14 @@ int icom_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs);
|
|||
int icom_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs);
|
||||
int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq);
|
||||
int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq);
|
||||
int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width);
|
||||
int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width);
|
||||
int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq, rmode_t tx_mode, pbwidth_t tx_width);
|
||||
int icom_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq, rmode_t *tx_mode, pbwidth_t *tx_width);
|
||||
int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
|
||||
pbwidth_t tx_width);
|
||||
int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
|
||||
pbwidth_t *tx_width);
|
||||
int icom_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq,
|
||||
rmode_t tx_mode, pbwidth_t tx_width);
|
||||
int icom_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq,
|
||||
rmode_t *tx_mode, pbwidth_t *tx_width);
|
||||
int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo);
|
||||
int icom_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo);
|
||||
int icom_mem_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo);
|
||||
|
@ -213,22 +227,31 @@ int icom_get_powerstat(RIG *rig, powerstat_t *status);
|
|||
int icom_set_ant(RIG *rig, vfo_t vfo, ant_t ant);
|
||||
int icom_get_ant(RIG *rig, vfo_t vfo, ant_t *ant);
|
||||
int icom_decode_event(RIG *rig);
|
||||
int icom_power2mW(RIG * rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode);
|
||||
int icom_mW2power(RIG * rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode);
|
||||
int icom_power2mW(RIG *rig, unsigned int *mwpower, float power, freq_t freq,
|
||||
rmode_t mode);
|
||||
int icom_mW2power(RIG *rig, float *power, unsigned int mwpower, freq_t freq,
|
||||
rmode_t mode);
|
||||
int icom_send_morse(RIG *rig, vfo_t vfo, const char *msg);
|
||||
/* Exposed routines */
|
||||
int icom_get_split_vfos(const RIG *rig, vfo_t *rx_vfo, vfo_t *tx_vfo);
|
||||
int icom_set_raw(RIG *rig, int cmd, int subcmd, int subcmdbuflen, unsigned char *subcmdbuf, int val_bytes, int val);
|
||||
int icom_get_raw_buf(RIG *rig, int cmd, int subcmd, int subcmdbuflen, unsigned char *subcmdbuf, int *reslen, unsigned char *res);
|
||||
int icom_get_raw(RIG *rig, int cmd, int subcmd, int subcmdbuflen, unsigned char *subcmdbuf, int *val);
|
||||
int icom_set_raw(RIG *rig, int cmd, int subcmd, int subcmdbuflen,
|
||||
unsigned char *subcmdbuf, int val_bytes, int val);
|
||||
int icom_get_raw_buf(RIG *rig, int cmd, int subcmd, int subcmdbuflen,
|
||||
unsigned char *subcmdbuf, int *reslen, unsigned char *res);
|
||||
int icom_get_raw(RIG *rig, int cmd, int subcmd, int subcmdbuflen,
|
||||
unsigned char *subcmdbuf, int *val);
|
||||
int icom_set_level_raw(RIG *rig, setting_t level, int cmd, int subcmd,
|
||||
int subcmdbuflen, unsigned char *subcmdbuf, int val_bytes, value_t val);
|
||||
int icom_get_level_raw(RIG *rig, setting_t level, int cmd, int subcmd,
|
||||
int subcmdbuflen, unsigned char *subcmdbuf, value_t *val);
|
||||
int icom_set_custom_parm(RIG *rig, int parmbuflen, unsigned char *parmbuf, int val_bytes, int value);
|
||||
int icom_get_custom_parm(RIG *rig, int parmbuflen, unsigned char *parmbuf, int *value);
|
||||
int icom_set_custom_parm_time(RIG *rig, int parmbuflen, unsigned char *parmbuf, int seconds);
|
||||
int icom_get_custom_parm_time(RIG *rig, int parmbuflen, unsigned char *parmbuf, int *seconds);
|
||||
int icom_set_custom_parm(RIG *rig, int parmbuflen, unsigned char *parmbuf,
|
||||
int val_bytes, int value);
|
||||
int icom_get_custom_parm(RIG *rig, int parmbuflen, unsigned char *parmbuf,
|
||||
int *value);
|
||||
int icom_set_custom_parm_time(RIG *rig, int parmbuflen, unsigned char *parmbuf,
|
||||
int seconds);
|
||||
int icom_get_custom_parm_time(RIG *rig, int parmbuflen, unsigned char *parmbuf,
|
||||
int *seconds);
|
||||
|
||||
extern const struct confparams icom_cfg_params[];
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue