diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-05-08 12:20:10 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-05-25 11:52:13 -0400 |
commit | c78b90767f19c9e8510c3155b89fb7ad64ca3c54 (patch) | |
tree | 28a440f6667150d9e8f88e849e825846e52301fb /klippy/pins.py | |
parent | 970831ee0d3b91897196e92270d98b2a3067427f (diff) | |
download | kutter-c78b90767f19c9e8510c3155b89fb7ad64ca3c54.tar.gz kutter-c78b90767f19c9e8510c3155b89fb7ad64ca3c54.tar.xz kutter-c78b90767f19c9e8510c3155b89fb7ad64ca3c54.zip |
lpc176x: Add support for GPIO pins
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/pins.py')
-rw-r--r-- | klippy/pins.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/klippy/pins.py b/klippy/pins.py index 18e8b921..bfffe98e 100644 --- a/klippy/pins.py +++ b/klippy/pins.py @@ -25,6 +25,10 @@ def named_pins(fmt, port_count, bit_count=32): for port in range(port_count) for portbit in range(bit_count) } +def lpc_pins(): + return { 'P%d.%d' % (port, pin) : port * 32 + pin + for port in range(5) for pin in range(32) } + def beaglebone_pins(): gpios = named_pins("gpio%d_%d", 4) gpios.update({"AIN%d" % i: i+4*32 for i in range(8)}) @@ -37,6 +41,7 @@ MCU_PINS = { "atmega1280": port_pins(12), "atmega2560": port_pins(12), "sam3x8e": port_pins(4, 32), "stm32f103": port_pins(5, 16), + "lpc176x": lpc_pins(), "pru": beaglebone_pins(), "linux": {"analog%d" % i: i for i in range(8)}, # XXX } |