aboutsummaryrefslogtreecommitdiff
path: root/keyboards/nullbitsco
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-07-24 00:37:19 -0700
committerGitHub <noreply@github.com>2021-07-24 00:37:19 -0700
commitb8a1e14f53489eea63bd747d1b94d7d9b7da5ac9 (patch)
tree962a82138ba7db677d9ee90e4de44053bdddb017 /keyboards/nullbitsco
parent73d4d7dc2bcad7ed7e4d3bdb33aacc18c374c8a9 (diff)
downloadqmk_firmware-b8a1e14f53489eea63bd747d1b94d7d9b7da5ac9.tar.gz
qmk_firmware-b8a1e14f53489eea63bd747d1b94d7d9b7da5ac9.zip
Remove deprecated callbacks for encoders and dip switches (#13404)
Diffstat (limited to 'keyboards/nullbitsco')
-rw-r--r--keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c
index b276a042b..b3da17395 100644
--- a/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c
+++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c
@@ -19,15 +19,13 @@
19# include "oled_display.h" 19# include "oled_display.h"
20#endif 20#endif
21 21
22enum layer_names { 22enum layer_names { _MA, _FN };
23 _MA,
24 _FN
25};
26 23
27enum custom_keycodes { 24enum custom_keycodes {
28 KC_CUST = SAFE_RANGE, 25 KC_CUST = SAFE_RANGE,
29}; 26};
30 27
28// clang-format off
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 29const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32 [_MA] = LAYOUT_ansi( 30 [_MA] = LAYOUT_ansi(
33 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, 31 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
@@ -44,6 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
44 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ 42 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
45 ), 43 ),
46}; 44};
45// clang-format on
47 46
48#ifdef OLED_DRIVER_ENABLE 47#ifdef OLED_DRIVER_ENABLE
49oled_rotation_t oled_init_user(oled_rotation_t rotation) { 48oled_rotation_t oled_init_user(oled_rotation_t rotation) {
@@ -53,7 +52,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
53} 52}
54 53
55void oled_task_user(void) { 54void oled_task_user(void) {
56 if (timer_elapsed(oled_timer) >= 3000) { 55 if (timer_elapsed(oled_timer) >= 3000) {
57 set_oled_mode(OLED_MODE_IDLE); 56 set_oled_mode(OLED_MODE_IDLE);
58 } 57 }
59 render_frame(); 58 render_frame();
@@ -64,23 +63,22 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
64 // Send keystrokes to host keyboard, if connected (see readme) 63 // Send keystrokes to host keyboard, if connected (see readme)
65 process_record_remote_kb(keycode, record); 64 process_record_remote_kb(keycode, record);
66 65
67 switch(keycode) { 66 switch (keycode) {
68 case RGB_TOG: 67 case RGB_TOG:
69 if (record->event.pressed) { 68 if (record->event.pressed) {
70#ifdef OLED_DRIVER_ENABLE 69#ifdef OLED_DRIVER_ENABLE
71 process_record_keymap_oled(keycode); 70 process_record_keymap_oled(keycode);
72#endif 71#endif
73 } 72 }
74 break; 73 break;
75 case KC_CUST: //custom macro 74 case KC_CUST: // custom macro
76 if (record->event.pressed) { 75 if (record->event.pressed) {
77 } 76 }
78 break; 77 break;
79 } 78 }
80 return true; 79 return true;
81} 80}
82 81
83
84bool encoder_update_user(uint8_t index, bool clockwise) { 82bool encoder_update_user(uint8_t index, bool clockwise) {
85 if (clockwise) { 83 if (clockwise) {
86 tap_code(KC_VOLU); 84 tap_code(KC_VOLU);