Eddy DK Programmer Guide
102
6.5
Serial functions
These functions are used to handle internal serial port and UART.
SB_OpenSerial
Function
Opens serial port.
Format
int SB_OpenSerial (int Port_No);
Parameter
Port_No
Serial port number
0: First serial port
1: Second serial port
(Only available for Eddy-CPU, Eddy-DK)
Returns
-1 ~ N
Opened serial port handle
-1: Open error
N: Opened serial port handle
Notice
Eddy provides maximum two serial ports; however for normal model
where Eddy-CPU is mounted, Eddy only provides one serial port.
DK board has two on-board serial ports. User can use both of the serial
ports if the user sets DIP switch on DK board to make it recognized as
Eddy-CPU or Eddy-DK.
SB_InitSerial
Function
Initialize data communication configuration of serial port.
Format
Void SB_InitSerial (int Handle, char Speed, char LCR, char Flow);
Parameter
Handle
Serial port handle acquired from OpenSerial
Baud rate
Speed
0 : 150 BPS,
2 : 600 BPS
4 : 2400 BPS
6 : 9600 BPS
8 : 38400 BPS
10 : 115200 BPS
12 : 460800 BPS
1 : 300 BPS
3 : 1200 BPS:
5 : 4800 BPS
7 : 19200 BPS
9 : 57600 BPS
11 : 230400 BPS
13 : 921600 BPS
Содержание Eddy DK
Страница 1: ...1 Eddy DK Programmer Guide Ver 2 5 1 1 2011 02 15...
Страница 10: ...Eddy DK Programmer Guide 10 2 3 Eddy CPU v2 1 v2 5...
Страница 36: ...Eddy DK Programmer Guide 36 2 4 4 External Device Interface Description...
Страница 47: ...Eddy DK Programmer Guide 47 Eddy S4M v2 1 Eddy S4M v2 5...