104
"C" Programming Guide For Optimus S/R
0x00
0x01
0x02
0x03
0x04
0x05
0x06
0x07
Baud rate (bps)
* (asterisk):
Not applicable to Serial IR.
BAUD_115200
BAUD_76800 *
BAUD_57600
BAUD_38400
BAUD_19200
BAUD_9600
BAUD_4800 *
BAUD_2400 *
0x00
0x08
Data bits
DATA_BIT7
DATA_BIT8
0x00
0x10
0x30
Parity
PARITY_NONE
PARITY_ODD
PARITY_EVEN
0x00
0x40
0xc0
Flow control method
HANDSHAKE_NONE
HANDSHAKE_CTS
HANDSHAKE_XON
Wedge Emulator Setting
0x8000
Wedge Emulator
WEDGE_EMULATOR
Cradle (Modem type) Command Setting
0x0100
Cradle Command
CRADLE_COMMAND
Bluetooth Setting
0x00
0x03
0x04
BT-SPP Slave
BT-SPP Master
BT-DUN
BT_SERIALPORT_SLAVE
BT_SERIALPORT_MASTER
BT_DIALUP_NETWORKING
Example
open_com (1,0x0b);
/* open COM 1 to 38400, 8 data bits, no parity and no handshake */
Description
This routine initializes the specified COM port, clears its receive buffer, stops
any ongoing data transmission, resets COM port status, and configures the
COM port according to the settings.
Note that the direct RS-232 port is usually COM 1, and the virtual COM port
assigned for Bluetooth serial port profile is COM 2. However, only direct
RS-232 allows for flow control options.
Return
If successful, it returns 1.
Otherwise, it returns 0 to indicate the port number is invalid.
See Also
close_com
Содержание Optimus R
Страница 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Страница 6: ......
Страница 8: ...2 C Programming Guide For Optimus S R...
Страница 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Страница 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Страница 24: ...18 C Programming Guide For Optimus S R...
Страница 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...
Страница 232: ...226 C Programming Guide For Optimus S R 4 11 Implementation defined Limits limits h float h Refer to limit h and float h...
Страница 238: ...232 C Programming Guide For Optimus S R...