/******************************************************************************
* ixj.h
*
*
* Device Driver for Quicknet Technologies, Inc.'s Telephony cards
* including the Internet PhoneJACK, Internet PhoneJACK Lite,
* Internet PhoneJACK PCI, Internet LineJACK, Internet PhoneCARD and
* SmartCABLE
*
* (c) Copyright 1999-2001 Quicknet Technologies, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Author: Ed Okerson, <eokerson@quicknet.net>
*
* Contributors: Greg Herlein, <gherlein@quicknet.net>
* David W. Erhart, <derhart@quicknet.net>
* John Sellers, <jsellers@quicknet.net>
* Mike Preston, <mpreston@quicknet.net>
*
* More information about the hardware related to this driver can be found
* at our website: http://www.quicknet.net
*
* Fixes:
*
* IN NO EVENT SHALL QUICKNET TECHNOLOGIES, INC. BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
* OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF QUICKNET
* TECHNOLOGIES, INC.HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* QUICKNET TECHNOLOGIES, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND QUICKNET TECHNOLOGIES, INC. HAS NO OBLIGATION
* TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
*****************************************************************************/
#define IXJ_VERSION 3031
#include <linux/types.h>
#include <linux/ixjuser.h>
#include <linux/phonedev.h>
typedef __u16 WORD;
typedef __u32 DWORD;
typedef __u8 BYTE;
typedef __u8 BOOL;
#ifndef IXJMAX
#define IXJMAX 16
#endif
#define TRUE 1
#define FALSE 0
/******************************************************************************
*
* This structure when unioned with the structures below makes simple byte
* access to the registers easier.
*
******************************************************************************/
typedef struct {
unsigned char low;
unsigned char high;
} BYTES;
typedef union {
BYTES bytes;
short word;
} IXJ_WORD;
typedef struct{
unsigned int b0:1;
unsigned int b1:1;
unsigned int b2:1;
unsigned int b3:1;
unsigned int b4:1;
unsigned int b5:1;
unsigned int b6:1;
unsigned int b7:1;
} IXJ_CBITS;
typedef union{
IXJ_CBITS cbits;
char cbyte;
} IXJ_CBYTE;
/******************************************************************************
*
* This structure represents the Hardware Control Register of the CT8020/8021
* The CT8020 is used in the Internet PhoneJACK, and the 8021 in the
* Internet LineJACK
*
******************************************************************************/
typedef struct {
unsigned int rxrdy:1;
unsigned int txrdy:1;
unsigned int status:1;
unsigned int auxstatus:1;
unsigned int rxdma:1;
unsigned int txdma:1;
unsigned int rxburst:1;
unsigned int txburst:1;
unsigned int dmadir:1;
unsigned int cont:1;
unsigned int<