
/*
 *
  Copyright (c) Eicon Networks, 2002.
 *
  This source file is supplied for the use with
  Eicon Networks range of DIVA Server Adapters.
 *
  Eicon File Revision :    2.1
 *
  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, or (at your option)
  any later version.
 *
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU General Public License for more details.
 *
  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */
#ifndef __DIVA_SYNC__H  
#define __DIVA_SYNC__H
#define IDI_SYNC_REQ_REMOVE             0x00
#define IDI_SYNC_REQ_GET_NAME           0x01
#define IDI_SYNC_REQ_GET_SERIAL         0x02
#define IDI_SYNC_REQ_SET_POSTCALL       0x03
#define IDI_SYNC_REQ_GET_XLOG           0x04
#define IDI_SYNC_REQ_GET_FEATURES       0x05
#define IDI_SYNC_REQ_USB_REGISTER       0x06
#define IDI_SYNC_REQ_USB_RELEASE        0x07
#define IDI_SYNC_REQ_USB_ADD_DEVICE     0x08
#define IDI_SYNC_REQ_USB_START_DEVICE   0x09
#define IDI_SYNC_REQ_USB_STOP_DEVICE    0x0A
#define IDI_SYNC_REQ_USB_REMOVE_DEVICE  0x0B
#define IDI_SYNC_REQ_GET_CARDTYPE       0x0C
#define IDI_SYNC_REQ_GET_DBG_XLOG       0x0D
#define DIVA_USB
#define DIVA_USB_REQ                    0xAC
#define DIVA_USB_TEST                   0xAB
#define DIVA_USB_ADD_ADAPTER            0xAC
#define DIVA_USB_REMOVE_ADAPTER         0xAD
#define IDI_SYNC_REQ_SERIAL_HOOK        0x80
#define IDI_SYNC_REQ_XCHANGE_STATUS     0x81
#define IDI_SYNC_REQ_USB_HOOK           0x82
#define IDI_SYNC_REQ_PORTDRV_HOOK       0x83
#define IDI_SYNC_REQ_SLI                0x84   /*  SLI request from 3signal modem drivers */
#define IDI_SYNC_REQ_RECONFIGURE        0x85
#define IDI_SYNC_REQ_RESET              0x86
#define IDI_SYNC_REQ_GET_85X_DEVICE_DATA     0x87
#define IDI_SYNC_REQ_LOCK_85X                   0x88
#define IDI_SYNC_REQ_DIVA_85X_USB_DATA_EXCHANGE 0x99
#define IDI_SYNC_REQ_DIPORT_EXCHANGE_REQ   0x98
#define IDI_SYNC_REQ_GET_85X_EXT_PORT_TYPE      0xA0
/******************************************************************************/
#define IDI_SYNC_REQ_XDI_GET_EXTENDED_FEATURES  0x92
/*
   To receive XDI features:
   1. set 'buffer_length_in_bytes' to length of you buffer
   2. set 'features' to pointer to your buffer
   3. issue synchronous request to XDI
   4. Check that feature 'DIVA_XDI_EXTENDED_FEATURES_VALID' is present
      after call. This feature does indicate that your request
      was processed and XDI does support this synchronous request
   5. if on return bit 31 (0x80000000) in 'buffer_length_in_bytes' is
      set then provided buffer was too small, and bits 30-0 does
      contain necessary length of buffer.
      in this case only features that do find place in the buffer
      are indicated to caller
*/
typedef struct _diva_xdi_get_extended_xdi_features {
  dword buffer_length_in_bytes;
  byte  *features;
} diva_xdi_get_extended_xdi_features_t;
/*
   features[0]
  */
#define DIVA_XDI_EXTENDED_FEATURES_VALID          0x01
#define DIVA_XDI_EXTENDED_FEATURE_CMA             0x02
#define DIVA_XDI_EXTENDED_FEATURE_SDRAM_BAR       0x04
#define DIVA_XDI_EXTENDED_FEATURE_CAPI_PRMS       0x08
#define DIVA_XDI_EXTENDED_FEATURE_NO_CANCEL_RC    0x10
#define DIVA_XDI_EXTENDED_FEATURE_RX_DMA          0x20
#define DIVA_XDI_EXTENDED_FEATURE_MANAGEMENT_DMA  0x40
#define DIVA_XDI_EXTENDED_FEATURE_WIDE_ID         0x80
#define DIVA_XDI_EXTENDED_FEATURES_MAX_SZ    1
/******************************************************************************/
#define IDI_SYNC_REQ_XDI_GET_ADAPTER_SDRAM_BAR   0x93
typedef struct _diva_xdi_get_adapter_sdram_bar {
 dword bar;
} diva_xdi_get_adapter_sdram_bar_t;
/******************************************************************************/
#define IDI_SYNC_REQ_XDI_GET_CAPI_PARAMS   0x94
/*
  CAPI Parameters will be written in the caller's buffer
  */
typedef struct _diva_xdi_get_capi_parameters {
  dword structure_length;
  byte flag_dynamic_l1_down;
  byte group_optimization_enabled;
} diva_xdi_get_capi_parameters_t;
/******************************************************************************/
#define IDI_SYNC_REQ_XDI_GET_LOGICAL_ADAPTER_NUMBER   0x95
/*
  Get logical adapter number, as assigned by XDI
  'controller' is starting with zero 'sub' controller number
  in case of one adapter that supports multiple interfaces
  'controller' is zero for Master adapter (and adapter that supports
  only one interface)
  */
typedef struct _diva_xdi_get_logical_adapter_number {
  dword logical_adapter_number;
  dword controller;
  dword total_controllers;
} diva_xdi_get_logical_adapter_number_s_t;
/******************************************************************************/
#define IDI_SYNC_REQ_UP1DM_OPERATION   0x96
/******************************************************************************/
#define IDI_SYNC_REQ_DMA_DESCRIPTOR_OPERATION 0x97
#define IDI_SYNC_REQ_DMA_DESCRIPTOR_ALLOC     0x01
#define IDI_SYNC_REQ_DMA_DESCRIPTOR_FREE      0x02
typedef struct _diva_xdi_dma_descriptor_operation {
  int   operation;
  int   descriptor_number;
  void* descriptor_address;
  dword descriptor_magic;
} diva_xdi_dma_descriptor_operation_t;
/******************************************************************************/
#define IDI_SYNC_REQ_DIDD_REGISTER_ADAPTER_NOTIFY   0x01
#define IDI_SYNC_REQ_DIDD_REMOVE_ADAPTER_NOTIFY     0x02
#define IDI_SYNC_REQ_DIDD_ADD_ADAPTER               0x03
#define IDI_SYNC_REQ_DIDD_REMOVE_ADAPTER            0x04
#define IDI_SYNC_REQ_DIDD_READ_ADAPTER_ARRAY        0x05
#define IDI_SYNC_REQ_DIDD_GET_CFG_LIB_IFC           0x10
typedef struct _diva_didd_adapter_notify {
 dword handle; /* Notification handle */
 void   * callback;
 void   * context;
} diva_didd_adapter_notify_t;
typedef struct _diva_didd_add_adapter {
 void   * descriptor;
} diva_didd_add_adapter_t;
typedef struct _diva_didd_remove_adapter {
 IDI_CALL p_request;
} diva_didd_remove_adapter_t;
typedef struct _diva_didd_read_adapter_array {
 void   * buffer;
 dword length;
} diva_didd_read_adapter_array_t;
typedef struct _diva_didd_get_cfg_lib_ifc {
 void* ifc;
} diva_didd_get_cfg_lib_ifc_t;
/******************************************************************************/
#define IDI_SYNC_REQ_XDI_GET_STREAM    0x91
#define DIVA_XDI_SYNCHRONOUS_SERVICE   0x01
#define DIVA_XDI_DMA_SERVICE           0x02
#define DIVA_XDI_AUTO_SERVICE          0x03
#define DIVA_ISTREAM_COMPLETE_NOTIFY   0
#define DIVA_ISTREAM_COMPLETE_READ     1
#define DIVA_ISTREAM_COMPLETE_WRITE    2
typedef struct _diva_xdi_stream_interface {
  unsigned char  Id;                 /* filled by XDI client */
 unsigned char provided_service;    /* filled by XDI        */
 unsigned char requested_service;   /* filled by XDI Client */
 void* xdi_context;    /* filled by XDI     */
 void* client_context;   /* filled by XDI client */
 int (*write)(void* context,
               int Id,
               void* data,
               int length,
               int final,
               byte usr1,
               byte usr2);
 int (*read)(void* context,
              int Id,
              void* data,
              int max_length,
              int* final,
              byte* usr1,
              byte* usr2);
 int (*complete)(void* client_context,
         int Id,
          int what,
         void* data,
         int length,
         int* final);
} diva_xdi_stream_interface_t;
/******************************************************************************/
/*
 * IDI_SYNC_REQ_SERIAL_HOOK - special interface for the DIVA Mobile card
 */
typedef struct
{ unsigned char LineState;         /* Modem line state (STATUS_R) */
#define SERIAL_GSM_CELL 0x01   /* GSM or CELL cable attached  */
 unsigned char CardState;          /* PCMCIA card state (0 = down) */
 unsigned char IsdnState;          /* ISDN layer 1 state (0 = down)*/
 unsigned char HookState;          /* current logical hook state */
#define SERIAL_ON_HOOK 0x02   /* set in DIVA CTRL_R register */
} SERIAL_STATE;
typedef int (  * SERIAL_INT_CB) (void *Context) ;
typedef int (  * SERIAL_DPC_CB) (void *Context) ;
typedef unsigned char (  * SERIAL_I_SYNC) (void *Context) ;
typedef struct
{ /* 'Req' and 'Rc' must be at the same place as in the ENTITY struct */
 unsigned char Req;             /* request (must be always 0) */
 unsigned char Rc;              /* return code (is the request) */
 unsigned char Function;           /* private function code  */
#define SERIAL_HOOK_ATTACH 0x81
#define SERIAL_HOOK_STATUS 0x82
#define SERIAL_HOOK_I_SYNC 0x83
#define SERIAL_HOOK_NOECHO 0x84
#define SERIAL_HOOK_RING 0x85
#define SERIAL_HOOK_DETACH 0x8f
 unsigned char Flags;           /* function refinements   */
 /* parameters passed by the the ATTACH request      */
 SERIAL_INT_CB InterruptHandler; /* called on each interrupt  */
 SERIAL_DPC_CB DeferredHandler; /* called on hook state changes */
 void   *HandlerContext; /* context for both handlers */
 /* return values for both the ATTACH and the STATUS request   */
 unsigned long IoBase;    /* IO port assigned to UART  */
 SERIAL_STATE State;
 /* parameters and return values for the I_SYNC function    */
 SERIAL_I_SYNC SyncFunction;  /* to be called synchronized */
 void   *SyncContext;  /* context for this function */
 unsigned char SyncResult;   /* return value of function  */
} SERIAL_HOOK;
/*
 * IDI_SYNC_REQ_XCHANGE_STATUS - exchange the status between IDI and WMP
 * IDI_SYNC_REQ_RECONFIGURE - reconfiguration of IDI from WMP
 */
typedef struct
{ /* 'Req' and 'Rc' must be at the same place as in the ENTITY struct */
 unsigned char Req;             /* request (must be always 0) */
 unsigned char Rc;              /* return code (is the request) */
#define DRIVER_STATUS_BOOT  0xA1
#define DRIVER_STATUS_INIT_DEV 0xA2
#define DRIVER_STATUS_RUNNING 0xA3
#define DRIVER_STATUS_SHUTDOWN 0xAF
#define DRIVER_STATUS_TRAPPED 0xAE
 unsigned char wmpStatus;          /* exported by WMP              */
 unsigned char idiStatus;   /* exported by IDI              */
 unsigned long wizProto ;   /* from WMP registry to IDI     */
 /* the cardtype value is defined by cardtype.h */
 unsigned long cardType ;   /* from IDI registry to WMP     */
 unsigned long nt2 ;    /* from IDI registry to WMP     */
 unsigned long permanent ;   /* from IDI registry to WMP     */
 unsigned long stableL2 ;   /* from IDI registry to WMP     */
 unsigned long tei ;    /* from IDI registry to WMP     */
#define CRC4_MASK   0x00000003
#define L1_TRISTATE_MASK 0x00000004
#define WATCHDOG_MASK  0x00000008
#define NO_ORDER_CHECK_MASK 0x00000010
#define LOW_CHANNEL_MASK 0x00000020
#define NO_HSCX30_MASK  0x00000040
#define SET_BOARD   0x00001000
#define SET_CRC4   0x00030000
#define SET_L1_TRISTATE  0x00040000
#define SET_WATCHDOG  0x00080000
#define SET_NO_ORDER_CHECK 0x00100000
#define SET_LOW_CHANNEL  0x00200000
#define SET_NO_HSCX30  0x00400000
#define SET_MODE   0x00800000
#define SET_PROTO   0x02000000
#define SET_CARDTYPE  0x04000000
#define SET_NT2    0x08000000
#define SET_PERMANENT  0x10000000
#define SET_STABLEL2  0x20000000
#define SET_TEI    0x40000000
#define SET_NUMBERLEN  0x80000000
 unsigned long Flag ;  /* |31-Type-16|15-Mask-0| */
 unsigned long NumberLen ; /* reconfiguration: union is empty */
 union {
  struct {    /* possible reconfiguration, but ... ; SET_BOARD */
   unsigned long SerialNumber ;
   char     *pCardname ; /* di_defs.h: BOARD_NAME_LENGTH */
  } board ;
  struct {      /* reset: need resources */
   void * pRawResources ;
   void * pXlatResources ;
  } res ;
  struct { /* reconfiguration: wizProto == PROTTYPE_RBSCAS */
#define GLARE_RESOLVE_MASK 0x00000001
#define DID_MASK   0x00000002
#define BEARER_CAP_MASK  0x0000000c
#define SET_GLARE_RESOLVE 0x00010000
#define SET_DID    0x00020000
#define SET_BEARER_CAP  0x000c0000
   unsigned long Flag ;  /* |31-Type-16|15-VALUE-0| */
   unsigned short DigitTimeout ;
   unsigned short AnswerDelay ;
  } rbs ;
  struct { /* reconfiguration: wizProto == PROTTYPE_QSIG */
#define CALL_REF_LENGTH1_MASK 0x00000001
#define BRI_CHANNEL_ID_MASK  0x00000002
#define SET_CALL_REF_LENGTH  0x00010000
#define SET_BRI_CHANNEL_ID  0x00020000
   unsigned long Flag ;  /* |31-Type-16|15-VALUE-0| */
  } qsig ;
  struct { /* reconfiguration: NumberLen != 0 */
#define SET_SPID1   0x00010000
#define SET_NUMBER1   0x00020000
#define SET_SUBADDRESS1  0x00040000
#define SET_SPID2   0x00100000
#define SET_NUMBER2   0x00200000
#define SET_SUBADDRESS2  0x00400000
#define MASK_SET   0xffff0000
   unsigned long Flag ;   /* |31-Type-16|15-Channel-0| */
   unsigned char *pBuffer ; /* number value */
  } isdnNo ;
 }
parms
;
} isdnProps ;
/*
 * IDI_SYNC_REQ_PORTDRV_HOOK - signal plug/unplug (Award Cardware only)
 */
typedef void (  * PORTDRV_HOOK_CB) (void *Context, int Plug) ;
typedef struct
{ /* 'Req' and 'Rc' must be at the same place as in the ENTITY struct */
 unsigned char Req;             /* request (must be always 0) */
 unsigned char Rc;              /* return code (is the request) */
 unsigned char Function;           /* private function code  */
 unsigned char Flags;           /* function refinements   */
 PORTDRV_HOOK_CB Callback;   /* to be called on plug/unplug */
 void   *Context;   /* context for callback   */
 unsigned long Info;    /* more info if needed   */
} PORTDRV_HOOK ;
/*  Codes for the 'Rc' element in structure below. */
#define SLI_INSTALL     (0xA1)
#define SLI_UNINSTALL   (0xA2)
typedef int ( * SLIENTRYPOINT)(void* p3SignalAPI, void* pContext);
typedef struct
{   /* 'Req' and 'Rc' must be at the same place as in the ENTITY struct */
    unsigned char   Req;                /* request (must be always 0)   */
    unsigned char   Rc;                 /* return code (is the request) */
    unsigned char   Function;           /* private function code        */
    unsigned char   Flags;              /* function refinements         */
    SLIENTRYPOINT   Callback;           /* to be called on plug/unplug  */
    void            *Context;           /* context for callback         */
    unsigned long   Info;               /* more info if needed          */
} SLIENTRYPOINT_REQ ;
/******************************************************************************/
/*
 *  Definitions for DIVA USB
 */
typedef int  (  * USB_SEND_REQ) (unsigned char PipeIndex, unsigned char Type,void *Data, int sizeData);
typedef int  (  * USB_START_DEV) (void *Adapter, void *Ipac) ;
/* called from WDM */
typedef void (  * USB_RECV_NOTIFY) (void *Ipac, void *msg) ;
typedef void (  * USB_XMIT_NOTIFY) (void *Ipac, unsigned char PipeIndex) ;
/******************************************************************************/
/*
 * Parameter description for synchronous requests.
 *
 * Sorry, must repeat some parts of di_defs.h here because
 * they are not defined for all operating environments
 */
typedef union
{ ENTITY Entity;
 struct
 { /* 'Req' and 'Rc' are at the same place as in the ENTITY struct */
  unsigned char   Req; /* request (must be always 0) */
  unsigned char   Rc;  /* return code (is the request) */
 }   Request;
 struct
 { unsigned char   Req; /* request (must be always 0) */
  unsigned char   Rc;  /* return code (0x01)   */
  unsigned char   name[BOARD_NAME_LENGTH];
 }   GetName;
 struct
 { unsigned char   Req; /* request (must be always 0) */
  unsigned char   Rc;  /* return code (0x02)   */
  unsigned long   serial; /* serial number    */
 }   GetSerial;
 struct
 { unsigned char   Req; /* request (must be always 0) */
  unsigned char   Rc;  /* return code (0x02)   */
  unsigned long   lineIdx;/* line, 0 if card has only one */
 }   GetLineIdx;
 struct
 { unsigned char  Req;     /* request (must be always 0) */
  unsigned char  Rc;      /* return code (0x02)   */
  unsigned long  cardtype;/* card type        */
 }   GetCardType;
 struct
 { unsigned short command;/* command = 0x0300 */
  unsigned short dummy; /* not used */
  IDI_CALL       callback;/* routine to call back */
  ENTITY      *contxt; /* ptr to entity to use */
 }   PostCall;
 struct
 { unsigned char  Req;  /* request (must be always 0) */
  unsigned char  Rc;   /* return code (0x04)   */
  unsigned char  pcm[1]; /* buffer (a pc_maint struct) */
 }   GetXlog;
 struct
 { unsigned char  Req;  /* request (must be always 0) */
  unsigned char  Rc;   /* return code (0x05)   */
  unsigned short features;/* feature defines see below */
 }   GetFeatures;
 SERIAL_HOOK  SerialHook;
/* Added for DIVA USB */
 struct
 { unsigned char   Req;
  unsigned char   Rc;
  USB_SEND_REQ    UsbSendRequest; /* function in Diva Usb WDM driver in usb_os.c, */
                                        /* called from usb_drv.c to send a message to our device */
                                        /* eg UsbSendRequest (USB_PIPE_SIGNAL, USB_IPAC_START, 0, 0) ; */
  USB_RECV_NOTIFY usb_recv;       /* called from usb_os.c to pass a received message and ptr to IPAC */
                                        /* on to usb_drv.c by a call to usb_recv(). */
  USB_XMIT_NOTIFY usb_xmit;       /* called from usb_os.c in DivaUSB.sys WDM to indicate a completed transmit */
                                        /* to usb_drv.c by a call to usb_xmit(). */
  USB_START_DEV   UsbStartDevice; /* Start the USB Device, in usb_os.c */
  IDI_CALL        callback;       /* routine to call back */
  ENTITY          *contxt;     /* ptr to entity to use */
  void            ** ipac_ptr;    /* pointer to struct IPAC in VxD */
 } Usb_Msg_old;
/* message used by WDM and VXD to pass pointers of function and IPAC* */
 struct
 { unsigned char Req;
  unsigned char Rc;
        USB_SEND_REQ    pUsbSendRequest;/* function in Diva Usb WDM driver in usb_os.c, */
                                        /* called from usb_drv.c to send a message to our device */
                                        /* eg UsbSendRequest (USB_PIPE_SIGNAL, USB_IPAC_START, 0, 0) ; */
        USB_RECV_NOTIFY p_usb_recv;     /* called from usb_os.c to pass a received message and ptr to IPAC */
                                        /* on to usb_drv.c by a call to usb_recv(). */
        USB_XMIT_NOTIFY p_usb_xmit;     /* called from usb_os.c in DivaUSB.sys WDM to indicate a completed transmit */
                                        /* to usb_drv.c by a call to usb_xmit().*/
  void            *ipac_ptr;      /* &Diva.ipac pointer to struct IPAC in VxD */
 } Usb_Msg;
 PORTDRV_HOOK PortdrvHook;
    SLIENTRYPOINT_REQ   sliEntryPointReq;
  struct {
    unsigned char Req;
    unsigned char Rc;
    diva_xdi_stream_interface_t info;
  } xdi_stream_info;
  struct {
    unsigned char Req;
    unsigned char Rc;
    diva_xdi_get_extended_xdi_features_t info;
  } xdi_extended_features;
 struct {
    unsigned char Req;
    unsigned char Rc;
  diva_xdi_get_adapter_sdram_bar_t info;
 } xdi_sdram_bar;
  struct {
    unsigned char Req;
    unsigned char Rc;
    diva_xdi_get_capi_parameters_t info;
  } xdi_capi_prms;
 struct {
  ENTITY           e;
  diva_didd_adapter_notify_t info;
 } didd_notify;
 struct {
  ENTITY           e;
  diva_didd_add_adapter_t   info;
 } didd_add_adapter;
 struct {
  ENTITY           e;
  diva_didd_remove_adapter_t info;
 } didd_remove_adapter;
 struct {
  ENTITY             e;
  diva_didd_read_adapter_array_t info;
 } didd_read_adapter_array;
 struct {
  ENTITY             e;
  diva_didd_get_cfg_lib_ifc_t     info;
 } didd_get_cfg_lib_ifc;
  struct {
    unsigned char Req;
    unsigned char Rc;
    diva_xdi_get_logical_adapter_number_s_t info;
  } xdi_logical_adapter_number;
  struct {
    unsigned char Req;
    unsigned char Rc;
    diva_xdi_dma_descriptor_operation_t info;
  } xdi_dma_descriptor_operation;
} IDI_SYNC_REQ;
/******************************************************************************/
#endif /* __DIVA_SYNC__H */  
