Created
July 11, 2021 13:26
-
-
Save takashicompany/b511c896e301f955b907c5853efac2d8 to your computer and use it in GitHub Desktop.
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
#ifdef OLED_DRIVER_ENABLE | |
void oled_task_user(void) { | |
// 現在のレイヤーを表示する | |
oled_write_ln_P(PSTR("Layer"), false); | |
char layer_str[12]; | |
snprintf(layer_str, sizeof(layer_str), "%d", get_highest_layer(layer_state)); | |
oled_write_ln(layer_str, false); | |
// 改行を入れる | |
oled_write_ln_P(PSTR(" "), false); | |
oled_write_ln_P(PSTR(" "), false); | |
// キーを押した回数を表示する | |
oled_write_ln_P(PSTR("Count"), false); | |
char count_str[24]; | |
snprintf(count_str, sizeof(count_str), "%d", press_count); | |
oled_write_ln(count_str, false); | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment