SLAU646F September 2015 – June 2020
GCC provides special built-in functions to aid in the writing of interrupt handlers in C.
__bic_SR_register_on_exit (int mask)
This clears the indicated bits in the saved copy of the status register that currently resides on the stack. This only works inside interrupt handlers and the changes to the status register only take effect after the handler returns.
__bis_SR_register_on_exit (int mask)
This sets the indicated bits in the saved copy of the status register that currently resides on the stack. This only works inside interrupt handlers and the changes to the status register only take effect after the handler returns.