OpenCores
URL https://opencores.org/ocsvn/plasma/plasma/trunk

Subversion Repositories plasma

[/] [plasma/] [trunk/] [kernel/] [dll.h] - Blame information for rev 435

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 359 rhoads
/*--------------------------------------------------------------------
2
 * TITLE: Plasma Dynamic Link Library
3
 * AUTHOR: Steve Rhoads (rhoadss@yahoo.com)
4
 * DATE CREATED: 4/4/08
5
 * FILENAME: dll.h
6
 * PROJECT: Plasma CPU core
7
 * COPYRIGHT: Software placed into the public domain by the author.
8
 *    Software 'as is' without warranty.  Author liable for nothing.
9
 * DESCRIPTION:
10
 *    Dynamic Link Library
11
 *--------------------------------------------------------------------*/
12
#ifndef __DLL_H__
13
#define __DLL_H__
14
 
15
#include "rtos.h"
16
#include "tcpip.h"
17
 
18
typedef void *(*DllFunc)();
19
 
20
// Included by Plasma Kernel to create array of function pointers
21
#ifdef DLL_SETUP
22
 
23
void *DllDummy(void) { printf("Dummy"); return NULL; }
24
 
25
const DllFunc DllFuncList[] = {
26 416 rhoads
   (DllFunc)ConsolePrintf,
27
   (DllFunc)ConsoleScanf,
28
   (DllFunc)ConsoleKbhit,
29
   (DllFunc)ConsoleGetch,
30 359 rhoads
   (DllFunc)strcpy,
31
   (DllFunc)strncpy,
32
   (DllFunc)strcat,
33
   (DllFunc)strncat,
34
   (DllFunc)strcmp,
35
   (DllFunc)strncmp,
36
   (DllFunc)strstr,
37
   (DllFunc)strlen,
38
   (DllFunc)memcpy,
39
   (DllFunc)memmove,
40
   (DllFunc)memcmp,
41
   (DllFunc)memset,
42
   (DllFunc)abs,
43
   (DllFunc)rand,
44
   (DllFunc)srand,
45
   (DllFunc)strtol,
46
   (DllFunc)atoi,
47
   (DllFunc)itoa,
48
   (DllFunc)sprintf,
49
   (DllFunc)sscanf,
50
#ifdef INCLUDE_DUMP
51
   (DllFunc)dump,
52
#else //INCLUDE_DUMP
53
   DllDummy,
54
#endif //INCLUDE_DUMP
55
#ifdef INCLUDE_QSORT
56
   (DllFunc)qsort,
57
   (DllFunc)bsearch,
58
#else //INCLUDE_QSORT
59
   DllDummy,
60
   DllDummy,
61
#endif //INCLUDE_QSORT
62
#ifdef INCLUDE_TIMELIB
63
   (DllFunc)mktime,
64
   (DllFunc)gmtime_r,
65
   (DllFunc)gmtimeDst,
66
   (DllFunc)gmtimeDstSet,
67
#else //INCLUDE_TIMELIB
68
   DllDummy,
69
   DllDummy,
70
   DllDummy,
71
   DllDummy,
72
#endif //INCLUDE_TIMELIB
73
   (DllFunc)OS_AsmInterruptEnable,
74
   (DllFunc)OS_HeapCreate,
75
   (DllFunc)OS_HeapDestroy,
76
   (DllFunc)OS_HeapMalloc,
77
   (DllFunc)OS_HeapFree,
78
   (DllFunc)OS_HeapAlternate,
79
   (DllFunc)OS_HeapRegister,
80
   (DllFunc)OS_ThreadCreate,
81
   (DllFunc)OS_ThreadExit,
82
   (DllFunc)OS_ThreadSelf,
83
   (DllFunc)OS_ThreadSleep,
84
   (DllFunc)OS_ThreadTime,
85
   (DllFunc)OS_ThreadInfoSet,
86
   (DllFunc)OS_ThreadInfoGet,
87
   (DllFunc)OS_ThreadPriorityGet,
88
   (DllFunc)OS_ThreadPrioritySet,
89
   (DllFunc)OS_ThreadProcessId,
90
   (DllFunc)OS_ThreadCpuLock,
91
   (DllFunc)OS_SemaphoreCreate,
92
   (DllFunc)OS_SemaphoreDelete,
93
   (DllFunc)OS_SemaphorePend,
94
   (DllFunc)OS_SemaphorePost,
95
   (DllFunc)OS_MutexCreate,
96
   (DllFunc)OS_MutexDelete,
97
   (DllFunc)OS_MutexPend,
98
   (DllFunc)OS_MutexPost,
99
   (DllFunc)OS_MQueueCreate,
100
   (DllFunc)OS_MQueueDelete,
101
   (DllFunc)OS_MQueueSend,
102
   (DllFunc)OS_MQueueGet,
103
   (DllFunc)OS_Job,
104
   (DllFunc)OS_TimerCreate,
105
   (DllFunc)OS_TimerDelete,
106
   (DllFunc)OS_TimerCallback,
107
   (DllFunc)OS_TimerStart,
108
   (DllFunc)OS_TimerStop,
109
   (DllFunc)OS_InterruptRegister,
110
   (DllFunc)OS_InterruptStatus,
111
   (DllFunc)OS_InterruptMaskSet,
112
   (DllFunc)OS_InterruptMaskClear,
113
   (DllFunc)UartPrintf,
114
   (DllFunc)UartPrintfCritical,
115 416 rhoads
   (DllFunc)UartPrintfCritical,
116 359 rhoads
   (DllFunc)UartScanf,
117 402 rhoads
   (DllFunc)OS_puts,
118
   (DllFunc)OS_getch,
119
   (DllFunc)OS_kbhit,
120 359 rhoads
   (DllFunc)Led,
121 416 rhoads
#ifndef WIN32
122
   (DllFunc)__negsf2,
123
   (DllFunc)__addsf3,
124
   (DllFunc)__subsf3,
125
   (DllFunc)__mulsf3,
126
   (DllFunc)__divsf3,
127
   (DllFunc)__fixsfsi,
128
   (DllFunc)__floatsisf,
129
#else
130
   DllDummy,
131
   DllDummy,
132
   DllDummy,
133
   DllDummy,
134
   DllDummy,
135
   DllDummy,
136
   DllDummy,
137
#endif
138 359 rhoads
   (DllFunc)FP_Sqrt,
139
   (DllFunc)FP_Cos,
140
   (DllFunc)FP_Sin,
141
   (DllFunc)FP_Atan,
142
   (DllFunc)FP_Atan2,
143
   (DllFunc)FP_Exp,
144
   (DllFunc)FP_Log,
145
   (DllFunc)FP_Pow,
146 416 rhoads
#ifndef EXCLUDE_FILESYS
147 359 rhoads
   (DllFunc)OS_fopen,
148
   (DllFunc)OS_fclose,
149
   (DllFunc)OS_fread,
150
   (DllFunc)OS_fwrite,
151
   (DllFunc)OS_fseek,
152
   (DllFunc)OS_fmkdir,
153
   (DllFunc)OS_fdir,
154
   (DllFunc)OS_fdelete,
155 416 rhoads
#else //EXCLUDE_FILESYS
156 359 rhoads
   DllDummy,
157
   DllDummy,
158
   DllDummy,
159
   DllDummy,
160
   DllDummy,
161
   DllDummy,
162
   DllDummy,
163
   DllDummy,
164 416 rhoads
#endif //EXCLUDE_FILESYS
165
#ifndef EXCLUDE_FLASH
166 359 rhoads
   (DllFunc)FlashRead,
167
   (DllFunc)FlashWrite,
168
   (DllFunc)FlashErase,
169
#else //WIN32
170
   DllDummy,
171
   DllDummy,
172
   DllDummy,
173
#endif //WIN32
174
   (DllFunc)IPOpen,
175
   (DllFunc)IPWriteFlush,
176
   (DllFunc)IPWrite,
177
   (DllFunc)IPRead,
178
   (DllFunc)IPClose,
179
   (DllFunc)IPPrintf,
180
   (DllFunc)IPResolve,
181
   (DllFunc)IPAddressSelf,
182 416 rhoads
   (DllFunc)IPNameValue,
183 435 rhoads
   (DllFunc)FP_Cmp,
184 416 rhoads
   DllDummy,
185 435 rhoads
   DllDummy,
186
   DllDummy,
187
   DllDummy,
188
   DllDummy,
189
   DllDummy,
190
   DllDummy,
191 416 rhoads
   DllDummy
192 359 rhoads
};
193
 
194
#endif //DLL_SETUP
195
 
196
// Included by DLL to call OS functions via array of function pointers
197
#if defined(DLL_CALL) || !defined(DLL_SETUP)
198
 
199
enum {
200 416 rhoads
   ENUM_ConsolePrintf,
201
   ENUM_ConsoleScanf,
202
   ENUM_ConsoleKbhit,
203
   ENUM_ConsoleGetch,
204 359 rhoads
   ENUM_strcpy,
205
   ENUM_strncpy,
206
   ENUM_strcat,
207
   ENUM_strncat,
208
   ENUM_strcmp,
209
   ENUM_strncmp,
210
   ENUM_strstr,
211
   ENUM_strlen,
212
   ENUM_memcpy,
213
   ENUM_memmove,
214
   ENUM_memcmp,
215
   ENUM_memset,
216
   ENUM_abs,
217
   ENUM_rand,
218
   ENUM_srand,
219
   ENUM_strtol,
220
   ENUM_atoi,
221
   ENUM_itoa,
222
   ENUM_sprintf,
223
   ENUM_sscanf,
224
   ENUM_dump,
225
   ENUM_qsort,
226
   ENUM_bsearch,
227
   ENUM_mktime,
228
   ENUM_gmtime_r,
229
   ENUM_gmtimeDst,
230
   ENUM_gmtimeDstSet,
231
   ENUM_OS_AsmInterruptEnable,
232
   ENUM_OS_HeapCreate,
233
   ENUM_OS_HeapDestroy,
234
   ENUM_OS_HeapMalloc,
235
   ENUM_OS_HeapFree,
236
   ENUM_OS_HeapAlternate,
237
   ENUM_OS_HeapRegister,
238
   ENUM_OS_ThreadCreate,
239
   ENUM_OS_ThreadExit,
240
   ENUM_OS_ThreadSelf,
241
   ENUM_OS_ThreadSleep,
242
   ENUM_OS_ThreadTime,
243
   ENUM_OS_ThreadInfoSet,
244
   ENUM_OS_ThreadInfoGet,
245
   ENUM_OS_ThreadPriorityGet,
246
   ENUM_OS_ThreadPrioritySet,
247
   ENUM_OS_ThreadProcessId,
248
   ENUM_OS_ThreadCpuLock,
249
   ENUM_OS_SemaphoreCreate,
250
   ENUM_OS_SemaphoreDelete,
251
   ENUM_OS_SemaphorePend,
252
   ENUM_OS_SemaphorePost,
253
   ENUM_OS_MutexCreate,
254
   ENUM_OS_MutexDelete,
255
   ENUM_OS_MutexPend,
256
   ENUM_OS_MutexPost,
257
   ENUM_OS_MQueueCreate,
258
   ENUM_OS_MQueueDelete,
259
   ENUM_OS_MQueueSend,
260
   ENUM_OS_MQueueGet,
261
   ENUM_OS_Job,
262
   ENUM_OS_TimerCreate,
263
   ENUM_OS_TimerDelete,
264
   ENUM_OS_TimerCallback,
265
   ENUM_OS_TimerStart,
266
   ENUM_OS_TimerStop,
267
   ENUM_OS_InterruptRegister,
268
   ENUM_OS_InterruptStatus,
269
   ENUM_OS_InterruptMaskSet,
270
   ENUM_OS_InterruptMaskClear,
271
   ENUM_UartPrintf,
272
   ENUM_UartPrintfPoll,
273
   ENUM_UartPrintfCritical,
274
   ENUM_UartScanf,
275 402 rhoads
   ENUM_OS_puts,
276
   ENUM_OS_getch,
277
   ENUM_OS_kbhit,
278 359 rhoads
   ENUM_Led,
279 416 rhoads
   ENUM_NEGSF2,
280
   ENUM_ADDSF3,
281
   ENUM_SUBSF3,
282
   ENUM_MULSF3,
283
   ENUM_DIVSF3,
284
   ENUM_FIXSFSI,
285
   ENUM_FLOATSISF,
286 359 rhoads
   ENUM_FP_Sqrt,
287
   ENUM_FP_Cos,
288
   ENUM_FP_Sin,
289
   ENUM_FP_Atan,
290
   ENUM_FP_Atan2,
291
   ENUM_FP_Exp,
292
   ENUM_FP_Log,
293
   ENUM_FP_Pow,
294
   ENUM_OS_fopen,
295
   ENUM_OS_fclose,
296
   ENUM_OS_fread,
297
   ENUM_OS_fwrite,
298
   ENUM_OS_fseek,
299
   ENUM_OS_fmkdir,
300
   ENUM_OS_fdir,
301
   ENUM_OS_fdelete,
302
   ENUM_FlashRead,
303
   ENUM_FlashWrite,
304
   ENUM_FlashErase,
305
   ENUM_IPOpen,
306
   ENUM_IPWriteFlush,
307
   ENUM_IPWrite,
308
   ENUM_IPRead,
309
   ENUM_IPClose,
310
   ENUM_IPPrintf,
311
   ENUM_IPResolve,
312
   ENUM_IPAddressSelf,
313 416 rhoads
   ENUM_IPNameValue,
314 435 rhoads
   ENUM_FP_Cmp,
315 416 rhoads
   ENUM_USER0,
316
   ENUM_USER1,
317 435 rhoads
   ENUM_USER2,
318
   ENUM_USER3,
319
   ENUM_USER4,
320
   ENUM_USER5,
321
   ENUM_USER6,
322
   ENUM_USER7,
323 416 rhoads
   ARGV_SOCKET = -2
324 359 rhoads
};
325
 
326
extern const DllFunc *DllF;
327
 
328
#undef strcpy
329 416 rhoads
#undef strncpy
330 359 rhoads
#undef strcat
331
#undef strncat
332
#undef strcmp
333 416 rhoads
#undef strncmp
334 359 rhoads
#undef strlen
335
#undef memcpy
336
#undef memcmp
337 416 rhoads
#undef memmove
338 359 rhoads
#undef memset
339
#undef abs
340
#undef atoi
341 416 rhoads
#undef itoa
342
#undef srand
343
#undef rand
344
#undef sprintf
345
#undef sscanf
346
#undef strstr
347
#undef strtol
348
#undef scanf
349
#undef printf
350 359 rhoads
 
351 416 rhoads
#define printf (int)DllF[ENUM_ConsolePrintf]
352
#define scanf (int)DllF[ENUM_ConsoleScanf]
353
#define kbhit (int)DllF[ENUM_ConsoleKbhit]
354
#define getch (int)DllF[ENUM_ConsoleGetch]
355 359 rhoads
#define strcpy DllF[ENUM_strcpy]
356
#define strncpy DllF[ENUM_strncpy]
357
#define strcat DllF[ENUM_strcat]
358
#define strncat DllF[ENUM_strncat]
359
#define strcmp (int)DllF[ENUM_strcmp]
360
#define strncmp (int)DllF[ENUM_strncmp]
361 416 rhoads
#define strstr (char*)DllF[ENUM_strstr]
362 359 rhoads
#define strlen (int)DllF[ENUM_strlen]
363
#define memcpy DllF[ENUM_memcpy]
364
#define memmove DllF[ENUM_memmove]
365
#define memcmp (int)DllF[ENUM_memcmp]
366
#define memset DllF[ENUM_memset]
367
#define abs (int)DllF[ENUM_abs]
368 416 rhoads
#define rand (unsigned int)DllF[ENUM_rand]
369 359 rhoads
#define srand DllF[ENUM_srand]
370
#define strtol (int)DllF[ENUM_strtol]
371
#define atoi (int)DllF[ENUM_atoi]
372
#define itoa DllF[ENUM_itoa]
373 416 rhoads
#define sprintf (int)DllF[ENUM_sprintf]
374
#define sscanf (int)DllF[ENUM_sscanf]
375 359 rhoads
#define dump DllF[ENUM_dump]
376
#define qsort DllF[ENUM_qsort]
377
#define bsearch DllF[ENUM_bsearch]
378
#define mktime DllF[ENUM_mktime]
379
#define gmtime_r DllF[ENUM_gmtime_r]
380
#define gmtimeDst DllF[ENUM_gmtimeDst]
381
#define gmtimeDstSet DllF[ENUM_gmtimeDstSet]
382
#define OS_AsmInterruptEnable (int)DllF[ENUM_OS_AsmInterruptEnable]
383
#define OS_HeapCreate DllF[ENUM_OS_HeapCreate]
384
#define OS_HeapDestroy DllF[ENUM_OS_HeapDestroy]
385
#define OS_HeapMalloc DllF[ENUM_OS_HeapMalloc]
386
#define OS_HeapFree DllF[ENUM_OS_HeapFree]
387
#define OS_HeapAlternate DllF[ENUM_OS_HeapAlternate]
388
#define OS_HeapRegister DllF[ENUM_OS_HeapRegister]
389
#define OS_ThreadCreate DllF[ENUM_OS_ThreadCreate]
390
#define OS_ThreadExit DllF[ENUM_OS_ThreadExit]
391
#define OS_ThreadSelf DllF[ENUM_OS_ThreadSelf]
392
#define OS_ThreadSleep DllF[ENUM_OS_ThreadSleep]
393 416 rhoads
#define OS_ThreadTime (int)DllF[ENUM_OS_ThreadTime]
394 359 rhoads
#define OS_ThreadInfoSet DllF[ENUM_OS_ThreadInfoSet]
395
#define OS_ThreadInfoGet DllF[ENUM_OS_ThreadInfoGet]
396
#define OS_ThreadPriorityGet (int)DllF[ENUM_OS_ThreadPriorityGet]
397
#define OS_ThreadPrioritySet DllF[ENUM_OS_ThreadPrioritySet]
398
#define OS_ThreadProcessId DllF[ENUM_OS_ThreadProcessId]
399
#define OS_ThreadCpuLock DllF[ENUM_OS_ThreadCpuLock]
400
#define OS_SemaphoreCreate DllF[ENUM_OS_SemaphoreCreate]
401
#define OS_SemaphoreDelete DllF[ENUM_OS_SemaphoreDelete]
402
#define OS_SemaphorePend (int)DllF[ENUM_OS_SemaphorePend]
403
#define OS_SemaphorePost DllF[ENUM_OS_SemaphorePost]
404
#define OS_MutexCreate DllF[ENUM_OS_MutexCreate]
405
#define OS_MutexDelete DllF[ENUM_OS_MutexDelete]
406
#define OS_MutexPend (int)DllF[ENUM_OS_MutexPend]
407
#define OS_MutexPost DllF[ENUM_OS_MutexPost]
408
#define OS_MQueueCreate DllF[ENUM_OS_MQueueCreate]
409
#define OS_MQueueDelete DllF[ENUM_OS_MQueueDelete]
410
#define OS_MQueueSend DllF[ENUM_OS_MQueueSend]
411
#define OS_MQueueGet (int)DllF[ENUM_OS_MQueueGet]
412
#define OS_Job DllF[ENUM_OS_Job]
413
#define OS_TimerCreate DllF[ENUM_OS_TimerCreate]
414
#define OS_TimerDelete DllF[ENUM_OS_TimerDelete]
415
#define OS_TimerCallback DllF[ENUM_OS_TimerCallback]
416
#define OS_TimerStart DllF[ENUM_OS_TimerStart]
417
#define OS_TimerStop DllF[ENUM_OS_TimerStop]
418
#define OS_InterruptRegister DllF[ENUM_OS_InterruptRegister]
419
#define OS_InterruptStatus (int)DllF[ENUM_OS_InterruptStatus]
420
#define OS_InterruptMaskSet DllF[ENUM_OS_InterruptMaskSet]
421
#define OS_InterruptMaskClear DllF[ENUM_OS_InterruptMaskClear]
422
#define UartPrintf DllF[ENUM_UartPrintf]
423
#define UartPrintfPoll DllF[ENUM_UartPrintfPoll]
424
#define UartPrintfCritical DllF[ENUM_UartPrintfCritical]
425
#define UartScanf DllF[ENUM_UartScanf]
426 402 rhoads
#define OS_puts DllF[ENUM_OS_puts]
427
#define OS_getch (int)DllF[ENUM_OS_getch]
428
#define OS_kbhit (int)DllF[ENUM_OS_kbhit]
429 359 rhoads
#define Led DllF[ENUM_Led]
430
#define FP_Sqrt (float)(int)DllF[ENUM_FP_Sqrt]
431
#define FP_Cos (float)(int)DllF[ENUM_FP_Cos]
432
#define FP_Sin (float)(int)DllF[ENUM_FP_Sin]
433
#define FP_Atan (float)(int)DllF[ENUM_FP_Atan]
434
#define FP_Atan2 (float)(int)DllF[ENUM_FP_Atan2]
435
#define FP_Exp (float)(int)DllF[ENUM_FP_Exp]
436
#define FP_Log (float)(int)DllF[ENUM_FP_Log]
437
#define FP_Pow (float)(int)DllF[ENUM_FP_Pow]
438
#define OS_fopen DllF[ENUM_OS_fopen]
439
#define OS_fclose DllF[ENUM_OS_fclose]
440
#define OS_fread (int)DllF[ENUM_OS_fread]
441 416 rhoads
#define OS_fwrite (int)DllF[ENUM_OS_fwrite]
442
#define OS_fseek (int)DllF[ENUM_OS_fseek]
443 359 rhoads
#define OS_fmkdir DllF[ENUM_OS_fmkdir]
444
#define OS_fdir DllF[ENUM_OS_fdir]
445
#define OS_fdelete DllF[ENUM_OS_fdelete]
446
#define FlashRead DllF[ENUM_FlashRead]
447
#define FlashWrite DllF[ENUM_FlashWrite]
448
#define FlashErase DllF[ENUM_FlashErase]
449
#define IPOpen DllF[ENUM_IPOpen]
450
#define IPWriteFlush DllF[ENUM_IPWriteFlush]
451
#define IPWrite (int)DllF[ENUM_IPWrite]
452
#define IPRead (int)DllF[ENUM_IPRead]
453
#define IPClose DllF[ENUM_IPClose]
454 416 rhoads
#define IPPrintf (int)DllF[ENUM_IPPrintf]
455 359 rhoads
#define IPResolve DllF[ENUM_IPResolve]
456
#define IPAddressSelf (int)DllF[ENUM_IPAddressSelf]
457
#define IPNameValue DllF[ENUM_IPNameValue]
458 435 rhoads
#define UserFunc0 DllF[ENUM_USER0]
459
#define UserFunc1 DllF[ENUM_USER1]
460 416 rhoads
#define time(P) OS_ThreadTime()
461 359 rhoads
 
462
#endif //DLL_CALL
463
 
464
 
465
#if defined(DLL_SETUP) && defined(DLL_CALL)
466
const DllFunc *DllF = DllFuncList;
467
#elif !defined(DLL_SETUP) && !defined(DLL_CALL) && !defined(DLL_ENTRY)
468
#define DLL_ENTRY 1
469
#endif //DLL_SETUP && DLL_CALL
470
 
471
 
472
// Included by DLL to initialize the DLL
473
#if defined(DLL_ENTRY) && !defined(NO_DLL_ENTRY)
474 416 rhoads
const DllFunc *DllF;         //array of function pointers
475
int main(int argc, char *argv[]);
476 359 rhoads
 
477
//Must be first function in file
478 416 rhoads
int __start(int argc, char *argv[])
479 359 rhoads
{
480 416 rhoads
   extern void *__bss_start;
481
   extern void *_end;
482
   int *bss = (int*)&__bss_start;
483
 
484
   if(bss == (int*)DllF)
485
      ++bss;
486
   while(bss < (int*)&_end)
487
      *bss++ = 0;
488
   DllF = (DllFunc*)argv[-1];
489
   return main(argc, argv);
490 359 rhoads
}
491 416 rhoads
 
492
#ifdef INCLUDE_MATH
493
typedef float (*DllFloat)(float);
494
typedef float (*DllFloat2)(float,float);
495
typedef long (*DllFloat3)(float);
496 435 rhoads
typedef int (*DllFloat4)(float,float);
497
typedef float (*DllFloat5)(long a);
498 416 rhoads
float __negsf2(float a) {return ((DllFloat)DllF[ENUM_NEGSF2])(a);}
499
float __addsf3(float a,float b) {return ((DllFloat2)DllF[ENUM_ADDSF3])(a,b);}
500
float __subsf3(float a,float b) {return ((DllFloat2)DllF[ENUM_SUBSF3])(a,b);}
501
float __mulsf3(float a,float b) {return ((DllFloat2)DllF[ENUM_MULSF3])(a,b);}
502
float __divsf3(float a,float b) {return ((DllFloat2)DllF[ENUM_DIVSF3])(a,b);}
503
long __fixsfsi(float a) {return ((DllFloat3)DllF[ENUM_FIXSFSI])(a);}
504 435 rhoads
float __floatsisf(long a) {return ((DllFloat5)DllF[ENUM_FLOATSISF])(a);}
505
int __ltsf2(float a,float b) {return ((DllFloat4)DllF[ENUM_FP_Cmp])(a,b);}
506
int __lesf2(float a,float b) {return ((DllFloat4)DllF[ENUM_FP_Cmp])(a,b);}
507
int __gtsf2(float a,float b) {return ((DllFloat4)DllF[ENUM_FP_Cmp])(a,b);}
508
int __gesf2(float a,float b) {return ((DllFloat4)DllF[ENUM_FP_Cmp])(a,b);}
509 416 rhoads
#endif
510
 
511 359 rhoads
#endif //DLL_ENTRY
512
 
513
 
514
#ifdef DLL_STRINGS
515
const char * const DllStrings[] = {
516 416 rhoads
   "printf",
517
   "scanf",
518
   "kbhit",
519
   "getch",
520 359 rhoads
   "strcpy",
521
   "strncpy",
522
   "strcat",
523
   "strncat",
524
   "strcmp",
525
   "strncmp",
526
   "strstr",
527
   "strlen",
528
   "memcpy",
529
   "memmove",
530
   "memcmp",
531
   "memset",
532
   "abs",
533
   "rand",
534
   "srand",
535
   "strtol",
536
   "atoi",
537
   "itoa",
538
   "sprintf",
539
   "sscanf",
540
   "dump",
541
   "qsort",
542
   "bsearch",
543
   "mktime",
544
   "gmtime_r",
545
   "gmtimeDst",
546
   "gmtimeDstSet",
547
   "OS_AsmInterruptEnable",
548
   "OS_HeapCreate",
549
   "OS_HeapDestroy",
550
   "OS_HeapMalloc",
551
   "OS_HeapFree",
552
   "OS_HeapAlternate",
553
   "OS_HeapRegister",
554
   "OS_ThreadCreate",
555
   "OS_ThreadExit",
556
   "OS_ThreadSelf",
557
   "OS_ThreadSleep",
558
   "OS_ThreadTime",
559
   "OS_ThreadInfoSet",
560
   "OS_ThreadInfoGet",
561
   "OS_ThreadPriorityGet",
562
   "OS_ThreadPrioritySet",
563
   "OS_ThreadProcessId",
564
   "OS_ThreadCpuLock",
565
   "OS_SemaphoreCreate",
566
   "OS_SemaphoreDelete",
567
   "OS_SemaphorePend",
568
   "OS_SemaphorePost",
569
   "OS_MutexCreate",
570
   "OS_MutexDelete",
571
   "OS_MutexPend",
572
   "OS_MutexPost",
573
   "OS_MQueueCreate",
574
   "OS_MQueueDelete",
575
   "OS_MQueueSend",
576
   "OS_MQueueGet",
577
   "OS_Job",
578
   "OS_TimerCreate",
579
   "OS_TimerDelete",
580
   "OS_TimerCallback",
581
   "OS_TimerStart",
582
   "OS_TimerStop",
583
   "OS_InterruptRegister",
584
   "OS_InterruptStatus",
585
   "OS_InterruptMaskSet",
586
   "OS_InterruptMaskClear",
587 416 rhoads
   "UartPrintf",
588 359 rhoads
   "UartPrintfPoll",
589
   "UartPrintfCritical",
590 416 rhoads
   "UartScanf",
591 402 rhoads
   "OS_puts",
592
   "OS_getch",
593
   "OS_kbhit",
594 359 rhoads
   "Led",
595 416 rhoads
   "FP_Neg",
596
   "FP_Add",
597
   "FP_Sub",
598
   "FP_Mult",
599
   "FP_Div",
600
   "FP_ToInt",
601
   "FP_ToLong",
602 359 rhoads
   "FP_Sqrt",
603
   "FP_Cos",
604
   "FP_Sin",
605
   "FP_Atan",
606
   "FP_Atan2",
607
   "FP_Exp",
608
   "FP_Log",
609
   "FP_Pow",
610
   "OS_fopen",
611
   "OS_fclose",
612
   "OS_fread",
613
   "OS_fwrite",
614
   "OS_fseek",
615
   "OS_fmkdir",
616
   "OS_fdir",
617
   "OS_fdelete",
618
   "FlashRead",
619
   "FlashWrite",
620
   "FlashErase",
621
   "IPOpen",
622
   "IPWriteFlush",
623
   "IPWrite",
624
   "IPRead",
625
   "IPClose",
626
   "IPPrintf",
627
   "IPResolve",
628
   "IPAddressSelf",
629
   "IPNameValue",
630 435 rhoads
   "FP_Cmp",
631 359 rhoads
   NULL
632
};
633
#endif //DLL_STRINGS
634
 
635
#endif //__DLL_H__
636
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.