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
00255 #define FrameQ_FrameBufInfo Frame_FrameBufInfo
00256
00260 #define FrameQ_FrameHeader Frame_FrameHeader
00261
00265 typedef Frame_FrameHeader * FrameQ_Frame;
00266
00270 #define FrameQ_MAX_NAMELEN (32u)
00271
00275 #define FrameQ_MAXFILLEDQUEUS_FOR_READER (16)
00276
00280 #define FrameQ_MAX_INST_READERS (2u)
00281
00282
00286 #define FrameQ_MAX_INSTANCES (64u)
00287
00291 #define FrameQ_NOTIFY_RESERVED_EVENTNO (1u)
00292
00298 typedef UInt16 FrameQ_NotifyMsg;
00299
00300
00301
00302
00303
00304
00308 typedef struct FrameQ_Object * FrameQ_Handle;
00309
00313 typedef void (* FrameQ_NotifyFunc) (FrameQ_Handle, Ptr arg, FrameQ_NotifyMsg);
00314
00318 typedef enum FrameQ_NotifyType_Tag {
00319 FrameQ_NOTIFICATION_NONE = SysLink_NOTIFICATION_NONE,
00321 FrameQ_NOTIFICATION_ALWAYS = SysLink_NOTIFICATION_ALWAYS,
00323 FrameQ_NOTIFICATION_ONCE = SysLink_NOTIFICATION_ONCE,
00328 FrameQ_NOTIFICATION_HDWRFIFO_ALWAYS =
00329 SysLink_NOTIFICATION_HDWRFIFO_ALWAYS,
00333 FrameQ_NOTIFICATION_HDWRFIFO_ONCE =
00334 SysLink_NOTIFICATION_HDWRFIFO_ONCE
00340 } FrameQ_NotifyType;
00341
00345 typedef enum FrameQ_OpenMode_Tag {
00346 FrameQ_MODE_NONE,
00348 FrameQ_MODE_WRITER,
00350 FrameQ_MODE_READER
00352 } FrameQ_OpenMode;
00353
00358 typedef enum FrameQ_CpuAccessFlags_Tag {
00359 FrameQ_FRAMEBUF0_CPUACCESS = 0x10000,
00363 FrameQ_FRAMEBUF1_CPUACCESS = 0x20000,
00367 FrameQ_FRAMEBUF2_CPUACCESS = 0x40000,
00371 FrameQ_FRAMEBUF3_CPUACCESS = 0x80000,
00375 FrameQ_FRAMEBUF4_CPUACCESS = 0x100000,
00379 FrameQ_FRAMEBUF5_CPUACCESS = 0x200000,
00383 FrameQ_FRAMEBUF6_CPUACCESS = 0x400000,
00387 FrameQ_FRAMEBUF7_CPUACCESS = 0x800000
00391 } FrameQ_CpuAccessFlags;
00392
00397 typedef enum FrameQ_Interface_Tag {
00398 FrameQ_INTERFACE_SHAREDMEM = 0x0,
00402 FrameQ_INTERFACE_NONE = 0x1
00403 } FrameQ_Interface;
00404
00408 typedef struct FrameQ_Config_Tag {
00409 UInt32 eventNo;
00412 UInt8 maxInstances;
00413
00414
00415 UInt32 usedefaultgate;
00416
00417
00418
00419
00420
00421
00422
00423 } FrameQ_Config;
00424
00430 typedef struct FrameQ_CreateParams_Tag {
00431 UInt32 size;
00433 FrameQ_Interface ctrlInterfaceType;
00435 String name;
00437 Bool openFlag;
00438
00439
00440
00441 } FrameQ_CreateParams;
00442
00447 typedef struct FrameQ_CommonOpenParams_Tag {
00448 String name;
00450 Ptr sharedAddr;
00452 UInt32 openMode;
00454 UInt32 cpuAccessFlags;
00458 } FrameQ_CommonOpenParams;
00459
00465 typedef struct FrameQ_Params {
00466 FrameQ_CreateParams commonCreateParams;
00467 Ptr impParams;
00472 UInt32 impParamsSize;
00476 } FrameQ_Params;
00477
00481 typedef struct FrameQ_NotifyParams_Tag {
00482 FrameQ_NotifyType notifyType;
00484 UInt32 watermark;
00488 FrameQ_NotifyFunc cbFxnPtr;
00490 Ptr cbContext;
00492 Ptr cbClientHandle;
00495 } FrameQ_NotifyParams;
00496
00497
00498
00499
00500
00515 Int32 FrameQ_isSupportedInterface(UInt32 type);
00516
00531 FrameQ_Handle FrameQ_create(Ptr params);
00532
00549 Int32 FrameQ_delete(FrameQ_Handle *pHandle);
00550
00574 Int32 FrameQ_open(Ptr openParams,FrameQ_Handle *handlePtr);
00575
00601 Int32 FrameQ_openByAddr(FrameQ_Handle *handlePtr, Ptr openParams);
00602
00617 Int32 FrameQ_close(FrameQ_Handle *pHandle);
00618
00638 Int32 FrameQ_alloc(FrameQ_Handle handle, FrameQ_Frame *framePtr);
00639
00668 Int32 FrameQ_allocv(FrameQ_Handle handle, FrameQ_Frame framePtr[],
00669 UInt32 freeQId[], UInt8 *numFrames);
00670
00690 Int32 FrameQ_free(FrameQ_Handle handle, FrameQ_Frame frame);
00691
00712 Int32 FrameQ_freev(FrameQ_Handle handle, FrameQ_Frame framePtr[],
00713 UInt32 numFrames);
00714
00738 Int32 FrameQ_put(FrameQ_Handle handle, FrameQ_Frame frame);
00739
00765 Int32 FrameQ_putv(FrameQ_Handle handle, FrameQ_Frame framePtr[],
00766 UInt32 filledQueueId[], UInt8 numFrames);
00767
00786 Int32 FrameQ_get(FrameQ_Handle handle, FrameQ_Frame *framePtr);
00787
00821 Int32 FrameQ_getv(FrameQ_Handle handle, FrameQ_Frame pframe[],
00822 UInt32 filledQueueId[], UInt8 *numFrames);
00823
00845 Int32 FrameQ_dup(FrameQ_Handle handle, FrameQ_Frame frame,
00846 FrameQ_Frame *dupedFrame);
00847
00869 Int32 FrameQ_registerNotifier(FrameQ_Handle handle,
00870 FrameQ_NotifyParams *notifyParams);
00871
00886 Int32 FrameQ_unregisterNotifier(FrameQ_Handle handle);
00887
00904 Int32 FrameQ_sendNotify(FrameQ_Handle handle, UInt16 msg);
00905
00923 Int32 FrameQ_getNumFrames(FrameQ_Handle handle, UInt32 *numFrames);
00924
00943 Int32 FrameQ_getvNumFrames(FrameQ_Handle handle, UInt32 numFrames[],
00944 UInt8 filledQId[], UInt8 numFilledQids);
00945
00964 Int32 FrameQ_getNumFreeFrames(FrameQ_Handle handle, UInt32 *numFreeFrames);
00965
00988 Int32 FrameQ_getvNumFreeFrames(FrameQ_Handle handle, UInt32 numFreeFrames[],
00989 UInt8 freeQId[], UInt8 numFreeQids);
00990
01001 Int32 FrameQ_control(FrameQ_Handle handle, Int32 cmd, Ptr arg);
01002
01010 Ptr FrameQ_getExtendedHeaderPtr(FrameQ_Frame frame);
01011
01012
01013
01014
01015
01016
01024 UInt32 FrameQ_getNumFrameBuffers(FrameQ_Frame frame);
01025
01034 Ptr FrameQ_getFrameBuffer(FrameQ_Frame frame, UInt32 frameBufNum);
01035
01044 UInt32 FrameQ_getFrameBufSize(FrameQ_Frame frame, UInt32 frameBufNum);
01045
01054 UInt32 FrameQ_getFrameBufValidSize(FrameQ_Frame frame, UInt32 frameBufNum);
01055
01065 UInt32 FrameQ_getFrameBufDataStartOffset(FrameQ_Frame frame,
01066 UInt32 frameBufNum);
01067
01079 Int32 FrameQ_setFrameBufValidSize(FrameQ_Frame frame, UInt32 frameBufNum,
01080 UInt32 validDataSize);
01081
01094 Int32 FrameQ_setFrameBufDataStartOffset(FrameQ_Frame frame,
01095 UInt32 frameBufNum, UInt32 dataStartOffset);
01096
01097
01113 Void FrameQ_getConfig(FrameQ_Config *cfg);
01114
01115
01136 Int32 FrameQ_setup(FrameQ_Config *cfg);
01137
01138
01142 Int32 FrameQ_destroy(Void);
01143
01144
01145 #if defined (__cplusplus)
01146 }
01147 #endif
01148
01149
01150 #endif