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

📄 piqos.h

📁 vt6528芯片交换机API函数和文档运行程序
💻 H
字号:
/*
 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
 * All rights reserved.
 *
 * This software is copyrighted by and is the sole property of
 * VIA Networking Technologies, Inc. This software may only be used
 * in accordance with the corresponding license agreement. Any unauthorized
 * use, duplication, transmission, distribution, or disclosure of this
 * software is expressly forbidden.
 *
 * This software is provided by VIA Networking Technologies, Inc. "as is"
 * and any express or implied warranties, including, but not limited to, the
 * implied warranties of merchantability and fitness for a particular purpose
 * are disclaimed. In no event shall VIA Networking Technologies, Inc.
 * be liable for any direct, indirect, incidental, special, exemplary, or
 * consequential damages.
 *
 *
 * File:    piqos.h
 *
 * Purpose: QoS module UI callback functions
 *
 * Author:  Tevin Chen
 *
 * Date:    Nov 17, 2005
 *
 */


#ifndef _PIQOS_H
#define _PIQOS_H

#include "ttype.h"
#if !defined(__SWCFG_H__)
#include "swcfg.h"
#endif
#if !defined(__CCONFIG_H__)
#include "cconfig.h"
#endif




/*---------------------  Export Classes -----------------------------*/
typedef struct tagSQosPageCfg { // Port system config
    UINT8           byQosMode;                  // QoS mode configuration
#if __PAD_ALGN_1
    UINT8    byPadA[__PAD_ALGN_1];
#endif
    UINT16          w8021pMap;                 // 802.1p mapping configuration
    UINT8           abyStaticPrior[SWITCH_PORT_NUM];
} SQosPageCfg;

/*---------------------  Export Definitions -------------------------*/
#define EEP_SIZE_QOS_CFG        sizeof(SQosPageCfg)

#define EEP_ADDR_MISC_QOS       EEP_ADDR_QOS_CFG
#define EEP_SIZE_MISC_QOS       4
#define EEP_ADDR_PORT_QOS       (EEP_ADDR_QOS_CFG + EEP_SIZE_MISC_QOS)
#define EEP_SIZE_PORT_QOS       SWITCH_PORT_NUM
#define EEP_SIZE_QOS_PORT_OFFSET 1


// operator for PIQOS_vOp()
enum {
    QOS_OP_EEP_TO_BUF,
    QOS_OP_BUF_TO_EEP_HW,
    QOS_OP_BUF_TO_HW
};

/*---------------------  Export Macro  --------------------------*/
// Get config from EEPROM and set into hardware
// boot init: eep -> hw
#define PIQOS_vSetHwFromEep(pSPageCfg_Qos)     {PIQOS_vOp(pSPageCfg_Qos, QOS_OP_EEP_TO_BUF);PIQOS_vOp(pSPageCfg_Qos, QOS_OP_BUF_TO_HW);}

// Get config from EEPROM and set into page buf
// load config: eep -> buf
#define PIQOS_vInitPage(pSPageCfg_Qos)         PIQOS_vOp(pSPageCfg_Qos, QOS_OP_EEP_TO_BUF)

// Write config to EEPROM and set to hardware
// save config: buf -> eep, hw
#define PIQOS_vSavePage(pSPageCfg_Qos)         PIQOS_vOp(pSPageCfg_Qos, QOS_OP_BUF_TO_EEP_HW)

/*---------------------  Export Functions  --------------------------*/
// Operate within buf, eep, and hw
// shared with piportcl and piqos and used for macros only
void PIQOS_vOp(SQosPageCfg* pSPageCfg_Qos, UINT8 byOp);

// Write default into EEPROM
void PIQOS_vSetEepDefault (SQosPageCfg* pSPageCfg_Qos, BOOL bWriteDefault);




#endif /* __PIQOS_H__ */


⌨️ 快捷键说明

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