Last active
November 5, 2023 03:31
-
-
Save drashna/79d14917f98f07e73071cbb391fcb654 to your computer and use it in GitHub Desktop.
custom oled sync and timeout for asymmetical oled config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define SPLIT_POINTING_ENABLE | |
#define POINTING_DEVICE_RIGHT | |
#undef SPLIT_OLED_ENABLE | |
#define OLED_TIMEOUT 0 | |
#define SPLIT_ACTIVITY_ENABLE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool is_oled_enabled = true; | |
bool oled_task_user(void) { | |
if (!is_oled_enabled) { | |
oled_off(); | |
return false; | |
} else { | |
oled_on(); | |
} | |
// rest of code | |
return false; | |
} | |
void housekeeping_task_user(void) { | |
is_oled_enabled = (bool)(last_input_activity_elapsed()) < 60000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment