summaryrefslogtreecommitdiff
path: root/esp8266/machine_pin.c
AgeCommit message (Collapse)Author
2017-09-06ports: Make new ports/ sub-directory and move all ports there.Damien George
This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
2017-08-30all: Convert remaining "mp_uint_t n_args" to "size_t n_args".Damien George
This is to have consistency across the whole repository.
2017-08-13all: Raise exceptions via mp_raise_XXXJavier Candeira
- Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-07-30esp8266: Convert to mp_rom_map_elem_t.Paul Sokolovsky
2017-06-22esp8266: Move mp_hal_pin_open_drain from esp_mphal.c to machine_pin.c.Damien George
It belongs with the other pin config functions in machine_pin.c. Also, esp_mphal.c is put in iRAM so this change saves about 300 bytes of iRAM (and mp_hal_pin_open_drain is not a time critical function so doesn't need to be in iRAM).
2017-05-21esp8266, stmhal, zephyr: Rename machine.Pin high/low methods to on/off.Paul Sokolovsky
For consistent Pin/Signal class hierarchy. With it, Signal is a proper (while still ducktyped) subclass of a Pin, and any (direct) usage of Pin can be replace with Signal. As stmhal's class is reused both as machine.Pin and legacy pyb.Pin, high/low methods actually retained there.
2017-04-11extmod/machine_signal: Support all Pin's arguments to the constructor.Paul Sokolovsky
This implements the orginal idea is that Signal is a subclass of Pin, and thus can accept all the same argument as Pin, and additionally, "inverted" param. On the practical side, it allows to avoid many enclosed parenses for a typical declararion, e.g. for Zephyr: Signal(Pin(("GPIO_0", 1))). Of course, passing a Pin to Signal constructor is still supported and is the most generic form (e.g. Unix port will only support such form, as it doesn't have "builtin" Pins), what's introduces here is just practical readability optimization. "value" kwarg is treated as applying to a Signal (i.e. accounts for possible inversion).
2017-03-21esp8266/machine_pin: Fix pin.irq() to work when all args are keywords.Damien George
2017-03-21esp8266/machine_pin: Fix memset size for zeroing of pin_irq_is_hard.Damien George
Thanks to @robert-hh.
2017-03-20esp8266/machine_pin: Make pin.irq arguments positional.Damien George
All arguments to pin.irq are converted from keyword-only to positional, and can still be specified by keyword so it's a backwards compatible change. The default value for the "trigger" arg is changed from 0 (no trigger) to rising+falling edge.
2017-03-20esp8266/machine_pin: Add "hard" parameter to pin.irq, soft by default.Damien George
2017-03-20esp8266: Enable micropython.schedule() with locking in pin callback.Damien George
2017-01-29esp8266/machine_pin: Implement pin ioctl protocol.Paul Sokolovsky
For polymorphic interfacing on C level.
2017-01-04all: Consistently update signatures of .make_new and .call methods.Paul Sokolovsky
Otherwise, they serve reoccurring source of copy-paste mistakes and breaking nanbox build.
2016-11-06esp8266: Rename "machine" module implementation to use contemporary naming.Paul Sokolovsky
Previously they used historical "pyb" affix causing confusion and inconsistency (there's no "pyb" module in modern ports; but people took esp8266 port as an example, and "pyb" naming kept proliferating, while other people complained that source structure is not clear).