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