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

VxWorks

开发平台:

C/C++

  1. /* dspLib.h - dsp coprocessor support library header */
  2. /* Copyright 1984-1998 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01b,08aug98,kab  fixed default typedef of DSP_CONTEXT.  Cleanup after review.
  7. 01a,22jul98,mem  written.
  8. */
  9. #ifndef __INCdspLibh
  10. #define __INCdspLibh
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #ifndef _ASMLANGUAGE
  15. #include "taskLib.h"
  16. #endif /* _ASMLANGUAGE */
  17. #if (CPU_FAMILY==SH)
  18. #include "arch/sh/dspShLib.h"
  19. #else
  20. #define DSPREG_SET DSP_CONTEXT
  21. typedef ULONG DSP_CONTEXT; /* in case of allocation */
  22. #endif /* CPU_FAMILY==SH */
  23. #ifndef _ASMLANGUAGE
  24. /* variable declarations */
  25. IMPORT REG_INDEX dspRegName[]; /* dsp data register table */
  26. IMPORT REG_INDEX dspCtlRegName[]; /* dsp control register table */
  27. IMPORT WIND_TCB *pDspTaskIdPrevious; /* task id for deferred exceptions */
  28. IMPORT FUNCPTR  dspCreateHookRtn; /* arch dependent create hook routine */
  29. IMPORT FUNCPTR  dspDisplayHookRtn; /* arch dependent display routine */
  30. /* function declarations */
  31. #if defined(__STDC__) || defined(__cplusplus)
  32. /* 
  33.  * The interface is set in os/dspLib.c through dspInit().  Some of
  34.  * the functions are actually implemented in architecture dependent
  35.  * files.
  36.  */
  37. IMPORT void  dspInit (void);
  38. IMPORT void dspShowInit (void);
  39. IMPORT void  dspTaskRegsShow (int task);
  40. IMPORT STATUS  dspTaskRegsGet (int task, DSPREG_SET *pDspRegSet);
  41. IMPORT STATUS  dspTaskRegsSet (int task, DSPREG_SET *pDspRegSet);
  42. IMPORT STATUS  dspProbe (void);
  43. IMPORT void  dspRestore (DSP_CONTEXT *pDspContext);
  44. IMPORT void  dspSave (DSP_CONTEXT *pDspContext);
  45. IMPORT void dspRegsToCtx (DSPREG_SET *pDspRegSet, DSP_CONTEXT *pDspContext);
  46. IMPORT void dspCtxToRegs (DSP_CONTEXT *pDspContext, DSPREG_SET *pDspRegSet);
  47. #else
  48. IMPORT void  dspInit ();
  49. IMPORT void dspShowInit ();
  50. IMPORT void  dspTaskRegsShow ();
  51. IMPORT STATUS  dspTaskRegsGet ();
  52. IMPORT STATUS  dspTaskRegsSet ();
  53. IMPORT STATUS  dspProbe ();
  54. IMPORT void  dspRestore ();
  55. IMPORT void  dspSave ();
  56. IMPORT void dspRegsToCtx ();
  57. IMPORT void dspCtxToRegs ();
  58. #endif /* __STDC__ */
  59. #endif /* _ASMLANGUAGE */
  60. #ifdef __cplusplus
  61. }
  62. #endif
  63. #endif /* __INCdspLibh */