summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-26py/compile: Remove comment about TODO for short circuiting for if-stmt.Damien George
Short circuiting is handled correctly by c_if_cond, and constants within short-circuit expressions are optimised by the parser.
2016-11-26tests/basics: Add tests for if-expressions.Damien George
2016-11-26tests/basics: Add test for dict.fromkeys where arg is a generator.Damien George
Improves coverage because it tests the case where the arg does not have a __len__ slot.
2016-11-25stmhal/machine_i2c: Provide HW implementation of I2C peripherals for F4.Damien George
With this patch machine.I2C() uses HW I2C peripheral blocks on F4 MCUs. Software I2C is used for other MCUs.
2016-11-25stmhal/i2c: Expose the pyb_i2c_obj_t struct and some relevant functions.Damien George
So they can be used by other parts of the code.
2016-11-25stmhal/i2c: Add support for I2C4 hardware block on F7 MCUs.Damien George
2016-11-24stmhal: Add beginnings of port-specific machine.I2C implementation.Damien George
This allows one to construct an I2C object using ids that are specific to the stmhal port, eg machine.I2C('X'). Right now the implementation of I2C uses software I2C but the idea is to just change the C-level I2C protocol functions to hardware implementations later on.
2016-11-24extmod/machine_i2c: Add hook to constructor to call port-specific code.Damien George
If MICROPY_PY_MACHINE_I2C_MAKE_NEW is defined then it is called when an I2C object is constructed with an id which is not -1.
2016-11-24extmod/machine_i2c: Expose soft I2C obj and readfrom/writeto funcs.Damien George
For external use by ports if needed.
2016-11-23extmod/machine_i2c: Remove trivial function wrappers.Damien George
2016-11-23extmod/machine_i2c: Add 'stop' argument to i2c readfrom/writeto meths.Damien George
2016-11-23extmod/machine_i2c: Make i2c.write[to] methods return num of ACKs recvd.Damien George
2016-11-23extmod/machine_i2c: Add 'nack' argument to i2c.readinto.Damien George
2016-11-23extmod/machine_i2c: Make C-level functions return -errno on I2C error.Damien George
2016-11-23extmod/machine_i2c: Remove unneeded i2c_write_mem/i2c_read_mem funcs.Damien George
2016-11-23extmod/machine_i2c: Rewrite mem xfer funcs in terms of C-level protocol.Damien George
2016-11-23extmod/machine_i2c: Rewrite i2c.scan in terms of C-level protocol.Damien George
2016-11-23extmod/machine_i2c: Add argument to C funcs to control stop generation.Damien George
2016-11-23extmod/machine_i2c: Add a C-level I2C-protocol, refactoring soft I2C.Damien George
2016-11-23docs/library/machine.I2C: Refine definitions of I2C methods.Damien George
2016-11-22stmhal/i2c: Remove use of legacy I2C_NOSTRETCH_DISABLED option.Damien George
In the new HAL this is renamed to I2C_NOSTRETCH_DISABLE.
2016-11-22tests/basics: Improve user class coverage.Rami Ali
2016-11-22tests/extmod: Improve ujson coverage.Rami Ali
2016-11-22py/objtype: Implement __call__ handling for an instance w/o heap alloc.Paul Sokolovsky
By refactoring and reusing code from objboundmeth.
2016-11-21stmhal: Updates to get F411 MCUs compiling with latest ST HAL.Damien George
2016-11-21tests/micropython: Move alloc-less traceback test to separate test file.Damien George
The native emitter doesn't provide proper traceback info so this test should not be run in that case.
2016-11-21tests/micropython: Add test for creating traceback without allocation.Damien George
2016-11-21stmhal/i2c: Use the HAL's I2C IRQ handler for F7 and L4 MCUs.Damien George
The custom IRQ handler only works for F4 MCUs, which have the SR1 register.
2016-11-21unix/Makefile: Update freedos target for change of USELECT config name.Damien George
2016-11-21extmod/moduselect: Fix comment describing endif.Damien George
2016-11-21extmod/machine_mem: Typo fix in comment.Paul Sokolovsky
2016-11-21cc3200: Update for moduselect moved to extmod/.Paul Sokolovsky
2016-11-21unix: Rename define for unix moduselect to MICROPY_PY_USELECT_POSIX.Paul Sokolovsky
To not conflict with recently made available globally baremetal moduselect.
2016-11-21stmhal/moduselect: Move to extmod/ for reuse by other ports.Paul Sokolovsky
2016-11-18examples/accellog.py: Change 1: to /sd/, and update comment about FS.Damien George
2016-11-18examples/hwapi: Add hwconfig for console tracing of LED operations.Paul Sokolovsky
2016-11-17extmod/machine_i2c: Release SDA on bus errorRadomir Dopieralski
2016-11-17extmod/machine_i2c: Raise an error when clock stretching times outRadomir Dopieralski
2016-11-17extmod/machine_i2c: Make the clock stretching timeout configurableRadomir Dopieralski
2016-11-17examples/hwapi: Add example for machine.time_pulse_us().Paul Sokolovsky
2016-11-16stmhal: Update HALCOMMITS due to change to hal.Krzysztof Blazewicz
2016-11-16stmhal/make-stmconst.py: Restore Python 2 compatibility.Damien George
2016-11-16stmhal: Update HALCOMMITS due to change to hal.Damien George
2016-11-16stmhal/make-stmconst.py: Add support for files with invalid utf8 bytes.Damien George
2016-11-16stmhal/mphalport.h: use single GPIOx->BSRR registerKrzysztof Blazewicz
2016-11-16stmhal/hal: do not include <stdio.h> in HAL headersKrzysztof Blazewicz
stdio.h was included in all HAL files only to provide definition of NULL symbol "stdio.h" includes "types.h" which contains some conflicting definitions with "drivers/cc3000/inc/socket.h"
2016-11-16stmhal/i2c: provide custom IRQ handlersKrzysztof Blazewicz
Use custom handlers providing minimal required functionality because those provided by ST increase code size by almost 2 KiB.
2016-11-16stmhal/can: clear FIFO flags in IRQ handlerKrzysztof Blazewicz
HAL Driver before v1.4.2 had a bug which caused clearing all pending flags in MSR, TSR, RF0R and RF1R instead of only the requested one. This is why micropython got away without explicitly clearing flags in IRQ handler.
2016-11-16stmhal/dma: mark DMA sate as READY even if HAL_DMA_Init is skippedKrzysztof Blazewicz
Current version of HAL drivers checks if `hdma->State == HAL_DMA_STATE_READY` before executing some functions.
2016-11-16stmhal/dma: precalculate register base and bitshift on handle initKrzysztof Blazewicz
Current version of HAL drivers optimize IRQ handler by using precalculated DMA register address and stream bitshift instead of calculating it on every interrupt. Since we skip call to `HAL_DMA_Init` on reused DMA, fields StreamBaseAddress and StreamIndex of DMA handle are not initialized and thus leads to SegFault in `DMA_IRQHandler`. HAL_DMA_Init is a big routine and we do not need to call it on each use of DMA (ex.: series of I2C operations) and DMA_CalcBaseAndBitshift is really small and releasing it increases code size by only 8 bytes.