diff options
author | gene <gene@cvs.openbsd.org> | 1997-11-11 22:42:28 +0000 |
---|---|---|
committer | gene <gene@cvs.openbsd.org> | 1997-11-11 22:42:28 +0000 |
commit | f47c5a3368cf9fd0d21f24b577fe9def5fc01e2c (patch) | |
tree | 6eb679cd95b23af34be1284da1300120cb55d033 /sys/arch/mac68k | |
parent | 85635527db07dff3a9e08ac91e10bef00881bbe2 (diff) |
Pull in sys/time.h and sys/ioctl.h so things like dt (which apparently
expect this to happen) compile.
While I'm here, beautify and KNF this thing a bit and standardize the name
of the multiple inclusion macro.
Diffstat (limited to 'sys/arch/mac68k')
-rw-r--r-- | sys/arch/mac68k/include/adbsys.h | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/sys/arch/mac68k/include/adbsys.h b/sys/arch/mac68k/include/adbsys.h index 96b8e019c74..c4992ad0050 100644 --- a/sys/arch/mac68k/include/adbsys.h +++ b/sys/arch/mac68k/include/adbsys.h @@ -1,4 +1,4 @@ -/* $OpenBSD: adbsys.h,v 1.4 1997/04/06 02:59:52 briggs Exp $ */ +/* $OpenBSD: adbsys.h,v 1.5 1997/11/11 22:42:27 gene Exp $ */ /* $NetBSD: adbsys.h,v 1.5 1996/05/05 14:34:07 briggs Exp $ */ /*- @@ -34,13 +34,15 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _ADBSYS_MACHINE_ -#define _ADBSYS_MACHINE_ +#ifndef _MACHINE_ADBSYS_H_ +#define _MACHINE_ADBSYS_H_ + +#include <sys/time.h> +#include <sys/ioctl.h> /* Handy visual constants */ #define ADB_MAX_HANDLERS 256 -#define ADB_MAX_DEVS 16 - +#define ADB_MAX_DEVS 16 /* Different ADB system types */ enum adb_system_e { @@ -59,10 +61,10 @@ typedef struct adb_event_s { unsigned char bytes[8]; /* bytes from register 0 */ struct timeval timestamp; /* time event was acquired */ union { - struct adb_keydata_s{ + struct adb_keydata_s { int key; /* ADB key code */ } k; - struct adb_mousedata_s{ + struct adb_mousedata_s { int dx; /* mouse delta x */ int dy; /* mouse delta y */ int buttons; /* buttons (down << (buttonnum)) */ @@ -70,16 +72,14 @@ typedef struct adb_event_s { } u; /* courtesy interpretation */ } adb_event_t; - -/* a device on the ADB */ -typedef struct adb_dev_s{ +/* Descriptor of a device on the ADB bus */ +typedef struct adb_dev_s { int addr; /* current address */ int default_addr; /* startup address */ int handler_id; /* handler ID */ } adb_dev_t; - - /* Interesting default addresses */ +/* Interesting default addresses */ #define ADBADDR_MAP 2 #define ADBADDR_REL 3 #define ADBADDR_ABS 4 @@ -87,8 +87,7 @@ typedef struct adb_dev_s{ #define ADBADDR_MS ADBADDR_REL #define ADBADDR_TABLET ADBADDR_ABS - - /* Interesting handler IDs */ +/* Interesting handler IDs */ #define ADB_STDKBD 1 #define ADB_EXTKBD 2 #define ADB_PBKBD 12 @@ -97,17 +96,16 @@ typedef struct adb_dev_s{ #define ADBMS_EXTENDED 4 #define ADBMS_USPEED 47 /* MicroSpeed mouse */ - - /* Get device info from ADB system */ -typedef struct adb_devinfo_s{ +/* Get device info from ADB system */ +typedef struct adb_devinfo_s { adb_dev_t dev[ADB_MAX_DEVS]; - /* [addr].addr == -1 if none */ + /* [addr].addr == -1 if none */ } adb_devinfo_t; #define ADBIOC_DEVSINFO _IOR('A', 128, adb_devinfo_t) - /* Event auto-repeat */ -typedef struct adb_rptinfo_s{ +/* Event auto-repeat */ +typedef struct adb_rptinfo_s { int delay_ticks; /* ticks before repeat */ int interval_ticks; /* ticks between repeats */ } adb_rptinfo_t; @@ -115,11 +113,10 @@ typedef struct adb_rptinfo_s{ #define ADBIOC_SETREPEAT _IOW('A', 131, adb_rptinfo_t) - /* Reset and reinitialize */ +/* Reset and reinitialize */ #define ADBIOC_RESET _IO('A', 132) - -typedef struct adb_listencmd_s{ +typedef struct adb_listencmd_s { int address; /* device address */ int reg; /* register to which to send bytes */ int bytecnt; /* number of bytes */ @@ -129,4 +126,4 @@ typedef struct adb_listencmd_s{ void adb_init __P((void)); -#endif /* _ADBSYS_MACHINE_ */ +#endif /* _MACHINE_ADBSYS_H_ */ |