From 91cf497656a9ffaf2b35916bb1101fc4ac844539 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 12 Mar 2019 12:30:21 -0400 Subject: stm32f1: Use enumerations for pin mappings Signed-off-by: Kevin O'Connor --- klippy/pins.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'klippy/pins.py') diff --git a/klippy/pins.py b/klippy/pins.py index e998f248..26d0bf67 100644 --- a/klippy/pins.py +++ b/klippy/pins.py @@ -13,16 +13,6 @@ class error(Exception): # Hardware pin names ###################################################################### -def port_pins(port_count, bit_count=8): - pins = {} - for port in range(port_count): - portchr = chr(65 + port) - if portchr == 'I': - continue - for portbit in range(bit_count): - pins['P%c%d' % (portchr, portbit)] = port * bit_count + portbit - return pins - def named_pins(fmt, port_count, bit_count=32): return { fmt % (port, portbit) : port * bit_count + portbit for port in range(port_count) @@ -34,7 +24,6 @@ def beaglebone_pins(): return gpios MCU_PINS = { - "stm32f103": port_pins(5, 16), "pru": beaglebone_pins(), "linux": {"analog%d" % i: i for i in range(8)}, # XXX } -- cgit v1.2.3-70-g09d2