summaryrefslogtreecommitdiff
path: root/esp8266/modesp.c
AgeCommit message (Collapse)Author
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
2015-07-19esp8266: modesp: Update for gc_realloc() refactor.Paul Sokolovsky
TODO: Contributed code in modesp incorrectly uses private gc_* API.
2015-06-20esp8266: Move status() from esp module to networkBill Owens
2015-06-17esp8266: Move scan from esp module to networkBill Owens
2015-06-14esp8266: Changed esp_scan to keep the current WiFi operating mode but throw ↵Bill Owens
an exception if WiFi is in AP only mode
2015-06-12esp8266: Move connect/disconnect from "esp" module to network.Paul Sokolovsky
2015-06-12esp8266: esp_connect(): The function is now vararg.Paul Sokolovsky
Fixes regression from a previous commit.
2015-06-02esp8266: Do not call espconn_create in constructor of esp.socket.Paul Sokolovsky
Turns out this is supposed to be called only for UDP connections. Patch by Josef Gajdusek.
2015-05-28esp8266: Add a bunch of miscellaneous methodsJosef Gajdusek
2015-05-06esp8266: Add .onsent callback supportJosef Gajdusek
The function passed to socket.onsent() gets called after data is succesfully sent by the socket.
2015-05-06esp8266: Initialize socket->connlist to NULLJosef Gajdusek
This was causing crashes in .onconnect()
2015-05-05esp8266: Fix endian of address returned by esp.getaddrinfo()Josef Gajdusek
2015-05-04esp8266: Add esp.socket class, with ESP-style socket functionality.Josef Gajdusek
* UDP currently not supported * As there is no way (that I know of) the espconn_regist_connectcb() callback can recognize on which socket has the connection arrived, only one listening function at a time is supported
2015-05-03esp8266: Export station status() constantsJosef Gajdusek
2015-04-16py: Overhaul and simplify printf/pfenv mechanism.Damien George
Previous to this patch the printing mechanism was a bit of a tangled mess. This patch attempts to consolidate printing into one interface. All (non-debug) printing now uses the mp_print* family of functions, mainly mp_printf. All these functions take an mp_print_t structure as their first argument, and this structure defines the printing backend through the "print_strn" function of said structure. Printing from the uPy core can reach the platform-defined print code via two paths: either through mp_sys_stdout_obj (defined pert port) in conjunction with mp_stream_write; or through the mp_plat_print structure which uses the MP_PLAT_PRINT_STRN macro to define how string are printed on the platform. The former is only used when MICROPY_PY_IO is defined. With this new scheme printing is generally more efficient (less layers to go through, less arguments to pass), and, given an mp_print_t* structure, one can call mp_print_str for efficiency instead of mp_printf("%s", ...). Code size is also reduced by around 200 bytes on Thumb2 archs.
2015-02-05esp8266: modesp: Add status() function for connection status.Paul Sokolovsky
2015-02-03esp8266: modesp: Add disconnect() function to disconnect from WiFi AP.Paul Sokolovsky
2015-02-01esp8266: modesp: Add connect() function to connect to WiFi AP.Paul Sokolovsky
2015-01-25esp8266: Handle exceptions in callback.Paul Sokolovsky
2015-01-25esp8266: Add "esp" module with esp8266-specific "cooperative" networking.Paul Sokolovsky
So far implements .scan(lambda x: print(x)) function to scan for WiFi access points.