Skip to content

Commit

Permalink
Set CAN1 if only one instance
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
fpistm committed Aug 22, 2017
1 parent 9a38441 commit f5c8329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/genpinmap/genpinmap_arduino.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f5c8329

Please sign in to comment.