mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 14:33:52 +01:00
cpu/stm32: add GPIO_PIN macro for stm32mp1 family
As stm32mp1 family accesses gpio pins with a different offset than other stm32, create a specific macro. Signed-off-by: Gilles DOFFE <gilles.doffe@savoirfairelinux.com>
This commit is contained in:
parent
bdc1cce04d
commit
4f0fd9cf95
@ -221,7 +221,11 @@ typedef uint32_t gpio_t;
|
||||
/**
|
||||
* @brief Define a CPU specific GPIO pin generator macro
|
||||
*/
|
||||
#if defined(CPU_FAM_STM32MP1)
|
||||
#define GPIO_PIN(x, y) ((GPIOA_BASE + (x << 12)) | y)
|
||||
#else
|
||||
#define GPIO_PIN(x, y) ((GPIOA_BASE + (x << 10)) | y)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Available GPIO ports
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user