diff options
author | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
commit | dc90387ce7d8ba7b607d9c48540bf6d8b560f14d (patch) | |
tree | 4ccb8fa5886b66fa9d480edef74236c27f035e16 /keyboards/crkbd/lib/mode_icon_reader.c |
Diffstat (limited to 'keyboards/crkbd/lib/mode_icon_reader.c')
-rw-r--r-- | keyboards/crkbd/lib/mode_icon_reader.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/keyboards/crkbd/lib/mode_icon_reader.c b/keyboards/crkbd/lib/mode_icon_reader.c new file mode 100644 index 000000000..04c226506 --- /dev/null +++ b/keyboards/crkbd/lib/mode_icon_reader.c | |||
@@ -0,0 +1,15 @@ | |||
1 | #include <stdio.h> | ||
2 | #include "crkbd.h" | ||
3 | |||
4 | char mode_icon[24]; | ||
5 | |||
6 | const char *read_mode_icon(bool swap) { | ||
7 | static char logo[][2][3] = {{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}}; | ||
8 | if (swap == false) { | ||
9 | snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[0][0], logo[0][1]); | ||
10 | } else { | ||
11 | snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[1][0], logo[1][1]); | ||
12 | } | ||
13 | |||
14 | return mode_icon; | ||
15 | } | ||