diff options
Diffstat (limited to 'keyboards/spaceman/pancake/rev2/rev2.c')
| -rw-r--r-- | keyboards/spaceman/pancake/rev2/rev2.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/keyboards/spaceman/pancake/rev2/rev2.c b/keyboards/spaceman/pancake/rev2/rev2.c new file mode 100644 index 000000000..c1786cb01 --- /dev/null +++ b/keyboards/spaceman/pancake/rev2/rev2.c | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | /* Copyright 2020 Spaceman | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include "rev2.h" | ||
| 17 | |||
| 18 | |||
| 19 | #ifdef OLED_DRIVER_ENABLE | ||
| 20 | __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
| 21 | return OLED_ROTATION_270; | ||
| 22 | } | ||
| 23 | __attribute__((weak)) void oled_task_user(void) { | ||
| 24 | static const char PROGMEM pancake_logo[] = { | ||
| 25 | 0x00, 0x00, 0x3e, 0x0a, 0x04, 0x00, 0x3c, 0x0a, 0x3c, 0x00, 0x3e, 0x0c, 0x18, 0x3e, 0x00, 0x3e, | ||
| 26 | 0x22, 0x22, 0x00, 0x3c, 0x0a, 0x3c, 0x00, 0x3e, 0x08, 0x36, 0x00, 0x3e, 0x2a, 0x22, 0x00, 0x00, | ||
| 27 | 0x00, 0x30, 0xc8, 0x84, 0x84, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x19, 0x1d, | ||
| 28 | 0x1d, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x84, 0x84, 0xc8, 0x30, 0x00, | ||
| 29 | 0x00, 0x63, 0x94, 0x08, 0x08, 0x11, 0x71, 0x17, 0x13, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x62, | ||
| 30 | 0xe2, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x11, 0x11, 0x11, 0x31, 0x08, 0x08, 0x94, 0x63, 0x00, | ||
| 31 | 0x00, 0x00, 0x03, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | ||
| 32 | 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x02, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00 }; | ||
| 33 | oled_write_raw_P(pancake_logo, sizeof(pancake_logo)); | ||
| 34 | // Host Keyboard Layer Status | ||
| 35 | oled_set_cursor(0, 4); | ||
| 36 | oled_write_P(PSTR("\nLAYER\n-----\n"), false); | ||
| 37 | |||
| 38 | switch (get_highest_layer(layer_state)) { | ||
| 39 | case 0: | ||
| 40 | oled_write_P(PSTR("DEFLT\n"), false); | ||
| 41 | break; | ||
| 42 | case 2: | ||
| 43 | oled_write_P(PSTR("FUNCT\n"), false); | ||
| 44 | break; | ||
| 45 | case 1: | ||
| 46 | oled_write_P(PSTR("RAISE\n"), false); | ||
| 47 | break; | ||
| 48 | default: | ||
| 49 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 50 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 51 | break; | ||
| 52 | } | ||
| 53 | } | ||
| 54 | #endif | ||
