1 /* 2 * Hamlib CI-V backend - defines for the ICOM "CI-V" interface. 3 * Copyright (c) 2000-2016 by Stephane Fillod 4 * 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 * 20 */ 21 22 #ifndef _ICOM_DEFS_H 23 #define _ICOM_DEFS_H 1 24 25 /* 26 * CI-V frame codes 27 */ 28 #define PR 0xfe /* Preamble code */ 29 #define CTRLID 0xe0 /* Controllers's default address */ 30 #define BCASTID 0x00 /* Broadcast address */ 31 #define FI 0xfd /* End of message code */ 32 #define ACK 0xfb /* OK code */ 33 #define NAK 0xfa /* NG code */ 34 #define COL 0xfc /* CI-V bus collision detected */ 35 #define PAD 0xff /* Transmit padding */ 36 37 #define ACKFRMLEN 6 /* reply frame length */ 38 39 #define S_NONE -1 40 41 42 /* 43 * Arguments length in bytes 44 */ 45 #define CHAN_NB_LEN 2 46 #define BANK_NB_LEN 2 47 #define OFFS_LEN 3 48 49 /* 50 * Cn controller commands 51 * 52 53 Most radios have 2 or 3 receive passbands available. Where only 2 are available they 54 are selected by 01 for wide and 02 for narrow Actual bandwidth is determined by the filters 55 installed. With the newer DSP rigs there are 3 presets 01 = wide 02 = middle and 03 = narrow. 56 Actually, you can set change any of these presets to any thing you want. 57 58 * Notes: 59 * The following only applies to IC-706. 60 * 1. When wide or normal op available: add "00" for wide, "01" normal 61 * Normal or narrow op: add "00" for normal, "01" for narrow 62 * Wide, normal or narrow op: add "00" for wide, "01" normal, "02" narrow 63 * 2. Memory channel number 1A=0100/1b=0101, 2A=0102/2b=0103, 64 * 3A=0104/3b=0105, C1=0106, C2=0107 65 */ 66 #define C_SND_FREQ 0x00 /* Send frequency data transceive mode does not ack*/ 67 #define C_SND_MODE 0x01 /* Send mode data, Sc for transceive mode does not ack */ 68 #define C_RD_BAND 0x02 /* Read band edge frequencies */ 69 #define C_RD_FREQ 0x03 /* Read display frequency */ 70 #define C_RD_MODE 0x04 /* Read display mode */ 71 #define C_SET_FREQ 0x05 /* Set frequency data(1) */ 72 #define C_SET_MODE 0x06 /* Set mode data, Sc */ 73 #define C_SET_VFO 0x07 /* Set VFO */ 74 #define C_SET_MEM 0x08 /* Set channel, Sc(2) */ 75 #define C_WR_MEM 0x09 /* Write memory */ 76 #define C_MEM2VFO 0x0a /* Memory to VFO */ 77 #define C_CLR_MEM 0x0b /* Memory clear */ 78 #define C_RD_OFFS 0x0c /* Read duplex offset frequency; default changes with HF/6M/2M */ 79 #define C_SET_OFFS 0x0d /* Set duplex offset frequency */ 80 #define C_CTL_SCAN 0x0e /* Control scan, Sc */ 81 #define C_CTL_SPLT 0x0f /* Control split, and duplex mode Sc */ 82 #define C_SET_TS 0x10 /* Set tuning step, Sc */ 83 #define C_CTL_ATT 0x11 /* Set/get attenuator, Sc */ 84 #define C_CTL_ANT 0x12 /* Set/get antenna, Sc */ 85 #define C_CTL_ANN 0x13 /* Control announce (speech synth.), Sc */ 86 #define C_CTL_LVL 0x14 /* Set AF/RF/squelch, Sc */ 87 #define C_RD_SQSM 0x15 /* Read squelch condition/S-meter level, Sc */ 88 #define C_CTL_FUNC 0x16 /* Function settings (AGC,NB,etc.), Sc */ 89 #define C_SND_CW 0x17 /* Send CW message */ 90 #define C_SET_PWR 0x18 /* Set Power ON/OFF, Sc */ 91 #define C_RD_TRXID 0x19 /* Read transceiver ID code */ 92 #define C_CTL_MEM 0x1a /* Misc memory/bank/rig control functions, Sc */ 93 #define C_SET_TONE 0x1b /* Set tone frequency */ 94 #define C_CTL_PTT 0x1c /* Control Transmit On/Off, Sc */ 95 #define C_CTL_EDGE 0x1e /* Band edges */ 96 #define C_CTL_DVT 0x1f /* Digital modes calsigns & messages */ 97 #define C_CTL_DIG 0x20 /* Digital modes settings & status */ 98 #define C_CTL_RIT 0x21 /* RIT/XIT control */ 99 #define C_CTL_DSD 0x22 /* D-STAR Data */ 100 #define C_SEND_SEL_FREQ 0x25 /* Send/Recv sel/unsel VFO frequency */ 101 #define C_CTL_SCP 0x27 /* Scope control & data */ 102 #define C_SND_VOICE 0x28 /* Transmit Voice Memory Contents */ 103 #define C_CTL_MTEXT 0x70 /* Microtelecom Extension */ 104 #define C_CTL_MISC 0x7f /* Miscellaneous control, Sc */ 105 106 /* 107 * Sc controller sub commands 108 */ 109 110 111 /* 112 * Set mode data (C_SET_MODE) sub commands 113 */ 114 #define S_LSB 0x00 /* Set to LSB */ 115 #define S_USB 0x01 /* Set to USB */ 116 #define S_AM 0x02 /* Set to AM */ 117 #define S_AMN 0x02 /* Set to AM-N */ 118 #define S_CW 0x03 /* Set to CW */ 119 #define S_RTTY 0x04 /* Set to RTTY */ 120 #define S_FM 0x05 /* Set to FM */ 121 #define S_FMN 0x05 /* Set to FM-N */ 122 #define S_WFM 0x06 /* Set to Wide FM */ 123 #define S_CWR 0x07 /* Set to CW Reverse */ 124 #define S_RTTYR 0x08 /* Set to RTTY Reverse */ 125 #define S_AMS 0x11 /* Set to AMS */ 126 #define S_PSK 0x12 /* 7800 PSK USB */ 127 #define S_PSKR 0x13 /* 7800 PSK LSB */ 128 #define S_SAML 0x14 /* Set to AMS-L */ 129 #define S_SAMU 0x15 /* Set to AMS-U */ 130 #define S_P25 0x16 /* Set to P25 */ 131 #define S_DSTAR 0x17 /* Set to D-STAR */ 132 #define S_DPMR 0x18 /* Set to dPMR */ 133 #define S_NXDNVN 0x19 /* Set to NXDN_VN */ 134 #define S_NXDN_N 0x20 /* Set to NXDN-N */ 135 #define S_DCR 0x21 /* Set to DCR */ 136 #define S_DD 0x22 /* Set to DD 1200Mhz only? */ 137 138 #define S_R7000_SSB 0x05 /* Set to SSB on R-7000 */ 139 140 /* filter width coding for older ICOM rigs with 2 filter width */ 141 /* there is no special 'wide' for that rigs */ 142 #define PD_MEDIUM_2 0x01 /* Medium */ 143 #define PD_NARROW_2 0x02 /* Narrow */ 144 145 /* filter width coding for newer ICOM rigs with 3 filter width */ 146 #define PD_WIDE_3 0x01 /* Wide */ 147 #define PD_MEDIUM_3 0x02 /* Medium */ 148 #define PD_NARROW_3 0x03 /* Narrow */ 149 150 /* 151 * Set VFO (C_SET_VFO) sub commands 152 */ 153 #define S_VFOA 0x00 /* Set to VFO A */ 154 #define S_VFOB 0x01 /* Set to VFO B */ 155 #define S_BTOA 0xa0 /* VFO A=B */ 156 #define S_XCHNG 0xb0 /* Switch VFO A and B */ 157 #define S_SUBTOMAIN 0xb1 /* MAIN = SUB */ 158 #define S_DUAL_OFF 0xc0 /* Dual watch off */ 159 #define S_DUAL_ON 0xc1 /* Dual watch on */ 160 #define S_DUAL 0xc2 /* Dual watch (0 = off, 1 = on) */ 161 #define S_MAIN 0xd0 /* Select MAIN band */ 162 #define S_SUB 0xd1 /* Select SUB band */ 163 #define S_SUB_SEL 0xd2 /* Read/Set Main/Sub selection */ 164 #define S_FRONTWIN 0xe0 /* Select front window */ 165 166 /* 167 * Set MEM (C_SET_MEM) sub commands 168 */ 169 #define S_BANK 0xa0 /* Select memory bank (aka 'memory group' with IC-R8600) */ 170 171 /* 172 * Scan control (C_CTL_SCAN) subcommands 173 */ 174 #define S_SCAN_STOP 0x00 /* Stop scan/window scan */ 175 #define S_SCAN_START 0x01 /* Programmed/Memory scan */ 176 #define S_SCAN_PROG 0x02 /* Programmed scan */ 177 #define S_SCAN_DELTA 0x03 /* Delta-f scan */ 178 #define S_SCAN_WRITE 0x04 /* auto memory-write scan */ 179 #define S_SCAN_FPROG 0x12 /* Fine programmed scan */ 180 #define S_SCAN_FDELTA 0x13 /* Fine delta-f scan */ 181 #define S_SCAN_MEM2 0x22 /* Memory scan */ 182 #define S_SCAN_SLCTN 0x23 /* Selected number memory scan */ 183 #define S_SCAN_SLCTM 0x24 /* Selected mode memory scan */ 184 #define S_SCAN_PRIO 0x42 /* Priority / window scan */ 185 #define S_SCAN_FDFOF 0xA0 /* Fix dF OFF */ 186 #define S_SCAN_FDF5I 0xA1 /* Fix range +/-5kHz */ 187 #define S_SCAN_FDF1X 0xA2 /* Fix range +/-10kHz */ 188 #define S_SCAN_FDF2X 0xA3 /* Fix range +/-20kHz */ 189 #define S_SCAN_FDF5X 0xA4 /* Fix range +/-50kHz */ 190 #define S_SCAN_FDF1C 0xA5 /* Fix range +/-100kHz */ 191 #define S_SCAN_FDF5C 0xA6 /* Fix range +/-500kHz */ 192 #define S_SCAN_FDF1M 0xA7 /* Fix range +/-1MHz */ 193 #define S_SCAN_FDFON 0xAA /* Fix dF ON */ 194 #define S_SCAN_NSLCT 0xB0 /* Set as non select channel */ 195 #define S_SCAN_SLCT 0xB1 /* Set as select channel */ 196 #define S_SCAN_SL_NUM 0xB2 /* select programed mem scan 7800 only */ 197 #define S_SCAN_RSMOFF 0xD0 /* Set scan resume OFF */ 198 #define S_SCAN_RSMONP 0xD1 /* Set scan resume ON + pause time */ 199 #define S_SCAN_RSMON 0xD3 /* Set scan resume ON */ 200 201 202 /* 203 * Split control (S_CTL_SPLT) subcommands 204 */ 205 #define S_SPLT_OFF 0x00 /* Split OFF */ 206 #define S_SPLT_ON 0x01 /* Split ON */ 207 #define S_DUP_OFF 0x10 /* Simplex mode */ 208 #define S_DUP_M 0x11 /* Duplex - mode */ 209 #define S_DUP_P 0x12 /* Duplex + mode */ 210 #define S_DUP_DD_RPS 0x13 /* DD Repeater Simplex mode (RPS) */ 211 212 /* 213 * Set Attenuator (C_CTL_ATT) subcommands 214 */ 215 #define S_ATT_RD -1 /* Without subcommand, reads out setting */ 216 #define S_ATT_OFF 0x00 /* Off */ 217 #define S_ATT_6dB 0x06 /* 6 dB, IC-756Pro */ 218 #define S_ATT_10dB 0x10 /* 10 dB */ 219 #define S_ATT_12dB 0x12 /* 12 dB, IC-756Pro */ 220 #define S_ATT_18dB 0x18 /* 18 dB, IC-756Pro */ 221 #define S_ATT_20dB 0x20 /* 20 dB */ 222 #define S_ATT_30dB 0x30 /* 30 dB, or Att on for IC-R75 */ 223 224 /* 225 * Set Preamp (S_FUNC_PAMP) data 226 */ 227 #define D_PAMP_OFF 0x00 228 #define D_PAMP1 0x01 229 #define D_PAMP2 0x02 230 231 /* 232 * Set AGC (S_FUNC_AGC) data 233 */ 234 #define D_AGC_FAST 0x00 235 #define D_AGC_MID 0x01 236 #define D_AGC_SLOW 0x02 237 #define D_AGC_SUPERFAST 0x03 /* IC746 pro */ 238 239 /* 240 * Set antenna (C_SET_ANT) subcommands 241 */ 242 #define S_ANT_RD -1 /* Without subcommand, reads out setting */ 243 #define S_ANT1 0x00 /* Antenna 1 */ 244 #define S_ANT2 0x01 /* Antenna 2 */ 245 246 /* 247 * Announce control (C_CTL_ANN) subcommands 248 */ 249 #define S_ANN_ALL 0x00 /* Announce all */ 250 #define S_ANN_FREQ 0x01 /* Announce freq */ 251 #define S_ANN_MODE 0x02 /* Announce operating mode */ 252 253 /* 254 * Function settings (C_CTL_LVL) subcommands 255 */ 256 #define S_LVL_AF 0x01 /* AF level setting */ 257 #define S_LVL_RF 0x02 /* RF level setting */ 258 #define S_LVL_SQL 0x03 /* SQL level setting */ 259 #define S_LVL_IF 0x04 /* IF shift setting */ 260 #define S_LVL_APF 0x05 /* APF level setting */ 261 #define S_LVL_NR 0x06 /* NR level setting */ 262 #define S_LVL_PBTIN 0x07 /* Twin PBT setting (inside) */ 263 #define S_LVL_PBTOUT 0x08 /* Twin PBT setting (outside) */ 264 #define S_LVL_CWPITCH 0x09 /* CW pitch setting */ 265 #define S_LVL_RFPOWER 0x0a /* RF power setting */ 266 #define S_LVL_MICGAIN 0x0b /* MIC gain setting */ 267 #define S_LVL_KEYSPD 0x0c /* Key Speed setting */ 268 #define S_LVL_NOTCHF 0x0d /* Notch freq. setting */ 269 #define S_LVL_COMP 0x0e /* Compressor level setting */ 270 #define S_LVL_BKINDL 0x0f /* BKin delay setting */ 271 #define S_LVL_BALANCE 0x10 /* Balance setting (Dual watch) */ 272 #define S_LVL_AGC 0x11 /* AGC (7800) */ 273 #define S_LVL_NB 0x12 /* NB setting */ 274 #define S_LVL_DIGI 0x13 /* DIGI-SEL (7800) */ 275 #define S_LVL_DRIVE 0x14 /* DRIVE gain setting */ 276 #define S_LVL_MON 0x15 /* Monitor gain setting */ 277 #define S_LVL_VOXGAIN 0x16 /* VOX gain setting */ 278 #define S_LVL_ANTIVOX 0x17 /* Anti VOX gain setting */ 279 #define S_LVL_CONTRAST 0x18 /* CONTRAST level setting */ 280 #define S_LVL_BRIGHT 0x19 /* BRIGHT level setting */ 281 #define S_LVL_BASS 0x1B /* Bass level setting */ 282 #define S_LVL_TREBLE 0x1C /* Treble level setting */ 283 #define S_LVL_SCNSPD 0x1D /* Scan speed */ 284 #define S_LVL_SCNDEL 0x1E /* Scan delay */ 285 #define S_LVL_PRIINT 0x1F /* PRIO interval */ 286 #define S_LVL_RESTIM 0x20 /* Resume time */ 287 288 /* 289 * Read squelch condition/S-meter level/other meter levels (C_RD_SQSM) subcommands 290 */ 291 #define S_SQL 0x01 /* Read squelch condition */ 292 #define S_SML 0x02 /* Read S-meter level */ 293 #define S_SMF 0x03 /* Read S-meter level in AAAABBCC format */ 294 #define S_CML 0x04 /* Read centre -meter level */ 295 #define S_CSQL 0x05 /* Read combined squelch conditions */ 296 #define S_SAMS 0x06 /* Read S-AM Sync indicator */ 297 #define S_OVF 0x07 /* Read OVF indicator status */ 298 #define S_RFML 0x11 /* Read RF-meter level */ 299 #define S_SWR 0x12 /* Read SWR-meter level */ 300 #define S_ALC 0x13 /* Read ALC-meter level */ 301 #define S_CMP 0x14 /* Read COMP-meter level */ 302 #define S_VD 0x15 /* Read Vd-meter level */ 303 #define S_ID 0x16 /* Read Id-meter level */ 304 305 /* 306 * Function settings (C_CTL_FUNC) subcommands Set and Read 307 */ 308 #define S_FUNC_PAMP 0x02 /* Preamp setting */ 309 #define S_FUNC_AGCOFF 0x10 /* IC-R8500 only */ 310 #define S_FUNC_AGCON 0x11 /* IC-R8500 only */ 311 #define S_FUNC_AGC 0x12 /* AGC setting presets: the dsp models allow these to be modified */ 312 #define S_FUNC_NBOFF 0x20 /* IC-R8500 only */ 313 #define S_FUNC_NBON 0x21 /* IC-R8500 only */ 314 #define S_FUNC_NB 0x22 /* NB setting */ 315 #define S_FUNC_APFOFF 0x30 /* IC-R8500 only */ 316 #define S_FUNC_APFON 0x31 /* IC-R8500 only */ 317 #define S_FUNC_APF 0x32 /* APF setting */ 318 #define S_FUNC_NR 0x40 /* NR setting */ 319 #define S_FUNC_ANF 0x41 /* ANF setting */ 320 #define S_FUNC_TONE 0x42 /* TONE setting */ 321 #define S_FUNC_TSQL 0x43 /* TSQL setting */ 322 #define S_FUNC_COMP 0x44 /* COMP setting */ 323 #define S_FUNC_MON 0x45 /* Monitor setting */ 324 #define S_FUNC_VOX 0x46 /* VOX setting */ 325 #define S_FUNC_BKIN 0x47 /* BK-IN setting */ 326 #define S_FUNC_MN 0x48 /* Manual notch setting */ 327 #define S_FUNC_RF 0x49 /* RTTY Filter setting */ 328 #define S_FUNC_AFC 0x4A /* Auto Frequency Control (AFC) setting */ 329 #define S_FUNC_CSQL 0x4B /* DTCS tone code squelch setting*/ 330 #define S_FUNC_VSC 0x4C /* voice squelch control useful for scanning*/ 331 #define S_FUNC_MANAGC 0x4D /* manual AGC */ 332 #define S_FUNC_DIGISEL 0x4E /* DIGI-SEL */ 333 #define S_FUNC_TW_PK 0x4F /* RTTY Twin Peak filter 0= off 1 = on */ 334 #define S_FUNC_DIAL_LK 0x50 /* Dial lock */ 335 #define S_FUNC_P25SQL 0x52 /* P25 DSQL */ 336 #define S_FUNC_ANTRX 0x53 /* ANT-RX */ 337 #define S_FUNC_IF1F 0x55 /* 1st IF filter */ 338 #define S_FUNC_DSPF 0x56 /* DSP filter */ 339 #define S_FUNC_MANN 0x57 /* Manual notch width */ 340 #define S_FUNC_SSBT 0x58 /* SSB Tx bandwidth */ 341 #define S_FUNC_SUBB 0x59 /* Sub band */ 342 #define S_FUNC_SATM 0x5A /* Satellite mode */ 343 #define S_FUNC_DSSQL 0x5B /* D-STAR DSQL */ 344 #define S_FUNC_DPSQL 0x5F /* dPMR DSQL */ 345 #define S_FUNC_NXSQL 0x60 /* NXDN DSQL */ 346 #define S_FUNC_DCSQL 0x61 /* DCR DSQL */ 347 #define S_FUNC_DPSCM 0x62 /* dPMR scrambler */ 348 #define S_FUNC_NXENC 0x63 /* NXDN encryption */ 349 #define S_FUNC_DCENC 0x64 /* DCR encryption */ 350 #define S_FUNC_IPP 0x65 /* IP+ setting */ 351 352 /* 353 * Set Power On/Off (C_SET_PWR) subcommands 354 */ 355 #define S_PWR_OFF 0x00 356 #define S_PWR_ON 0x01 357 #define S_PWR_STDBY 0x02 358 359 /* 360 * Transmit control (C_CTL_PTT) subcommands 361 */ 362 #define S_PTT 0x00 363 #define S_ANT_TUN 0x01 /* Auto tuner 0=OFF, 1 = ON, 2=Start Tuning */ 364 365 /* 366 * Band Edge control (C_CTL_EDGE) subcommands 367 */ 368 #define S_EDGE_RD_N 0x00 // Fixed band edge count 369 #define S_EDGE_RD 0x01 // Fixed band edges 370 #define S_EDGE_RD_NU 0x02 // User band edge count 371 #define S_EDGE_RD_U 0x03 // User band edges 372 373 /* 374 * RIT/XIT control (C_CTL_RIT) subcommands 375 */ 376 #define S_RIT_FREQ 0x00 377 #define S_RIT 0x01 /* RIT 0 = OFF, 1 = ON */ 378 #define S_XIT 0x02 /* XIT (delta TX) 0 = OFF, 1 = ON */ 379 380 /* 381 * Misc contents (C_CTL_MEM) subcommands applies to newer rigs. 382 * 383 * Beware the IC-7200 which is non-standard. 384 */ 385 #define S_MEM_CNTNT 0x00 /* Memory content 2 bigendian */ 386 #define S_MEM_BAND_REG 0x01 /* band stacking register */ 387 #define S_MEM_FILT_WDTH 0x03 /* current passband filter width */ 388 #define S_MEM_PARM 0x05 /* rig parameters; extended parm # + param value: should be coded */ 389 /* in the rig files because they are different for each rig */ 390 #define S_MEM_DATA_MODE 0x06 /* data mode */ 391 #define S_MEM_TX_PB 0x07 /* SSB tx passband */ 392 #define S_MEM_FLTR_SHAPE 0x08 /* DSP filter shape 0=sharp 1=soft */ 393 394 /* Icr75c */ 395 #define S_MEM_CNTNT_SLCT 0x01 396 #define S_MEM_FLT_SLCT 0x01 397 #define S_MEM_MODE_SLCT 0x02 398 /* For IC-910H rig. */ 399 #define S_MEM_RDWR_MEM 0x00 /* Read/write memory channel */ 400 #define S_MEM_SATMEM 0x01 /* Satellite memory */ 401 #define S_MEM_VOXGAIN 0x02 /* VOX gain level (0=0%, 255=100%) */ 402 #define S_MEM_VOXDELAY 0x03 /* VOX delay (0=0.0 sec, 20=2.0 sec) */ 403 #define S_MEM1_VOXDELAY 0x05 /* VOX delay (0=0.0 sec, 20=2.0 sec) */ 404 #define S_MEM_ANTIVOX 0x04 /* anti VOX setting */ 405 #define S_MEM_RIT 0x06 /* RIT (0=off, 1=on, 2=sub dial) */ 406 #define S_MEM_SATMODE910 0x07 /* Satellite mode (on/off) */ 407 #define S_MEM_BANDSCOPE 0x08 /* Simple bandscope (on/off) */ 408 409 /* For IC9700 and IC9100 and likely future Icoms */ 410 #define S_MEM_SATMODE 0x5a /* Satellite mode (on/off) */ 411 412 /* IC-R8600 and others */ 413 #define S_MEM_SKIP_SLCT_OFF 0x00 414 #define S_MEM_SKIP_SLCT_ON 0x10 415 #define S_MEM_PSKIP_SLCT_ON 0x20 416 #define S_MEM_DUP_OFF 0x00 417 #define S_MEM_DUP_MINUS 0x01 418 #define S_MEM_DUP_PLUS 0x02 419 #define S_MEM_TSTEP_OFF 0x00 420 #define S_MEM_TSTEP_ON 0x01 421 #define S_FUNC_IPPLUS 0x07 /* IP+ subcommand 0x1a 0x07 */ 422 423 /* IC-R6 */ 424 #define S_MEM_AFLT 0x00 /* AF LPF Off/On */ 425 426 /* IC-R30 */ 427 #define S_MEM_ANL 0x00 /* ANL Off/On */ 428 #define S_MEM_EAR 0x01 /* Earphone mode Off/On */ 429 #define S_MEM_REC 0x09 /* Recorder Off/On */ 430 431 /* 432 * Tone control (C_SET_TONE) subcommands 433 */ 434 #define S_TONE_RPTR 0x00 /* Tone frequency setting for repeater receive */ 435 #define S_TONE_SQL 0x01 /* Tone frequency setting for squelch */ 436 #define S_TONE_DTCS 0x02 /* DTCS code and polarity for squelch */ 437 #define S_TONE_P25NAC 0x03 /* P25 NAC */ 438 #define S_TONE_DSCSQL 0x07 /* D-STAR CSQL */ 439 #define S_TONE_DPCOM 0x08 /* dPMR COM ID */ 440 #define S_TONE_DPCC 0x09 /* dPMR CC */ 441 #define S_TONE_NXRAN 0x0A /* NXDN RAN */ 442 #define S_TONE_DCUC 0x0B /* DCR UC */ 443 #define S_TONE_DPSCK 0x0C /* dPMR scrambler key */ 444 #define S_TONE_NXENK 0x0D /* NXDN encryption key */ 445 #define S_TONE_DCENK 0x0E /* DCR encryption key */ 446 447 /* 448 * Transceiver ID (C_RD_TRXID) subcommands 449 */ 450 #define S_RD_TRXID 0x00 451 452 /* 453 * Digital modes settings & status subcommands 454 */ 455 #define S_DIG_DSCALS 0x00 /* D-STAR Call sign */ 456 #define S_DIG_DSMESS 0x01 /* D-STAR Message */ 457 #define S_DIG_DSRSTS 0x02 /* D-STAR Rx status */ 458 #define S_DIG_DSGPSD 0x03 /* D-STAR GPS data */ 459 #define S_DIG_DSGPSM 0x04 /* D-STAR GPS message */ 460 #define S_DIG_DSCSQL 0x05 /* D-STAR CSQL */ 461 #define S_DIG_P25ID 0x06 /* P25 ID */ 462 #define S_DIG_P25STS 0x07 /* P25 Rx status */ 463 #define S_DIG_DPRXID 0x08 /* dPMR Rx ID */ 464 #define S_DIG_DPRSTS 0x09 /* dPMR Rx status */ 465 #define S_DIG_NXRXID 0x0A /* NXDN Rx ID */ 466 #define S_DIG_NXRSTS 0x0B /* NXDN Rx status */ 467 #define S_DIG_DCRXID 0x0C /* DCR Rx ID */ 468 #define S_DVT_DSMYCS 0x00 /* D-STAR My CS */ 469 #define S_DVT_DSTXCS 0x01 /* D-STAR Tx CS */ 470 #define S_DVT_DSTXMS 0x02 /* D-STAR Tx Mess */ 471 #define S_DSD_DSTXDT 0x00 /* D-STAR Tx Data */ 472 473 /* 474 * S_CTL_SCP Scope control & data subcommands 475 */ 476 #define S_SCP_DAT 0x00 /* Read data */ 477 #define S_SCP_STS 0x10 /* On/Off status */ 478 #define S_SCP_DOP 0x11 /* Data O/P Control */ 479 #define S_SCP_MSS 0x12 /* Main/Sub setting */ 480 #define S_SCP_SDS 0x13 /* Single/Dual scope setting */ 481 #define S_SCP_MOD 0x14 /* Center/Fixed mode */ 482 #define S_SCP_SPN 0x15 /* Span setting */ 483 #define S_SCP_EDG 0x16 /* Edge setting */ 484 #define S_SCP_HLD 0x17 /* Hold On/Off */ 485 #define S_SCP_ATT 0x18 /* Attenuator */ 486 #define S_SCP_REF 0x19 /* Reference level */ 487 #define S_SCP_SWP 0x1a /* Sweep speed */ 488 #define S_SCP_STX 0x1b /* Scope during Tx */ 489 #define S_SCP_CFQ 0x1c /* Center frequency type */ 490 #define S_SCP_VBW 0x1d /* Video Band Width (VBW) setting */ 491 #define S_SCP_FEF 0x1e /* Fixed edge freqs */ 492 #define S_SCP_RBW 0x1f /* Resolution Band Width (RBW) setting */ 493 #define S_SCP_MKP 0x20 /* Marker position setting */ 494 495 /* 496 * C_CTL_MISC OptoScan extension 497 */ 498 #define S_OPTO_LOCAL 0x01 499 #define S_OPTO_REMOTE 0x02 500 #define S_OPTO_TAPE_ON 0x03 501 #define S_OPTO_TAPE_OFF 0x04 502 #define S_OPTO_RDSTAT 0x05 503 #define S_OPTO_RDCTCSS 0x06 504 #define S_OPTO_RDDCS 0x07 505 #define S_OPTO_RDDTMF 0x08 506 #define S_OPTO_RDID 0x09 507 #define S_OPTO_SPKRON 0x0a 508 #define S_OPTO_SPKROFF 0x0b 509 #define S_OPTO_5KSCON 0x0c 510 #define S_OPTO_5KSCOFF 0x0d 511 #define S_OPTO_NXT 0x0e 512 #define S_OPTO_SCON 0x0f 513 #define S_OPTO_SCOFF 0x10 514 515 /* 516 * OmniVIPlus (Omni VI) extensions 517 */ 518 #define C_OMNI6_XMT 0x16 519 520 /* 521 * S_MEM_MODE_SLCT Misc CI-V Mode settings 522 */ 523 #define S_PRM_BEEP 0x02 524 #define S_PRM_CWPITCH 0x10 525 #define S_PRM_LANG 0x15 526 #define S_PRM_BACKLT 0x21 527 #define S_PRM_SLEEP 0x32 528 #define S_PRM_SLPTM 0x33 529 #define S_PRM_TIME 0x27 530 531 /* 532 * Tokens for Extra Level and Parameters common to multiple rigs. Use token # > 99. Defined here so they 533 * will be available in ICOM name space. They have different internal commands primarily in dsp rigs. These 534 * tokens are used ext_lvl and ext_parm functions in the individual rig files. 535 * Extra parameters which are rig specific should be coded in the individual rig files and token #s < 100. 536 */ 537 538 #define TOKEN_BACKEND(t) (t) 539 540 #define TOK_RTTY_FLTR TOKEN_BACKEND(100) 541 #define TOK_SSBBASS TOKEN_BACKEND(101) 542 #define TOK_SQLCTRL TOKEN_BACKEND(102) 543 #define TOK_DRIVE_GAIN TOKEN_BACKEND(103) 544 #define TOK_DIGI_SEL_FUNC TOKEN_BACKEND(104) 545 #define TOK_DIGI_SEL_LEVEL TOKEN_BACKEND(105) 546 #define TOK_DSTAR_CALL_SIGN TOKEN_BACKEND(120) 547 #define TOK_DSTAR_MESSAGE TOKEN_BACKEND(121) 548 #define TOK_DSTAR_STATUS TOKEN_BACKEND(122) 549 #define TOK_DSTAR_GPS_DATA TOKEN_BACKEND(123) 550 #define TOK_DSTAR_GPS_MESS TOKEN_BACKEND(124) 551 #define TOK_DSTAR_DSQL TOKEN_BACKEND(125) 552 #define TOK_DSTAR_MY_CS TOKEN_BACKEND(126) 553 #define TOK_DSTAR_TX_CS TOKEN_BACKEND(127) 554 #define TOK_DSTAR_TX_MESS TOKEN_BACKEND(128) 555 #define TOK_DSTAR_TX_DATA TOKEN_BACKEND(129) 556 #define TOK_DSTAR_CODE TOKEN_BACKEND(130) 557 #define TOK_SCOPE_MSS TOKEN_BACKEND(140) 558 #define TOK_SCOPE_SDS TOKEN_BACKEND(141) 559 #define TOK_SCOPE_EDG TOKEN_BACKEND(142) 560 #define TOK_SCOPE_STX TOKEN_BACKEND(143) 561 #define TOK_SCOPE_CFQ TOKEN_BACKEND(144) 562 #define TOK_SCOPE_VBW TOKEN_BACKEND(145) 563 #define TOK_SCOPE_FEF TOKEN_BACKEND(146) 564 #define TOK_SCOPE_RBW TOKEN_BACKEND(147) 565 #define TOK_SCOPE_MKP TOKEN_BACKEND(148) 566 567 /* 568 * icom_ext_parm table subcommand modifiers 569 */ 570 571 #define SC_MOD_RD 0x01 /* Readable */ 572 #define SC_MOD_WR 0x02 /* Writeable */ 573 #define SC_MOD_RW 0x03 /* Read-write */ 574 #define SC_MOD_RW12 0x07 /* Write +0x01, Read +0x02 */ 575 576 /* 577 * icom_ext_parm table data types 578 */ 579 580 #define CMD_DAT_WRD 0x00 /* literal single word type */ 581 #define CMD_DAT_INT 0x01 /* bcd int type */ 582 #define CMD_DAT_FLT 0x02 /* bcd float type */ 583 #define CMD_DAT_LVL 0x03 /* bcd level type */ 584 #define CMD_DAT_BOL 0x04 /* bcd boolean type */ 585 #define CMD_DAT_STR 0x05 /* string type */ 586 #define CMD_DAT_BUF 0x06 /* literal byte buffer type */ 587 #define CMD_DAT_TIM 0x07 /* Time type HHMM<>seconds */ 588 589 /* 590 * Icom spectrum scope definitions 591 */ 592 593 #define SCOPE_MODE_CENTER 0x00 594 #define SCOPE_MODE_FIXED 0x01 595 #define SCOPE_MODE_SCROLL_C 0x02 596 #define SCOPE_MODE_SCROLL_F 0x03 597 598 #define SCOPE_SPEED_FAST 0x00 599 #define SCOPE_SPEED_MID 0x01 600 #define SCOPE_SPEED_SLOW 0x02 601 602 #define SCOPE_IN_RANGE 0x00 603 #define SCOPE_OUT_OF_RANGE 0x01 604 605 #endif /* _ICOM_DEFS_H */ 606