summaryrefslogtreecommitdiff
path: root/esp8266
AgeCommit message (Collapse)Author
2018-05-03handle bad power on reset betterDan Halbert
2018-04-06esp8266/etshal: delete incorrect function prototypesJeff Epler
these are function prototypes not used in circuitpython. The declarations began to conflict with ones in the upstream SDK at some point, so delete them.
2018-04-06esp8266/esp8266_common.ld: Put .text of more libs into .irom0.text .Paul Sokolovsky
Recent vendor SDKs ship libs with code in .text section, which previously was going into .irom0.text. Adjust the linker script to route these sections back to iROM (follows upstream change).
2018-02-23Remove obsolete periphal drivers in esp moduleDan Halbert
2017-12-05Introduce reset mechanics to microcontroller.Scott Shawcroft
This allows one to configure how a subsequent reset will behave and also trigger a reset. Fixes #350 and fixes #173
2017-12-05add SPI.write_readinto() to esp8266 portDan Halbert
2017-11-06esp8266 enable framebuf (#408)jerryneedell
enable framebuf for ESP8266
2017-10-16esp8266: add neopixel_write - remove neopixel.py (#339)jerryneedell
For ESP8266, remove frozen module neopixel.py and add neopixel_write to mpconfigport.h. Use [Adafruit_CircuitPython_Neopixel/neopixel.py](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel) instead.
2017-10-16Merge pull request #336 from tannewt/2.xDan Halbert
esp8266: Correct SPI functionality when write_value is provided.
2017-10-16esp8266: Actually disable pins when reset on reload.Scott Shawcroft
2017-10-16esp8266: Correct SPI functionality when write_value is provided.Scott Shawcroft
It used to introduce extra clocks to the bus rather than changing the value output. This fixes SD cards.
2017-10-03Do not allow a *io object to be used after deinit().Dan Halbert
Fixes #278, #277, #276, #275.
2017-09-02esp8266: restore machine moduleDan Halbert
2017-09-01Fix issue #207, esp8266 file operations problems (#222)Dan Halbert
The frozen module `_boot.py` was not being loaded on restart because `pyexec_frozen_module()` did not know about the new `.frozen` pseudo-directory. Updated lower-level routine to look in the right place. Also made ".frozen" and related values be `#define`s.
2017-08-31Add ".frozen" to end of sys.path, so that internal frozen modules are ↵Dan Halbert
visible on boot.
2017-08-31Add microcontroller.cpu.temperature, for use as a simple sensor on minimal ↵Dan Halbert
boards. (#211) * Add microcontroller.cpu, the sole instance of microcontroller.Processor. microcontroller.cpu.frequency is the clock frequency, in Hz. microcontroller.cpu.temperature is the reading from the internal temperature sensor, in Celsius. None if not available. * Squeeze firmware size by using -finline-limit. Otherwise non-Express builds were slightly too big. * Update submodules. * Fix documentation glitches
2017-08-27Modernize module and class static dicts; update freetouchDan Halbert
2017-08-25Initial merge of micropython v1.9.2 into circuitpython 2.0.0 (in ↵Dan Halbert
development) master. cpx build compiles and loads and works in repl; test suite not run yet esp8266 not tested yet
2017-08-21esp8266: Fix UART stop bit constants.Ein Terakawa
As per the "ESP8266 Technical Reference".
2017-08-21all: Make static dicts use mp_rom_map_elem_t type and MP_ROM_xxx macros.Damien George
2017-08-13all: Raise exceptions via mp_raise_XXXJavier Candeira
- Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
2017-08-11all: Make use of $(TOP) variable in Makefiles, instead of "..".Damien George
$(TOP) is defined in py/mkenv.mk and should be used to refer to the top level of this repository.
2017-08-11minimal,esp8266,pic16bit: Remove unused stmhal include from Makefile.Damien George
2017-08-07esp8266: Introduce `multiterminal` module for managing a secondaryScott Shawcroft
serial connection such as WebREPL. Fixes #181.
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-07-30esp8266: Convert to mp_rom_map_elem_t.Paul Sokolovsky
2017-07-30esp8266/modesp: Remove unused constants: STA_MODE, etc.Paul Sokolovsky
WiFi mode selection happens on the level of individual interfaces.
2017-07-22esp8266: fix "uos" includesGirts Folkmanis
Fix couple places in startup scripts that still had "import uos". This would cause an exception when _boot.py was executed during startup.
2017-07-19esp8266/mpconfigport.h: Make socket a weak linkAlex Robbins
This way it can be overridden by a socket module in Python, as in other ports.
2017-07-19all: Remove trailing spaces, per coding conventions.Damien George
2017-07-18all: Unify header guard usage.Alexander Steffen
The code conventions suggest using header guards, but do not define how those should look like and instead point to existing files. However, not all existing files follow the same scheme, sometimes omitting header guards altogether, sometimes using non-standard names, making it easy to accidentally pick a "wrong" example. This commit ensures that all header files of the MicroPython project (that were not simply copied from somewhere else) follow the same pattern, that was already present in the majority of files, especially in the py folder. The rules are as follows. Naming convention: * start with the words MICROPY_INCLUDED * contain the full path to the file * replace special characters with _ In addition, there are no empty lines before #ifndef, between #ifndef and one empty line before #endif. #endif is followed by a comment containing the name of the guard macro. py/grammar.h cannot use header guards by design, since it has to be included multiple times in a single C file. Several other files also do not need header guards as they are only used internally and guaranteed to be included only once: * MICROPY_MPHALPORT_H * mpconfigboard.h * mpconfigport.h * mpthreadport.h * pin_defs_*.h * qstrdefs*.h
2017-07-04esp8266/mpconfigport_512k: Use terse error messages to get 512k to fit.Damien George
2017-06-28shared-bindings: Introduce storage.remount() so you can set root asScott Shawcroft
writeable and prevent USB from editing it.
2017-06-28esp8266,minimal,pic16bit: Use size_t for mp_builtin_open argument.Alexander Steffen
py/builtin.h declares mp_builtin_open with the first argument of type size_t. Make all implementations conform to this declaration.
2017-06-27Introduce a random module that is a subset of CPython's random. ItScott Shawcroft
also initializes in the same way where it takes from a true random source when available through os.urandom(). After initializing, it produces deterministic results until the seed is set. This replaces urandom! Fixes #139.
2017-06-27Split uos module into os and storage.Scott Shawcroft
os is a subset of CPython's os. storage contains additional file system mounting functionality based on UNIX's mount management. Fixes #140
2017-06-26esp8266/machine_rtc: Use correct arithmetic for aligning RTC mem len.Damien George
2017-06-24esp8266/README: Make "Documentation" a top-level section.Paul Sokolovsky
2017-06-23esp8266: Enable MICROPY_ENABLE_FINALISER.Paul Sokolovsky
GC finalization should be enabled for modlwip, or it may lead to GC problems with socket objects. This decreases usable heap size from 36288 to 35968 (-320) bytes.
2017-06-22esp8266: Move mp_hal_pin_open_drain from esp_mphal.c to machine_pin.c.Damien George
It belongs with the other pin config functions in machine_pin.c. Also, esp_mphal.c is put in iRAM so this change saves about 300 bytes of iRAM (and mp_hal_pin_open_drain is not a time critical function so doesn't need to be in iRAM).
2017-06-22esp8266: Reinstate 1-wire scripts by sym-linking to drivers/onewire/.Damien George
No changes have been made to the code, the files just moved.
2017-06-22drivers/onewire: Move onewire.py, ds18x20.py from esp8266 to drivers.Damien George
These drivers can now be used by any port (so long as that port has the _onewire driver from extmod/modonewire.c). These drivers replace the existing 1-wire and DS18X20 drivers in the drivers/onewire directory. The existing ones were pyboard-specific and not very efficient nor minimal (although the 1-wire driver was written in pure Python it only worked at large enough CPU frequency). This commit brings backwards incompatible API changes to the existing 1-wire drivers. User code should be converted to use the new drivers, or check out the old version of the code and keep a local copy (it should continue to work unchanged).
2017-06-22extmmod/modonewire: Rename public module to mp_module_onewire.Damien George
This follows naming scheme of other modules in extmod.
2017-06-22extmod: Move modonewire.c from esp8266 to extmod directory.Damien George
It's now generic enough to be used by any port.
2017-06-22esp8266/modonewire: Make timings static and remove onewire.timings func.Damien George
The 1-wire bus is defined with fixed timings so there should be no need to change them dynamically at runtime. Making the timings fixed saves about 270 bytes of code and 20 bytes of RAM.
2017-06-22esp8266/modonewire: Move low-level 1-wire bus code to modonewire.c.Damien George
The reason it was separated is so that the low-level code could be put in iRAM, for timing reasons. But: 1. Tests show that it's not necessary to have this code in iRAM for it to function correctly, and taking it out of iRAM reclaims some of that precious resource. Furthermore, even though these functions were in iRAM there were some functions that it called (eg pin get/set functions) which were not in iRAM, so partially defeated the purpose of putting the 1-wire code in iRAM. 2. It's easier to reuse this 1-wire code in other ports if it's in a single file. 3. If it turns out that certain code does need to be in iRAM then one can use the MP_FASTCODE macro to do that.
2017-06-20Merge tag 'v1.9.1'2.0.0-alpha.0Scott Shawcroft
Fixes for stmhal USB mass storage, lwIP bindings and VFS regressions This release provides an important fix for the USB mass storage device in the stmhal port by implementing the SCSI SYNCHRONIZE_CACHE command, which is now require by some Operating Systems. There are also fixes for the lwIP bindings to improve non-blocking sockets and error codes. The VFS has some regressions fixed including the ability to statvfs the root. All changes are listed below. py core: - modbuiltins: add core-provided version of input() function - objstr: catch case of negative "maxsplit" arg to str.rsplit() - persistentcode: allow to compile with complex numbers disabled - objstr: allow to compile with obj-repr D, and unicode disabled - modsys: allow to compile with obj-repr D and PY_ATTRTUPLE disabled - provide mp_decode_uint_skip() to help reduce stack usage - makeqstrdefs.py: make script run correctly with Python 2.6 - objstringio: if created from immutable object, follow copy on write policy extmod: - modlwip: connect: for non-blocking mode, return EINPROGRESS - modlwip: fix error codes for duplicate calls to connect() - modlwip: accept: fix error code for non-blocking mode - vfs: allow to statvfs the root directory - vfs: allow "buffering" and "encoding" args to VFS's open() - modframebuf: fix signed/unsigned comparison pendantic warning lib: - libm: use isfinite instead of finitef, for C99 compatibility - utils/interrupt_char: remove support for KBD_EXCEPTION disabled tests: - basics/string_rsplit: add tests for negative "maxsplit" argument - float: convert "sys.exit()" to "raise SystemExit" - float/builtin_float_minmax: PEP8 fixes - basics: convert "sys.exit()" to "raise SystemExit" - convert remaining "sys.exit()" to "raise SystemExit" unix port: - convert to use core-provided version of built-in import() - Makefile: replace references to make with $(MAKE) windows port: - convert to use core-provided version of built-in import() qemu-arm port: - Makefile: adjust object-file lists to get correct dependencies - enable micropython.mem_*() functions to allow more tests stmhal port: - boards: enable DAC for NUCLEO_F767ZI board - add support for NUCLEO_F446RE board - pass USB handler as parameter to allow more than one USB handler - usb: use local USB handler variable in Start-of-Frame handler - usb: make state for USB device private to top-level USB driver - usbdev: for MSC implement SCSI SYNCHRONIZE_CACHE command - convert from using stmhal's input() to core provided version cc3200 port: - convert from using stmhal's input() to core provided version teensy port: - convert from using stmhal's input() to core provided version esp8266 port: - Makefile: replace references to make with $(MAKE) - Makefile: add clean-modules target - convert from using stmhal's input() to core provided version zephyr port: - modusocket: getaddrinfo: Fix mp_obj_len() usage - define MICROPY_PY_SYS_PLATFORM (to "zephyr") - machine_pin: use native Zephyr types for Zephyr API calls docs: - machine.Pin: remove out_value() method - machine.Pin: add on() and off() methods - esp8266: consistently replace Pin.high/low methods with .on/off - esp8266/quickref: polish Pin.on()/off() examples - network: move confusingly-named cc3200 Server class to its reference - uos: deconditionalize, remove minor port-specific details - uos: move cc3200 port legacy VFS mounting functions to its ref doc - machine: sort machine classes in logical order, not alphabetically - network: first step to describe standard network class interface examples: - embedding: use core-provided KeyboardInterrupt object
2017-06-20esp8266: Make onewire module and support code usable by other ports.Damien George
2017-06-20esp8266/Makefile: Add LIB_SRC_C variable to qstr auto-extraction list.Damien George
2017-06-16shared-bindings: Move enum-like classes out of DigitalInOut into digitalio.Scott Shawcroft
Also, rename Direction.IN to Direction.INPUT and Direction.OUT to Direction.OUTPUT. This simplifies using them. Prior to the nativeio split this would have led to clutter in the top-level namespace but having digitalio prevents this. Fixes #152