summaryrefslogtreecommitdiff
path: root/sys/dev/hil/hilvar.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-02-15 23:38:47 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-02-15 23:38:47 +0000
commita46e069cd637bbb380c571661bf9f5db18fe4a4f (patch)
treeac11e4a5c190025c9fadcf80bc47a1ef9f3f0e0f /sys/dev/hil/hilvar.h
parent1f48542324310c7bb07bae5b7d6252f09c7bfbe1 (diff)
- Better type usage in the various hil code: prefer u_int8_t to u_char, but
do not stick to u_int8_t when native word size can do the job better. - Allow send_hildev_cmd() to return the command response buffer to its caller, rather than forcing it to look at the guts of its parent device softc... this will be needed shortly.
Diffstat (limited to 'sys/dev/hil/hilvar.h')
-rw-r--r--sys/dev/hil/hilvar.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/sys/dev/hil/hilvar.h b/sys/dev/hil/hilvar.h
index 4611629afb5..80fc3799a18 100644
--- a/sys/dev/hil/hilvar.h
+++ b/sys/dev/hil/hilvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hilvar.h,v 1.1 2003/02/11 19:39:30 miod Exp $ */
+/* $OpenBSD: hilvar.h,v 1.2 2003/02/15 23:38:46 miod Exp $ */
/*
* Copyright (c) 2003, Miodrag Vallat.
* All rights reserved.
@@ -71,40 +71,40 @@
#define NHILD 8 /* 7 actual + loop pseudo (dev 0) */
struct hil_cb {
- void (*cb_fn)(void *, u_int, u_char *);
+ void (*cb_fn)(void *, u_int, u_int8_t *);
void *cb_arg;
};
struct hil_softc {
- struct device sc_dev;
+ struct device sc_dev;
bus_space_handle_t sc_bsh;
- bus_space_tag_t sc_bst;
+ bus_space_tag_t sc_bst;
- u_char sc_cmddone;
- u_char sc_cmdending;
- u_char sc_actdev; /* current input device */
- u_char sc_cmddev; /* device to perform command on */
- u_char sc_pollbuf[HILBUFSIZE]; /* interrupt time input buffer */
- u_char sc_cmdbuf[HILBUFSIZE];
- u_char *sc_pollbp; /* pointer into sc_pollbuf */
- u_char *sc_cmdbp; /* pointer into sc_cmdbuf */
+ int sc_cmddone;
+ int sc_cmdending;
+ u_int sc_actdev; /* current input device */
+ u_int sc_cmddev; /* device to perform command on */
+ u_int8_t sc_pollbuf[HILBUFSIZE]; /* interrupt time input buf */
+ u_int8_t sc_cmdbuf[HILBUFSIZE];
+ u_int8_t *sc_pollbp; /* pointer into sc_pollbuf */
+ u_int8_t *sc_cmdbp; /* pointer into sc_cmdbuf */
- u_char sc_maxdev; /* number of devices on loop */
- u_char sc_kbddev; /* keyboard device id */
- struct hil_cb sc_cb[NHILD]; /* interrupt dispatcher */
+ u_int sc_maxdev; /* number of devices on loop */
+ u_int sc_kbddev; /* keyboard device id */
+ struct hil_cb sc_cb[NHILD]; /* interrupt dispatcher */
};
#ifdef _KERNEL
-void send_hil_cmd(struct hil_softc *, u_char, u_char *, u_char, u_char *);
-void send_hildev_cmd(struct hil_softc *, char, char);
+void send_hil_cmd(struct hil_softc *, u_int, u_int8_t *, u_int, u_int8_t *);
+void send_hildev_cmd(struct hil_softc *, u_int, u_int, u_int8_t *, u_int *);
void hil_set_poll(struct hil_softc *, int);
-int hil_poll_data(struct hil_softc *, u_char *, u_char *);
+int hil_poll_data(struct hil_softc *, u_int8_t *, u_int8_t *);
void hil_attach(struct hil_softc *);
void hil_attach_deferred(void *);
-void hil_callback_register(struct hil_softc *, int,
- void (*)(void *, u_int, u_char *), void *);
+void hil_callback_register(struct hil_softc *, u_int,
+ void (*)(void *, u_int, u_int8_t *), void *);
int hil_intr(void *);
int hildevprint(void *, const char *);