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 = SysLink_NOTIFICATION_HDWRFIFO_ALWAYS,
00332 FrameQ_NOTIFICATION_HDWRFIFO_ONCE = SysLink_NOTIFICATION_HDWRFIFO_ONCE
00338 } FrameQ_NotifyType;
00339
00343 typedef enum FrameQ_OpenMode_Tag {
00344 FrameQ_MODE_NONE,
00346 FrameQ_MODE_WRITER,
00348 FrameQ_MODE_READER
00350 } FrameQ_OpenMode;
00351
00356 typedef enum FrameQ_CpuAccessFlags_Tag {
00357 FrameQ_FRAMEBUF0_CPUACCESS = 0x10000,
00361 FrameQ_FRAMEBUF1_CPUACCESS = 0x20000,
00365 FrameQ_FRAMEBUF2_CPUACCESS = 0x40000,
00369 FrameQ_FRAMEBUF3_CPUACCESS = 0x80000,
00373 FrameQ_FRAMEBUF4_CPUACCESS = 0x100000,
00377 FrameQ_FRAMEBUF5_CPUACCESS = 0x200000,
00381 FrameQ_FRAMEBUF6_CPUACCESS = 0x400000,
00385 FrameQ_FRAMEBUF7_CPUACCESS = 0x800000
00389 } FrameQ_CpuAccessFlags;
00390
00394 typedef enum FrameQ_Interface_Tag {
00395 FrameQ_INTERFACE_SHAREDMEM = 0x0,
00399 FrameQ_INTERFACE_NONE = 0x1
00400 } FrameQ_Interface;
00401
00405 typedef struct FrameQ_Config_Tag {
00406 UInt32 eventNo;
00409 UInt8 maxInstances;
00412 UInt32 usedefaultgate;
00420 } FrameQ_Config;
00421
00427 typedef struct FrameQ_CreateParams_Tag {
00428 UInt32 size;
00430 FrameQ_Interface ctrlInterfaceType;
00432 String name;
00434 Bool openFlag;
00435
00436
00437
00438 } FrameQ_CreateParams;
00439
00444 typedef struct FrameQ_CommonOpenParams_Tag {
00445 String name;
00447 Ptr sharedAddr;
00449 UInt32 openMode;
00451 UInt32 cpuAccessFlags;
00455 } FrameQ_CommonOpenParams;
00456
00462 typedef struct FrameQ_Params {
00463 FrameQ_CreateParams commonCreateParams;
00464 Ptr impParams;
00467 UInt32 impParamsSize;
00469 } FrameQ_Params;
00470
00474 typedef struct FrameQ_NotifyParams_Tag {
00475 FrameQ_NotifyType notifyType;
00477 UInt32 watermark;
00481 FrameQ_NotifyFunc cbFxnPtr;
00483 Ptr cbContext;
00485 Ptr cbClientHandle;
00488 } FrameQ_NotifyParams;
00489
00490
00491
00492
00493
00507 Int32 FrameQ_isSupportedInterface(UInt32 type);
00508
00525 FrameQ_Handle FrameQ_create(Ptr params);
00526
00543 Int32 FrameQ_delete(FrameQ_Handle *pHandle);
00544
00570 Int32 FrameQ_open(Ptr openParams, FrameQ_Handle *handlePtr);
00571
00598 Int32 FrameQ_openByAddr(FrameQ_Handle *handlePtr, Ptr openParams);
00599
00615 Int32 FrameQ_close(FrameQ_Handle *pHandle);
00616
00640 Int32 FrameQ_alloc(FrameQ_Handle handle, FrameQ_Frame *framePtr);
00641
00673 Int32 FrameQ_allocv(FrameQ_Handle handle, FrameQ_Frame framePtr[],
00674 UInt32 freeQId[], UInt8 *numFrames);
00675
00697 Int32 FrameQ_free(FrameQ_Handle handle, FrameQ_Frame frame);
00698
00723 Int32 FrameQ_freev(FrameQ_Handle handle, FrameQ_Frame framePtr[],
00724 UInt32 numFrames);
00725
00749 Int32 FrameQ_put(FrameQ_Handle handle, FrameQ_Frame frame);
00750
00775 Int32 FrameQ_putv(FrameQ_Handle handle, FrameQ_Frame framePtr[],
00776 UInt32 filledQueueId[], UInt8 numFrames);
00777
00796 Int32 FrameQ_get(FrameQ_Handle handle, FrameQ_Frame *framePtr);
00797
00830 Int32 FrameQ_getv(FrameQ_Handle handle, FrameQ_Frame pframe[],
00831 UInt32 filledQueueId[], UInt8 *numFrames);
00832
00852 Int32 FrameQ_dup(FrameQ_Handle handle, FrameQ_Frame frame,
00853 FrameQ_Frame *dupedFrame);
00854
00875 Int32 FrameQ_registerNotifier(FrameQ_Handle handle,
00876 FrameQ_NotifyParams *notifyParams);
00877
00891 Int32 FrameQ_unregisterNotifier(FrameQ_Handle handle);
00892
00909 Int32 FrameQ_sendNotify(FrameQ_Handle handle, UInt16 msg);
00910
00928 Int32 FrameQ_getNumFrames(FrameQ_Handle handle, UInt32 *numFrames);
00929
00948 Int32 FrameQ_getvNumFrames(FrameQ_Handle handle, UInt32 numFrames[],
00949 UInt8 filledQId[], UInt8 numFilledQids);
00950
00971 Int32 FrameQ_getNumFreeFrames(FrameQ_Handle handle, UInt32 *numFreeFrames);
00972
00995 Int32 FrameQ_getvNumFreeFrames(FrameQ_Handle handle, UInt32 numFreeFrames[],
00996 UInt8 freeQId[], UInt8 numFreeQids);
00997
01008 Int32 FrameQ_control(FrameQ_Handle handle, Int32 cmd, Ptr arg);
01009
01017 Ptr FrameQ_getExtendedHeaderPtr(FrameQ_Frame frame);
01018
01019
01020
01021
01022
01023
01031 UInt32 FrameQ_getNumFrameBuffers(FrameQ_Frame frame);
01032
01041 Ptr FrameQ_getFrameBuffer(FrameQ_Frame frame, UInt32 frameBufNum);
01042
01051 UInt32 FrameQ_getFrameBufSize(FrameQ_Frame frame, UInt32 frameBufNum);
01052
01061 UInt32 FrameQ_getFrameBufValidSize(FrameQ_Frame frame, UInt32 frameBufNum);
01062
01072 UInt32 FrameQ_getFrameBufDataStartOffset(FrameQ_Frame frame,
01073 UInt32 frameBufNum);
01074
01086 Int32 FrameQ_setFrameBufValidSize(FrameQ_Frame frame, UInt32 frameBufNum,
01087 UInt32 validDataSize);
01088
01101 Int32 FrameQ_setFrameBufDataStartOffset(FrameQ_Frame frame,
01102 UInt32 frameBufNum, UInt32 dataStartOffset);
01103
01104
01120 Void FrameQ_getConfig(FrameQ_Config *cfg);
01121
01122
01144 Int32 FrameQ_setup(FrameQ_Config *cfg);
01145
01146
01152 Int32 FrameQ_destroy(Void);
01153
01154
01155 #if defined (__cplusplus)
01156 }
01157 #endif
01158
01159
01160 #endif