Other Parts Discussed in Thread: MSP430WARE, MSP430G2412
There seem to be many ways to manage LPM modes when programming MSP430 in C. There are LPM0-LPM4 macros, _BIC_SR and _BIS_SR macros, _bic_SR* and _bis_SR* intrinsics, and some books recommend using __low_ power_mode_*() and __low_ power_mode_off_on_exit().
Assuming I'm not writing throwaway code, but something which will be published as an open-source library and I do care about code quality — which ones do I use? Are there any official guidelines on which macros/intrinsics are "canonical" and which are just patchwork for legacy requirements?
I'm also slightly confused: does the LPM0_EXIT macro only exit from LPM0? Or does it clear all SR bits related to LPM and just exits active? (if so, why isn't it called ACTIVE_EXIT or something similar?)