00001
00002
00003
00004
00005
00006
00007
00008
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
00046 #ifndef ti_xdais_IALG_
00047 #define ti_xdais_IALG_
00048
00049 #ifdef __cplusplus
00050 extern "C" {
00051 #endif
00052
00055
00056
00057
00058
00059
00060 #define IALG_DEFMEMRECS 4
00061 #define IALG_OBJMEMREC 0
00062 #define IALG_SYSCMD 256
00064 #define IALG_EOK 0
00065 #define IALG_EFAIL -1
00070 typedef enum IALG_MemAttrs {
00071 IALG_SCRATCH,
00072 IALG_PERSIST,
00073 IALG_WRITEONCE
00074 } IALG_MemAttrs;
00075
00076 #define IALG_MPROG 0x0008
00077 #define IALG_MXTRN 0x0010
00082
00083
00084
00085 typedef enum IALG_MemSpace {
00086 IALG_EPROG =
00087 IALG_MPROG | IALG_MXTRN,
00088
00089 IALG_IPROG =
00090 IALG_MPROG,
00091
00092 IALG_ESDATA =
00093 IALG_MXTRN + 0,
00094
00095 IALG_EXTERNAL =
00096 IALG_MXTRN + 1,
00097
00098 IALG_DARAM0 = 0,
00099 IALG_DARAM1 = 1,
00101 IALG_SARAM = 2,
00102 IALG_SARAM0 = 2,
00103 IALG_SARAM1 = 3,
00105 IALG_DARAM2 = 4,
00106 IALG_SARAM2 = 5
00107 } IALG_MemSpace;
00108
00109
00110
00111
00112 #define IALG_isProg(s) ( \
00113 (((int)(s)) & IALG_MPROG) \
00114 )
00115
00116
00117
00118
00119 #define IALG_isOffChip(s) ( \
00120 (((int)(s)) & IALG_MXTRN) \
00121 )
00122
00123
00127 typedef struct IALG_MemRec {
00128 Uns size;
00129 Int alignment;
00130 IALG_MemSpace space;
00131 IALG_MemAttrs attrs;
00132 Void *base;
00133 } IALG_MemRec;
00134
00135
00144 typedef struct IALG_Obj {
00145 struct IALG_Fxns *fxns;
00146 } IALG_Obj;
00147
00148
00152 typedef struct IALG_Obj *IALG_Handle;
00153
00154
00161 typedef struct IALG_Params {
00162 Int size;
00163 } IALG_Params;
00164
00165
00172 typedef struct IALG_Status {
00173 Int size;
00174 } IALG_Status;
00175
00176
00184 typedef unsigned int IALG_Cmd;
00185
00186
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210 typedef struct IALG_Fxns {
00215 Void *implementationId;
00216
00266 Void (*algActivate)(IALG_Handle handle);
00267
00340 Int (*algAlloc)(const IALG_Params *params,
00341 struct IALG_Fxns **parentFxns, IALG_MemRec *memTab);
00342
00383 Int (*algControl)(IALG_Handle handle, IALG_Cmd cmd,
00384 IALG_Status *status);
00385
00439 Void (*algDeactivate)(IALG_Handle handle);
00440
00481 Int (*algFree)(IALG_Handle handle, IALG_MemRec *memTab);
00482
00631 Int (*algInit)(IALG_Handle handle, const IALG_MemRec *memTab,
00632 IALG_Handle parent, const IALG_Params *params);
00633
00654 Void (*algMoved)(IALG_Handle handle, const IALG_MemRec *memTab,
00655 IALG_Handle parent, const IALG_Params *params);
00656
00713 Int (*algNumAlloc)(Void);
00714 } IALG_Fxns;
00715
00718 #ifdef __cplusplus
00719 }
00720 #endif
00721
00722 #endif
00723
00724
00725
00726