diff options
Diffstat (limited to 'common/command.c')
| -rw-r--r-- | common/command.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/common/command.c b/common/command.c index 202d531fd..40932e050 100644 --- a/common/command.c +++ b/common/command.c | |||
| @@ -27,6 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 27 | #include "keyboard.h" | 27 | #include "keyboard.h" |
| 28 | #include "bootloader.h" | 28 | #include "bootloader.h" |
| 29 | #include "layer_switch.h" | 29 | #include "layer_switch.h" |
| 30 | #include "eeconfig.h" | ||
| 30 | #include "command.h" | 31 | #include "command.h" |
| 31 | 32 | ||
| 32 | #ifdef MOUSEKEY_ENABLE | 33 | #ifdef MOUSEKEY_ENABLE |
| @@ -108,6 +109,7 @@ static void command_common_help(void) | |||
| 108 | print("v: print device version & info\n"); | 109 | print("v: print device version & info\n"); |
| 109 | print("t: print timer count\n"); | 110 | print("t: print timer count\n"); |
| 110 | print("s: print status\n"); | 111 | print("s: print status\n"); |
| 112 | print("e: print eeprom config\n"); | ||
| 111 | #ifdef NKRO_ENABLE | 113 | #ifdef NKRO_ENABLE |
| 112 | print("n: toggle NKRO\n"); | 114 | print("n: toggle NKRO\n"); |
| 113 | #endif | 115 | #endif |
| @@ -121,10 +123,30 @@ static void command_common_help(void) | |||
| 121 | print("Paus: jump to bootloader\n"); | 123 | print("Paus: jump to bootloader\n"); |
| 122 | } | 124 | } |
| 123 | 125 | ||
| 126 | static void print_eeprom_config(void) | ||
| 127 | { | ||
| 128 | uint8_t eebyte; | ||
| 129 | |||
| 130 | print("magic: "); print_hex16(eeprom_read_word((uint16_t)0)); print("\n"); | ||
| 131 | |||
| 132 | eebyte = eeconfig_read_debug(); | ||
| 133 | print("debug: "); print_hex8(eebyte); print("\n"); | ||
| 134 | |||
| 135 | eebyte = eeconfig_read_defalt_layer(); | ||
| 136 | print("defalt_layer: "); print_hex8(eebyte); print("\n"); | ||
| 137 | |||
| 138 | eebyte = eeconfig_read_modifier(); | ||
| 139 | print("modifiers: "); print_hex8(eebyte); print("\n"); | ||
| 140 | } | ||
| 141 | |||
| 124 | static bool command_common(uint8_t code) | 142 | static bool command_common(uint8_t code) |
| 125 | { | 143 | { |
| 126 | static host_driver_t *host_driver = 0; | 144 | static host_driver_t *host_driver = 0; |
| 127 | switch (code) { | 145 | switch (code) { |
| 146 | case KC_E: | ||
| 147 | print("eeprom config\n"); | ||
| 148 | print_eeprom_config(); | ||
| 149 | break; | ||
| 128 | case KC_CAPSLOCK: | 150 | case KC_CAPSLOCK: |
| 129 | if (host_get_driver()) { | 151 | if (host_get_driver()) { |
| 130 | host_driver = host_get_driver(); | 152 | host_driver = host_get_driver(); |
