mt908x0.h

来自「基于如何开发MPC860处理器系统的核心业务模块QMC的开发程序」· C头文件 代码 · 共 46 行

H
46
字号
#ifndef __INCmt908x0h
#define __INCmt908x0h
#include "860Sar.h"

#define MT90820_CR(base)		((VUINT16 *)((base) + 0x00))
#define MT90820_IMSR(base)		((VUINT16 *)((base) + 0x02))
#define MT90820_FAR(base) 		((VUINT16 *)((base) + 0x04))
#define MT90820_FOR0(base)		((VUINT16 *)((base) + 0x06))
#define MT90820_FOR1(base)		((VUINT16 *)((base) + 0x08))
#define MT90820_FOR2(base)		((VUINT16 *)((base) + 0x0a))
#define MT90820_FOR3(base)		((VUINT16 *)((base) + 0x0c))
#define MT90820_CH(i,base)		((VUINT16 *)((base) + 0x80 + i * 2))

#define MT90840_IMSR(base)		((UINT8 *)((base) + 0x00))
#define MT90840_CR(base)		((UINT8 *)((base) + 0x01))
#define MT90840_TIMR(base)		((UINT8 *)((base) + 0x02))
#define MT90840_GPMR(base)		((UINT8 *)((base) + 0x03))
#define MT90840_ALSR(base)		((UINT8 *)((base) + 0x04))
#define MT90840_TEST(base)		((UINT8 *)((base) + 0x05))
#define MT90840_PSDL(base)		((UINT8 *)((base) + 0x06))
#define MT90840_PSDH(base)		((UINT8 *)((base) + 0x07))

#define CR_SEL2  0x80
#define CR_SEL1  0x40
#define CR_SEL0  0x20
#define CR_HA11  0x10
#define CR_HA10  0x08
#define CR_HA9   0x04

#define TPCM_OE_CTo0 	0x80
#define TPCM_PPBY	0x40
#define TPCM_MC		0x20
#define TPCM_CTO	0x1c  /* CTo1,CTo2,CTo3 */
#define TPCM_AB9    0x02

#define RPCM_MC		0x40
#define RPCM_DC 	0x20
#define RPCM_OE 	0x10

#define TPCMH(pdioc) (UINT8 *)(MT90840_ADRS + pdioc&0x7f + 0x80)
#define TPCML(pdioc) (UINT8 *)(MT90840_ADRS + pdioc&0x7f + 0x80)
#define RPCMH(stioc) (UINT8 *)(MT90840_ADRS + stioc&0x7f + 0x80)
#define RPCML(stioc) (UINT8 *)(MT90840_ADRS + stioc&0x7f + 0x80)

#endif   /* __INCmt908x0 */

⌨️ 快捷键说明

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