diff options
author | HorrorTroll <sonicvipduc@gmail.com> | 2022-12-30 08:04:01 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-30 12:04:01 +1100 |
commit | 724aa3a4b256ccb058e4ef86c882167635d6815d (patch) | |
tree | e3c13a9e983fff434fa7919973c2e0708bd9dae4 /keyboards/horrortroll/handwired_k552/lib | |
parent | 87cace28a62a9a7e156ca03201488a46915cf8ec (diff) |
Refactor entire Handwired K552 keyboard (#18066)
Diffstat (limited to 'keyboards/horrortroll/handwired_k552/lib')
7 files changed, 64 insertions, 7 deletions
diff --git a/keyboards/horrortroll/handwired_k552/lib/bongocat.c b/keyboards/horrortroll/handwired_k552/lib/bongocat.c index fbde9c911a..6510223b22 100644 --- a/keyboards/horrortroll/handwired_k552/lib/bongocat.c +++ b/keyboards/horrortroll/handwired_k552/lib/bongocat.c @@ -1,4 +1,4 @@ -/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> +/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,6 +14,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "quantum.h" + // WPM-responsive animation stuff here # define IDLE_FRAMES 5 # define IDLE_SPEED 10 // below this wpm value your animation will idle @@ -43,7 +45,7 @@ uint8_t current_tap_frame = 0; // follow this guide up to and including "CONVERT YOUR IMAGE" https://docs.splitkb.com/hc/en-us/articles/360013811280-How-do-I-convert-an-image-for-use-on-an-OLED-display- // replace numbers in brackets with your own // if you start getting errors when compiling make sure you didn't accedentally delete a bracket -static void render_bongocat(void) { +void render_bongocat(void) { static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { { //Idle 1 - 128x32 diff --git a/keyboards/horrortroll/handwired_k552/lib/bongocat.h b/keyboards/horrortroll/handwired_k552/lib/bongocat.h new file mode 100644 index 0000000000..65ceabc682 --- /dev/null +++ b/keyboards/horrortroll/handwired_k552/lib/bongocat.h @@ -0,0 +1,17 @@ +/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +void render_bongocat(void); diff --git a/keyboards/horrortroll/handwired_k552/lib/galaxy.c b/keyboards/horrortroll/handwired_k552/lib/galaxy.c index 5cc340dded..04885b8085 100644 --- a/keyboards/horrortroll/handwired_k552/lib/galaxy.c +++ b/keyboards/horrortroll/handwired_k552/lib/galaxy.c @@ -1,4 +1,4 @@ -/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> +/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,9 +14,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "quantum.h" + # define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 -static void render_galaxy(void) { +void render_galaxy(void) { static const char PROGMEM galaxy[][ANIM_SIZE] = { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x80, 0xc8, 0xe8, 0x49, 0x72, diff --git a/keyboards/horrortroll/handwired_k552/lib/galaxy.h b/keyboards/horrortroll/handwired_k552/lib/galaxy.h new file mode 100644 index 0000000000..54ce2ad90a --- /dev/null +++ b/keyboards/horrortroll/handwired_k552/lib/galaxy.h @@ -0,0 +1,17 @@ +/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +void render_galaxy(void); diff --git a/keyboards/horrortroll/handwired_k552/lib/glcdfont.c b/keyboards/horrortroll/handwired_k552/lib/glcdfont.c index 23bfd92d72..7e7ca17e21 100644 --- a/keyboards/horrortroll/handwired_k552/lib/glcdfont.c +++ b/keyboards/horrortroll/handwired_k552/lib/glcdfont.c @@ -1,4 +1,4 @@ -/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> +/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/keyboards/horrortroll/handwired_k552/lib/logo.c b/keyboards/horrortroll/handwired_k552/lib/logo.c index 2e05555af2..3931fdf455 100644 --- a/keyboards/horrortroll/handwired_k552/lib/logo.c +++ b/keyboards/horrortroll/handwired_k552/lib/logo.c @@ -1,4 +1,4 @@ -/* Copyright 2021 HorrorTroll <https://github.com/HorrorTroll> +/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,9 +14,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "quantum.h" + # define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 -static void render_logo(void) { +void render_logo(void) { static const char PROGMEM redragon[][ANIM_SIZE] = { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0x80, diff --git a/keyboards/horrortroll/handwired_k552/lib/logo.h b/keyboards/horrortroll/handwired_k552/lib/logo.h new file mode 100644 index 0000000000..5a917ae820 --- /dev/null +++ b/keyboards/horrortroll/handwired_k552/lib/logo.h @@ -0,0 +1,17 @@ +/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +void render_logo(void); |