I was trying to write a code to use my keypad, but I face a problem. Because I'm new in using standard libraries I didn't face a similar problem when I was using registers(in LPC series).
#define COLUMN_PIN_1 GPIO_PIN_4
#define COLUMN_PIN_2 GPIO_PIN_5
#define COLUMN_PIN_3 GPIO_PIN_4
#define COLUMN_PIN_4 GPIO_PIN_2
#define COLUMN_PORT_1 GPIOB
#define COLUMN_PORT_2 GPIOB
#define COLUMN_PORT_3 GPIOF
#define COLUMN_PORT_4 GPIOA
In this code, I thought that the amount of the j will be replaced and for example when j is 1 COLUMN_PORT_j is COLUMN_PORT_1.
What should I do to achieve this purpose?