4 * Header file for ICOM radios
11 #define P_ERMSG 0x1 /* trace bus error messages */
12 #define P_TRACE 0x2 /* trace CI-V messges */
13 #define RETRY 3 /* max packet retries */
14 #define IBAUD B1200 /* autotune port speed */
17 * Radio identifier codes
46 #define PR 0xfe /* preamble */
47 #define TX 0xe0 /* controller address */
48 #define FI 0xfd /* end of message */
49 #define ACK 0xfb /* controller normal reply */
50 #define NAK 0xfa /* controller error reply */
51 #define PAD 0xff /* transmit padding */
54 * CI-V controller commands
56 #define V_FREQT 0x00 /* freq set (transceive) */
57 #define V_MODET 0x01 /* set mode (transceive) */
58 #define V_RBAND 0x02 /* read band edge */
59 #define V_RFREQ 0x03 /* read frequency */
60 #define V_RMODE 0x04 /* read mode */
61 #define V_SFREQ 0x05 /* set frequency */
62 #define V_SMODE 0x06 /* set mode */
63 #define V_SVFO 0x07 /* select vfo */
64 #define V_SMEM 0x08 /* select channel/bank */
65 #define V_WRITE 0x09 /* write channel */
66 #define V_VFOM 0x0a /* memory -> vfo */
67 #define V_CLEAR 0x0b /* clear channel */
68 #define V_ROFFS 0x0c /* read tx offset */
69 #define V_SOFFS 0x0d /* write tx offset */
70 #define V_SCAN 0x0e /* scan control */
71 #define V_SPLIT 0x0f /* split control */
72 #define V_DIAL 0x10 /* set dial tuning step */
73 #define V_ATTEN 0x11 /* set attenuator */
74 #define V_SANT 0x12 /* select antenna */
75 #define V_ANNC 0x13 /* announce control */
76 #define V_WRCTL 0x14 /* write controls */
77 #define V_RDCTL 0x15 /* read controls */
78 #define V_TOGL 0x16 /* set switches */
79 #define V_ASCII 0x17 /* send CW message */
80 #define V_POWER 0x18 /* power control */
81 #define V_RDID 0x19 /* read model ID */
82 #define V_SETW 0x1a /* read/write channel/bank data */
83 #define V_CTRL 0x7f /* miscellaneous control */
88 int icom_init
P((char *, int, int));
89 int icom_freq
P((int, int, double));