Skip to content

Commit f5c8329

Browse files
committed
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 <[email protected]>
1 parent 9a38441 commit f5c8329

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/genpinmap/genpinmap_arduino.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,8 @@ def print_can(xml, l):
442442
s1 = "%-12s" % (" {" + p[0] + ',')
443443
#2nd element is the CAN_XX signal
444444
instance = p[2].split('_')[0].replace("CAN", "")
445-
#if len(instance) == 0:
446-
# instance = '1'
445+
if len(instance) == 0:
446+
instance = '1'
447447
if 'STM32F10' in sys.argv[2] and l == canrd_list:
448448
s1 += 'CAN' + instance + ', STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, '
449449
else:

0 commit comments

Comments
 (0)