Paul Sokolovsky
41809a1ced
nlrx86.S: Another ifdef for win32 symbol underscoring issues.
11 years ago
Paul Sokolovsky
b76fd842f0
unix mem_info(): Dump GC info only if it's enabled.
11 years ago
Damien George
643284fc8e
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
ff91156d34
stmhal: Improved configurability for I2C and SPI busses.
The HAL handles for the I2C/SPI objects are rather large, so we don't
want to unnecessarily include them.
11 years ago
Paul Sokolovsky
26905259d0
objarray: Slice subscription operation: properly test for op subtype.
Also, checked that both bytearray and array.array actually support generic
(a-la list) slice assignment and deletion. Added TODOs.
11 years ago
Paul Sokolovsky
5b991ae2d3
gc: gc_realloc(): Fix byte-to-block calculation.
11 years ago
Damien George
2b925d7696
Merge branch 'fix-netduino-i2c-spi' of github.com:dhylands/micropython into dhylands-fix-netduino-i2c-spi
11 years ago
Damien George
dde739d364
py, gc: Further simplify coding-style of gc_realloc.
No logic changes, just coding style to make it easy to read.
11 years ago
Damien George
5f6a25fc50
py: Wrap #if's around emitter functions that are used only by emitcpy.
3 emitter functions are needed only for emitcpy, and so we can #if them
out when compiling with emitcpy support.
Also remove unused SETUP_LOOP bytecode.
11 years ago
Damien George
3558f62fb5
py: Making closures now passes pointer to stack, not a tuple for vars.
Closed over variables are now passed on the stack, instead of creating a
tuple and passing that. This way memory for the closed over variables
can be allocated within the closure object itself. See issue #510 for
background.
11 years ago
Paul Sokolovsky
bc5f0c1977
objclosure: Store reference to entire closed variables tuple.
Avoids pointer-to-field garbage collection issue. Fixes #510 .
11 years ago
Paul Sokolovsky
2758b7d3e2
objcell: Add disabled by default print method for debugging.
11 years ago
Paul Sokolovsky
c86889dafb
gc: "new" gc_realloc: Rewrite in plain C, fixing bunch of bugs.
There were typos, various rounding errors trying to do concurrent counting
in bytes vs blocks, complex conditional paths, superfluous variables, etc.,
etc., all leading to obscure segfaults.
11 years ago
Paul Sokolovsky
ed162b5ef2
gc: Recover simple gc_realloc implementation, make easier to switch between.
11 years ago
Paul Sokolovsky
9fd02e186d
modsocket: Add setblocking() method.
11 years ago
Paul Sokolovsky
0f836ef893
modstruct: Add 'O' typecode for passing mp_obj_t.
Useful as callback data, etc.
11 years ago
Paul Sokolovsky
4e4fa94c4c
modstruct: Use proper int accessor which checks input value type.
11 years ago
Ilya Dmitrichenko
8e998ed280
modffi: Fix how we call `pkg-config`
11 years ago
Dave Hylands
f70630c58f
Fix i2c and spi to compile for Netduino Plus 2
11 years ago
Damien George
53775026e7
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
fd6925b4b9
stmhal: Small bug fixes and simplifications.
11 years ago
Damien George
f87b35e779
py: Fix mp_arg_parse_all.
11 years ago
Damien George
13c19c57a0
stmhal: Only init RNG if it's used.
11 years ago
Damien George
0a6e9f562f
stmhal: Update ExtInt to allow keyword arguments in constructor.
11 years ago
Damien George
57e415859a
stmhal: Tidy up and improve consistency across modules.
11 years ago
Damien George
d689430e79
stmhal: Add SPI class.
Also some updates to compile with latest changes to core py.
11 years ago
Damien George
c7c4a84397
stm: Update to compile with latest changes to core py.
11 years ago
Damien George
a3f94e0030
py: Add arg checking helper functions.
These are to assist in writing native C functions that take positional
and keyword arguments. mp_arg_check_num is for just checking the
number of arguments is correct. mp_arg_parse_all is for parsing
positional and keyword arguments with default values.
11 years ago
Paul Sokolovsky
efc36f0cea
test/class-super: Expose super() breakage.
11 years ago
Paul Sokolovsky
d6e12723ed
objarray: Implement slice subscription.
11 years ago
Paul Sokolovsky
9ae0912496
modffi: Update for MP_OBJ_STOP_ITERATION refactor.
11 years ago
Damien George
27dd471098
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
3d19137442
stmhal: Add pyb.Pin.init method to re-init GPIO pin mode.
11 years ago
Damien George
6e44381cce
stmhal: Improve RTC class; make fatfs use RTC for time stamping files.
11 years ago
Damien George
ed5117f6a8
stmhal: Add pyb.unique_id, to get unique id of MCU.
11 years ago
Paul Sokolovsky
206dd2a905
stmhal: Update for mp_binary_get_size() refactor.
11 years ago
Paul Sokolovsky
6204460461
modstruct: Initial implementation of struct.pack().
11 years ago
Paul Sokolovsky
504e23388c
objstr: Init hash in mp_obj_str_builder_start() to 0.
11 years ago
Paul Sokolovsky
4602b9a79f
obj.h: Typo fix in comment.
11 years ago
Paul Sokolovsky
1355cf42f2
modstruct: Fix .calcsize() to account for struct type/alignment.
11 years ago
Paul Sokolovsky
5695e07256
modstruct: Support 'q' & 'Q' type codes.
11 years ago
Paul Sokolovsky
752d2080b7
modffi: Mark 'p' type spec deprecated, replace with 'P'.
'p' in struct module is "pascal string". 'P' is void*.
11 years ago
Damien George
44ee42de50
stmhal: Rename pyb.Led to pyb.LED to conform to naming rules.
It's Light Emitting Diode, so should be LED.
11 years ago
Damien George
8cf08a58a1
stmhal: Remove pyb.input (use sys.stdio.read(1) instead).
11 years ago
Damien George
f20e093b9b
stmhal: Add lots of constants to stm module.
11 years ago
Damien George
561f83c9cf
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
38ae014e42
stmhal: Update ADC, DAC and I2C objects to use new buffer protocol.
Main reason for expanding buffer protocol API was to support writes to a
buffer in ADC module (see read_timed). With this change you can now
create an array of arbitrary type and ADC.read_timed will store into
that array in the correct format (byte, int, float). I wonder though if
all these changes were really worth it to support just this function.
Hopefully this enhanced buffer protocol API (with typecode specified)
will be used elsewhere.
11 years ago
Damien George
71e9bfa20d
py: Add mp_binary_set_val_array_from_int, to store an int directly.
11 years ago
Damien George
b11b85adaa
py: Allow to pass buffer protocol flags to get_buffer helper funcs.
11 years ago
Damien George
a8f5d15fc6
stmhal: Update help and comments re gpio changing to Pin.
11 years ago