/contrib/ntp/kernel/sys/i8253.h

https://bitbucket.org/freebsd/freebsd-head/ · C++ Header · 48 lines · 27 code · 3 blank · 18 comment · 0 complexity · c8092b96cd20490a3458d3aa47705a1b MD5 · raw file

  1. /* Copyright (c) 1995 Vixie Enterprises
  2. *
  3. * Permission to use, copy, modify, and distribute this software for any
  4. * purpose with or without fee is hereby granted, provided that the above
  5. * copyright notice and this permission notice appear in all copies, and that
  6. * the name of Vixie Enterprises not be used in advertising or publicity
  7. * pertaining to distribution of the document or software without specific,
  8. * written prior permission.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND VIXIE ENTERPRISES DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
  12. * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VIXIE ENTERPRISES
  13. * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
  14. * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  15. * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  16. * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  17. * SOFTWARE.
  18. */
  19. #ifndef _I8253_DEFINED
  20. #define _I8253_DEFINED
  21. typedef union {
  22. unsigned char i;
  23. struct {
  24. unsigned int bcd : 1;
  25. #define i8253_binary 0
  26. #define i8253_bcd 1
  27. unsigned int mode : 3;
  28. #define i8253_termcnt 0
  29. #define i8253_oneshot 1
  30. #define i8253_rategen 2
  31. #define i8253_sqrwave 3
  32. #define i8253_softstb 4
  33. #define i8253_hardstb 5
  34. unsigned int rl : 2;
  35. #define i8253_latch 0
  36. #define i8253_lsb 1
  37. #define i8253_msb 2
  38. #define i8253_lmb 3
  39. unsigned int cntr : 2;
  40. #define i8253_cntr_0 0
  41. #define i8253_cntr_1 1
  42. #define i8253_cntr_2 2
  43. } s;
  44. } i8253_ctrl;
  45. #endif /*_I8253_DEFINED*/