bpp.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #ifndef _SPARC_BPP_H
  2. #define _SPARC_BPP_H
  3. /*
  4. * Copyright (c) 1995 Picture Elements
  5. * Stephen Williams
  6. * Gus Baldauf
  7. *
  8. * Linux/SPARC port by Peter Zaitcev.
  9. * Integration into SPARC tree by Tom Dyas.
  10. */
  11. #include <linux/ioctl.h>
  12. /*
  13. * This is a driver that supports IEEE Std 1284-1994 communications
  14. * with compliant or compatible devices. It will use whatever features
  15. * the device supports, prefering those that are typically faster.
  16. *
  17. * When the device is opened, it is left in COMPATABILITY mode, and
  18. * writes work like any printer device. The driver only attempt to
  19. * negotiate 1284 modes when needed so that plugs can be pulled,
  20. * switch boxes switched, etc., without disrupting things. It will
  21. * also leave the device in compatibility mode when closed.
  22. */
  23. /*
  24. * This driver also supplies ioctls to manually manipulate the
  25. * pins. This is great for testing devices, or writing code to deal
  26. * with bizzarro-mode of the ACME Special TurboThingy Plus.
  27. *
  28. * NOTE: These ioctl currently do not interact well with
  29. * read/write. Caveat emptor.
  30. *
  31. * PUT_PINS allows us to assign the sense of all the pins, including
  32. * the data pins if being driven by the host. The GET_PINS returns the
  33. * pins that the peripheral drives, including data if appropriate.
  34. */
  35. # define BPP_PUT_PINS _IOW('B', 1, int)
  36. # define BPP_GET_PINS _IOR('B', 2, char) /* that's bogus - should've been _IO */
  37. # define BPP_PUT_DATA _IOW('B', 3, int)
  38. # define BPP_GET_DATA _IOR('B', 4, char) /* ditto */
  39. /*
  40. * Set the data bus to input mode. Disengage the data bin driver and
  41. * be prepared to read values from the peripheral. If the arg is 0,
  42. * then revert the bus to output mode.
  43. */
  44. # define BPP_SET_INPUT _IOW('B', 5, int)
  45. /*
  46. * These bits apply to the PUT operation...
  47. */
  48. # define BPP_PP_nStrobe 0x0001
  49. # define BPP_PP_nAutoFd 0x0002
  50. # define BPP_PP_nInit 0x0004
  51. # define BPP_PP_nSelectIn 0x0008
  52. /*
  53. * These apply to the GET operation, which also reads the current value
  54. * of the previously put values. A bit mask of these will be returned
  55. * as a bit mask in the return code of the ioctl().
  56. */
  57. # define BPP_GP_nAck 0x0100
  58. # define BPP_GP_Busy 0x0200
  59. # define BPP_GP_PError 0x0400
  60. # define BPP_GP_Select 0x0800
  61. # define BPP_GP_nFault 0x1000
  62. #endif