Hi giorgio,
To check if a given input pin is high:
if (REG_PORT_IN0 & PORT_PA30)
{
// Add your code here...
}
Where the "0" suffix of the REG_PORT_IN0 register denotes port A.
An identical, but alternative syntax is:
if (PORT->Group[PORTA].IN.reg & PORT_PA30)
{
// Add your code here...
}