Skip to content

Commit 1937500

Browse files
committed
script(stm32variant): add sdmmc signals availability
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 7058272 commit 1937500

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

CI/update/stm32variant.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,21 @@ def alias_definition():
14431443
return alias_list
14441444

14451445

1446+
def sdmmc_signals():
1447+
sdmmcNA_list = []
1448+
# Check if SDMMC instance
1449+
if sdxd0_list and "SDMMC" in sdxd0_list[0][2]:
1450+
if not sdmmcckin_list:
1451+
sdmmcNA_list.append("SDMMC_CKIN_NA")
1452+
if not sdmmccdir_list:
1453+
sdmmcNA_list.append("SDMMC_CDIR_NA")
1454+
if not sdmmcd0dir_list:
1455+
sdmmcNA_list.append("SDMMC_D0DIR_NA")
1456+
if not sdmmcd123dir_list:
1457+
sdmmcNA_list.append("SDMMC_D123DIR_NA")
1458+
return sdmmcNA_list
1459+
1460+
14461461
def print_variant(generic_list, alt_syswkup_list):
14471462
variant_h_template = j2_env.get_template(variant_h_filename)
14481463
variant_cpp_template = j2_env.get_template(variant_cpp_filename)
@@ -1467,6 +1482,9 @@ def print_variant(generic_list, alt_syswkup_list):
14671482
# Alias to ease some usage
14681483
alias_list = alias_definition()
14691484

1485+
# SDMMC signals definition
1486+
sdmmcNA_list = sdmmc_signals()
1487+
14701488
# Manage all pins number, PinName and analog pins
14711489
analog_index = 0
14721490
pins_number_list = []
@@ -1548,6 +1566,7 @@ def print_variant(generic_list, alt_syswkup_list):
15481566
serial=serial,
15491567
hal_modules_list=hal_modules_list,
15501568
alias_list=alias_list,
1569+
sdmmcNA_list=sdmmcNA_list,
15511570
)
15521571
)
15531572

CI/update/templates/variant_generic.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@
107107
#endif
108108
{% endfor %}
109109

110+
{% endif %}
111+
{% if sdmmcNA_list %}
112+
// SDMMC signals not available
113+
{% for sdmmcNA in sdmmcNA_list %}
114+
#define {{sdmmcNA}}
115+
{% endfor %}
116+
110117
{% endif %}
111118
{% if hal_modules_list %}
112119
// Extra HAL modules

0 commit comments

Comments
 (0)