summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/machine_pin.c
Commit message (Collapse)AuthorAge
* all: Raise exceptions via mp_raise_XXXJavier Candeira2017-08-13
| | | | | | | | - 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.
* all: Use the name MicroPython consistently in commentsAlexander Steffen2017-07-31
| | | | | There were several different spellings of MicroPython present in comments, when there should be only one.
* esp8266: Convert to mp_rom_map_elem_t.Paul Sokolovsky2017-07-30
|
* esp8266: Move mp_hal_pin_open_drain from esp_mphal.c to machine_pin.c.Damien George2017-06-22
| | | | | | | 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).
* esp8266, stmhal, zephyr: Rename machine.Pin high/low methods to on/off.Paul Sokolovsky2017-05-21
| | | | | | | | | 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.
* extmod/machine_signal: Support all Pin's arguments to the constructor.Paul Sokolovsky2017-04-11
| | | | | | | | | | | | | | | | | 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).
* esp8266/machine_pin: Fix pin.irq() to work when all args are keywords.Damien George2017-03-21
|
* esp8266/machine_pin: Fix memset size for zeroing of pin_irq_is_hard.Damien George2017-03-21
| | | | Thanks to @robert-hh.
* esp8266/machine_pin: Make pin.irq arguments positional.Damien George2017-03-20
| | | | | | | | 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.
* esp8266/machine_pin: Add "hard" parameter to pin.irq, soft by default.Damien George2017-03-20
|
* esp8266: Enable micropython.schedule() with locking in pin callback.Damien George2017-03-20
|
* esp8266/machine_pin: Implement pin ioctl protocol.Paul Sokolovsky2017-01-29
| | | | For polymorphic interfacing on C level.
* all: Consistently update signatures of .make_new and .call methods.Paul Sokolovsky2017-01-04
| | | | | Otherwise, they serve reoccurring source of copy-paste mistakes and breaking nanbox build.
* esp8266: Rename "machine" module implementation to use contemporary naming.Paul Sokolovsky2016-11-06
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).