Guest User

Sofle RGB Code (Errors)

a guest
Jun 24th, 2024
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 7.16 KB | Software | 0 0
  1. Keymap.c ================================================================================
  2.  
  3. /* Copyright 2023 Brian Low
  4.  *
  5.  * This program is free software: you can redistribute it and/or modify
  6.  * it under the terms of the GNU General Public License as published by
  7.  * the Free Software Foundation, either version 2 of the License, or
  8.  * (at your option) any later version.
  9.  *
  10.  * This program is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  * GNU General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  17.  */
  18.  
  19. #include <stdio.h>
  20. #include QMK_KEYBOARD_H
  21.  
  22. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  23. /*
  24.  * QWERTY
  25.  * ,-----------------------------------------.                    ,-----------------------------------------.
  26.  * | ESC  |   1  |   2  |   3  |   4  |   5  |                    |   6  |   7  |   8  |   9  |   0  |  `   |
  27.  * |------+------+------+------+------+------|                    |------+------+------+------+------+------|
  28.  * | ESC  |   Q  |   W  |   E  |   R  |   T  |                    |   Y  |   U  |   I  |   O  |   P  | Bspc |
  29.  * |------+------+------+------+------+------|                    |------+------+------+------+------+------|
  30.  * | Tab  |   A  |   S  |   D  |   F  |   G  |-------.    ,-------|   H  |   J  |   K  |   L  |   ;  |  '   |
  31.  * |------+------+------+------+------+------|  Mute |    | Pause |------+------+------+------+------+------|
  32.  * |LShift|   Z  |   X  |   C  |   V  |   B  |-------|    |-------|   N  |   M  |   ,  |   .  |   /  |RShift|
  33.  * `-----------------------------------------/       /     \      \-----------------------------------------'
  34.  *            | LCTL | LGUI | LCMD | LALT | /Enter  /       \Space \  | RALT | RCMD | RGUI | RCTL |
  35.  *            |      |      |      |      |/       /         \      \ |      |      |      |      |
  36.  *            `----------------------------------'           '------''---------------------------'
  37.  */
  38.  
  39. LAYOUT(
  40.     KC_ESC,   KC_1,   KC_2,    KC_3,    KC_4,    KC_5,                       KC_6,     KC_7,     KC_8,    KC_9,    KC_0,    KC_GRV,
  41.     KC_ESC,   KC_Q,   KC_W,    KC_E,    KC_R,    KC_T,                       KC_Y,     KC_U,     KC_I,    KC_O,    KC_P,    KC_BSPC,
  42.     KC_TAB,   KC_A,   KC_S,    KC_D,    KC_F,    KC_G,                       KC_H,     KC_J,     KC_K,    KC_L,    KC_SCLN, KC_QUOT,
  43.     KC_LSFT,  KC_Z,   KC_X,    KC_C,    KC_V,    KC_B,    KC_MUTE,   KC_MPLY,KC_N,     KC_M,     KC_COMM, KC_DOT,  KC_SLSH, KC_RSFT,
  44.                       KC_LCTL, KC_LGUI, KC_LCMD, KC_LALT, KC_ENT,    KC_SPC, KC_RALT,  KC_RCMD,  KC_RGUI, KC_RCTL
  45. )
  46. };
  47.  
  48. #if defined(ENCODER_MAP_ENABLE)
  49. const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
  50.     { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MPRV, KC_MNXT) },
  51. };
  52. #endif
  53.  
  54. #ifdef OLED_ENABLE
  55.  
  56.      // Custom home-made 32x128 art: Gaimon (see images directory)
  57.      // Art was made with Gimp and QMK Logo editor (https://joric.github.io/qle) was used to generate the pixel matrix:
  58. static const uint16_t PROGMEM raw_logo[] = {
  59.          0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,128,224,224,240,240,248,248,248,248,248,248,248,248,248,248,248,248,240,224,192,128,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,128,192,224,224,224,224,192,128,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,128,192,192,  0,  0,  0,  0,  0,  0,  0,  0,  0,
  60.          0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,255,255,255,255,255,255,255,127,127, 63, 63, 63, 63, 63, 63,255,255,255,255,255,255,255,254,  0,  0,  0,  0,  0,  0,  0,  0,  0,240,252,254, 14,  7,  7,  3,131,131,135,135,135,134,  0,  0,  0,112,112, 48, 48, 48,112,240,224,128,  0,  0,  0,243,243,  0,  0,  0,  0,240,240, 96,112, 48,112,240,224,192, 96,112, 48,112,240,240,192,  2,  2,198,230,246,118, 54, 54,118,246,230,198,  2,  2,  0,240,240, 96,112, 48, 48,112,243,227,  1,  0, 12, 78,102, 32, 32,  0,  0,  0,  0,
  61.          0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  7, 15,159,223,207, 24,254,249,233,207,207,207,233,249,255, 57,131,223,143,  7,  3,  0,  0,  0,  0,  0, 96,252,184, 16,128,135, 31, 63, 56,112,112, 96, 97, 97,113,113, 63, 63,  0,  0, 62,126,119,103, 99, 99, 99,115,127, 63,  0,  0,  0,127,127,  0,  0,  0,  0,127,127,  0,  0,  0,  0,  0,127,127,  0,  0,  0,  0,  0,127,127,  0,  0, 31, 63,120,112, 98, 98,112,120, 63, 31,  0,  0,  0,127,127,  0,  0,  0,  0,  0,127,127,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
  62.          0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  0, 19, 31, 31, 31, 15, 15, 31, 31, 31, 23,  0,  0,  1,  1,  0,  0,  0,  0,  0,  0,  0, 24, 28, 15,  5,  7, 13, 24, 28, 14, 12,  8,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
  63.      };
  64. oled_write_raw_P(raw_logo,sizeof(raw_logo));
  65. #endif
  66.  
  67. Rules.mk ================================================================================
  68.  
  69. ENCODER_MAP_ENABLE = yes
  70. VIA_ENABLE = yes
  71.  
  72. # Reduce compiled size
  73. MOUSEKEY_ENABLE = no
  74. SPACE_CADET_ENABLE = no
  75. GRAVE_ESC_ENABLE = no
  76.  
  77. OLED_ENABLE = yes
  78.  
  79. Config.h ================================================================================
  80.  
  81. /* Copyright 2023 Brian Low
  82.  *
  83.  * This program is free software: you can redistribute it and/or modify
  84.  * it under the terms of the GNU General Public License as published by
  85.  * the Free Software Foundation, either version 2 of the License, or
  86.  * (at your option) any later version.
  87.  *
  88.  * This program is distributed in the hope that it will be useful,
  89.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  90.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  91.  * GNU General Public License for more details.
  92.  *
  93.  * You should have received a copy of the GNU General Public License
  94.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  95.  */
  96. #pragma once
  97.  
  98. // Enabling this option changes the startup behavior to listen for an
  99. // active USB communication to delegate which part is master and which
  100. // is slave. With this option enabled and theres’s USB communication,
  101. // then that half assumes it is the master, otherwise it assumes it
  102. // is the slave.
  103. //
  104. // I've found this helps with some ProMicros where the slave does not boot
  105. #define SPLIT_USB_DETECT
  106.  
  107. #define RGB_MATRIX_SLEEP     // turn off effects when suspended
  108. #define SPLIT_TRANSPORT_MIRROR             // If LED_MATRIX_KEYPRESSES or LED_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
  109. #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100  // limits maximum brightness of LEDs (max 255). Higher may cause the controller to crash.
  110.  
Advertisement
Add Comment
Please, Sign In to add comment