The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/pc/psaux.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Interface to raw PS/2 aux port.
    3  * Used by user-level mouse daemon.
    4  */
    5 
    6 #include "u.h"
    7 #include "../port/lib.h"
    8 #include "mem.h"
    9 #include "dat.h"
   10 #include "fns.h"
   11 #include "../port/error.h"
   12 #include "io.h"
   13 
   14 #define Image   IMAGE
   15 #include <draw.h>
   16 #include <memdraw.h>
   17 #include <cursor.h>
   18 #include "screen.h"
   19 
   20 /*
   21  * BUG: we ignore shift here.
   22  * we need a more general solution,
   23  * one that will also work for serial mice.
   24  */
   25 Queue *psauxq;
   26 
   27 static void
   28 psauxputc(int c, int)
   29 {
   30         uchar uc;
   31 
   32         uc = c;
   33         qproduce(psauxq, &uc, 1);
   34 }
   35 
   36 static long
   37 psauxread(Chan*, void *a, long n, vlong)
   38 {
   39         return qread(psauxq, a, n);
   40 }
   41 
   42 static long
   43 psauxwrite(Chan*, void *a, long n, vlong)
   44 {
   45         return i8042auxcmds(a, n);
   46 }
   47 
   48 void
   49 psauxlink(void)
   50 {
   51         psauxq = qopen(1024, 0, 0, 0);
   52         if(psauxq == nil)
   53                 panic("psauxlink");
   54         qnoblock(psauxq, 1);
   55         i8042auxenable(psauxputc);
   56         addarchfile("psaux", DMEXCL|0660, psauxread, psauxwrite);
   57 }

Cache object: 06c44ef5530565f2be968d6767b35940


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.