diff options
author | Daniel Thompson <daniel.thompson@linaro.org> | 2016-09-28 14:22:42 -0700 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-10-27 00:47:26 +0300 |
commit | 67b6d9d499bee6283ae1005d0c829b8f552ac5af (patch) | |
tree | f8d64563e1f26b6ad4279fc7fce860a57af20802 /docs/esp8266/tutorial/filesystem.rst | |
parent | a3519332b65837987d33cdae1a8fa8a509b9ad4e (diff) | |
download | micropython-67b6d9d499bee6283ae1005d0c829b8f552ac5af.tar.gz micropython-67b6d9d499bee6283ae1005d0c829b8f552ac5af.zip |
zephyr: Initial implementation of machine.Pin.
The integration with Zephyr is fairly clean but as MicroPython Hardware API
requires pin ID to be a single value, but Zephyr operates GPIO in terms of
ports and pins, not just pins, a "hierarchical" ID is required, using tuple
of (port, pin). Port is a string, effectively a device name of a GPIO port,
per Zephyr conventions these are "GPIO_0", "GPIO_1", etc.; pin is integer
number of pin with the port (supposed to be in range 0-31).
Example of pin initialization:
pin = Pin(("GPIO_1", 21), Pin.OUT)
(an LED on FRDM-K64F's Port B, Pin 21).
There is support for in/out pins and pull up/pull down but currently
there is no interrupt support.
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Diffstat (limited to 'docs/esp8266/tutorial/filesystem.rst')
0 files changed, 0 insertions, 0 deletions