?? mpc8272.h
字號:
/*--------------------------------------------------------------------------
*
* File: MPC8272.H
*
*
* Description:
*
* Main Internal Memory Maps for the MPC8272 PowerQUICC 2.
*
* Note that different structures can be overlaid at the same offsets for the
* different modes of operation.
*
*
* History:
*
* 13 JUL 98 ggh initial version
* 15 JAN 99 ggh updated MCC structures
* 19 Jul 05 rer update for MPC8272 (no SEC)
*
*----------------------------------------------------------------------------*/
#ifndef _MPC8272_H
#define _MPC8272_H
//#define _Packed __packed__
#define _Packed
#define _PackedType
typedef unsigned long uword;
typedef unsigned char uchar;
typedef unsigned short ushort;
/******************************************************************************
*
* PARAMETER RAM (PRAM) FOR EACH PERIPHERAL
*
* Each subsection contains protocol-specific PRAM for each peripheral,
* followed by the PRAM common to all protocols for that peripheral. These
* structs are used as needed in the main MPC8272 memory map structure. Note
* that different modes of operation will require the use of different PRAM
* structs, and that certain structs may overlay and conflict with the use of
* other PRAM areas. Consult the MPC8272 User Manual for details as to what
* is unavailable when certain protocols are run on certain peripherals.
*
******************************************************************************/
#pragma pack(push,1)
/*---------------------------------------------------------------------------*/
/* SERIAL COMMUNICATION CONTROLLER (SCC) */
/*---------------------------------------------------------------------------*/
/*----------*/
/* SCC HDLC */
/*----------*/
typedef _Packed struct
{
uchar reserved1[4]; /* Reserved area */
uword c_mask; /* CRC constant */
uword c_pres; /* CRC preset */
ushort disfc; /* discarded frame counter */
ushort crcec; /* CRC error counter */
ushort abtsc; /* abort sequence counter */
ushort nmarc; /* nonmatching address rx cnt */
ushort retrc; /* frame transmission counter */
/* FCC, this area is reserved */
ushort mflr; /* maximum frame length reg */
ushort max_cnt; /* maximum length counter */
ushort rfthr; /* received frames threshold */
ushort rfcnt; /* received frames count */
ushort hmask; /* user defined frm addr mask */
ushort haddr1; /* user defined frm address 1 */
ushort haddr2; /* user defined frm address 2 */
ushort haddr3; /* user defined frm address 3 */
ushort haddr4; /* user defined frm address 4 */
ushort tmp; /* temp */
ushort tmp_mb; /* temp */
}_PackedType t_HdlcScc_Pram;
/*--------------*/
/* SCC Ethernet */
/*--------------*/
typedef _Packed struct
{
uword c_pres; /* CRC preset */
uword c_mask; /* CRC constant mask */
uword crcec; /* CRC error counter */
uword alec; /* alignment error counter */
uword disfc; /* discarded frame counter */
ushort pads; /* Short frame pad character. */
ushort ret_lim; /* Retry limit threshold. */
ushort ret_cnt; /* Retry limit counter. */
ushort mflr; /* maximum frame length reg */
ushort minflr; /* minimum frame length reg */
ushort maxd1; /* max DMA1 length register. */
ushort maxd2; /* max DMA2 length register. */
ushort maxd; /* Rx max DMA. */
ushort dma_cnt; /* Rx DMA counter. */
ushort max_b; /* max BD byte count. */
ushort gaddr1; /* group address filter */
ushort gaddr2; /* group address filter */
ushort gaddr3; /* group address filter */
ushort gaddr4; /* group address filter */
uword tbuf0_data0; /* Saved area 0, current frame. */
uword tbuf0_data1; /* Saved area 1, current frame. */
uword tbuf0_rba0;
uword tbuf0_crc;
ushort tbuf0_bcnt;
ushort paddr1_h; /* physical address (MSB) */
ushort paddr1_m; /* physical address */
ushort paddr1_l; /* physical address (LSB) */
ushort p_per; /* persistence */
ushort rfbd_ptr; /* Rx first BD pointer. */
ushort tfbd_ptr; /* Tx first BD pointer. */
ushort tlbd_ptr; /* Tx last BD pointer. */
uword tbuf1_data0; /* Saved area 0, next frame. */
uword tbuf1_data1; /* Saved area 1, next frame. */
uword tbuf1_rba0;
uword tbuf1_crc;
ushort tbuf1_bcnt;
ushort tx_len; /* tx frame length counter */
ushort iaddr1; /* individual address filter. */
ushort iaddr2; /* individual address filter. */
ushort iaddr3; /* individual address filter. */
ushort iaddr4; /* individual address filter. */
ushort boff_cnt; /* back-off counter */
ushort taddr_h; /* temp address (MSB) */
ushort taddr_m; /* temp address */
ushort taddr_l; /* temp address (LSB) */
} _PackedType t_EnetScc_Pram;
/*----------*/
/* SCC VUART */
/*----------*/
typedef _Packed struct
{
uchar reserved1[8]; /* Reserved area */
ushort max_idl; /* maximum idle characters */
ushort idlc; /* rx idle counter (internal) */
ushort brkcr; /* break count register */
ushort parec; /* Rx parity error counter */
ushort frmec; /* Rx framing error counter */
ushort nosec; /* Rx noise counter */
ushort brkec; /* Rx break character counter */
ushort brkln; /* Receive break length */
ushort uaddr1; /* address character 1 */
ushort uaddr2; /* address character 2 */
ushort rtemp; /* temp storage */
ushort toseq; /* Tx out of sequence char */
ushort cc[8]; /* Rx control characters */
ushort rccm; /* Rx control char mask */
ushort rccr; /* Rx control char register */
ushort rlbc; /* Receive last break char */
} _PackedType t_UartScc_Pram;
/*-----------------*/
/* SCC Transparent */
/*-----------------*/
typedef _Packed struct
{
uword c_mask; /* CRC constant */
uword c_pres; /* CRC preset */
} _PackedType t_TransScc_Pram;
/*------------*/
/* SCC Bisync */
/*------------*/
typedef _Packed struct
{
uchar reserved1[4]; /* Reserved area */
uword crcc; /* CRC Constant Temp Value */
ushort prcrc; /* Preset Receiver CRC-16/LRC */
ushort ptcrc; /* Preset Transmitter CRC-16/LRC*/
ushort parec; /* Receive Parity Error Counter */
ushort bsync; /* BISYNC SYNC Character */
ushort bdle; /* BISYNC DLE Character */
ushort cc[8]; /* Rx control characters */
ushort rccm; /* Rx Control Character Mask */
} _PackedType t_BisyncScc_Pram;
/*-----------------*/
/* SCC Common PRAM */
/*-----------------*/
typedef _Packed struct
{
ushort rbase; /* RX BD base address */
ushort tbase; /* TX BD base address */
uchar rfcr; /* Rx function code */
uchar tfcr; /* Tx function code */
ushort mrblr; /* Rx buffer length */
uword rstate; /* Rx internal state */
uword rptr; /* Rx internal data pointer */
ushort rbptr; /* rb BD Pointer */
ushort rcount; /* Rx internal byte count */
uword rtemp; /* Rx temp */
uword tstate; /* Tx internal state */
uword tptr; /* Tx internal data pointer */
ushort tbptr; /* Tx BD pointer */
ushort tcount; /* Tx byte count */
uword ttemp; /* Tx temp */
uword rcrc; /* temp receive CRC */
uword tcrc; /* temp transmit CRC */
union
{
t_HdlcScc_Pram h;
t_EnetScc_Pram e;
t_UartScc_Pram u;
t_TransScc_Pram t;
t_BisyncScc_Pram b;
} SpecificProtocol;
uchar COMPLETE_SIZE_OF_DPRAM_PAGE[0x5c];
} _PackedType t_Scc_Pram;
/*---------------------------------------------------------------------------*/
/* FAST COMMUNICATION CONTROLLER (FCC) */
/*---------------------------------------------------------------------------*/
/*----------*/
/* FCC HDLC */
/*----------*/
typedef _Packed struct
{
uchar reserved1[8]; /* Reserved area */
uword c_mask; /* CRC constant */
uword c_pres; /* CRC preset */
ushort disfc; /* discarded frame counter */
ushort crcec; /* CRC error counter */
ushort abtsc; /* abort sequence counter */
ushort nmarc; /* nonmatching address rx cnt */
uword max_cnt; /* maximum length counter */
ushort mflr; /* maximum frame length reg */
ushort rfthr; /* received frames threshold */
ushort rfcnt; /* received frames count */
ushort hmask; /* user defined frm addr mask */
ushort haddr1; /* user defined frm address 1 */
ushort haddr2; /* user defined frm address 2 */
ushort haddr3; /* user defined frm address 3 */
ushort haddr4; /* user defined frm address 4 */
ushort tmp; /* temp */
ushort tmp_mb; /* temp */
} _PackedType t_HdlcFcc_Pram;
/*--------------*/
/* FEC Ethernet */
/*--------------*/
typedef _Packed struct
{
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -