Go to the documentation of this file.00001
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166 #ifndef RINGIO_H_0xd3f4
00167 #define RINGIO_H_0xd3f4
00168
00169
00170 #include <ti/syslink/SysLink.h>
00171
00172 #if defined (__cplusplus)
00173 extern "C" {
00174 #endif
00175
00176
00177
00178
00179
00180
00189 #define RingIO_S_PENDINGATTRIBUTE 4
00190
00197 #define RingIO_S_NOTCONTIGUOUSDATA 3
00198
00203 #define RingIO_S_BUSY 2
00204
00209 #define RingIO_S_ALREADYSETUP 1
00210
00215 #define RingIO_S_SUCCESS 0
00216
00221 #define RingIO_E_FAIL -1
00222
00227 #define RingIO_E_INVALIDARG -2
00228
00233 #define RingIO_E_MEMORY -3
00234
00239 #define RingIO_E_ALREADYEXISTS -4
00240
00245 #define RingIO_E_NOTFOUND -5
00246
00251 #define RingIO_E_TIMEOUT -6
00252
00257 #define RingIO_E_INVALIDSTATE -7
00258
00263 #define RingIO_E_OSFAILURE -8
00264
00269 #define RingIO_E_RESOURCE -9
00270
00275 #define RingIO_E_RESTART -10
00276
00281 #define RingIO_E_INVALIDMSG -11
00282
00287 #define RingIO_E_NOTOWNER -12
00288
00293 #define RingIO_E_REMOTEACTIVE -13
00294
00299 #define RingIO_E_INVALIDHEAPID -14
00300
00305 #define RingIO_E_INVALIDPROCID -15
00306
00311 #define RingIO_E_MAXREACHED -16
00312
00317 #define RingIO_E_INUSE -17
00318
00323 #define RingIO_E_INVALIDCONTEXT -18
00324
00329 #define RingIO_E_BADVERSION -19
00330
00336 #define RingIO_E_BUFWRAP -20
00337
00342 #define RingIO_E_BUFEMPTY -21
00343
00348 #define RingIO_E_BUFFULL -22
00349
00355 #define RingIO_E_PENDINGDATA -23
00356
00362 #define RingIO_E_VARIABLEATTRIBUTE -24
00363
00364
00369 #define RingIO_E_WRONGSTATE -25
00370
00374 #define RingIO_E_NOTIFYFAIL -26
00375
00381 #define RingIO_E_PENDINGATTRIBUTE -27
00382
00383
00384
00385
00386
00387
00394 typedef Ptr RingIO_BufPtr;
00395
00403 typedef UInt16 RingIO_NotifyMsg;
00404
00405
00406
00407
00408
00412 typedef struct RingIO_Object * RingIO_Handle;
00413
00414
00415
00416
00417
00418 typedef enum RingIO_Type_Tag {
00419 RingIO_Type_SHAREDMEM = 0x0
00422 } RingIO_Type;
00423
00424
00425
00426
00427
00433 typedef struct RingIO_Params_Tag {
00434 String name;
00436 RingIO_Type interfaceType;
00438 } RingIO_Params;
00439
00443 typedef enum RingIO_OpenMode_Tag {
00444 RingIO_MODE_READER = 0x0,
00446 RingIO_MODE_WRITER = 0x1
00448 } RingIO_OpenMode;
00449
00454 typedef struct RingIO_openParams_Tag {
00455 UInt32 flags;
00459 RingIO_OpenMode openMode;
00461 } RingIO_openParams;
00462
00463
00468 typedef struct RingIO_sharedMemReqDetails_tag {
00469 UInt32 ctrlSharedMemReq;
00471 UInt32 dataSharedMemReq;
00473 UInt32 attrSharedMemReq;
00475 } RingIO_sharedMemReqDetails;
00476
00477
00482 typedef enum RingIO_Flags_tag {
00483 RingIO_DATABUF_MAINTAINCACHE = 0x1,
00487 RingIO_NEED_EXACT_SIZE = 0x2
00495 } RingIO_Flags;
00496
00500 typedef enum RingIO_NotifyType_Tag {
00501 RingIO_NOTIFICATION_NONE = SysLink_NOTIFICATION_NONE,
00503 RingIO_NOTIFICATION_ALWAYS = SysLink_NOTIFICATION_ALWAYS,
00506 RingIO_NOTIFICATION_ONCE = SysLink_NOTIFICATION_ONCE,
00511 RingIO_NOTIFICATION_HDWRFIFO_ALWAYS =
00512 SysLink_NOTIFICATION_HDWRFIFO_ALWAYS,
00517 RingIO_NOTIFICATION_HDWRFIFO_ONCE =
00518 SysLink_NOTIFICATION_HDWRFIFO_ONCE
00525 } RingIO_NotifyType;
00526
00538 typedef void (* RingIO_NotifyFxn ) (RingIO_Handle, Ptr, RingIO_NotifyMsg);
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00567 Void RingIO_Params_init (Void * params);
00568
00596 RingIO_Handle RingIO_create(const Void *params);
00597
00622 Int RingIO_delete(RingIO_Handle *handlePtr);
00623
00646 UInt32 RingIO_sharedMemReq(const Void *params,
00647 RingIO_sharedMemReqDetails *sharedMemReqDetails);
00648
00649
00650
00651
00652
00678 Int RingIO_open(String name, const RingIO_openParams *params, UInt16 *procIds,
00679 RingIO_Handle *handlePtr);
00680
00706 Int RingIO_openByAddr(Ptr ctrlSharedAddr, const RingIO_openParams *params,
00707 RingIO_Handle *handlePtr);
00708
00734 Int RingIO_close(RingIO_Handle *handlePtr);
00735
00736
00737
00738
00739
00740
00782 Int RingIO_registerNotifier(RingIO_Handle handle,
00783 RingIO_NotifyType notifyType, UInt32 watermark,
00784 RingIO_NotifyFxn notifyFunc, Ptr cbContext);
00785
00804 Int RingIO_unregisterNotifier(RingIO_Handle handle);
00805
00820 Int RingIO_setWaterMark(RingIO_Handle handle, UInt32 watermark);
00821
00822
00838 Int RingIO_setNotifyType(RingIO_Handle handle, RingIO_NotifyType notifyType);
00839
00840
00841
00842
00843
00844
00901 Int RingIO_acquire(RingIO_Handle handle, RingIO_BufPtr *pData, UInt32 *pSize);
00902
00903
00904
00923 Int RingIO_release(RingIO_Handle handle, UInt32 size);
00924
00925
00946 Int RingIO_cancel(RingIO_Handle handle);
00947
00948
00987 Int RingIO_getvAttribute(RingIO_Handle handle, UInt16 *type, UInt32 *param,
00988 RingIO_BufPtr vptr, UInt32 *pSize);
00989
00990
01039 Int RingIO_setvAttribute(RingIO_Handle handle, UInt16 type, UInt32 param,
01040 RingIO_BufPtr pData, UInt32 size, Bool sendNotification);
01041
01042
01075 Int RingIO_getAttribute(RingIO_Handle handle, UInt16 *type, UInt32 *param);
01076
01117 Int RingIO_setAttribute(RingIO_Handle handle, UInt16 type, UInt32 param,
01118 Bool sendNotification);
01119
01120
01168 Int RingIO_flush(RingIO_Handle handle, Bool hardFlush, UInt16 *type,
01169 UInt32 *param, UInt32 *bytesFlushed);
01170
01171
01187 Int RingIO_sendNotify(RingIO_Handle handle, RingIO_NotifyMsg msg);
01188
01189
01190
01191
01192
01193
01204 UInt RingIO_getValidSize(RingIO_Handle handle);
01205
01216 UInt RingIO_getEmptySize(RingIO_Handle handle);
01217
01228 UInt RingIO_getValidAttrSize(RingIO_Handle handle);
01229
01240 UInt RingIO_getEmptyAttrSize(RingIO_Handle handle);
01241
01252 UInt RingIO_getAcquiredOffset(RingIO_Handle handle);
01253
01264 UInt RingIO_getAcquiredSize(RingIO_Handle handle);
01265
01276 UInt RingIO_getWaterMark(RingIO_Handle handle);
01277
01278 #if defined (__cplusplus)
01279 }
01280 #endif
01281
01282
01283 #endif