From 3de3f885de12b297ba3526d7d3c3694785fd3ab8 Mon Sep 17 00:00:00 2001 From: Arturo Avila <69410272+ADPenrose@users.noreply.github.com> Date: Tue, 27 Dec 2022 14:09:01 -0600 Subject: [Keyboard] Add AkemiPad (#18790) Co-authored-by: Ryan --- .../adpenrose/akemipad/keymaps/default/keymap.c | 68 ++++ .../adpenrose/akemipad/keymaps/default/readme.md | 12 + .../adpenrose/akemipad/keymaps/default/rules.mk | 1 + .../keymaps/oled_bongocat/animation_frames.h | 392 +++++++++++++++++++++ .../keymaps/oled_bongocat/animation_process.h | 97 +++++ .../akemipad/keymaps/oled_bongocat/config.h | 15 + .../akemipad/keymaps/oled_bongocat/keymap.c | 196 +++++++++++ .../akemipad/keymaps/oled_bongocat/readme.md | 19 + .../akemipad/keymaps/oled_bongocat/rules.mk | 9 + keyboards/adpenrose/akemipad/keymaps/via/keymap.c | 154 ++++++++ keyboards/adpenrose/akemipad/keymaps/via/readme.md | 15 + keyboards/adpenrose/akemipad/keymaps/via/rules.mk | 3 + 12 files changed, 981 insertions(+) create mode 100644 keyboards/adpenrose/akemipad/keymaps/default/keymap.c create mode 100644 keyboards/adpenrose/akemipad/keymaps/default/readme.md create mode 100644 keyboards/adpenrose/akemipad/keymaps/default/rules.mk create mode 100644 keyboards/adpenrose/akemipad/keymaps/oled_bongocat/animation_frames.h create mode 100644 keyboards/adpenrose/akemipad/keymaps/oled_bongocat/animation_process.h create mode 100644 keyboards/adpenrose/akemipad/keymaps/oled_bongocat/config.h create mode 100644 keyboards/adpenrose/akemipad/keymaps/oled_bongocat/keymap.c create mode 100644 keyboards/adpenrose/akemipad/keymaps/oled_bongocat/readme.md create mode 100644 keyboards/adpenrose/akemipad/keymaps/oled_bongocat/rules.mk create mode 100644 keyboards/adpenrose/akemipad/keymaps/via/keymap.c create mode 100644 keyboards/adpenrose/akemipad/keymaps/via/readme.md create mode 100644 keyboards/adpenrose/akemipad/keymaps/via/rules.mk (limited to 'keyboards/adpenrose/akemipad/keymaps') diff --git a/keyboards/adpenrose/akemipad/keymaps/default/keymap.c b/keyboards/adpenrose/akemipad/keymaps/default/keymap.c new file mode 100644 index 0000000000..2a6ed46c70 --- /dev/null +++ b/keyboards/adpenrose/akemipad/keymaps/default/keymap.c @@ -0,0 +1,68 @@ +// Copyright 2022 Arturo Avila (@ADPenrose) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +/* Setting up the LED matrix */ +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0, 1, 2, 3, NO_LED }, + { 4, 5, 6, 7, NO_LED }, + { 8, 9, 10, 11, 12 }, + { 13, 14, 15, 16, NO_LED }, + { 17, 18, 19, 20, 21 }, + { 22, 23, 24, 25, 26 }, +}, { + // LED Index to Physical Position + { 0,0 }, { 37,0 }, { 74,0 }, {111,0 }, { 0,34 }, { 37,34 }, { 74,34 }, {111,34 }, { 0,62 }, { 37,62 }, + { 74,62 }, {111,62 }, {120,75 }, { 0,89 }, { 37,89 }, { 74,89 }, {111,89 }, { 0,117}, { 37,117}, { 74,117}, + {111,117}, {120,130}, { 0,137}, { 18,144}, { 37,137}, { 74,144}, {111,144} +}, { + // LED Index to Flag + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 +} }; + +/* Keymap */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + MO(1), MO(2), MO(3), KC_DEL, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_MUTE, KC_P0, KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_all( + KC_TRNS, CK_DOWN, CK_UP, CK_RST, + MU_TOG, MU_MOD, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + CK_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) }, + [2] = { ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, + [3] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } +}; +#endif diff --git a/keyboards/adpenrose/akemipad/keymaps/default/readme.md b/keyboards/adpenrose/akemipad/keymaps/default/readme.md new file mode 100644 index 0000000000..fafd76fb19 --- /dev/null +++ b/keyboards/adpenrose/akemipad/keymaps/default/readme.md @@ -0,0 +1,12 @@ +# The default keymap for the AkemiPad + + +## Features +- Audio Click and Music Mode capabilities. +- RGB Matrix Lighting (cycles left-right and up-down). +- Encoder Map feature. + +### Disclaimer +The AkemiPad has multiple layout options (each one with its own LED positions), but this keymap does not take that into consideration. +If you want to select an specific layout (and see how the LEDs turn on and off accordingly), you +should use the [via keymap](../via). diff --git a/keyboards/adpenrose/akemipad/keymaps/default/rules.mk b/keyboards/adpenrose/akemipad/keymaps/default/rules.mk new file mode 100644 index 0000000000..ee32568148 --- /dev/null +++ b/keyboards/adpenrose/akemipad/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/animation_frames.h b/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/animation_frames.h new file mode 100644 index 0000000000..062448b754 --- /dev/null +++ b/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/animation_frames.h @@ -0,0 +1,392 @@ +// Copyright 2022 Arturo Avila (@ADPenrose) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once +#ifdef OLED_ENABLE + +// Enable OLED bitmpa compression selectively. +#define USE_OLED_BITMAP_COMPRESSION + +#define NUM_IDLE_FRAMES 5 +#define NUM_TAP_FRAMES 2 +#define NUM_OLED_BYTES 512 + +#ifdef USE_OLED_BITMAP_COMPRESSION + +static const char PROGMEM idle_1_block_map[] = { //IDLE_1 and IDLE_2 flipped + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0xf0, 0xb0, 0xc1, 0x07, + 0xf0, 0xcf, 0x00, 0x1c, 0x00, 0xb8, 0x8f, 0x3f, 0x00, 0x98, 0xff, 0x00, 0x00, 0xf0, 0x03, 0x00, + 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc0, 0x01 +}; + +static const char PROGMEM idle_2_block_map[] = { //IDLE_3 flipped + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0xd8, 0xe0, 0x03, + 0xf0, 0x6f, 0x00, 0x3e, 0x00, 0xf8, 0xc7, 0x7f, 0x00, 0x98, 0x7f, 0x00, 0x00, 0xf0, 0x03, 0x00, + 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc0, 0x01 +}; + +static const char PROGMEM idle_3_block_map[] = { //IDLE_4 flipped + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01, 0xf0, 0xb0, 0xc1, 0x07, + 0xf0, 0xcf, 0x00, 0x7c, 0x00, 0xb8, 0x8f, 0xff, 0x00, 0x98, 0xff, 0x00, 0x00, 0xf0, 0x03, 0x00, + 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc0, 0x01 +}; + +static const char PROGMEM idle_4_block_map[] = { //IDLE_5 flipped + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0xb0, 0xc1, 0x07, + 0xf0, 0xcf, 0x00, 0x3c, 0x00, 0xb8, 0x8f, 0x7f, 0x00, 0x98, 0xff, 0x00, 0x00, 0xf0, 0x03, 0x00, + 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc0, 0x01 +}; + +static const char PROGMEM tap_1_block_map[] = { //TAP_1 flipped + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01, 0x80, 0xff, 0xc1, 0x07, + 0x00, 0xce, 0x00, 0x7c, 0x00, 0xb8, 0x8d, 0xff, 0x00, 0x98, 0xff, 0x1f, 0xc0, 0xff, 0xff, 0x1f, + 0x00, 0x3f, 0xfe, 0x01, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc0, 0x01 +}; + +static const char PROGMEM tap_2_block_map[] = { //TAP_2 flipped + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xde, 0xff, 0xff, 0x01, 0xfc, 0x80, 0xc1, 0x07, + 0xf1, 0xcf, 0x00, 0x7c, 0x00, 0xb8, 0x8d, 0xff, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x80, 0x3f, 0x00, + 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc0, 0x01 +}; + +static const char PROGMEM idle_1_block_list[] = { //IDLE_1 and IDLE_2 flipped + 0x3e, 0xc0, 0x07, 0xf8, 0x1f, 0xe0, 0x03, 0x7c, 0x80, 0x07, 0xf9, 0x01, 0x01, 0x02, 0x02, 0x02, + 0x04, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x04, 0xf8, 0xe0, 0x18, 0x06, 0x01, 0x78, 0x78, + 0xc0, 0xc0, 0x01, 0x02, 0x04, 0x18, 0xe0, 0x03, 0x04, 0x04, 0x04, 0x04, 0x02, 0x1c, 0xe0, 0x30, + 0xc8, 0x01, 0x3e, 0xc0, 0x01, 0x3e, 0xc0, 0x03, 0xc2, 0xc0, 0x18, 0x18, 0x80, 0x40, 0x20, 0x10, + 0x10, 0x08, 0x07, 0xfc, 0x03, 0x80, 0x83, 0x43, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x01, 0x01, + 0x01, 0x07, 0x78, 0x80, 0x07, 0x78, 0x80, 0x07, 0xf8, 0x1f, 0xe0, 0x01, 0x1e, 0xe0 +}; + +static const char PROGMEM idle_2_block_list[] = { //IDLE_3 flipped + 0x3e, 0xc0, 0x07, 0xf8, 0x1f, 0xe0, 0x03, 0x7c, 0x80, 0x07, 0xf9, 0x01, 0x02, 0x02, 0x06, 0x04, + 0x08, 0x08, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x82, 0x64, 0x18, 0xe0, 0x18, 0x06, 0x01, 0x78, + 0x78, 0xc0, 0xc0, 0x01, 0x02, 0x04, 0x18, 0xe0, 0x03, 0x04, 0x04, 0x04, 0x04, 0x02, 0x1c, 0xe0, + 0x30, 0xc8, 0x01, 0x1e, 0x20, 0x40, 0x80, 0x01, 0x3e, 0xc0, 0x03, 0xc2, 0xc0, 0x18, 0x18, 0x80, + 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x03, 0xfc, 0x03, 0x83, 0x43, 0x20, 0x10, 0x08, 0x04, + 0x02, 0x01, 0x01, 0x01, 0x01, 0x07, 0x78, 0x80, 0x07, 0x78, 0x80, 0x07, 0xf8, 0x1f, 0xe0, 0x01, + 0x1e, 0xe0 +}; + +static const char PROGMEM idle_3_block_list[] = { //IDLE_4 flipped + 0x3e, 0xc0, 0x07, 0xf8, 0x1f, 0xe0, 0x03, 0x7c, 0x80, 0x07, 0xf9, 0x01, 0x02, 0x02, 0x02, 0x04, + 0x04, 0x08, 0x08, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x82, 0x64, 0x18, 0xe0, 0x18, 0x06, 0x01, + 0x78, 0x78, 0xc0, 0xc0, 0x01, 0x02, 0x04, 0x18, 0xe0, 0x03, 0x04, 0x04, 0x04, 0x04, 0x02, 0x1c, + 0xe0, 0x30, 0xc8, 0x01, 0x1e, 0x20, 0x40, 0x80, 0x01, 0x3e, 0xc0, 0x03, 0xc2, 0xc0, 0x18, 0x18, + 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x03, 0xfc, 0x03, 0x80, 0x83, 0x43, 0x20, 0x10, + 0x08, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01, 0x07, 0x78, 0x80, 0x07, 0x78, 0x80, 0x07, 0xf8, 0x1f, + 0xe0, 0x01, 0x1e, 0xe0 +}; + +static const char PROGMEM idle_4_block_list[] = { //IDLE_5 flipped + 0x3e, 0xc0, 0x07, 0xf8, 0x1f, 0xe0, 0x03, 0x7c, 0x80, 0x07, 0xf9, 0x01, 0x02, 0x02, 0x02, 0x04, + 0x04, 0x08, 0x08, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0xe4, 0x18, 0xe0, 0x18, 0x06, 0x01, 0x78, + 0x78, 0xc0, 0xc0, 0x01, 0x02, 0x04, 0x18, 0xe0, 0x03, 0x04, 0x04, 0x04, 0x04, 0x02, 0x1c, 0xe0, + 0x30, 0xc8, 0x01, 0x1e, 0x60, 0x80, 0x01, 0x3e, 0xc0, 0x03, 0xc2, 0xc0, 0x18, 0x18, 0x80, 0x40, + 0x20, 0x10, 0x10, 0x10, 0x08, 0x07, 0xfc, 0x03, 0x80, 0x83, 0x43, 0x20, 0x10, 0x08, 0x04, 0x02, + 0x01, 0x01, 0x01, 0x01, 0x07, 0x78, 0x80, 0x07, 0x78, 0x80, 0x07, 0xf8, 0x1f, 0xe0, 0x01, 0x1e, + 0xe0 +}; + +static const char PROGMEM tap_1_block_list[] = { //TAP_1 flipped + 0x3e, 0xc0, 0x07, 0xf8, 0x1f, 0xe0, 0x03, 0x7c, 0x80, 0x07, 0xf9, 0x01, 0x02, 0x02, 0x42, 0x44, + 0x84, 0x88, 0x08, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x82, 0x64, 0x18, 0x01, 0x0e, 0xf0, 0x20, + 0x26, 0x26, 0x29, 0x10, 0xd5, 0xce, 0x01, 0x02, 0x04, 0x18, 0xe0, 0x03, 0x1c, 0xe0, 0x30, 0xc8, + 0x01, 0x1e, 0x20, 0x40, 0x80, 0x01, 0x3e, 0xc0, 0x03, 0x02, 0x18, 0x18, 0x80, 0x40, 0x20, 0x10, + 0x10, 0x08, 0x08, 0x04, 0x03, 0xfc, 0x03, 0x80, 0x80, 0x40, 0x20, 0x10, 0x08, 0x84, 0xc2, 0xc1, + 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfc, 0xfd, 0xfd, 0x01, 0x07, 0x78, + 0x80, 0x38, 0xf8, 0xf8, 0xf1, 0xe1, 0xc3, 0x83, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x03, 0x03, + 0x07, 0x07, 0x07, 0x78, 0x81, 0x07, 0x07, 0x03, 0x03, 0x01, 0x07, 0xf8, 0x1f, 0xe0, 0x01, 0x1e, + 0xe0 +}; + +static const char PROGMEM tap_2_block_list[] = { //TAP_2 flipped + 0x3e, 0xc0, 0x07, 0xf8, 0x1f, 0xe0, 0x03, 0x7c, 0x80, 0x7e, 0xfe, 0xfe, 0xfe, 0x07, 0xf9, 0x01, + 0x02, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x82, 0x64, 0x18, + 0x01, 0x01, 0xe0, 0x18, 0x06, 0x01, 0xc0, 0xc0, 0x01, 0x02, 0x04, 0x18, 0xe0, 0x0f, 0x03, 0x04, + 0x04, 0x04, 0x04, 0x02, 0x1c, 0xe0, 0x30, 0xc8, 0x01, 0x1e, 0x20, 0x40, 0x80, 0x01, 0x3e, 0xc0, + 0x03, 0x02, 0x18, 0x18, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x03, 0x0f, 0x70, 0x80, + 0x81, 0x01, 0x31, 0x32, 0x8a, 0x24, 0x86, 0x79, 0x07, 0x78, 0x81, 0x01, 0x01, 0x01, 0x01, 0x07, + 0x78, 0x80, 0x07, 0xf8, 0x1f, 0xe0, 0x01, 0x1e, 0xe0 +}; + +// idle_1 and idle_2 are identical, so share them and save some space +const char* idle_frames[NUM_IDLE_FRAMES] = { + idle_1_block_list, + idle_1_block_list, + idle_2_block_list, + idle_3_block_list, + idle_4_block_list +}; + +const char* tap_frames[NUM_TAP_FRAMES] = { + tap_1_block_list, + tap_2_block_list +}; + +// idle_1 and idle_2 are identical, so save some space +const char* idle_block_map[NUM_IDLE_FRAMES] = { + idle_1_block_map, + idle_1_block_map, + idle_2_block_map, + idle_3_block_map, + idle_4_block_map +}; + +const char* tap_block_map[NUM_TAP_FRAMES] = { + tap_1_block_map, + tap_2_block_map +}; + +#else + +static const char PROGMEM idle_frames[NUM_IDLE_FRAMES][NUM_OLED_BYTES] = { + { // IDLE 1 flipped + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3e, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x7c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf9, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x02, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0xc0, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x02, 0x1c, 0xe0, 0x00, 0x00, 0x30, 0xc8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0xc0, 0x00, 0x03, + 0xc2, 0xc0, 0x18, 0x18, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x80, + 0x83, 0x43, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x07, + 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { //IDLE 2 flipped + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3e, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x7c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf9, 0x01, 0x01, 0x02, 0x02, 0x02, 0x04, 0x08, 0x08, + 0x08, 0x04, 0x04, 0x02, 0x02, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0xc0, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x02, 0x1c, 0xe0, 0x00, 0x00, 0x30, 0xc8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0xc0, 0x00, 0x03, + 0xc2, 0xc0, 0x18, 0x18, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x80, + 0x83, 0x43, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x07, + 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { //IDLE 3 flipped + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3e, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x7c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf9, 0x01, 0x02, 0x02, 0x06, 0x04, 0x08, 0x08, 0x04, + 0x04, 0x04, 0x02, 0x02, 0x02, 0x82, 0x64, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0xc0, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x02, 0x1c, 0xe0, 0x00, 0x30, 0xc8, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0x20, 0x40, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0xc0, 0x03, 0xc2, + 0xc0, 0x18, 0x18, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x83, + 0x43, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x07, + 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { //IDLE 4 flipped + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3e, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x7c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf9, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, + 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x82, 0x64, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0xc0, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x02, 0x1c, 0xe0, 0x00, 0x00, 0x30, 0xc8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0x20, 0x40, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0xc0, 0x00, 0x03, + 0xc2, 0xc0, 0x18, 0x18, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x80, + 0x83, 0x43, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x07, + 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { //IDLE 5 flipped + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3e, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x7c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf9, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, + 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0xe4, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0xc0, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x02, 0x1c, 0xe0, 0x00, 0x00, 0x30, 0xc8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0x60, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0xc0, 0x00, 0x03, + 0xc2, 0xc0, 0x18, 0x18, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x10, 0x08, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x80, + 0x83, 0x43, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x07, + 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }; +static const char PROGMEM tap_frames[NUM_TAP_FRAMES][NUM_OLED_BYTES] = { + { //Tap 1 flipped + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3e, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x7c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf9, 0x01, 0x02, 0x02, 0x42, 0x44, 0x84, 0x88, 0x08, + 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x82, 0x64, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0xf0, 0x20, 0x26, 0x26, 0x29, 0x10, 0xd5, + 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0xe0, 0x00, 0x00, 0x30, 0xc8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0x20, 0x40, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0xc0, 0x00, 0x03, + 0x02, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x80, + 0x80, 0x40, 0x20, 0x10, 0x08, 0x84, 0xc2, 0xc1, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfc, 0xfd, 0xfd, 0x01, 0x07, + 0x78, 0x80, 0x38, 0xf8, 0xf8, 0xf1, 0xe1, 0xc3, 0x83, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x07, 0x07, 0x00, 0x00, + 0x00, 0x07, 0x78, 0x81, 0x07, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { //Tap 2 flipped + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3e, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x7c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x7e, 0xfe, 0xfe, 0xfe, 0x00, 0x07, 0xf9, 0x01, 0x02, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, + 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x82, 0x64, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0xe0, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x18, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x02, 0x1c, 0xe0, 0x00, 0x00, 0x30, 0xc8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0x20, 0x40, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3e, 0xc0, 0x00, 0x03, + 0x02, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x70, 0x80, + 0x81, 0x01, 0x31, 0x32, 0x8a, 0x24, 0x86, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, + 0x78, 0x81, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + }; +#endif //USE_BITMAP_COMPRESSION +#endif //OLED_ENABLE diff --git a/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/animation_process.h b/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/animation_process.h new file mode 100644 index 0000000000..4280574a46 --- /dev/null +++ b/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/animation_process.h @@ -0,0 +1,97 @@ +// Copyright 2022 Arturo Avila (@ADPenrose) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +#include "animation_frames.h" + +#ifdef OLED_ENABLE +#define IDLE_FRAME_DURATION 200 // Idle animation iteration rate in ms + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; + +bool tap_anim = false; +bool tap_anim_toggle = false; + + +// Decompress and write a precompressed bitmap frame to the OLED. +// Documentation and python compression script available at: +// https://github.com/nullbitsco/squeez-o +#ifdef USE_OLED_BITMAP_COMPRESSION +static void oled_write_compressed_P(const char* input_block_map, const char* input_block_list) { + uint16_t block_index = 0; + for (uint16_t i=0; i IDLE_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } else { // Turn off screen when timer threshold elapsed or reset time since last input + if (timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if (timer_elapsed32(anim_timer) > IDLE_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} +#endif + +// Animate tap +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + #ifdef OLED_ENABLE + // Check if non-mod + if ((keycode >= KC_TAB && keycode <= KC_SLASH) || // Tab - Slash (Symbols, Punctuation, Space) + (keycode >= KC_KP_SLASH && keycode <= KC_KP_COMMA) || // Keypad slash - Keypad Dot + (keycode >= KC_F1 && keycode <= KC_F12)) { // F1 - F12 + if (record->event.pressed) { + // Display tap frames + tap_anim_toggle = !tap_anim_toggle; + #ifdef USE_OLED_BITMAP_COMPRESSION + oled_write_compressed_P(tap_block_map[tap_anim_toggle], tap_frames[tap_anim_toggle]); + #else + oled_write_raw_P(tap_frames[tap_anim_toggle], NUM_OLED_BYTES); + #endif + } + } + #endif + + return true; +} diff --git a/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/config.h b/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/config.h new file mode 100644 index 0000000000..2a70bc5c9a --- /dev/null +++ b/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/config.h @@ -0,0 +1,15 @@ +// Copyright 2022 Arturo Avila (@ADPenrose) +// SPDX-License-Identifier: GPL-2.0-or-later + +#ifdef AUDIO_ENABLE +# define NO_MUSIC_MODE +#endif + +#ifdef OLED_ENABLE +# define OLED_TIMEOUT 120000 +#endif + +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE +#define NO_ACTION_ONESHOT +#define LAYER_STATE_8BIT diff --git a/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/keymap.c b/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/keymap.c new file mode 100644 index 0000000000..be0d94a676 --- /dev/null +++ b/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/keymap.c @@ -0,0 +1,196 @@ +// Copyright 2022 Arturo Avila (@ADPenrose), Christopher Courtney/Drashna Jael're (@drashna) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +#include "animation_process.h" + +/* Structure that helps store settings in memory and write to the EEPROM: */ +typedef union { + uint32_t raw; + struct { + bool split_zero :1; + bool split_enter :1; + bool split_plus :1; + }; +} via_layout_t; + +via_layout_t via_layouts; + +/* Setting up the LED matrix */ +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0, 1, 2, 3, NO_LED }, + { 4, 5, 6, 7, NO_LED }, + { 8, 9, 10, 11, 12 }, + { 13, 14, 15, 16, NO_LED }, + { 17, 18, 19, 20, 21 }, + { 22, 23, 24, 25, 26 }, +}, { + // LED Index to Physical Position + { 0,0 }, { 37,0 }, { 74,0 }, {111,0 }, { 0,34 }, { 37,34 }, { 74,34 }, {111,34 }, { 0,62 }, { 37,62 }, + { 74,62 }, {111,62 }, {120,75 }, { 0,89 }, { 37,89 }, { 74,89 }, {111,89 }, { 0,117}, { 37,117}, { 74,117}, + {111,117}, {120,130}, { 0,137}, { 18,144}, { 37,137}, { 74,144}, {111,144} +}, { + // LED Index to Flag + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 +} }; + +/* Keymap */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + MO(1), MO(2), MO(3), CK_TOGG, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_MUTE, KC_P0, KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_all( + KC_TRNS, CK_DOWN, CK_UP, CK_RST, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) }, + [2] = { ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, + [3] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } +}; +#endif + +/* Setting layout options and debuggin text */ +void via_set_layout_options_kb(uint32_t value) { + via_layouts.raw = value; + #ifdef CONSOLE_ENABLE + if (via_layouts.split_zero && via_layouts.split_enter && via_layouts.split_plus){ + xprintf("All three layouts are active with a value of: %d\n", value); + } else if (!(via_layouts.split_zero) && via_layouts.split_enter && via_layouts.split_plus){ + xprintf("SE and SP layouts are active with a value of: %d\n", value); + } else if (via_layouts.split_zero && !(via_layouts.split_enter) && via_layouts.split_plus){ + xprintf("SZ and SP layouts are active with a value of: %d\n", value); + } else if (!(via_layouts.split_zero) && !(via_layouts.split_enter) && via_layouts.split_plus){ + xprintf("SP is the only layout active with a value of: %d\n", value); + } else if (via_layouts.split_zero && via_layouts.split_enter && !(via_layouts.split_plus)){ + xprintf("SE and SZ layouts are active with a value of: %d\n", value); + } else if (!(via_layouts.split_zero) && via_layouts.split_enter && !(via_layouts.split_plus)) { + xprintf("SE is the only layout active with a value of: %d\n", value); + } else if (via_layouts.split_zero && !(via_layouts.split_enter) && !(via_layouts.split_plus)){ + xprintf("SZ is the only layout active with a value of: %d\n", value); + } else { + xprintf("The base layout is active with a value of: %d\n", value); + } + #endif +} + +/* Turing LEDs on/off depending on the layout selected on VIA */ +bool rgb_matrix_indicators_user(void){ + if (via_layouts.split_zero && via_layouts.split_enter && via_layouts.split_plus){ + rgb_matrix_set_color(12, 0, 0, 0); + rgb_matrix_set_color(21, 0, 0, 0); + rgb_matrix_set_color(23, 0, 0, 0); + } else if (!(via_layouts.split_zero) && via_layouts.split_enter && via_layouts.split_plus){ + rgb_matrix_set_color(12, 0, 0, 0); + rgb_matrix_set_color(21, 0, 0, 0); + rgb_matrix_set_color(22, 0, 0, 0); + rgb_matrix_set_color(24, 0, 0, 0); + } else if (via_layouts.split_zero && !(via_layouts.split_enter) && via_layouts.split_plus){ + rgb_matrix_set_color(12, 0, 0, 0); + rgb_matrix_set_color(20, 0, 0, 0); + rgb_matrix_set_color(23, 0, 0, 0); + rgb_matrix_set_color(26, 0, 0, 0); + } else if (!(via_layouts.split_zero) && !(via_layouts.split_enter) && via_layouts.split_plus){ + rgb_matrix_set_color(12, 0, 0, 0); + rgb_matrix_set_color(20, 0, 0, 0); + rgb_matrix_set_color(22, 0, 0, 0); + rgb_matrix_set_color(24, 0, 0, 0); + rgb_matrix_set_color(26, 0, 0, 0); + } else if (via_layouts.split_zero && via_layouts.split_enter && !(via_layouts.split_plus)){ + rgb_matrix_set_color(11, 0, 0, 0); + rgb_matrix_set_color(16, 0, 0, 0); + rgb_matrix_set_color(21, 0, 0, 0); + rgb_matrix_set_color(23, 0, 0, 0); + } else if (!(via_layouts.split_zero) && via_layouts.split_enter && !(via_layouts.split_plus)) { + rgb_matrix_set_color(11, 0, 0, 0); + rgb_matrix_set_color(16, 0, 0, 0); + rgb_matrix_set_color(21, 0, 0, 0); + rgb_matrix_set_color(22, 0, 0, 0); + rgb_matrix_set_color(24, 0, 0, 0); + } else if (via_layouts.split_zero && !(via_layouts.split_enter) && !(via_layouts.split_plus)){ + rgb_matrix_set_color(11, 0, 0, 0); + rgb_matrix_set_color(16, 0, 0, 0); + rgb_matrix_set_color(20, 0, 0, 0); + rgb_matrix_set_color(23, 0, 0, 0); + rgb_matrix_set_color(26, 0, 0, 0); + } else { + rgb_matrix_set_color(11, 0, 0, 0); + rgb_matrix_set_color(16, 0, 0, 0); + rgb_matrix_set_color(20, 0, 0, 0); + rgb_matrix_set_color(22, 0, 0, 0); + rgb_matrix_set_color(24, 0, 0, 0); + rgb_matrix_set_color(26, 0, 0, 0); + } + return false; +} + +/* OLED stuff */ +#ifdef OLED_ENABLE +bool oled_task_user(void) { + render_anim(); + + // WPM render + oled_set_cursor(1, 0); + oled_write_P(PSTR(">"), false); + oled_write(get_u8_str(get_current_wpm(), '0'), false); + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(0,14); + oled_write_P(led_state.caps_lock ? PSTR("CPSLK") :" ", true); + oled_set_cursor(0,15); + oled_write_P(led_state.num_lock ? PSTR("NUMLK") :" ", true); + + return false; +} + +/* WPM calculation considerations */ +bool wpm_keycode_user(uint16_t keycode) { + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || + (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || + (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) { + keycode = keycode & 0xFF; + } else if (keycode > 0xFF) { + keycode = 0; + } + + // Include keys in WPM calculation + if ((keycode >= KC_TAB && keycode <= KC_SLASH) || // Tab - Slash (Symbols, Punctuation, Space) + (keycode >= KC_KP_SLASH && keycode <= KC_KP_COMMA) || // Keypad numbers - Keypad Dot + (keycode >= KC_F1 && keycode <= KC_F12)) { // F1 - F12 + return true; + } + + return false; +} +#endif diff --git a/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/readme.md b/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/readme.md new file mode 100644 index 0000000000..5ae1b2280e --- /dev/null +++ b/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/readme.md @@ -0,0 +1,19 @@ +# The Bongo Cat VIA-compatible keymap for the AkemiPad + +# Features +- Audio Click capabilitiy. +- RGB Matrix Lighting (cycles left-right and up-down). +- LEDs turn on and off depending on the layout selected on the VIA UI. +- Encoder Map feature. +- Bongo Cat animation with WPM counter and Caps Lock/Num Lock indicators. + +This keymap is optimized for a numpad and can fit the RGB matrix (with +very few animations due to AVR constraints), the encoder map, the audio +click feature and the display of the OLED animations. This was possible +thanks to the [squeez-o](https://github.com/nullbitsco/squeez-o) compression tool. + +![Bongo Cat](https://i.imgur.com/Ty0qKnV.gif) + +___ + +###### *This keymap is an adaptation designed to work with the AkemiPad. The reference keymap used was created for the Nibble keyboard, and you can check it [here](https://github.com/qmk/qmk_firmware/tree/master/keyboards/nullbitsco/nibble/keymaps/oled_bongocat).* diff --git a/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/rules.mk b/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/rules.mk new file mode 100644 index 0000000000..d24a189b81 --- /dev/null +++ b/keyboards/adpenrose/akemipad/keymaps/oled_bongocat/rules.mk @@ -0,0 +1,9 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no +ENCODER_MAP_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +WPM_ENABLE = yes diff --git a/keyboards/adpenrose/akemipad/keymaps/via/keymap.c b/keyboards/adpenrose/akemipad/keymaps/via/keymap.c new file mode 100644 index 0000000000..6395b361c9 --- /dev/null +++ b/keyboards/adpenrose/akemipad/keymaps/via/keymap.c @@ -0,0 +1,154 @@ +// Copyright 2022 Arturo Avila (@ADPenrose), Christopher Courtney/Drashna Jael're (@drashna) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +/* Structure that helps store settings in memory and write to the EEPROM: */ +typedef union { + uint32_t raw; + struct { + bool split_zero :1; + bool split_enter :1; + bool split_plus :1; + }; +} via_layout_t; + +via_layout_t via_layouts; + +/* Setting up the LED matrix */ +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0, 1, 2, 3, NO_LED }, + { 4, 5, 6, 7, NO_LED }, + { 8, 9, 10, 11, 12 }, + { 13, 14, 15, 16, NO_LED }, + { 17, 18, 19, 20, 21 }, + { 22, 23, 24, 25, 26 }, +}, { + // LED Index to Physical Position + { 0,0 }, { 37,0 }, { 74,0 }, {111,0 }, { 0,34 }, { 37,34 }, { 74,34 }, {111,34 }, { 0,62 }, { 37,62 }, + { 74,62 }, {111,62 }, {120,75 }, { 0,89 }, { 37,89 }, { 74,89 }, {111,89 }, { 0,117}, { 37,117}, { 74,117}, + {111,117}, {120,130}, { 0,137}, { 18,144}, { 37,137}, { 74,144}, {111,144} +}, { + // LED Index to Flag + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 +} }; + +/* Keymap */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + MO(1), MO(2), MO(3), KC_DEL, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_MUTE, KC_P0, KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_all( + KC_TRNS, CK_DOWN, CK_UP, CK_RST, + MU_TOG, MU_MOD, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + CK_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) }, + [2] = { ENCODER_CCW_CW(RGB_SAD, RGB_SAI) }, + [3] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) } +}; +#endif + +/* Setting layout options and debugging text indicators */ +void via_set_layout_options_kb(uint32_t value) { + via_layouts.raw = value; + #ifdef CONSOLE_ENABLE + if (via_layouts.split_zero && via_layouts.split_enter && via_layouts.split_plus){ + xprintf("All three layouts are active with a value of: %d\n", value); + } else if (!(via_layouts.split_zero) && via_layouts.split_enter && via_layouts.split_plus){ + xprintf("SE and SP layouts are active with a value of: %d\n", value); + } else if (via_layouts.split_zero && !(via_layouts.split_enter) && via_layouts.split_plus){ + xprintf("SZ and SP layouts are active with a value of: %d\n", value); + } else if (!(via_layouts.split_zero) && !(via_layouts.split_enter) && via_layouts.split_plus){ + xprintf("SP is the only layout active with a value of: %d\n", value); + } else if (via_layouts.split_zero && via_layouts.split_enter && !(via_layouts.split_plus)){ + xprintf("SE and SZ layouts are active with a value of: %d\n", value); + } else if (!(via_layouts.split_zero) && via_layouts.split_enter && !(via_layouts.split_plus)) { + xprintf("SE is the only layout active with a value of: %d\n", value); + } else if (via_layouts.split_zero && !(via_layouts.split_enter) && !(via_layouts.split_plus)){ + xprintf("SZ is the only layout active with a value of: %d\n", value); + } else { + xprintf("The base layout is active with a value of: %d\n", value); + } + #endif +} + +/* Turing LEDs on/off depending on the layout selected on VIA */ +bool rgb_matrix_indicators_user(void){ + if (via_layouts.split_zero && via_layouts.split_enter && via_layouts.split_plus){ + rgb_matrix_set_color(12, 0, 0, 0); + rgb_matrix_set_color(21, 0, 0, 0); + rgb_matrix_set_color(23, 0, 0, 0); + } else if (!(via_layouts.split_zero) && via_layouts.split_enter && via_layouts.split_plus){ + rgb_matrix_set_color(12, 0, 0, 0); + rgb_matrix_set_color(21, 0, 0, 0); + rgb_matrix_set_color(22, 0, 0, 0); + rgb_matrix_set_color(24, 0, 0, 0); + } else if (via_layouts.split_zero && !(via_layouts.split_enter) && via_layouts.split_plus){ + rgb_matrix_set_color(12, 0, 0, 0); + rgb_matrix_set_color(20, 0, 0, 0); + rgb_matrix_set_color(23, 0, 0, 0); + rgb_matrix_set_color(26, 0, 0, 0); + } else if (!(via_layouts.split_zero) && !(via_layouts.split_enter) && via_layouts.split_plus){ + rgb_matrix_set_color(12, 0, 0, 0); + rgb_matrix_set_color(20, 0, 0, 0); + rgb_matrix_set_color(22, 0, 0, 0); + rgb_matrix_set_color(24, 0, 0, 0); + rgb_matrix_set_color(26, 0, 0, 0); + } else if (via_layouts.split_zero && via_layouts.split_enter && !(via_layouts.split_plus)){ + rgb_matrix_set_color(11, 0, 0, 0); + rgb_matrix_set_color(16, 0, 0, 0); + rgb_matrix_set_color(21, 0, 0, 0); + rgb_matrix_set_color(23, 0, 0, 0); + } else if (!(via_layouts.split_zero) && via_layouts.split_enter && !(via_layouts.split_plus)) { + rgb_matrix_set_color(11, 0, 0, 0); + rgb_matrix_set_color(16, 0, 0, 0); + rgb_matrix_set_color(21, 0, 0, 0); + rgb_matrix_set_color(22, 0, 0, 0); + rgb_matrix_set_color(24, 0, 0, 0); + } else if (via_layouts.split_zero && !(via_layouts.split_enter) && !(via_layouts.split_plus)){ + rgb_matrix_set_color(11, 0, 0, 0); + rgb_matrix_set_color(16, 0, 0, 0); + rgb_matrix_set_color(20, 0, 0, 0); + rgb_matrix_set_color(23, 0, 0, 0); + rgb_matrix_set_color(26, 0, 0, 0); + } else { + rgb_matrix_set_color(11, 0, 0, 0); + rgb_matrix_set_color(16, 0, 0, 0); + rgb_matrix_set_color(20, 0, 0, 0); + rgb_matrix_set_color(22, 0, 0, 0); + rgb_matrix_set_color(24, 0, 0, 0); + rgb_matrix_set_color(26, 0, 0, 0); + } + return false; +} diff --git a/keyboards/adpenrose/akemipad/keymaps/via/readme.md b/keyboards/adpenrose/akemipad/keymaps/via/readme.md new file mode 100644 index 0000000000..9032c1d218 --- /dev/null +++ b/keyboards/adpenrose/akemipad/keymaps/via/readme.md @@ -0,0 +1,15 @@ +# The VIA-compatible keymap for the AkemiPad + +# Features +- Audio Click and Music Mode capabilities. +- RGB Matrix Lighting (cycles left-right and up-down). +- LEDs turn on and off depending on the layout selected on the VIA UI. +- Encoder Map feature. + +## The star of the show: the "RGB matrix layout-dependant" capability +Inside of this keymap resides the first implementation (AFAIK) of a LED matrix that turns +LEDs on and off, depending on the layout/layouts activated through VIA. The available +layouts are as follows: + +[![KLE layout](https://i.imgur.com/C1qVDfL.png)](https://tinyurl.com/KLE-AkemiPad) + diff --git a/keyboards/adpenrose/akemipad/keymaps/via/rules.mk b/keyboards/adpenrose/akemipad/keymaps/via/rules.mk new file mode 100644 index 0000000000..1189f4ad19 --- /dev/null +++ b/keyboards/adpenrose/akemipad/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +ENCODER_MAP_ENABLE = yes -- cgit v1.2.3