gprio.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* $OpenBSD: gprio.h,v 1.4 2003/06/02 19:39:13 fgsch Exp $ */
  2. /*
  3. * Copyright (c) 2002, Federico G. Schwindt
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions are
  8. * met:
  9. * 1. Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. * 2. Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in
  13. * the documentation and/or other materials provided with the
  14. * distribution.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  17. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  18. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  19. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  20. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  21. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  22. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  23. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  24. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  25. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  26. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. */
  28. /*
  29. * A driver for the Gemplus GPR400 SmartCard reader.
  30. *
  31. * The gpr400 driver written by Wolf Geldmacher <wgeldmacher@paus.ch> for
  32. * Linux was used as documentation.
  33. */
  34. #ifndef _DEV_PCMCIA_GPRIO_H
  35. #define _DEV_PCMCIA_GPRIO_H
  36. typedef struct gpr400_ram {
  37. u_int8_t ram[2016];
  38. } gpr400_ram_t;
  39. /*
  40. * gpr device operations.
  41. */
  42. #define GPR_CLOSE _IO('g', 1)
  43. #define GPR_CMD _IO('g', 2)
  44. #define GPR_OPEN _IO('g', 3)
  45. #define GPR_POWER _IOW('g', 4, int)
  46. #define GPR_RAM _IOR('g', 5, struct gpr400_ram)
  47. #define GPR_RESET _IO('g', 6)
  48. #define GPR_SELECT _IO('g', 7)
  49. #define GPR_STATUS _IO('g', 8)
  50. #define GPR_TLV _IO('g', 9)
  51. #endif /* _DEV_PCMCIA_GPRIO_H */