📄 piport.c
字号:
/*
* 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: piport.c
*
* Purpose: Port module UI callback functions
*
* Author: Tevin Chen
*
* Date: Jan 08, 2002
*
* Functions:
*
* Revision History:
*
*/
#include "swport.h"
#include "piportmp.h"
#include "pigencfg.h"
#include "pieeprom.h"
#include "piport.h"
/*--------------------- Static Definitions -------------------------*/
/*--------------------- Static Classes ----------------------------*/
/*--------------------- Static Variables --------------------------*/
/*--------------------- Static Functions --------------------------*/
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Macros -----------------------------*/
/*--------------------- Export Functions --------------------------*/
void PIPORT_vGetPortStatus(SPortStatusPage *pSPage_PortStatus) DIRECT_FUNTYPE_REENT
{
BYTE byPhyPID, byPanelPortID=0;
for (byPanelPortID=0; byPanelPortID<SWITCH_PORT_NUM; byPanelPortID++)
// for (byPanelPortID=0; byPanelPortID<16; byPanelPortID++)
{
byPhyPID = PIPORTMP_byLogIdToPhyId(byPanelPortID);
// get port enable
pSPage_PortStatus->aSPortStatus[byPanelPortID].f1Enable = SWPORT_bGetPortEn(byPhyPID);
pSPage_PortStatus->aSPortStatus[byPanelPortID].f2LinkUp = LISTBOX_LINK_NA;
pSPage_PortStatus->aSPortStatus[byPanelPortID].f3SpdDpx = LISTBOX_SPDDPX_NA;
pSPage_PortStatus->aSPortStatus[byPanelPortID].f2FlowCtrl = LISTBOX_ONOFF_NA;
if (pSPage_PortStatus->aSPortStatus[byPanelPortID].f1Enable)
{
// get link state
pSPage_PortStatus->aSPortStatus[byPanelPortID].f2LinkUp = SWPORT_bGetLinkSts(byPhyPID);
if (pSPage_PortStatus->aSPortStatus[byPanelPortID].f2LinkUp)
{
// get spd/dpx
pSPage_PortStatus->aSPortStatus[byPanelPortID].f3SpdDpx = SWPORT_byGetSpdDpx(byPhyPID);
// get flow control
pSPage_PortStatus->aSPortStatus[byPanelPortID].f2FlowCtrl = SWPORT_bGetFlowCtrlEn(byPhyPID);
}
}
} // end for byPanelPortID
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -