| 1 |
/* |
| 2 |
* Wildcard S100P FXS Interface Driver for DAHDI Telephony interface |
| 3 |
* |
| 4 |
* Written by Mark Spencer <[email protected]> |
| 5 |
* |
| 6 |
* Copyright (C) 2001-2008, Digium, Inc. |
| 7 |
* |
| 8 |
* All rights reserved. |
| 9 |
* |
| 10 |
*/ |
| 11 |
|
| 12 |
/* |
| 13 |
* See http://www.asterisk.org for more information about |
| 14 |
* the Asterisk project. Please do not directly contact |
| 15 |
* any of the maintainers of this project for assistance; |
| 16 |
* the project provides a web site, mailing lists and IRC |
| 17 |
* channels for your use. |
| 18 |
* |
| 19 |
* This program is free software, distributed under the terms of |
| 20 |
* the GNU General Public License Version 2 as published by the |
| 21 |
* Free Software Foundation. See the LICENSE file included with |
| 22 |
* this program for more details. |
| 23 |
*/ |
| 24 |
|
| 25 |
#ifndef _WCTDM_H |
| 26 |
#define _WCTDM_H |
| 27 |
|
| 28 |
#include <linux/ioctl.h> |
| 29 |
|
| 30 |
#define NUM_REGS 109 |
| 31 |
#define NUM_INDIRECT_REGS 105 |
| 32 |
|
| 33 |
struct wctdm_stats { |
| 34 |
int tipvolt; /* TIP voltage (mV) */ |
| 35 |
int ringvolt; /* RING voltage (mV) */ |
| 36 |
int batvolt; /* VBAT voltage (mV) */ |
| 37 |
}; |
| 38 |
|
| 39 |
struct wctdm_regs { |
| 40 |
unsigned char direct[NUM_REGS]; |
| 41 |
unsigned short indirect[NUM_INDIRECT_REGS]; |
| 42 |
}; |
| 43 |
|
| 44 |
struct wctdm_regop { |
| 45 |
int indirect; |
| 46 |
unsigned char reg; |
| 47 |
unsigned short val; |
| 48 |
}; |
| 49 |
|
| 50 |
struct wctdm_echo_coefs { |
| 51 |
unsigned char acim; |
| 52 |
unsigned char coef1; |
| 53 |
unsigned char coef2; |
| 54 |
unsigned char coef3; |
| 55 |
unsigned char coef4; |
| 56 |
unsigned char coef5; |
| 57 |
unsigned char coef6; |
| 58 |
unsigned char coef7; |
| 59 |
unsigned char coef8; |
| 60 |
}; |
| 61 |
|
| 62 |
#define WCTDM_GET_STATS _IOR (DAHDI_CODE, 60, struct wctdm_stats) |
| 63 |
#define WCTDM_GET_REGS _IOR (DAHDI_CODE, 61, struct wctdm_regs) |
| 64 |
#define WCTDM_SET_REG _IOW (DAHDI_CODE, 62, struct wctdm_regop) |
| 65 |
#define WCTDM_SET_ECHOTUNE _IOW (DAHDI_CODE, 63, struct wctdm_echo_coefs) |
| 66 |
|
| 67 |
|
| 68 |
#endif /* _WCTDM_H */ |