diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2017-04-13 14:07:48 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-13 14:07:48 -0400 |
| commit | 41a46c7c8e4aa2470c245cbe09deb57c0720698e (patch) | |
| tree | 8b07323439fc477f47833d7ee7564e26b323a3eb /quantum/process_keycode | |
| parent | d3301c0f8b0005738ab9aa2030d83739ffb5c4b6 (diff) | |
| parent | d68294615f9c67764c06a7524fb59c22c024a106 (diff) | |
| download | qmk_firmware-41a46c7c8e4aa2470c245cbe09deb57c0720698e.tar.gz qmk_firmware-41a46c7c8e4aa2470c245cbe09deb57c0720698e.zip | |
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.c | 22 | ||||
| -rw-r--r-- | quantum/process_keycode/process_printer.h | 2 | ||||
| -rw-r--r-- | quantum/process_keycode/process_printer_bb.c | 4 | ||||
| -rw-r--r-- | quantum/process_keycode/process_unicode.c | 1 | ||||
| -rw-r--r-- | quantum/process_keycode/process_unicode_common.c | 1 |
5 files changed, 17 insertions, 13 deletions
diff --git a/quantum/process_keycode/process_printer.c b/quantum/process_keycode/process_printer.c index 807f7a0b9..613af7018 100644 --- a/quantum/process_keycode/process_printer.c +++ b/quantum/process_keycode/process_printer.c | |||
| @@ -20,12 +20,12 @@ | |||
| 20 | bool printing_enabled = false; | 20 | bool printing_enabled = false; |
| 21 | uint8_t character_shift = 0; | 21 | uint8_t character_shift = 0; |
| 22 | 22 | ||
| 23 | void enabled_printing() { | 23 | void enable_printing(void) { |
| 24 | printing_enabled = true; | 24 | printing_enabled = true; |
| 25 | serial_init(); | 25 | serial_init(); |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | void disable_printing() { | 28 | void disable_printing(void) { |
| 29 | printing_enabled = false; | 29 | printing_enabled = false; |
| 30 | } | 30 | } |
| 31 | 31 | ||
| @@ -41,9 +41,14 @@ void print_char(char c) { | |||
| 41 | USB_Init(); | 41 | USB_Init(); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | void print_box_string(uint8_t text[]) { | 44 | void print_string(char c[]) { |
| 45 | uint8_t len = strlen(text); | 45 | for(uint8_t i = 0; i < strlen(c); i++) |
| 46 | uint8_t out[len * 3 + 8]; | 46 | print_char(c[i]); |
| 47 | } | ||
| 48 | |||
| 49 | void print_box_string(const char text[]) { | ||
| 50 | size_t len = strlen(text); | ||
| 51 | char out[len * 3 + 8]; | ||
| 47 | out[0] = 0xDA; | 52 | out[0] = 0xDA; |
| 48 | for (uint8_t i = 0; i < len; i++) { | 53 | for (uint8_t i = 0; i < len; i++) { |
| 49 | out[i+1] = 0xC4; | 54 | out[i+1] = 0xC4; |
| @@ -69,14 +74,9 @@ void print_box_string(uint8_t text[]) { | |||
| 69 | print_string(out); | 74 | print_string(out); |
| 70 | } | 75 | } |
| 71 | 76 | ||
| 72 | void print_string(char c[]) { | ||
| 73 | for(uint8_t i = 0; i < strlen(c); i++) | ||
| 74 | print_char(c[i]); | ||
| 75 | } | ||
| 76 | |||
| 77 | bool process_printer(uint16_t keycode, keyrecord_t *record) { | 77 | bool process_printer(uint16_t keycode, keyrecord_t *record) { |
| 78 | if (keycode == PRINT_ON) { | 78 | if (keycode == PRINT_ON) { |
| 79 | enabled_printing(); | 79 | enable_printing(); |
| 80 | return false; | 80 | return false; |
| 81 | } | 81 | } |
| 82 | if (keycode == PRINT_OFF) { | 82 | if (keycode == PRINT_OFF) { |
diff --git a/quantum/process_keycode/process_printer.h b/quantum/process_keycode/process_printer.h index aa494ac8a..71d3a4b56 100644 --- a/quantum/process_keycode/process_printer.h +++ b/quantum/process_keycode/process_printer.h | |||
| @@ -21,4 +21,6 @@ | |||
| 21 | 21 | ||
| 22 | #include "protocol/serial.h" | 22 | #include "protocol/serial.h" |
| 23 | 23 | ||
| 24 | bool process_printer(uint16_t keycode, keyrecord_t *record); | ||
| 25 | |||
| 24 | #endif | 26 | #endif |
diff --git a/quantum/process_keycode/process_printer_bb.c b/quantum/process_keycode/process_printer_bb.c index 55d3b552b..3a00f169d 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) { | |||
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | void enabled_printing() { | 49 | void enable_printing() { |
| 50 | printing_enabled = true; | 50 | printing_enabled = true; |
| 51 | serial_output(); | 51 | serial_output(); |
| 52 | serial_high(); | 52 | serial_high(); |
| @@ -82,7 +82,7 @@ void print_string(char c[]) { | |||
| 82 | 82 | ||
| 83 | bool process_printer(uint16_t keycode, keyrecord_t *record) { | 83 | bool process_printer(uint16_t keycode, keyrecord_t *record) { |
| 84 | if (keycode == PRINT_ON) { | 84 | if (keycode == PRINT_ON) { |
| 85 | enabled_printing(); | 85 | enable_printing(); |
| 86 | return false; | 86 | return false; |
| 87 | } | 87 | } |
| 88 | if (keycode == PRINT_OFF) { | 88 | if (keycode == PRINT_OFF) { |
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 678a15234..fd008eca1 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | */ | 15 | */ |
| 16 | #include "process_unicode.h" | 16 | #include "process_unicode.h" |
| 17 | #include "action_util.h" | 17 | #include "action_util.h" |
| 18 | #include "eeprom.h" | ||
| 18 | 19 | ||
| 19 | static uint8_t first_flag = 0; | 20 | static uint8_t first_flag = 0; |
| 20 | 21 | ||
diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 1dbdec3e7..84b5d673d 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include "process_unicode_common.h" | 17 | #include "process_unicode_common.h" |
| 18 | #include "eeprom.h" | ||
| 18 | 19 | ||
| 19 | static uint8_t input_mode; | 20 | static uint8_t input_mode; |
| 20 | uint8_t mods; | 21 | uint8_t mods; |
