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
00409 typedef struct FrameQ_CreateParams_Tag {
00410 UInt32 size;
00412 FrameQ_Interface ctrlInterfaceType;
00414 String name;
00416 Bool openFlag;
00417
00418
00419
00420 } FrameQ_CreateParams;
00421
00426 typedef struct FrameQ_CommonOpenParams_Tag {
00427 String name;
00429 Ptr sharedAddr;
00431 UInt32 openMode;
00433 UInt32 cpuAccessFlags;
00437 } FrameQ_CommonOpenParams;
00438
00444 typedef struct FrameQ_Params {
00445 FrameQ_CreateParams commonCreateParams;
00446 Ptr impParams;
00451 UInt32 impParamsSize;
00455 } FrameQ_Params;
00456
00460 typedef struct FrameQ_NotifyParams_Tag {
00461 FrameQ_NotifyType notifyType;
00463 UInt32 watermark;
00467 FrameQ_NotifyFunc cbFxnPtr;
00469 Ptr cbContext;
00471 Ptr cbClientHandle;
00474 } FrameQ_NotifyParams;
00475
00476
00477
00478
00479
00494 Int32 FrameQ_isSupportedInterface(UInt32 type);
00495
00510 FrameQ_Handle
00511 FrameQ_create (Ptr params);
00512
00527 Int32
00528 FrameQ_delete (FrameQ_Handle *pHandle);
00529
00553 Int32
00554 FrameQ_open (Ptr openParams,FrameQ_Handle *handlePtr);
00555
00581 Int32
00582 FrameQ_openByAddr(FrameQ_Handle *handlePtr, Ptr openParams);
00583
00598 Int32
00599 FrameQ_close (FrameQ_Handle* pHandle);
00600
00620 Int32
00621 FrameQ_alloc (FrameQ_Handle handle, FrameQ_Frame *framePtr);
00622
00651 Int32
00652 FrameQ_allocv ( FrameQ_Handle handle,
00653 FrameQ_Frame framePtr[],
00654 UInt32 freeQId[],
00655 UInt8 *numFrames);
00656
00676 Int32
00677 FrameQ_free (FrameQ_Handle handle, FrameQ_Frame frame);
00678
00699 Int32
00700 FrameQ_freev (FrameQ_Handle handle,
00701 FrameQ_Frame framePtr[],
00702 UInt32 numFrames);
00703
00727 Int32
00728 FrameQ_put (FrameQ_Handle handle, FrameQ_Frame frame);
00729
00755 Int32
00756 FrameQ_putv (FrameQ_Handle handle,
00757 FrameQ_Frame framePtr[],
00758 UInt32 filledQueueId[],
00759 UInt8 numFrames);
00760
00781 Int32
00782 FrameQ_get (FrameQ_Handle handle, FrameQ_Frame *framePtr);
00783
00819 Int32
00820 FrameQ_getv (FrameQ_Handle handle,
00821 FrameQ_Frame pframe[],
00822 UInt32 filledQueueId[],
00823 UInt8 *numFrames);
00824
00848 Int32
00849 FrameQ_dup (FrameQ_Handle handle,
00850 FrameQ_Frame frame,
00851 FrameQ_Frame* dupedFrame);
00852
00875 Int32
00876 FrameQ_registerNotifier ( FrameQ_Handle handle,
00877 FrameQ_NotifyParams *notifyParams);
00878
00893 Int32
00894 FrameQ_unregisterNotifier (FrameQ_Handle handle);
00895
00912 Int32
00913 FrameQ_sendNotify (FrameQ_Handle handle, UInt16 msg);
00914
00932 Int32
00933 FrameQ_getNumFrames(FrameQ_Handle handle, UInt32 *numFrames);
00934
00953 Int32
00954 FrameQ_getvNumFrames (FrameQ_Handle handle,
00955 UInt32 numFrames[],
00956 UInt8 filledQId[],
00957 UInt8 numFilledQids);
00958
00979 Int32
00980 FrameQ_getNumFreeFrames (FrameQ_Handle handle, UInt32* numFreeFrames) ;
00981
01004 Int32
01005 FrameQ_getvNumFreeFrames(FrameQ_Handle handle,
01006 UInt32 numFreeFrames[],
01007 UInt8 freeQId[],
01008 UInt8 numFreeQids);
01009
01020 Int32
01021 FrameQ_control (FrameQ_Handle handle,
01022 Int32 cmd,
01023 Ptr arg);
01024
01032 Ptr FrameQ_getExtendedHeaderPtr(FrameQ_Frame frame);
01033
01034
01035
01036
01037
01038
01047 UInt32
01048 FrameQ_getNumFrameBuffers (FrameQ_Frame frame);
01049
01058 Ptr
01059 FrameQ_getFrameBuffer (FrameQ_Frame frame, UInt32 frameBufNum);
01060
01069 UInt32
01070 FrameQ_getFrameBufSize (FrameQ_Frame frame, UInt32 frameBufNum);
01071
01080 UInt32
01081 FrameQ_getFrameBufValidSize (FrameQ_Frame frame, UInt32 frameBufNum);
01082
01092 UInt32
01093 FrameQ_getFrameBufDataStartOffset(FrameQ_Frame frame,
01094 UInt32 frameBufNum );
01095
01107 Int32
01108 FrameQ_setFrameBufValidSize(FrameQ_Frame frame,
01109 UInt32 frameBufNum,
01110 UInt32 validDataSize );
01111
01124 Int32
01125 FrameQ_setFrameBufDataStartOffset (FrameQ_Frame frame,
01126 UInt32 frameBufNum,
01127 UInt32 dataStartOffset);
01128
01129
01130 #if defined (__cplusplus)
01131 }
01132 #endif
01133
01134
01135 #endif