setopt — Sets device options.
setopt
{device
} {options
}
This command allows device options to be altered, typically baud rates and data formats on character devices.
The device which options are applied to is typically a
serial port. The console command can be used
to obtain a list of appropriate devices with the
-d
option.
The options are in the form:
baud
,data-format
The baud rate is a simple numeric value e.g. 115200 or
19200. The data format is specified as three single
character values. The first denotes the number of data bits,
typically eight or seven. The second sets the parity type
one of none (n
), odd
(o
) or even
(e
). The third is the number of stop
bits either one or two.
The initial port options are detailed in Section 5.2, “Setting parameters on serial drivers”.
Example 9.10. Using the setopt command to alter serial port options.
This example shows the setopt command altering the baud rate of the second s3c2410 serial port to 19600.
>console -d (-w-a) s3c2410x-video (r---) usbkbd (rw--) multi (rw--) null (-w--) all-wr (r---) all-rd (rw--) serial (rw--) (s3c2410_serial2) (rw--) (s3c2410_serial1) (rw--) (s3c2410_serial0) (rw--) (u16550_serial1) (rw--) (u16550_serial0) >setopt (s3c2410_serial1) 19600,8n1 >