beautypg.com

Solvline Eddy DK User Manual

Page 105

background image

Eddy DK Programmer Guide

105

LCR

X X P P S D D (8 bit binary)
P P : Parity Bits
0 0 : None, 0 1 : Odd, 1 0, 1 1: Even
S : Stop Bits
0 : 1 bits, 1 : 2 bits
D D : Data Bits
0 0 : 5 bits, 0 1 : 6 bits
1 0 : 7 bits, 1 1 : 8 bits

FlowControl

Types of flow control
0: no flow control
1: RTS/CTS flow control
2: Xon/Xoff flow contorl

Returns

None

Notice

SB_SendSerial

Function

Send data to the serial port.

Format

Void SB_SendSerial (int handle, char *data, int length);

Parameter

handle

Handle to serial port or socket

data

Pointer to the data to be sent

length

Length of the data to be sent

Returns

None

Notice

When the transmit buffer is full, this function will retry up to 10 time in
20 msec period; it will return after transmission is completed.

SB_ReadSerial

Function

Reads data from the serial port.

Format

int SB_ReadSerial (int handle, char *data, int length, int wait_msec);

Parameter

handle

Handle to serial port.

data

Buffer pointer where the read data will be saved.

length

Size(length) of the buffer memory

wait_msec

Time the function will wait for next received data after
reading from read buffer.

Returns

0 ~ n

Size of the read data

Notice

When wait_msec is set to 0 this function will only read data from serial
receive buffer; when set larger than 0, it will read data from serial
receive buffer, wait for time specified in msec unit, and then continue
reading data from serial port as one packet.
The maximum size of the data is same as buffer’s size, i.e. length.
You can use value obtained from SB_GetDelaySerial function or value
manually calculated for wait_msec.