- 12 Aug, 2014 5 commits
-
-
Damien George authored
Also fixes compiler error in moductypes when compiled without debugging. Addresses issue #778.
-
Damien George authored
-
Damien George authored
Can now index ranges with integers and slices, and reverse ranges (although reversing is not very efficient). Not sure how useful this stuff is, but gets us closer to having all of Python's builtins.
-
Damien George authored
reversed function now implemented, and works for tuple, list, str, bytes and user objects with __len__ and __getitem__. Renamed mp_builtin_len to mp_obj_len to make it publically available (eg for reversed).
-
Damien George authored
-
- 11 Aug, 2014 3 commits
-
-
Damien George authored
Saves code bytes and makes it faster, so why not?
-
Damien George authored
-
Paul Sokolovsky authored
Fixes #795.
-
- 10 Aug, 2014 12 commits
-
-
Damien George authored
-
Damien George authored
Thanks to David Siorpaes.
-
Paul Sokolovsky authored
Similar to other methods and following CPython3 strictness.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
This happens for example for zero-size arrays. As .get_buffer() method now has explicit return value, it's enough to distinguish success vs failure of getting buffer.
-
Paul Sokolovsky authored
-
- 09 Aug, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
-
- 08 Aug, 2014 11 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
Addresses some issues from #585.
-
Damien George authored
-
Damien George authored
-
Damien George authored
Trying to move towards consistency, let's use _ exclusively in names of source files (eg .c, .h, .csv).
-
Damien George authored
-
Damien George authored
-
-
Damien George authored
This was a nasty bug to track down. It only had consequences when the heap size was just the right size to expose the rounding error in the calculation of the finaliser table size. And, a script had to allocate a small (1 or 2 cell) object at the very end of the heap. And, this object must not have a finaliser. And, the initial state of the heap must have been all bits set to 1. All these conspire on the pyboard, but only if your run the script fresh (so unused memory is all 1's), and if your script allocates a lot of small objects (eg 2-char strings that are not interned).
-
Dave Hylands authored
Converts generted pins to use qstrs instead of string pointers. This patch also adds the following functions: pyb.Pin.names() pyb.Pin.af_list() pyb.Pin.gpio() dir(pyb.Pin.board) and dir(pyb.Pin.cpu) also produce useful results. pyb.Pin now takes kw args. pyb.Pin.__str__ now prints more useful information about the pin configuration. I found the following functions in my boot.py to be useful: ```python def pins(): for pin_name in dir(pyb.Pin.board): pin = pyb.Pin(pin_name) print('{:10s} {:s}'.format(pin_name, str(pin))) def af(): for pin_name in dir(pyb.Pin.board): pin = pyb.Pin(pin_name) print('{:10s} {:s}'.format(pin_name, str(pin.af_list()))) ```
-
- 07 Aug, 2014 1 commit
-
-
Damien George authored
Before this patch, eg, 1 << 75 (or any large multiple of 15) was setting the MSB in the digits, which is outside the valid range of DIG_MASK.
-
- 06 Aug, 2014 4 commits
-
-
Damien George authored
This patch updates ST's HAL to the latest version, V1.3.0, dated 19 June 2014. Files were copied verbatim from the ST package. Only change was to suppress compiler warning of unused variables in 4 places. A lot of the changes from ST are cosmetic: comments and white space. Some small code changes here and there, and addition of F411 header. Main code change is how SysTick interrupt is set: it now has a configuration variable to set the priority, so we no longer need to work around this (originall in system_stm32f4xx.c).
-
Damien George authored
Addresses issue #780.
-
Damien George authored
Specifically, teensy port does not have these macros defined.
-
Damien George authored
-
- 05 Aug, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
Addresses issue #790.
-