what would x and y need to be, i'm abit unsure looking at the pal driver.
Code: Select all
typedef struct {
x port;
y pin;
}PINTBL_TypeDef;
static const PINTBL_TypeDef table[] =
{
{ GPIOA, GPIOA_PIN4, },
{ GPIOB, GPIOB_PIN5, },
};
usage :-
Code: Select all
PINTBL_TypeDef *p;
p = &table[i];
palReadPad(p->port, p->pin)