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

📄 mt898x.h

📁 这是单板上DPRAM的驱动程序
💻 H
字号:
/* @(#) pSOSystem PowerPC/V2.2.2: */
/***********************************************************************/
/*                                                                     */
/*   MODULE: mpc8xx/sdev/MT898x.h                                      */
/*   DATE:    99/11/29                                                 */
/*   PURPOSE:                                                          */
/*                                                                     */
/*---------------------------------------------------------------------*/
/*                                                                     */
/*            Copyright 1998-1999, ZHONGXING TELECOM CO.,LTD.          */
/*                         ALL RIGHTS RESERVED                         */
/*                                                                     */
/*---------------------------------------------------------------------*/
/*                                                                     */
/***********************************************************************/
/*---------------------------------------------------------------------*/
/* Don't allow this file to be included more than once.                */
/*---------------------------------------------------------------------*/
#ifndef _MT898x_H_
#define _MT898x_H_

#define SDB_MT898x   120000

/* the Type of MT898x */
#define MT8980_TYPE     1
#define MT8985_TYPE     2
#define MT8986_TYPE     4
#define DX256_TYPE      8

/* for control code */
#define SDC_CONFIG_TS    (SDB_MT898x+0) /* SDCConfigTs */
#define SDC_CONFIG_2TS   (SDB_MT898x+1) /* SDCConfigTs */
#define SDC_MESSAGE_MODE (SDB_MT898x+2) /* NULL */
#define SDC_CHECK_MSG    (SDB_MT898x+3) /* NULL */
#define SDC_SET_MTCH     SDC_CONFIG_TS   
#define SDC_DISABLE_CH   (SDB_MT898x+4) /* NULL */
#define SDC_ENABLE_CH   (SDB_MT898x+5) /* NULL */
#undef  SDC_CHK_CONNECT
#define SDC_CHK_CONNECT   (SDB_MT898x+6)
/* for error code */
#define SDE_CHK_MSG_ERR    (-SDB_MT898x-0)


/*8986 control bit define */
#define CR_SM  0x80
#define CR_ME  0x40
#define CR_MS_DATARAM 0x08
#define CR_MS_CONNECTRAM_H 0x10
#define CR_MS_CONNECTRAM_L 0x18
#define CR_MS_MASK  0x18
#define CR_STA_MASK 0x07

#define IMSR_DMO 0x80
#define IMSR_IDR_2M  0
#define IMSR_IDR_4M  0x20
#define IMSR_IDR_8M  0x40
#define IMSR_IDR_MASK 0x60

#define IMSR_ODR_2M  0
#define IMSR_ODR_4M  0x08
#define IMSR_ODR_8M  0x10
#define IMSR_ODR_MASK  0x18
#define IMSR_CLKM     0x01

#define  CM_CAB65_MASK  0x18

typedef struct{
    /* 把StreamIn中的ChanIn 时隙 配置到 StreamOut中的 ChanOut */
    UCHAR StreamIn;       /* 输入通道 */
    UCHAR ChanIn;         /* 输入通道中的时隙 */
    UCHAR StreamOut;      /* 输出通道 */
    UCHAR ChanOut;        /* 输出通道中的时隙 */
    }SDCConfigTsStruct;

typedef struct{
    int StreamOut;        /* This Stream and Chan output Value */
    int ChanOut;
    char ChanOutValue;
    }MT898xMessageModeStruct;

typedef struct{
    ULONG BaseAddr;            /* MT898x 的基址            */
    UCHAR ValidConfigTsNum;     /* ConfigTs中有效的时隙数 */
    SDCConfigTsStruct ConfigTsTable[256]; /* 缺省配置通道*/
    UCHAR Imsr;             /*配置接口模式IMSR寄存器*/
    }MT898xCfgStruct;

char *MT898xBspInit(int DEV, char *FreeMemPtr, MT898xCfgStruct *pCfg);
static void MT898xInit(void *pDataBuf, MT898xCfgStruct *cfg );

#endif /* _MT898x_H_ */

⌨️ 快捷键说明

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