Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / ntp / include / icom.h
blob0bda6a8d8ce1413f47608633ff2577aaacd59d94
1 /* $NetBSD$ */
3 /*
4 * Header file for ICOM radios
5 */
6 #include "ntp_types.h"
8 /*
9 * Common definitions
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
19 #define IC1271 0x24
20 #define IC1275 0x18
21 #define IC271 0x20
22 #define IC275 0x10
23 #define IC375 0x12
24 #define IC471 0x22
25 #define IC475 0x14
26 #define IC575 0x16
27 #define IC725 0x28
28 #define IC726 0x30
29 #define IC735 0x04
30 #define IC751 0x1c
31 #define IC761 0x1e
32 #define IC765 0x2c
33 #define IC775 0x46
34 #define IC781 0x26
35 #define IC970 0x2e
36 #define R7000 0x08
37 #define R71 0x1a
38 #define R7100 0x34
39 #define R72 0x32
40 #define R8500 0x4a
41 #define R9000 0x2a
44 * CI-V frame 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 */
86 * Function prototypes
88 int icom_init P((char *, int, int));
89 int icom_freq P((int, int, double));