00001
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 #ifndef FRAMEQ_H_0x6e6f
00053 #define FRAMEQ_H_0x6e6f
00054
00055 #include <ti/syslink/FrameQDefs.h>
00056 #include <ti/syslink/SysLink.h>
00057 #include <ti/ipc/Notify.h>
00058
00059 #if defined (__cplusplus)
00060 extern "C" {
00061 #endif
00062
00063
00064
00065
00066
00070 #define FrameQ_S_ALREADYDESTROYED 2
00071
00075 #define FrameQ_S_ALREADYSETUP 1
00076
00080 #define FrameQ_S_SUCCESS 0
00081
00085 #define FrameQ_E_FAIL -1
00086
00090 #define FrameQ_E_INVALIDARG -2
00091
00095 #define FrameQ_E_NOTFOUND -3
00096
00100 #define FrameQ_E_INST_EXISTS -4
00101
00105 #define FrameQ_E_WRITER_EXISTS -5
00106
00110 #define FrameQ_E_ALLOC_FRAME -6
00111
00115 #define FrameQ_E_ALLOC_FRAMEBUF -7
00116
00120 #define FrameQ_E_MEMORY -8
00121
00125 #define FrameQ_E_EMPTY -9
00126
00130 #define FrameQ_E_CREATE_NAMESERVER -10
00131
00135 #define FrameQ_E_CREATE_GATEMP -11
00136
00140 #define FrameQ_E_OPEN_GATEMP -12
00141
00145 #define FrameQ_E_FAIL_CLIENTN0TIFYMGR_CREATE -13
00146
00150 #define FrameQ_E_FAIL_CLIENTN0TIFYMGR_OPEN -14
00151
00155 #define FrameQ_E_MAX_READERS -15
00156
00160 #define FrameQ_E_ACCESSDENIED -16
00161
00165 #define FrameQ_E_INVALIDSTATE -17
00166
00170 #define FrameQ_E_OSFAILURE -18
00171
00175 #define FrameQ_E_FAIL_NAMESERVERADD -19
00176
00180 #define FrameQ_E_INVALID_INTERFACE -20
00181
00185 #define FrameQ_E_NOTIMPLEMENTED -21
00186
00190 #define FrameQ_E_OPEN_NAMESERVER -22
00191
00195 #define FrameQ_E_INVALID_FRAMEQBUFMGRID -23
00196
00201 #define FrameQ_E_INSUFFICENT_FRAMES -24
00202
00206 #define FrameQ_E_ALLOC_MEMORY -25
00207
00211 #define FrameQ_E_FRAMEQBUFMGROPEN -26
00212
00216 #define FrameQ_E_LISTMPOPEN -27
00217
00221 #define FrameQ_E_CLIENTNOTIFYMGRREGCLIENT -28
00222
00226 #define FrameQ_E_FRAMEQBUFMGRREGCLIENT -29
00227
00231 #define FrameQ_E_CLIENTNOTIFYMGRUNREGCLIENT -30
00232
00236 #define FrameQ_E_FRAMEQBUFMGRUNREGCLIENT -31
00237
00241 #define FrameQ_E_ALREADYREGISTERED -32
00242
00246 #define FrameQ_E_NAMESERVERADD -33
00247
00248
00249
00250
00251
00252 #define FrameQ_FrameBufInfo Frame_FrameBufInfo
00253
00257 #define FrameQ_FrameHeader Frame_FrameHeader
00258
00262 typedef Frame_FrameHeader * FrameQ_Frame;
00263
00267 #define FrameQ_MAX_NAMELEN (32u)
00268
00272 #define FrameQ_MAXFILLEDQUEUS_FOR_READER (16)
00273
00277 #define FrameQ_MAX_INST_READERS (2u)
00278
00279
00283 #define FrameQ_MAX_INSTANCES (64u)
00284
00288 #define FrameQ_NOTIFY_RESERVED_EVENTNO (1u)
00289
00297 typedef UInt16 FrameQ_NotifyMsg;
00298
00299
00300
00301
00302
00303
00307 typedef struct FrameQ_Object * FrameQ_Handle;
00308
00312 typedef void (* FrameQ_NotifyFunc) (FrameQ_Handle, Ptr arg, FrameQ_NotifyMsg);
00313
00317 typedef enum FrameQ_NotifyType_Tag {
00318 FrameQ_NOTIFICATION_NONE = SysLink_NOTIFICATION_NONE,
00320 FrameQ_NOTIFICATION_ALWAYS = SysLink_NOTIFICATION_ALWAYS,
00322 FrameQ_NOTIFICATION_ONCE = SysLink_NOTIFICATION_ONCE,
00327 FrameQ_NOTIFICATION_HDWRFIFO_ALWAYS =
00328 SysLink_NOTIFICATION_HDWRFIFO_ALWAYS,
00332 FrameQ_NOTIFICATION_HDWRFIFO_ONCE =
00333 SysLink_NOTIFICATION_HDWRFIFO_ONCE
00339 } FrameQ_NotifyType;
00340
00344 typedef enum FrameQ_OpenMode_Tag {
00345 FrameQ_MODE_NONE,
00347 FrameQ_MODE_WRITER,
00349 FrameQ_MODE_READER
00351 } FrameQ_OpenMode;
00352
00357 typedef enum FrameQ_CpuAccessFlags_Tag {
00358 FrameQ_FRAMEBUF0_CPUACCESS = 0x10000,
00362 FrameQ_FRAMEBUF1_CPUACCESS = 0x20000,
00366 FrameQ_FRAMEBUF2_CPUACCESS = 0x40000,
00370 FrameQ_FRAMEBUF3_CPUACCESS = 0x80000,
00374 FrameQ_FRAMEBUF4_CPUACCESS = 0x100000,
00378 FrameQ_FRAMEBUF5_CPUACCESS = 0x200000,
00382 FrameQ_FRAMEBUF6_CPUACCESS = 0x400000,
00386 FrameQ_FRAMEBUF7_CPUACCESS = 0x800000
00390 } FrameQ_CpuAccessFlags;
00391
00396 typedef enum FrameQ_Interface_Tag {
00397 FrameQ_INTERFACE_SHAREDMEM = 0x0,
00401 FrameQ_INTERFACE_NONE = 0x1
00402 } FrameQ_Interface;
00403
00407 typedef struct FrameQ_Config_Tag {
00408 UInt32 eventNo;
00411 UInt8 maxInstances;
00412
00413
00414 UInt32 usedefaultgate;
00415
00416
00417
00418
00419
00420
00421
00422 } FrameQ_Config;
00423
00429 typedef struct FrameQ_CreateParams_Tag {
00430 UInt32 size;
00432 FrameQ_Interface ctrlInterfaceType;
00434 String name;
00436 Bool openFlag;
00437
00438
00439
00440 } FrameQ_CreateParams;
00441
00446 typedef struct FrameQ_CommonOpenParams_Tag {
00447 String name;
00449 Ptr sharedAddr;
00451 UInt32 openMode;
00453 UInt32 cpuAccessFlags;
00457 } FrameQ_CommonOpenParams;
00458
00464 typedef struct FrameQ_Params {
00465 FrameQ_CreateParams commonCreateParams;
00466 Ptr impParams;
00471 UInt32 impParamsSize;
00475 } FrameQ_Params;
00476
00480 typedef struct FrameQ_NotifyParams_Tag {
00481 FrameQ_NotifyType notifyType;
00483 UInt32 watermark;
00487 FrameQ_NotifyFunc cbFxnPtr;
00489 Ptr cbContext;
00491 Ptr cbClientHandle;
00494 } FrameQ_NotifyParams;
00495
00496
00497
00498
00499
00514 Int32 FrameQ_isSupportedInterface(UInt32 type);
00515
00530 FrameQ_Handle FrameQ_create(Ptr params);
00531
00548 Int32 FrameQ_delete(FrameQ_Handle *pHandle);
00549
00573 Int32 FrameQ_open(Ptr openParams,FrameQ_Handle *handlePtr);
00574
00600 Int32 FrameQ_openByAddr(FrameQ_Handle *handlePtr, Ptr openParams);
00601
00616 Int32 FrameQ_close(FrameQ_Handle *pHandle);
00617
00637 Int32 FrameQ_alloc(FrameQ_Handle handle, FrameQ_Frame *framePtr);
00638
00667 Int32 FrameQ_allocv(FrameQ_Handle handle, FrameQ_Frame framePtr[],
00668 UInt32 freeQId[], UInt8 *numFrames);
00669
00689 Int32 FrameQ_free(FrameQ_Handle handle, FrameQ_Frame frame);
00690
00711 Int32 FrameQ_freev(FrameQ_Handle handle, FrameQ_Frame framePtr[],
00712 UInt32 numFrames);
00713
00737 Int32 FrameQ_put(FrameQ_Handle handle, FrameQ_Frame frame);
00738
00764 Int32 FrameQ_putv(FrameQ_Handle handle, FrameQ_Frame framePtr[],
00765 UInt32 filledQueueId[], UInt8 numFrames);
00766
00785 Int32 FrameQ_get(FrameQ_Handle handle, FrameQ_Frame *framePtr);
00786
00820 Int32 FrameQ_getv(FrameQ_Handle handle, FrameQ_Frame pframe[],
00821 UInt32 filledQueueId[], UInt8 *numFrames);
00822
00844 Int32 FrameQ_dup(FrameQ_Handle handle, FrameQ_Frame frame,
00845 FrameQ_Frame *dupedFrame);
00846
00868 Int32 FrameQ_registerNotifier(FrameQ_Handle handle,
00869 FrameQ_NotifyParams *notifyParams);
00870
00885 Int32 FrameQ_unregisterNotifier(FrameQ_Handle handle);
00886
00903 Int32 FrameQ_sendNotify(FrameQ_Handle handle, UInt16 msg);
00904
00922 Int32 FrameQ_getNumFrames(FrameQ_Handle handle, UInt32 *numFrames);
00923
00942 Int32 FrameQ_getvNumFrames(FrameQ_Handle handle, UInt32 numFrames[],
00943 UInt8 filledQId[], UInt8 numFilledQids);
00944
00963 Int32 FrameQ_getNumFreeFrames(FrameQ_Handle handle, UInt32 *numFreeFrames);
00964
00987 Int32 FrameQ_getvNumFreeFrames(FrameQ_Handle handle, UInt32 numFreeFrames[],
00988 UInt8 freeQId[], UInt8 numFreeQids);
00989
01000 Int32 FrameQ_control(FrameQ_Handle handle, Int32 cmd, Ptr arg);
01001
01009 Ptr FrameQ_getExtendedHeaderPtr(FrameQ_Frame frame);
01010
01011
01012
01013
01014
01015
01023 UInt32 FrameQ_getNumFrameBuffers(FrameQ_Frame frame);
01024
01033 Ptr FrameQ_getFrameBuffer(FrameQ_Frame frame, UInt32 frameBufNum);
01034
01043 UInt32 FrameQ_getFrameBufSize(FrameQ_Frame frame, UInt32 frameBufNum);
01044
01053 UInt32 FrameQ_getFrameBufValidSize(FrameQ_Frame frame, UInt32 frameBufNum);
01054
01064 UInt32 FrameQ_getFrameBufDataStartOffset(FrameQ_Frame frame,
01065 UInt32 frameBufNum);
01066
01078 Int32 FrameQ_setFrameBufValidSize(FrameQ_Frame frame, UInt32 frameBufNum,
01079 UInt32 validDataSize);
01080
01093 Int32 FrameQ_setFrameBufDataStartOffset(FrameQ_Frame frame,
01094 UInt32 frameBufNum, UInt32 dataStartOffset);
01095
01096
01112 Void FrameQ_getConfig(FrameQ_Config *cfg);
01113
01114
01135 Int32 FrameQ_setup(FrameQ_Config *cfg);
01136
01137
01141 Int32 FrameQ_destroy(Void);
01142
01143
01144 #if defined (__cplusplus)
01145 }
01146 #endif
01147
01148
01149 #endif