targets/LPC/plc_LPC_main.c
author laurent
Tue, 08 Dec 2009 12:54:28 +0100
changeset 478 029688dad14d
parent 452 targets/Makefile/plc_Makefile_main.c@2d0718a05cc7
child 483 bc26c42d2eec
permissions -rwxr-xr-x
Replacing target_Makefile by target_LPC
Making Beremiz accept folder instead of xml file for project
Removing Clean button
/**
 * Yagarto specific code
 **/

//#include <stdio.h>

/* provided by POUS.C */
extern int common_ticktime__;

void Target_GetTime(IEC_TIME*);

long AtomicCompareExchange(long* atomicvar,long compared, long exchange)
{
	return 0;
}

void PLC_GetTime(IEC_TIME *CURRENT_TIME)
{
	/* Call target GetTime function */
	Target_GetTime(CURRENT_TIME);
}

void PLC_SetTimer(long long next, long long period)
{
}

int startPLC(int argc,char **argv)
{
	if(__init(argc,argv) == 0)
		return 0;
	else
		return 1;
}

int TryEnterDebugSection(void)
{
    return 0;
}

void LeaveDebugSection(void)
{
}

int stopPLC(void)
{
    __cleanup();
    return 0;
}

extern unsigned long __tick;
/* from plc_debugger.c */
int WaitDebugData(unsigned long *tick)
{
    *tick = __tick;
    return 0;
}

/* Called by PLC thread when debug_publish finished
 * This is supposed to unlock debugger thread in WaitDebugData*/
void InitiateDebugTransfer(void)
{
}

void suspendDebug(void)
{
}

void resumeDebug(void)
{
}

/* from plc_python.c */
int WaitPythonCommands(void)
{
    return 0;
}

/* Called by PLC thread on each new python command*/
void UnBlockPythonCommands(void)
{
}

int TryLockPython(void)
{
	return 0;
}

void UnLockPython(void)
{
}

void LockPython(void)
{
}