puuu
cafdfb7af3
esp8266/modpybrtc: Handle RTC overflow.
ESP-SDK system_get_rtc_time() returns uint32 and therefore overflow
about every 7:45h. Let's write the last state of system_get_rtc_time()
in RTC mem and use it to check for overflow. This commit require running
pyb_rtc_get_us_since_2000() at least once within 7 hours to avoid
overflow.
9 years ago
Tobias Badertscher
1191ec6a14
stmhal/uart.c: Fix wrong baudrate calculation for stm32l4 series.
9 years ago
Radomir Dopieralski
43c8f545d2
drivers/display/ssd1306: update SSD1306_SPI to work with new API
Makes it work on the ESP8266.
9 years ago
Damien George
ddadbaed06
tests/misc/recursive_iternext.py: Increase depth N from 1000 to 2000.
This makes the test reliably overflow the recursion limit (which is the
correct behaviour) on Mac OS X.
9 years ago
Paul Sokolovsky
1bc8aa85a4
lib/timeutils/timeutils: Fix pedantic warning in coverage build.
9 years ago
Paul Sokolovsky
993cc3611a
lib/timeutils/timeutils: timeutils_mktime may accept negative time values.
And will normalize them.
9 years ago
Paul Sokolovsky
d8cc51ea2b
docs/esp8266/quickref: Update WebREPL section for 1.8.1 release.
WebREPL is much more stable now.
9 years ago
Damien George
ed4e5d2583
docs/library/index: Fix grammar and spelling in intro paragraph.
9 years ago
Marcel Stör
0b9725812e
docs/wipy/tutorial: Add note about screen key bindings on OS X.
9 years ago
Paul Sokolovsky
e456b2cc94
docs/README: Add some hints for PDF docs generation.
9 years ago
Paul Sokolovsky
09f764dc04
docs/library/index: Add intro paragraph regarding availability of modules.
This introductions makes explicit the fact that whenever possible,
the documentation describes full MicroPython functionality, and arbitrary
functions/classes/modules may be missing in a paricular port or build.
9 years ago
Paul Sokolovsky
9a1a49ceec
esp8266/general: Typo/grammar fixes.
9 years ago
Paul Sokolovsky
fdf45a718b
esp8266/quickref: Use local image of Adafruit Huzzah board.
Using remote image causes problems with tools (partly because the image
is semi-firewalled and can't be accessed by arbitrary tools).
9 years ago
Paul Sokolovsky
c4ab8895e8
docs: math, cmath: Add port availability information.
9 years ago
Paul Sokolovsky
1a05a59116
docs/math: Typo fix.
9 years ago
Damien George
927388e80e
esp8266: Provide a dedicated variable to disable ets_loop_iter.
So ets_loop_iter is now only disabled when using machine.disable_irq.
9 years ago
Damien George
752e952096
esp8266/rtc: Set RTC user memory length to 0 on first boot.
So that RTC.memory() returns b'' on power up if it was never set.
Fixes issue #2138 .
9 years ago
Robert HH
4f3fbf09cc
esp8266/moduos.c: Add stat() to the module uos of esp8266.
This implementation makes use of vfs.stat() and therefore has the same
properties. Known issues for all ports: uos.stat(".") on the top level
returns the error code 22, EINVAL. The same happens with
uos.stat("dirname/") where dirname IS the name of a directory.
9 years ago
Paul Sokolovsky
15eb1ce52d
esp8266: Enable MICROPY_PY_IO_FILEIO to get compliant text/binary streams.
9 years ago
Damien George
33168081f4
extmod/machine: Add MICROPY_PY_MACHINE_PULSE config for time_pulse_us.
Since not all ports that enable the machine module have the pin HAL
functions.
9 years ago
Damien George
cff2b7a6e3
esp8266/modmachine: Add machine.time_pulse_us function.
9 years ago
Damien George
93a9c2e840
docs/library/machine: Add documentation for machine.time_pulse_us.
9 years ago
Damien George
4940bee62a
extmod: Add machine time_pulse_us function (at C and Python level).
The C implementation is taken from the DHT driver.
9 years ago
Paul Sokolovsky
298c2ae2c7
extmod/vfs_fat: Mark anused "self" arg for fat_vfs_stat().
9 years ago
Peter Hinch
641300dccb
stmhal/dac: DAC deinit() method added.
9 years ago
Robert HH
ee009d713a
extmod/vfs_fat.c: Add vfs.stat().
The call to stat() returns a 10 element tuple consistent to the os.stat()
call. At the moment, the only relevant information returned are file
type and file size.
9 years ago
Tomas R
7d4fd8b6db
docs/esp8266/general: Remove duplicate phrase.
9 years ago
Paul Sokolovsky
225562d915
esp8266/scripts/ntptime: Allow to override NTP server.
This is not part of public API, variable name may change, or it can be
replaced with a function.
9 years ago
Paul Sokolovsky
480159ca8b
extmod/vfs_fat: getcwd(): Use mp_obj_new_exception_arg1().
Copy-paste issue, with the original mistake in stmhal.
9 years ago
Paul Sokolovsky
2503b59592
stmhal/moduos: getcwd(): Use mp_obj_new_exception_arg1().
Argument types were converted, but old function call of
mp_obj_new_exception_msg_varg() remained.
9 years ago
Paul Sokolovsky
12401f337e
esp8266/moduos: Add chdir() and getcwd() functions.
9 years ago
Paul Sokolovsky
f0eea1fdf9
tests/extmod/vfs_fat_ramdisk: Add testcases for chdir(), getcwd().
9 years ago
Paul Sokolovsky
ee5e3f6527
extmod/vfs_fat: chdir(), getcwd() methods should accept VFS object (self).
9 years ago
Paul Sokolovsky
cac6c9704e
extmod/vfs_fat: Add getcwd() method.
Ported from stmhal.
9 years ago
Paul Sokolovsky
f12146cbf6
extmod/vfs_fat: Add chdir() method.
Ported from stmhal.
9 years ago
Damien George
602305b211
esp8266/uart: Properly initialise UART0 RXD pin in uart_config.
Tested and seems to work. See #1995 .
9 years ago
Damien George
6707fc94ae
esp8266/modnetwork: Allow to press ctrl-C while scan() is running.
Ctrl-C will raise a KeyboardInterrupt and stop the scan (although it will
continue to run in the background, it won't report anything). If
interrupted, and another scan() is started before the old one completes
in the background, then the second scan will fail with an OSError.
9 years ago
Damien George
84381fa0fc
esp8266/modnetwork: Protect scan() callback against memory errors.
scan() allocates memory so may cause an exception to be raised.
9 years ago
Damien George
55df14f1a4
esp8266/modnetwork: scan() is only supported by STA when it's enabled.
9 years ago
Damien George
715ee9d925
py/modstruct: Allow to have "0s" in struct format.
9 years ago
Paul Sokolovsky
282d81a40e
README: "quick build": Use "make axtls" after all.
"make deplibs" also builds libffi, and that requires GNU autotools. As
we use host libffi by default, skip requiring users to build it for now.
9 years ago
Paul Sokolovsky
4889b6ff9b
unix/Makefile: "make axtls": Automatically fetch submodules if missing.
Try to emulate "you can build without reading instructions" behavior as far
as possible.
9 years ago
Paul Sokolovsky
e66b3042d6
README: Add "make deplibs" to quick build section.
9 years ago
Paul Sokolovsky
6055d411a9
unix/mpconfigport.mk: Document MICROPY_STANDALONE make-level option.
Avoid using system libraries, use copies bundled with MicroPython as
submodules (currently affects only libffi, other dependencies either
already used as bundled-only (axtls), or can't be bundled (so far),
like libjni).
9 years ago
Paul Sokolovsky
cbe544a76d
tools: Upgrade upip to 0.7.
SSL certificate warning, switch to uerrno, and better usage message.
9 years ago
Paul Sokolovsky
2ec0ee082a
py/moduerrno: Add ECONNREFUSED, one of frequent networking errors.
9 years ago
Robert HH
7c004e794c
extmod/vfs_fat*: Replace text error messages by POSIX error numbers.
These changes are in line with similar changes in other modules, and
with standard Python interface.
9 years ago
Paul Sokolovsky
751e3b7a82
extmod/virtpin: Initial implementation of open-ended C-level Pin interface.
Using usual method of virtual method tables. Single virtual method,
ioctl, is defined currently for all operations. This universal and
extensible vtable-based method is also defined as a default MPHAL
GPIO implementation, but a specific port may override it with its
own implementation (e.g. close-ended, but very efficient, e.g. avoiding
virtual method dispatch).
9 years ago
Paul Sokolovsky
74e6c0337d
esp8266/Makefile: Document "disable" value for UART_OS.
9 years ago
Damien George
7ebfe09fbd
esp8266: Add dht.py script for high-level control of DHT11/DHT22 sensor.
TODO: should go in a more port-neutral place, like drivers/dht, but at the
moment in relies on specific esp module.
9 years ago