aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-08-25esp8266/hspi: Enable duplex operation of hardware SPIRadomir Dopieralski
Without this, spi.read(1, 0xff) would use 16 clock cycles, first to send 0xff and then to receive one byte, as visible with a logic analyzer.
2016-08-25lib/utils/stdout_helpers: Fix function signature to match py/mphal.h.Paul Sokolovsky
2016-08-25stmhal: Update pin print to print new constantsDave Hylands
This updates the print function for machine.Pin to print out the new constants from the Hardware API defintion rather than the legacy definitions.
2016-08-25esp8266/modpybrtc: Use 64-bit arithmetic when computing alarm expiry.Damien George
2016-08-25tests/run-tests: Disable thread/stress_heap.py when running on Travis.Damien George
It has reliability issues and sometimes fails on Travis (reason currently unknown).
2016-08-25stmhal: Make ADC channel 16 available on L4 MCUs.Matt Brejza
2016-08-24extmod/modubinascii: Make crc32() support configurable.Paul Sokolovsky
Disable by default, enable in unix port.
2016-08-24extmod/modubinascii: implement binascii.crc32Pavol Rusnak
2016-08-24py/stream.c: use mp_obj_get_type in mp_get_stream_raiseKrzysztof Blazewicz
In current state `mp_get_stream_raise` assumes that `self_in` is an object and always performs a pointer derefence which may cause a segfault. This function shall throw an exception whenever `self_in` does not implement a stream protocol, that includes qstr's and numbers. fixes #2331
2016-08-24extmod/modbtree: do CHECK_ERROR after __bt_seq()Krzysztof Blazewicz
In `btree_seq()`, when `__bt_seq()` gets called with invalid `flags` argument it will return `RET_ERROR` and it won't initialize `val`. If field `data` of uninitialized `val` is passed to `mp_obj_new_bytes()` it causes a segfault.
2016-08-22teensy: Fix execution of frozen boot.py and main.pyDave Hylands
2016-08-22stmhal: Remove obsolete code for special handling of TIM3 irq settings.Damien George
TIM3 is no longer special, or at least does not have special IRQ settings.
2016-08-22stmhal: Fix timer capture/compare interrupt handling for TIM1 and TIM8.Dave Hylands
It turns out that TIM1 and TIM8 have their own Capture/Compare interrupt vector. For all of the other timers, the capture/compare interrupt vector is the same as the update vector. So we need to add handlers for these vectors and enable them when using capture/compare callbacks. During testing of this, I also found that passing a channel callback into the channel constructor would not enable interrupts properly. I tested using: ``` >>> pyb.Timer(1, freq=4).channel(1, pyb.Timer.OC_TOGGLE, callback=lambda t: print('.', end='')) ``` I tested the above with channels 1, 4, and 8
2016-08-20esp8266/esp_mphal: No longer disable watchdog on startup.Paul Sokolovsky
Disabling it was an omission from early development stages.
2016-08-19esp8266/modmachinespi: Add a factory method for SoftSPI/HSPIRadomir Dopieralski
2016-08-19esp8266/modpybhspi: Add a HSPI module for hardware SPI supportRadomir Dopieralski
This module uses ESP8266's SPI hardware, which allows much higher speeds. It uses a library from https://github.com/MetalPhreak/ESP8266_SPI_Driver
2016-08-17extmod/uzlib/: Update uzlib to v2.0.2.Paul Sokolovsky
Consistently use stdint types. Fixes stmhal build.
2016-08-17docs/library/machine.WDT: Add note that WDT is only available on WiPy.Damien George
2016-08-17tests/run-tests: Disable thread/thread_lock4.py on Travis.Damien George
It has reliability issues that need to be worked out.
2016-08-17extmod/uzlib/: Update uzlib to v2.0.1.Paul Sokolovsky
Fixes for pedantic compiler warnings.
2016-08-17tests/uzlib_decompress: Actually test raw DEFLATE stream.Paul Sokolovsky
2016-08-17extmod/moduzlib: Refactor to new stream-compatible uzlib 2.0 API.Paul Sokolovsky
2016-08-17extmod/uzlib/: Update uzlib to v2.0.Paul Sokolovsky
New API supporting stream decompression.
2016-08-17tests/basics/special_methods: Enable tests for extra special methods.Damien George
These additional special methods are enabled on most ports so we can test them in this test.
2016-08-17qemu-arm: Enable MICROPY_PY_ALL_SPECIAL_METHODS.Damien George
The qemu-arm port is for testing, so should have features enabled.
2016-08-17tests/basics: Add a test file for overriding special methods.rguillon
2016-08-16extmod/modwebrepl: set_password(): Raise exception for too long password.Paul Sokolovsky
2016-08-15py/sequence: Allow to use bignums as indices in slice objects.Damien George
See issue #2264.
2016-08-15tests/basics: Add test for break from within try within a for-loop.Damien George
2016-08-15ports: Remove typedef of machine_ptr_t, it's no longer needed.Damien George
This type was used only for the typedef of mp_obj_t, which is now defined by the object representation. So we can now remove this unused typedef, to simplify the mpconfigport.h file.
2016-08-15py/obj.h: For obj reprs A,B,C use void* explicitly for mp_obj_t typedef.Damien George
The machine_ptr_t type is long obsolete as the type of mp_obj_t is now defined by the object representation, ie by MICROPY_OBJ_REPR. So just use void* explicitly for the typedef of mp_obj_t. If a port wants to use something different then they should define a new object representation.
2016-08-15tests/misc/non_compliant: Add tests to improve coverage testing.Damien George
2016-08-15tests/basics: Add more list tests to improve coverage testing.Damien George
2016-08-15tests/basics: Add more tuple tests to improve coverage testing.Damien George
2016-08-14py/objstr: Use mp_raise_{Type,Value}Error instead of mp_raise_msg.Damien George
This patch does further refactoring using the new mp_raise_TypeError and mp_raise_ValueError functions.
2016-08-14py/runtime.h: Move comment about mp_not_implemented to correct place.Damien George
2016-08-14py/objtuple: In tuple_cmp_helper, use mp_check_self instead of raising.Damien George
Only tuple, namedtuple and attrtuple use the tuple_cmp_helper function, and they all have getiter=mp_obj_tuple_getiter, so the check here is only to ensure that the self object is consistent. Hence use mp_check_self.
2016-08-14esp8266/mpconfigport.h: Enable support for all special methods.Paul Sokolovsky
2016-08-12tests: Rename zlibd_decompress.py -> uzlib_decompress.py.Paul Sokolovsky
To use the actual current name.
2016-08-12py: Get rid of assert() in method argument checking functions.Paul Sokolovsky
Checks for number of args removes where guaranteed by function descriptor, self checking is replaced with mp_check_self(). In few cases, exception is raised instead of assert.
2016-08-12py/objdict: Get rid of asserts (remove/replace with mp_check_self()).Paul Sokolovsky
2016-08-12py/runtime.h: Define mp_check_self(pred) helper macro.Paul Sokolovsky
Indended to replace raw asserts in bunch of files. Expands to empty if MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG is defined, otehrwise by default still to assert, though a particular port may define it to something else.
2016-08-12py/runtime: Factor out exception raising helpers.Paul Sokolovsky
Introduce mp_raise_msg(), mp_raise_ValueError(), mp_raise_TypeError() instead of previous pattern nlr_raise(mp_obj_new_exception_msg(...)). Save few bytes on each call, which are many.
2016-08-11stmhal/adc.c: Get ADC working on STM32L4 MCUs.Tobias Badertscher
Fixing Issue #2243. Main problems were: - HAL_ADC_GetState(adcHandle) may return other bits set (not only HAL_ADC_STATE_EOC_REG) when called - so I AND-ed it out as proposed by mattbrejza in Issue #2243. - ADC Pin has to be configured as GPIO_MODE_ANALOG_ADC_CONTROL not only GPIO_MODE_ANALOG. - Resolved ADC resolution L4 specific (Use L4 define ADC_RESOLUTION_12B). - Changed setting of Init.EOCSelection toADC_EOC_SINGLE_CONV for L4. - Added call to ADC_MultiModeTypeDef as this is done on a STM32Cube generated project too. - Clean up: Configuration of ADC is done only in ONE function not the same is done in two functions. Test is done on PA5 pin of STM32L4Discovery-Kit which is connected to the DOWN button. Thanks to mattbrejza for discovering the bug.
2016-08-11stmhal/boards: Update STM32L476 pin defs to include ADC channels.Damien George
This patch introduces proper ADC Pin definitions in stm32l476_af.csv. Originally provided by @tobbad.
2016-08-10unix/mpconfigport.h: Don't include stdio.h on MacOS.ilovezfs
Fixes build errors such as "../lib/utils/printf.c:43:5: error: expected parameter declarator"
2016-08-10docs/esp8266/intro: Add command to install esptool.py 1.0.1 via pip.Paul Sokolovsky
It used a standard BootROM programming algo and may be useful as a fallback.
2016-08-10tools/mpy-tool.py: Support freezing float literals with obj-repr C.Damien George
The tool now generates code for freezing floats in obj-repr A, B or C, with the specific representation detected at compile time using macros.
2016-08-10esp8266: PULL_UP is not supported on Pin(16), so raise an exception.Damien George
2016-08-10esp8266: Fix reading of pin object for GPIO16.Damien George
Pin(16) now works as an input.