File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
bsp/stm32/libraries/HAL_Drivers Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 2121#define PIN_PORT (pin ) ((uint8_t)(((pin) >> 4) & 0xFu))
2222#define PIN_NO (pin ) ((uint8_t)((pin) & 0xFu))
2323
24+ #if defined(SOC_SERIES_STM32MP1 )
25+ #if defined(GPIOZ )
26+ #define gpioz_port_base (175) /* PIN_STPORT_MAX * 16 - 16 */
27+ #define PIN_STPORT (pin ) ((pin > gpioz_port_base) ? ((GPIO_TypeDef *)(GPIOZ_BASE )) : ((GPIO_TypeDef *)(GPIOA_BASE + (0x1000u * PIN_PORT(pin)))))
28+ #else
29+ #define PIN_STPORT (pin ) ((GPIO_TypeDef *)(GPIOA_BASE + (0x1000u * PIN_PORT(pin)))))
30+ #endif /* GPIOZ */
31+ #else
2432#define PIN_STPORT (pin ) ((GPIO_TypeDef *)(GPIOA_BASE + (0x400u * PIN_PORT(pin))))
33+ #endif /* SOC_SERIES_STM32MP1 */
34+
2535#define PIN_STPIN (pin ) ((uint16_t)(1u << PIN_NO(pin)))
2636
2737#if defined(GPIOZ )
You can’t perform that action at this time.
0 commit comments