- 25 Aug, 2014 3 commits
-
-
Dave Hylands authored
I also removed trailing spaces from modpyb.c which affected a couple of lines technically not part of this patch. Tested using: https://github.com/dhylands/upy-examples/blob/master/micros_test.py which eventually fails due to wraparound issues (I could fix the test to compensate but didn't bother)
-
Damien George authored
These functions are generally 1 machine instruction, and are used in critical code, so makes sense to have them inline. Also leave these functions uninverted (ie 0 means enable, 1 means disable) and provide macro constants if you really need to distinguish the states. This makes for smaller code as well (combined with inlining). Applied to teensy port as well.
-
Dave Hylands authored
Factored irq functions into a separate file.
-
- 24 Aug, 2014 5 commits
-
-
Damien George authored
-
Dave Hylands authored
Added some functions to Pin class to query mode, pull, and af
-
Damien George authored
Also added test for modtime.
-
Dave Hylands authored
Now you can use time.localtime on the timestamps presented by os.stat
-
Damien George authored
Because (for Thumb) a function pointer has the LSB set, pointers to dynamic functions in RAM (eg native, viper or asm functions) were not being traced by the GC. This patch is a comprehensive fix for this. Addresses issue #820.
-
- 16 Aug, 2014 4 commits
-
-
Dave Hylands authored
This basically shrinks the remaining size of flash in the portion that goes after the internal flash drive.
-
Damien George authored
It's still "safe" because no scripts are run. Remove the SD card if you want to access the internal flash filesystem. Addresses issue #616. Also: remove obsolete pyb.source_dir setting, and reset pyb.main and pyb.usb_mode settings on soft-reset.
-
Damien George authored
-
Damien George authored
Saves over 35k ROM due to elimination of unused HAL functions. All tests pass. Addresses issue #702.
-
- 13 Aug, 2014 1 commit
-
-
Damien George authored
-
- 12 Aug, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
Also fixes compiler error in moductypes when compiled without debugging. Addresses issue #778.
-
- 10 Aug, 2014 3 commits
-
-
Damien George authored
Thanks to David Siorpaes.
-
Damien George authored
-
Damien George authored
-
- 09 Aug, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
-
- 08 Aug, 2014 5 commits
-
-
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
-
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()))) ```
-
- 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.
-
- 04 Aug, 2014 2 commits
-
-
Damien George authored
Make a clearer distinction between init functions that must be done before any scripts can run (xxx_init0) and those that can be safely deferred (xxx_init). Fix bug initialising USB VCP exception. Addresses issue #788. Re-order some init function to improve reliability of reset/soft-reset.
-
Damien George authored
qstr_init is always called exactly before mp_init, so makes sense to just have mp_init call it. Similarly with mp_init_emergency_exception_buf. Doing this makes the ports simpler and less error prone (ie they can no longer forget to call these).
-
- 03 Aug, 2014 1 commit
-
-
Damien George authored
-
- 02 Aug, 2014 3 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
Written in Python, not currently working. See issue #725.
-
- 01 Aug, 2014 1 commit
-
-
Dave Hylands authored
-
- 31 Jul, 2014 2 commits
-
-
Damien George authored
Some important changes to the way the file system is structured on the pyboard: 1. 0: and 1: drive names are now replaced with POSIX inspired directories, namely /flash and /sd. 2. Filesystem now supports the notion of a current working directory. Supports the standard Python way of manipulating it: os.chdir and os.getcwd. 3. On boot up, current directory is /flash if no SD inserted, else /sd if SD inserted. Then runs boot.py and main.py from the current dir. This is the same as the old behaviour, but is much more consistent and flexible (eg you can os.chdir in boot.py to change where main.py is run from). 4. sys.path (for import) is now set to '' (current dir), plus /flash and /flash/lib, and then /sd and /sd/lib if SD inserted. This, along with CWD, means that import now works properly. You can import a file from the current directory. 5. os.listdir is fixed to return just the basename, not the full path. See issue #537 for background and discussion.
-
Damien George authored
Addresses issue #724.
-