I want to create a generic object that can protect its resource. In my case, it is a SPI channel object. I need to be able to call this from either a normal task or from an ISR.
I saw a post from 2009, but didn't understand the reply.
Alternatively, is there a way to determine at run time if a function has been invoked from a task or from an ISR?
I can only answer your question with a question - which port are you using?