I've got an accelerometer with a couple interrupt pins and I've figured out how to get it to fire its interrupts on any change in acceleration or lack thereof for a given duration.
What I want to do is have it switch a 3.7v battery power supply on and off based on the interrupts - if no change in acceleration for a couple of minutes, have the interrupt latch the power off to the rest of the device. And conversely, if the device is already in the powered off state, have it latch the power back on the instant you pick it up. Obviously for this to work the accelerometer always needs to be powered and can't latch power off to itself.
How can this be accomplished? Don't cringe but is there such a thing as a "toggle" transistor?