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

VxWorks

开发平台:

C/C++

  1. /* l64853.h - L64853 SBus DMA Controller header */
  2. /* Copyright 1984-1992 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01g,22sep92,rrr  added support for c++
  7. 01f,06aug92,ccc  added function prototypes.
  8. 01e,26may92,rrr  the tree shuffle
  9. 01d,26may92,ajm  got rid of HOST_DEC def's (new compiler)
  10.   updated copyright
  11. 01c,04oct91,rrr  passed through the ansification filter
  12.   -fixed #else and #endif
  13.   -changed ASMLANGUAGE to _ASMLANGUAGE
  14.   -changed copyright notice
  15. 01b,28sep91,ajm  ifdef'd HOST_DEC for compiler problem
  16. 01a,27jun91,jcc  written.
  17. */
  18. #ifndef __INCl64853h
  19. #define __INCl64853h
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #ifndef _ASMLANGUAGE
  24. #include "vxWorks.h"
  25. #include "dma.h"
  26. typedef struct l64853dmaCtrl /* L64853_DMA_CTRL - L64853 DMA ctrl info */
  27.     {
  28.     DMA_CTRL  dmaCtrl; /* generic DMA ctrl struct */
  29.     volatile UINT32 * pCsrReg; /* ptr to Control / Status register */
  30.     volatile UINT32 * pAdrsReg; /* ptr to Address Counter register */
  31.     volatile UINT32 * pBcntReg; /* ptr to Byte Counter register */
  32.     volatile UINT32 * pIdReg; /* ptr to ID register */
  33.     } L64853_DMA_CTRL;
  34. typedef L64853_DMA_CTRL L64853;
  35. /* Control/Status Register Bit Fields */
  36. #define L64853_CSR_INT_PEND 0x00000001 /* interrupt pending bit */
  37. #define L64853_CSR_ERR_PEND 0x00000002 /* error pending bit */
  38. #define L64853_CSR_PACK_CNT 0x0000000c /* pack count bits */
  39. #define L64853_CSR_INT_EN 0x00000010 /* interrupt enable bit */
  40. #define L64853_CSR_FLUSH 0x00000020 /* flush buffer bit */
  41. #define L64853_CSR_DRAIN 0x00000040 /* drain buffer bit */
  42. #define L64853_CSR_RESET 0x00000080 /* reset DMA bit */
  43. #define L64853_CSR_WRITE 0x00000100 /* read/write bit */
  44. #define L64853_CSR_EN_DMA 0x00000200 /* enable DMA bit */
  45. #define L64853_CSR_REQ_PEND 0x00000400 /* request pending bit */
  46. #define L64853_CSR_BYTE_ADDR 0x00001800 /* byte address bits */
  47. #define L64853_CSR_EN_CNT 0x00002000 /* enable counter bit */
  48. #define L64853_CSR_TC 0x00004000 /* terminal count bit */
  49. #define L64853_CSR_ILACC 0x00008000 /* ILACC 79C900 bit */
  50. #define L64853_CSR_DEV_ID 0xf0000000 /* device ID bits */
  51. #endif /* _ASMLANGUAGE */
  52. #ifndef _ASMLANGUAGE
  53. #if defined(__STDC__) || defined(__cplusplus)
  54. IMPORT void l64853AdrsCountSet (L64853 *pL64853, char *pAdrsCount);
  55. IMPORT void l64853ByteCountSet (L64853 *pL64853, int byteCount);
  56. IMPORT void l64853Write (L64853 *pL64853);
  57. IMPORT void l64853CountEnable (L64853 *pL64853);
  58. IMPORT void l64853DmaEnable (L64853 *pL64853);
  59. IMPORT void l64853CountDisable (L64853 *pL64853);
  60. IMPORT void l64853DmaDisable (L64853 *pL64853);
  61. IMPORT void l64853Read (L64853 *pL64853);
  62. IMPORT void l64853IntEnable (L64853 *pL64853);
  63. IMPORT STATUS l64853Show (DMA_CTRL *pDmaCtrl);
  64. IMPORT BOOL l64853ErrPendTest (L64853 *pL64853);
  65. IMPORT void l64853Flush (L64853 *pL64853);
  66. IMPORT BOOL l64853TermCountTest (L64853 *pL64853);
  67. IMPORT void l64853Drain (L64853 *pL64853);
  68. IMPORT DMA_CTRL *l64853CtrlCreate (UINT32 *baseAdrs, int regOffset,
  69.     UINT32 *pIdReg);
  70. #else /* __STDC__ */
  71. IMPORT  void    l64853AdrsCountSet ();
  72. IMPORT  void    l64853ByteCountSet ();
  73. IMPORT  void    l64853Write ();
  74. IMPORT  void    l64853CountEnable ();
  75. IMPORT  void    l64853DmaEnable ();
  76. IMPORT  void    l64853CountDisable ();
  77. IMPORT  void    l64853DmaDisable ();
  78. IMPORT  void    l64853Read ();
  79. IMPORT  void    l64853IntEnable ();
  80. IMPORT  STATUS  l64853Show ();
  81. IMPORT  BOOL    l64853ErrPendTest ();
  82. IMPORT  void    l64853Flush ();
  83. IMPORT  BOOL    l64853TermCountTest ();
  84. IMPORT  void    l64853Drain ();
  85. IMPORT  DMA_CTRL *l64853CtrlCreate ();
  86. #endif /* __STDC__ */
  87. #endif /* _ASMLANGUAGE */
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91. #endif /* __INCl64853h */