Low-Level Serial Port Driver (llSerial)
D-11
Hardware Abstraction Layer (HAL)
Shutdown Driver Environment
_llSerialShutdown
Syntax
void _llSerialShutdown();
Return Value
nothing
Description
This function is called by NETCTRL to indicate a final shutdown of the serial
driver environment. When called, there should be no currently open serial driv-
ers, and _llSerialInit() will be called again before any call to llSerialOpenChar-
mode() or llSerialOpenHDLC().
Check for Serial Port Activity
_llSerialServiceCheck
Syntax
uint _llSerialServiceCheck();
Return Value
Returns 1 if there are HDLC input buffers available, 0 if not.
Description
This function is called by NETCTRL and has two functions.
First, if there are characters for the “character mode” device waiting, they are
passed into the user application by calling character mode input callback func-
tion passed to llSerialOpenCharmode().
Second, if the device has been opened in HDLC mode, this function returns
1 if there are HDLC buffers pending. In this case, no additional “character
mode” input is received, however some queue character mode data may still
be passed to the callback function.
In a polling system, this function is called continuously. In an interrupt driven
semaphore system, it is called when packet activity is indicated to the schedul-
er and at half second timer intervals for “dead man” polling checks.
Open Driver in Character Mode
llSerialOpenCharmode
Syntax
uint llSerialOpenCharmode( uint dev, void (*pCharmodeRxCb)( char c ) );
Return Value
This function should return 1 on success, and 0 on failure.
Description
Opens the low level serial driver specified by the one’s based index dev in
character mode. The maximum value of dev is the number of devices returned
from the _llSerialInit() function.
Character mode input simply passes all characters received at the port to the
character mode receiver.