Sample Code - Asus AAEON FWS-7831 User Manual

Network appliance
Table of Contents

Advertisement

C.2.2

Sample Code

**********************************************************************************************
#define Byte CPLD_SLAVE_ADDRESS
#define Byte OFFSET
**********************************************************************************************
// Select Lan Pair
BYTE bLanSel = LAN_PAIR;
BYTE bData = SmbusReadByte(CPLD_SLAVE_ADDRESS, OFFSET);
// Set Reg01h bit3
if(bLanSel & 0x08)
bData = bData | 0x08;
else
bData = bData & 0xF7;
// Set Reg01h bit2
if(bLanSel & 0x04)
bData = bData | 0x04;
else
bData = bData & 0xFB;
// Set Reg01h bit1
if(bLanSel & 0x02)
bData = bData | 0x02;
else
bData = bData & 0xFD;
// Set Reg01h bit0
if(bLanSel & 0x01)
bData = bData | 0x01;
else
bData = bData & 0xFE;
// Power On Action (Reg01h bit6)
if(SET_PASS_THROUGH)
bData = bData & 0xBF;
else
bData = bData | 0x40;
// Power Off Action (Reg01h bit5)
if(SET_PASS_THROUGH)
bData = bData & 0xDF;
else
Appendix C – Standard LAN Bypass Platform Setting
//This parameter is represented from Note1
//This parameter is represented from Note2
// Pass Through
// Bypass
// Pass Through
// Bypass
85

Advertisement

Table of Contents
loading

Table of Contents