Hello Jeffrey Stewart:
That is correct, BitIO and SPI components cannot share the pin. However adding a component just to read a pin value is probably an overkill. You can simply read directly the input data register, like below:
if(GPIOx_PDIR & (PIN_MASK))
{
...
}
Replace x with the port (A, B, C...) and PIN_MASK with the corresponding pin mask, e.g. (1 << 17) for PTA17.
I hope this helps.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------