summaryrefslogtreecommitdiffstats
path: root/tmk_core/common
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common')
-rw-r--r--tmk_core/common/avr/eeconfig.c5
-rw-r--r--tmk_core/common/command.c3
-rw-r--r--tmk_core/common/command.h1
-rw-r--r--tmk_core/common/eeconfig.h1
-rw-r--r--tmk_core/common/led.h3
5 files changed, 10 insertions, 3 deletions
diff --git a/tmk_core/common/avr/eeconfig.c b/tmk_core/common/avr/eeconfig.c
index c5391f5cf..656938fb3 100644
--- a/tmk_core/common/avr/eeconfig.c
+++ b/tmk_core/common/avr/eeconfig.c
@@ -14,7 +14,10 @@ void eeconfig_init(void)
eeprom_update_byte(EECONFIG_BACKLIGHT, 0);
#endif
#ifdef AUDIO_ENABLE
- eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default
+ eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default
+#endif
+#ifdef RGBLIGHT_ENABLE
+ eeprom_update_dword(EECONFIG_RGBLIGHT, 0);
#endif
}
diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c
index 024d7c67a..187a2b949 100644
--- a/tmk_core/common/command.c
+++ b/tmk_core/common/command.c
@@ -66,7 +66,6 @@ static bool mousekey_console(uint8_t code);
static void mousekey_console_help(void);
#endif
-static uint8_t numkey2num(uint8_t code);
static void switch_default_layer(uint8_t layer);
@@ -763,7 +762,7 @@ static bool mousekey_console(uint8_t code)
/***********************************************************
* Utilities
***********************************************************/
-static uint8_t numkey2num(uint8_t code)
+uint8_t numkey2num(uint8_t code)
{
switch (code) {
case KC_1: return 1;
diff --git a/tmk_core/common/command.h b/tmk_core/common/command.h
index 92b18849b..a729e4b1e 100644
--- a/tmk_core/common/command.h
+++ b/tmk_core/common/command.h
@@ -27,6 +27,7 @@ bool command_extra(uint8_t code);
bool command_console_extra(uint8_t code);
#ifdef COMMAND_ENABLE
+uint8_t numkey2num(uint8_t code);
bool command_proc(uint8_t code);
#else
#define command_proc(code) false
diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h
index ca47e0d2f..d8caa346f 100644
--- a/tmk_core/common/eeconfig.h
+++ b/tmk_core/common/eeconfig.h
@@ -32,6 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define EECONFIG_MOUSEKEY_ACCEL (uint8_t *)5
#define EECONFIG_BACKLIGHT (uint8_t *)6
#define EECONFIG_AUDIO (uint8_t *)7
+#define EECONFIG_RGBLIGHT (uint32_t *)8
/* debug bit */
diff --git a/tmk_core/common/led.h b/tmk_core/common/led.h
index 2e18dc2af..9dc898780 100644
--- a/tmk_core/common/led.h
+++ b/tmk_core/common/led.h
@@ -37,6 +37,9 @@ void led_set(uint8_t usb_led);
/* keyboard-specific LED functionality */
void led_set_kb(uint8_t usb_led);
+
+void led_init_ports(void);
+
#ifdef __cplusplus
}
#endif