wctdm_user.h 1.6 KB

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