/* list all includes */
void PlatformLibraryInit(Picoc *pc)
{
#ifndef NO_STRING_FUNCTIONS
	IncludeRegister(pc, "string.h", NULL, &PlatformLibrary_string[0], NULL);
#endif
#ifndef NO_FP
	IncludeRegister(pc, "math.h", &PlatformLibrarySetup_math, &PlatformLibrary_math[0], NULL);
#endif
	IncludeRegister(pc, "system.h", NULL, &PlatformLibrary_system[0], NULL);
	IncludeRegister(pc, "attitudeactual.h", &PlatformLibrarySetup_attitudeactual, &PlatformLibrary_attitudeactual[0], NULL);
	IncludeRegister(pc, "baroaltitude.h", &PlatformLibrarySetup_baroaltitude, &PlatformLibrary_baroaltitude[0], NULL);
	IncludeRegister(pc, "flightbatterystate.h", &PlatformLibrarySetup_flightbatterystate, &PlatformLibrary_flightbatterystate[0], NULL);
	IncludeRegister(pc, "flightstatus.h", NULL, &PlatformLibrary_flightstatus[0], NULL);
	IncludeRegister(pc, "gpsposition.h", &PlatformLibrarySetup_gpsposition, &PlatformLibrary_gpsposition[0], NULL);
	IncludeRegister(pc, "pwm.h", NULL, &PlatformLibrary_pwm[0], NULL);
}
Example #2
0
/* initialise the built-in include libraries */
void IncludeInit()
{

    IncludeRegister("ctype.h", NULL, &StdCtypeFunctions[0], NULL);
    IncludeRegister("errno.h", &StdErrnoSetupFunc, NULL, NULL);
#ifndef NO_FP
    IncludeRegister("math.h", &MathSetupFunc, &MathFunctions[0], NULL);
#endif
    IncludeRegister("stdbool.h", &StdboolSetupFunc, NULL, StdboolDefs);
    IncludeRegister("stdio.h", &StdioSetupFunc, &StdioFunctions[0], StdioDefs);
    IncludeRegister("stdlib.h", &StdlibSetupFunc, &StdlibFunctions[0], NULL);
    IncludeRegister("string.h", &StringSetupFunc, &StringFunctions[0], NULL);
    IncludeRegister("time.h", &StdTimeSetupFunc, &StdTimeFunctions[0], StdTimeDefs);
    #ifndef WIN32
    IncludeRegister("unistd.h", &UnistdSetupFunc, &UnistdFunctions[0], UnistdDefs);
    #endif
    #ifndef NO_CESCRIPT
    IncludeRegister("cescript.h", &CustomFuncSetup, &CustomFunctions[0], NULL);
    #endif /* !NO_CESCRIPT */
}
Example #3
0
/* initialise the built-in include libraries */
void IncludeInit(Picoc *pc){
#ifndef BUILTIN_MINI_STDLIB
    IncludeRegister(pc, "ctype.h", NULL, &StdCtypeFunctions[0], NULL);
    IncludeRegister(pc, "errno.h", &StdErrnoSetupFunc, NULL, NULL);
# ifndef NO_FP
    IncludeRegister(pc, "math.h", &MathSetupFunc, &MathFunctions[0], NULL);
# endif
    IncludeRegister(pc, "stdbool.h", &StdboolSetupFunc, NULL, StdboolDefs);
    IncludeRegister(pc, "stdio.h", &StdioSetupFunc, &StdioFunctions[0], StdioDefs);
    IncludeRegister(pc, "stdlib.h", &StdlibSetupFunc, &StdlibFunctions[0], NULL);
    IncludeRegister(pc, "string.h", &StringSetupFunc, &StringFunctions[0], NULL);
    IncludeRegister(pc, "time.h", &StdTimeSetupFunc, &StdTimeFunctions[0], StdTimeDefs);
# ifndef WIN32
    IncludeRegister(pc, "unistd.h", &UnistdSetupFunc, &UnistdFunctions[0], UnistdDefs);
# endif
#endif
}
Example #4
0
void PlatformLibraryInit(Picoc *pc)
{
    IncludeRegister(pc, "picoc_msvc.h", &MsvcSetupFunc, &MsvcFunctions[0], NULL);
}
Example #5
0
void PlatformLibraryInit()
{
   IncludeRegister("picoc_unix.h", &UnixSetupFunc, &UnixFunctions[0], NULL);
}
Example #6
0
/* list all includes */
void PlatformLibraryInit(Picoc *pc)
{
	// ensure we run in user state at startup
	accesslevel = 0;

#ifndef NO_STRING_FUNCTIONS
	IncludeRegister(pc, "string.h", NULL, &PlatformLibrary_string[0], NULL);
#endif
#ifndef NO_FP
	IncludeRegister(pc, "math.h", &PlatformLibrarySetup_math, &PlatformLibrary_math[0], NULL);
#endif
	IncludeRegister(pc, "system.h", NULL, &PlatformLibrary_system[0], NULL);
	IncludeRegister(pc, "accels.h", &PlatformLibrarySetup_accels, &PlatformLibrary_accels[0], NULL);
	IncludeRegister(pc, "attitudeactual.h", &PlatformLibrarySetup_attitudeactual, &PlatformLibrary_attitudeactual[0], NULL);
	IncludeRegister(pc, "baroaltitude.h", &PlatformLibrarySetup_baroaltitude, &PlatformLibrary_baroaltitude[0], NULL);
	IncludeRegister(pc, "flightbatterystate.h", &PlatformLibrarySetup_flightbatterystate, &PlatformLibrary_flightbatterystate[0], NULL);
	IncludeRegister(pc, "flightstatus.h", &PlatformLibrarySetup_flightstatus, &PlatformLibrary_flightstatus[0], NULL);
	IncludeRegister(pc, "gpsposition.h", &PlatformLibrarySetup_gpsposition, &PlatformLibrary_gpsposition[0], NULL);
	IncludeRegister(pc, "gyros.h", &PlatformLibrarySetup_gyros, &PlatformLibrary_gyros[0], NULL);
	IncludeRegister(pc, "magnetometer.h", &PlatformLibrarySetup_magnetometer, &PlatformLibrary_magnetometer[0], NULL);
	IncludeRegister(pc, "manualcontrol.h", NULL, &PlatformLibrary_manualcontrol[0], NULL);
	IncludeRegister(pc, "pathdesired.h", &PlatformLibrarySetup_pathdesired, &PlatformLibrary_pathdesired[0], NULL);
	IncludeRegister(pc, "pathstatus.h", &PlatformLibrarySetup_pathstatus, &PlatformLibrary_pathstatus[0], NULL);
	IncludeRegister(pc, "positionactual.h", &PlatformLibrarySetup_positionactual, &PlatformLibrary_positionactual[0], NULL);
#ifndef NO_FP
	IncludeRegister(pc, "pid.h", &PlatformLibrarySetup_pid, &PlatformLibrary_pid[0], NULL);
#endif
}
Example #7
0
/* initialise the built-in include libraries */
void IncludeInit()
{
	IncludeCleanup();
#ifndef BUILTIN_MINI_STDLIB
    IncludeRegister("ctype.h", NULL, &StdCtypeFunctions[0], NULL);
    IncludeRegister("errno.h", &StdErrnoSetupFunc, NULL, NULL);
#ifndef NO_FP
    IncludeRegister("math.h", &MathSetupFunc, &MathFunctions[0], NULL);
#endif
    IncludeRegister("stdbool.h", &StdboolSetupFunc, NULL, StdboolDefs);
    IncludeRegister("stdio.h", &StdioSetupFunc, &StdioFunctions[0], StdioDefs);
    IncludeRegister("stdlib.h", &StdlibSetupFunc, &StdlibFunctions[0], NULL);
    IncludeRegister("string.h", &StringSetupFunc, &StringFunctions[0], NULL);
    IncludeRegister("time.h", &StdTimeSetupFunc, &StdTimeFunctions[0], StdTimeDefs);
    IncludeRegister("unistd.h", &UnistdSetupFunc, &UnistdFunctions[0], UnistdDefs);
#else
    IncludeRegister("stdio.h", 0, 0, 0);
    IncludeRegister("stdlib.h", 0, 0, 0);
    IncludeRegister("string.h", 0, 0, 0);
    IncludeRegister("time.h", 0, 0, 0);
    IncludeRegister("unistd.h", 0, 0, 0);
#endif
}
Example #8
0
void PlatformLibraryInit()
{
    IncludeRegister("autoio_func.h", &WindowsSetupFunc, &WindowsFunctions[0], NULL);
}