Low-Level Serial Port Driver (llSerial)
D-13
Hardware Abstraction Layer (HAL)
Configure Serial Port
llSerialConfig
Syntax
void llSerialConfig( uint dev, uint baud, uint mode, uint flowctrl );
Return Value
nothing
Description
This function is called by NETCTRL to configure the serial port attributes for
the indicated device.
The value of baud is the baud rate, and must be an even denominator of
230400, up to a max baud rate of 230400. For example: 230400, 115200,
57600, 38400, 28800, and 19200 are all legal values, while 56000 it not.
The value of mode indicates the mode of the device including data bits, parity,
and stop bits. Only the two most commonly used modes are defined:
HAL_SERIAL_MODE_8N1
8 Data Bits, No Parity, 1 Stop Bit
HAL_SERIAL_MODE_7E1
7 Data Bits, Even Parity, 1 Stop Bit
The value of flowctrl indicates the desired flow control operation. Legal values
for this parameter are:
HAL_SERIAL_FLOWCTRL_NONE
No Flow Control
HAL_SERIAL_FLOWCTRL_HARDWARE
Hardware Flow Control
This function can be called before or after the device is opened.
Service a Queued HDLC Buffer
llSerialService
Syntax
void llSerialService();
Return Value
nothing
Description
This function is called to inform the driver that it may now indicate any queued
HDLC buffers to the HDLC object corresponding to the physical ingress de-
vice. Serial drivers must internally queue their own buffers. Queued buffers
cause events to be sent to the scheduler which will in turn call this function.
HDLC buffers are passed to the HDLC object via HDLCInput().