00001 /* Cut-down version for handshake-less arbitrary bit pattern version 00002 of bpp. The original is in /usr/include/sys/bpp_io.h 00003 */ 00004 00005 #ifndef _ALT_BPP_IO_H 00006 #define _ALT_BPP_IO_H 00007 00008 struct bpp_pins { 00009 uint8_t output_reg_pins; /* pins in P_OR register */ 00010 uint8_t input_reg_pins; /* pins in P_IR register */ 00011 }; 00012 00013 struct bpp_switches { 00014 int32_t xend; /* Switch 1 / PE pin state (really bool) */ 00015 int32_t yend; /* Switch 2 / SLCT pin state (really bool) */ 00016 }; 00017 00018 struct bpp_delta { 00019 int32_t x; /* X displacement (-1, 0, +1) */ 00020 int32_t y; /* Y displacement (-1, 0, +1) */ 00021 }; 00022 00023 #define BPPIOC ('b' << 8) 00024 #define BPPIOC_SETOUTPINS (BPPIOC | 3) /* set contents of pins structure */ 00025 #define BPPIOC_GETOUTPINS (BPPIOC | 4) /* read contents of pins structure */ 00026 #define BPPIOC_STEP (BPPIOC | 7) /* advance bit patterns */ 00027 #define BPPIOC_GETSWITCHES (BPPIOC | 8) /* read switch state structure */ 00028 #define BPPIOC_GETREGS (BPPIOC | 9) /* messy: complete register dump */ 00029 #define BPPIOC_SETRAWDATA (BPPIOC | 13) /* shove value into data register */ 00030 #define BPPIOC_GETRAWDATA (BPPIOC | 14) /* read directly from data register */ 00031 00032 #endif