if ( (Ports[g_aPinMap[ulPin].iPort].pGPIO->PIO_PDSR & g_aPinMap[ulPin].ulPin) != 0 )
{
return HIGH ;
}
However if the pin is programmed as output, PIO_PDSR seems not to get the pin state. I discover the ATMEL peripherals but maybe PIO_ODSR should be read instead when the pin is programmed as output.
(tested on Arduino DUE)
digitalRead does:
However if the pin is programmed as output, PIO_PDSR seems not to get the pin state. I discover the ATMEL peripherals but maybe PIO_ODSR should be read instead when the pin is programmed as output.