summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/modmachine.c
Commit message (Collapse)AuthorAge
* esp8266: Let RTC work correctly after deepsleep.puuu2016-06-06
| | | | | | | | | By design, at wake up from deepsleep, the RTC timer will be reset, but the data stored in RTC memory will not [1]. Therefore, we have to adjust delta in RTC memory before going into deepsleep to get almost correct time after waking up. [1] http://bbs.espressif.com/viewtopic.php?t=1184#p4082
* esp8266: Provide a dedicated variable to disable ets_loop_iter.Damien George2016-06-01
| | | | So ets_loop_iter is now only disabled when using machine.disable_irq.
* esp8266/modmachine: Add machine.time_pulse_us function.Damien George2016-05-31
|
* esp8266/modmachine: Add disable_irq and enable_irq functions.Damien George2016-05-26
|
* py: Move call_function_*_protected() functions to py/ for reuse.Paul Sokolovsky2016-04-25
| | | | They almost certainly needed by any C code which calls Python callbacks.
* esp8266: Implement basic deep-sleep capabilities.Damien George2016-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the machine.deepsleep() function to enter the sleep mode. Use the RTC to configure the alarm to wake the device. Basic use is the following: import machine # configure RTC's ALARM0 to wake device from deep sleep rtc = machine.RTC() rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP) # do other things # ... # set ALARM0's alarm to wake after 10 seconds rtc.alarm(rtc.ALARM0, 10000) # enter deep-sleep state (system is reset upon waking) machine.deepsleep() To detect if the system woke from a deep sleep use: if machine.reset_cause() == machine.DEEPSLEEP_RESET: print('woke from deep sleep')
* esp8266/modmachine: Add reset_cause() function.Paul Sokolovsky2016-04-15
|
* esp8266: Switch from using custom I2C driver to generic extmod one.Damien George2016-04-12
|
* esp8266: Add initial implementation of machine.UART.Damien George2016-04-06
| | | | Currently UART(0) and UART(1) are exposed and only uart.write works.
* esp8266: Move pyb.unique_id() to machine.unique_id().Paul Sokolovsky2016-04-05
|
* esp8266: Move pyb.hard_reset() to machine.reset().Paul Sokolovsky2016-04-05
|
* esp8266: Link ADC class into machine module.Damien George2016-03-26
|
* esp8266: Add PWM support.Damien George2016-03-26
| | | | | | | | | | | | | | | | | 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.
* esp8266: Implement software SPI class.Damien George2016-03-25
| | | | | Supports speeds up to 500k baud, polarity=0/1, phase=0/1, and using any pins. Only supports MSB output at the moment.
* esp8266: Add basic I2C driver, with init and writeto methods.Damien George2016-03-24
| | | | Tested and working with SSD1306 I2C display.
* esp8266: Move pyb.freq to machine.freq.Damien George2016-03-09
|
* esp8266/modmachine: Add Pin class from modpyb.Paul Sokolovsky2016-03-05
|
* esp8266/modmachine: Timer: Add ONE_SHOT and PERIODIC symbolic constants.Paul Sokolovsky2016-03-04
|
* esp8266/modmachine: Use etshal.h.Paul Sokolovsky2016-03-04
|
* esp8266/modmachine: Changing params of a timer requires disarming it first.Paul Sokolovsky2016-03-04
|
* esp8266/modmachine: Basic implementation of Timer for OS virtual timers.Paul Sokolovsky2016-03-04
|
* esp8266: Add modmachine with mem* arrays.Paul Sokolovsky2016-03-04