Paul Sokolovsky
26a9b4d48e
unix/modjni: Factor out new_jobject(), jvalue2py() functions.
9 years ago
Tom Soulanille
7731edf2f5
stmhal: Add "opt" arg to pyb.main, to set mp_optimise_value.
Use this to set the global optimisation value when executing the main
script (and all scripts it imports).
9 years ago
Damien George
229b908d2e
esp8266: Remove "time" command from deploy target.
9 years ago
Damien George
3ca84026db
unix: Enable REPL auto-indent.
9 years ago
Damien George
0af73014cc
lib/mp-readline: Add auto-indent support.
4 spaces are added at start of line to match previous indent, and if
previous line ended in colon.
Backspace deletes 4 space if only spaces begin a line.
Configurable via MICROPY_REPL_AUTO_INDENT. Disabled by default.
9 years ago
Paul Sokolovsky
4e7bde8c9e
unix/modjni: Factor out py2jvalue() function.
9 years ago
Dave Hylands
9d6128acdc
stmhal: fix single precision float printing error
Fixes #1435 .
9 years ago
Paul Sokolovsky
e79c6b6312
unix/modjni: "jni" module to interface to JNI-compliant JavaVM.
This includes Android Dalvik VM for example.
Example usage:
import jni
System = jni.cls("java/lang/System")
System.out.println("Hello, Java!")
9 years ago
Daniel Campora
f352fe82a5
tests/wipy: Add I2C tests.
9 years ago
Daniel Campora
d265df589e
tests/wipy: Disable the REPL on UART before running the UART test.
9 years ago
Daniel Campora
7c87747db0
cc3200: Disable some uPy features in debug mode to help code fit.
9 years ago
Daniel Campora
425958b616
cc3200: Add SDcard pin af on index 8.
9 years ago
Daniel Campora
4cc0cd6cab
tests/wipy: Additional tests for when the UART is un-initialized.
9 years ago
Daniel Campora
d936317143
cc3200: New I2C API.
9 years ago
Daniel Campora
359b4e9ed9
cc3200: Refactor pin af assigment functions.
9 years ago
Daniel Campora
1d399c3c88
cc3200: Improve file system check routine.
9 years ago
Daniel Campora
4d7fa05b43
cc3200: Improve Pin and UART implementation.
Deassign pins af before assigning. Make uart.any() return the
correct value everytime, this requires interrupts to be always
enabled.
9 years ago
Daniel Campora
4054c4eadd
cc3200: Remove I2C inline documentation (sphinx is on the lead).
9 years ago
Daniel Campora
f8b98d8329
tests/wipy: Improve UART tests with no pin assignment case.
9 years ago
Daniel Campora
88ca6c94d9
tests: Ignore exception chain test on the WiPy.
Fails because warnings are not enabled on the CC3200.
9 years ago
Daniel Campora
f91f212d9f
cc3200: New UART API plus related test.
9 years ago
Daniel Campora
36821d095a
cc3200: Add alternate functions list to Pin object.
Also remove pin.high() and pin.low() methods.
9 years ago
Daniel Campora
d5e256486e
cc3200: Re-work Pin class according to the new API.
Also add relevant test.
9 years ago
Daniel Campora
42054c3cad
cc3200: Add mphal error to raise hardware related exceptions.
9 years ago
Daniel Campora
598aad2140
cc3200: Fix bug in pybsleep remove.
9 years ago
Daniel Campora
475c60eefc
cc3200: Add alt param to Pin constructor.
9 years ago
Daniel Campora
86854c7071
cc3200: Adapt smoke.py for the new pin API.
9 years ago
Daniel Campora
e3f8777ee8
cc3200: Implement new Pin API.
9 years ago
Daniel Campora
ec8589e4c9
cc3200: Improve uniflash script and make it a bit more verbose.
9 years ago
Daniel Campora
b864e7afe4
cc3200: Remove the UART0 programming pins from the smoke test.
9 years ago
Damien George
75a811a6df
tests: Move int+unicode test to unicode-specific test directory.
9 years ago
Damien George
2b000474d9
py/lexer: Properly classify floats that look like hex numbers.
Eg 0e0 almost looks like a hex number but in fact is a float.
9 years ago
Damien George
0be3c70cd8
py/lexer: Raise SyntaxError when unicode char point out of range.
9 years ago
Damien George
081f9325f5
py/lexer: Raise NotImplError for unicode name escape, instead of assert.
9 years ago
Damien George
a7ffa972f3
tests: Add tests for non-compliant behaviour of lexer.
9 years ago
Damien George
558a016e2c
py/compile: Refine SyntaxError for repeated use of global/nonlocal.
9 years ago
Damien George
3a2171e406
py: Eliminate some cases which trigger unused parameter warnings.
9 years ago
Damien George
42cec5c893
py/objstr: Check for keyword args before checking for no posn args.
Otherwise something like bytes(abc=123) will succeed.
9 years ago
Damien George
55b11e6d38
py/objstr: For str.endswith(s, start) raise NotImpl instead of assert.
9 years ago
Damien George
0b7a66ab97
py/objbool: Simplify dispatch of bool binary op.
This optimises (in speed and code size) for the common case where the
binary op for the bool object is supported. Unsupported binary ops
still behave the same.
9 years ago
Damien George
ea5b59bfe6
py/compile: Only compile function annotations if really needed.
Function annotations are only needed when the native emitter is enabled
and when the current scope is emitted in viper mode. All other times
the annotations can be skipped completely.
9 years ago
Tony Abboud
8d8fdcb4be
stmhal: add option to query for the current usb mode
Fetch the current usb mode and return a string representation when
pyb.usb_mode() is called with no args. The possible string values are interned
as qstr's. None will be returned if an incorrect mode is set.
9 years ago
Damien George
821b7f22fe
py: Use mp_not_implemented consistently for not implemented features.
9 years ago
Damien George
25afc7da0d
tests: Add tests to improve coverage of objstr.c.
9 years ago
Damien George
e2aa117798
py/objstr: Simplify printing of bytes objects when unicode enabled.
9 years ago
Damien George
516982242d
py: Inline single use of mp_obj_str_get_len in mp_obj_len_maybe.
Gets rid of redundant double check for string type.
Also remove obsolete declaration of mp_obj_str_get_hash.
9 years ago
Paul Sokolovsky
8bf00084b6
py: Make "enumerate" qstr be conditional on MICROPY_PY_BUILTINS_ENUMERATE.
9 years ago
Damien George
81794fcd31
py/binary: Add support for array('q') and array('Q').
9 years ago
Damien George
22602cc37b
py/objstr: Make str.rsplit(None,n) raise NotImpl instead of assert(0).
9 years ago
Paul Sokolovsky
1b693543aa
tests: Skip exception_chain.py with native emitter.
9 years ago