From e2f76cae05cc2e25a4981f9cbe54aee768bcf738 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 3 Feb 2009 19:49:21 +0000 Subject: [PATCH] Trim what we expose to userland in to just the constants used for the ppi(4) ioctls for bits in the control and status registers. Reviewed by: db --- sys/dev/ppbus/ppbconf.h | 58 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/sys/dev/ppbus/ppbconf.h b/sys/dev/ppbus/ppbconf.h index 9981a9afe920..c89848283964 100644 --- a/sys/dev/ppbus/ppbconf.h +++ b/sys/dev/ppbus/ppbconf.h @@ -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 /* @@ -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);