aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/pins.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/pins.py')
-rw-r--r--klippy/pins.py5
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
}