summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-29modutimeq: Add peektime() function (provisional).Jan Pochyla
Allows to get event time for a head item in the queue. The usecase if waiting for the next event *OR* I/O completion. I/O completion may happen before event triggers, and then wait should continue for the remaining event time (or I/O completion may schedule another earlier event altogether). The new function has a strongly provisional status - it may be converted to e.g. peek() function returning all of the event fields, not just time.
2017-03-29cc3200/mods/pybi2c: Raise OSError if readfrom_mem fails to write addr.Damien George
2017-03-29stmhal/spi: Increase SPI transfer timeout, proportional to num bytes.Damien George
With the existing timeout of 100ms the transfer would end prematurely if the baudrate was low and the number of bytes to send was high. This patch fixes the problem by making the timeout proportional to the number of bytes that are being transferred.
2017-03-29cc3200: Update for changes to mp_obj_str_get_data.Damien George
2017-03-29esp8266: Update for changes to mp_obj_str_get_data.Damien George
2017-03-29stmhal: Update for changes to mp_obj_str_get_data.Damien George
2017-03-29lib/netutils: Update for changes to mp_obj_str_get_data.Damien George
2017-03-29extmod: Update for changes to mp_obj_str_get_data.Damien George
2017-03-29py: Change mp_uint_t to size_t for mp_obj_str_get_data len arg.Damien George
2017-03-29stmhal: Update to use size_t for tuple/list accessors.Damien George
2017-03-29esp8266: Update to use size_t for tuple/list accessors.Damien George
2017-03-29cc3200: Update to use size_t for tuple/list accessors.Damien George
2017-03-29unix: Convert mp_uint_t to size_t for use of mp_obj_list_get.Damien George
2017-03-29extmod/moduselect: Update to use size_t for array accessor.Damien George
2017-03-29py: Convert mp_uint_t to size_t for tuple/list accessors.Damien George
This patch changes mp_uint_t to size_t for the len argument of the following public facing C functions: mp_obj_tuple_get mp_obj_list_get mp_obj_get_array These functions take a pointer to the len argument (to be filled in by the function) and callers of these functions should update their code so the type of len is changed to size_t. For ports that don't use nan-boxing there should be no change in generate code because the size of the type remains the same (word sized), and in a lot of cases there won't even be a compiler warning if the type remains as mp_uint_t. The reason for this change is to standardise on the use of size_t for variables that count memory (or memory related) sizes/lengths. It helps builds that use nan-boxing.
2017-03-29extmod/vfs_fat: Fix calculation of total blocks in statvfs.Damien George
2017-03-29py/compile: Provide terse error message for invalid dict/set literals.Damien George
2017-03-29py: Shorten a couple of error messages.Damien George
2017-03-29py/compile: Simplify syntax-error messages for illegal assignments.Damien George
With this patch all illegal assignments are reported as "can't assign to expression". Before the patch there were special cases for a literal on the LHS, and for augmented assignments (eg +=), but it seems a waste of bytes (and there are lots of bytes used in error messages) to spend on distinguishing such errors which a user will rarely encounter.
2017-03-29py/lexer: Simplify and reduce code size for operator tokenising.Damien George
By removing the 'E' code from the operator token encoding mini-language the tokenising can be simplified. The 'E' code was only used for the != operator which is now handled as a special case; the optimisations for the general case more than make up for the addition of this single, special case. Furthermore, the . and ... operators can be handled in the same way as != which reduces the code size a little further. This simplification also removes a "goto". Changes in code size for this patch are (measured in bytes): bare-arm: -48 minimal x86: -64 unix x86-64: -112 unix nanbox: -64 stmhal: -48 cc3200: -48 esp8266: -76
2017-03-29zephyr/prj_base.conf: Enable TCP (and UDP explicitly).Paul Sokolovsky
2017-03-28py: Use mp_raise_TypeError/mp_raise_ValueError helpers where possible.Damien George
Saves 168 bytes on bare-arm.
2017-03-28stmhal/dma: Fix reinitialisation of DMA on F7 MCUs, following F4.Damien George
2017-03-28stmhal/hal: For F7 MCUs, expose DMA_CalcBaseAndBitshift function.Damien George
It's needed by the DMA driver to do an efficient reinitialisation. This patch follows what is done in the F4 HAL.
2017-03-28stmhal/spi: Clean and/or invalidate D-cache before SPI DMA transfers.Damien George
On MCUs with a cache (eg F7) this must be done or else the SPI data that is transferred is incorrect.
2017-03-28stmhal/board: Fix existing and add more pin defs for NUCLEO_F767ZI.Damien George
2017-03-28stmhal/boards: Fix alt-func config for PA5 of STM32F767.Damien George
2017-03-27zephyr/prj_base.conf: Disable legacy kernel compatibility.Paul Sokolovsky
This keeps dependency on mdef, sysgen and other stuff which complicates build integration.
2017-03-27py/objmap: Convert mp_uint_t to size_t.Damien George
2017-03-27esp8266/modesp: Remove long-obsolete and unused espconn bindings.Damien George
2017-03-27tests/basics: Add test for super() when self is closed over.Damien George
2017-03-27py/compile: When compiling super(), handle closed-over self variable.Damien George
The self variable may be closed-over in the function, and in that case the call to super() should load the contents of the closure cell using LOAD_DEREF (before this patch it would just load the cell directly).
2017-03-27py/vm: Fix VM opcode tracing to print correct stack pointer.Damien George
Also const_table is now moved to the code_state->fun_bc structure.
2017-03-27zephyr/zephyr_getchar: Use native k_sem instead of legacy nano_sem.Paul Sokolovsky
2017-03-26py/obj: Change mp_uint_t to size_t for mp_obj_get_array_fixed_n len arg.Damien George
2017-03-26esp8266/modesp: Use mp_obj_str_get_str instead of mp_obj_str_get_data.Damien George
2017-03-26extmod/modlwip: Use mp_obj_str_get_str instead of mp_obj_str_get_data.Damien George
2017-03-26README: Change Travis & Coveralls badges to not use link references.Damien George
Link references don't seem to work anymore.
2017-03-26py/nlrx86: Better check for Zephyr (requires 1.7).Paul Sokolovsky
2017-03-25README: Describe extmod/ dir.Paul Sokolovsky
2017-03-25README: Add link to docs.micropython.org.Paul Sokolovsky
2017-03-25unix: Use mp_obj_str_get_str instead of mp_obj_str_get_data.Damien George
2017-03-25py/objarray: Use mp_obj_str_get_str instead of mp_obj_str_get_data.Damien George
2017-03-24py: Remove MP_STATE_CTX, use MP_STATE_THREAD instead (it's an alias).Damien George
MP_STATE_CTX was recently aliased to MP_STATE_THREAD and can now be removed.
2017-03-24py: Use mp_locals/mp_globals accessor funcs instead of MP_STATE_CTX.Damien George
To improve maintainability of the code.
2017-03-24py/objnamedtuple: Use size_t where appropriate, instead of mp_uint_t.Damien George
2017-03-24py/objtype: Use size_t where appropriate, instead of mp_uint_t or uint.Damien George
2017-03-24tests/float: Add tests for round() of inf, nan and large number.Damien George
2017-03-24py/modbuiltins: Allow round() to return a big int if necessary.Damien George
Previous to this patch, if the result of the round function overflowed a small int, or was inf or nan, then a garbage value was returned. With this patch the correct big-int is returned if necessary and exceptions are raised for inf or nan.
2017-03-24py/modbuiltins: For round() builtin use nearbyint instead of round.Damien George
The C nearbyint function has exactly the semantics that Python's round() requires, whereas C's round() requires extra steps to handle rounding of numbers half way between integers. So using nearbyint reduces code size and potentially eliminates any source of errors in the handling of half-way numbers. Also, bare-metal implementations of nearbyint can be more efficient than round, so further code size is saved (and efficiency improved). nearbyint is provided in the C99 standard so it should be available on all supported platforms.