📄 mpc860.h
字号:
/* TRANSPARENT specific parameter RAM */
/*-------------------------------------*/
UWORD crc_p; /* CRC Preset */
UWORD crc_c; /* CRC constant */
};
/*-------------------------------------------------------------------------*/
/* Ethernet parameter RAM (SCC) */
/*-------------------------------------------------------------------------*/
struct ethernet_pram
{
/*--------------------*/
/* SCC parameter RAM */
/*--------------------*/
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 */
/*---------------------------------*/
/* ETHERNET specific parameter RAM */
/*---------------------------------*/
UWORD c_pres; /* preset CRC */
UWORD c_mask; /* constant mask for CRC */
UWORD crcec; /* CRC error counter */
UWORD alec; /* alighnment error counter */
UWORD disfc; /* discard frame counter */
UHWORD pads; /* short frame PAD characters */
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; /* maximum DMA1 length reg */
UHWORD maxd2; /* maximum DMA2 length reg */
UHWORD maxd; /* rx max DMA */
UHWORD dma_cnt; /* rx dma counter */
UHWORD max_b; /* max bd byte count */
UHWORD gaddr1; /* group address filter 1 */
UHWORD gaddr2; /* group address filter 2 */
UHWORD gaddr3; /* group address filter 3 */
UHWORD gaddr4; /* group address filter 4 */
UWORD tbuf0_data0; /* save area 0 - current frm */
UWORD tbuf0_data1; /* save area 1 - current frm */
UWORD tbuf0_rba0;
UWORD tbuf0_crc;
UHWORD tbuf0_bcnt;
UHWORD paddr_h; /* physical address (MSB) */
UHWORD paddr_m; /* physical address */
UHWORD paddr_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; /* save area 0 - next frame */
UWORD tbuf1_data1; /* save 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 1*/
UHWORD iaddr2; /* individual address filter 2*/
UHWORD iaddr3; /* individual address filter 3*/
UHWORD iaddr4; /* individual address filter 4*/
UHWORD boff_cnt; /* back-off counter */
UHWORD taddr_h; /* temp address (MSB) */
UHWORD taddr_m; /* temp address */
UHWORD taddr_l; /* temp address (LSB) */
};
/*-------------------------------------------------------------------------*/
/* SAR parameter RAM (SCC) */
/* NOTE: */
/* */
/* Data Stuctures are declared as _Packed to ensure that there is no */
/* padding between structure members, i.e. we don't want the compiler to */
/* force word allignment. */
/*-------------------------------------------------------------------------*/
/****************************************/
/* Receive Cell Look up Table structure */
/****************************************/
_Packed struct lookup_table_pram {
VUWORD hmask; /* Header mask */
VUHWORD ambase; /* Address Match Table Base Address */
VUHWORD amend; /* Address Match Table End Address */
VUHWORD apbase; /* Address Pointing Table */
};
_Packed struct sar860_pram{
VUWORD rbdbase; /* Receive BD memory space Base */
VUBYTE srfcr; /* Receive Function Code */
VUBYTE srstate; /* Receive state */
VUHWORD mrblr; /* Rx Max Buffer Length */
VUWORD rstate; /* Receive Internal State */
VUBYTE RESERVED7[4]; /* Reserved */
VUHWORD r_cnt; /* Receive Internal Byte Counter */
VUBYTE stfcr; /* Transmit Function Code */
VUBYTE ststate; /* Transmit State */
VUWORD tbdbase; /* Transmit BD memory space Base */
VUWORD tstate; /* Transmitter Internal State */
VUHWORD comm_ch; /* Ch# associated with next command */
VUBYTE RESERVED8[2]; /* Reserved */
VUHWORD t_cnt; /* Receive Internal Byte Counter */
VUHWORD ctbase; /* Connection Table Base Address */
VUWORD ectbase; /* External Connection Table
Base Address */
VUWORD intbase; /* Base address for Interrupt queue */
VUWORD intptr; /* Pointer to interrupt queue */
VUWORD c_mask; /* Constant Mask for CRC32 */
VUHWORD schnum; /* Current Channel number */
VUHWORD int_cnt; /* Interrupt Counter */
VUHWORD int_icnt; /* Interrupt Initiate value */
VUHWORD tsta; /* Time Stamp Timer address */
VUBYTE RESERVED2[2]; /* Reserved */
VUHWORD smrblr; /* Transparent Rx Max Buffer length */
VUWORD ehead; /* Empty Cell Header */
VUWORD epayload; /* Empty Cell Payload */
VUHWORD tqbase; /* Transmit Queue Base pointer */
VUHWORD tqend; /* Transmit Queue End pointer */
VUHWORD tqaptr; /* Transmit Queue- APC pointer */
VUHWORD tqtptr; /* Transmit Queue- Transmitter
Pointer */
VUHWORD apcst; /* APC Status */
VUHWORD apcptr; /* APC Parameter Pointer */
struct lookup_table_pram lookup; /* Receive Cell look-up table */
VUHWORD ecsize; /* Extended Cell Size */
VUBYTE RESERVED9[4]; /* Reserved */
VUWORD r_ptr; /* Receive Internal Data Pointer */
VUWORD rtemp; /* Receive Temporary Data Storage */
VUWORD t_ptr; /* Transmit Internal Data Pointer */
VUWORD ttemp; /* Transmitter Temporary Data Storage */
VUBYTE RESERVED4[0x4C]; /* Reserved */
VUHWORD alpha; /* Receiver Delineation Alpha Counter */
VUHWORD delta; /* Receiver Delineation Delta Counter */
VUWORD rstuff; /* Receive Data Stuffing Location */
VUHWORD shufflestate; /* Receiver Data Shuffling State */
VUHWORD rhectemp; /* Receiver Temporary HEC Storage */
VUHWORD thectemp; /* Transmitter Temporary HEC Storage */
VUHWORD astatus; /* ATOM1 status word */
VUHWORD hec_err; /* HEC Error Counter */
VUBYTE RESERVED5[2]; /* Reserved */
VUWORD rscram; /* Receiver Scrambling Storage */
VUWORD rscram1; /* Receiver Scrambling Storage */
VUWORD tscram; /* Transmitter Scrambling Storage */
VUWORD tscram1; /* Transmitter Scrambling Storage */
VUWORD rcrc; /* Receiver Temporary CRC */
VUWORD tcrc; /* Transmitter Temporary CRC */
VUWORD rchan; /* Receiver Current Channel */
VUWORD tchan; /* Transmitter Current Channel */
VUBYTE RESERVED6[0xC]; /* Reserved area */
};
/*--------------------------------------------------------------------------*/
/* SMC UART parameter RAM */
/*--------------------------------------------------------------------------*/
struct smc_uart_pram
{
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 */
UHWORD max_idl; /* Maximum IDLE Characters */
UHWORD idlc; /* Temporary IDLE Counter */
UHWORD brkln; /* Last Rx Break Length */
UHWORD brkec; /* Rx Break Condition Counter */
UHWORD brkcr; /* Break Count Register (Tx) */
UHWORD r_mask; /* Temporary bit mask */
};
/*--------------------------------------------------------------------------*/
/* SMC Transparent mode parameter RAM */
/*--------------------------------------------------------------------------*/
struct smc_trnsp_pram
{
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 */
UHWORD reserved[5]; /* Reserved */
};
/*--------------------------------------------------------------------------*/
/* SPI parameter RAM */
/*--------------------------------------------------------------------------*/
#define SPI_R 0x8000 /* Ready bit in BD */
struct spi_pram
{
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 */
};
/*--------------------------------------------------------------------------*/
/* I2C parameter RAM */
/*--------------------------------------------------------------------------*/
struct i2c_pram
{
/*--------------------*/
/* I2C parameter RAM */
/*--------------------*/
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 */
};
/*--------------------------------------------------------------------------*/
/* PIP Centronics parameter RAM */
/*--------------------------------------------------------------------------*/
struct centronics_pram
{
UHWORD rbase; /* Rx BD Base Address */
UHWORD tbase; /* Tx BD Base Address */
UBYTE fcr; /* function code */
UBYTE smask; /* Status Mask */
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 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -