summaryrefslogtreecommitdiff
path: root/zaptel.h
diff options
context:
space:
mode:
authorjim <jim@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-11-04 20:04:53 +0000
committerjim <jim@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-11-04 20:04:53 +0000
commit7e99207e834bd395443af5f88453b0aea65d3315 (patch)
tree37bdd5563db7c329733f31693fa75e7b634a8529 /zaptel.h
parentb420103c9e0c8eaf5bf9c0b040642f08539a487f (diff)
Added support for Zapata Telephony Quad PCI Radio Interface card.
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@489 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.h')
-rwxr-xr-xzaptel.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/zaptel.h b/zaptel.h
index 14dd69f..8616169 100755
--- a/zaptel.h
+++ b/zaptel.h
@@ -304,6 +304,14 @@ char dialstr[ZT_MAX_DTMF_BUF];
} ZT_DIAL_OPERATION;
+typedef struct zt_indirect_data
+{
+int chan;
+int op;
+void *data;
+} ZT_INDIRECT_DATA;
+
+
/* ioctl definitions */
#define ZT_CODE 'J'
@@ -590,6 +598,12 @@ char dialstr[ZT_MAX_DTMF_BUF];
#define ZT_GETSIGFREEZE _IOR (ZT_CODE, 55, int)
/*
+ * Do a channel IOCTL from the /dev/zap/ctl interface
+ */
+#define ZT_INDIRECT _IOWR (ZT_CODE, 56, struct zt_indirect_data)
+
+
+/*
* 60-80 are reserved for private drivers
* 80-85 are reserved for dynamic span stuff
*/
@@ -1441,4 +1455,92 @@ static inline short zt_txtone_nextsample(struct zt_chan *ss)
#endif /* __KERNEL__ */
+/* The following is for the PCI RADIO interface only. This is specified in
+this file because external processes need to interact with the device.
+Some devices have private functions used for test/diagnostic only, but
+this is not the case here. */
+
+struct zt_radio_stat {
+ unsigned short ctcode_rx; /* code of currently received CTCSS
+ or DCS, 0 for none */
+ unsigned short ctclass; /* class of currently received CTCSS or
+ DCS code */
+ unsigned short ctcode_tx; /* code of currently encoded CTCSS or
+ DCS, 0 for none */
+ unsigned char radstat; /* status bits of radio */
+};
+
+struct zt_radio_param {
+ unsigned short radpar; /* param identifier */
+ unsigned short index; /* tone number */
+ int data; /* pointer to param */
+};
+
+
+/* Get current status IOCTL */
+#define ZT_RADIO_GETSTAT _IOR (ZT_CODE, 57, struct zt_radio_stat)
+/* Set a channel parameter IOCTL */
+#define ZT_RADIO_SETPARAM _IOW (ZT_CODE, 58, struct zt_radio_param)
+/* Get a channel parameter IOCTL */
+#define ZT_RADIO_GETPARAM _IOR (ZT_CODE, 59, struct zt_radio_param)
+
+
+/* Defines for Radio Status (zt_radio_stat.radstat) bits */
+
+#define ZT_RADSTAT_RX 1 /* currently "receiving " */
+#define ZT_RADSTAT_TX 2 /* currently "transmitting" */
+#define ZT_RADSTAT_RXCT 4 /* currently receiving continuous tone with
+ current settings */
+#define ZT_RADSTAT_RXCOR 8 /* currently receiving COR (irrelevant of COR
+ ignore) */
+#define ZT_RADSTAT_IGNCOR 16 /* currently ignoring COR */
+#define ZT_RADSTAT_IGNCT 32 /* currently ignoring CTCSS/DCS decode */
+#define ZT_RADSTAT_NOENCODE 64 /* currently blocking CTCSS/DCS encode */
+
+/* Defines for Radio Parameters (zt_radio_param.radpar) */
+
+#define ZT_RADPAR_INVERTCOR 1 /* invert the COR signal (0/1) */
+#define ZT_RADPAR_IGNORECOR 2 /* ignore the COR signal (0/1) */
+#define ZT_RADPAR_IGNORECT 3 /* ignore the CTCSS/DCS decode (0/1) */
+#define ZT_RADPAR_NOENCODE 4 /* block the CTCSS/DCS encode (0/1) */
+#define ZT_RADPAR_CORTHRESH 5 /* COR trigger threshold (0-7) */
+
+#define ZT_RADPAR_EXTRXTONE 6 /* 0 means use internal decoder, 1 means UIOA
+ logic true is CT decode, 2 means UIOA logic
+ false is CT decode */
+#define ZT_RADPAR_NUMTONES 7 /* returns maximum tone index (curently 15) */
+#define ZT_RADPAR_INITTONE 8 /* init all tone indexes to 0 (no tones) */
+#define ZT_RADPAR_RXTONE 9 /* CTCSS tone, (1-32) or DCS tone (1-777),
+ or 0 meaning no tone, set index also (1-15) */
+#define ZT_RADPAR_RXTONECLASS 10 /* Tone class (0-65535), set index also (1-15) */
+#define ZT_RADPAR_TXTONE 11 /* CTCSS tone (1-32) or DCS tone (1-777) or 0
+ to indicate no tone, to transmit
+ for this tone index (0-32, 0 disables
+ transmit CTCSS), set index also (0-15) */
+#define ZT_RADPAR_DEBOUNCETIME 12 /* receive indication debounce time,
+ milliseconds (1-999) */
+#define ZT_RADPAR_BURSTTIME 13 /* end of transmit with no CT tone in
+ milliseconds (0-999) */
+
+#if 0
+The following are not implemented in the prototype version of the card:
+(UIO will always be an input for external CTCSS decode input)
+
+#define ZT_RADPAR_UIODATA 14 /* read/write UIOA and UIOB data. Bit 0 is
+ UIOA, bit 1 is UIOB */
+#define ZT_RADPAR_UIOMODE 15 /* 0 means UIOA and UIOB are both outputs, 1
+ means UIOA is input, UIOB is output, 2
+ means UIOB is input and UIOA is output,
+ 3 means both UIOA and UIOB are inputs. Note
+ mode for UIOA is overridden when in
+ EXTRXTONE mode. */
+
+#define ZT_RADPAR_EXTDATA 16 /* read/write external byte, set index also
+ (0-2) */
+#define ZT_RADPAR_EXTMODE 17 /* set mode for external byte, bitwise a 1
+ means write, and 0 means read, set index
+ also (0-2) */
+
+#endif
+
#endif /* _LINUX_ZAPTEL_H */