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

📄 m8260brg.h

📁 Embedded Planet公司的ep8260单板计算机的BSP包(VxWorks)
💻 H
字号:
/* m8260Brg.h - Motorola MPC8260 Baud Rate Generators header file *//* Copyright 1984-1999 Wind River Systems, Inc. *//*modification history--------------------01a,12sep99,ms_  created from m8260Cpm.h, 01d.*//* * This file contains constants for the Baud Rate Generators (BRGs) * in the Motorola MPC8260 PowerQUICC II integrated Communications * Processor */#ifndef __INCm8260Brgh#define __INCm8260Brgh#ifdef __cplusplusextern "C" {#endif#ifndef M8260ABBREVIATIONS#define M8260ABBREVIATIONS#ifdef  _ASMLANGUAGE#define CAST(x)#else /* _ASMLANGUAGE */typedef volatile UCHAR VCHAR;   /* shorthand for volatile UCHAR */typedef volatile INT32 VINT32; /* volatile unsigned word */typedef volatile INT16 VINT16; /* volatile unsigned halfword */typedef volatile INT8 VINT8;   /* volatile unsigned byte */typedef volatile UINT32 VUINT32; /* volatile unsigned word */typedef volatile UINT16 VUINT16; /* volatile unsigned halfword */typedef volatile UINT8 VUINT8;   /* volatile unsigned byte */#define CAST(x) (x)#endif  /* _ASMLANGUAGE */#endif /* M8260ABBREVIATIONS */#ifndef M8260_32_WR#define M8260_32_WR(addr, value) (* ((UINT32 *)(addr)) = ((UINT32) (value)))#endif#ifndef M8260_16_WR#define M8260_16_WR(addr, value) (* ((UINT16 *)(addr)) = ((UINT16) (value)))#endif#ifndef M8260_8_WR#define M8260_8_WR(addr, value) (* ((UINT8 *)(addr)) = ((UINT8) (value)))#endif#ifndef M8260_32_RD#define M8260_32_RD(addr, value) ((value) = (* (UINT32 *) ((UINT32 *)(addr))))#endif#ifndef M8260_16_RD#define M8260_16_RD(addr, value) ((value) = (* (UINT16 *) ((UINT16 *)(addr))))#endif#ifndef M8260_8_RD#define M8260_8_RD(addr, value) ((value) = (* (UINT8 *) ((UINT8 *)(addr))))#endif/* * MPC8260 internal register/memory map (section 17 of prelim. spec) * note that these are offsets from the value stored in the IMMR * register. Also note that in the MPC8260, the IMMR is not a special * purpose register, but it is memory mapped. */ /* Baud Rate Generators *//* NOTE discontiguous base addresses for BRGs */static unsigned long brgBase[8] =   {0x000119f0,0x000119f4,0x000119f8,0x000119fc,   0x000115f0,0x000115f4,0x000115f8,0x000115fc};#define M8260_BRGC_BASE  		0x000119F0#define M8260_BRGC_OFFSET_NEXT_BRGC 	0x00000004#define M8260_BRGC_N_BASE(brgNum)      (brgBase[brgNum-1])#define M8260_BRGC_RD(regVal, brg)                         	\    {                                                           \    VINT32 *pReg = (VINT32 *)                                   \            (immrVal +                                          \            M8260_BRGC_N_BASE(brg));                            \    M8260_32_RD(pReg, regVal);                                  \    }#define M8260_BRGC_WR(regVal, brg)                              \    {                                                           \    VINT32 *pReg = (VINT32 *)                                   \            (immrVal +                                          \            M8260_BRGC_N_BASE(brg));                            \    M8260_32_WR(pReg, regVal);                                  \    }#define M8260_BRGC_SET_BITS(bitmap)				\    {								\    UINT32 regVal;						\    VINT32 *pReg = (VINT32 *) 					\	    (immrVal + 						\	    M8260_BRGC_N_BASE(scc)); 				\    M8260_32_RD(pReg, regVal);				        \    M8260_32_WR(pReg, (regVal | bitmap));			\    }/* macros used in the configuration registers */#define M8260_BRGC_CD_MASK      0x00001FFE /* clock divider mask */#define M8260_BRGC_CD_SHIFT     0x1        /* to shift CD into position */#define M8260_BRGC_RST          0x00020000 /* Reset BRG */#define M8260_BRGC_EN           0x00010000 /* Enable BRG count */#define M8260_BRGC_EXTC_BRGCLK  0x0        /* clock comes from BRGCKL */#define M8260_BRGC_EXTC_CLK3_9  0x1        /* clock comes from pin 3 or 9 */#define M8260_BRGC_EXTC_CLK5_15 0x2        /* clock comes from pin 5 or 15 */#define M8260_BRGC_EXTC_MASK    0x0000C000 /* External Clock Source Mask */#define M8260_BRGC_EXTC_SHIFT   0xE        /* shift EXTC 14 bits to position */#define M8260_BRGC_ATB          0x00002000 /* 1 = Autobaud on Rx */					   /* 0 = normal operation */#define M8260_BRGC_DIV16        0x00000001 /* BRG Clock divide by 16 */#ifdef __cplusplus}#endif#endif /* __INCm8260Brgh */

⌨️ 快捷键说明

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