diff options
author | jhb <jhb@FreeBSD.org> | 2009-02-03 19:49:21 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-02-03 19:49:21 +0000 |
commit | 51fa332ba90cf11592eb8b8774a83ae028729cf8 (patch) | |
tree | e2eb7d170ff603e2fd137c92b663f04683173486 /sys/dev/ppbus/ppbconf.h | |
parent | f50ddbb389178a7ffa435b2ab9bca1f09526172d (diff) | |
download | FreeBSD-src-51fa332ba90cf11592eb8b8774a83ae028729cf8.zip FreeBSD-src-51fa332ba90cf11592eb8b8774a83ae028729cf8.tar.gz |
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
Diffstat (limited to 'sys/dev/ppbus/ppbconf.h')
-rw-r--r-- | sys/dev/ppbus/ppbconf.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/sys/dev/ppbus/ppbconf.h b/sys/dev/ppbus/ppbconf.h index 9981a9a..c898482 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 <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); |