[genpinmap] Fix STM32L47xxx/48xxx ADC pinmap
For the ADC, it is necessary to configure the GPIOx_ASCR register, only for STM32L47xxx/48xxx Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
This commit is contained in:
parent
c41950af8b
commit
61b2c93dde
1 changed files with 7 additions and 1 deletions
|
|
@ -373,7 +373,13 @@ const PinMap PinMap_%s[] = {
|
|||
|
||||
def print_adc():
|
||||
# Check GPIO version (alternate or not)
|
||||
s_pin_data = "STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, "
|
||||
s_pin_data = "STM_PIN_DATA_EXT(STM_MODE_ANALOG"
|
||||
# For STM32L47xxx/48xxx, it is necessary to configure
|
||||
# the GPIOx_ASCR register
|
||||
if re.match("STM32L4[78]+", mcu_file):
|
||||
s_pin_data += "_ADC_CONTROL"
|
||||
s_pin_data += ", GPIO_NOPULL, 0, "
|
||||
|
||||
for p in adclist:
|
||||
if "IN" in p[2]:
|
||||
s1 = "%-12s" % (" {" + p[0] + ",")
|
||||
|
|
|
|||
Loading…
Reference in a new issue