Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/STM32 Modified Python script generates Peripheral Pins #14729

Merged
merged 1 commit into from
Jun 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,6 @@ def print_adc():
# the GPIOx_ASCR register
if re.match("STM32L4[78]+", mcu_file):
s_pin_data += "_ADC_CONTROL"
s_pin_data += ", GPIO_NOPULL, 0, "

prev_p = ''
alt_index = 0
Expand Down Expand Up @@ -698,8 +697,9 @@ def print_adc():
if len(inst) == 0:
inst = '1' #single ADC for this product
line_to_write += "%-7s" % ('ADC_' + inst + ',')
chan = re.sub('IN[N|P]?', '', a[1])
line_to_write += s_pin_data + chan
chan = re.sub(r"^IN[N|P]?|\D*$", "", a[1])
bank = "_ADC_CHANNEL_BANK_B" if a[1].endswith("b") else ""
line_to_write += s_pin_data + bank + ", GPIO_NOPULL, 0, " + chan
line_to_write += ', 0)}, // ' + parsed_pin[2]
if parsed_pin[1] in PinLabel:
line_to_write += ' // Connected to ' + PinLabel[parsed_pin[1]]
Expand Down