summaryrefslogtreecommitdiff
path: root/sys/arch/atari/dev
diff options
context:
space:
mode:
authortsutsui <tsutsui@NetBSD.org>2009-07-03 13:49:39 +0000
committertsutsui <tsutsui@NetBSD.org>2009-07-03 13:49:39 +0000
commite8940e0b5d3a2ae7d2acefe4761e5fa00efada95 (patch)
tree3acae65c40734b555ea4ab2fbf3d40630412b420 /sys/arch/atari/dev
parent21d83b6b0f49232465ca402dca363ae088ddaabc (diff)
Use more uint8_t, and constify.
Diffstat (limited to 'sys/arch/atari/dev')
-rw-r--r--sys/arch/atari/dev/kbd.c14
-rw-r--r--sys/arch/atari/dev/kbdvar.h18
2 files changed, 16 insertions, 16 deletions
diff --git a/sys/arch/atari/dev/kbd.c b/sys/arch/atari/dev/kbd.c
index 9e99f701d26..b8031c10efc 100644
--- a/sys/arch/atari/dev/kbd.c
+++ b/sys/arch/atari/dev/kbd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kbd.c,v 1.37 2009/07/03 13:36:09 tsutsui Exp $ */
+/* $NetBSD: kbd.c,v 1.38 2009/07/03 13:49:39 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.37 2009/07/03 13:36:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.38 2009/07/03 13:49:39 tsutsui Exp $");
#include "mouse.h"
#include "ite.h"
@@ -123,7 +123,7 @@ static int kbdmatch(struct device *, struct cfdata *, void *);
#if NITE>0
static int kbd_do_modifier(uint8_t);
#endif
-static int kbd_write_poll(uint8_t *, int);
+static int kbd_write_poll(const uint8_t *, int);
static void kbd_pkg_start(struct kbd_softc *, uint8_t);
CFATTACH_DECL(kbd, sizeof(struct device),
@@ -179,8 +179,8 @@ static void
kbdattach(struct device *pdp, struct device *dp, void *auxp)
{
int timeout;
- uint8_t kbd_rst[] = { 0x80, 0x01 };
- uint8_t kbd_icmd[] = { 0x12, 0x15 };
+ const uint8_t kbd_rst[] = { 0x80, 0x01 };
+ const uint8_t kbd_icmd[] = { 0x12, 0x15 };
/*
* Disable keyboard interrupts from MFP
@@ -649,7 +649,7 @@ kbdgetcn(void)
* Write a command to the keyboard in 'polled' mode.
*/
static int
-kbd_write_poll(uint8_t *cmd, int len)
+kbd_write_poll(const uint8_t *cmd, int len)
{
int timeout;
@@ -667,7 +667,7 @@ kbd_write_poll(uint8_t *cmd, int len)
* Write a command to the keyboard. Return when command is send.
*/
void
-kbd_write(uint8_t *cmd, int len)
+kbd_write(const uint8_t *cmd, int len)
{
struct kbd_softc *k = &kbd_softc;
int sps;
diff --git a/sys/arch/atari/dev/kbdvar.h b/sys/arch/atari/dev/kbdvar.h
index 0852d92f4e5..701c4e3d81b 100644
--- a/sys/arch/atari/dev/kbdvar.h
+++ b/sys/arch/atari/dev/kbdvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: kbdvar.h,v 1.6 2009/03/14 14:45:56 dsl Exp $ */
+/* $NetBSD: kbdvar.h,v 1.7 2009/07/03 13:49:39 tsutsui Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman.
@@ -44,12 +44,12 @@ struct kbd_softc {
int k_event_mode; /* if 1, collect events, */
/* else pass to ite */
struct evvar k_events; /* event queue state */
- u_char k_soft_cs; /* control-reg. copy */
- u_char k_package[20]; /* XXX package being build */
- u_char k_pkg_size; /* Size of the package */
- u_char k_pkg_idx; /* Running pkg assembly index */
- u_char k_pkg_type; /* Type of package */
- u_char *k_sendp; /* Output pointer */
+ uint8_t k_soft_cs; /* control-reg. copy */
+ uint8_t k_package[20]; /* XXX package being build */
+ uint8_t k_pkg_size; /* Size of the package */
+ uint8_t k_pkg_idx; /* Running pkg assembly index */
+ uint8_t k_pkg_type; /* Type of package */
+ const uint8_t *k_sendp; /* Output pointer */
int k_send_cnt; /* Chars left for output */
#if NWSKBD>0
struct device *k_wskbddev; /* pointer to wskbd for sending strokes */
@@ -69,11 +69,11 @@ struct kbd_softc {
#define KBD_TIMEO_PKG 6 /* Timeout package */
#ifdef _KERNEL
-extern u_char kbd_modifier;
+extern uint8_t kbd_modifier;
void kbd_bell_gparms(u_int *, u_int *, u_int *);
void kbd_bell_sparms(u_int, u_int, u_int);
-void kbd_write(u_char *, int);
+void kbd_write(const uint8_t *, int);
int kbdgetcn(void);
void kbdbell(void);
void kbdenable(void);