00001 00044 #if !defined (DSPLINK_) 00045 #define DSPLINK_ 00046 00047 00048 /* ----------------------------------- DSP/BIOS Headers */ 00049 #include <que.h> 00050 #include <pool.h> 00051 #if defined (MSGQ_COMPONENT) 00052 #include <msgq.h> 00053 #endif /* #if defined (MSGQ_COMPONENT) */ 00054 00055 /* ----------------------------------- DSP/BIOS LINK Headers */ 00056 #include <platform.h> 00057 #include <version.h> 00058 00059 00060 #if defined (__cplusplus) 00061 extern "C" { 00062 #endif /* defined (__cplusplus) */ 00063 00064 00071 #define IN /* The argument is INPUT only */ 00072 #define OUT /* The argument is OUTPUT only */ 00073 #define CONST const 00074 00081 #define DSP_MAX_STRLEN 32 00082 00083 00084 /* ============================================================================ 00085 * @const MAX_IPS 00086 * 00087 * @brief Maximum number of IPS objects supported for each DSP. 00088 * ============================================================================ 00089 */ 00090 #define MAX_IPS 16 00091 00092 /* ============================================================================ 00093 * @const DSPLINK_TERMINATE_EVT 00094 * 00095 * @brief The event number (0 - 31) to use for the DSPLink terminate event. 00096 * This must match with dsplink/gpp/inc/usr/dsplink.h. The default 00097 * value (-1) disables the terminate event signaling. Modify this 00098 * definition to enable the feature and to specify the terminate 00099 * event number. 00100 * 00101 * Example usage to enable terminate event. 00102 * 00103 * #define DSPLINK_TERMINATE_EVT 28 00104 * ============================================================================ 00105 */ 00106 #define DSPLINK_TERMINATE_EVT (-1) 00107 00108 /* ============================================================================ 00109 * @name DSPLINK_TerminateFxn 00110 * 00111 * @brief Function prototype for the DSPLink terminate handler function. 00112 * ============================================================================ 00113 */ 00114 typedef Void (*DSPLINK_TerminateFxn)(Void); 00115 00116 /* ============================================================================ 00117 * @name DSPLINK_terminateFxn 00118 * 00119 * @brief Global symbol used by client to register an application specific 00120 * terminate handler function. This function is invoked in interrupt 00121 * context, it must obay all runtime context rules. Use this function 00122 * to post a BIOS SWI or TSK function if needed. 00123 * 00124 * Example usage (suggested for main()). 00125 * 00126 * #include <dsplink.h> 00127 * Void DSP_terminateFxn(Void) { ... } 00128 * DSPLINK_terminateFxn = DSP_terminateFxn; // do this in main 00129 * ============================================================================ 00130 */ 00131 extern far DSPLINK_TerminateFxn DSPLINK_terminateFxn; 00132 00133 #if defined (POOL_COMPONENT) 00134 00140 #define MAX_POOLENTRIES 32 00141 #endif /* if defined (POOL_COMPONENT) */ 00142 00149 #define DSPLINK_DRIVER_NAME "/dsplink" 00150 00157 #define MAX_DRIVER_NAME_LEN 16 00158 00159 00160 #if defined (POOL_COMPONENT) 00161 #if !defined (POOL_open) /* To ensure no clash with future BIOS definition */ 00162 00184 Int 00185 POOL_open(Uint16 poolId, 00186 POOL_Obj * poolObj) ; 00187 #endif /* if !defined (POOL_open) */ 00188 00189 00190 #if !defined (POOL_close) /* To ensure no clash with future BIOS definition */ 00191 00202 #define POOL_close(poolId) \ 00203 (((POOL->allocators [poolId]).fxns->close) \ 00204 (POOL->allocators [poolId].object)) 00205 #endif /* if !defined (POOL_close) */ 00206 00207 00208 #if !defined (POOL_alloc) /* To ensure no clash with future BIOS definition */ 00209 00224 #define POOL_alloc(poolId, bufPtr, size) \ 00225 (((POOL->allocators [poolId]).fxns->alloc) \ 00226 (POOL->allocators [poolId].object, \ 00227 bufPtr, \ 00228 size)) 00229 #endif /* if !defined (POOL_alloc) */ 00230 00231 00232 #if !defined (POOL_free) /* To ensure no clash with future BIOS definition */ 00233 00248 #define POOL_free(poolId, buf, size) \ 00249 (((POOL->allocators [poolId]).fxns->free) \ 00250 (POOL->allocators [poolId].object, \ 00251 buf, \ 00252 size)) 00253 #endif /* if !defined (POOL_free) */ 00254 #endif /* if defined (POOL_COMPONENT) */ 00255 00256 00257 #if defined (CHNL_COMPONENT) 00258 00278 typedef struct CHNL_Irp_tag { 00279 QUE_Elem link ; 00280 Ptr buffer ; 00281 LgUns arg ; 00282 LgUns size ; 00283 LgUns iocStatus ; 00284 LgUns chnlId ; 00285 } CHNL_Irp ; 00286 #endif /* if defined (CHNL_COMPONENT) */ 00287 00288 00289 00297 extern POOL_Config * POOL ; 00298 00299 00316 Void 00317 DSPLINK_init (Void) ; 00318 00319 00320 #if defined (__cplusplus) 00321 } 00322 #endif /* defined (__cplusplus) */ 00323 00324 00325 #endif /* if !defined (DSPLINK_) */