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

📄 bsp.h

📁 这是单板上DPRAM的驱动程序
💻 H
字号:
/* @(#) pSOSystem PowerPC/V2.2.2: bsps/fuc8xx/bsp.h V0.0 98/7/1        */
/***********************************************************************/
/*                                                                     */
/*   MODULE:  bsp.h                                                    */
/*   DATE:    98/7/1                                                   */
/*   AUTHOR:  Shan Zhengguang                                          */
/*   PURPOSE: Defining characteristics of a board-support package      */
/*                                                                     */
/*---------------------------------------------------------------------*/
/*                                                                     */
/*           Copyright 1998 - 1999, ZHONGXING TELECOM CO.,LTD.         */
/*                      ALL RIGHTS RESERVED                            */
/*                                                                     */
/*---------------------------------------------------------------------*/
/*                                                                     */
/*   This file defines the characteristics and capabilities of the     */
/*   BSP.  Other files in the pSOSystem ADE refer to this file         */
/*   when an executable image is being built.                          */
/*                                                                     */
/***********************************************************************/
#if __cplusplus
extern "C" {
#endif

#ifndef _BSP_H
#define _BSP_H

#pragma pack(1,1)
#include <types.h>

/***********************************************************************/
/*                                                                     */
/*                                                                     */
/*      B O A R D - S U P P O R T   P A C K A G E   P R O F I L E      */
/*                                                                     */
/*                                                                     */
/***********************************************************************/

/*=====================================================================*/
/*                                                                     */
/*              B A S I C   C H A R A C T E R I S T I C S              */
/*                                                                     */
/*   * BSP_VERSION         - specifies revision level of pSOSystem     */
/*                           which this BSP was written to support     */
/*   * BSP_CPUFAMILY       - CPU processor FAMILY (68000, 88000,       */
/*                           i960, or x86)                             */
/*   * BSP_CPU             - Specific processor within family (PPC604, */
/*                           PPC603, PPC601, PPC403GA etc)             */
/*   * BSP_FPU             - Floating-point unit (yes/no)              */
/*   * BSP_MMU             - Memory Management Unit (yes/no)           */
/*   * BSP_IMMU            - Instruction MMMU (yes/no)                 */
/*   * BSP_RAM_BASE        - Starting address of RAM as seen by CPU    */
/*   * BSP_VME             - YES if this is a VME board                */
/*   * BSP_LITTLE_ENDIAN   - YES if board is "little-endian"           */
/*                                                                     */
/*=====================================================================*/
#define BSP_VERSION            222
#define BSP_CPUFAMILY          FAMILY_POWERPC
#define BSP_RAM_BASE           BspRamBase()
#define BSP_FPU                NO 
#define BSP_MMU                NO     /* should be YES when normal */ 
#define BSP_IMMU               NO      /* used when BSP_MMU is YES  */ 
#define BSP_VME                NO 
#define BSP_LITTLE_ENDIAN      NO

/*=====================================================================*/
/*                                                                     */
/*            M I S C E L L A N E O U S   F E A T U R E S              */
/*                                                                     */
/*   * BSP_PARMS     - size in bytes of board-specific parameters      */
/*                     which should be stored in non-volatile RAM and  */
/*                     modified via the optional startup dialog.       */
/*                     0 = none.                                       */
/*                                                                     */
/*=====================================================================*/
#define BSP_PARMS               12

/*=====================================================================*/
/*                                                                     */
/*                   S E R I A L   C H A N N E L S                     */
/*                                                                     */
/*   * BSP_SERIAL indicates the number of serial channels supported    */
/*     (0 = none)                                                      */
/*   * BSP_SERIAL_MINBAUD - lowest supported baud rate                 */
/*   * BSP_SERIAL_MAXBAUD - highest supported baud rate                */
/*                                                                     */
/*=====================================================================*/
#define BSP_SMC_DRV            2        /* Driver Index to SERIAL_FUNCS*/
#define BSP_SMC_SERIAL         1        /* #of SMC Serial Ports MUST BE 1       */

#define BSP_SCC_DRV            1        /* Driver Index to SERIAL_FUNCS*/
#define BSP_SCC_SERIAL         0        /* #of SCC Serial Ports MUST BE 0       */

#define BSP_DISI_PLUS_DRIVER   NO      /* !!!DON'T Set to YES to use SCC DRV   */

#define BSP_NEW_SERIAL         YES
#define BSP_SERIAL_MINBAUD     300
#define BSP_SERIAL_MAXBAUD     38400

/*=====================================================================*/
/* If DISI Plus Driver to be used for your BSP. Then enable it above   */
/* by setting BSP_DISI_PLUS_DRIVER to YES, or set it to NO.            */
/*=====================================================================*/
#if BSP_DISI_PLUS_DRIVER

#define BSP_SERIAL             (BSP_SMC_SERIAL + BSP_SCC_SERIAL)
#define BSP_NUM_SER_DRVRS      2      /* Should be 1 or 2 ???? */

#else

#define BSP_SERIAL             (BSP_SMC_SERIAL)
#define BSP_NUM_SER_DRVRS      1

#endif

/*=====================================================================*/
/*                                                                     */
/*                    L A N   I N T E R F A C E S                      */
/*                                                                     */
/*   * BSP_LAN1            - YES if LAN is supported                   */
/*   * BSP_LAN1_ENTRY      - Function name of LAN entry point          */
/*   * BSP_LAN1_MTU        - Maximum transmission unit (bytes)         */
/*   * BSP_LAN1_HWALEN     - Length of hardware address in bytes       */
/*   * BSP_LAN1_FLAGS      - Interface flags (per pNA manual)          */
/*        IFF_POLL             0x8000   interface is a polling type    */
/*        IFF_BROADCAST        0x0001   NI supports broadcasts         */
/*        IFF_RAWMEM           0x2000   driver uses "mblk" interface   */
/*        IFF_MULTICAST        0x0800   driver suports multicast       */
/*   * BSP_LAN1_PKB        - number of packet buffers for RAM code     */
/*                                                                     */
/*=====================================================================*/
#define BSP_LAN1               YES
#define BSP_LAN1_ENTRY         NiLan
#define BSP_LAN1_MTU           1500
#define BSP_LAN1_HWALEN        6
#define BSP_LAN1_FLAGS         0xA801
#define BSP_LAN1_PKB           50 
#define BSP_LAN1_PKB_ROM       30

/*=====================================================================*/
/*                                                                     */
/*    S H A R E D   M E M O R Y   C O M M U N I C A T I O N            */
/*                                                                     */
/*   * BSP_SMEM            - Yes if shared memory communication is     */
/*                           supported                                 */
/*                                                                     */
/*=====================================================================*/
#define BSP_SMEM               NO


/*=====================================================================*/
/*                                                                     */
/*                         S C S I                                     */
/*                                                                     */
/*=====================================================================*/
#define BSP_SCSI               NO
#define BSP_SCSI_TAPE          NO

/*=====================================================================*/
/*                                                                     */
/*              2 N D   T I M E R    F O R    p M O N T                */
/*                                                                     */
/*=====================================================================*/
#define BSP_TIMER2             YES

/*=====================================================================*/
/*                                                                     */
/*                         I R D A                                     */
/*                                                                     */
/*=====================================================================*/
#define BSP_IRDA               NO
 
/***********************************************************************/
/*                                                                     */
/*               D E F A U L T   V A L U E S   F O R                   */
/*       B O A R D - S P E C I F I C   P A R A M E T E R S             */
/*                                                                     */
/***********************************************************************/
/*---------------------------------------------------------------------*/
/* Board specific parameters structure definition                      */
/* BSP_PARMS         - size in bytes of board-specific parameters      */
/*                     which should be stored in non-volatile RAM and  */
/*                     modified via the optional startup dialog.       */
/*                     0 = none.                                       */
/*---------------------------------------------------------------------*/
struct BspParms            /* Board-specific parameters */
    {
    unsigned char Eth03;   /* Byte 3 of Ethernet address */
    unsigned char Eth04;   /* Byte 4 of Ethernet address */
    unsigned char Eth05;   /* Byte 5 of Ethernet address */
    };
 
#ifdef _SYSINIT_C
const struct BspParms BspDefaults =
    {
    0x22,
    0x33,
    0x10
    };
#endif  /* _SYSINIT_C */


#endif /* _BSP_H */

#if __cplusplus
}
#endif

⌨️ 快捷键说明

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