Go to the documentation of this file.00001
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128 #ifndef RINGIO_H_0xd3f4
00129 #define RINGIO_H_0xd3f4
00130
00131
00132 #include <ti/syslink/SysLink.h>
00133
00134 #if defined (__cplusplus)
00135 extern "C" {
00136 #endif
00137
00138
00139
00140
00141
00142
00151 #define RingIO_S_PENDINGATTRIBUTE 4
00152
00158 #define RingIO_S_NOTCONTIGUOUSDATA 3
00159
00164 #define RingIO_S_BUSY 2
00165
00170 #define RingIO_S_ALREADYSETUP 1
00171
00176 #define RingIO_S_SUCCESS 0
00177
00182 #define RingIO_E_FAIL -1
00183
00188 #define RingIO_E_INVALIDARG -2
00189
00194 #define RingIO_E_MEMORY -3
00195
00200 #define RingIO_E_ALREADYEXISTS -4
00201
00206 #define RingIO_E_NOTFOUND -5
00207
00212 #define RingIO_E_TIMEOUT -6
00213
00218 #define RingIO_E_INVALIDSTATE -7
00219
00224 #define RingIO_E_OSFAILURE -8
00225
00230 #define RingIO_E_RESOURCE -9
00231
00236 #define RingIO_E_RESTART -10
00237
00242 #define RingIO_E_INVALIDMSG -11
00243
00248 #define RingIO_E_NOTOWNER -12
00249
00254 #define RingIO_E_REMOTEACTIVE -13
00255
00260 #define RingIO_E_INVALIDHEAPID -14
00261
00266 #define RingIO_E_INVALIDPROCID -15
00267
00272 #define RingIO_E_MAXREACHED -16
00273
00278 #define RingIO_E_INUSE -17
00279
00284 #define RingIO_E_INVALIDCONTEXT -18
00285
00290 #define RingIO_E_BADVERSION -19
00291
00297 #define RingIO_E_BUFWRAP -20
00298
00303 #define RingIO_E_BUFEMPTY -21
00304
00309 #define RingIO_E_BUFFULL -22
00310
00316 #define RingIO_E_PENDINGDATA -23
00317
00323 #define RingIO_E_VARIABLEATTRIBUTE -24
00324
00325
00330 #define RingIO_E_WRONGSTATE -25
00331
00336 #define RingIO_E_NOTIFYFAIL -26
00337
00343 #define RingIO_E_PENDINGATTRIBUTE -27
00344
00345
00346
00347
00348
00349
00356 typedef Ptr RingIO_BufPtr;
00357
00365 typedef UInt16 RingIO_NotifyMsg;
00366
00367
00368
00369
00370
00374 typedef struct RingIO_Object * RingIO_Handle;
00375
00376
00377
00378
00379
00380 typedef enum RingIO_Type_Tag {
00381 RingIO_Type_SHAREDMEM = 0x0
00384 }RingIO_Type;
00385
00386
00387
00388
00392 typedef struct RingIO_Config_Tag {
00393 UInt32 maxNameLen;
00395 UInt32 maxInstances;
00397 } RingIO_Config;
00403 typedef struct RingIO_Params_Tag {
00404 String name;
00406 RingIO_Type interfaceType;
00408 } RingIO_Params;
00409
00413 typedef enum RingIO_OpenMode_Tag {
00414 RingIO_MODE_READER = 0x0,
00416 RingIO_MODE_WRITER = 0x1
00418 } RingIO_OpenMode;
00419
00424 typedef struct RingIO_openParams_Tag {
00425 UInt32 flags;
00428 RingIO_OpenMode openMode;
00430 } RingIO_openParams;
00431
00432
00437 typedef struct RingIO_sharedMemReqDetails_tag {
00438 UInt32 ctrlSharedMemReq;
00440 UInt32 dataSharedMemReq;
00442 UInt32 attrSharedMemReq;
00444 } RingIO_sharedMemReqDetails;
00445
00446
00451 typedef enum RingIO_Flags_tag {
00452 RingIO_DATABUF_MAINTAINCACHE = 0x1,
00455 RingIO_NEED_EXACT_SIZE = 0x2
00461 } RingIO_Flags;
00462
00466 typedef enum RingIO_NotifyType_Tag {
00467 RingIO_NOTIFICATION_NONE = SysLink_NOTIFICATION_NONE,
00469 RingIO_NOTIFICATION_ALWAYS = SysLink_NOTIFICATION_ALWAYS,
00471 RingIO_NOTIFICATION_ONCE = SysLink_NOTIFICATION_ONCE,
00476 RingIO_NOTIFICATION_HDWRFIFO_ALWAYS =
00477 SysLink_NOTIFICATION_HDWRFIFO_ALWAYS,
00481 RingIO_NOTIFICATION_HDWRFIFO_ONCE =
00482 SysLink_NOTIFICATION_HDWRFIFO_ONCE
00488 } RingIO_NotifyType;
00489
00501 typedef void (* RingIO_NotifyFxn ) (RingIO_Handle, Ptr, RingIO_NotifyMsg);
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511
00527 Void RingIO_Params_init (Void * params);
00528
00550 RingIO_Handle RingIO_create (const Void * params);
00551
00569 Int RingIO_delete (RingIO_Handle * handlePtr);
00570
00588 UInt32
00589 RingIO_sharedMemReq (const Void * params,
00590 RingIO_sharedMemReqDetails * sharedMemReqDetails);
00591
00592
00593
00594
00595
00617 Int
00618 RingIO_open ( String name,
00619 const RingIO_openParams * params,
00620 UInt16 * procIds,
00621 RingIO_Handle * handlePtr);
00622
00644 Int
00645 RingIO_openByAddr ( Ptr ctrlSharedAddr,
00646 const RingIO_openParams * params,
00647 RingIO_Handle * handlePtr);
00648
00666 Int RingIO_close (RingIO_Handle * handlePtr);
00667
00668
00669
00670
00671
00672
00707 Int RingIO_registerNotifier (RingIO_Handle handle,
00708 RingIO_NotifyType notifyType,
00709 UInt32 watermark,
00710 RingIO_NotifyFxn notifyFunc,
00711 Ptr cbContext);
00712
00729 Int RingIO_unregisterNotifier (RingIO_Handle handle);
00730
00742 Int RingIO_setWaterMark (RingIO_Handle handle,
00743 UInt32 watermark);
00744
00757 Int
00758 RingIO_setNotifyType (RingIO_Handle handle,
00759 RingIO_NotifyType notifyType);
00760
00761
00762
00763
00764
00808 Int
00809 RingIO_acquire (RingIO_Handle handle,
00810 RingIO_BufPtr * pData,
00811 UInt32 * pSize);
00812
00813
00814
00831 Int
00832 RingIO_release (RingIO_Handle handle,
00833 UInt32 size);
00834
00835
00854 Int
00855 RingIO_cancel (RingIO_Handle handle);
00856
00891 Int
00892 RingIO_getvAttribute (RingIO_Handle handle,
00893 UInt16 * type,
00894 UInt32 * param,
00895 RingIO_BufPtr vptr,
00896 UInt32 * pSize);
00897
00898
00942 Int
00943 RingIO_setvAttribute (RingIO_Handle handle,
00944 UInt16 type,
00945 UInt32 param,
00946 RingIO_BufPtr pData,
00947 UInt32 size,
00948 Bool sendNotification);
00949
00950
00978 Int
00979 RingIO_getAttribute (RingIO_Handle handle,
00980 UInt16 * type,
00981 UInt32 * param);
00982
01030 Int
01031 RingIO_setAttribute (RingIO_Handle handle,
01032 UInt16 type,
01033 UInt32 param,
01034 Bool sendNotification);
01035
01036
01086 Int
01087 RingIO_flush (RingIO_Handle handle,
01088 Bool hardFlush,
01089 UInt16 * type,
01090 UInt32 * param,
01091 UInt32 * bytesFlushed);
01092
01093
01108 Int
01109 RingIO_sendNotify (RingIO_Handle handle,
01110 RingIO_NotifyMsg msg);
01111
01112
01113
01114
01115
01116
01125 UInt
01126 RingIO_getValidSize (RingIO_Handle handle);
01127
01136 UInt
01137 RingIO_getEmptySize (RingIO_Handle handle);
01138
01147 UInt
01148 RingIO_getValidAttrSize (RingIO_Handle handle);
01149
01158 UInt
01159 RingIO_getEmptyAttrSize (RingIO_Handle handle);
01160
01169 UInt
01170 RingIO_getAcquiredOffset (RingIO_Handle handle);
01171
01180 UInt
01181 RingIO_getAcquiredSize (RingIO_Handle handle);
01182
01191 UInt
01192 RingIO_getWaterMark (RingIO_Handle handle);
01193
01194
01195
01196
01197
01213 Void RingIO_getConfig (RingIO_Config * cfgParams);
01214
01239 Int RingIO_setup (const RingIO_Config * cfgParams);
01240
01250 Int RingIO_destroy (Void);
01251
01252
01253
01254 #if defined (__cplusplus)
01255 }
01256 #endif
01257
01258
01259 #endif