Paul Sokolovsky
fb5017f9dc
esp8266/main: Set sys.path to ["", "/", "/lib"].
9 years ago
Damien George
73ccb3fc5b
esp8266: Adapt port to use new auto-qstr generation.
9 years ago
Paul Sokolovsky
050e645ef2
esp8266/modmachine: Add reset_cause() function.
9 years ago
Paul Sokolovsky
d3ab4bc7ca
esp8266/qstrdefsport.h: Mark qstr's for "esp" module.
9 years ago
Paul Sokolovsky
4f811d0e4c
esp8266: Enable input() builtin.
9 years ago
Damien George
674bf1bc81
esp8266: Add hard IRQ callbacks for pin change on GPIO0-15.
9 years ago
Paul Sokolovsky
54b89665fc
esp8266/modnetwork: .config(): Add "password" param (W/O).
9 years ago
Paul Sokolovsky
7acc252e93
esp8266/modnetwork: .config(): Add "authmode" param.
9 years ago
Paul Sokolovsky
1cc81ed449
esp8266/modesp: Add freemem() and meminfo() functions.
They call into vendor SDK functions system_get_free_heap_size() and
system_print_meminfo() respectively.
9 years ago
Damien George
1a0a323ca8
esp8266: Add initial implementation of machine.UART.
Currently UART(0) and UART(1) are exposed and only uart.write works.
9 years ago
Damien George
96eca22322
esp8266: Make destination for vendor OS debug output soft-configurable.
Use esp.osdebug(None) to disable, or esp.osdebug(uart_id) to send output
to a UART.
9 years ago
Paul Sokolovsky
81fd5685fc
esp8266: Move pyb.hard_reset() to machine.reset().
9 years ago
Damien George
3962766be0
esp8266: Add esp.neopixel_write function to bit-bang WS2812 data.
9 years ago
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.
9 years ago
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.
9 years ago
Damien George
78d0dde562
esp8266: Add onewire helper functions as C module.
Includes functions to read and write bits and bytes.
9 years ago
Damien George
0cdbd356fd
esp8266: Implement bit-bang I2C read, and add i2c.readfrom method.
I2C reading tested with TSL2561 luminosity sensor.
9 years ago
Damien George
dd32f02cc3
esp8266: Add basic I2C driver, with init and writeto methods.
Tested and working with SSD1306 I2C display.
9 years ago
Paul Sokolovsky
df1f6783f2
esp8266: Add "socket" and "usocket" aliases for lwip module.
9 years ago
Damien George
8000d51b68
esp8266: Add module weak link from json to ujson.
9 years ago
Paul Sokolovsky
5239a8a82b
esp8266/modnetwork: Add symbolic names for network interfaces: STA_IF & AP_IF.
These are expected to be passed to network.WLAN() to instantiate network
interface objects.
9 years ago
Paul Sokolovsky
a49c16069c
esp8266/modnetwork: Introduce interface .config() method.
Allows to set (in case keyword args are given) or query (in case a single
"symbolic keyword" (a string, value is the same as keyword)) arbitrary
interface paramters (i.e. extensible and adaptable to various hardware).
Example usage:
ap_if = network.WLAN(1)
ap_if.config(essid="MicroPython on Air")
print(ap_if.config("essid"))
9 years ago
Paul Sokolovsky
1c43a0fbf8
esp8266/modnetwork: Add per-interface .active() method.
Allows to up/down interface when called with a boolean, or query current
state if called without args. This per-interface method is intended to
supersede adhoc network.wifi_mode() function.
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
c70637bc00
esp8266/modmachine: Timer: Add ONE_SHOT and PERIODIC symbolic constants.
9 years ago
Paul Sokolovsky
7193086c03
esp8266/modmachine: Basic implementation of Timer for OS virtual timers.
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
02ea74d8f5
esp8266: Add network.ifconfig().
9 years ago
Alex March
81407729a5
esp8266/modesp: Implement flash_write(), flash_erase().
9 years ago
Paul Sokolovsky
fce0036a67
esp8266: mac() function belongs to network module per the latest API.
9 years ago
Paul Sokolovsky
90202b4c0d
esp8266/modesp: Implement flash_read(offset, size_bytes) function.
Based on vendor API documentation, untested on real hardware.
9 years ago
Bill Owens
e2bfa471fa
esp8266: Added wlan.isconnected() to maintain parity with other ports.
10 years ago
Bill Owens
a66a99bfd8
esp8266: Added wifi_mode() to read and set WiFi operating mode.
10 years ago
Bill Owens
60ccb41fac
esp8266: Move status() from esp module to network
10 years ago
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.
10 years ago
Josef Gajdusek
286ced4c2f
esp8266: Add a bunch of miscellaneous methods
10 years ago
Josef Gajdusek
25a8a42447
esp8266: Add pyb.ADC class
10 years ago
Josef Gajdusek
59610c4004
esp8266: Add uos module
Currently implements only .uname()
10 years ago
Josef Gajdusek
103d12a877
esp8266: Add utime and pyb.RTC
10 years ago
Josef Gajdusek
d39d96b700
esp8266: Add .onsent callback support
The function passed to socket.onsent() gets called after data is succesfully
sent by the socket.
10 years ago
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
10 years ago
Josef Gajdusek
7e7039b53c
esp8266: Export station status() constants
10 years ago
Damien George
87c6250b4c
esp8266: Add basic pyb.Pin class; supports output mode only.
10 years ago
Paul Sokolovsky
d6f648d04f
esp8266: modesp: Add status() function for connection status.
10 years ago
Paul Sokolovsky
1cd47c6315
esp8266: modesp: Add disconnect() function to disconnect from WiFi AP.
10 years ago
Paul Sokolovsky
471b2a8906
esp8266: modesp: Add connect() function to connect to WiFi AP.
10 years ago
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.
10 years ago
Paul Sokolovsky
438b3d26b5
esp8266: Add missing hard_reset qstr.
10 years ago
Damien George
075d597464
esp8266: New port of Micro Python to ESP8266 wifi module.
10 years ago
Damien George
04b9147e15
Add license header to (almost) all files.
Blanket wide to all .c and .h files. Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.
Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
11 years ago