i8253.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:1k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* i8253.h - Intel 8253 PIT (Programmable Interrupt Timer) */
  2. /* Copyright 1984-1993 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01b,16jun93,hdn  updated to 5.1.
  7. 01a,20may92,hdn  written.
  8. */
  9. #ifndef __INCi8253h
  10. #define __INCi8253h
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. /*
  15.  * The macro PIT_REG_ADDR_INTERVAL must be defined
  16.  * when including this header.
  17.  */
  18. /* default definitions */
  19. #define CAST
  20. #define PIT_ADRS(base,reg)   (CAST (base+(reg*PIT_REG_ADDR_INTERVAL)))
  21. /* register definitions */
  22. #define PIT_CNT0(base) PIT_ADRS(base,0x00) /* Counter 0. */
  23. #define PIT_CNT1(base) PIT_ADRS(base,0x01) /* Counter 1. */
  24. #define PIT_CNT2(base) PIT_ADRS(base,0x02) /* Counter 2. */
  25. #define PIT_CMD(base) PIT_ADRS(base,0x03) /* Control word. */
  26. #ifdef __cplusplus
  27. }
  28. #endif
  29. #endif /* __INCi8253h */