Go to the documentation of this file.00001
00043 #if !defined (RINGIODEFS_H)
00044 #define RINGIODEFS_H
00045
00046
00047
00048 #include <dsplink.h>
00049 #include <archdefs.h>
00050 #include <mpcsdefs.h>
00051
00052
00053 #if defined (__cplusplus)
00054 extern "C" {
00055 #endif
00056
00057
00065 #define RINGIO_INVALID_ATTR (Uint16) 0xFFFFl
00066
00074 #define RINGIO_DATABUF_CACHEUSE 0x1u
00075 #define RINGIO_ATTRBUF_CACHEUSE 0x2u
00076 #define RINGIO_CONTROL_CACHEUSE 0x4u
00077 #define RINGIO_NEED_EXACT_SIZE 0x8u
00078
00085 #define RINGIO_NAME_MAX_LEN 32u
00086
00087
00099 typedef enum{
00100 RINGIO_MODE_READ = 0u,
00101 RINGIO_MODE_WRITE
00102 } RingIO_OpenMode ;
00103
00115 typedef enum{
00116 RINGIO_TRANSPORT_DSP_DSP = 1u,
00117 RINGIO_TRANSPORT_GPP_DSP
00118 } RingIO_TransportType ;
00119
00144 typedef enum {
00145 RINGIO_NOTIFICATION_NONE = 0u,
00146 RINGIO_NOTIFICATION_ALWAYS,
00147 RINGIO_NOTIFICATION_ONCE,
00148 RINGIO_NOTIFICATION_HDWRFIFO_ALWAYS,
00149 RINGIO_NOTIFICATION_HDWRFIFO_ONCE
00150
00151 } RingIO_NotifyType ;
00152
00153
00160 typedef Void * RingIO_Handle ;
00161
00168 typedef struct RingIO_ControlStruct_tag * RingIO_ControlHandle ;
00169
00176 typedef Void * RingIO_BufPtr ;
00177
00184 typedef Void * RingIO_NotifyParam ;
00185
00193 typedef Uint16 RingIO_NotifyMsg;
00194
00210 typedef Void (* RingIO_NotifyFunc) (RingIO_Handle handle,
00211 RingIO_NotifyParam param,
00212 RingIO_NotifyMsg msg) ;
00213
00214
00239 typedef struct RingIO_Attrs_tag {
00240 RingIO_TransportType transportType ;
00241 PoolId ctrlPoolId ;
00242 PoolId dataPoolId ;
00243 PoolId attrPoolId ;
00244 PoolId lockPoolId ;
00245 Uint32 dataBufSize ;
00246 Uint32 footBufSize ;
00247 Uint32 attrBufSize ;
00248 } RingIO_Attrs ;
00249
00256 typedef struct RingIO_ControlStruct_tag RingIO_ControlStruct;
00257
00320 typedef struct RingIO_Client_tag {
00321 Uint32 procId ;
00322 Uint32 openMode ;
00323 RingIO_BufPtr pDataStart ;
00324 RingIO_BufPtr pAttrStart ;
00325 Uint32 acqStart ;
00326 Uint32 acqSize ;
00327 Uint32 acqAttrStart ;
00328 Uint32 acqAttrSize ;
00329 Uint32 notifyType ;
00330 RingIO_NotifyFunc notifyFunc ;
00331 RingIO_NotifyParam notifyParam ;
00332 Uint32 notifyWaterMark ;
00333 Uint32 flags ;
00334 RingIO_ControlStruct * virtControlHandle ;
00335 Void * virtLockHandle;
00336 Uint32 isValid ;
00337 Uint32 refCount ;
00338 Uint16 notifyFlag ;
00339 ADD_PADDING (padding, RINGIO_CLIENT_PADDING)
00340 } RingIO_Client ;
00341
00406 struct RingIO_ControlStruct_tag {
00407 Uint32 procId ;
00408 Uint32 entryId;
00409 Uint32 transportType;
00410 RingIO_BufPtr phyBufStart;
00411 Uint32 phyBufEnd;
00412 Uint32 curBufEnd;
00413 Uint32 dataBufEnd;
00414 Uint32 dataBufSize;
00415 Uint32 footBufSize;
00416 Uint32 validSize;
00417 Uint32 emptySize;
00418 RingIO_BufPtr phyAttrStart;
00419 Uint32 phyAttrBufEnd;
00420 Uint32 curAttrBufEnd;
00421 Uint32 validAttrSize;
00422 Uint32 emptyAttrSize;
00423 Int32 prevAttrOffset;
00424 Void * phyLockHandle;
00425 ADD_PADDING (padding, RINGIO_CONTROLSTRUCT_PADDING)
00426 RingIO_Client writer ;
00427 RingIO_Client reader ;
00428 } ;
00429
00455 typedef struct RingIO_Entry_tag {
00456 Pvoid phyControl ;
00457 Pvoid virtControl ;
00458 Char8 name [RINGIO_NAME_MAX_LEN] ;
00459 PoolId ownerProcId ;
00460 PoolId ctrlPoolId ;
00461 PoolId dataPoolId ;
00462 PoolId attrPoolId ;
00463 PoolId lockPoolId ;
00464 ADD_PADDING (padding, RINGIO_ENTRY_PADDING)
00465 } RingIO_Entry ;
00466
00494 typedef struct RingIO_Ctrl_tag {
00495 Uint32 isInitialized ;
00496 Uint32 dspId ;
00497 Uint32 maxEntries ;
00498 Uint32 ipsId ;
00499 Uint32 ipsEventNo ;
00500 RingIO_Entry * dspAddrEntry ;
00501 ADD_PADDING (padding, RINGIO_CTRL_PADDING)
00502 MPCS_ShObj lockObj ;
00503 } RingIO_Ctrl ;
00504
00505
00512 #define RingIOEntry RingIO_Entry
00513
00520 #define RingIORegion RingIO_Ctrl
00521
00528 #define RingIO_SendNotify RingIO_sendNotify
00529
00530 #if defined (__cplusplus)
00531 }
00532 #endif
00533
00534
00535 #endif