targets/Makefile/plc_Makefile_main.c
changeset 478 029688dad14d
parent 477 f66a092b6e74
child 479 c28f40b27798
child 482 7c83eb6a55bd
equal deleted inserted replaced
477:f66a092b6e74 478:029688dad14d
     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 */
       
    52 int WaitDebugData(unsigned long *tick)
       
    53 {
       
    54     *tick = __tick;
       
    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 }