summaryrefslogtreecommitdiff
path: root/sys/dev/ic/dcreg.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/dcreg.h')
-rw-r--r--sys/dev/ic/dcreg.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/ic/dcreg.h b/sys/dev/ic/dcreg.h
index a360ce05fdc..ccd852e5ee7 100644
--- a/sys/dev/ic/dcreg.h
+++ b/sys/dev/ic/dcreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dcreg.h,v 1.19 2001/12/06 20:12:00 jason Exp $ */
+/* $OpenBSD: dcreg.h,v 1.20 2001/12/06 21:22:07 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1004,3 +1004,10 @@ extern void dc_attach __P((struct dc_softc *));
extern int dc_detach __P((struct dc_softc *));
extern int dc_intr __P((void *));
extern void dc_reset __P((struct dc_softc *));
+
+#if BYTE_ORDER == BIG_ENDIAN
+#define DC_SP_FIELD_C(x) ((x) << 16)
+#else
+#define DC_SP_FIELD_C(x) (x)
+#endif
+#define DC_SP_FIELD(x,f) DC_SP_FIELD_C(((u_int16_t *)(x))[(f)])