The example below uses the SOFTLATCH to control power to the TEENSY.
The optional push button shown in the circuit works in parallel with the on-board push button on the SOFTLATCH and allows the circuit to be switched on or off.
The TEENSY can disable power by pulling the KILL line LOW.
If power is to be removed by the SOFTLATCH due to either timeout or push button action, then the STOPPING input to the TEENSY is activated to give that device warning of impending power loss.
This feature suits embedded operating systems like the Raspberry Pi that require the execution of shutdown commands prior to power loss.