📄 mpc8260.h
字号:
/*--------------------------------------------------------------------------
*
* File: MPC8260.H
*
*
* Description:
*
* Main Internal Memory Maps for the PowerQUICC 2 Family.
*
* Note that different structures can be overlaid at the same offsets for the
* different modes of operation.
*
*
* History:
*
* 13 JUL 98 ggh initial version derived from MSIL 8260 drivers of 6/98
* 16 JUN 03 ddc Migrated to CodeWarrior
*
*----------------------------------------------------------------------------*/
//#define _Packed __packed__
#define _Packed
#define _PackedType
#pragma pack(push,1)
/******************************************************************************
*
* 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 MPC8260 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 MPC8260 User Manual for details as to what
* is unavailable when certain protocols are run on certain peripherals.
*
******************************************************************************/
/*---------------------------------------------------------------------------*/
/* SERIAL COMMUNICATION CONTROLLER (SCC) */
/*---------------------------------------------------------------------------*/
/*----------*/
/* SCC HDLC */
/*----------*/
typedef _Packed struct
{
UBYTE reserved1[4]; /* Reserved area */
UWORD c_mask; /* CRC constant */
UWORD c_pres; /* CRC preset */
UHWORD disfc; /* discarded frame counter */
UHWORD crcec; /* CRC error counter */
UHWORD abtsc; /* abort sequence counter */
UHWORD nmarc; /* nonmatching address rx cnt */
UHWORD retrc; /* frame transmission counter. */
/* For FCC this area is reserved.*/
UHWORD mflr; /* maximum frame length reg */
UHWORD max_cnt; /* maximum length counter */
UHWORD rfthr; /* received frames threshold */
UHWORD rfcnt; /* received frames count */
UHWORD hmask; /* user defined frm addr mask */
UHWORD haddr1; /* user defined frm address 1 */
UHWORD haddr2; /* user defined frm address 2 */
UHWORD haddr3; /* user defined frm address 3 */
UHWORD haddr4; /* user defined frm address 4 */
UHWORD tmp; /* temp */
UHWORD 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 */
UHWORD pads; /* Short frame pad character. */
UHWORD ret_lim; /* Retry limit threshold. */
UHWORD ret_cnt; /* Retry limit counter. */
UHWORD mflr; /* maximum frame length reg */
UHWORD minflr; /* minimum frame length reg */
UHWORD maxd1; /* max DMA1 length register. */
UHWORD maxd2; /* max DMA2 length register. */
UHWORD maxd; /* Rx max DMA. */
UHWORD dma_cnt; /* Rx DMA counter. */
UHWORD max_b; /* max buffer descriptor byte count. */
UHWORD gaddr1; /* group address filter */
UHWORD gaddr2; /* group address filter */
UHWORD gaddr3; /* group address filter */
UHWORD 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;
UHWORD tbuf0_bcnt;
UHWORD paddr1_h; /* physical address (MSB) */
UHWORD paddr1_m; /* physical address */
UHWORD paddr1_l; /* physical address (LSB) */
UHWORD p_per; /* persistence */
UHWORD rfbd_ptr; /* Rx first BD pointer. */
UHWORD tfbd_ptr; /* Tx first BD pointer. */
UHWORD 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;
UHWORD tbuf1_bcnt;
UHWORD tx_len; /* tx frame length counter */
UHWORD iaddr1; /* individual address filter. */
UHWORD iaddr2; /* individual address filter. */
UHWORD iaddr3; /* individual address filter. */
UHWORD iaddr4; /* individual address filter. */
UHWORD boff_cnt; /* back-off counter */
UHWORD taddr_h; /* temp address (MSB) */
UHWORD taddr_m; /* temp address */
UHWORD taddr_l; /* temp address (LSB) */
} _PackedType t_EnetScc_Pram;
/*----------*/
/* SCC UART */
/*----------*/
typedef _Packed struct
{
UBYTE reserved1[8]; /* Reserved area */
UHWORD max_idl; /* maximum idle characters */
UHWORD idlc; /* rx idle counter (internal) */
UHWORD brkcr; /* break count register */
UHWORD parec; /* Rx parity error counter */
UHWORD frmec; /* Rx framing error counter */
UHWORD nosec; /* Rx noise counter */
UHWORD brkec; /* Rx break character counter */
UHWORD brkln; /* Receive break length */
UHWORD uaddr1; /* address character 1 */
UHWORD uaddr2; /* address character 2 */
UHWORD rtemp; /* temp storage */
UHWORD toseq; /* Tx out of sequence char */
UHWORD cc[8]; /* Rx control characters */
UHWORD rccm; /* Rx control char mask */
UHWORD rccr; /* Rx control char register */
UHWORD 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
{
UBYTE reserved1[4]; /* Reserved area */
UWORD crcc; /* CRC Constant Temp Value */
UHWORD prcrc; /* Preset Receiver CRC-16/LRC */
UHWORD ptcrc; /* Preset Transmitter CRC-16/LRC */
UHWORD parec; /* Receive Parity Error Counter */
UHWORD bsync; /* BISYNC SYNC Character */
UHWORD bdle; /* BISYNC DLE Character */
UHWORD cc[8]; /* Rx control characters */
UHWORD rccm; /* Receive Control Character Mask */
} _PackedType t_BisyncScc_Pram;
/*-----------------*/
/* SCC Common PRAM */
/*-----------------*/
typedef _Packed struct
{
UHWORD rbase; /* RX BD base address */
UHWORD tbase; /* TX BD base address */
UBYTE rfcr; /* Rx function code */
UBYTE tfcr; /* Tx function code */
UHWORD mrblr; /* Rx buffer length */
UWORD rstate; /* Rx internal state */
UWORD rptr; /* Rx internal data pointer */
UHWORD rbptr; /* rb BD Pointer */
UHWORD rcount; /* Rx internal byte count */
UWORD rtemp; /* Rx temp */
UWORD tstate; /* Tx internal state */
UWORD tptr; /* Tx internal data pointer */
UHWORD tbptr; /* Tx BD pointer */
UHWORD 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;
VUBYTE COMPLETE_SIZE_OF_DPRAM_PAGE[0x5c];
} _PackedType t_Scc_Pram;
/*---------------------------------------------------------------------------*/
/* FAST COMMUNICATION CONTROLLER (FCC) */
/*---------------------------------------------------------------------------*/
/*----------*/
/* FCC HDLC */
/*----------*/
typedef _Packed struct
{
UBYTE reserved1[8]; /* Reserved area */
UWORD c_mask; /* CRC constant */
UWORD c_pres; /* CRC preset */
UHWORD disfc; /* discarded frame counter */
UHWORD crcec; /* CRC error counter */
UHWORD abtsc; /* abort sequence counter */
UHWORD nmarc; /* nonmatching address rx cnt */
UWORD max_cnt; /* maximum length counter */
UHWORD mflr; /* maximum frame length reg */
UHWORD rfthr; /* received frames threshold */
UHWORD rfcnt; /* received frames count */
UHWORD hmask; /* user defined frm addr mask */
UHWORD haddr1; /* user defined frm address 1 */
UHWORD haddr2; /* user defined frm address 2 */
UHWORD haddr3; /* user defined frm address 3 */
UHWORD haddr4; /* user defined frm address 4 */
UHWORD tmp; /* temp */
UHWORD tmp_mb; /* temp */
} _PackedType t_HdlcFcc_Pram;
/*--------------*/
/* FCC Ethernet */
/*--------------*/
typedef _Packed struct
{
UWORD stat_bus; /* Internal use buffer. */
UWORD cam_ptr; /* CAM address. */
UWORD c_mask; /* CRC constant mask*/
UWORD c_pres; /* CRC preset */
UWORD crcec; /* CRC error counter */
UWORD alec; /* alignment error counter */
UWORD disfc; /* discarded frame counter */
UHWORD ret_lim; /* Retry limit threshold. */
UHWORD ret_cnt; /* Retry limit counter. */
UHWORD p_per; /* persistence */
UHWORD boff_cnt; /* back-off counter */
UWORD gaddr_h; /* group address filter, high */
UWORD gaddr_l; /* group address filter, low */
UHWORD tfcstat; /* out of sequece Tx BD staus. */
UHWORD tfclen; /* out of sequece Tx BD length. */
UWORD tfcptr; /* out of sequece Tx BD data pointer. */
UHWORD mflr; /* maximum frame length reg */
UHWORD paddr1_h; /* physical address (MSB) */
UHWORD paddr1_m; /* physical address */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -