Commit Graph

15 Commits

Author SHA1 Message Date
Damien George
93c4a6a3f7 all: Remove 'name' member from mp_obj_module_t struct.
One can instead lookup __name__ in the modules dict to get the value.
2016-09-22 00:23:16 +10:00
Damien George
40274fec9c lib/pyexec: Move header pyexec.h from stmhal directory. 2015-11-09 13:13:09 +00:00
Damien George
731f359292 all: Add py/mphal.h and use it in all ports.
py/mphal.h contains declarations for generic mp_hal_XXX functions, such
as stdio and delay/ticks, which ports should provide definitions for.  A
port will also provide mphalport.h with further HAL declarations.
2015-10-31 19:14:30 +03:00
Paul Sokolovsky
eb099b9893 teensy: Switch from HAL_* to mp_hal_* functions. 2015-10-29 20:12:13 +03:00
Paul Sokolovsky
1b586f3a73 py: Rename MP_BOOL() to mp_obj_new_bool() for consistency in naming. 2015-10-11 15:18:15 +03:00
Damien George
0b32e50365 stmhal: Make pybstdio usable by other ports, and use it.
Now all ports can use pybstdio.c to provide sys.stdin/stdout/stderr, so
long as they implement mp_hal_stdin_* and mp_hal_stdout_* functions.
2015-02-13 15:04:53 +00:00
Damien George
b68d98d61c teensy: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:13:30 +00:00
Damien George
3b603f29ec Use MP_DEFINE_CONST_DICT macro to define module dicts.
This is just a clean-up of the code.  Generated code is exactly the
same.
2014-11-29 14:39:27 +00:00
Dave Hylands
a21f56b2d5 Added pyb.elapsed_millis and pyb.elapsed_micros
tested using:
stmhal: https://github.com/dhylands/upy-examples/blob/master/elapsed.py
teensy: https://github.com/dhylands/upy-examples/blob/master/teensy/elapsed.py
2014-09-28 11:24:44 -07:00
Dave Hylands
becbc87fd7 Add Timer support (PWM, OC, IC) for stmhal and teensy 2014-09-19 09:26:13 -07:00
Dave Hylands
9480138f0c Add save/restore_irq
Factored irq functions into a separate file.
2014-08-25 12:22:11 +01:00
Dave Hylands
e40c72210f Fix teensy to work with the latest tree. 2014-08-02 21:28:32 -07:00
Dave Hylands
4d9dd26818 Fix teensy to build on latest tree.
Put #include of mpconfig.h before misc.h
Replace uses of ARRAY_SIZE with MP_ARRAY_SIZE
2014-07-14 22:19:27 -07:00
Damien George
40f3c02682 Rename machine_(u)int_t to mp_(u)int_t.
See discussion in issue #50.
2014-07-03 13:25:24 +01:00
Dave Hylands
4f1b7fec9f Updated teensy to build.
Refactored some stmhal files which are shared with teensy.
2014-06-15 22:48:05 -07:00