background image
C H A P T E R 2 4
Built-in Communications Tools
24-2
Serial Tool
The following is an example of how to create an endpoint that uses the standard
asynchronous serial tool:
myAsyncEP := {_proto:protoBasicEndpoint};
myOptions := [
{ label: kCMSAsyncSerial,
type: 'service,
opCode: opSetRequired } ];
returnedOptions:= myAsyncEP:Instantiate(myAsyncEP,
myOptions);
Table 24-1 summarizes the standard serial options. Each of these options is
described in detail in "Options for the Standard Asynchronous Serial Tool"
(page 21-2) in Newton Programmer's Referencee.
Table 24-1
Summary of serial options
Label
Value
Use when
Description
kCMOSerialHWChipLoc
"schp"
Before or at
binding
Sets which serial
hardware to use.
kCMOSerialChipSpec
"sers"
Before or at
binding
Sets which serial
hardware to use and
returns information
about the serial
hardware.
kCMOSerialCircuitControl
"sctl"
After connecting
Controls usage of the
serial interface lines.
kCMOSerialBuffers
"sbuf"
Before or at
binding
Sets the size of the
input and output
buffers.
kCMOSerialIOParms
"siop"
Any time
Sets the bps rate, stop
bits, data bits, and
parity options.
kCMOSerialBitRate
"sbps "
Any time
Changes the bps rate.
kCMOOutputFlowControlParms
"oflc"
Any time
Sets output flow
control parameters.
kCMOInputFlowControlParms
"iflc"
Any time
Sets input flow
control parameters.
continued
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна