mse - bus and InPort mice driver
In /boot/device.hints hint.mse.0.at=isa hint.mse.0.port=0x23c hint.mse.0.irq=5
The bus and InPort mice have two or three buttons, and a D-sub 9-pin male connector or a round DIN 9-pin male connector.
The primary port address of the bus and InPort mouse interface cards is usually 0x23c. Some cards may also be set to use the secondary port address at 0x238. The interface cards require a single IRQ, which may be 2, 3, 4 or 5. Some cards may offer additional IRQs. The port number and the IRQ number are configured by jumpers on the cards or by software provided with the card.
Frequency, or report rate, at which the device sends movement and button state reports to the host system, may also be configurable on some interface cards. It may be 15, 30, 60 or 120Hz.
The difference between the two types of the mice is not in mouse devices (in fact they are exactly the same). But in the circuit on the interface cards. This means that the device from a bus mouse package can be connected to the interface card from an InPort mouse package, or vice versa, provided that their connectors match.
At the level zero the basic support is provided; the device driver will report horizontal and vertical movement of the attached device and state of up to three buttons in the format described below. It is a subset of the MouseSystems protocol.
This is the default level of operation and the driver is initially at this level when opened by the user program.
At the operation level one (extended level), a data packet is encoded in the standard format MOUSE_PROTO_SYSMOUSE as defined in mouse(4).
minor = (`unit' << 1) | `non-blocking'
where `unit' is the device number (usually 0) and the `non-blocking' bit is set to indicate ``do not block waiting for mouse input, return immediately''. The `non-blocking' bit should be set for XFree86, therefore the minor device number usually used for XFree86 is 1. See Sx FILES for device node names.
typedef struct mousehw { int buttons; /* number of buttons */ int iftype; /* I/F type */ int type; /* mouse/track ball/pad... */ int model; /* I/F dependent model ID */ int hwid; /* I/F dependent hardware ID */ } mousehw_t;
The buttons field holds the number of buttons on the device.
The iftype is either MOUSE_IF_BUS or MOUSE_IF_INPORT
The type may be MOUSE_MOUSE MOUSE_TRACKBALL MOUSE_STICK MOUSE_PAD or MOUSE_UNKNOWN
The model is always MOUSE_MODEL_GENERIC at the operation level 0. It may be MOUSE_MODEL_GENERIC or one of MOUSE_MODEL_XXX constants at higher operation levels.
The hwid is always 0.
typedef struct mousemode { int protocol; /* MOUSE_PROTO_XXX */ int rate; /* report rate (per sec), -1 if unknown */ int resolution; /* MOUSE_RES_XXX, -1 if unknown */ int accelfactor; /* acceleration factor */ int level; /* driver operation level */ int packetsize; /* the length of the data packet */ unsigned char syncmask[2]; /* sync. bits */ } mousemode_t;
The protocol is either MOUSE_PROTO_BUS or MOUSE_PROTO_INPORT at the operation level zero. MOUSE_PROTO_SYSMOUSE at the operation level one.
The rate is the status report rate (reports/sec) at which the device will send movement report to the host computer. As there is no standard to detect the current setting, this field is always set to -1.
The resolution is always set to -1.
The accelfactor field holds a value to control acceleration feature (see Sx Acceleration ) . It is zero or greater. If it is zero, acceleration is disabled.
The packetsize field specifies the length of the data packet. It depends on the operation level.
The array syncmask holds a bit mask and pattern to detect the first byte of the data packet. syncmask[0] is the bit mask to be ANDed with a byte. If the result is equal to syncmask[1] the byte is likely to be the first byte of the data packet. Note that this detection method is not 100% reliable, thus, should be taken only as an advisory measure.
Only level and accelfactor are modifiable by the MOUSE_SETMODE command. Changing the other field does not cause error, but has no effect.
"device mse"
In /boot/device.hints
hint.mse.0.at="isa"
hint.mse.0.port="0x23c"
hint.mse.0.irq="5"
Add the driver at the primary port address with the IRQ 5.
"device mse"
hint.mse.1.at="isa"
hint.mse.1.port="0x238"
hint.mse.1.irq="4"
hint.mse.1.flags="0x30"
Define the driver at the secondary port address with the IRQ 4 and the acceleration factor of 3.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |