[Previous] [Contents] [Index] [Next]

devc-serdsiu, devc-tserdsiu

DSIU serial communications manager (QNX Neutrino)


Note: You must be root to start this driver.

Syntax:

devc-serdsiu [[options] [port[^shift[,intr]]]]... &

devc-tserdsiu [[options] [port[^shift[,intr]]]]... &

Runs on:

MIPS

Options:

The options are position-dependent and affect the subsequent ports.

-b number
The initial baud rate (default 9600).
-C size
The size of the canonical buffer in bytes (default 256).
-E
Start in raw mode (the default). Software flow control is disabled by default.
-e
Start in edited mode (default raw). Software flow control is enabled by default.
-g|G
Use/don't use DSIU pins as general output pins. The default is not to use them (-G).
-I number
The size of the interrupt input buffer in bytes (default 2048).
-O number
The size of the interrupt output buffer in bytes (default 2048).
-S|s
Disable / enable software flow control. The default depends on the mode: in raw mode (-E, the default), it's disabled; in edited mode (-e), it's enabled.

The order in which you specify the -E or -e, and -S or -s options matters:

Options Mode Software flow control
-e Edited Enabled
-S -e Edited Enabled
-e -S Edited Disabled
-E Raw Disabled
-s -E Raw Disabled
-E -s Raw Enabled
-u number
Append number to the device name prefix (/dev/ser). The default is 1; additional devices are given increasing numbers.
port
The physical memory address of a serial port. The default is 0x0B00 01A0.
shift
The spacing of the device registers as a power of 2. For example:
0
Registers are 1 byte apart.
1
Registers are 2 bytes apart.
2
Registers are 4 bytes apart.

...

n
Registers are 2n bytes apart.

The default shift is 1.

intr
The interrupt used by this port; specified in hex if prefixed with 0x, otherwise it's decimal.

Description:

The devc-serdsiu manager is a small serial device manager for QNX Neutrino. It can support any number of serial ports using Debug Serial Interface Units (DSIUs). Each device can be assigned its own interrupt, or share an interrupt if the hardware supports interrupt sharing. If you don't specify any I/O ports, devc-serdsiu assumes you wish to use port 0x0B00 01A0 interrupt 0xB00 0015.

The devc-tserdsiu manager is a "tiny" version of devc-serdsiu that's intended for memory-constrained systems. It doesn't support special character editing (e.g. toggling insert mode, special erase characters).

Each device is given a name in the pathname space of /dev/sern, where n starts at 1 (unless changed via the -u option) and increases. If you use the default DSIU ports, this results in:

Device Port Interrupt
/dev/ser1 0x0B00 01A0 0xB00 0015

Note: If your application uses /dev/console, you should create a link from it to one of /dev/ser1, /dev/ser2, ... by adding a line like this to the buildfile used by mkifs:
[type=link] /dev/console = /dev/ser1

All devices are fully interrupt driven; there's no hardware flow control for DSIU.

A read request by default returns when at least 1 character is available. To increase efficiency, you can control three parameters to control when a read is satisfied:

Time
Return after a specified amount of time has elapsed.
Min
Return when this number of characters are in the input buffer.
Char
Return if this forwarding character is in the input buffer.

Note: If the Min value is greater than the size of the input buffer, the Min value is clipped to the size of the buffer. To avoid this, the size of the input buffer can be changed with the -I option.

These parameters are set using library routines (see tcgetattr(), tcsetattr(), readcond() and TimerTimeout() in the Library Reference).

The devc-serdsiu manager supports both raw and edited modes, making it a real tty device.

The following fields and flags are supported in the termios structure:

Field Supported flags
c_cc All characters
c_iflag BRKINT ICRNL IGNBRK
c_oflag OPOST
c_cflag CLOCAL CSIZE CSTOPB PARENB PARODD
c_lflag ECHO ECHOE ECHOK ECHONL ICANON IEXTEN ISIG NOFLSH

Examples:

Create a 1200 baud device, /dev/ser5, using the default DSIU port, 0x0B00 01A0:

devc-serdsiu -u5 -b1200 &

See also:

Character I/O drivers (devc-*) in the Utilities Summary


[Previous] [Contents] [Index] [Next]