summaryrefslogtreecommitdiff
path: root/esp8266/modesp.c
AgeCommit message (Collapse)Author
2017-09-06ports: Make new ports/ sub-directory and move all ports there.Damien George
This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
2017-08-30all: Convert remaining "mp_uint_t n_args" to "size_t n_args".Damien George
This is to have consistency across the whole repository.
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-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-05-12esp8266/modesp: flash_user_start: Use value from linker script.Paul Sokolovsky
Make esp8266_common.ld export size reserved to all code segments, and use that in esp.flash_user_start() implementation.
2017-03-27esp8266/modesp: Remove long-obsolete and unused espconn bindings.Damien George
2017-03-26esp8266/modesp: Use mp_obj_str_get_str instead of mp_obj_str_get_data.Damien George
2017-01-03esp8266/modesp: Fix a typo, print -> printf.TheSpooler
2017-01-03esp8266/modesp: Make check_fw() work with OTA firmware.Paul Sokolovsky
2016-12-20esp8266/modesp: flash_user_start(): Support configuration with yaota8266.Paul Sokolovsky
It's pretty rough way to detect yaota8266 being used, but otherwise allows to have a filesystem in such config.
2016-12-20esp8266: When doing GC be sure to trace the memory holding native code.Damien George
Native code can hold pointers to objects on the heap, eg constant objects like big integers.
2016-12-09esp8266: Enable inline Xtensa assembler.Damien George
With this patch, @micropython.asm_xtensa can be used on the esp8266 port.
2016-12-09esp8266: Enable native emitter for Xtensa arch.Damien George
This patch allows esp8266 to use @micropython.native and @micropython.viper function decorators. By default the executable machine code is written to the space at the end of the iram1 region. The user can call esp.set_native_code_location() to make the code go to flash instead.
2016-11-06esp8266: Rename "machine" module implementation to use contemporary naming.Paul Sokolovsky
Previously they used historical "pyb" affix causing confusion and inconsistency (there's no "pyb" module in modern ports; but people took esp8266 port as an example, and "pyb" naming kept proliferating, while other people complained that source structure is not clear).
2016-10-24esp8266/modesp: Add flash_user_start() function.Paul Sokolovsky
As we're looking towards adding OTA support, calculation of a FlashROM area which can be used for filesystem (etc.) may become complex, so introduce C function for that. So far it just hardcodes current value, 0x90000. In the future the function may be extended (and renamed) to return the size of area too.
2016-10-09esp8266: Make neopixel support configurable.Paul Sokolovsky
To save iRAM.
2016-10-07esp8266: Use mp_raise_OSError helper function.Damien George
2016-09-22all: Remove 'name' member from mp_obj_module_t struct.Damien George
One can instead lookup __name__ in the modules dict to get the value.
2016-08-04esp8266/modesp: Add check_fw() function to check integrity of the firmware.Paul Sokolovsky
Requires firmware generated by the latest makeimg.py (which stores size and md5 of the firmware together with the firmware itself).
2016-08-01esp8266: Make APA102 driver inclusion configurable.Paul Sokolovsky
2016-06-06esp8266: Let RTC work correctly after deepsleep.puuu
By design, at wake up from deepsleep, the RTC timer will be reset, but the data stored in RTC memory will not [1]. Therefore, we have to adjust delta in RTC memory before going into deepsleep to get almost correct time after waking up. [1] http://bbs.espressif.com/viewtopic.php?t=1184#p4082
2016-05-26esp8266: Enable DHT C-level driver.Damien George
Exposed as esp.dht_readinto. Probably should go somewhere less port-specific.
2016-05-19esp8266: Add APA102 serial individually controllable LEDs support.misterdanb
APA102 is a new "smart LED", similar to WS2812 aka "Neopixel".
2016-05-10esp8266: Convert to use new MP_Exxx errno symbols.Damien George
These symbols are still defined in terms of the system Exxx symbols, and can be switched to internal numeric definitions at a later stage. Note that extmod/modlwip still uses many system Exxx symbols.
2016-05-03esp8266/modesp: Add malloc() and free() functions.Paul Sokolovsky
Useful for testing fragmentation issues in OS heap. E.g. freemem() may report large amount, but is it possible to actually allocate block of a given size? Issue malloc() (followed by free()) to find out.
2016-05-03esp8266/modesp: Add esf_free_bufs() debugging function.Paul Sokolovsky
Return number of free inernal WiFi buffers.
2016-04-28esp8266: Move pyb.info() function to esp module and remove pyb module.Damien George
All functionality of the pyb module is available in other modules, like time, machine and os. The only outstanding function, info(), is (temporarily) moved to the esp module and the pyb module is removed.
2016-04-25py: Move call_function_*_protected() functions to py/ for reuse.Paul Sokolovsky
They almost certainly needed by any C code which calls Python callbacks.
2016-04-18esp8266/modesp: Add flash_size() function.Paul Sokolovsky
Returns FlashROM size in bytes from vendor SDK's point of view, not physical size.
2016-04-17esp8266/modesp: Allow esp.deepsleep to take 2nd arg for RF wake opt.Damien George
2016-04-11esp8266/modesp: Add freemem() and meminfo() functions.Paul Sokolovsky
They call into vendor SDK functions system_get_free_heap_size() and system_print_meminfo() respectively.
2016-04-06esp8266: Make destination for vendor OS debug output soft-configurable.Damien George
Use esp.osdebug(None) to disable, or esp.osdebug(uart_id) to send output to a UART.
2016-04-01esp8266: Move PHY mode constants from modesp to modnetwork.Paul Sokolovsky
2016-03-27esp8266/modesp: flash_read(): Accept buffer to read to as a second argument.Paul Sokolovsky
2016-03-27esp8266/modesp: flash_write(): Writes in multiples of 4 bytes.Paul Sokolovsky
2016-03-26esp8266: Add esp.neopixel_write function to bit-bang WS2812 data.Damien George
2016-03-12esp8266: Switch to lwIP built from source.Paul Sokolovsky
Using https://github.com/pfalcon/esp-open-lwip project.
2016-03-10esp8266: Move wifi_mode() and phy_mode() to network module.Paul Sokolovsky
2016-02-08esp8266/modesp: Implement flash_write(), flash_erase().Alex March
2016-01-11py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.Damien George
The first argument to the type.make_new method is naturally a uPy type, and all uses of this argument cast it directly to a pointer to a type structure. So it makes sense to just have it a pointer to a type from the very beginning (and a const pointer at that). This patch makes such a change, and removes all unnecessary casting to/from mp_obj_t.
2015-12-30esp8266/modesp: Allow to compile out proprietary espconn stuff.Paul Sokolovsky
2015-12-27esp8266: mac() function belongs to network module per the latest API.Paul Sokolovsky
2015-12-21esp8266: Remove superfluous includes.Paul Sokolovsky
2015-12-21esp8266/modesp: flash_read() takes 2 args (fix typo).Paul Sokolovsky
2015-11-24esp8266/modesp: Implement flash_read(offset, size_bytes) function.Paul Sokolovsky
Based on vendor API documentation, untested on real hardware.
2015-10-31all: Add py/mphal.h and use it in all ports.Damien George
py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
2015-08-29esp8266: Added wifi_mode() to read and set WiFi operating mode.Bill Owens
2015-07-20esp8266: Use m_new/m_renew/m_del funcs instead of private gc_xxx.Damien George