Skip to content

Instantly share code, notes, and snippets.

@pamaury
Last active December 20, 2015 08:49
Show Gist options
  • Save pamaury/6103169 to your computer and use it in GitHub Desktop.
Save pamaury/6103169 to your computer and use it in GitHub Desktop.
/* first init power somewhere */
sleep_mode = rmi_get_sleep_mode();
if(btns & BUTTON_VOL_UP)
if(sleep_mode < RMI_SLEEP_MODE_FULLY_AWAKE)
sleep_mode++;
if(btns & BUTTON_VOL_DONW)
if(sleep_mode > RMI_SLEEP_MODE_SLEEP)
sleep_mode--;
rmi_set_sleep_mode(sleep_mode);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment