Open-CMSIS-Pack / CMSIS-Driver_STM32

CMSIS Software Pack repository for interface adapter mapping from CMSIS-Driver to STM32Cube HAL APIs
https://open-cmsis-pack.github.io/CMSIS-Driver_STM32/
Apache License 2.0
2 stars 3 forks source link

Add GPIO helper macros to the GPIO_STM32.h #8

Closed TeoMahnic closed 1 month ago

TeoMahnic commented 1 month ago

Add helper macros for GPIO Pin mapping to the GPIO_STM32.h

Example:

// Pin mapping
#define GPIO_PORTA(n)   (  0U + (n))
#define GPIO_PORTB(n)   ( 16U + (n))
#define GPIO_PORTC(n)   ( 32U + (n))
#define GPIO_PORTD(n)   ( 48U + (n))
#define GPIO_PORTE(n)   ( 64U + (n))
#define GPIO_PORTF(n)   ( 80U + (n))
#define GPIO_PORTG(n)   ( 96U + (n))
#define GPIO_PORTH(n)   (112U + (n))
#define GPIO_PORTI(n)   (128U + (n))
#define GPIO_PORTJ(n)   (144U + (n))
MiloradCvjetkovic commented 1 month ago

Addressed in commit https://github.com/Open-CMSIS-Pack/CMSIS-Driver_STM32/commit/83f474beed902cb77b7458f4d23fdff08b90b4e1