Go to the documentation of this file.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)
00067 #define IALG_CUSTOMFAILBASE (-2048)
00071 #define IALG_CUSTOMFAILEND (-256)
00079 typedef enum IALG_MemAttrs {
00080 IALG_SCRATCH,
00081 IALG_PERSIST,
00082 IALG_WRITEONCE
00083 } IALG_MemAttrs;
00084
00085 #define IALG_MPROG 0x0008
00086 #define IALG_MXTRN 0x0010
00091
00092
00093
00094 typedef enum IALG_MemSpace {
00095 IALG_EPROG =
00096 IALG_MPROG | IALG_MXTRN,
00097
00098 IALG_IPROG =
00099 IALG_MPROG,
00100
00101 IALG_ESDATA =
00102 IALG_MXTRN + 0,
00103
00104 IALG_EXTERNAL =
00105 IALG_MXTRN + 1,
00106
00107 IALG_DARAM0 = 0,
00108 IALG_DARAM1 = 1,
00110 IALG_SARAM = 2,
00111 IALG_SARAM0 = 2,
00112 IALG_SARAM1 = 3,
00114 IALG_DARAM2 = 4,
00115 IALG_SARAM2 = 5
00116 } IALG_MemSpace;
00117
00118
00119
00120
00121 #define IALG_isProg(s) ( \
00122 (((int)(s)) & IALG_MPROG) \
00123 )
00124
00125
00126
00127
00128 #define IALG_isOffChip(s) ( \
00129 (((int)(s)) & IALG_MXTRN) \
00130 )
00131
00132
00136 typedef struct IALG_MemRec {
00137 Uns size;
00138 Int alignment;
00139 IALG_MemSpace space;
00140 IALG_MemAttrs attrs;
00141 Void *base;
00142 } IALG_MemRec;
00143
00144
00153 typedef struct IALG_Obj {
00154 struct IALG_Fxns *fxns;
00155 } IALG_Obj;
00156
00157
00161 typedef struct IALG_Obj *IALG_Handle;
00162
00163
00170 typedef struct IALG_Params {
00171 Int size;
00172 } IALG_Params;
00173
00174
00181 typedef struct IALG_Status {
00182 Int size;
00183 } IALG_Status;
00184
00185
00193 typedef unsigned int IALG_Cmd;
00194
00195
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219 typedef struct IALG_Fxns {
00224 Void *implementationId;
00225
00275 Void (*algActivate)(IALG_Handle handle);
00276
00355 Int (*algAlloc)(const IALG_Params *params,
00356 struct IALG_Fxns **parentFxns, IALG_MemRec *memTab);
00357
00398 Int (*algControl)(IALG_Handle handle, IALG_Cmd cmd,
00399 IALG_Status *status);
00400
00454 Void (*algDeactivate)(IALG_Handle handle);
00455
00496 Int (*algFree)(IALG_Handle handle, IALG_MemRec *memTab);
00497
00671 Int (*algInit)(IALG_Handle handle, const IALG_MemRec *memTab,
00672 IALG_Handle parent, const IALG_Params *params);
00673
00694 Void (*algMoved)(IALG_Handle handle, const IALG_MemRec *memTab,
00695 IALG_Handle parent, const IALG_Params *params);
00696
00753 Int (*algNumAlloc)(Void);
00754 } IALG_Fxns;
00755
00758 #ifdef __cplusplus
00759 }
00760 #endif
00761
00762 #endif
00763
00764
00765
00766
00767