I have a point in my code where I need to check if program came here from an interrupt or a task. I am using SMX. Anyone used SMX can an开发者_JS百科swer his question. I didn't get enough info from docs. So, basically I want some variable/parameter in order to distinguish between an ISR and a task.
Surely the code path is unique. I don't know about SMX, but surely it doesn't override the usual mechanism whereby a function called by an interrupt has special handling to establish the stack frame, preserve registers, and maybe establish a static link to the module variables. In such cases, the obvious means to check ISR vs. another route is for the ISR to set a flag at entry and clear it when it exits.
精彩评论