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

📄 ser_cfg.c

📁 这是单板上DPRAM的驱动程序
💻 C
字号:
/* @(#) pSOSystem PowerPC/V2.2.2*/
/***********************************************************************/
/*                                                                     */
/*   MODULE:  bsps/fuc8xx/src/ser_cfg.c                                */
/*   DATE:    98/07/03                                                 */
/*   AUTHOR:  Shan Zhengguang                                          */
/*   PURPOSE: This file contains configuration of the Board Support    */
/*            package that needs to be done at application compile     */
/*            and link time.                                           */
/*                                                                     */
/*---------------------------------------------------------------------*/
/*                                                                     */
/*           Copyright 1998 - 1998, ZHONGXING TELECOM CO.,LTD.         */
/*                      ALL RIGHTS RESERVED                            */
/*                                                                     */
/*---------------------------------------------------------------------*/
/*        BspSetup Setup BSP configuration                             */
/*                                                                     */
/***********************************************************************/
#include "bsp.h"
#include <bspfuncs.h>
#include <psos.h>
#include <disi.h>

extern void smc8xx_Init();
extern long smc8xx_Open(ULONG, ChannelCfg *, Lid *, ULONG *);
extern long smc8xx_Send(Lid, mblk_t *);
extern long smc8xx_Ioctl(Lid, ULONG,  void *);
extern long smc8xx_Close(Lid);

#if BSP_DISI_PLUS_DRIVER
extern void scc8xx_Init();
extern long scc8xx_Open(ULONG, ChannelCfg *, Lid *, ULONG *);
extern long scc8xx_Send(Lid, mblk_t *);
extern long scc8xx_Ioctl(Lid, ULONG,  void *);
extern long scc8xx_Close(Lid);
#endif

/*---------------------------------------------------------------------*/
/* Driver Switch Table                                                 */
/*  The position of a driver in this table, i.e. the index,  is used   */
/*  by the logic channel switch table SDrvCnfg. This table is used     */
/*  in drivers/ser_mplex.c                                             */
/*---------------------------------------------------------------------*/
#if BSP_NUM_SER_DRVRS
const SERIAL_FUNCS SerialFuncs[BSP_NUM_SER_DRVRS] =
{
    {smc8xx_Init, smc8xx_Open, smc8xx_Send, smc8xx_Ioctl, smc8xx_Close},
#if BSP_DISI_PLUS_DRIVER
    {scc8xx_Init, scc8xx_Open, scc8xx_Send, scc8xx_Ioctl, scc8xx_Close},
#endif
};
#endif

/*---------------------------------------------------------------------*/
/* Logical Channel (minor device number) Switch table                  */
/*   Given a logical channel, this table is used to select the device  */
/*   driver and to determine the phisical channel number for the       */
/*   given logical channel. See drivers/ser_mplx.c.                    */
/*                                                                     */
/* Note:                                                               */
/*  This table must not be constant because the Lid field is changed   */
/*  by SerialOpen.                                                     */
/*---------------------------------------------------------------------*/
SDRVCNFG SDrvCnfg[BSP_SERIAL+1] =
{

    /* driver num,  physical channel num,  LID  */ 
    { 0,             0,   0 },  /* must be here */ 
    { BSP_SMC_DRV,   0,   0 },  /* Logic Channel 1, 1st channel of SMC */
};

⌨️ 快捷键说明

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