
SDK Programming Guide Version 1.511
ABLELink
R
Ethernet-Serial Server MAXI Series
5. API Overview
The Serial Server SDK supports many basic C-function calls for your application development. All of the
function calls are implemented by ISR (Interrupt Service Routine) and can be divided into the following
groups:
These APIs use application program’s stack, meaning that the Serial Server kernel does not change the
stack when your AP requests the service of API. The default stack size is 4 K bytes and is defined in
“
makefile
”. (Please refer the sample program)
In general, 1K bytes stack is enough for Serial Server kernel.
5.1 Serial I/O Functions Overview
Function
Descriptions
InitSerialMode
Initialize the serial port communication mode. Set baud rate, data bit,
parity and stop bit
SendSerialData
Send data to the serial port.
GetSerialData
Receive data from the serial port.
GetSerialStatus
Get serial line status.
EnableSerialHWintr
Enable hardware interrupts of serial port.
DisableSerialHWintr
Disable hardware interrupts of serial port.
EnableRS485rx
Set the RS-485 transceiver to RX mode.
EnableRS485tx
Set the RS-485 transceiver to TX mode.
SerialIntrEOI
The same as EOI(End Of Interrupt) command of assembly language
Set485type
Set COM Port to RS-422(4 wire) / RS-485(2 wire).
Get485type
Get the type of COM Port, if it is RS485 (2 wires / 4 wires).
Getporttype
Get the type of COM (RS-232/RS-485).
GetConsol
eSta
Get the state of console mode.
Getnewporttype
Get the type of COM Port (RS232/RS422/RS485).
GetTotalPort
Get the count of serial ports.
Copyright © 2004 Atop Technologies, Inc.
All rights reserved. Designed in Taiwan.