svn commit: r188093 - head/sys/dev/ppbus
John Baldwin
jhb at FreeBSD.org
Tue Feb 3 11:49:22 PST 2009
Author: jhb
Date: Tue Feb 3 19:49:21 2009
New Revision: 188093
URL: http://svn.freebsd.org/changeset/base/188093
Log:
Trim what we expose to userland in <dev/ppbus/ppbconf.h> to just the
constants used for the ppi(4) ioctls for bits in the control and status
registers.
Reviewed by: db
Modified:
head/sys/dev/ppbus/ppbconf.h
Modified: head/sys/dev/ppbus/ppbconf.h
==============================================================================
--- head/sys/dev/ppbus/ppbconf.h Tue Feb 3 19:47:31 2009 (r188092)
+++ head/sys/dev/ppbus/ppbconf.h Tue Feb 3 19:49:21 2009 (r188093)
@@ -29,6 +29,35 @@
#ifndef __PPBCONF_H
#define __PPBCONF_H
+#define n(flags) (~(flags) & (flags))
+
+/*
+ * Parallel Port Chipset control bits.
+ */
+#define STROBE 0x01
+#define AUTOFEED 0x02
+#define nINIT 0x04
+#define SELECTIN 0x08
+#define IRQENABLE 0x10
+#define PCD 0x20
+
+#define nSTROBE n(STROBE)
+#define nAUTOFEED n(AUTOFEED)
+#define INIT n(nINIT)
+#define nSELECTIN n(SELECTIN)
+#define nPCD n(PCD)
+
+/*
+ * Parallel Port Chipset status bits.
+ */
+#define TIMEOUT 0x01
+#define nFAULT 0x08
+#define SELECT 0x10
+#define PERROR 0x20
+#define nACK 0x40
+#define nBUSY 0x80
+
+#ifdef _KERNEL
#include <sys/queue.h>
/*
@@ -59,34 +88,6 @@
#define PPB_IN_NIBBLE_MODE(bus) (ppb_get_mode (bus) & PPB_NIBBLE)
#define PPB_IN_PS2_MODE(bus) (ppb_get_mode (bus) & PPB_PS2)
-#define n(flags) (~(flags) & (flags))
-
-/*
- * Parallel Port Chipset control bits.
- */
-#define STROBE 0x01
-#define AUTOFEED 0x02
-#define nINIT 0x04
-#define SELECTIN 0x08
-#define IRQENABLE 0x10
-#define PCD 0x20
-
-#define nSTROBE n(STROBE)
-#define nAUTOFEED n(AUTOFEED)
-#define INIT n(nINIT)
-#define nSELECTIN n(SELECTIN)
-#define nPCD n(PCD)
-
-/*
- * Parallel Port Chipset status bits.
- */
-#define TIMEOUT 0x01
-#define nFAULT 0x08
-#define SELECT 0x10
-#define PERROR 0x20
-#define nACK 0x40
-#define nBUSY 0x80
-
/*
* Structure to store status information.
*/
@@ -251,7 +252,6 @@ struct callout;
typedef int (*ppc_intr_handler)(void *);
-#ifdef _KERNEL
extern int ppb_attach_device(device_t);
extern int ppb_request_bus(device_t, device_t, int);
extern int ppb_release_bus(device_t, device_t);
More information about the svn-src-head
mailing list