00001
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
00053 #ifndef FRAMEQ_H_0x6e6f
00054 #define FRAMEQ_H_0x6e6f
00055
00056 #include <ti/syslink/FrameQDefs.h>
00057 #include <ti/syslink/SysLink.h>
00058 #include <ti/ipc/Notify.h>
00059
00060 #if defined (__cplusplus)
00061 extern "C" {
00062 #endif
00063
00064
00065
00066
00067
00071 #define FrameQ_S_ALREADYDESTROYED 2
00072
00076 #define FrameQ_S_ALREADYSETUP 1
00077
00081 #define FrameQ_S_SUCCESS 0
00082
00086 #define FrameQ_E_FAIL -1
00087
00091 #define FrameQ_E_INVALIDARG -2
00092
00096 #define FrameQ_E_NOTFOUND -3
00097
00101 #define FrameQ_E_INST_EXISTS -4
00102
00106 #define FrameQ_E_WRITER_EXISTS -5
00107
00111 #define FrameQ_E_ALLOC_FRAME -6
00112
00116 #define FrameQ_E_ALLOC_FRAMEBUF -7
00117
00121 #define FrameQ_E_MEMORY -8
00122
00126 #define FrameQ_E_EMPTY -9
00127
00131 #define FrameQ_E_CREATE_NAMESERVER -10
00132
00136 #define FrameQ_E_CREATE_GATEMP -11
00137
00141 #define FrameQ_E_OPEN_GATEMP -12
00142
00146 #define FrameQ_E_FAIL_CLIENTN0TIFYMGR_CREATE -13
00147
00151 #define FrameQ_E_FAIL_CLIENTN0TIFYMGR_OPEN -14
00152
00156 #define FrameQ_E_MAX_READERS -15
00157
00161 #define FrameQ_E_ACCESSDENIED -16
00162
00166 #define FrameQ_E_INVALIDSTATE -17
00167
00171 #define FrameQ_E_OSFAILURE -18
00172
00176 #define FrameQ_E_FAIL_NAMESERVERADD -19
00177
00181 #define FrameQ_E_INVALID_INTERFACE -20
00182
00186 #define FrameQ_E_NOTIMPLEMENTED -21
00187
00191 #define FrameQ_E_OPEN_NAMESERVER -22
00192
00196 #define FrameQ_E_INVALID_FRAMEQBUFMGRID -23
00197
00202 #define FrameQ_E_INSUFFICENT_FRAMES -24
00203
00207 #define FrameQ_E_ALLOC_MEMORY -25
00208
00212 #define FrameQ_E_FRAMEQBUFMGROPEN -26
00213
00217 #define FrameQ_E_LISTMPOPEN -27
00218
00222 #define FrameQ_E_CLIENTNOTIFYMGRREGCLIENT -28
00223
00227 #define FrameQ_E_FRAMEQBUFMGRREGCLIENT -29
00228
00232 #define FrameQ_E_CLIENTNOTIFYMGRUNREGCLIENT -30
00233
00237 #define FrameQ_E_FRAMEQBUFMGRUNREGCLIENT -31
00238
00242 #define FrameQ_E_ALREADYREGISTERED -32
00243
00247 #define FrameQ_E_NAMESERVERADD -33
00248
00249
00250
00251
00252
00256 #define FrameQ_FrameBufInfo Frame_FrameBufInfo
00257
00261 #define FrameQ_FrameHeader Frame_FrameHeader
00262
00266 typedef Frame_FrameHeader * FrameQ_Frame;
00267
00271 #define FrameQ_MAX_NAMELEN (32u)
00272
00276 #define FrameQ_MAXFILLEDQUEUS_FOR_READER (16)
00277
00281 #define FrameQ_MAX_INST_READERS (2u)
00282
00283
00287 #define FrameQ_MAX_INSTANCES (64u)
00288
00292 #define FrameQ_NOTIFY_RESERVED_EVENTNO (1u)
00293
00299 typedef UInt16 FrameQ_NotifyMsg;
00300
00301
00302
00303
00304
00305
00309 typedef struct FrameQ_Object * FrameQ_Handle;
00310
00314 typedef void (* FrameQ_NotifyFunc) (FrameQ_Handle, Ptr arg, FrameQ_NotifyMsg);
00315
00319 typedef enum FrameQ_NotifyType_Tag {
00320 FrameQ_NOTIFICATION_NONE = SysLink_NOTIFICATION_NONE,
00322 FrameQ_NOTIFICATION_ALWAYS = SysLink_NOTIFICATION_ALWAYS,
00324 FrameQ_NOTIFICATION_ONCE = SysLink_NOTIFICATION_ONCE,
00329 FrameQ_NOTIFICATION_HDWRFIFO_ALWAYS = SysLink_NOTIFICATION_HDWRFIFO_ALWAYS,
00333 FrameQ_NOTIFICATION_HDWRFIFO_ONCE = 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
00395 typedef enum FrameQ_Interface_Tag {
00396 FrameQ_INTERFACE_SHAREDMEM = 0x0,
00400 FrameQ_INTERFACE_NONE = 0x1
00401 } FrameQ_Interface;
00402
00406 typedef struct FrameQ_Config_Tag {
00407 UInt32 eventNo;
00410 UInt8 maxInstances;
00413 UInt32 usedefaultgate;
00421 } FrameQ_Config;
00422
00428 typedef struct FrameQ_CreateParams_Tag {
00429 UInt32 size;
00431 FrameQ_Interface ctrlInterfaceType;
00433 String name;
00435 Bool openFlag;
00436
00437
00438
00439 } FrameQ_CreateParams;
00440
00445 typedef struct FrameQ_CommonOpenParams_Tag {
00446 String name;
00448 Ptr sharedAddr;
00450 UInt32 openMode;
00452 UInt32 cpuAccessFlags;
00456 } FrameQ_CommonOpenParams;
00457
00463 typedef struct FrameQ_Params {
00464 FrameQ_CreateParams commonCreateParams;
00465 Ptr impParams;
00468 UInt32 impParamsSize;
00470 } FrameQ_Params;
00471
00475 typedef struct FrameQ_NotifyParams_Tag {
00476 FrameQ_NotifyType notifyType;
00478 UInt32 watermark;
00482 FrameQ_NotifyFunc cbFxnPtr;
00484 Ptr cbContext;
00486 Ptr cbClientHandle;
00489 } FrameQ_NotifyParams;
00490
00491
00492
00493
00494
00508 Int32 FrameQ_isSupportedInterface(UInt32 type);
00509
00526 FrameQ_Handle FrameQ_create(Ptr params);
00527
00544 Int32 FrameQ_delete(FrameQ_Handle *pHandle);
00545
00571 Int32 FrameQ_open(Ptr openParams, FrameQ_Handle *handlePtr);
00572
00599 Int32 FrameQ_openByAddr(FrameQ_Handle *handlePtr, Ptr openParams);
00600
00616 Int32 FrameQ_close(FrameQ_Handle *pHandle);
00617
00641 Int32 FrameQ_alloc(FrameQ_Handle handle, FrameQ_Frame *framePtr);
00642
00674 Int32 FrameQ_allocv(FrameQ_Handle handle, FrameQ_Frame framePtr[],
00675 UInt32 freeQId[], UInt8 *numFrames);
00676
00698 Int32 FrameQ_free(FrameQ_Handle handle, FrameQ_Frame frame);
00699
00724 Int32 FrameQ_freev(FrameQ_Handle handle, FrameQ_Frame framePtr[],
00725 UInt32 numFrames);
00726
00750 Int32 FrameQ_put(FrameQ_Handle handle, FrameQ_Frame frame);
00751
00776 Int32 FrameQ_putv(FrameQ_Handle handle, FrameQ_Frame framePtr[],
00777 UInt32 filledQueueId[], UInt8 numFrames);
00778
00797 Int32 FrameQ_get(FrameQ_Handle handle, FrameQ_Frame *framePtr);
00798
00831 Int32 FrameQ_getv(FrameQ_Handle handle, FrameQ_Frame pframe[],
00832 UInt32 filledQueueId[], UInt8 *numFrames);
00833
00853 Int32 FrameQ_dup(FrameQ_Handle handle, FrameQ_Frame frame,
00854 FrameQ_Frame *dupedFrame);
00855
00876 Int32 FrameQ_registerNotifier(FrameQ_Handle handle,
00877 FrameQ_NotifyParams *notifyParams);
00878
00892 Int32 FrameQ_unregisterNotifier(FrameQ_Handle handle);
00893
00910 Int32 FrameQ_sendNotify(FrameQ_Handle handle, UInt16 msg);
00911
00929 Int32 FrameQ_getNumFrames(FrameQ_Handle handle, UInt32 *numFrames);
00930
00949 Int32 FrameQ_getvNumFrames(FrameQ_Handle handle, UInt32 numFrames[],
00950 UInt8 filledQId[], UInt8 numFilledQids);
00951
00972 Int32 FrameQ_getNumFreeFrames(FrameQ_Handle handle, UInt32 *numFreeFrames);
00973
00996 Int32 FrameQ_getvNumFreeFrames(FrameQ_Handle handle, UInt32 numFreeFrames[],
00997 UInt8 freeQId[], UInt8 numFreeQids);
00998
01009 Int32 FrameQ_control(FrameQ_Handle handle, Int32 cmd, Ptr arg);
01010
01018 Ptr FrameQ_getExtendedHeaderPtr(FrameQ_Frame frame);
01019
01020
01021
01022
01023
01024
01032 UInt32 FrameQ_getNumFrameBuffers(FrameQ_Frame frame);
01033
01042 Ptr FrameQ_getFrameBuffer(FrameQ_Frame frame, UInt32 frameBufNum);
01043
01052 UInt32 FrameQ_getFrameBufSize(FrameQ_Frame frame, UInt32 frameBufNum);
01053
01062 UInt32 FrameQ_getFrameBufValidSize(FrameQ_Frame frame, UInt32 frameBufNum);
01063
01073 UInt32 FrameQ_getFrameBufDataStartOffset(FrameQ_Frame frame,
01074 UInt32 frameBufNum);
01075
01087 Int32 FrameQ_setFrameBufValidSize(FrameQ_Frame frame, UInt32 frameBufNum,
01088 UInt32 validDataSize);
01089
01102 Int32 FrameQ_setFrameBufDataStartOffset(FrameQ_Frame frame,
01103 UInt32 frameBufNum, UInt32 dataStartOffset);
01104
01105
01121 Void FrameQ_getConfig(FrameQ_Config *cfg);
01122
01123
01145 Int32 FrameQ_setup(FrameQ_Config *cfg);
01146
01147
01153 Int32 FrameQ_destroy(Void);
01154
01155
01156 #if defined (__cplusplus)
01157 }
01158 #endif
01159
01160
01161 #endif