Annotation of 43BSDReno/sys/hpdev/hilioctl.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1988 University of Utah.
        !             3:  * Copyright (c) 1990 The Regents of the University of California.
        !             4:  * All rights reserved.
        !             5:  *
        !             6:  * This code is derived from software contributed to Berkeley by
        !             7:  * the Systems Programming Group of the University of Utah Computer
        !             8:  * Science Department.
        !             9:  *
        !            10:  * Redistribution is only permitted until one year after the first shipment
        !            11:  * of 4.4BSD by the Regents.  Otherwise, redistribution and use in source and
        !            12:  * binary forms are permitted provided that: (1) source distributions retain
        !            13:  * this entire copyright notice and comment, and (2) distributions including
        !            14:  * binaries display the following acknowledgement:  This product includes
        !            15:  * software developed by the University of California, Berkeley and its
        !            16:  * contributors'' in the documentation or other materials provided with the
        !            17:  * distribution and in all advertising materials mentioning features or use
        !            18:  * of this software.  Neither the name of the University nor the names of
        !            19:  * its contributors may be used to endorse or promote products derived from
        !            20:  * this software without specific prior written permission.
        !            21:  * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
        !            22:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
        !            23:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            24:  *
        !            25:  * from: Utah $Hdr: hilioctl.h 1.9 89/01/18$
        !            26:  *
        !            27:  *     @(#)hilioctl.h  7.1 (Berkeley) 5/8/90
        !            28:  */
        !            29: 
        !            30: struct _hilbell {
        !            31:        u_char  duration;
        !            32:        u_char  frequency;
        !            33: };
        !            34: 
        !            35: struct _hilbuf16 {
        !            36:        u_char  string[16];
        !            37: };
        !            38: 
        !            39: struct _hilbuf11 {
        !            40:        u_char  string[11];
        !            41: };
        !            42: 
        !            43: struct _hilbuf5 {
        !            44:        u_char  string[5];
        !            45: };
        !            46: 
        !            47: struct _hilbuf4 {
        !            48:        u_char  string[4];
        !            49: };
        !            50: 
        !            51: struct _hilbuf2 {
        !            52:        u_char  string[2];
        !            53: };
        !            54: 
        !            55: struct hilqinfo {
        !            56:        int     qid;
        !            57:        char    *addr;
        !            58: };
        !            59: 
        !            60: /*
        !            61:  * HPUX ioctls (here for the benefit of the HIL driver).
        !            62:  * Named as they are under HPUX.
        !            63:  * The first set are loop device ioctls.
        !            64:  * The second set are ioctls for the 8042.
        !            65:  * Note that some are not defined as in HPUX
        !            66:  * due to the difference in the definitions of IOC_VOID.
        !            67:  */
        !            68: #define _IOHpux(x,y)   (IOC_IN|((x)<<8)|y)     /* IOC_IN is IOC_VOID */
        !            69: 
        !            70: #define HILID  _IOR('h',0x03, struct _hilbuf11) /* Identify & describe */
        !            71: #define HILSC  _IOR('h',0x33, struct _hilbuf16) /* Security code */
        !            72: #define HILRN  _IOR('h',0x30, struct _hilbuf16) /* Report name */
        !            73: #define HILRS  _IOR('h',0x31, struct _hilbuf16) /* Report status */
        !            74: #define HILED  _IOR('h',0x32, struct _hilbuf16) /* Extended describe*/
        !            75: #define HILDKR  _IOHpux('h',0x3D)              /* Disable autorepeat */
        !            76: #define HILER1  _IOHpux('h',0x3E)              /* Autorepeat 1/30 */
        !            77: #define HILER2  _IOHpux('h',0x3F)              /* Autorepeat 1/60 */
        !            78: #define HILP1  _IOHpux('h',0x40)               /* Prompt 1 */
        !            79: #define HILP2  _IOHpux('h',0x41)               /* Prompt 2 */
        !            80: #define HILP3  _IOHpux('h',0x42)               /* Prompt 3 */
        !            81: #define HILP4  _IOHpux('h',0x43)               /* Prompt 4 */
        !            82: #define HILP5  _IOHpux('h',0x44)               /* Prompt 5 */
        !            83: #define HILP6  _IOHpux('h',0x45)               /* Prompt 6 */
        !            84: #define HILP7  _IOHpux('h',0x46)               /* Prompt 7 */
        !            85: #define HILP   _IOHpux('h',0x47)               /* Prompt */
        !            86: #define HILA1  _IOHpux('h',0x48)               /* Acknowledge 1 */
        !            87: #define HILA2  _IOHpux('h',0x49)               /* Acknowledge 2 */
        !            88: #define HILA3  _IOHpux('h',0x4A)               /* Acknowledge 3 */
        !            89: #define HILA4  _IOHpux('h',0x4B)               /* Acknowledge 4 */
        !            90: #define HILA5  _IOHpux('h',0x4C)               /* Acknowledge 5 */
        !            91: #define HILA6  _IOHpux('h',0x4D)               /* Acknowledge 6 */
        !            92: #define HILA7  _IOHpux('h',0x4E)               /* Acknowledge 7 */
        !            93: #define HILA   _IOHpux('h',0x4F)               /* Acknowledge */
        !            94: 
        !            95: #define EFTSRD  _IOW('H',0xa0,char)            /* Set the repeat delay. */
        !            96: #define EFTSRR  _IOW('H',0xa2,char)            /* Set the repeat rate. */
        !            97: #define EFTSRPG _IOW('H',0xa6,char)            /* Set RPG interrupt rate. */
        !            98: #define EFTSBP  _IOW('H',0xc4,struct _hilbuf4) /* Send data to the beeper. */
        !            99: #define EFTRLC  _IOR('H',0x12,char)            /* Read the language code. */
        !           100: #define EFTRCC  _IOR('H',0x11,char)            /* Read configuration code. */
        !           101: #define EFTRRT  _IOR('H',0x31,struct _hilbuf5) /* Read the real time. */
        !           102: #define EFTRT   _IOR('H',0xf4,struct _hilbuf4) /* Read the timers for the
        !           103:                                                      four voices. */
        !           104: #define EFTSBI  _IOW('H',0xa3,struct _hilbuf2) /* Set the bell information. */
        !           105: 
        !           106: /*
        !           107:  * BSD ioctls.
        !           108:  * Mostly the same as the HPUX versions except for shared-queue ioctls.
        !           109:  */
        !           110: #define HILIOCID       _IOR('h',0x03, struct _hilbuf11)
        !           111: #define HILIOCSC       _IOR('h',0x33, struct _hilbuf16)
        !           112: #define HILIOCRN       _IOR('h',0x30, struct _hilbuf16)
        !           113: #define HILIOCRS       _IOR('h',0x31, struct _hilbuf16)
        !           114: #define HILIOCED       _IOR('h',0x32, struct _hilbuf16)
        !           115: #define HILIOCAROFF    _IO('h',0x3D)
        !           116: #define HILIOCAR1      _IO('h',0x3E)
        !           117: #define HILIOCAR2      _IO('h',0x3F)
        !           118: #define HILIOCSBP      _IOW('H',0xc4,struct _hilbuf4)
        !           119: #define HILIOCRRT      _IOR('H',0x31,struct _hilbuf5)
        !           120: #define HILIOCRT       _IOR('H',0xf4,struct _hilbuf4)
        !           121: #define HILIOCBEEP     _IOW('H',0xA3,struct _hilbell)
        !           122: #      define  BELLDUR         80      /* tone duration in msec (10 - 2560) */
        !           123: #      define  BELLFREQ        8       /* tone frequency (0 - 63) */
        !           124: 
        !           125: #define HILIOCALLOCQ   _IOWR('H',0x72, struct hilqinfo)        /* allocate queue */
        !           126: #define HILIOCFREEQ    _IOW('H',0x73, struct hilqinfo) /* deallocate queue */
        !           127: #define HILIOCMAPQ     _IOW('H',0x74, int)     /* map device to queue */
        !           128: #define HILIOCUNMAPQ   _IOW('H',0x75, int)     /* unmap device from dev */
        !           129: #define HILIOCTEST      _IOW('H',0x76, int)    /* Toggle debugging mode */
        !           130: #define HILIOCHPUX     _IO('H',0x77)           /* use HPUX (read) semantics */
        !           131: #define HILIOCRESET    _IO('H',0x78)           /* Reset the HIL loop. */
        !           132: 
        !           133: /*
        !           134:  * HIL input queue.
        !           135:  * This is the circular queue (allocated by HILIOCALLOC) shared by kernel
        !           136:  * and user.  It consists of a sixteen byte header followed by space for
        !           137:  * 255 input data packets (a total of 4096 bytes).  The kernel adds packets
        !           138:  * at tail.  The user is expected to remove packets from head.  This is the
        !           139:  * only field in the header that the user should modify.
        !           140:  */
        !           141: typedef struct hil_packet {
        !           142:        u_char  size;           /* total packet size */
        !           143:        u_char  dev;            /* loop device packet was generated by */
        !           144:        long    tstamp;         /* time stamp */
        !           145:        u_char  data[10];       /* device data */
        !           146: } hil_packet;
        !           147: 
        !           148: typedef struct hil_eventqueue {
        !           149:        int     size;
        !           150:        int     head;
        !           151:        int     tail;
        !           152:        int     pad;
        !           153: } hil_eventqueue;
        !           154: 
        !           155: typedef union hilqueue {
        !           156:        char    hqu_size[0x1000];
        !           157:        struct  q_data {
        !           158:                hil_eventqueue  h_eventqueue;
        !           159:                hil_packet      h_event[1];
        !           160:        } q_data;
        !           161: #define hil_evqueue    q_data.h_eventqueue
        !           162: #define hil_event      q_data.h_event
        !           163: } HILQ;
        !           164: 
        !           165: #define HEVQSIZE       \
        !           166:        ((sizeof(HILQ) - sizeof(struct q_data)) / sizeof(hil_packet) + 1)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.