aboutsummaryrefslogtreecommitdiff
path: root/waffle
diff options
context:
space:
mode:
authorjack <0x6A73@pm.me>2022-11-21 01:15:32 +0000
committerjack <0x6A73@pm.me>2022-11-21 01:15:32 +0000
commitacd478e817692a7cffb9486602e656f65d6065d2 (patch)
tree472418aa94bc313af74367a33b4bbf11106665a2 /waffle
parentca2af407e9c031ebe091ac48fc19116b4b21605d (diff)
downloadqmk_me-acd478e817692a7cffb9486602e656f65d6065d2.tar.gz
qmk_me-acd478e817692a7cffb9486602e656f65d6065d2.zip
update crkbd keymap for new pcbs
misc clean up/additions
Diffstat (limited to 'waffle')
-rw-r--r--waffle/rle.c11
-rw-r--r--waffle/rules.mk1
2 files changed, 9 insertions, 3 deletions
diff --git a/waffle/rle.c b/waffle/rle.c
index 5dd7044..e631b62 100644
--- a/waffle/rle.c
+++ b/waffle/rle.c
@@ -1,7 +1,8 @@
// Copyright 2022 jack (@waffle87)
// SPDX-License-Identifier: GPL-2.0-or-later
#include <stdio.h>
-#define FRAME_SIZE 650
+#define FRAME_SIZE 512
+#define FRAME_COUNT 2
void test_decode(unsigned char *rle, size_t rleN, const unsigned char *orig, size_t n) {
int cursor = 0, bytes = (unsigned char)rle[0];
@@ -56,19 +57,23 @@ int encode(unsigned char *output, const unsigned char *array, size_t n) {
}
void print_array(unsigned char *array, int n) {
- printf("{");
+ int char_count = 0;
+ printf("{\n");
for (int i = 0; i < n; i++) {
if (i == 0)
printf("%u", array[i]);
else
printf(", %u", array[i]);
+ char_count++;
+ if (char_count >= n / 2)
+ printf("\n"), char_count = 0;
}
printf("}");
}
int main() {
char output[128 * 32];
- int size = encode(output, frame[0], FRAME_SIZE);
+ int size = encode(output, frames[1], FRAME_SIZE);
printf("static const unsigned char PROGMEM prep[][%d] = {", size);
print_array(output, size);
printf("};\n");
diff --git a/waffle/rules.mk b/waffle/rules.mk
index 5adb7aa..b8feee7 100644
--- a/waffle/rules.mk
+++ b/waffle/rules.mk
@@ -26,6 +26,7 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
endif
ifeq ($(strip $(UNICODE_COMMON)), yes)
+ UNICODE_ENABLE = no
SRC += unicode.c
endif