
Low-Level Serial Port Driver (llSerial)
D-10
D.4 Low-Level Serial Port Driver (llSerial)
D.4.1 Synopsis
In the current directory structure, the serial port driver (llSerial) may or may not
be part of the HAL directory (as it is an optional component). However, it is part
of the HAL architecture, and should be programmed using the same guide-
lines used for the llTimer and llPacket drivers.
D.4.2 Function Overview
Application Functions:
_llSerialInit()
Initialize Driver Environment and
Enumerate Devices
_llSerialShutdown
Shutdown Driver Environment
_llSerialServiceCheck()
Check for packet activity
Kernel Layer Functions:
llSerialOpenCharmode()
Open Driver in Character Mode
llSerialCloseCharmode()
Close Driver Character Mode
llSerialOpenHDLC()
Open Driver in HDLC Mode
llSerialCloseHDLC()
Close Driver HDLC Mode
llSerialConfig()
Set Serial Port Configuration
llSerialService()
Service a Queued HDLC Buffer
llSerialGetBuffer()
Get a Serial Buffer from the System
llSerialSend()
Send a Serial Buffer
llSerialReturnBuffer()
Return an Serial Buffer to the System
D.4.3 Low-Level Serial API Functions
The low level support layer must provide the following functions:
Initialize Driver Environment and Enumerate Devices
_llSerialInit
Syntax
uint _llSerialInit();
Return Value
Returns the number of physical serial devices.
Description
This function is called by NETCTRL initializes the system to use the serial port.
It also enumerates all the physical devices in the system, and returns a device
count. The stack will then call the llSerialOpenCharmode() and/or llSerialO-
penHDLC() functions for each physical device it requires.