File: tables.c

package info (click to toggle)
icom 20040912-1.1
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 744 kB
  • ctags: 501
  • sloc: ansic: 3,086; csh: 65; makefile: 62; awk: 61
file content (580 lines) | stat: -rw-r--r-- 16,561 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
/*
 * Program to control ICOM radios
 *
 * Tables and chairs
 */
#include "icom.h"
#include <stdio.h>

/*
 * Keyboard mode commands
 */
struct cmdtable cmd[] = {
	{"agc",		C_AGC,		"AGC fast/slow"},
	{"am",		C_MODEG,	"set mode AM"},
	{"ant",		C_ANT,		"select antenna"},
	{"apf",		C_APF,		"APF on/off"},
	{"atten",	C_ATTEN,	"set attenuator"},
	{"band",	C_BAND,		"set band limits"},
	{"bank",	C_BANK,		"load bank/name"},
	{"cap",		C_PROBE,	"query capability"},
	{"change",	C_CHANGE,	"swap main and sub VFOs"},
	{"chan",	C_CHAN,		"read channel"},
	{"clear",	C_CLEAR,	"clear channel"},
	{"comp",	C_COMP,		"speech compressor control"},
	{"cw",		C_MODEG,	"set mode CW"},
	{"dial",	C_DIAL,		"set dial tuning step"},
	{"down",	C_DOWN,		"step down"},
	{"duplex",	C_DUPLEX,	"set transmit duplex"},
	{"fm",		C_MODEG,	"set mode FM"},
	{"freq",	C_FREQ,		"set frequency"},
	{"key",		C_KEY,		"send CW message"},
	{"load",	C_LOAD,		"load channel/name"},
	{"lsb",		C_MODEG,	"set mode LSB"},
	{"meter",	C_METER,	"read S meter and squelch"},
	{"misc",	C_MISC,		"miscellaneous control"},
	{"mode",	C_MODE,		"set mode/BFO compensation"},
	{"nb",		C_NB,		"NB on/off"},
	{"offset",	C_OFFSET,	"set VFO offset"},
	{"pad",		C_KEYPAD,	"switch to keypad mode"},
	{"peak",	C_APFC,		"APF control"},
	{"power",	C_POWER,	"power on/off"},
	{"preamp",	C_PAMP,		"preamp on/off"},
	{"quit",	C_QUIT,		"exit program"},
	{"qsk",		C_QSK,		"QSK control"},
	{"radio",	C_RADIO,	"select radio"},
	{"rate",	C_RATE,		"set tuning rate"},
	{"restore",	C_RESTORE,	"restore channels"},
	{"rtty",	C_MODEG,	"set mode RTTY"},
	{"save",	C_SAVE,		"save channels"},
	{"say",		C_ANNC,		"announce control"},
	{"squelch",	C_SQUELCH,	"squelch control"},
	{"scan",	C_SCAN,		"scan control"},
	{"shift",	C_SHIFT,	"IF shift control"},
	{"simplex",	C_SMPLX,	"receive on transmit frequency"},
	{"split",	C_SPLIT,	"toggle split mode with offset"},
	{"squelch",	C_SQUELCH,	"squelch control"},
	{"step",	C_STEP,		"set tuning step"},
	{"tone",	C_TONE,		"repeater tone"},	
	{"trace",	C_DEBUG,	"trace CI-V messages"},	
	{"up",		C_UP,		"step up"},
	{"usb",		C_MODEG,	"set mode USB"},
	{"verbose",	C_VERB,		"set verbose"},
	{"vfo",		C_VFO,		"VFO control"},
	{"vol",		C_VOLUME,	"volume control"},
	{"vox",		C_VOX,		"VOX control"},
	{"write",	C_WRITE,	"write channel"},
#ifdef AUDIO
	{"gain",	C_GAIN,		"adjust output level"},
	{"mute",	C_MUTE,		"mute output (toggle)"},
	{"port",	C_PORT,		"select input port"},
#endif /* AUDIO */
	{"\0",		C_FREQX,	"set VFO frequency"}
};

/*
 * Keypad mode commands
 */
struct cmdtable key[] = {
	{"\\",		C_ERASE,	"erase input"},
	{"/", 		C_SMPLX,	"receive on transmit frequency"},
	{"=",		C_CHANGE,	"swap main and sub VFOs"},
	{"[11",		C_ANT,		"F1 ant status"},
	{"[12",		C_APF,		"F2 apf status"},
	{"[13",		C_POWER,	"F3 power status"},
	{"[14",		C_AGC,		"F4 agc status"},
	{"[15",		C_NB,		"F5 nb status"},
	{"[17",		C_ATTEN,	"F6 atten status"},
	{"[18",		C_ANNC,		"F7 say status"},
	{"[19",		C_MISC,		"F8 misc status"},
	{"[a",		C_UP,		"UP step up"},
	{"[b",		C_DOWN,		"DOWN step down"},
	{"[c",		C_RUP,		"RIGHT tuning rate up"},
	{"[d",		C_RDOWN,	"LEFT tuning rate down"},
	{"]",		C_SPLIT,	"toggle split mode with offset"},
	{"a",		C_ANT,		"select antenna"},
	{"c",		C_CHAN,		"read channel"},
	{"f",		C_MODEG,	"set mode FM"},
	{"i",		C_SHIFT,	"IF shift control"},
	{"l",		C_MODEG,	"set mode LSB"},
	{"m",		C_MODEG,	"set mode AM"},
	{"p",		C_APFC,		"APF control"},
	{"q",		C_KEYBD,	"switch to keyboard mode"},
	{"s",		C_SQUELCH,	"squelch control"},
	{"t",		C_STEP,		"set tuning step"},
	{"u",		C_MODEG,	"set mode USB"},
	{"v",		C_VOLUME,	"volume control"},
	{"w",		C_WRITE,	"write channel"},
	{"x",		C_CLEAR,	"clear channel"},
#ifdef AUDIO
	{"g",		C_GAIN,		"adjust output gain"},
	{"o",		C_MUTE,		"mute output (toggle)"},
	{"p",		C_PORT,		"select input port"},
#endif /* AUDIO */
	{"\0",		C_FREQX,	"set VFO frequency"}
};

/*
 * Trace control subcommands
 */
struct cmdtable dbx[] = {
	{"all",		P_TRACE|P_ERMSG, "trace bus, packets"},
	{"bus",		P_TRACE,	"trace bus"},
	{"none",	0x0,		"trace none"},
	{"packet",	P_ERMSG,	"trace packet errors"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * R8500/R9000 initialization subcommands
 */
struct cmdvec p8500[] = {
#if 0
	{"agc",		{V_TOGL, S_AGC0, FI}, 	"slow"}, 
	{"apf",		{V_TOGL, S_APF0, FI}, 	"off"}, 
	{"atten",	{V_ATTEN, S_AT00, FI},	"off"},
	{"bank",	{V_SMEM, 0xa0, 0, FI},	"0 ?"},   
	{"dial",	{V_DIAL, 0, FI},	"10 Hz"},
	{"nb",		{V_TOGL, S_NB0, FI}, 	"off"}, 
	{"peak",	{V_WRCTL, S_WRAP, 1, 2 << 4 | 8, FI}, "0"}, 
	{"power",	{V_POWER, S_ON, FI},	"on"}, 
	{"say",		{V_ANNC, S_SAY0, FI},	"off"},
	{"scan",	{V_SCAN, 0, FI},	"stop"},
	{"shift",	{V_WRCTL, S_WRSH, 1, 2 << 4 | 8, FI}, "0"}, 
	{"squelch",	{V_WRCTL, S_WRSQ, 0, 0, FI}, "0"}, 
	{"vol",		{V_WRCTL, S_WRAF, 0, 0, FI}, "0"},
#endif
	{"\0",		{R_ERR},		""}
};

/*
 * 775/781 initialization subcommands
 */
struct cmdvec p775[] = {
	{"ant",		{V_SANT, S_ANT1, FI},	"1"},
	{"dial",	{V_DIAL, 0, FI},	"10 Hz"},
	{"split",	{V_SPLIT, S_OFF, FI},	"nosplit"},
	{"vfo",		{V_SVFO, S_DWOFF, FI},	"nowatch"},
	{"\0",		{R_ERR},		""}
};

/*
 * "verbose" subcommands
 */
struct cmdtable verbx[] = {
	{"on",		P_VERB,		"verbose"},
	{"off",		0,		"terse"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "vfo" subcommands
 */
struct cmdtable vfo[] = {
	{"a",		S_VFOA,		"select vfo a"},
	{"b",		S_VFOB,		"select vfo b"},
	{"btoa",	S_BTOA,		"vfo a <- vfo b"},
	{"equal",	S_EQUAL,	"main -> sub"},
	{"mainband",	S_MBAND,	"access main band"},
	{"nowatch",	S_DWOFF,	"dual watch off"},
	{"subband",	S_SBAND,	"access sub band"},
	{"swap",	S_XCHNG,	"main <-> sub"},
	{"watch",	S_DWON,		"dual watch on"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "scan" subcommands
 */
struct cmdtable scan[] = {
	{"10",		S_DF10,		"delta-f 10 kHz"},
	{"2.5",		S_DF2,		"delta-f 2.5 kHz"},
	{"20",		S_DF20,		"delta-f 20 kHz"},
	{"5",		S_DF5,		"delta-f 5 kHz"},
	{"50",		S_DF50,		"delta-f 50 kHz"},
	{"deltaf",	S_DFST,		"delta-f scan"},
	{"fdeltaf",	S_FDST,		"fine delta-f scan"},
	{"fix",		S_FIX,		"fix center frequency"},
	{"fprog",	S_FPST,		"fine program scan"},
	{"mem",		S_MSST,		"memory scan"},
	{"memauto",	S_AMST,		"auto write scan"},
	{"memchan",	S_MEMN,		"memory channel scan number"},
	{"memnum",	S_SNST,		"memory scan number"},
	{"memsel",	S_SMST,		"selected mode memory scan"},
	{"noresume",	S_SROFF,	"scan resume off"},
	{"notresume",	S_SRNOT,	"scan resume never"},
	{"novsc",	S_VSOFF,	"VSC off"},
	{"prog",	S_PSST,		"program scan"},
	{"resumea",	S_SRA,		"scan resume a (delay)"},
	{"resumeb",	S_SRB,		"scan resume b"},
	{"skip",	S_DSBM,		"disable memory channel"},
	{"start",	S_START,	"scan"},
	{"stop",	S_OFF,		"stop scan"},
	{"pstop",	S_PXST,		"priority scan"},
	{"unfix",	S_UNFIX,	"unfix center frequency"},
	{"unskip",	S_ENBM,		"enable memory channel"},
	{"vsc",		S_VSON,		"VSC on"},
	{"\0",		R_ERR,		"invalid argument"}
};
 
/*
 * "split" subcommands
 */
struct cmdtable split[] = {
	{"+",		S_DUPP,		"select +duplex"},
	{"-",		S_DUPM,		"select -duplex"},
	{"cancel",	S_DUPOF,	"cancel duplex"},
	{"nosplit",	S_OFF,		"split off"},
	{"split",	S_ON,		"split on"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "atten" subcommands
 */
struct cmdtable atten[] = {
	{"0",		S_AT00,		"off"},
	{"6",		S_AT06,		"6 dB"},
	{"10",		S_AT10,		"10 dB"},
	{"12",		S_AT12,		"12 dB"},
	{"18",		S_AT18,		"18 dB"},
	{"20",		S_AT20,		"20 dB"},
	{"30",		S_AT30,		"30 dB"},
	{"off",		S_AT00,		"off"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "ant" subcommands
 */
struct cmdtable ant[] = {
	{"1",		S_ANT1,		"antenna 1"},
	{"2",		S_ANT2,		"antenna 2"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "say" subcommands
 */
struct cmdtable annc[] = {
	{"off",		S_SAY0,		"announce off"},
	{"on",		S_SAY1,		"announce on"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "power" subcommands
 */
struct cmdtable power[] = {
	{"off",		S_OFF,		"power off"},
	{"on",		S_ON,		"power on"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "comp" subcommands
 */
struct cmdtable comp[] = {
	{"off",		S_COMP0,	"speech compressor off"},
	{"on",		S_COMP1,	"speech compressor on"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "qsk" subcommands
 */
struct cmdtable qsk[] = {
	{"off",		S_QSK0,		"qsk off"},
	{"on",		S_QSK1,		"qsk on"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "vox" subcommands
 */
struct cmdtable vox[] = {
	{"off",		S_VOX0,		"vox off"},
	{"on",		S_VOX1,		"vox on"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "tone" subcommands
 */
struct cmdtable tone[] = {
	{"off",		S_TONE0,	"tone off"},
	{"on",		S_TONE1,	"tone on"},
	{"nosquelch",	S_TSQ0,		"tone squelch off"},
	{"squelch",	S_TSQ1,		"tone squelch on"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "preamp" subcommands
 */
struct cmdtable preamp[] = {
	{"off",		S_PA0,		"preamp off"},
	{"on",		S_PA1,		"preamp on"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "agc" subcommands
 */
struct cmdtable agc[] = {		/* PCR1000 */
	{"slow",	S_AGC0,		"AGC slow"},
	{"fast",	S_AGC1,		"AGC fast"},
	{"\0",		R_ERR,		"invalid argument"}
};

struct cmdtable agc1[] = {		/* 706MKIIG */
	{"slow",	S_AGC2,		"AGC slow"},
	{"fast",	S_AGC3,		"AGC fast"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "nb" subcommands
 */
struct cmdtable nb[] = {		/* PCR1000 */
	{"off",		S_NB0,		"NB off"},
	{"on",		S_NB1,		"NB on"},
	{"\0",		R_ERR,		"invalid argument"}
};

struct cmdtable nb1[] = {		/* 706MKIIG */
	{"off",		S_NB2,		"NB off"},
	{"on",		S_NB3,		"NB on"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "apf" subcommands
 */
struct cmdtable apf[] = {
	{"off",		S_APF0,		"APF off"},
	{"on",		S_APF1,		"APF on"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "dial" subcommands
 */
struct cmdtable diala[] = {		/* R8500 */
	{".01",		0,		"10 Hz"},
	{".05",		1,		"50 Hz"},
	{".1",		2,		"100 Hz"},
	{"1",		3,		"1 kHz"},
	{"2.5",		4,		"2.5 kHz"},
	{"5",		5,		"5 kHz"},
	{"9",		6,		"9 kHz"},
	{"10",		7,		"10 kHz"},
	{"12.5",	8,		"12.5 kHz"},
	{"20",		9,		"20 kHz"},
	{"25",		10,		"25 kHz"},
	{"100",		11,		"100 kHz"},
	{"1000",	12,		"1 MHz"},
	{"*",		13,		"* kHz"},
	{"\0",		R_ERR,		"invalid argument"}
};

struct cmdtable dialb[] = {		/* 775 */
	{".01",		0,		"10 Hz"},
	{"1",		1,		"1 kHz"},
	{"2",		2,		"2 kHz"},
	{"3",		3,		"3 kHz"},
	{"4",		4,		"4 kHz"},
	{"5",		5,		"5 kHz"},
	{"6",		6,		"6 kHz"},
	{"7",		7,		"7 kHz"},
	{"8",		8,		"8 kHz"},
	{"9",		9,		"9 kHz"},
	{"10",		10,		"10 kHz"},
	{"\0",		R_ERR,		"invalid argument"}
};

struct cmdtable dialc[] = {		/* 706MKIIG */
	{".01",		0,		"10 Hz"},
	{".1",		1,		"100 Hz"},
	{"1",		2,		"1 kHz"},
	{"5",		3,		"5 kHz"},
	{"9",		4,		"9 kHz"},
	{"10",		5,		"10 kHz"},
	{"12.5",	6,		"12.5 kHz"},
	{"20",		7,		"20 kHz"},
	{"25",		8,		"25 kHz"},
	{"100",		9,		"100 kHz"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "misc" subcommands
 */
struct cmdtable misc[] = {
	{"ctss",	S_CTSS,		"read CTSS"},
	{"dcs",		S_DCS,		"read DCS"},
	{"dtmf",	S_DTMF,		"read DTMF"},
	{"freq",	S_NXFM,		"next frequency"},
	{"id",		S_RDID,		"read ID"},
	{"local",	S_LCL,		"local control"},
	{"nosearch",	S_SMOFF,	"disable search"},
	{"nospeaker",	S_SPOFF,	"mute speaker"},
	{"notape",	S_TPOFF,	"disable tape recorder"},
	{"nowindow",	S_5OFF,		"disable search window"},
	{"opto",	S_OPTO,		"read OPTO"},
	{"remote",	S_RMT,		"remote control"},
	{"search",	S_SMON,		"enable search"},
	{"speaker",	S_SPON,		"unmute speaker"},
	{"tape",	S_TPON,		"enable tape recorder"},
	{"window",	S_5ON,		"enable search window"},
	{"\0",		R_ERR,		"invalid argument"}
};

/*
 * "load" subcommands
 */
struct cmdtable loadtab[] = {
	{"name",	D_NAME,		"set name"},
	{"mode",	D_MODE,		"set mode"},
	{"dial",	D_DIAL,		"set dial tuning step"},
	{"atten",	D_ATTEN,	"set attenuator"},
	{"duplex",	D_DUPLEX,	"set transmit offset"},
	{"\0",		R_ERR,		"unknown subcommand"}
};

/*
 * Radio identifier decode
 */
struct cmdtable identab[] = {
	{"1271",	0x24,		"1271 UHF Transceiver"},
	{"1275",	0x18,		"1275 UHF Transceiver"},
	{"271",		0x20,		"271 VHF Transceiver"},
	{"275",		0x10,		"275 VHF Transceiver"},
	{"375",		0x12,		"375 VHF Transceiver"},
	{"471",		0x22,		"471 UHF Transceiver"},
	{"475",		0x14,		"475 UHF Transceiver"},
	{"575",		0x16,		"575 VHF Transceiver"},
	{"575",		0x28,		"725 HF Transceiver"},
	{"706",		0x4e,		"706 HF Transceiver"},
	{"706G",	0x58,		"706MKIIG HF Transceiver"},
	{"726",		0x30,		"726 HF Transceiver"},
	{"735",		0x04,		"735 HF Transceiver"},
	{"751",		0x1c,		"751 HF Transceiver"},
	{"756",		0x64,		"756 HF Transceiver"},
	{"761",		0x1e,		"761 HF Transceiver"},
	{"765",		0x2c,		"765 HF Transceiver"},
	{"775",		0x46,		"775 HF Transceiver"},
	{"781",		0x26,		"781 HF Transceiver"},
	{"970",		0x2e,		"970 HF Transceiver"},
	{"R7000",	0x08,		"R7000 VHF/UHF Receiver"},
	{"R71",		0x1A,		"R71 HF Receiver"},
	{"R7100",	0x34,		"R7100 VHF/UHF Receiver"},
	{"R72",		0x32,		"R72 HF Receiver"},
	{"R8500",	0x4a,		"R8500 HF/VHF/UHF Receiver"},
	{"R9000",	0x2a,		"R9000 VHF/UHF Receiver"},
	{"probe",	0x00,		"Probe all radios"},
	{"\0",		R_ERR,		"unknown radio"}
};

/*
 * Broadband HF/VHF/UHF receiver mode decode (R7000)
 *
 * Note that panel FM mode is really wideband FM and panel FMn mode is
 * really FM mode on other radios. Clearing a channel changes the mode
 * to 0xff, but does not change the frequency. Reactivate the channel
 * by loading valid mode.
 */
static struct cmdtable mode2[] = {
	{"AM",		0x0002,		"AM"},
	{"m",		0x0002,		"AM (keypad)"},
	{"FMn",		0x8205,		"FM"},
	{"WFM",		0x0005,		"WFM"},
	{"f",		0x8205,		"FM (keypad)"},
	{"SSB",		0x8005,		"SSB"},
	{"s",		0x8005,		"SSB (keypad)"},
	{"\0",		R_ERR,		"invalid mode"}
};

/*
 * Broadband MF/HF/VHF/UHF receiver mode decode (R8500/R9000)
 */
static struct cmdtable mode3[] = {
	{"AM",		0x8202,		"AM"},
	{"AMn",		0x8302,		"AM narrow"},
	{"AMw",		0x8102,		"AM wide"},
	{"CW",		0x8103,		"CW"},
	{"CWn",		0x8203,		"CW narrow"},
	{"FM",		0x8105,		"FM"},
	{"f",		0x8105,		"FM (keypad)"},
	{"FMn",		0x8205,		"FM narrow"},
	{"LSB",		0x8100,		"LSB"},
	{"l",		0x8100,		"LSB (keypad)"},
	{"m",		0x8202,		"AM (keypad)"},
	{"USB",		0x8101,		"USB"},
	{"u",		0x8101,		"USB (keypad)"},
	{"WFM",		0x8106,		"WFM"},
	{"\0",		R_ERR,		"invalid mode"}
};

/*
 * Narrowband MF/HF/VHF/UHF transceiver and receiver mode decode
 */
static struct cmdtable mode1[] = {
	{"AM",		0x0002,		"AM"},
	{"AMn",		0x8202,		"AM narrow"},
	{"AMw",		0x8102,		"AM wide"},
	{"CW",		0x0003,		"CW"},
	{"CWn",		0x8203,		"CW narrow"},
	{"CWw",		0x8103,		"CW wide"},
	{"FM",		0x0005,		"FM"},
	{"f",		0x0005,		"FM (keypad)"},
	{"FMn",		0x8205,		"FM narrow"},
	{"FMw",		0x8105,		"FM wide"},
	{"LSB",		0x0000,		"LSB"},
	{"l",		0x0000,		"LSB (keypad)"},
	{"LSBn",	0x8200,		"LSB narrow"},
	{"LSBw",	0x8100,		"LSB wide"},
	{"m",		0x0002,		"AM (keypad)"},
	{"RTTY",	0x0004,		"RTTY"},
	{"RTTYn",	0x8204,		"RTTY narrow"},
	{"RTTYw",	0x8104,		"RTTY wide"},
	{"USB",		0x0001,		"USB"},
	{"u",		0x0001,		"USB (keypad)"},
	{"USBn",	0x8201,		"USB narrow"},
	{"USBw",	0x8101,		"USB wide"},
	{"WFM",		0x0006,		"FM broadcast"},
	{"\0",		R_ERR,		"invalid mode"}
};

/*
 * Radio control initialization
 */
struct namestruct name[] = {
	{"1271",  0x24,	32,  0,  NULL,  mode1, NULL, 0, NULL},
	{"1275",  0x18,	32,  0,  NULL,  mode1, NULL, 0, NULL},
	{"271",	  0x20,	32,  0,  NULL,  mode1, NULL, 0, NULL},
	{"275",	  0x10,	101, 0,  NULL,  mode1, NULL, 0, NULL},
	{"375",	  0x12,	101, 0,  NULL,  mode1, NULL, 0, NULL},
	{"471",	  0x22,	32,  0,  NULL,  mode1, NULL, 0, NULL},
	{"475",	  0x14,	101, 0,  NULL,  mode1, NULL, 0, NULL},
	{"575",	  0x16,	101, 0,  NULL,  mode1, NULL, 0, NULL},
	{"706",   0x4e, 10,  0,  NULL,  mode1, NULL, 0, NULL},
	{"706G",  0x58, 101, 0,  NULL,  mode1, dialc, 0, NULL},
 	{"725",	  0x28,	26,  0,  NULL,  mode1, NULL, 0, NULL},
	{"726",	  0x30,	26,  0,  NULL,  mode1, NULL, 0, NULL},
	{"735",	  0x04,	12,  0,  NULL,  mode1, NULL, F_735, NULL},
	{"751",	  0x1c,	32,  0,  NULL,  mode1, NULL, 0, NULL},
	{"756",   0x64, 101, 0,  NULL,  mode1, dialc, 0, NULL},
	{"761",	  0x1e,	32,  0,  NULL,  mode1, NULL, 0, NULL},
	{"765",	  0x2c,	101, 0,  NULL,  mode1, NULL, 0, NULL},
	{"775",	  0x46,	101, 0,  p775,  mode1, dialb, 0, NULL},
	{"781",	  0x26,	101, 0,  p775,  mode1, NULL, 0, NULL},
	{"970",	  0x2e,	101, 0,  NULL,  mode1, NULL, 0, NULL},
	{"R7000", 0x08,	99,  0,  NULL,  mode2, NULL, 0, NULL},
	{"R71",	  0x1A,	32,  0,  NULL,  mode1, NULL, 0, NULL},
	{"R7100", 0x34,	99,  0,  NULL,  mode2, NULL, 0, NULL},
	{"R72",	  0x32,	101, 0,  NULL,  mode1, NULL, 0, NULL},
	{"R8500", 0x4a,	39,  19, p8500, mode3, diala, 0, NULL},
	{"R9000", 0x2a,	99,  0,  p8500, mode3, NULL, 0, NULL},
	{"\0",	  0x0,	0,   0,  0,     0,     NULL, 0, NULL} /* end */
};