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
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
Damien George
7059c8c23c
esp8266: Expose pin object as a public structure for use as C pin API.
...
This is an initial attempt at making a simple C pin API for writing
things like I2C drivers in C.
2016-03-24 11:07:41 +02:00
Damien George
342d903a13
esp8266: Expose simple pin API at C level.
2016-03-05 21:36:32 +02:00
Damien George
de8b585ab7
esp8266: Make pyb.RTC a type, and pyb.RTC() constructs an RTC object.
...
This is the standard way of doing things, one should construct a
peripheral object (even if it's a singleton).
See issue #1330 .
2015-06-22 23:03:17 +01:00
Josef Gajdusek
25a8a42447
esp8266: Add pyb.ADC class
2015-05-28 21:31:37 +03:00
Josef Gajdusek
103d12a877
esp8266: Add utime and pyb.RTC
2015-05-13 00:12:54 +01:00
Damien George
87c6250b4c
esp8266: Add basic pyb.Pin class; supports output mode only.
2015-02-13 22:21:44 +00:00