main.c
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00020 #include "pm.h"
00021 #include "pic24_all.h"
00022
00023 extern unsigned char usrlib_img[];
00024
00025 int main(void)
00026 {
00027 PmReturn_t retval;
00028
00029 retval = pm_init(MEMSPACE_PROG, usrlib_img);
00030 printf("Python initialized; result was 0x%02x.\n", retval);
00031 PM_RETURN_IF_ERROR(retval);
00032
00033 printf("Running Python...\n");
00034 retval = pm_run((uint8_t *)"main");
00035
00036 printf("\n\nPython finished, return of 0x%02x.\nResetting...\n\n", retval);
00037
00038 DELAY_MS(1000);
00039 asm("reset");
00040
00041 return (int)retval;
00042 }