⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dti.h

📁 GSM手机设计软件代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/* 
+----------------------------------------------------------------------------- 
|  Project :  DTILIB
|  Modul   :  DTI
+----------------------------------------------------------------------------- 
|  Copyright 2002 Texas Instruments Berlin, AG 
|                 All rights reserved. 
| 
|                 This file is confidential and a trade secret of Texas 
|                 Instruments Berlin, AG 
|                 The receipt of or possession of this file does not convey 
|                 any rights to reproduce or disclose its contents or to 
|                 manufacture, use, or sell anything it may describe, in 
|                 whole, or in part, without the specific written consent of 
|                 Texas Instruments Berlin, AG. 
+----------------------------------------------------------------------------- 
|  Purpose :  Definitions for the Data Transmission Interface, DTI.
|             Includefile for every entity using DTILIB.
+----------------------------------------------------------------------------- 
*/ 
/*
 *  Version 1.6
 */

/**********************************************************************************/

/* NOTE:
 * there is a MACRO definition for "interface" in objbase.h
 * which says
 * #define interface struct
 * and thus would collide with the name "interface"
 * as a quick fix, all "interface" have been changed to "interfac"
 * in the dtilib project. This should not affect any external files
 */

/**********************************************************************************/

#ifndef DTI_H
#define DTI_H

/**********************************************************************************/

#if defined (DTI2)
/*
 *  Use SAP DTI2.DOC
 */
#include "P_DTI2.h"
#else
/*
 *  Make this code compatible to SAP dti.doc.
 */
#include "P_DTI.h"

#define T_DTI2_DATA_IND      T_DTI_DATA_IND
#define T_DTI2_DATA_REQ      T_DTI_DATA_REQ
#define T_DTI2_READY_IND     T_DTI_READY_IND
#define T_DTI2_GETDATA_REQ   T_DTI_GETDATA_REQ
#define T_DTI2_DATA_TEST_REQ T_DTI_DATA_TEST_REQ
#define T_DTI2_DATA_TEST_IND T_DTI_DATA_TEST_IND

/*
 * By use the SAP DTI.DOC and the DTI2.DOC there could be double
 * defines. So an undef is used.
 */

#ifdef DTI2_DATA_IND
  #undef DTI2_DATA_IND
#endif
#ifdef DTI2_DATA_REQ
  #undef DTI2_DATA_REQ
#endif
#ifdef DTI2_READY_IND
  #undef DTI2_READY_IND
#endif
#ifdef DTI2_GETDATA_REQ
  #undef DTI2_GETDATA_REQ
#endif
#ifdef DTI2_DATA_TEST_REQ
  #undef DTI2_DATA_TEST_REQ
#endif
#ifdef DTI2_DATA_TEST_IND
  #undef DTI2_DATA_TEST_IND
#endif

/*
 *  For calling the primitives over the macros.
 */
#define DTI2_DATA_IND      DTI_DATA_IND
#define DTI2_DATA_REQ      DTI_DATA_REQ
#define DTI2_READY_IND     DTI_READY_IND
#define DTI2_GETDATA_REQ   DTI_GETDATA_REQ
#define DTI2_DATA_TEST_REQ DTI_DATA_TEST_REQ
#define DTI2_DATA_TEST_IND DTI_DATA_TEST_IND

/*
 * Version related to DTI SAP 1.
 */
#define DTI_VERSION_10 1


#define T_desc2 T_desc
#define T_desc_list2 T_desc_list
#define desc_list2 desc_list

#endif

/**********************************************************************************
 * Externally visible dtilib defines
 **********************************************************************************/
/*
 *  Reason parameter for the callback function
 */
#define DTI_NO_SIGNAL                 0 /* No signal shall be sended */
#define DTI_REASON_CONNECTION_OPENED  1 /* DTI connection opened or reseted */
#define DTI_REASON_CONNECTION_CLOSED  2 /* DTI connection closed */
#define DTI_REASON_DATA_RECEIVED      3 /* UL Data primitive received */
#define DTI_REASON_TX_BUFFER_FULL     4 /* DTI send-queue full */
#define DTI_REASON_TX_BUFFER_READY    5 /* DTI DTI send-queue no longer full */

/*
 * Connection states
 */
#define DTI_CLOSED      0   /* DTI connection is not established */
#define DTI_SETUP       1   /* Waiting for connection_opened signal from DTILIB */
#define DTI_IDLE        2   /* DTI connection is opened */

/*
 * dti_open - direction parameter
 *
 * to lower layer: send request primitives (_REQ / _CNF)
 * to higher layer: send indications       (_IND / _RES)
 * null link: do not send anything
 */
#define DTI_CHANNEL_TO_HIGHER_LAYER 0x00
#define DTI_CHANNEL_TO_LOWER_LAYER 0x01
#define DTI_NULL_LINK 0x02    /* null link (null device) */

/*
 * dti_open - link_options parameter
 *
 * the 0 is legacy from previous versions - upon reception of this value
 * the queue-length parameter has to be used to find out about desired
 * behaviour for the send queue
 *   #define FLOW_CNTRL_ENABLED    0     -- Flow control enabled
 */
#define DTI_FLOW_CNTRL_DISABLED 1 /* Flow control entirely disabled */
/*
 * Modes for handling of the send queue
 *
 * Queue is not used
 */
#define DTI_QUEUE_UNUSED 2
/*
 * Queue without size limitation
 */
#define DTI_QUEUE_UNBOUNDED 3
/*
 * Notify entity when queue is full,
 * afterwards discard oldest piece of data upon arrival of new data packets
 */
#define DTI_QUEUE_RM_FIFO 4
/*
 * Notify entity when queue is full,
 * afterwards discard newly arriving data packets
 */
#define DTI_QUEUE_RM_LIFO 5
/*
 * Notify entity when queue is full but keep all buffered data
 */
#define DTI_QUEUE_WATERMARK 6

/*
 * dti_init - entity_options (flags!)
 */
#define DTI_DEFAULT_OPTIONS 0x0
#define DTI_NO_TRACE    1<<0

/*
 * Some parameter which are used for initialization.
 */
#define  D_NO_DATA_BASE     NULL
#define  D_NO_INSTANCE      0xFF
#define  D_NO_INTERFACE     0xFF
#define  D_NO_CHANNEL_NR    0xFF

/**********************************************************************************
 * Obsolete dtilib defines
 *
 * NOTE: use of these defines is STRONGLY DISCOURAGED since their functionality
 *       is no longer needed and they will be removed some time in the future
 *
 **********************************************************************************/

/*
 * NOTE: this is _obsolete_ and maintained only for compatibility reasons!!
 * (see link_options parameter)
 */
#define DTI_QUEUE_DISABLED    0 /* Queue not used */
#define DTI_QUEUE_UNLIMITED 255 /* Queue without limitations in size */

/*
 * Home and neighbor entity.
 * NOTE: this is _obsolete_ and maintained only for compatibility reasons!!
 *       instead use the defines
 *       DTI_CHANNEL_TO_HIGHER_LAYER and
 *       DTI_CHANNEL_TO_LOWER_LAYER
 */
#define HOME        TRUE    /* Indicate the entity or instance which send dti_connect_req */
#define NEIGHBOR    FALSE   /* Indicate the entity or instance which send dti_connect_ind */

/*
 *  Type of the link
 */

#define ENTITY_LINK           0x01   /* normal link with an entity */
#define NULL_LINK              0x02   /* null link (null device) */
#define RIVIERA_BT_LINK   0x03    /* link to BT riviera entity */
#define RIVIERA_ATP_LINK  0x04    /* link to RNET riviera entity */

/*
 * Communication type
 * NOTE: this is _obsolete_ and maintained only for compatibility reasons!!
 * (see link_options parameter)
 */
#define FLOW_CNTRL_ENABLED    0     /* Flow control enabled */
#define FLOW_CNTRL_DISABLED   1     /* Flow control disabled */

/*

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -