- 21 Apr, 2016 3 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
Use the machine.deepsleep() function to enter the sleep mode. Use the RTC to configure the alarm to wake the device. Basic use is the following: import machine # configure RTC's ALARM0 to wake device from deep sleep rtc = machine.RTC() rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP) # do other things # ... # set ALARM0's alarm to wake after 10 seconds rtc.alarm(rtc.ALARM0, 10000) # enter deep-sleep state (system is reset upon waking) machine.deepsleep() To detect if the system woke from a deep sleep use: if machine.reset_cause() == machine.DEEPSLEEP_RESET: print('woke from deep sleep')
-
- 20 Apr, 2016 5 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
Flash size as seen by vendor SDK doesn't depend on real size, but rather on a particular value in firmware header, as put there by flash tool. That means it's user responsibility to know what flash size a particular device has, and specify correct parameters during flashing. That's not end user friendly however, so we try to make it "flash and play" by detecting real size vs from-header size mismatch, and correct the header accordingly.
-
Paul Sokolovsky authored
-
- 19 Apr, 2016 11 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
E.g. for stmhal, accumulated preprocessed output may grow large due to bloated vendor headers, and then reprocessing tens of megabytes on each build make take couple of seconds on fast hardware (=> potentially dozens of seconds on slow hardware). So instead, split once after each change, and only cat repetitively (guaranteed to be fast, as there're thousands of lines involved at most).
-
Paul Sokolovsky authored
Not stuff like "#pragma", etc.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
If make -B is run, the rule is run with $? empty. Extract fron all file in this case. But this gets fragile, really "make clean" should be used instead with such build complexity.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
When there're C files to be (re)compiled, they're all passed first to preprocessor. QSTR references are extracted from preprocessed output and split per original C file. Then all available qstr files (including those generated previously) are catenated together. Only if the resulting content has changed, the output file is written (causing almost global rebuild to pick up potentially renumbered qstr's). Otherwise, it's not updated to not cause spurious rebuilds. Related make rules are split to minimize amount of commands executed in the interim case (when some C files were updated, but no qstrs were changed).
-
Colin Hogben authored
A port which uses lib/utils/pyexec.c but which does not enable garbage collection should not need to implement the gc_collect function. This patch also moves the gc_collect call to after printing the qstr info. Since qstrs cannot be collected it should not make any difference to the printed statistics.
-
- 18 Apr, 2016 3 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
There's no space for it.
-
Paul Sokolovsky authored
Returns FlashROM size in bytes from vendor SDK's point of view, not physical size.
-
- 17 Apr, 2016 15 commits
-
-
Paul Sokolovsky authored
-
Damien George authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
Should be called to notify that current dupterm object has more input data to read.
-
Paul Sokolovsky authored
To use: .setsockopt(SOL_SOCKET, 20, lambda sock: print(sock)). There's a single underlying callback slot. For normal sockets, it serves as data received callback, for listening sockets - connection arrived callback.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
By skipping loading site.py, etc.
-
Damien George authored
This allows for better error messages, since the name of the file (sans .py) can now be printed when an exception occurs within a frozen script.
-
Damien George authored
-
Tobias Badertscher authored
-
Tobias Badertscher authored
-
Damien George authored
Original patch was authored by Tobias Badertscher / @tobbad, but it was reworked to split UART edits from USB edits.
-
Damien George authored
L4 does not have UART6, and has similar registers to the F7. Original patch was authored by Tobias Badertscher / @tobbad, but it was reworked to split UART edits from USB edits.
-
- 16 Apr, 2016 3 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Tobias Badertscher authored
-