Synopsis
#include <inmsp.h>
unsigned short __bic_SR_register_on_exit(unsigned short mask);
Description

__bic_SR_register_on_exit clears the bits specified in mask in the saved status register of an interrupt function (i.e. it bitwise ands the complement of mask into the saved status register). This allows you to change the operating mode of the MSP430 on return from the interrupt service routine, such as changing the low power mode.

__bic_SR_register_on_exit returns the value of the saved MSP430 status register before the update.

__bic_SR_register_on_exit is an intrinsic function and produces inline code.

Restrictions

__bic_SR_register_on_exit can only be used in interrupt functions—an error is reported if it is used outside an interrupt function.

Portability

__bic_SR_register_on_exit can be used on any MSP430 device.