Damien George
64c5a9435c
docs/library/machine.WDT: Add note that WDT is only available on WiPy.
8 years ago
Damien George
567e7fcd12
tests/run-tests: Disable thread/thread_lock4.py on Travis.
It has reliability issues that need to be worked out.
8 years ago
Paul Sokolovsky
244332df9f
extmod/uzlib/: Update uzlib to v2.0.1.
Fixes for pedantic compiler warnings.
8 years ago
Paul Sokolovsky
a6fc90f92a
tests/uzlib_decompress: Actually test raw DEFLATE stream.
8 years ago
Paul Sokolovsky
ed4ce196ed
extmod/moduzlib: Refactor to new stream-compatible uzlib 2.0 API.
8 years ago
Paul Sokolovsky
ff1c2b03a9
extmod/uzlib/: Update uzlib to v2.0.
New API supporting stream decompression.
8 years ago
Damien George
bb19e7b94b
tests/basics/special_methods: Enable tests for extra special methods.
These additional special methods are enabled on most ports so we can test
them in this test.
8 years ago
Damien George
f003310dee
qemu-arm: Enable MICROPY_PY_ALL_SPECIAL_METHODS.
The qemu-arm port is for testing, so should have features enabled.
8 years ago
rguillon
ed6a1ada24
tests/basics: Add a test file for overriding special methods.
8 years ago
Paul Sokolovsky
d2cc7c720b
extmod/modwebrepl: set_password(): Raise exception for too long password.
8 years ago
Damien George
095e43a9a5
py/sequence: Allow to use bignums as indices in slice objects.
See issue #2264 .
8 years ago
Damien George
f6a8e84a25
tests/basics: Add test for break from within try within a for-loop.
8 years ago
Damien George
675d1c9c60
ports: Remove typedef of machine_ptr_t, it's no longer needed.
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.
8 years ago
Damien George
41fceae559
py/obj.h: For obj reprs A,B,C use void* explicitly for mp_obj_t typedef.
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.
8 years ago
Damien George
b359cf2911
tests/misc/non_compliant: Add tests to improve coverage testing.
8 years ago
Damien George
d5f42c9daf
tests/basics: Add more list tests to improve coverage testing.
8 years ago
Damien George
3c82d1d34b
tests/basics: Add more tuple tests to improve coverage testing.
8 years ago
Damien George
2196799051
py/objstr: Use mp_raise_{Type,Value}Error instead of mp_raise_msg.
This patch does further refactoring using the new mp_raise_TypeError
and mp_raise_ValueError functions.
8 years ago
Damien George
1a0d3fd632
py/runtime.h: Move comment about mp_not_implemented to correct place.
8 years ago
Damien George
4aaa5adf9f
py/objtuple: In tuple_cmp_helper, use mp_check_self instead of raising.
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.
8 years ago
Paul Sokolovsky
9cf2949356
esp8266/mpconfigport.h: Enable support for all special methods.
8 years ago
Paul Sokolovsky
0be4a7712d
tests: Rename zlibd_decompress.py -> uzlib_decompress.py.
To use the actual current name.
8 years ago
Paul Sokolovsky
c4a8004933
py: Get rid of assert() in method argument checking functions.
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.
8 years ago
Paul Sokolovsky
83e0ebabb4
py/objdict: Get rid of asserts (remove/replace with mp_check_self()).
8 years ago
Paul Sokolovsky
8c50f93a41
py/runtime.h: Define mp_check_self(pred) helper macro.
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.
8 years ago
Paul Sokolovsky
9e1b61dedd
py/runtime: Factor out exception raising helpers.
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.
8 years ago
Tobias Badertscher
af9889f99a
stmhal/adc.c: Get ADC working on STM32L4 MCUs.
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.
8 years ago
Damien George
dfb8144037
stmhal/boards: Update STM32L476 pin defs to include ADC channels.
This patch introduces proper ADC Pin definitions in stm32l476_af.csv.
Originally provided by @tobbad .
8 years ago
ilovezfs
4e36dd570b
unix/mpconfigport.h: Don't include stdio.h on MacOS.
Fixes build errors such as
"../lib/utils/printf.c:43:5: error: expected parameter declarator"
8 years ago
Paul Sokolovsky
5e01fb01b3
docs/esp8266/intro: Add command to install esptool.py 1.0.1 via pip.
It used a standard BootROM programming algo and may be useful as a
fallback.
8 years ago
Damien George
72ae3c72c7
tools/mpy-tool.py: Support freezing float literals with obj-repr C.
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.
8 years ago
Damien George
8a15e0b1c7
esp8266: PULL_UP is not supported on Pin(16), so raise an exception.
8 years ago
Damien George
b203c1774e
esp8266: Fix reading of pin object for GPIO16.
Pin(16) now works as an input.
8 years ago
Paul Sokolovsky
2146cdab5e
docs/esp8266/tutorial/pins: Fix typo in commands for pin input mode.
8 years ago
Damien George
e4e4526954
docs: Bump version to 1.8.3.
8 years ago
Paul Sokolovsky
3c9510d767
esp8266/modules/flashbdev: Start filesystem at 0x90000.
To accommodate growing firmware.
8 years ago
Paul Sokolovsky
3372f69586
esp8266/esp8266.ld: Increase firmware image size to 0x90000 (576K).
Of them, 0x87000 is irom0 segment.
This is required to ship increasing number of modules and examples
developed in teh course of ESP8266 port project.
8 years ago
Paul Sokolovsky
6d11918d49
lib/berkeley-db-1.xx: Update, sets default page size to 4096.
This both good default for 4096 and makes less chance to see overflow page
issues.
8 years ago
Paul Sokolovsky
5c73de0337
docs/uio: Mention seek()/flush() support for io.BytesIO.
8 years ago
Paul Sokolovsky
3e5534caf7
docs/esp8266/intro: Focus on hazards of unearthed power wrt electronics.
8 years ago
Paul Sokolovsky
1bc2911174
py/mpconfig.h: Define MP_ALWAYSINLINE for reuse.
Similar to existing MP_NOINLINE.
8 years ago
Paul Sokolovsky
d2cab0b7be
docs/esp8266/tutorial/intro: Add anchor for link from quickeref.
8 years ago
Paul Sokolovsky
8897dcb2a1
tests/basics: bytes/str.partition/rpartition are now optional.
Skip tests if not available.
8 years ago
Paul Sokolovsky
f84dda7111
docs/esp8266/quickref: Link to installation instructions.
8 years ago
Paul Sokolovsky
a9923d190e
docs/esp8266/intro: Add troubleshooting section.
Tries to summarize most of the issues we've seen so far.
8 years ago
Paul Sokolovsky
919c54f750
docs/esp8266/intro: Rename to "Getting started" from "Introduction".
People tend to skip introductions (everyone knows what esp8266 is, right?),
so try to do A/B testing with a title inviting to read it.
8 years ago
Paul Sokolovsky
1966745689
esp8266/tutorial/intro: Reword para abou -fm dio switch.
Not all NodeMCU boards require it.
8 years ago
Paul Sokolovsky
31ad1bb606
esp8266/modmachine: Implement dummy sleep() function.
8 years ago
Paul Sokolovsky
541e76fa45
esp8266/modutime: Actually implement ticks_cpu().
8 years ago
Paul Sokolovsky
f71f37e426
esp8266/esp_mphal.h: Add mp_hal_ticks_cpu() for reuse.
8 years ago