....................................................36API List and Descriptions
4
AR-B5800 User Manual
1 Introduction
AR-B5800 is designed for rack-mounted platform for networking appliance, e.g. VPN, SSL, UTM or
firewall. With Intel advanced Core 2 Quad / Duo / Pentium / Celeron CPU, AR-B5800 is a powerful
platform to satisfy different applications. By eight 10/100/1000Mbps LANs, the AR-B5800 is
sufficient for the small to middle size business security solution.
AR-B5800 can install 2 x HDD for RAID 0/1 redundancy. Customers don’t need to worry about
data lost due to HDD defected problem. BIOS, GPIO and Jumper can control LAN bypass feature.
It provides flexibility to access Internet by user setting. It also has standard PCIe x 8 slot.
Customers can purchase suitable add-on card to meet their appliance.
Key features:
1. Support Intel Core 2 Quad or Core 2 Duo or Pentium or Celeron CPU
2. Intel G41 + ICH7R Chipset to support RAID 0/1 redundancy
3. DDRIII DIMM x 2, up to 4GB memory
4. Intel 82574L 10/100/1000Mbps x 6 + 82541PI 10/100/1000Mbps x 2
5. Two pairs LAN ports support bypass feature (LAN 1/2 + LAN 3/4)
6. LAN bypass can be controlled by BIOS, GPIO and Jumper
7. CF socket, 2.5” HDD x 2, SATA II interface x 2
8. Console, VGA (pinhead), USB 2.0 x 4 (2 x connectors, 2 x pin head)
9. Support boot from LAN, console redirection
10. Support standard PCIe x 8 slot for feature expansion
5
AR-B5800 User Manual
1.1 Specifications
CPU: a LGA775 socket for Intel Core2 Processors in the 775-Land LGA package.
DMA channels: 7.
Interrupt levels: 16 (24 APIC interrupts).
Chipset: Intel G41 express chipset 82G41 + 82801GR + W83627DHG-P.
Memory: provides two 240-pin DIMM sockets to support DDRIII 1066 non-ECC DIMM. The
memory capability can up to 2GB.
VGA Controller: G41 GMCH integrated.
Analog Display Interface: 10-pin box header, and resolution up to 2048x1536@75Hz.
Serial ATA Interface: supports Two SATA devices, and data transfer rates up to 300MB/s per
device.
Compact flash interface: supports TYPE-II compact flash card with UDMA supported.
USB2.0 interface: one stacked USB connector and two 10-pin pin header to support Six
USB2.0 compatible devices. All resettable fuses protected.
Ethernet interface: on-board six PCI express gigabit Ethernet controllers and two PCI gigabit Ethernet
controllers to support eight LAN ports. They provide a standard IEEE 802.3 Ethernet interface for
1000BASE-T, 100BASE-TX, and 10BASE-T applications (802.3, 802.3u, and 802.3ab,
respectively).
BYPASS function: supports by ports LAN1 & LAN2 , LAN3 & LAN4 software programmable.
PCIE X8 interface: One PCI Express x8 slot.
Serial ports (RS232): One high-speed 16550 compatible UARTs ports with 16-byte
send/receive FIFOs.
COM1: RJ45 connector.
LCM interface: a 7-pin pin header could be used to LCM for chassis’ control panel.
General Purpose Input/Output: 8-bit, 3.3V TTL level, bidirectional, and software
In the GPIO APIs, we use the signal names ‘GPIO0’, ‘GPIO1’…etc. to identify the GPIO ports.
LAN Bypass Subsystem
Overview
Two pairs of LAN ports on AR-B5800 implement the bypass function. Users can invoke the LAN
Bypass APIs to control the bypass states of the LAN ports and set up the LAN Bypass Watchdog timer ( this
watchdog timer is different from the system watchdog timer mentioned in the previous paragraph ).
AR-B5800 Library (Window platform only)
The released code for Windows platform includes a folder called ‘AR-B5800’. In this folder, there are
header files and source codes of all the APIs of LCM module, GPIO, Watchdog, and LAN Bypass functions.
The source codes in this folder generate the API library ‘AR-B5800.lib’ and ‘AR-B5800.dll’. Users who
want to invoke the APIs can include the ‘AR-B5800.h’ in their application source code and compile their
application with the library ‘AR-B5800.lib’ or ‘AR-B5800.dll’.
Besides AR-B5800 libraries, there are WinIo32.sys, WinIo32.lib, and WinIo32.dll in this directory.
These files are indispensable for LAN Bypass application, GPIO and Watchdog application. Please put these
three files with LAN Bypass application, GPIO and Watchdog application in the same folder. The APIs
invoke WinIo32.lib, WinIo32.dll, and WinIo32.sys implicitly.
32
AR-B5800 User Manual
4.2 File Descriptions
LCD Control Module
On Linux platform:
1. lcmdemo.c
This file is the source code of the demo program. This program displays the user interface, processes
user’s input, and invokes LCM APIs to demonstrates the functions of LCM.
2. lcm.c
This file includes the hardware independent implementation of LCM APIs. All the APIs in this file
invoke the hardware dependent functions ‘InitSerialPort( )’, ‘WriteSerial( )’, ‘ReadSerial( )’ and
‘CloseSerialPort( )’ for accessing the serial port
3. lcm.h
This file includes the declarations and macro definitions needed by lcm.c.
4. serialport.c
This file includes the hardware dependent implementation of ‘InitSerialPort( )’, ‘WriteSerial( )’,
‘ReadSerial( )’ and ‘CloseSerialPort( )’ for accessing the serial port.
5. serialport.h
This file includes the declarations and macro definitions needed by serialport.c.
6. Makefile
This is the instruction script for GNU make system.
On Window platform:
1. LCM.cpp
The source code of the LCM demo program.
2. AR-B5800.h
The header of the APIs.
3. AR-B5800.lib and AR-B5800.dll
The API libraries.
GPIO and Watchdog
On Linux platform:
33
1. sio_acce.c
The source code of the Watchdog and GPIO APIs for accessing the SuperIO.
2. sio_acce.h
This file includes the declarations of the APIs and macro definitions.
3. main.c
The source code of the utility.
4. Makefile
On Windows platform:
1. GPIO_Watchdog.cpp
GPIO and Watchdog demo program source code.
AR-B5800 User Manual
2. AR-B5800.h
The header file of the APIs.
3. AR-B5800.lib and AR-B5800.dll
The API libiaries.
LAN Bypass Subsystem
On Linux platform:
1. bypass.c
The source code of the APIs for setting up the bypass state.
2. bypass.h
This file includes the declarations of the APIs and macro definitions.
3. main.c
The source code of the utility.
4. Makefile
On Windows platform:
34
1. LAN_Bypass.cpp
LAN_Bypass demo program source code.
2. AR-B5800.h
The header file of the APIs.
3. AR-B5800.lib and AR-B5800.dll
The API libiaries.
AR-B5800 User Manual
35
4.3 API List and Descriptions
Type Definitions
Typedef char i8;
Typedef unsigned char u8;
Typedef short i16;
Typedef unsigned short u16;
Typedef unsigned long u32;
Typedef int i32;
LCD Control Module
AR-B5800 User Manual
1. i32 clrscrLcm
Description: Clear the screen of the LCM.
Return value: 0 after the screen is cleared.
2. i32 cursorLcm( bool mode )
Description: According to the argument ‘mode’, show the cursor on the LCM screen or eliminate the
cursor on the LCM screen. The position of the cursor is unchanged.
mode = true, show the cursor.
mode = false, eliminate the cursor.
Return value: 0 after the cursor has been shown or eliminated.
3. i32 cursorActionLcm( i32 type)
Description: According to the argument ‘type’, move the cursor to the indicated position. The displayed
text is not altered.
type = HOME, move the cursor to row 0, column 0.
type = MOVERIGHT, move the cursor to the column which is to the right of its original position if the
original column < 15.
( void )
type = MOVELEFT, move the cursor to the column which is to the left of its original position if the
original column > 0.
type = MOVEBACK, move the cursor to the column which is to the left of its original position and
delete the character at the new position if the original
column > 0.
Return value: 0 after the cursor is moved.
4. i32 displayLcm( bool mode )
Description: Show the text on the LCM screen or eliminate the text on the LCM screen. The content of
36
the text is not altered.
mode = true, show the text.
mode = false, eliminate the text.
Return value: 0 after the text has been shown or eliminated.
5. i32 getKeyLcm( void )
Description: Scan the LCM and return the identification of the pressed direction key.
Return value: ‘UP’ if the ‘up’ direction key is pressed.
‘RIGHT’ if the ‘right’ direction key is pressed.
‘LEFT’ if the ‘left’ direction key is pressed.
‘DOWN’ if the ‘down’ direction key is pressed.
AR-B5800 User Manual
‘NONE’ if none of the keys is pressed.
6. i32 getPositionLcm( i32 *row, i32 *column )
Description: Get the position of the cursor and write the coordinate to the memory pointed at by
arguments ‘row’ and ‘column’.
Return value: 0 if the request for the coordinate has been served.
7. i32 setPositionLcm( i32 row, i32 column )
Description: Set the position of the cursor according to the arguments ‘row’ and ‘column’.
Return value: 0 after the position has been set.
-1 if the argument ‘row’ or ‘column’ meets any of the following
conditions:
(1) row is not 0.
(2) row is not 1.
(3) column is less than 0.
(4) column is greater than 15.
8. i32 showLcm( i32 length, u8 *info )
Description: Start from the current position of the cursor; print the text pointed at by ‘info’ to the LCM
screen. The number of characters to be printed is at most ‘length’. If the remaining columns available for
printing the text is less than ‘length’, the number of the characters to be printed is:
16 – ( column number of the current position of the cursor ).
Return value: 0 after the text is printed.
37
AR-B5800 User Manual
GPIO and Watchdog
GPIO
1. Syntax:
i32 setChDir( u8 val )
Description: Set the direction (Input/Output) of GPIO ports according to the parameter ‘val’.
Parameters: The parameter ‘val’ is an unsigned character. Each bit of *val corresponds to a GPIO port.
Bit 0 corresponds to GPIO0. Bit 1 corresponds to GPIO1. Bit 2 corresponds to GPIO2, and so on.
Setting a bit of ‘val’ as 0 configures the corresponding port as Output. Setting a bit of ‘val’ as 1
configures the corresponding port as Input.
Return Value: If the function gets the configuration successfully, it returns 0. If any error, it returns –1.
2. Syntax:
i32 getChDir( u8 *val )
Description: Get the direction (Input/Output) of GPIO ports and put the configuration at *val.
Parameters: The parameter ‘val’ points to an unsigned character. Each bit of *val corresponds to a
GPIO port. Bit 0 corresponds to GPIO0. Bit 1 corresponds to GPIO1. Bit 2 corresponds to GPIO2, and
so on. A ‘0’ bit at *val indicates the corresponding port is an Output port. A ‘1’ bit at *val indicates the
corresponding port is an Input port.
Return Value: If the function gets the configuration successfully, it returns 0. If any error, it returns –1.
3. Syntax:
i32 getChLevel( u8 *val )
Description: Get the status value of GPIO ports 0~7 and put the value at *val.
Parameters: The parameter ‘val’ points to an unsigned character. If a GPIO port is configured as an
Output port, the bit at *val which corresponds to this port indicates this port is outputting a ‘1’ or ‘0’. If
38
AR-B5800 User Manual
a GPIO port is configured as an Input port, the corresponding bit at *val is always ‘1’.
Return Value: If the function gets the values successfully, it returns 0. If any error, it returns –1.
4. Syntax:
i32 setChLevel( u8 val )
Description: Set the status bits of GPIO Output ports according to the variable ‘val’. The status bits at
the ports which are configured as input will not be affected.
Parameters: The parameter ‘val’ is an unsigned character. If a GPIO port is configured as an Output
port, a ‘1’ bit at ‘val’ directs the corresponding port to output a ‘1’. A ‘0’ bit directs this port to output a
‘0’. If a GPIO ports is configured as an Input port, the setting to these input port is ignored.
Return Value: If the function sets the values successfully, it returns 0. If any error, it returns –1.
Watchdog
1. Syntax:
u8 getWtdTimer(void)
Description: This function read the value of the watchdog time counter and return it to the caller.
Parameters: None.
Return Value: This function return the value of the time counter and return it to the caller as an
unsigned integer.
2. Syntax:
void setWtdTimer( u8 val )
Description: This function sets the watchdog timer register to the value ‘val’ and starts to count down.
The value could be 0 ~ 255. The unit is second. Setting the timer register to 0 disables the watchdog
function and stops the countdown.
Parameters: The parameter ‘val’ is the value to set to watchdog timer register. The range is 0 ~ 255.
Return Value: None.
39
AR-B5800 User Manual
LAN Bypass Subsystem
1. void enableWdt(void)
Enable Watchdog Timer. (This timer is different from the System Watchdog timer, which is configured
by the API described in 6.2).
2. void disableWdt(void)
Disable Watchdog Timer.
3. void reloadWdt(void)
Reload Watchdog Timer.
4. void forceNormal(void)
Force the port to become normal state.
5. void forceBypass(void)
Force the port to become bypass state.
6. void setWdt4(void)
Set the watchdog timer to 4 seconds.
7. void setWdt8(void)
Set the watchdog timer to 8 seconds.
8. void setWdt16(void)
Set the watchdog timer to 16 seconds.
9. void setWdt32(void)
Set the watchdog timer to 32 seconds.
40
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.