Main – AAEON FWS-7400 User Manual
Page 97

N e t w o r k Ap p l i a n c e
F W S - 7 4 0 0
Appendix C Standard LAN Bypass Platform Setting
C-3
Sample Code
************************************************************************************
#define Word LED2Add //This parameter is represented from Note1
#define Word LED1Add //This parameter is represented from Note2
#define Word LED0Add //This parameter is represented from Note3
#define Byte LED2Bit //This parameter is represented from Note4
#define Byte LED1Bit //This parameter is represented from Note5
#define Byte LED0Bit //This parameter is represented from Note6
#define Byte UnitVal //This parameter is represented from Note7
************************************************************************************
VOID
SET_Value (Word IoAddr, Byte BitNum,Byte Value)
{
BYTE TmpValue;
TmpValue = inportb (IoAddr);
TmpValue &= ~(1 << BitNum);
TmpValue |= (Value << BitNum);
outport(IoAddr, TmpValue);
}
************************************************************************************
VOID
Main
(){
SET_Value (LED2Add, LED2Bit, UnitVal); //Setting STA_LED2
SET_Value (LED1Add, LED1Bit, UnitVal); //Setting STA_LED1
SET_Value (LED0Add, LED0Bit, UnitVal); //Setting STA_LED0
}
************************************************************************************