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 <frederic.pillon@st.com>
This commit is contained in:
Frederic.Pillon 2017-08-22 09:36:12 +02:00
parent 9a384417b4
commit f5c8329c64

View file

@ -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: