Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
STREAMS Modulesusbms(7M)


NAME

 usbms - USB mouse STREAMS module

SYNOPSIS

 

 
#include <sys/vuid_event.h>
 
#include <sys/msio.h>
 
#include <sys/msreg.h>

DESCRIPTION

 

The usbms STREAMS module processes byte streams generated by a USB mouse. A USB mouse is a member of the Human Interface Device (HID) class and the usbms module supports only the mouse boot protocol defined in the HID specification. The usbms module must be pushed on top of the HID class driver (see hid(7D)). In the VUID_FIRM_EVENT mode, the usbms module translates packets from the USB mouse into Firm events. The Firm event structure is defined in <sys/vuid_event.h>. The STREAMS module state is initially set to raw or VUID_NATIVE mode which performs no message processing. See the HID 1.0 specification for the raw format of the mouse packets. To initiate mouse protocol conversion to Firm events, change the state to VUID_FIRM_EVENT.

IOCTLS

 
VUIDGFORMAT
This option returns the current state of the STREAMS module. The state of the usbms STREAMS module may be either VUID_NATIVE (no message processing) or VUID_FIRM_EVENT (convert to Firm events).
VUIDSFORMAT
The argument is a pointer to an int. Set the state of the STREAMS module to the int pointed to by the argument.

 
typedef struct  vuid_addr_probe {
     short base; /* default vuid device addr directed too */
     union {
            short next;   /* next addr for default when VUIDSADDR */
            short current; /* current addr of default when VUIDGADDR */
     } data;
} Vuid_addr_probe;

VUIDSADDR
The argument is a pointer to a Vuid_addr_probe structure. VUIDSADDR sets the virtual input device segment address indicated by base to next.

If base does not equal VKEY_FIRST, ENODEV is returned.

VUIDGADDR
The argument is a pointer to a Vuid_addr_probe structure. Return the address of the virtual input device segment indicated by base to current.

If base does not equal VKEY_FIRST, ENODEV is returned.

ioctl() requests for changing and retrieving mouse parameters use the Ms_parms structure:
 
typedef struct {
      int     jitter_thresh;     
      int     speed_law;  
      int     speed_limit;          
} Ms_parms;
jitter_thresh is the "jitter threshold" of the mouse. Motions fewer than jitter_thresh units along both axes are accumulated and then sent up the stream after 1/12 second.

speed_law indicates whether extremely large motions are to be ignored. If it is 1, a "speed limit" is applied to mouse motions. Motions along either axis of more than speed_limit units are discarded.

MSIOGETPARMS
The argument is a pointer to a Ms_params structure. The usbms module parameters are returned in the structure.
MSIOSETPARMS
The argument is a pointer to a Ms_params structure. The usbms module parameters are set according to the values in the structure.

ATTRIBUTES

 

See attributes(5) for a description of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
ArchitecturePCI-based systems
Availability SUNWusb, SUNWusbx

SEE ALSO

 

ioctl(2), attributes(5), hid(7D), usba(7D)

System Administration Guide: Basic Administration

http://www/sun.com/io

DIAGNOSTICS

 

None


SunOS 5.9Go To TopLast Changed 2 Jan 2002

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.