author | edouard |
Mon, 07 Dec 2009 14:00:33 +0100 | |
changeset 471 | 98a39261db9e |
parent 452 | 2d0718a05cc7 |
permissions | -rwxr-xr-x |
425 | 1 |
/** |
2 |
* Yagarto specific code |
|
3 |
**/ |
|
4 |
||
5 |
//#include <stdio.h> |
|
6 |
||
7 |
/* provided by POUS.C */ |
|
8 |
extern int common_ticktime__; |
|
9 |
||
10 |
void Target_GetTime(IEC_TIME*); |
|
11 |
||
12 |
long AtomicCompareExchange(long* atomicvar,long compared, long exchange) |
|
13 |
{ |
|
14 |
return 0; |
|
15 |
} |
|
16 |
||
17 |
void PLC_GetTime(IEC_TIME *CURRENT_TIME) |
|
18 |
{ |
|
19 |
/* Call target GetTime function */ |
|
20 |
Target_GetTime(CURRENT_TIME); |
|
21 |
} |
|
22 |
||
23 |
void PLC_SetTimer(long long next, long long period) |
|
24 |
{ |
|
25 |
} |
|
26 |
||
27 |
int startPLC(int argc,char **argv) |
|
28 |
{ |
|
29 |
if(__init(argc,argv) == 0) |
|
30 |
return 0; |
|
31 |
else |
|
32 |
return 1; |
|
33 |
} |
|
34 |
||
35 |
int TryEnterDebugSection(void) |
|
36 |
{ |
|
37 |
return 0; |
|
38 |
} |
|
39 |
||
40 |
void LeaveDebugSection(void) |
|
41 |
{ |
|
42 |
} |
|
43 |
||
44 |
int stopPLC(void) |
|
45 |
{ |
|
46 |
__cleanup(); |
|
47 |
return 0; |
|
48 |
} |
|
49 |
||
50 |
extern unsigned long __tick; |
|
51 |
/* from plc_debugger.c */ |
|
452
2d0718a05cc7
Reflect changes in iec type definitions in matiec/lib
edouard
parents:
425
diff
changeset
|
52 |
int WaitDebugData(unsigned long *tick) |
425 | 53 |
{ |
452
2d0718a05cc7
Reflect changes in iec type definitions in matiec/lib
edouard
parents:
425
diff
changeset
|
54 |
*tick = __tick; |
425 | 55 |
return 0; |
56 |
} |
|
57 |
||
58 |
/* Called by PLC thread when debug_publish finished |
|
59 |
* This is supposed to unlock debugger thread in WaitDebugData*/ |
|
60 |
void InitiateDebugTransfer(void) |
|
61 |
{ |
|
62 |
} |
|
63 |
||
64 |
void suspendDebug(void) |
|
65 |
{ |
|
66 |
} |
|
67 |
||
68 |
void resumeDebug(void) |
|
69 |
{ |
|
70 |
} |
|
71 |
||
72 |
/* from plc_python.c */ |
|
73 |
int WaitPythonCommands(void) |
|
74 |
{ |
|
75 |
return 0; |
|
76 |
} |
|
77 |
||
78 |
/* Called by PLC thread on each new python command*/ |
|
79 |
void UnBlockPythonCommands(void) |
|
80 |
{ |
|
81 |
} |
|
82 |
||
83 |
int TryLockPython(void) |
|
84 |
{ |
|
85 |
return 0; |
|
86 |
} |
|
87 |
||
88 |
void UnLockPython(void) |
|
89 |
{ |
|
90 |
} |
|
91 |
||
92 |
void LockPython(void) |
|
93 |
{ |
|
94 |
} |