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

devi-hirun

Photon "high-runner" input manager

Syntax:

devi-hirun [-bdglPr] [-v[v]...]
           protocol [protocol_opts...]
           [protocol [protocol_opts...]]...
           [device [device_opts...]]...
           [filter [filter_opts...]]...

Options:

-b
Prevent the use of the Ctrl-Alt-Shift-Backspace keychord to exit Photon (permitted by default).
-d device
Device (default: /dev/photon or $PHOTON).
-g input_group
Input group (default: 1).
-l
List the internal modules. Modules are listed in the following format:
module name | date last compiled | revision | class
    
where class is one of: D -- Device, P -- Protocol, or F -- Filter:
-P
Disable the Photon interface (by default, start Photon).
-r
Start the resource manager interface. Use this option only if you're not using Photon.
-v[v]...
Verbose output. More v characters cause more verbosity.

protocol [protocol_opts...]

The protocols and their options are:

kbd [options]
Keyboard scan codes (connected to primary keyboard).

Options:

-f filename    
Create the given file and collect all data passed to the filter level (for debug only).
-k rate[,delay]
Keyboard rate (Hz), delay (ms). The default is 40Hz, 1000ms).
-p filename
Create and open the given FIFO file and duplicate all data passed to the filter level (for debug only)
-R
Don't reset the device while resetting the protocol.
-r
Reset the keyboard (the default).
-s
The device driver should supply valid symbols.

Devices supported: fd, kbddev

msoft [-3] [-b baud] [-i][-R]
Microsoft-compatible mouse protocol (serial).

Options:

-3
Microsoft 3-button mouse.
-b baud
Baud rate for serial device (default: 1200).
-i
Intellimouse mice with wheels.
-R
Don't reset mouse (default: reset mouse).

Devices supported: fd, uart

msys [-b baud] [-R]
Mouse Systems mouse protocol (used by Logitech).

Options:

-b baud
Baud rate for serial device (default: 1200).
-R
Don't reset the mouse (default: reset it).

Devices supported: fd, uart

ps2
IBM PS/2 mouse protocol.

Devices supported: mousedev


Note: All serial devices use 8 data bits, 1 stop bit, and no parity.

device [device_opts...]

The devices and their options are:

fd [-d device] [-s]
Opens a device via open().

Options:

-d device
The device to open fd on (default: /dev/ser1).
-P
The processing priority of the input event.
-s
The input interface is serial (i.e. the module can use devctl() commands that are specific to a serial port).
kbddev [options]
PS2 keyboard.

Options:

-i irq
IRQ (default: 1).     
-f filename    
Create the given file and collect all data passed to the protocol level (for debug only).
-P
The processing priority of the keyboard event.
-p ioport,add
The port (default: 0x60) and a value to add to get the status (default: 4).
-r
Reset the keyboard port. This is useful on hardware with no BIOS (e.g. PowerPC, MIPS).
mousedev [options]
PS2 mouse.

Options:

-f filename
Create the given file and collect all data passed to the protocol level (for debug only).
-i irq
IRQ (default: 12).
-P
The processing priority of the mouse event.
-p ioport,add
The port (default: 0x60) and a value to add to get the status (default: 4).
-r
Reset the mouse port. This is useful on hardware with no BIOS (e.g. PowerPC, MIPS).
WARNING: If both kbddev and mousedev options are specified in the command line and non-standard port numbers are used, the same port number values have to be defined for each module.

uart [options]
Accesses 8250/16450/16550 UART directly.

Options:

-1
Use COM1.
-2
Use COM2.
-i irq
IRQ for serial device (default: 4).
-P
The processing priority of the input event.
-p ioport
Port of serial device (default: 3f8).

filter [filter_opts...]

The filters and their options are:

keyboard [-k kbd_file]
Translate scan codes to Unicode.

Options:

-k kbd_file
The file to use to map the keyboard to support international languages or alternate layouts, such as Dvorak. The default location for these files is /usr/photon/keyboard; to create a keyboard mapping, use mkkbd.
rel [options]
Filter and compress relative coordinate "mouse" events.

Options:

-a value  
The wheel-acceleration parameter (default 10); the higher this value, the faster the mouse wheel acceleration.
-G gain
Motion multiplier (default: 1).
-l
("el") Swap the right and left buttons.
-T threshold
Speed-doubling threshold in mickeys (100).
-x
Reverse X.
-y
Reverse Y.

Description:

The devi-hirun driver serves as the "high-runner" (i.e. the most likely) input driver for Photon. The inputtrap utility detects drivers and starts devi-hirun.

The devi-hirun driver is responsible for taking data from an input device such as a mouse, or keyboard, interpreting the data, and then "doing" something with it. The default behavior is to package the data as an event and inject it into the Photon event space.

The devi-hirun driver uses a layered approach to driver design:

At each layer, data is interpreted/modified and passed up to the next layer until it's injected as an event into the Photon event space.

For each device devi-hirun talks to, there's a separate path through the three layers called an event bus line. An event bus line consists of modules, one representing each layer, linked together by a software bus. As data is passed up the layers via the bus, the data is manipulated by each module into a format recognizable by the next layer's module and so on.

It's important to note that you can run as many instances of devi-hirun as you want, one for each device. Or you can run one devi-hirun for all the devices. Choosing which scenario to use is mostly a matter of convenience.

Examples:

If inputtrap detects a serial Microsoft mouse and a keyboard interfaced through the file descriptor provided by opening /dev/kbd, it invokes devi-hirun like this:

devi-hirun kbd fd -d/dev/kbd msoft fd &

If inputtrap detects a PS/2 mouse interfaced through the auxiliary port on the keyboard controller (mousedev) and a keyboard interfaced through the primary keyboard port on the keyboard controller (kbddev), it invokes devi-hirun like this:

devi-hirun kbddev ps2 mousedev &

See also:

inputtrap

Input drivers (devi-*) in the Utilities Summary

Connecting Hardware in the Neutrino User's Guide


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