📄 piqos.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: Jan 08, 2002
*
*/
#ifndef _PIQOS_H
#define _PIQOS_H
#include "ttype.h"
#include "switch.h"
#ifndef __ASIC_VT6524
/*--------------------- Export Classes -----------------------------*/
typedef struct tagSQosPageCfg { // Port system config
UINT8 byQosMode; // QoS mode configuration
UINT8 by8021pMap; // 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 2
#define EEP_ADDR_PORT_QOS (EEP_ADDR_QOS_CFG + EEP_SIZE_MISC_QOS)
#define EEP_SIZE_PORT_QOS SWITCH_PORT_NUM
// 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, BYTE byOp) DIRECT_FUNTYPE_REENT;
// Write default into EEPROM
void PIQOS_vSetEepDefault (SQosPageCfg* pSPageCfg_Qos) DIRECT_FUNTYPE_REENT;
#else // for VT6524
#include "pipc_qos.h"
/*--------------------- Export Classes -----------------------------*/
// Shared struct with port control module
#define SQosPageCfg SPort_QosPageCfg;
/*--------------------- Export Definitions -------------------------*/
/*--------------------- Export Macro --------------------------*/
// combine with portctrl
// Write default into EEPROM
//#define PIQOS_vSetEepDefault(pSPageCfg_Qos)
// PIPCQOS_vSetEepDefault(pSPageCfg_Qos)
// Get config from EEPROM and set into hardware
// boot init: eep -> hw
//#define PIQOS_vSetHwFromEep(pSPageCfg_Qos)
// PIPCQOS_vOp(pSPageCfg_Qos, PORT_QOS_OP_EEP_TO_BUF);PIPCQOS_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) PIPCQOS_byOp(pSPageCfg_Qos, PORT_QOS_OP_EEP_TO_BUF, 0)
// Write config to EEPROM and set to hardware
// save config: buf -> eep, hw
#define PIQOS_vSavePage(pSPageCfg_Qos) PIPCQOS_byOp(pSPageCfg_Qos, QOS_OP_BUF_TO_EEP_HW, 0)
/*--------------------- Export Functions --------------------------*/
#endif
#endif /* __PIQOS_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -