From f5c8329c643e7bb51db58c91cea7e8e05dfddab5 Mon Sep 17 00:00:00 2001 From: "Frederic.Pillon" Date: Tue, 22 Aug 2017 09:36:12 +0200 Subject: [PATCH] Set CAN1 if only one instance For some serie: - CAN is defined and not CAN1 - CAN is not defined and CAN1 is - CAN and CAN1 are defined Signed-off-by: Frederic.Pillon --- src/genpinmap/genpinmap_arduino.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/genpinmap/genpinmap_arduino.py b/src/genpinmap/genpinmap_arduino.py index b3f955ae..401337ea 100644 --- a/src/genpinmap/genpinmap_arduino.py +++ b/src/genpinmap/genpinmap_arduino.py @@ -442,8 +442,8 @@ def print_can(xml, l): s1 = "%-12s" % (" {" + p[0] + ',') #2nd element is the CAN_XX signal instance = p[2].split('_')[0].replace("CAN", "") - #if len(instance) == 0: - # instance = '1' + if len(instance) == 0: + instance = '1' if 'STM32F10' in sys.argv[2] and l == canrd_list: s1 += 'CAN' + instance + ', STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, ' else: