📄 gsblkcfg.c
字号:
/***********************************************************************//* *//* MODULE: gsblkcfg.c 1.3 *//* DATE: 17:57:13 - 97/12/05 *//* PURPOSE: General Serial mblk configuration *//* *//*---------------------------------------------------------------------*//* *//* Copyright 1991 - 1994, Integrated Systems, Inc. *//* ALL RIGHTS RESERVED *//* *//* Permission is hereby granted to licensees of Integrated Systems, *//* Inc. products to use or abstract this computer program for the *//* sole purpose of implementing a product based on Integrated *//* Systems, Inc. products. No other rights to reproduce, use, *//* or disseminate this computer program, whether in part or in *//* whole, are granted. *//* *//* Integrated Systems, Inc. makes no representation or warranties *//* with respect to the performance of this computer program, and *//* specifically disclaims any responsibility for any damages, *//* special or consequential, connected with the use of this program. *//* *//*---------------------------------------------------------------------*//* *//* *//* *//***********************************************************************/#if defined(__cplusplus)extern "C" {#endif#include "bsp.h"#include <pna.h>#include <gsblk.h>#include "sys_conf.h"#if BSP_NEW_SERIALstruct gsblk_bufcfg gsblk_bufcfg[SE_MAX_GS_BUFS +1];unsigned char *gsblk_initbuffers(unsigned char *, long, struct gsblk_bufcfg *);#endif/***********************************************************************//* GSblkSetup: Setup Mblk buffer pools *//* *//* INPUTS: FreeMemPtr pointer to free memory area that can be *//* used to allocate memory for this componet. *//* *//* NodeCfg pointer to the systems node configuration *//* table. This will be used to set the pnact *//* element in the table. *//* *//* RETURNS: The new FreeMemPtr is returned. *//* *//***********************************************************************/unsigned char *GSblkSetup(unsigned char *FreeMemPtr){#if BSP_NEW_SERIALint i = 0;/*---------------------------------------------------------------------*//* Set up the General Serial buffer configuration table. *//*---------------------------------------------------------------------*/#if GS_BUFS_0 gsblk_bufcfg[i].nbuffers = GS_BUFS_0; gsblk_bufcfg[i].bsize = 0; i++;#endif #if GS_BUFS_32 gsblk_bufcfg[i].nbuffers = GS_BUFS_32; gsblk_bufcfg[i].bsize = 32; i++;#endif#if GS_BUFS_64 gsblk_bufcfg[i].nbuffers = GS_BUFS_64; gsblk_bufcfg[i].bsize = 64; i++;#endif#if GS_BUFS_128 gsblk_bufcfg[i].nbuffers = GS_BUFS_128; gsblk_bufcfg[i].bsize = 128; i++;#endif#if GS_BUFS_256 gsblk_bufcfg[i].nbuffers = GS_BUFS_256; gsblk_bufcfg[i].bsize = 256; i++;#endif#if GS_BUFS_512 gsblk_bufcfg[i].nbuffers = GS_BUFS_512; gsblk_bufcfg[i].bsize = 512; i++;#endif#if GS_BUFS_1024 gsblk_bufcfg[i].nbuffers = GS_BUFS_1024; gsblk_bufcfg[i].bsize = 1024; i++;#endif#if GS_BUFS_2048 gsblk_bufcfg[i].nbuffers = GS_BUFS_2048; gsblk_bufcfg[i].bsize = 2048; i++;#endif#if GS_BUFS_4096 gsblk_bufcfg[i].nbuffers = GS_BUFS_4096; gsblk_bufcfg[i].bsize = 4096; i++;#endifgsblk_bufcfg[i].nbuffers = 0;gsblk_bufcfg[i].bsize = 0;/*---------------------------------------------------------------------*//* Initialize the buffers. *//*---------------------------------------------------------------------*/FreeMemPtr = gsblk_initbuffers(FreeMemPtr, GS_MBLKS, gsblk_bufcfg);#endifreturn(FreeMemPtr);}#if defined(__cplusplus)}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -