Paul Sokolovsky
9e8396accb
esp8266/modnetwork: Allow to configure STA and AP interfaces separately.
On ESP8266, there're 2 different interfaces. Pretending it's not the case
desn't make sense. So, network.WLAN() now takes interface id, and returns
interface object. Individual operations are then methods of interface
object. Some operations require i/f of specific type (e.g. .connect()
makes sense only for STA), other are defined for any (e.g. .ifconfig(),
.mac()).
9 years ago
Damien George
f7be80398e
esp8266: Move pyb.freq to machine.freq.
9 years ago
Paul Sokolovsky
a0cd118b14
esp8266/main: Module to run on boot is "boot", not "main".
9 years ago
Damien George
3fbbbecec9
esp8266: Put more code in iROM section.
Also explicitly name the py/*.o files in the linker file, to enable easy
testing of putting certain ones in iRAM.
9 years ago
Paul Sokolovsky
d684f872bd
esp8266/Makefile: Add define for ESP8266 lwIP.
9 years ago
Damien George
05dda0ee9e
esp8266: Enable modlwip.
9 years ago
Paul Sokolovsky
88b0490945
esp8266: Don't gc-collect BSS.
None of the other ports do, since introduction of mp_state_ctx_t. In
the case of current esp8266 port, heap is inside BSS, so scanning it
picked up a lot of dead pointers.
9 years ago
Paul Sokolovsky
db984b73f3
esp8266: Enable stack overflow checking.
9 years ago
Damien George
52d7685d9a
esp8266: Allow Makefile's BAUD variable to be overridden.
9 years ago
Paul Sokolovsky
d9d4a72679
esp8266/uart: Add uart_flush() function.
9 years ago
Paul Sokolovsky
d3a4d39687
esp8266: Support raising KeyboardInterrupt on Ctrl+C.
9 years ago
Damien George
077448328a
esp8266/etshal.h: More prototypes of ESP8266 SDK/BootROM functions.
9 years ago
Paul Sokolovsky
26f0616e8f
esp8266/modmachine: Add Pin class from modpyb.
9 years ago
Paul Sokolovsky
eb247eacd8
esp8266/modpybpin: Add support for GPIO16.
GPIO16 is actually special-function I/O, though some boards have LED there.
9 years ago
Damien George
342d903a13
esp8266: Expose simple pin API at C level.
9 years ago
Damien George
cdad2b6f4d
esp8266: Implement Pin.__call__() and Pin.OPEN_DRAIN mode.
OPEN_DRAIN is of course synthesised. All pin modes are tested and
working.
9 years ago
Paul Sokolovsky
8ab16b6af0
esp8266: Add custom _assert() function.
Enabling standard assert() (by removing -DNDEBUG) produces non-bootable
binary (because all messages go to .rodata which silently overflows).
So, for once-off debugging, have a custom _assert().
9 years ago
Paul Sokolovsky
c70637bc00
esp8266/modmachine: Timer: Add ONE_SHOT and PERIODIC symbolic constants.
9 years ago
Paul Sokolovsky
98b727c931
esp8266/modmachine: Use etshal.h.
9 years ago
Paul Sokolovsky
f22a4f8e0a
esp8266/etshal.h: Add timer functions prototypes.
9 years ago
Paul Sokolovsky
f39bcb304b
esp8266/modmachine: Changing params of a timer requires disarming it first.
9 years ago
Paul Sokolovsky
7193086c03
esp8266/modmachine: Basic implementation of Timer for OS virtual timers.
9 years ago
Paul Sokolovsky
4284b3811f
esp8266: Enable modmachine.
9 years ago
Paul Sokolovsky
5d7c408ba8
esp8266: Add modmachine with mem* arrays.
9 years ago
Paul Sokolovsky
6abafca1aa
esp8266/modutime: Support float argument to time.sleep().
9 years ago
Paul Sokolovsky
a4c8ef9d16
esp8266: Reset "virtual RTC" on power on.
Initialize RTC period coefficients, etc. if RTC RAM doesn't contain valid
values. time.time() then will return number of seconds since power-on, unless
set to different timebase.
This reuses MEM_MAGIC for the purpose beyond its initial purpose (but the whole
modpybrtc.c need to be eventually reworked completely anyway).
9 years ago
Damien George
57884996b9
esp8266: Add time.{sleep_ms,sleep_us,ticks_ms,ticks_us,ticks_diff}.
Framework for time.ticks_cpu added, but not implemented.
9 years ago
Damien George
b41a14a4b9
esp8266: Add mp_hal_delay_us function.
9 years ago
Damien George
f70873db23
esp8266: Enable more features in mpconfigport.h.
This is to get the test suite running and passing.
9 years ago
Paul Sokolovsky
7480ee5892
esp8266: Enable uhashlib module.
9 years ago
Paul Sokolovsky
70fb9ee99b
esp8266: Enable config settings helpful for debugging.
9 years ago
Paul Sokolovsky
259f1344ca
esp8266/esp8266.ld: Link in SDK version section.
Otherwise, os.uname() returns empty string for SDK version.
9 years ago
Paul Sokolovsky
ff69a1d27d
esp8266: Enable ujson, ubinascii, and uctypes modules.
9 years ago
Damien George
02ea74d8f5
esp8266: Add network.ifconfig().
9 years ago
Damien George
1febaf3ac3
esp8266: Change "soft reboot" message to work with pyboard.py.
9 years ago
Damien George
d083d7d610
esp8266: Allow Makefile's PORT variable to be overridden.
9 years ago
Damien George
6f4357c28e
esp8266: Enable math module.
9 years ago
Damien George
6d0629bddc
esp8266: Enable float support, using 30-bit stuffed floats.
No complex numbers though.
9 years ago
Damien George
ecd1272d16
esp8266: Switch bignum implementation from long-long to mpz.
9 years ago
Paul Sokolovsky
609a9c6b71
eagle.rom.addr.v6.ld: More symbols from SDK 1.5.0.
9 years ago
Paul Sokolovsky
a2e39a756c
esp8266/modpybrtc: Simplify multiplication by fixed-point value.
9 years ago
Paul Sokolovsky
9e78ab4b86
esp8266/README: Add hint about adding toolchain to PATH.
9 years ago
Paul Sokolovsky
814b1ae3a9
esp8266/modpybrtc: pyb_rtc_memory(): Fix copy-paste error.
9 years ago
Alex March
81407729a5
esp8266/modesp: Implement flash_write(), flash_erase().
9 years ago
Damien George
5b3f0b7f39
py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.
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.
9 years ago
Paul Sokolovsky
adfe4ff72a
esp8266: Support CFLAGS_EXTRA.
9 years ago
Paul Sokolovsky
43fecb0acb
esp8266/modesp: Allow to compile out proprietary espconn stuff.
9 years ago
Paul Sokolovsky
fce0036a67
esp8266: mac() function belongs to network module per the latest API.
9 years ago
Damien George
84b245f187
lib/utils: Add pyexec_frozen_module to load and execute frozen module.
This is a convenience function similar to pyexec_file. It should be used
instead of raw mp_parse_compile_execute because the latter does not catch
and report exceptions.
9 years ago
Paul Sokolovsky
abd0fcfc86
esp8266: Remove superfluous includes.
9 years ago