Wykres commitów

19 Commity (962a5d50c94f01ca8dc7d46fe568535d713d59d0)

Autor SHA1 Wiadomość Data
Damien George 3b51b3e90f stmhal: Collect all root pointers together in 1 place.
A GC in stmhal port now only scans true root pointers, not entire BSS.
This reduces base GC time from 1700ms to 900ms.
2015-01-07 23:38:50 +00:00
Damien George 2cf6dfa280 stmhal: Prefix includes with py/; remove need for -I../py. 2015-01-01 21:06:20 +00:00
Paul Sokolovsky 46c3ab2004 modsys: Add sys.print_exception(exc, file=sys.stdout) function.
The function is modeled after traceback.print_exception(), but unbloated,
and put into existing module to save overhead on adding another module.
Compliant traceback.print_exception() is intended to be implemented in
micropython-lib in terms of sys.print_exception().

This change required refactoring mp_obj_print_exception() to take pfenv_t
interface arguments.

Addresses #751.
2014-12-08 20:25:49 +00:00
Damien George ecc88e949c Change some parts of the core API to use mp_uint_t instead of uint/int.
Addressing issue #50, still some way to go yet.
2014-08-30 00:35:11 +01:00
Damien George ccacdf44b6 stmhal: Clean up reset/soft-reset code; fix bug init'ing VCP exc.
Make a clearer distinction between init functions that must be done
before any scripts can run (xxx_init0) and those that can be safely
deferred (xxx_init).

Fix bug initialising USB VCP exception.  Addresses issue #788.

Re-order some init function to improve reliability of
reset/soft-reset.
2014-08-04 11:09:51 +01: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
Emmanuel Blot f6932d6506 Prefix ARRAY_SIZE with micropython prefix MP_ 2014-06-19 18:54:34 +02:00
Damien George 491cbd6a7c py: Add keyword arg support to enumerate constructor.
Need to have a policy as to how far we go adding keyword support to
built ins.  It's nice to have, and gets better CPython compatibility,
but hurts the micro nature of uPy.

Addresses issue #577.
2014-05-06 16:38:54 +00:00
Dave Hylands 1145a0706c Change references (in comments) of pyb.GPIO to be pyb.Pin
The documentation at http://micropython.org/doc/module/pyb/ExtInt should also be
updated.
2014-05-05 10:58:38 -07:00
Damien George 04b9147e15 Add license header to (almost) all files.
Blanket wide to all .c and .h files.  Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.

Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
2014-05-03 23:27:38 +01:00
Paul Sokolovsky 9b71b16a94 unix,stmhal: Make "mpconfig.h" be first included, as other headers depend on it. 2014-05-02 18:08:16 +03:00
Damien George da9f27103d stmhal: Oops, typo. 2014-04-29 23:00:48 +01:00
Damien George 8d09640b22 stmhal: Add documentation in comments, and script to generate HTML.
Decided to write own script to pull documentation from comments in C code.
Style for writing auto generated documentation is: start line with ///
and then use standard markdown to write the comment.  Keywords
recognised by the scraper begin with backslash.  See code for examples.

Running: python gendoc.py modpyb.c accel.c adc.c dac.c extint.c i2c.c
led.c pin.c rng.c servo.c spi.c uart.c usrsw.c, will generate a HTML
structure in gendoc-out/.

gendoc.py is crude but functional.  Needed something quick, and this was
it.
2014-04-29 22:55:34 +01:00
Damien George dbc81df5d4 Simplify names for argcheck.c / arg parsing. 2014-04-26 11:19:17 +01:00
Damien George 6d3c5e4301 Add ARRAY_SIZE macro, and use it where possible. 2014-04-26 10:47:29 +01:00
Damien George fd6925b4b9 stmhal: Small bug fixes and simplifications. 2014-04-20 01:25:58 +01:00
Damien George 0a6e9f562f stmhal: Update ExtInt to allow keyword arguments in constructor. 2014-04-20 00:38:50 +01:00
Damien George d689430e79 stmhal: Add SPI class.
Also some updates to compile with latest changes to core py.
2014-04-20 00:16:30 +01:00
Damien George c66d86c5ce stmhal: Big cleanup; merge gpio into Pin; make names consistent.
This is an attempt to clean up the Micro Python API on the pyboard.
Gpio functionality is now in the Pin object, which seems more natural.
Constants for MODE and PULL are now in pyb.Pin.  Names of some
classes have been adjusted to conform to CamelCase.  Other
miscellaneous changes and clean up here and there.
2014-04-18 22:38:09 +01:00