Debian Codegraph @

hdlcutil/usersmdiag.h

raw symbols SCIP
1 /*****************************************************************************/
2
3 /*
4 * usersmdiag.h -- Diagnostics interface.
5 *
6 * Copyright (C) 1996 Thomas Sailer ([email protected])
7 * Swiss Federal Institute of Technology (ETH), Electronics Lab
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22 * 02110-1301, USA.
23 *
24 *
25 * This is the Linux realtime sound output driver
26 */
27
28 /*****************************************************************************/
29
30 #ifndef _USERSMDIAG_H
31 #define _USERSMDIAG_H
32
33 /* --------------------------------------------------------------------- */
34
35 #define USERSM_KEY_PROJ '0'
36
37 /* --------------------------------------------------------------------- */
38
39 #define USERSM_CMD_REQ_CHACCESS_PAR 0x00020
40 #define USERSM_CMD_ACK_CHACCESS_PAR 0x10021
41 #define USERSM_CMD_SET_CHACCESS_PAR 0x00022
42
43 #define USERSM_CMD_CALIBRATE 0x00030
44 #define USERSM_CMD_REQ_CHANNELSTATE 0x00031
45 #define USERSM_CMD_ACK_CHANNELSTATE 0x10032
46
47 #define USERSM_CMD_REQ_DIAG 0x00040
48 #define USERSM_CMD_ACK_DIAG 0x10041
49
50 #define USERSM_CMD_REQ_DRVNAME 0x00050
51 #define USERSM_CMD_ACK_DRVNAME 0x10051
52 #define USERSM_CMD_REQ_DRVMODE 0x00052
53 #define USERSM_CMD_ACK_DRVMODE 0x10053
54
55 /*
56 * diagnose modes; same as in <linux/soundmodem.h>
57 */
58 #define USERSM_DIAGMODE_OFF 0
59 #define USERSM_DIAGMODE_INPUT 1
60 #define USERSM_DIAGMODE_DEMOD 2
61 #define USERSM_DIAGMODE_CONSTELLATION 3
62
63 /*
64 * diagnose flags; same as in <linux/soundmodem.h>
65 */
66 #define USERSM_DIAGFLAG_DCDGATE (1<<0)
67 #define USERSM_DIAGFLAG_VALID (1<<1)
68
69 /* --------------------------------------------------------------------- */
70
71 #define DIAGDATALEN 64
72
73 /* --------------------------------------------------------------------- */
74
75 struct usersmmsg {
76 struct usersm_hdr {
77 long type;
78 unsigned int channel;
79 } hdr;
80 union {
81 struct usersm_chaccess_par {
82 int tx_delay; /* the transmitter keyup delay in 10ms units */
83 int tx_tail; /* the transmitter keyoff delay in 10ms units */
84 int slottime; /* the slottime in 10ms; usually 10 = 100ms */
85 int ppersist; /* the p-persistence 0..255 */
86 int fulldup; /* some driver do not support full duplex, setting */
87 /* this just makes them send even if DCD is on */
88 } cp;
89
90 int calib;
91
92 struct usersm_channel_state {
93 int ptt;
94 int dcd;
95 int ptt_keyed;
96 unsigned long tx_packets;
97 unsigned long tx_errors;
98 unsigned long rx_packets;
99 unsigned long rx_errors;
100 } cs;
101
102 struct usersm_diag {
103 unsigned int mode;
104 unsigned int flags;
105 unsigned int samplesperbit;
106 unsigned int datalen;
107 } diag;
108
109 struct usersm_diag_out {
110 struct usersm_diag diag;
111 short samples[DIAGDATALEN];
112 } diag_out;
113
114 char by[0];
115 } data;
116 };
117
118 /* --------------------------------------------------------------------- */
119 #endif /* _USERSMDIAG_H */