This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

#if ISR

I have created a very useful macro that will have disastrous results if it is used inside an ISR. A few years from now some unsuspecting soul (who could be me) will probably use it inside an ISR and spend days debugging.

Is there a means of:

#if ISR
tell the clown this is bad
#endif

If not, would this be a useful addition?

Erik

Parents
  • After all, isn't part of the philosophy of C 'if you don't know what you are doing, you are in trouble'
    Absolutotally agree, I have, however, who knows how often, found things like the above being the cause of wasted time. One reason, of course, is that when emulating you do not see the innards of a macro. If macro code and comments were shown my question would be irrelevant since the very first glance in the debugger would tell the story. Another reason for my statement is that the reason I have found most often for 'mysterious behaviour' indeed is such a mistake.

    My basic philosophy is to do everything possible to help the poor sod that has to do a "small enhancement" (we all know what that means) to my code after I have moved to other things.

    Erik

Reply
  • After all, isn't part of the philosophy of C 'if you don't know what you are doing, you are in trouble'
    Absolutotally agree, I have, however, who knows how often, found things like the above being the cause of wasted time. One reason, of course, is that when emulating you do not see the innards of a macro. If macro code and comments were shown my question would be irrelevant since the very first glance in the debugger would tell the story. Another reason for my statement is that the reason I have found most often for 'mysterious behaviour' indeed is such a mistake.

    My basic philosophy is to do everything possible to help the poor sod that has to do a "small enhancement" (we all know what that means) to my code after I have moved to other things.

    Erik

Children