add macro for goto sleep and wakeup