Damien George
632d8efa05
esp8266: Add PWM support.
...
PWM implementation uses a timer and interrupts (FRC1), taken from
Espressif's/NodeMCU's implementation and adapted for our use.
8 channels are supported, on pins 0, 2, 4, 5, 12, 13, 14, 15.
Usage:
import machine
pwm0 = machine.PWM(machine.Pin(0))
pwm0.freq(1000)
pwm0.duty(500)
Frequency is shared (ie the same) for all channels. Frequency is
between 1 and 1000. Duty is between 0 and 1023.
2016-03-26 00:32:37 +02:00
Damien George
82b95f625e
esp8266: Implement software SPI class.
...
Supports speeds up to 500k baud, polarity=0/1, phase=0/1, and using any
pins. Only supports MSB output at the moment.
2016-03-25 23:28:13 +02:00
Damien George
78d0dde562
esp8266: Add onewire helper functions as C module.
...
Includes functions to read and write bits and bytes.
2016-03-24 17:33:42 +02:00
Damien George
dd32f02cc3
esp8266: Add basic I2C driver, with init and writeto methods.
...
Tested and working with SSD1306 I2C display.
2016-03-24 11:17:17 +02:00
Paul Sokolovsky
9d7b871f58
esp8266: Store frozen modules in FlashROM.
...
Requires special lexer to access their contents.
2016-03-17 23:06:47 +08:00
Paul Sokolovsky
e5c39a3a9e
esp8266: Switch to lwIP built from source.
...
Using https://github.com/pfalcon/esp-open-lwip project.
2016-03-12 11:45:53 +07:00
Damien George
932f07ccf5
esp8266: Rejig Makefile so extmod/modlwip.o is placed under build/.
2016-03-11 12:00:01 +07:00
Paul Sokolovsky
6e5c31c947
esp8266: Be sure to build ets_alt_task.
2016-03-11 09:43:39 +07:00
Paul Sokolovsky
d684f872bd
esp8266/Makefile: Add define for ESP8266 lwIP.
2016-03-08 10:29:05 +07:00
Damien George
05dda0ee9e
esp8266: Enable modlwip.
2016-03-08 10:21:50 +07:00
Damien George
52d7685d9a
esp8266: Allow Makefile's BAUD variable to be overridden.
2016-03-06 05:57:36 +02:00
Paul Sokolovsky
4284b3811f
esp8266: Enable modmachine.
2016-03-04 17:37:13 +02:00
Paul Sokolovsky
7480ee5892
esp8266: Enable uhashlib module.
2016-03-03 20:14:50 +02:00
Damien George
d083d7d610
esp8266: Allow Makefile's PORT variable to be overridden.
2016-03-02 22:50:55 +02:00
Damien George
6f4357c28e
esp8266: Enable math module.
2016-03-02 22:43:10 +02:00
Damien George
6d0629bddc
esp8266: Enable float support, using 30-bit stuffed floats.
...
No complex numbers though.
2016-03-02 22:43:10 +02:00
Paul Sokolovsky
adfe4ff72a
esp8266: Support CFLAGS_EXTRA.
2016-01-08 01:30:20 +02:00
Paul Sokolovsky
73ff0687f2
lib/utils/printf: Move from stmhal/ .
...
This file contains various MicroPython-specific helper functions, so isn't
good fit for lib/libc/.
2015-11-10 18:58:58 +02:00
Paul Sokolovsky
0ec51441de
stmhal: pyexec.c is common module, move to lib/utils/ .
2015-10-31 19:35:10 +03:00
Paul Sokolovsky
0dbd928cee
Makefiles: Remove duplicate object files when linking.
...
Scenario: module1 depends on some common file from lib/, so specifies it
in its SRC_MOD, and the same situation with module2, then common file
from lib/ eventually ends up listed twice in $(OBJ), which leads to link
errors.
Make is equipped to deal with such situation easily, quoting the manual:
"The value of $^ omits duplicate prerequisites, while $+ retains them and
preserves their order." So, just use $^ consistently in all link targets.
2015-10-24 15:46:53 +03:00
Paul Sokolovsky
e0f5df579b
all: Make netutils.h available to all ports by default.
...
Generally, ports should inherit INC from py.mk, append to it, not
overwrite it. TODO: Likely should do the same for other vars too.
2015-10-19 18:32:42 +03:00
Damien George
229b908d2e
esp8266: Remove "time" command from deploy target.
2015-09-12 22:22:30 +01:00
Paul Sokolovsky
b19d273beb
esp8266: Allow to easily override programming baudrate.
2015-07-04 00:36:10 +03:00
Paul Sokolovsky
ee3fec3167
esp8266: Add skeleton "network" module.
...
MicroPython "network" module interface requires it to contains classes
to instantiate. But as we have a static network interace, make WLAN()
"constructor" just return module itself, and just make all methods
module-global functions.
2015-06-12 17:45:20 +03:00
Josef Gajdusek
25a8a42447
esp8266: Add pyb.ADC class
2015-05-28 21:31:37 +03:00
Josef Gajdusek
59610c4004
esp8266: Add uos module
...
Currently implements only .uname()
2015-05-26 22:18:07 +03:00
Josef Gajdusek
1c132c8587
esp8266: Add configuration option for redirecting the built-in OS output
2015-05-13 18:03:00 +02:00
Josef Gajdusek
103d12a877
esp8266: Add utime and pyb.RTC
2015-05-13 00:12:54 +01:00
Josef Gajdusek
bda7041294
esp8266: Add support for frozen modules
2015-05-06 22:04:20 +01:00
Josef Gajdusek
9e00ac89d5
esp8266: Add esp.socket class, with ESP-style socket functionality.
...
* 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-04 11:48:40 +01:00
Paul Sokolovsky
3a84c8b58d
string0.c: Move from stmhal/ to lib/.
2015-04-05 21:57:55 +03:00
Damien George
87c6250b4c
esp8266: Add basic pyb.Pin class; supports output mode only.
2015-02-13 22:21:44 +00:00
Damien George
0b32e50365
stmhal: Make pybstdio usable by other ports, and use it.
...
Now all ports can use pybstdio.c to provide sys.stdin/stdout/stderr, so
long as they implement mp_hal_stdin_* and mp_hal_stdout_* functions.
2015-02-13 15:04:53 +00:00
Paul Sokolovsky
8fff7f8d38
esp8266: Add "reset" target to Makefile.
...
Just always keep jumper in bootloader position. After flashing, uPy
automatically executed. And to get back to bootloader, do "make reset".
2015-01-31 00:51:39 +02:00
Paul Sokolovsky
6ec650b41f
esp8266: Add "esp" module with esp8266-specific "cooperative" networking.
...
So far implements .scan(lambda x: print(x)) function to scan for WiFi access
points.
2015-01-25 17:10:06 +02:00
Paul Sokolovsky
06e9cb688b
esp8266: Update for readline module moved to lib/.
2015-01-12 04:27:36 +02:00
Damien George
fe7d542352
esp8266: Prefix includes with py/; remove need for -I../py.
2015-01-01 21:16:58 +00:00
Damien George
9ddbe291c4
py: Add include guards to mpconfig,misc,qstr,obj,runtime,parsehelper.
2014-12-29 01:02:19 +00:00
Damien George
d96e6b14c9
esp8266: Make default ESP_SDK variable work correctly.
...
When esp-open-sdk is built with STANDALONE=y (the default) then ESP_SDK
is set to the correct value, so that "make" just works.
2014-11-28 18:05:25 +00:00
Damien George
fbea810043
esp8266: Change bignum from mpz to longlong; move some rodata to iram.
...
Some rodata items can go in iram/irom segment, but not others. With
this patch ESP now has 24256 bytes of heap ram. It passes 228 out of
248 tests from tests/basics directory.
2014-11-28 14:58:25 +00:00
Damien George
5f10065718
esp8266: Provide sensible default ESP_SDK; deploy 2 the images together.
2014-11-28 10:22:01 +00:00
Paul Sokolovsky
1bbc389d67
esp8266: Allow to override serial port.
2014-11-28 01:54:46 +02:00
Damien George
075d597464
esp8266: New port of Micro Python to ESP8266 wifi module.
2014-11-27 20:30:33 +00:00