Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
src/platform/mbed/main.cpp@0:14e5e829dffe, 2010-07-21 (annotated)
- Committer:
- dadaista
- Date:
- Wed Jul 21 12:50:41 2010 +0000
- Revision:
- 0:14e5e829dffe
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| dadaista | 0:14e5e829dffe | 1 | /* |
| dadaista | 0:14e5e829dffe | 2 | # This file is Copyright 2009 Dean Hall. |
| dadaista | 0:14e5e829dffe | 3 | # |
| dadaista | 0:14e5e829dffe | 4 | # This file is part of the Python-on-a-Chip program. |
| dadaista | 0:14e5e829dffe | 5 | # Python-on-a-Chip is free software: you can redistribute it and/or modify |
| dadaista | 0:14e5e829dffe | 6 | # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1. |
| dadaista | 0:14e5e829dffe | 7 | # |
| dadaista | 0:14e5e829dffe | 8 | # Python-on-a-Chip is distributed in the hope that it will be useful, |
| dadaista | 0:14e5e829dffe | 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| dadaista | 0:14e5e829dffe | 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| dadaista | 0:14e5e829dffe | 11 | # A copy of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 |
| dadaista | 0:14e5e829dffe | 12 | # is seen in the file COPYING up one directory from this. |
| dadaista | 0:14e5e829dffe | 13 | */ |
| dadaista | 0:14e5e829dffe | 14 | |
| dadaista | 0:14e5e829dffe | 15 | |
| dadaista | 0:14e5e829dffe | 16 | #include "pm.h" |
| dadaista | 0:14e5e829dffe | 17 | |
| dadaista | 0:14e5e829dffe | 18 | |
| dadaista | 0:14e5e829dffe | 19 | #ifdef __cplusplus |
| dadaista | 0:14e5e829dffe | 20 | extern |
| dadaista | 0:14e5e829dffe | 21 | #endif |
| dadaista | 0:14e5e829dffe | 22 | unsigned char const usrlib_img[]; |
| dadaista | 0:14e5e829dffe | 23 | |
| dadaista | 0:14e5e829dffe | 24 | |
| dadaista | 0:14e5e829dffe | 25 | int |
| dadaista | 0:14e5e829dffe | 26 | main(void) |
| dadaista | 0:14e5e829dffe | 27 | { |
| dadaista | 0:14e5e829dffe | 28 | PmReturn_t retval; |
| dadaista | 0:14e5e829dffe | 29 | |
| dadaista | 0:14e5e829dffe | 30 | /* Init PyMite */ |
| dadaista | 0:14e5e829dffe | 31 | retval = pm_init(MEMSPACE_PROG, (uint8_t *)usrlib_img); |
| dadaista | 0:14e5e829dffe | 32 | PM_RETURN_IF_ERROR(retval); |
| dadaista | 0:14e5e829dffe | 33 | |
| dadaista | 0:14e5e829dffe | 34 | /* Run the sample program */ |
| dadaista | 0:14e5e829dffe | 35 | retval = pm_run((uint8_t *)"main"); |
| dadaista | 0:14e5e829dffe | 36 | |
| dadaista | 0:14e5e829dffe | 37 | return (int)retval; |
| dadaista | 0:14e5e829dffe | 38 | } |