#!/bin/sh set -x i2cget -f -y 2 0x2d 0x3f i2cget -f -y 2 0x2d 0x40 i2cget -f -y 2 0x2d 0x42 i2cget -f -y 2 0x2d 0x43 i2cget -f -y 2 0x2d 0x50 i2cget -f -y 2 0x2d 0x52 # Keep RTC CLKOUT32K alive during sleep i2cset -f -y 2 0x2d 0x42 0x40 # Disable VDIG1 when in SLEEP i2cset -f -y 2 0x2d 0x43 0x02 # Clear pending interrupts i2cset -f -y 2 0x2d 0x50 0xff i2cset -f -y 2 0x2d 0x52 0xff # Enable SLEEP pin i2cset -f -y 2 0x2d 0x3f 0x72 i2cget -f -y 2 0x2d 0x3f i2cget -f -y 2 0x2d 0x40 i2cget -f -y 2 0x2d 0x42 i2cget -f -y 2 0x2d 0x43 i2cget -f -y 2 0x2d 0x50 i2cget -f -y 2 0x2d 0x52