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
00335 #define RingIO_E_NOTIFYFAIL -26
00336
00342 #define RingIO_E_PENDINGATTRIBUTE -27
00343
00344
00345
00346
00347
00348
00355 typedef Ptr RingIO_BufPtr;
00356
00364 typedef UInt16 RingIO_NotifyMsg;
00365
00366
00367
00368
00369
00373 typedef struct RingIO_Object * RingIO_Handle;
00374
00375
00376
00377
00378
00379 typedef enum RingIO_Type_Tag {
00380 RingIO_Type_SHAREDMEM = 0x0
00383 } RingIO_Type;
00384
00385
00386
00387
00388 #ifndef SYSLINK_BUILDOS_QNX
00389
00392 typedef struct RingIO_Config_Tag {
00393 UInt32 maxNameLen;
00395 UInt32 maxInstances;
00397 } RingIO_Config;
00398 #endif
00399
00405 typedef struct RingIO_Params_Tag {
00406 String name;
00408 RingIO_Type interfaceType;
00410 } RingIO_Params;
00411
00415 typedef enum RingIO_OpenMode_Tag {
00416 RingIO_MODE_READER = 0x0,
00418 RingIO_MODE_WRITER = 0x1
00420 } RingIO_OpenMode;
00421
00426 typedef struct RingIO_openParams_Tag {
00427 UInt32 flags;
00430 RingIO_OpenMode openMode;
00432 } RingIO_openParams;
00433
00434
00439 typedef struct RingIO_sharedMemReqDetails_tag {
00440 UInt32 ctrlSharedMemReq;
00442 UInt32 dataSharedMemReq;
00444 UInt32 attrSharedMemReq;
00446 } RingIO_sharedMemReqDetails;
00447
00448
00453 typedef enum RingIO_Flags_tag {
00454 RingIO_DATABUF_MAINTAINCACHE = 0x1,
00457 RingIO_NEED_EXACT_SIZE = 0x2
00463 } RingIO_Flags;
00464
00468 typedef enum RingIO_NotifyType_Tag {
00469 RingIO_NOTIFICATION_NONE = SysLink_NOTIFICATION_NONE,
00471 RingIO_NOTIFICATION_ALWAYS = SysLink_NOTIFICATION_ALWAYS,
00473 RingIO_NOTIFICATION_ONCE = SysLink_NOTIFICATION_ONCE,
00478 RingIO_NOTIFICATION_HDWRFIFO_ALWAYS =
00479 SysLink_NOTIFICATION_HDWRFIFO_ALWAYS,
00483 RingIO_NOTIFICATION_HDWRFIFO_ONCE =
00484 SysLink_NOTIFICATION_HDWRFIFO_ONCE
00490 } RingIO_NotifyType;
00491
00503 typedef void (* RingIO_NotifyFxn ) (RingIO_Handle, Ptr, RingIO_NotifyMsg);
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00529 Void RingIO_Params_init (Void * params);
00530
00552 RingIO_Handle RingIO_create(const Void *params);
00553
00575 Int RingIO_delete(RingIO_Handle *handlePtr);
00576
00594 UInt32 RingIO_sharedMemReq(const Void *params,
00595 RingIO_sharedMemReqDetails *sharedMemReqDetails);
00596
00597
00598
00599
00600
00622 Int RingIO_open(String name, const RingIO_openParams *params, UInt16 *procIds,
00623 RingIO_Handle *handlePtr);
00624
00647 Int RingIO_openByAddr(Ptr ctrlSharedAddr, const RingIO_openParams *params,
00648 RingIO_Handle *handlePtr);
00649
00673 Int RingIO_close(RingIO_Handle *handlePtr);
00674
00675
00676
00677
00678
00679
00714 Int RingIO_registerNotifier(RingIO_Handle handle,
00715 RingIO_NotifyType notifyType, UInt32 watermark,
00716 RingIO_NotifyFxn notifyFunc, Ptr cbContext);
00717
00734 Int RingIO_unregisterNotifier(RingIO_Handle handle);
00735
00748 Int RingIO_setWaterMark(RingIO_Handle handle, UInt32 watermark);
00749
00750
00764 Int RingIO_setNotifyType(RingIO_Handle handle, RingIO_NotifyType notifyType);
00765
00766
00767
00768
00769
00770
00814 Int RingIO_acquire(RingIO_Handle handle, RingIO_BufPtr *pData, UInt32 *pSize);
00815
00816
00817
00834 Int RingIO_release(RingIO_Handle handle, UInt32 size);
00835
00836
00855 Int RingIO_cancel(RingIO_Handle handle);
00856
00857
00892 Int RingIO_getvAttribute(RingIO_Handle handle, UInt16 *type, UInt32 *param,
00893 RingIO_BufPtr vptr, UInt32 *pSize);
00894
00895
00940 Int RingIO_setvAttribute(RingIO_Handle handle, UInt16 type, UInt32 param,
00941 RingIO_BufPtr pData, UInt32 size, Bool sendNotification);
00942
00943
00971 Int RingIO_getAttribute(RingIO_Handle handle, UInt16 *type, UInt32 *param);
00972
01011 Int RingIO_setAttribute(RingIO_Handle handle, UInt16 type, UInt32 param,
01012 Bool sendNotification);
01013
01014
01057 Int RingIO_flush(RingIO_Handle handle, Bool hardFlush, UInt16 *type,
01058 UInt32 *param, UInt32 *bytesFlushed);
01059
01060
01074 Int RingIO_sendNotify(RingIO_Handle handle, RingIO_NotifyMsg msg);
01075
01076
01077
01078
01079
01080
01089 UInt RingIO_getValidSize(RingIO_Handle handle);
01090
01099 UInt RingIO_getEmptySize(RingIO_Handle handle);
01100
01109 UInt RingIO_getValidAttrSize(RingIO_Handle handle);
01110
01119 UInt RingIO_getEmptyAttrSize(RingIO_Handle handle);
01120
01129 UInt RingIO_getAcquiredOffset(RingIO_Handle handle);
01130
01139 UInt RingIO_getAcquiredSize(RingIO_Handle handle);
01140
01149 UInt RingIO_getWaterMark(RingIO_Handle handle);
01150
01151 #ifndef SYSLINK_BUILDOS_QNX
01152
01153
01154
01155
01171 Void RingIO_getConfig(RingIO_Config *cfgParams);
01172
01197 Int RingIO_setup(const RingIO_Config *cfgParams);
01198
01210 Int RingIO_destroy(Void);
01211 #endif
01212
01213
01214 #if defined (__cplusplus)
01215 }
01216 #endif
01217
01218
01219 #endif