root/include/linux/mouse.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_MOUSE_H
   2 #define _LINUX_MOUSE_H
   3 
   4 /*
   5  * linux/include/linux/mouse.h: header file for Logitech Bus Mouse driver
   6  * by James Banks
   7  *
   8  * based on information gleamed from various mouse drivers on the net
   9  *
  10  * Heavily modified by David giller (rafetmad@oxy.edu)
  11  *
  12  * Minor modifications for Linux 0.96c-pl1 by Nathan Laredo
  13  * gt7080a@prism.gatech.edu (13JUL92)
  14  *
  15  */
  16 
  17 #define MOUSE_IRQ               5
  18 
  19 #define MSE_DATA_PORT           0x23c
  20 #define MSE_SIGNATURE_PORT      0x23d
  21 #define MSE_CONTROL_PORT        0x23e
  22 #define MSE_INTERRUPT_PORT      0x23e
  23 #define MSE_CONFIG_PORT         0x23f
  24 
  25 #define MSE_ENABLE_INTERRUPTS   0x00
  26 #define MSE_DISABLE_INTERRUPTS  0x10
  27 
  28 #define MSE_READ_X_LOW          0x80
  29 #define MSE_READ_X_HIGH         0xa0
  30 #define MSE_READ_Y_LOW          0xc0
  31 #define MSE_READ_Y_HIGH         0xe0
  32 
  33 /* Magic number used to check if the mouse exists */
  34 #define MSE_CONFIG_BYTE         0x91
  35 #define MSE_DEFAULT_MODE        0x90
  36 #define MSE_SIGNATURE_BYTE      0xa5
  37 
  38 /* useful macros */
  39 
  40 #define MSE_INT_OFF()   outb(MSE_DISABLE_INTERRUPTS, MSE_CONTROL_PORT)
  41 #define MSE_INT_ON()    outb(MSE_ENABLE_INTERRUPTS, MSE_CONTROL_PORT)
  42  
  43 struct mouse_status
  44         {
  45         char            buttons;
  46         char            latch_buttons;
  47         int             dx;
  48         int             dy;     
  49 
  50         int             present;
  51         int             ready;
  52         int             active;
  53 
  54         struct inode    *inode;
  55         };
  56 
  57 /* Function Prototypes */
  58 extern long mouse_init(long);
  59 
  60 #endif
  61 

/* [previous][next][first][last][top][bottom][index][help] */