Commit Graph

11 Commits

Author SHA1 Message Date
Damien George b62beadae0 esp8266: Link ADC class into machine module. 2016-03-26 00:41:37 +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
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 f7be80398e esp8266: Move pyb.freq to machine.freq. 2016-03-09 09:03:59 +07:00
Paul Sokolovsky 26f0616e8f esp8266/modmachine: Add Pin class from modpyb. 2016-03-05 21:43:11 +02:00
Paul Sokolovsky c70637bc00 esp8266/modmachine: Timer: Add ONE_SHOT and PERIODIC symbolic constants. 2016-03-04 22:26:59 +02:00
Paul Sokolovsky 98b727c931 esp8266/modmachine: Use etshal.h. 2016-03-04 19:41:15 +02:00
Paul Sokolovsky f39bcb304b esp8266/modmachine: Changing params of a timer requires disarming it first. 2016-03-04 18:41:37 +02:00
Paul Sokolovsky 7193086c03 esp8266/modmachine: Basic implementation of Timer for OS virtual timers. 2016-03-04 18:40:35 +02:00
Paul Sokolovsky 5d7c408ba8 esp8266: Add modmachine with mem* arrays. 2016-03-04 17:34:25 +02:00