summaryrefslogtreecommitdiff
path: root/quantum/process_keycode
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-04-13 14:07:48 -0400
committerGitHub <noreply@github.com>2017-04-13 14:07:48 -0400
commit41a46c7c8e4aa2470c245cbe09deb57c0720698e (patch)
tree8b07323439fc477f47833d7ee7564e26b323a3eb /quantum/process_keycode
parentd3301c0f8b0005738ab9aa2030d83739ffb5c4b6 (diff)
parentd68294615f9c67764c06a7524fb59c22c024a106 (diff)
Merge pull request #1224 from fredizzimo/fix_warnings
Fix all warnings and turn on warnings as errors
Diffstat (limited to 'quantum/process_keycode')
-rw-r--r--quantum/process_keycode/process_printer.c22
-rw-r--r--quantum/process_keycode/process_printer.h2
-rw-r--r--quantum/process_keycode/process_printer_bb.c4
-rw-r--r--quantum/process_keycode/process_unicode.c1
-rw-r--r--quantum/process_keycode/process_unicode_common.c1
5 files changed, 17 insertions, 13 deletions
diff --git a/quantum/process_keycode/process_printer.c b/quantum/process_keycode/process_printer.c
index 807f7a0b91..613af70183 100644
--- a/quantum/process_keycode/process_printer.c
+++ b/quantum/process_keycode/process_printer.c
@@ -20,12 +20,12 @@
bool printing_enabled = false;
uint8_t character_shift = 0;
-void enabled_printing() {
+void enable_printing(void) {
printing_enabled = true;
serial_init();
}
-void disable_printing() {
+void disable_printing(void) {
printing_enabled = false;
}
@@ -41,9 +41,14 @@ void print_char(char c) {
USB_Init();
}
-void print_box_string(uint8_t text[]) {
- uint8_t len = strlen(text);
- uint8_t out[len * 3 + 8];
+void print_string(char c[]) {
+ for(uint8_t i = 0; i < strlen(c); i++)
+ print_char(c[i]);
+}
+
+void print_box_string(const char text[]) {
+ size_t len = strlen(text);
+ char out[len * 3 + 8];
out[0] = 0xDA;
for (uint8_t i = 0; i < len; i++) {
out[i+1] = 0xC4;
@@ -69,14 +74,9 @@ void print_box_string(uint8_t text[]) {
print_string(out);
}
-void print_string(char c[]) {
- for(uint8_t i = 0; i < strlen(c); i++)
- print_char(c[i]);
-}
-
bool process_printer(uint16_t keycode, keyrecord_t *record) {
if (keycode == PRINT_ON) {
- enabled_printing();
+ enable_printing();
return false;
}
if (keycode == PRINT_OFF) {
diff --git a/quantum/process_keycode/process_printer.h b/quantum/process_keycode/process_printer.h
index aa494ac8a7..71d3a4b56a 100644
--- a/quantum/process_keycode/process_printer.h
+++ b/quantum/process_keycode/process_printer.h
@@ -21,4 +21,6 @@
#include "protocol/serial.h"
+bool process_printer(uint16_t keycode, keyrecord_t *record);
+
#endif
diff --git a/quantum/process_keycode/process_printer_bb.c b/quantum/process_keycode/process_printer_bb.c
index 55d3b552b2..3a00f169d8 100644
--- a/quantum/process_keycode/process_printer_bb.c
+++ b/quantum/process_keycode/process_printer_bb.c
@@ -46,7 +46,7 @@ void serial_output(void) {
}
-void enabled_printing() {
+void enable_printing() {
printing_enabled = true;
serial_output();
serial_high();
@@ -82,7 +82,7 @@ void print_string(char c[]) {
bool process_printer(uint16_t keycode, keyrecord_t *record) {
if (keycode == PRINT_ON) {
- enabled_printing();
+ enable_printing();
return false;
}
if (keycode == PRINT_OFF) {
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c
index 678a15234d..fd008eca12 100644
--- a/quantum/process_keycode/process_unicode.c
+++ b/quantum/process_keycode/process_unicode.c
@@ -15,6 +15,7 @@
*/
#include "process_unicode.h"
#include "action_util.h"
+#include "eeprom.h"
static uint8_t first_flag = 0;
diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c
index 1dbdec3e71..84b5d673dd 100644
--- a/quantum/process_keycode/process_unicode_common.c
+++ b/quantum/process_keycode/process_unicode_common.c
@@ -15,6 +15,7 @@
*/
#include "process_unicode_common.h"
+#include "eeprom.h"
static uint8_t input_mode;
uint8_t mods;