mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-10-26 07:46:11 +01:00
lpc176x: Add support for GPIO pins
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user