2000-09-16 01:43:48 +00:00
/*
2001-07-13 19:08:15 +00:00
* Hamlib CI - V backend - main header
2016-11-06 13:38:42 +00:00
* Copyright ( c ) 2000 - 2016 by Stephane Fillod
2000-09-16 01:43:48 +00:00
*
*
2011-08-21 01:45:47 +00:00
* This library is free software ; you can redistribute it and / or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option ) any later version .
*
* This library is distributed in the hope that it will be useful ,
2001-07-13 19:08:15 +00:00
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
2011-08-21 01:45:47 +00:00
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
* Lesser General Public License for more details .
2000-09-16 01:43:48 +00:00
*
2011-08-21 01:45:47 +00:00
* You should have received a copy of the GNU Lesser General Public
2001-07-13 19:08:15 +00:00
* License along with this library ; if not , write to the Free Software
2011-08-21 01:45:47 +00:00
* Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA
2000-09-16 01:43:48 +00:00
*
*/
# ifndef _ICOM_H
# define _ICOM_H 1
2010-04-14 20:00:59 +00:00
# include "hamlib/rig.h"
# include "cal.h"
# include "tones.h"
2000-12-05 22:01:03 +00:00
2004-08-16 20:57:37 +00:00
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# endif
2022-03-26 14:18:52 +00:00
# define BACKEND_VER "20220326"
2021-05-26 20:40:53 +00:00
# define ICOM_IS_SECONDARY_VFO(vfo) ((vfo) & (RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B))
# define ICOM_GET_VFO_NUMBER(vfo) (ICOM_IS_SECONDARY_VFO(vfo) ? 0x01 : 0x00)
# define ICOM_MAX_SPECTRUM_FREQ_RANGES 20
2004-09-25 14:33:17 +00:00
2001-01-28 22:06:11 +00:00
/*
2002-02-28 10:59:46 +00:00
* defines used by comp_cal_str in rig . c
2006-11-07 12:21:39 +00:00
* STR_CAL_LENGTH is the length of the S Meter calibration table
2001-01-28 22:06:11 +00:00
* STR_CAL_S0 is the value in dB of the lowest value ( not even in table )
2006-09-22 19:55:59 +00:00
* MULTIB_SUBCMD allows the dsp rigs ie pro models to use multibyte subcommands for all the extra
* parameters and levels .
2001-01-28 22:06:11 +00:00
*/
# define STR_CAL_LENGTH 16
# define STR_CAL_S0 -54
2006-09-22 19:55:59 +00:00
# define MULTIB_SUBCMD
2000-09-16 01:43:48 +00:00
2002-12-26 14:32:03 +00:00
/*
* minimal channel caps .
* If your rig has better / lesser , don ' t modify this define but clone it ,
* so you don ' t change other rigs .
*/
2019-10-30 03:29:06 +00:00
# define IC_MIN_MEM_CAP { \
. freq = 1 , \
. mode = 1 , \
. width = 1 , \
2011-08-21 01:45:47 +00:00
}
2002-12-26 14:32:03 +00:00
2002-11-04 22:26:49 +00:00
/*
* common channel caps .
* If your rig has better / lesser , don ' t modify this define but clone it ,
* so you don ' t change other rigs .
*/
2019-10-30 03:29:06 +00:00
# define IC_MEM_CAP { \
. freq = 1 , \
. mode = 1 , \
. width = 1 , \
. tx_freq = 1 , \
. tx_mode = 1 , \
. tx_width = 1 , \
. rptr_offs = 1 , \
2011-08-21 01:45:47 +00:00
}
2002-11-04 22:26:49 +00:00
2004-09-26 08:35:05 +00:00
/*
* S - Meter data for uncalibrated rigs
*/
# define UNKNOWN_IC_STR_CAL { 2, {{ 0, -60}, { 255, 60}} }
2019-10-30 03:29:06 +00:00
struct ts_sc_list
{
shortfreq_t ts ; /* tuning step */
unsigned char sc ; /* sub command */
2000-10-10 21:58:31 +00:00
} ;
2003-08-17 22:39:07 +00:00
/**
* \ brief Pipelined tuning state data structure .
*/
2019-10-30 03:29:06 +00:00
typedef struct rig_pltstate
{
freq_t freq ;
freq_t next_freq ;
rmode_t mode ;
rmode_t next_mode ;
pbwidth_t width ;
pbwidth_t next_width ;
struct timeval timer_start ;
struct timeval timer_current ;
int usleep_time ; /* dependent on radio module & serial data rate */
2003-08-17 22:39:07 +00:00
} pltstate_t ;
2021-05-26 20:40:53 +00:00
/**
* \ brief Mappings between Hamlib and Icom AGC levels
*/
2019-10-30 03:29:06 +00:00
struct icom_agc_level
{
enum agc_level_e
2021-05-26 20:40:53 +00:00
level ; /*!< Hamlib AGC level from agc_level_e enum, the last entry should have level -1 */
2019-10-30 03:29:06 +00:00
unsigned char
2021-05-26 20:40:53 +00:00
icom_level ; /*!< Icom AGC level for C_CTL_FUNC (0x16), S_FUNC_AGC (0x12) command */
2019-06-01 06:51:17 +00:00
} ;
2020-09-12 16:21:33 +00:00
typedef enum
{
CMD_PARAM_TYPE_NONE ,
CMD_PARAM_TYPE_LEVEL ,
CMD_PARAM_TYPE_PARM ,
CMD_PARAM_TYPE_TOKEN ,
CMD_PARAM_TYPE_FUNC ,
} cmd_param_t ;
2021-05-26 20:40:53 +00:00
/**
* \ brief Lookup table item for Icom levels & parms
*/
struct cmdparams
2020-10-16 22:26:02 +00:00
{
union
{
2021-05-26 20:40:53 +00:00
setting_t s ; /*!< Level or parm */
token_t t ; /*!< TOKEN_BACKEND */
2020-01-08 12:15:31 +00:00
} id ;
2021-05-26 20:40:53 +00:00
cmd_param_t cmdparamtype ; /*!< CMD_PARAM_TYPE_LEVEL or CMD_PARAM_TYPE_PARM */
int command ; /*!< CI-V command */
int subcmd ; /*!< CI-V Subcommand */
int submod ; /*!< Subcommand modifier */
int sublen ; /*!< Number of bytes for subcommand extension */
unsigned char subext [ 4 ] ; /*!< Subcommand extension bytes */
int dattyp ; /*!< Data type conversion */
int datlen ; /*!< Number of data bytes in frame */
} ;
/**
* \ brief Icom - specific spectrum scope capabilities , if supported by the rig .
*/
struct icom_spectrum_scope_caps
{
int spectrum_line_length ; /*!< Number of bytes in a complete spectrum scope line */
int single_frame_data_length ; /*!< Number of bytes of specrtum data in a single CI-V frame when the data split to multiple frames */
int data_level_min ; /*!< */
int data_level_max ;
double signal_strength_min ;
double signal_strength_max ;
} ;
/**
* \ brief Icom spectrum scope edge frequencies , if supported by the rig .
*
* Last entry should have zeros in all fields .
*/
struct icom_spectrum_edge_frequency_range
{
int range_id ; /*!< ID of the range, as specified in the Icom CI-V manuals. First range ID is 1. */
freq_t low_freq ; /*!< The low edge frequency if the range in Hz */
freq_t high_freq ; /*!< The high edge frequency if the range in Hz */
} ;
/**
* \ brief Cached Icom spectrum scope data .
*
* This data is used to store data for current line of spectrum data as it is being received from the rig .
* Caching the data is necessary for handling spectrum scope data split in multiple CI - V frames .
*/
struct icom_spectrum_scope_cache
{
int id ; /*!< Numeric ID of the spectrum scope data stream identifying the VFO/receiver. First ID is zero. Icom rigs with multiple scopes have IDs: 0 = Main, 1 = Sub. */
int spectrum_metadata_valid ; /*!< Boolean value to track validity of the cached data for spectrum scope. */
enum rig_spectrum_mode_e spectrum_mode ; /*!< The spectrum mode of the current spectrum scope line being received. */
freq_t spectrum_center_freq ; /*!< The center frequency of the current spectrum scope line being received */
freq_t spectrum_span_freq ; /*!< The frequency span of the current spectrum scope line being received */
freq_t spectrum_low_edge_freq ; /*!< The low edge frequency of the current spectrum scope line being received */
freq_t spectrum_high_edge_freq ; /*!< The high edge frequency of the current spectrum scope line being received */
2021-11-28 18:52:29 +00:00
size_t spectrum_data_length ; /*!< Number of bytes of 8-bit spectrum data in the data buffer. The amount of data may vary if the rig has multiple spectrum scopes, depending on the scope. */
2021-05-26 20:40:53 +00:00
unsigned char * spectrum_data ; /*!< Dynamically allocated buffer for raw spectrum data */
2019-12-17 16:25:55 +00:00
} ;
2019-10-30 03:29:06 +00:00
struct icom_priv_caps
{
2021-05-26 20:40:53 +00:00
unsigned char re_civ_addr ; /*!< The remote equipment's default CI-V address */
int civ_731_mode ; /*!< Off: freqs on 10 digits, On: freqs on 8 digits plus passband setting */
2020-02-21 15:59:43 +00:00
// According to the CI-V+ manual the IC-781, IC-R9000, and IC-R7000 can select pas$
// The other rigs listed apparently cannot and may need the civ_731_mode=1 which are
// 1-706
// 2-706MKII
// 3-706MKIIG
// 4-707
// 5-718
// 6-746
// 7-746PRO
// 8-756
// 9-756PRO
// 10-756PROII
// 11-820H
// 12-821H
// 13-910H
// 14-R10
// 15-R8500
// 16-703
// 17-7800
2021-05-26 20:40:53 +00:00
int no_xchg ; /*!< Off: use VFO XCHG to set other VFO, On: use set VFO to set other VFO */
2019-10-30 03:29:06 +00:00
const struct ts_sc_list * ts_sc_list ;
2020-02-04 05:33:49 +00:00
// the 4 elements above are mandatory
// everything below here is optional in the backends
2019-10-30 03:29:06 +00:00
int settle_time ; /*!< Receiver settle time, in ms */
2020-11-30 05:32:14 +00:00
int ( * r2i_mode ) ( RIG * rig , vfo_t vfo , rmode_t mode , pbwidth_t width ,
2021-05-26 20:40:53 +00:00
unsigned char * md , signed char * pd ) ; /*!< backend specific code
2019-10-30 03:29:06 +00:00
to convert bandwidth and
mode to cmd tokens */
void ( * i2r_mode ) ( RIG * rig , unsigned char md , int pd ,
2021-05-26 20:40:53 +00:00
rmode_t * mode , pbwidth_t * width ) ; /*!< backend specific code
2019-10-30 03:29:06 +00:00
to convert response
tokens to bandwidth and
mode */
2021-05-26 20:40:53 +00:00
int antack_len ; /*!< Length of 0x12 cmd may be 3 or 4 bytes as of 2020-01-22 e.g. 7851 */
int ant_count ; /*!< Number of antennas */
2020-01-08 12:15:31 +00:00
int serial_full_duplex ; /*!< Whether RXD&TXD are not tied together */
2021-05-26 20:40:53 +00:00
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 */
2021-05-27 07:12:01 +00:00
struct icom_agc_level agc_levels [ RIG_AGC_LAST + 1 ] ; /*!< Icom rig-specific AGC levels, the last entry should have level -1 */
2021-05-26 20:40:53 +00:00
struct icom_spectrum_scope_caps spectrum_scope_caps ; /*!< Icom spectrum scope capabilities, if supported by the rig. Main/Sub scopes in Icom rigs have the same caps. */
struct icom_spectrum_edge_frequency_range spectrum_edge_frequency_ranges [ ICOM_MAX_SPECTRUM_FREQ_RANGES ] ; /*!< Icom spectrum scope edge frequencies, if supported by the rig. Last entry should have zeros in all fields. */
struct cmdparams * extcmds ; /*!< Pointer to extended operations array */
2001-03-04 13:03:41 +00:00
} ;
2019-10-30 03:29:06 +00:00
struct icom_priv_data
{
2021-05-26 20:40:53 +00:00
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 */
int no_1a_03_cmd ; /*!< Rig doesn't tell IF widths */
int split_on ; /*!< Record split state */
pltstate_t * pltstate ; /*!< Only on optoscan */
int serial_USB_echo_off ; /*!< USB is not set to echo */
2020-06-13 20:53:37 +00:00
/* we track vfos internally for use with different functions like split */
2019-11-28 15:59:57 +00:00
/* this allows queries using CURR_VFO and Main/Sub to behave */
2020-10-16 22:26:02 +00:00
vfo_t rx_vfo ;
vfo_t tx_vfo ;
2021-05-26 20:40:53 +00:00
freq_t curr_freq ; /*!< Our current freq depending on which vfo is selected */
freq_t main_freq ; /*!< Track last setting of main -- not being used yet */
freq_t sub_freq ; /*!< Track last setting of sub -- not being used yet */
2021-07-05 22:04:24 +00:00
freq_t maina_freq ;
freq_t mainb_freq ;
freq_t suba_freq ;
freq_t subb_freq ;
2021-05-26 20:40:53 +00:00
freq_t vfoa_freq ; /*!< Track last setting of vfoa -- used to return last freq when ptt is asserted */
freq_t vfob_freq ; /*!< Track last setting of vfob -- used to return last freq when ptt is asserted */
int x25cmdfails ; /*!< This will get set if the 0x25 command fails so we try just once */
2021-08-13 12:42:39 +00:00
int x26cmdfails ; /*!< This will get set if the 0x26 command fails so we try just once */
2021-05-26 20:40:53 +00:00
int x1cx03cmdfails ; /*!< This will get set if the 0x1c 0x03 command fails so we try just once */
int poweron ; /*!< To prevent powering on more than once */
unsigned char filter ; /*!< Current filter selected */
unsigned char datamode ; /*!< Current datamode */
int spectrum_scope_count ; /*!< Number of spectrum scopes, calculated from caps */
struct icom_spectrum_scope_cache spectrum_scope_cache [ HAMLIB_MAX_SPECTRUM_SCOPES ] ; /*!< Cached Icom spectrum scope data used during reception of the data. The array index must match the scope ID. */
2021-09-26 22:03:47 +00:00
freq_t other_freq ; /*!< Our other freq depending on which vfo is selected */
2021-09-28 17:01:50 +00:00
int vfo_flag ; // used to skip vfo check when frequencies are equal
2000-09-16 01:43:48 +00:00
} ;
2001-03-04 13:03:41 +00:00
extern const struct ts_sc_list r8500_ts_sc_list [ ] ;
2018-12-16 21:20:06 +00:00
extern const struct ts_sc_list r8600_ts_sc_list [ ] ;
2001-03-04 13:03:41 +00:00
extern const struct ts_sc_list ic737_ts_sc_list [ ] ;
extern const struct ts_sc_list r75_ts_sc_list [ ] ;
extern const struct ts_sc_list r7100_ts_sc_list [ ] ;
2002-01-27 14:51:07 +00:00
extern const struct ts_sc_list r9000_ts_sc_list [ ] ;
2011-03-28 16:56:05 +00:00
extern const struct ts_sc_list r9500_ts_sc_list [ ] ;
2001-03-04 13:03:41 +00:00
extern const struct ts_sc_list ic756_ts_sc_list [ ] ;
2002-01-27 14:51:07 +00:00
extern const struct ts_sc_list ic756pro_ts_sc_list [ ] ;
2020-09-06 17:28:35 +00:00
extern const struct ts_sc_list ic705_ts_sc_list [ ] ;
2001-03-04 13:03:41 +00:00
extern const struct ts_sc_list ic706_ts_sc_list [ ] ;
2006-11-07 12:21:39 +00:00
extern const struct ts_sc_list ic7000_ts_sc_list [ ] ;
2013-10-19 18:41:21 +00:00
extern const struct ts_sc_list ic7100_ts_sc_list [ ] ;
2009-03-25 19:33:11 +00:00
extern const struct ts_sc_list ic7200_ts_sc_list [ ] ;
2016-04-04 13:58:06 +00:00
extern const struct ts_sc_list ic7300_ts_sc_list [ ] ;
2020-10-14 15:19:00 +00:00
extern const struct ts_sc_list ic9700_ts_sc_list [ ] ;
2002-02-28 10:59:46 +00:00
extern const struct ts_sc_list ic910_ts_sc_list [ ] ;
2002-03-05 23:31:31 +00:00
extern const struct ts_sc_list ic718_ts_sc_list [ ] ;
2017-02-14 21:39:31 +00:00
extern const struct ts_sc_list x108g_ts_sc_list [ ] ;
2001-03-01 00:28:08 +00:00
2019-10-30 03:29:06 +00:00
extern const pbwidth_t
rtty_fil [ ] ; /* rtty filter passband width; available on 746pro and 756pro rigs */
2006-09-22 19:55:59 +00:00
pbwidth_t icom_get_dsp_flt ( RIG * rig , rmode_t mode ) ;
2006-07-18 22:51:43 +00:00
2000-09-16 01:43:48 +00:00
int icom_init ( RIG * rig ) ;
2019-01-09 09:33:04 +00:00
int icom_rig_open ( RIG * rig ) ;
2020-01-18 15:31:23 +00:00
int icom_rig_close ( RIG * rig ) ;
2000-09-16 01:43:48 +00:00
int icom_cleanup ( RIG * rig ) ;
2000-12-05 22:01:03 +00:00
int icom_set_freq ( RIG * rig , vfo_t vfo , freq_t freq ) ;
int icom_get_freq ( RIG * rig , vfo_t vfo , freq_t * freq ) ;
2019-06-01 06:51:17 +00:00
int icom_get_rit_new ( RIG * rig , vfo_t vfo , shortfreq_t * ts ) ;
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 ) ;
2013-10-07 23:43:56 +00:00
int icom_set_mode_with_data ( RIG * rig , vfo_t vfo , rmode_t mode , pbwidth_t width ) ;
2000-12-05 22:01:03 +00:00
int icom_set_mode ( RIG * rig , vfo_t vfo , rmode_t mode , pbwidth_t width ) ;
2019-10-30 03:29:06 +00:00
int icom_get_mode_with_data ( RIG * rig , vfo_t vfo , rmode_t * mode ,
pbwidth_t * width ) ;
2000-12-05 22:01:03 +00:00
int icom_get_mode ( RIG * rig , vfo_t vfo , rmode_t * mode , pbwidth_t * width ) ;
2021-09-29 10:46:53 +00:00
#if 0 // see icom_get_vfo in icom.c
2019-04-07 14:03:55 +00:00
int icom_get_vfo ( RIG * rig , vfo_t * vfo ) ;
2021-09-29 10:46:53 +00:00
# else
# define icom_get_vfo NULL
# endif
2000-10-08 21:39:58 +00:00
int icom_set_vfo ( RIG * rig , vfo_t vfo ) ;
2000-12-05 22:01:03 +00:00
int icom_set_rptr_shift ( RIG * rig , vfo_t vfo , rptr_shift_t rptr_shift ) ;
int icom_get_rptr_shift ( RIG * rig , vfo_t vfo , rptr_shift_t * rptr_shift ) ;
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 ) ;
2001-06-27 17:32:47 +00:00
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 ) ;
2019-10-30 03:29:06 +00:00
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 ) ;
2003-04-06 18:40:36 +00:00
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 ) ;
2003-12-04 23:22:52 +00:00
int icom_mem_get_split_vfo ( RIG * rig , vfo_t vfo , split_t * split , vfo_t * tx_vfo ) ;
2000-12-05 22:01:03 +00:00
int icom_set_ts ( RIG * rig , vfo_t vfo , shortfreq_t ts ) ;
int icom_get_ts ( RIG * rig , vfo_t vfo , shortfreq_t * ts ) ;
int icom_set_ptt ( RIG * rig , vfo_t vfo , ptt_t ptt ) ;
int icom_get_ptt ( RIG * rig , vfo_t vfo , ptt_t * ptt ) ;
2001-02-14 23:55:54 +00:00
int icom_get_dcd ( RIG * rig , vfo_t vfo , dcd_t * dcd ) ;
2001-07-01 11:46:17 +00:00
int icom_set_ctcss_tone ( RIG * rig , vfo_t vfo , tone_t tone ) ;
int icom_get_ctcss_tone ( RIG * rig , vfo_t vfo , tone_t * tone ) ;
int icom_set_ctcss_sql ( RIG * rig , vfo_t vfo , tone_t tone ) ;
int icom_get_ctcss_sql ( RIG * rig , vfo_t vfo , tone_t * tone ) ;
2009-06-01 16:58:08 +00:00
int icom_set_dcs_code ( RIG * rig , vfo_t vfo , tone_t code ) ;
int icom_get_dcs_code ( RIG * rig , vfo_t vfo , tone_t * code ) ;
2019-12-05 08:01:59 +00:00
int icom_set_dcs_sql ( RIG * rig , vfo_t vfo , tone_t code ) ;
int icom_get_dcs_sql ( RIG * rig , vfo_t vfo , tone_t * code ) ;
2000-12-05 22:01:03 +00:00
int icom_set_bank ( RIG * rig , vfo_t vfo , int bank ) ;
int icom_set_mem ( RIG * rig , vfo_t vfo , int ch ) ;
2001-06-03 19:54:05 +00:00
int icom_vfo_op ( RIG * rig , vfo_t vfo , vfo_op_t op ) ;
2001-06-26 20:55:29 +00:00
int icom_scan ( RIG * rig , vfo_t vfo , scan_t scan , int ch ) ;
2000-12-05 22:01:03 +00:00
int icom_set_level ( RIG * rig , vfo_t vfo , setting_t level , value_t val ) ;
int icom_get_level ( RIG * rig , vfo_t vfo , setting_t level , value_t * val ) ;
2016-05-26 05:01:27 +00:00
int icom_set_ext_level ( RIG * rig , vfo_t vfo , token_t token , value_t val ) ;
int icom_get_ext_level ( RIG * rig , vfo_t vfo , token_t token , value_t * val ) ;
2001-01-28 22:06:11 +00:00
int icom_set_func ( RIG * rig , vfo_t vfo , setting_t func , int status ) ;
2001-03-01 21:22:03 +00:00
int icom_get_func ( RIG * rig , vfo_t vfo , setting_t func , int * status ) ;
2020-02-11 09:48:13 +00:00
int icom_set_ext_func ( RIG * rig , vfo_t vfo , token_t token , int status ) ;
int icom_get_ext_func ( RIG * rig , vfo_t vfo , token_t token , int * status ) ;
2004-08-21 23:53:39 +00:00
int icom_set_parm ( RIG * rig , setting_t parm , value_t val ) ;
int icom_get_parm ( RIG * rig , setting_t parm , value_t * val ) ;
2019-12-17 16:25:55 +00:00
int icom_set_ext_parm ( RIG * rig , token_t token , value_t val ) ;
int icom_get_ext_parm ( RIG * rig , token_t token , value_t * val ) ;
int icom_set_ext_cmd ( RIG * rig , vfo_t vfo , token_t token , value_t val ) ;
2020-09-16 15:10:35 +00:00
int icom_get_ext_cmd ( RIG * rig , vfo_t vfo , token_t token , value_t * val ) ;
2001-07-21 13:00:03 +00:00
int icom_set_conf ( RIG * rig , token_t token , const char * val ) ;
int icom_get_conf ( RIG * rig , token_t token , char * val ) ;
2001-03-02 18:39:42 +00:00
int icom_set_powerstat ( RIG * rig , powerstat_t status ) ;
int icom_get_powerstat ( RIG * rig , powerstat_t * status ) ;
2020-01-21 23:53:12 +00:00
int icom_set_ant ( RIG * rig , vfo_t vfo , ant_t ant , value_t option ) ;
2020-10-16 22:26:02 +00:00
int icom_get_ant ( RIG * rig , vfo_t vfo , ant_t ant , value_t * option ,
ant_t * ant_curr , ant_t * ant_tx , ant_t * ant_rx ) ;
2000-10-08 21:39:58 +00:00
int icom_decode_event ( RIG * rig ) ;
2019-10-30 03:29:06 +00:00
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 ) ;
2020-10-16 22:26:02 +00:00
int icom_stop_morse ( RIG * rig , vfo_t vfo ) ;
2020-02-06 00:00:34 +00:00
int icom_send_voice_mem ( RIG * rig , vfo_t vfo , int bank ) ;
2017-02-14 21:39:31 +00:00
/* Exposed routines */
2020-05-25 04:42:35 +00:00
int icom_get_split_vfos ( RIG * rig , vfo_t * rx_vfo , vfo_t * tx_vfo ) ;
2019-10-30 03:29:06 +00:00
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 ) ;
2019-06-04 20:48:30 +00:00
int icom_set_level_raw ( RIG * rig , setting_t level , int cmd , int subcmd ,
2019-10-30 03:29:06 +00:00
int subcmdbuflen , unsigned char * subcmdbuf , int val_bytes , value_t val ) ;
2019-06-04 20:48:30 +00:00
int icom_get_level_raw ( RIG * rig , setting_t level , int cmd , int subcmd ,
2019-10-30 03:29:06 +00:00
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 ) ;
2020-03-08 14:23:11 +00:00
int icom_get_freq_range ( RIG * rig ) ;
2021-11-20 19:33:29 +00:00
int icom_is_async_frame ( RIG * rig , size_t frame_length , const unsigned char * frame ) ;
int icom_process_async_frame ( RIG * rig , size_t frame_length , const unsigned char * frame ) ;
int icom_read_frame_direct ( RIG * rig , size_t buffer_length , const unsigned char * buffer ) ;
2000-10-08 21:39:58 +00:00
2001-07-21 13:00:03 +00:00
extern const struct confparams icom_cfg_params [ ] ;
2020-02-11 09:48:13 +00:00
extern const struct confparams icom_ext_levels [ ] ;
extern const struct confparams icom_ext_funcs [ ] ;
2019-12-17 16:25:55 +00:00
extern const struct confparams icom_ext_parms [ ] ;
extern const struct cmdparams icom_ext_cmds [ ] ;
2001-07-21 13:00:03 +00:00
2003-11-05 20:40:27 +00:00
extern const struct rig_caps ic703_caps ;
2020-09-06 17:28:35 +00:00
extern const struct rig_caps ic705_caps ;
2000-10-08 21:39:58 +00:00
extern const struct rig_caps ic706_caps ;
extern const struct rig_caps ic706mkii_caps ;
extern const struct rig_caps ic706mkiig_caps ;
2004-02-02 22:15:17 +00:00
extern const struct rig_caps ic707_caps ;
2002-03-05 23:31:31 +00:00
extern const struct rig_caps ic718_caps ;
2002-12-23 14:20:42 +00:00
extern const struct rig_caps ic725_caps ;
2003-11-10 16:01:21 +00:00
extern const struct rig_caps ic726_caps ;
2004-02-02 22:15:17 +00:00
extern const struct rig_caps ic728_caps ;
2020-10-30 03:45:57 +00:00
extern const struct rig_caps ic729_caps ;
2001-09-17 05:45:06 +00:00
extern const struct rig_caps ic735_caps ;
2003-02-19 23:56:56 +00:00
extern const struct rig_caps ic736_caps ;
2002-11-16 14:05:53 +00:00
extern const struct rig_caps ic737_caps ;
2010-03-14 19:46:47 +00:00
extern const struct rig_caps ic738_caps ;
2003-10-24 22:59:18 +00:00
extern const struct rig_caps ic746_caps ;
2011-06-12 16:03:10 +00:00
extern const struct rig_caps ic7410_caps ;
2003-10-24 22:59:18 +00:00
extern const struct rig_caps ic746pro_caps ;
2001-09-18 00:37:39 +00:00
extern const struct rig_caps ic756_caps ;
extern const struct rig_caps ic756pro_caps ;
2002-07-09 20:43:37 +00:00
extern const struct rig_caps ic756pro2_caps ;
2004-09-25 14:33:17 +00:00
extern const struct rig_caps ic756pro3_caps ;
2004-05-18 06:55:06 +00:00
extern const struct rig_caps ic751_caps ;
2009-12-12 16:19:01 +00:00
extern const struct rig_caps ic7600_caps ;
2018-01-13 23:16:22 +00:00
extern const struct rig_caps ic7610_caps ;
2004-03-07 15:49:45 +00:00
extern const struct rig_caps ic761_caps ;
2003-11-10 16:01:21 +00:00
extern const struct rig_caps ic765_caps ;
2010-03-14 19:46:47 +00:00
extern const struct rig_caps ic7700_caps ;
2001-09-17 05:45:06 +00:00
extern const struct rig_caps ic775_caps ;
2004-09-25 14:33:17 +00:00
extern const struct rig_caps ic78_caps ;
extern const struct rig_caps ic7800_caps ;
2017-01-02 16:20:20 +00:00
extern const struct rig_caps ic785x_caps ;
2006-11-07 12:21:39 +00:00
extern const struct rig_caps ic7000_caps ;
2013-10-19 18:41:21 +00:00
extern const struct rig_caps ic7100_caps ;
2009-03-25 19:33:11 +00:00
extern const struct rig_caps ic7200_caps ;
2016-04-04 13:58:06 +00:00
extern const struct rig_caps ic7300_caps ;
2003-11-10 16:01:21 +00:00
extern const struct rig_caps ic781_caps ;
2008-02-13 22:04:52 +00:00
extern const struct rig_caps ic820h_caps ;
2001-12-20 23:07:15 +00:00
extern const struct rig_caps ic821h_caps ;
2002-02-28 10:59:46 +00:00
extern const struct rig_caps ic910_caps ;
2011-06-12 16:03:10 +00:00
extern const struct rig_caps ic9100_caps ;
2002-03-04 20:23:22 +00:00
extern const struct rig_caps ic970_caps ;
2019-04-06 18:59:25 +00:00
extern const struct rig_caps ic9700_caps ;
2011-09-04 13:47:44 +00:00
extern const struct rig_caps icrx7_caps ;
2003-11-16 17:28:29 +00:00
extern const struct rig_caps icr10_caps ;
2004-09-25 14:33:17 +00:00
extern const struct rig_caps icr20_caps ;
2017-04-02 19:58:19 +00:00
extern const struct rig_caps icr6_caps ;
2003-11-16 17:28:29 +00:00
extern const struct rig_caps icr71_caps ;
extern const struct rig_caps icr72_caps ;
extern const struct rig_caps icr75_caps ;
2002-02-27 23:17:17 +00:00
extern const struct rig_caps icr7000_caps ;
2003-11-16 17:28:29 +00:00
extern const struct rig_caps icr7100_caps ;
2001-01-28 22:06:11 +00:00
extern const struct rig_caps icr8500_caps ;
2003-11-16 17:28:29 +00:00
extern const struct rig_caps icr9000_caps ;
2011-03-28 16:56:05 +00:00
extern const struct rig_caps icr9500_caps ;
2003-11-16 17:28:29 +00:00
extern const struct rig_caps ic271_caps ;
2001-11-28 22:04:56 +00:00
extern const struct rig_caps ic275_caps ;
2003-11-10 16:01:21 +00:00
extern const struct rig_caps ic471_caps ;
2001-11-28 22:04:56 +00:00
extern const struct rig_caps ic475_caps ;
2021-06-03 21:13:58 +00:00
extern const struct rig_caps ic575_caps ;
2012-01-04 08:29:09 +00:00
extern const struct rig_caps ic1275_caps ;
2021-12-24 19:04:47 +00:00
extern const struct rig_caps icf8101_caps ;
2000-10-08 21:39:58 +00:00
2002-05-30 17:38:07 +00:00
extern const struct rig_caps omnivip_caps ;
2010-04-05 09:33:23 +00:00
extern const struct rig_caps delta2_caps ;
2002-05-30 17:38:07 +00:00
2003-05-19 06:57:44 +00:00
extern const struct rig_caps os456_caps ;
extern const struct rig_caps os535_caps ;
2000-09-16 01:43:48 +00:00
2011-01-05 21:59:48 +00:00
extern const struct rig_caps ic92d_caps ;
2003-11-16 17:28:29 +00:00
extern const struct rig_caps id1_caps ;
2019-12-09 05:33:20 +00:00
extern const struct rig_caps id31_caps ;
extern const struct rig_caps id51_caps ;
extern const struct rig_caps id4100_caps ;
2015-01-25 12:42:08 +00:00
extern const struct rig_caps id5100_caps ;
2016-03-28 22:05:38 +00:00
extern const struct rig_caps ic2730_caps ;
2000-09-16 01:43:48 +00:00
2016-11-06 13:38:42 +00:00
extern const struct rig_caps perseus_caps ;
2017-02-14 21:39:31 +00:00
extern const struct rig_caps x108g_caps ;
2021-12-28 05:23:26 +00:00
extern const struct rig_caps x6100_caps ;
2021-12-29 15:36:54 +00:00
extern const struct rig_caps g90_caps ;
2017-02-14 21:39:31 +00:00
2018-12-16 21:20:06 +00:00
extern const struct rig_caps icr8600_caps ;
2018-12-21 07:07:41 +00:00
extern const struct rig_caps icr30_caps ;
2017-02-14 21:39:31 +00:00
2003-11-16 17:28:29 +00:00
# endif /* _ICOM_H */