summaryrefslogtreecommitdiff
path: root/keyboards/printedpad/printedpad.c
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2024-08-26 10:01:57 +1000
committerNick Brassel <nick@tzarc.org>2024-08-26 10:01:57 +1000
commit5d76c5280dc0aff398cdce19fa54d0e0725c418d (patch)
tree40026340f0d524a6006f18f01ef988e15d271075 /keyboards/printedpad/printedpad.c
parente6a898e3eea3521d3f0497ee26937d5269d78fb7 (diff)
parent81dcf2b547bacc42bd9cf8ccaccd3d7164e69926 (diff)
Merge branch 'develop'0.26.0
Diffstat (limited to 'keyboards/printedpad/printedpad.c')
-rw-r--r--keyboards/printedpad/printedpad.c51
1 files changed, 1 insertions, 50 deletions
diff --git a/keyboards/printedpad/printedpad.c b/keyboards/printedpad/printedpad.c
index 4e3354c028..a91e8d5ea4 100644
--- a/keyboards/printedpad/printedpad.c
+++ b/keyboards/printedpad/printedpad.c
@@ -1,57 +1,8 @@
// Copyright 2023 Noah Beidelman (@noahbei)
// SPDX-License-Identifier: GPL-2.0-or-later
-#include QMK_KEYBOARD_H
-#include "printedpad.h"
+#include "quantum.h"
void board_init(void) {
SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP;
}
-
-const uint8_t max_layer = 3;
-uint8_t current_display_mode = 0;
-
-bool key_pressed = false;
-
-bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
- if (!process_record_user(keycode, record)) {
- return false;
- }
-#ifdef OLED_ENABLE
- key_pressed = record->event.pressed;
-#endif
- switch(keycode) {
- case LT(0, KC_NO):
- if (record->event.pressed) {
- // on tap
- if (record->tap.count) {
- if (get_highest_layer(layer_state) >= max_layer) {
- layer_clear();
- } else {
- layer_move(get_highest_layer(layer_state) + 1);
- }
- }
-#ifdef OLED_ENABLE
- // on hold
- else {
- current_display_mode = (current_display_mode + 1) % 3;
- }
-#endif
- }
- return false;
- }
- return true;
-}
-
-#ifdef OLED_ENABLE
-uint32_t flash_timer = 0;
-bool layer_changed = false;
-
-// when the layer is changed, flash the layer number on the screen
-layer_state_t layer_state_set_kb(layer_state_t state) {
- flash_timer = timer_read();
- layer_changed = true;
-
- return layer_state_set_user(state);
-}
-#endif \ No newline at end of file