diff options
author | Takeshi ISHII <2170248+mtei@users.noreply.github.com> | 2021-09-18 11:51:04 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-18 11:51:04 +0900 |
commit | f93597d66b0698cbea87b24aad79f60e5a9db6ad (patch) | |
tree | 039226cc970ad670d1574fa5dfbf445ef389570e /keyboards/helix | |
parent | 7c09b2667b49839d6c1a27133751d43642149a84 (diff) | |
download | qmk_firmware-f93597d66b0698cbea87b24aad79f60e5a9db6ad.tar.gz qmk_firmware-f93597d66b0698cbea87b24aad79f60e5a9db6ad.zip |
fix link error for helix/rev3_5rows:five_rows (#14466)
This is a tentative quick fix.
I was adding the same functions for both #14426 and #14427 and they were in conflict.
Diffstat (limited to 'keyboards/helix')
-rw-r--r-- | keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c | 53 |
1 files changed, 4 insertions, 49 deletions
diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c index fcbd81c9b..e8ba0d720 100644 --- a/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c | |||
@@ -25,6 +25,10 @@ | |||
25 | #include <string.h> | 25 | #include <string.h> |
26 | #include "layer_number.h" | 26 | #include "layer_number.h" |
27 | 27 | ||
28 | char *sprints(char *buf, char *src); | ||
29 | char *sprintd(char *buf, char *leadstr, int data); | ||
30 | char *sprint2d(char *buf, char *leadstr, int data); | ||
31 | |||
28 | extern int current_default_layer; | 32 | extern int current_default_layer; |
29 | 33 | ||
30 | void init_helix_oled(void) { | 34 | void init_helix_oled(void) { |
@@ -64,55 +68,6 @@ void matrix_update(struct CharacterMatrix *dest, | |||
64 | } | 68 | } |
65 | # endif | 69 | # endif |
66 | 70 | ||
67 | static char *sprint_decimal(char *buf, int data) { | ||
68 | if (data > 9) { | ||
69 | buf = sprint_decimal(buf, data/10); | ||
70 | } | ||
71 | *buf++ = "0123456789"[data%10]; | ||
72 | *buf = '\0'; | ||
73 | return buf; | ||
74 | } | ||
75 | |||
76 | static char *sprint_hex(char *buf, uint32_t data) { | ||
77 | if (data > 0xf) { | ||
78 | buf = sprint_hex(buf, data/0x10); | ||
79 | } | ||
80 | *buf++ = "0123456789abcdef"[data & 0xf]; | ||
81 | *buf = '\0'; | ||
82 | return buf; | ||
83 | } | ||
84 | |||
85 | char *sprints(char *buf, char *src) { | ||
86 | while (*src) { | ||
87 | *buf++ = *src++; | ||
88 | } | ||
89 | *buf = '\0'; | ||
90 | return buf; | ||
91 | } | ||
92 | |||
93 | char *sprintx(char *buf, char *leadstr, uint32_t data) { | ||
94 | buf = sprints(buf, leadstr); | ||
95 | buf = sprint_hex(buf, data); | ||
96 | return buf; | ||
97 | } | ||
98 | |||
99 | char *sprintd(char *buf, char *leadstr, int data) { | ||
100 | buf = sprints(buf, leadstr); | ||
101 | buf = sprint_decimal(buf, data); | ||
102 | return buf; | ||
103 | } | ||
104 | |||
105 | char *sprint2d(char *buf, char *leadstr, int data) { | ||
106 | buf = sprints(buf, leadstr); | ||
107 | if (data > 99) { | ||
108 | return sprint_decimal(buf, data); | ||
109 | } | ||
110 | if (data < 10) { | ||
111 | *buf++ = ' '; | ||
112 | } | ||
113 | return sprint_decimal(buf, data); | ||
114 | } | ||
115 | |||
116 | # ifdef SSD1306OLED | 71 | # ifdef SSD1306OLED |
117 | static void render_logo(struct CharacterMatrix *matrix) { | 72 | static void render_logo(struct CharacterMatrix *matrix) { |
118 | # else | 73 | # else |