Paul Sokolovsky
8b08a0d9ed
esp8266/moduos: Add listdir() proxy for MP_STATE_PORT(fs_user_mount)[0].
...
I.e. os.listdir(...) will redirect to
MP_STATE_PORT(fs_user_mount)[0].listdir(...).
2016-03-28 12:29:47 +03:00
Damien George
61230e007d
esp8266/moduos: Use mp_rom_map_elem_t for static const dictionary.
2016-03-28 12:08:36 +03:00
Paul Sokolovsky
b01a373adb
esp8266: deploy: Use --flash_size=8m option to esptool.py.
...
Most esp8266 modules have at least 1MB (8Mbit) of flash. If not set, vendor
functions allow to access only first 512K.
2016-03-28 11:28:16 +03:00
Paul Sokolovsky
cd6194aefc
esp8266/esp8266.ld: Put FatFs to FlashROM.
2016-03-27 17:15:25 +03:00
Paul Sokolovsky
374654f2b8
esp8266: Enable FatFs support.
2016-03-27 17:13:47 +03:00
Paul Sokolovsky
fe9bc0c573
esp8266/README: Update for the current status of the port.
2016-03-27 16:10:58 +03:00
Paul Sokolovsky
bbc65d4eda
esp8266/modesp: flash_read(): Accept buffer to read to as a second argument.
2016-03-27 15:34:35 +03:00
Paul Sokolovsky
fd86bf5917
esp8266/modesp: flash_write(): Writes in multiples of 4 bytes.
2016-03-27 15:32:58 +03:00
Paul Sokolovsky
53302f1616
esp8266: Set up UART handling task soon into init process.
...
Otherwise, events may be posted to non-initialized task, which leads to
segfaults.
2016-03-27 14:33:17 +03:00
Paul Sokolovsky
651a188299
extmod/vfs_fat_diskio: Actually support sectors != 512 with Python blockdevs.
2016-03-27 14:21:06 +03:00
Paul Sokolovsky
13394a632d
unix/unix_mphal: Hack to make uos.dupterm() actually work.
...
See https://github.com/micropython/micropython/issues/1736 for the
list of complications. This workaround instead of duplicating REPL
to another stream, switches to it, because read(STDIN) we use otherwise
is blocking call, so it and custom REPL stream can't be used together.
2016-03-27 14:02:03 +03:00
Paul Sokolovsky
53ad5edc01
py/stream: Fix stupid thinko with variable naming/shadowing.
2016-03-27 12:58:33 +03:00
Paul Sokolovsky
87c783b454
docs/esp8266: esp.mac() replaced with network.WLAN.mac().
2016-03-27 06:59:39 +03:00
Paul Sokolovsky
679fe0abae
docs/esp8266: esp.wifi_mode() replaced with network.WLAN.active().
2016-03-27 06:59:00 +03:00
Paul Sokolovsky
eda8746324
docs/esp8266: phy_mode() moved to network module.
2016-03-27 06:58:06 +03:00
Paul Sokolovsky
935e021250
esp8266: Put modpybi2c.o to FlashROM.
2016-03-26 10:59:25 +02:00
Damien George
c33a76059f
esp8266/tests: Add neopixel.py test.
2016-03-26 10:55:29 +02:00
Damien George
3962766be0
esp8266: Add esp.neopixel_write function to bit-bang WS2812 data.
2016-03-26 10:55:21 +02:00
Damien George
b62beadae0
esp8266: Link ADC class into machine module.
2016-03-26 00:41:37 +02:00
Paul Sokolovsky
f71c0699a5
esp8266: Put utils.o to FlashROM.
2016-03-26 00:39:51 +02:00
Paul Sokolovsky
9c7e3353e5
esp8266: Put lexerstr32.o into FlashROM.
2016-03-26 00:39:02 +02:00
Paul Sokolovsky
ba640bde55
esp8266/esppwm.c: Fix IRQ handler prototype.
2016-03-26 00:34:28 +02:00
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
Paul Sokolovsky
91031a75a1
extmod/modlwip: lwip_socket_setsockopt: Handle option value properly.
2016-03-25 20:53:52 +02:00
Paul Sokolovsky
4332d72fd8
extmod/modlwip: Add lwip->POSIX error map for lwIP 1.4.0.
...
Between 1.4.0 and 1.4.1, lwIP errors were renumbered.
2016-03-25 20:32:01 +02:00
Paul Sokolovsky
de0c84ebf1
extmod/modlwip: lwip_tcp_send: Handle properly send buffer full condition.
...
Per POSIX http://pubs.opengroup.org/onlinepubs/9699919799/functions/send.html :
"If space is not available at the sending socket to hold the message to be
transmitted, and the socket file descriptor does not have O_NONBLOCK set,
send() shall block until space is available. If space is not available at the
sending socket to hold the message to be transmitted, and the socket file
descriptor does have O_NONBLOCK set, send() shall fail [with EAGAIN]."
2016-03-25 18:38:13 +02:00
Paul Sokolovsky
5e75f335e6
extmod/modlwip: Implement setsocketopt(SO_REUSEADDR).
2016-03-25 17:44:24 +02:00
Paul Sokolovsky
0cb10b5220
docs/esp8266/quickref: Add note about GPIO16.
2016-03-25 16:48:15 +02:00
Paul Sokolovsky
159f1aaca8
docs/esp8266/quickref: Note that timers supported are virtual ones.
2016-03-25 16:44:13 +02:00
Paul Sokolovsky
e589cddcd4
docs/esp: Remove getaddrinfo(), now in socket module as expected.
2016-03-25 16:39:18 +02:00
Paul Sokolovsky
6e6488530e
docs: More standard modules for esp8266.
2016-03-25 16:33:05 +02:00
Paul Sokolovsky
4b5606bc09
docs/network: esp8266: Update docs on WLAN constructor.
2016-03-25 16:30:06 +02:00
Paul Sokolovsky
ee6fcc6f91
docs: Add standard modules list for esp8266.
2016-03-25 15:17:55 +02:00
Paul Sokolovsky
96a644076d
docs/topindex.html: Refer to "pyb" module only for pyboard.
2016-03-25 15:12:26 +02:00
Paul Sokolovsky
8f1854ad2d
extmod/modlwip: Add SOL_SOCKET and SO_REUSEADDR constants for setsockopt().
2016-03-25 15:06:12 +02:00
Paul Sokolovsky
ac671546d1
esp8266/README: Remove outdated reference to initial port heap size.
2016-03-25 15:02:23 +02:00
Paul Sokolovsky
88f60de914
tests: Add test for io.BufferedWriter.
2016-03-25 15:01:19 +02:00
Paul Sokolovsky
2c81b9be28
py/modio: io.BufferedWriter: Describe flushing policy.
2016-03-25 14:59:30 +02:00
Paul Sokolovsky
063e6e7d0a
py/modio: Implement io.BufferedWriter.flush().
2016-03-25 14:33:38 +02:00
Paul Sokolovsky
5d93dfbc2c
py/modio: Initial implementation of io.BufferedWriter class.
...
Just .write() method implemented currently.
2016-03-25 01:10:49 +02:00
Paul Sokolovsky
3dbd2ee926
extmod/modwebsocket: Implement read support.
2016-03-25 00:51:51 +02:00
Paul Sokolovsky
4a02a8f74d
py/stream: Fix object vs ptr usecase in mp_stream_writeall().
2016-03-24 19:43:08 +02:00
Paul Sokolovsky
24342dd65e
extmod/modwebsocket: Start module for WebSocket helper functions.
...
Currently, only write support is implemented (of limited buffer size).
2016-03-24 19:16:00 +02:00
Paul Sokolovsky
d4c8e626f2
py/stream: Add mp_stream_writeall() helper function.
...
Spools entire output buffer to a blocking stream (chunk by chunk if
needed).
2016-03-24 19:09:00 +02:00
Damien George
a5d48b1162
esp8266: Add tests/onewire.py as a driver and test code for ds18b20 dev.
2016-03-24 17:35:26 +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
0cdbd356fd
esp8266: Implement bit-bang I2C read, and add i2c.readfrom method.
...
I2C reading tested with TSL2561 luminosity sensor.
2016-03-24 11:46:05 +02:00
Damien George
5b9f361824
esp8266: Clean up bit-bang I2C implementation.
...
Changed from using set_sda_scl function to independent set_sda and
set_scl functions.
2016-03-24 11:37:52 +02:00
Paul Sokolovsky
667d64b430
esp8266/modpybi2c: Add missing include.
2016-03-24 11:21:36 +02:00