Go to the documentation of this file.00001
00044 #if !defined (RINGIO_H)
00045 #define RINGIO_H
00046
00047
00048
00049 #include <dsplink.h>
00050 #include <ringiodefs.h>
00051
00052
00053 #if defined (__cplusplus)
00054 extern "C" {
00055 #endif
00056
00057
00075 Uint32
00076 RingIO_getValidSize (IN RingIO_Handle handle );
00077
00095 Uint32
00096 RingIO_getEmptySize (IN RingIO_Handle handle );
00114 Uint32
00115 RingIO_getValidAttrSize (IN RingIO_Handle handle );
00116
00134 Uint32
00135 RingIO_getEmptyAttrSize (IN RingIO_Handle handle );
00136
00154 #define RingIO_getAcquiredOffset(client) \
00155 (((RingIO_Client *) client)->acqStart)
00156
00174 #define RingIO_getAcquiredSize(client) \
00175 (((RingIO_Client *) client)->acqSize)
00176
00194 #define RingIO_getWatermark(client) \
00195 (((RingIO_Client *) client)->notifyWaterMark)
00196
00197
00223 Int
00224 #if defined (DSPLINK_LEGACY_SUPPORT)
00225 RingIO_create (IN Char * name, IN RingIO_Attrs * attrs) ;
00226 #else
00227 RingIO_create (IN Uint32 procId, IN Char * name, IN RingIO_Attrs * attrs) ;
00228 #endif
00229
00230
00253 Int
00254 #if defined (DSPLINK_LEGACY_SUPPORT)
00255 RingIO_delete (IN Char * name) ;
00256 #else
00257 RingIO_delete (IN Uint32 procId, IN Char * name) ;
00258 #endif
00259
00260
00288 RingIO_Handle
00289 RingIO_open (IN Char * name, IN RingIO_OpenMode openMode, IN Uint32 flags) ;
00290
00291
00312 Int
00313 RingIO_close (IN RingIO_Handle handle) ;
00314
00315
00354 Int
00355 RingIO_acquire (IN RingIO_Handle handle,
00356 OUT RingIO_BufPtr * pData,
00357 IN OUT Uint32 * pSize) ;
00358
00359
00383 Int
00384 RingIO_release (IN RingIO_Handle handle, IN Uint32 size) ;
00385
00386
00407 Int
00408 RingIO_cancel (IN RingIO_Handle handle) ;
00409
00451 Int
00452 RingIO_getvAttribute (IN RingIO_Handle handle,
00453 OUT Uint16 * type,
00454 OUT Uint32 * param,
00455 IN RingIO_BufPtr vptr,
00456 IN OUT Uint32 * pSize) ;
00457
00458
00498 Int
00499 RingIO_setvAttribute (IN RingIO_Handle handle,
00500 IN Uint32 offset,
00501 IN Uint16 type,
00502 IN Uint32 param,
00503 IN RingIO_BufPtr pdata,
00504 IN Uint32 size) ;
00505
00506
00541 static
00542 inline
00543 Int
00544 RingIO_getAttribute (IN RingIO_Handle handle,
00545 OUT Uint16 * type,
00546 OUT Uint32 * param)
00547 {
00548 return (RingIO_getvAttribute (handle, type, param, NULL, NULL)) ;
00549 }
00550
00551
00584 static
00585 inline
00586 Int
00587 RingIO_setAttribute (IN RingIO_Handle handle,
00588 IN Uint32 offset,
00589 IN Uint16 type,
00590 IN Uint32 param)
00591 {
00592 return RingIO_setvAttribute (handle, offset, type, param, NULL, 0) ;
00593 }
00594
00595
00647 Int
00648 RingIO_flush (IN RingIO_Handle handle,
00649 IN Bool hardFlush,
00650 OUT Uint16 * type,
00651 OUT Uint32 * param,
00652 OUT Uint32 * bytesFlushed) ;
00653
00654
00694 Int
00695 RingIO_setNotifier (IN RingIO_Handle handle,
00696 IN RingIO_NotifyType notifyType,
00697 IN Uint32 notifyWatermark,
00698 IN RingIO_NotifyFunc notifyFunc,
00699 IN RingIO_NotifyParam pNotifyParam) ;
00700
00701
00724 Int
00725 RingIO_sendNotify (IN RingIO_Handle handle,
00726 IN RingIO_NotifyMsg msg) ;
00727
00728
00729
00730 #if defined (__cplusplus)
00731 }
00732 #endif
00733
00734
00735 #endif