mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-11 19:24:10 +01:00
1e78cc7a30
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2364 ebee16cc-31ac-478f-84a7-5cbb03baadba
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
/*
|
|
# This file is Copyright 2007, 2009 Dean Hall.
|
|
#
|
|
# This file is part of the Python-on-a-Chip program.
|
|
# Python-on-a-Chip is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
|
|
#
|
|
# Python-on-a-Chip is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
# A copy of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
|
|
# is seen in the file COPYING up one directory from this.
|
|
*/
|
|
|
|
|
|
#include "pm.h"
|
|
#define WIN32_LEAN_AND_MEAN
|
|
#include "windows.h"
|
|
#include "tchar.h"
|
|
|
|
// the usr modules that were converted to C from Python
|
|
extern unsigned char usrlib_img[];
|
|
|
|
|
|
#if defined(_CONSOLE)
|
|
int _tmain(int argc, _TCHAR* argv[])
|
|
#else
|
|
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
|
|
#endif
|
|
{
|
|
PmReturn_t retval;
|
|
|
|
retval = pm_init(MEMSPACE_PROG, usrlib_img);
|
|
PM_RETURN_IF_ERROR(retval);
|
|
|
|
retval = pm_run((uint8_t *)"main");
|
|
return (int)retval;
|
|
}
|