summaryrefslogtreecommitdiff
path: root/keyboards/ffkeebs/puca/puca.c
diff options
context:
space:
mode:
authorJames Young <18669334+noroadsleft@users.noreply.github.com>2021-11-19 06:12:49 +0000
committerGitHub <noreply@github.com>2021-11-18 22:12:49 -0800
commit9cdbc040cd352aa1f44022c90f137ba5bcbe1c36 (patch)
treeb48b2454e8b9f9edf250d2579d5e94f8d05cf4d7 /keyboards/ffkeebs/puca/puca.c
parent26ae43219001dfe20aa525b6fb35f2aeb2b76617 (diff)
FFKeebs PĂșca Refactor (#15208)
Diffstat (limited to 'keyboards/ffkeebs/puca/puca.c')
-rw-r--r--keyboards/ffkeebs/puca/puca.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/keyboards/ffkeebs/puca/puca.c b/keyboards/ffkeebs/puca/puca.c
index e08ac0cb3b..624643e8dc 100644
--- a/keyboards/ffkeebs/puca/puca.c
+++ b/keyboards/ffkeebs/puca/puca.c
@@ -15,6 +15,20 @@
*/
#include "puca.h"
+bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
+ if (!process_record_user(keycode, record)) {
+ return false;
+ }
+ switch (keycode) {
+ case MC_00:
+ if (record->event.pressed) {
+ SEND_STRING("00");
+ }
+ break;
+ }
+ return true;
+}
+
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) { return false; }
if (clockwise) {
@@ -105,7 +119,7 @@ __attribute__((weak)) void oled_task_user(void) {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}};
-
+
void animation_phase(void) {
current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES;
oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE);
@@ -114,7 +128,7 @@ __attribute__((weak)) void oled_task_user(void) {
anim_timer = timer_read32();
animation_phase();
}
-
+
oled_set_cursor(0, 6);
oled_write_P(PSTR("PUCA\nPAD\n"), false);
oled_write_P(PSTR("-----\n"), false);
@@ -130,4 +144,4 @@ __attribute__((weak)) void oled_task_user(void) {
break;
}
}
-#endif \ No newline at end of file
+#endif