@@ -382,7 +382,7 @@ def print_adc():
382
382
383
383
for p in adclist :
384
384
if "IN" in p [2 ]:
385
- s1 = "%-12s " % (" {" + p [0 ] + "," )
385
+ s1 = "%-10s " % (" {" + p [0 ] + "," )
386
386
a = p [2 ].split ("_" )
387
387
inst = a [0 ].replace ("ADC" , "" )
388
388
if len (inst ) == 0 :
@@ -393,7 +393,7 @@ def print_adc():
393
393
s1 += ", 0)}, // " + p [2 ] + "\n "
394
394
out_c_file .write (s1 )
395
395
out_c_file .write (
396
- """ {NC, NP, 0}
396
+ """ {NC, NP, 0}
397
397
};
398
398
#endif
399
399
"""
@@ -403,7 +403,7 @@ def print_adc():
403
403
def print_dac ():
404
404
for p in daclist :
405
405
b = p [2 ]
406
- s1 = "%-12s " % (" {" + p [0 ] + "," )
406
+ s1 = "%-10s " % (" {" + p [0 ] + "," )
407
407
# 2nd element is the DAC signal
408
408
if b [3 ] == "_" : # 1 DAC in this chip
409
409
s1 += (
@@ -425,7 +425,7 @@ def print_dac():
425
425
)
426
426
out_c_file .write (s1 )
427
427
out_c_file .write (
428
- """ {NC, NP, 0}
428
+ """ {NC, NP, 0}
429
429
};
430
430
#endif
431
431
"""
@@ -436,7 +436,7 @@ def print_i2c(lst):
436
436
for p in lst :
437
437
result = get_gpio_af_num (p [1 ], p [2 ])
438
438
if result != "NOTFOUND" :
439
- s1 = "%-12s " % (" {" + p [0 ] + "," )
439
+ s1 = "%-10s " % (" {" + p [0 ] + "," )
440
440
# 2nd element is the I2C XXX signal
441
441
b = p [2 ].split ("_" )[0 ]
442
442
s1 += (
@@ -449,7 +449,7 @@ def print_i2c(lst):
449
449
s2 = s1 + af + ")},\n "
450
450
out_c_file .write (s2 )
451
451
out_c_file .write (
452
- """ {NC, NP, 0}
452
+ """ {NC, NP, 0}
453
453
};
454
454
#endif
455
455
"""
@@ -460,7 +460,7 @@ def print_pwm():
460
460
for p in pwm_list :
461
461
result = get_gpio_af_num (p [1 ], p [2 ])
462
462
if result != "NOTFOUND" :
463
- s1 = "%-12s " % (" {" + p [0 ] + "," )
463
+ s1 = "%-10s " % (" {" + p [0 ] + "," )
464
464
# 2nd element is the PWM signal
465
465
a = p [2 ].split ("_" )
466
466
inst = a [0 ]
@@ -479,7 +479,7 @@ def print_pwm():
479
479
s2 = s1 + af + ", " + chan + neg + ")}, // " + p [2 ] + "\n "
480
480
out_c_file .write (s2 )
481
481
out_c_file .write (
482
- """ {NC, NP, 0}
482
+ """ {NC, NP, 0}
483
483
};
484
484
#endif
485
485
"""
@@ -490,7 +490,7 @@ def print_uart(lst):
490
490
for p in lst :
491
491
result = get_gpio_af_num (p [1 ], p [2 ])
492
492
if result != "NOTFOUND" :
493
- s1 = "%-12s " % (" {" + p [0 ] + "," )
493
+ s1 = "%-10s " % (" {" + p [0 ] + "," )
494
494
# 2nd element is the UART_XX signal
495
495
b = p [2 ].split ("_" )[0 ]
496
496
s1 += "%-9s" % (b [: len (b ) - 1 ] + b [len (b ) - 1 :] + "," )
@@ -503,7 +503,7 @@ def print_uart(lst):
503
503
s2 = s1 + af + ")},\n "
504
504
out_c_file .write (s2 )
505
505
out_c_file .write (
506
- """ {NC, NP, 0}
506
+ """ {NC, NP, 0}
507
507
};
508
508
#endif
509
509
"""
@@ -514,7 +514,7 @@ def print_spi(lst):
514
514
for p in lst :
515
515
result = get_gpio_af_num (p [1 ], p [2 ])
516
516
if result != "NOTFOUND" :
517
- s1 = "%-12s " % (" {" + p [0 ] + "," )
517
+ s1 = "%-10s " % (" {" + p [0 ] + "," )
518
518
# 2nd element is the SPI_XXXX signal
519
519
instance = p [2 ].split ("_" )[0 ].replace ("SPI" , "" )
520
520
s1 += "SPI" + instance + ", STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, "
@@ -523,7 +523,7 @@ def print_spi(lst):
523
523
s2 = s1 + af + ")},\n "
524
524
out_c_file .write (s2 )
525
525
out_c_file .write (
526
- """ {NC, NP, 0}
526
+ """ {NC, NP, 0}
527
527
};
528
528
#endif
529
529
"""
@@ -534,7 +534,7 @@ def print_can(lst):
534
534
for p in lst :
535
535
result = get_gpio_af_num (p [1 ], p [2 ])
536
536
if result != "NOTFOUND" :
537
- s1 = "%-12s " % (" {" + p [0 ] + "," )
537
+ s1 = "%-10s " % (" {" + p [0 ] + "," )
538
538
# 2nd element is the CAN_XX signal
539
539
instance = p [2 ].split ("_" )[0 ].replace ("CAN" , "" )
540
540
if len (instance ) == 0 :
@@ -548,7 +548,7 @@ def print_can(lst):
548
548
s2 = s1 + af + ")},\n "
549
549
out_c_file .write (s2 )
550
550
out_c_file .write (
551
- """ {NC, NP, 0}
551
+ """ {NC, NP, 0}
552
552
};
553
553
#endif
554
554
"""
@@ -560,7 +560,7 @@ def print_eth():
560
560
for p in eth_list :
561
561
result = get_gpio_af_num (p [1 ], p [2 ])
562
562
if result != "NOTFOUND" :
563
- s1 = "%-12s " % (" {" + p [0 ] + "," )
563
+ s1 = "%-10s " % (" {" + p [0 ] + "," )
564
564
# 2nd element is the ETH_XXXX signal
565
565
s1 += "ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, " + result + ")},"
566
566
# check duplicated lines, only signal differs
@@ -573,7 +573,7 @@ def print_eth():
573
573
s1 += " // " + p [2 ]
574
574
out_c_file .write (s1 )
575
575
out_c_file .write (
576
- """\n {NC, NP, 0}
576
+ """\n {NC, NP, 0}
577
577
};
578
578
#endif
579
579
"""
@@ -585,7 +585,7 @@ def print_qspi():
585
585
for p in qspi_list :
586
586
result = get_gpio_af_num (p [1 ], p [2 ])
587
587
if result != "NOTFOUND" :
588
- s1 = "%-12s " % (" {" + p [0 ] + "," )
588
+ s1 = "%-10s " % (" {" + p [0 ] + "," )
589
589
# 2nd element is the QUADSPI_XXXX signal
590
590
s1 += "QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, " + result + ")},"
591
591
# check duplicated lines, only signal differs
@@ -598,15 +598,15 @@ def print_qspi():
598
598
s1 += " // " + p [2 ]
599
599
out_c_file .write (s1 )
600
600
out_c_file .write (
601
- """\n {NC, NP, 0}
601
+ """\n {NC, NP, 0}
602
602
};
603
603
#endif
604
604
"""
605
605
)
606
606
607
607
608
608
def print_syswkup ():
609
- out_h_file .write (" /* SYS_WKUP */\n " )
609
+ out_h_file .write (" /* SYS_WKUP */\n " )
610
610
# H7xx and F446 start from 0, inc by 1
611
611
num = syswkup_list [0 ][2 ].replace ("SYS_WKUP" , "" )
612
612
inc = 0
@@ -629,10 +629,10 @@ def print_syswkup():
629
629
num = p [2 ].replace ("SYS_WKUP" , "" )
630
630
if len (num ) == 0 :
631
631
s1 = "#ifdef PWR_WAKEUP_PIN1\n "
632
- s1 += " SYS_WKUP1" # single SYS_WKUP for this product
632
+ s1 += " SYS_WKUP1" # single SYS_WKUP for this product
633
633
else :
634
634
s1 = "#ifdef PWR_WAKEUP_PIN%i\n " % (int (num ) + inc )
635
- s1 += " SYS_WKUP" + str (int (num ) + inc )
635
+ s1 += " SYS_WKUP" + str (int (num ) + inc )
636
636
s1 += " = " + p [0 ] + ","
637
637
if (inc == 1 ) and (p [0 ] != "NC" ):
638
638
s1 += " /* " + p [2 ] + " */"
0 commit comments