mirror of
https://github.com/apache/nuttx.git
synced 2026-08-04 05:39:01 +00:00
Use GPIO_MODE_INPUT for STM32F1 pinmap entries that are configured as
GPIO_INPUT instead of carrying GPIO_MODE_2MHz.
For STM32F1 the MODE field selects output speed only for output or
alternate-function output pins. stm32_configgpio() forces input pins to
input mode regardless of the encoded MODE bits.
From arch/arm/src/stm32/stm32_gpio.c:
311 /* Decode the mode and configuration */
312
313 regval = getreg32(cr);
314
315 if (input)
316 {
317 /* Input.. force mode = INPUT */
318
319 modecnf = 0;
320 }
321 else
322 {
323 /* Output or alternate function */
324
325 modecnf = (cfgset & GPIO_MODE_MASK) >> GPIO_MODE_SHIFT;
326 }
Signed-off-by: raiden00pl <raiden00@railab.me>
|
||
|---|---|---|
| .. | ||
| arm | ||
| arm64 | ||
| avr | ||
| ceva | ||
| dummy | ||
| hc | ||
| mips | ||
| misoc | ||
| or1k | ||
| renesas | ||
| risc-v | ||
| sim | ||
| sparc | ||
| tricore | ||
| x86 | ||
| x86_64 | ||
| xtensa | ||
| z16 | ||
| z80 | ||
| CMakeLists.txt | ||
| Kconfig | ||