]> git.donarmstrong.com Git - tmk_firmware.git/blobdiff - common/eeconfig.h
Remove MCU dependent code from common/keyboard.c
[tmk_firmware.git] / common / eeconfig.h
index 088171f575ac47f1a8d2e430db3764d6f3398c4e..3cd1a174f6658b2e795e8b0980d9cddf8f93f6d6 100644 (file)
@@ -19,41 +19,57 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define EECONFIG_H
 
 #include <stdint.h>
+#include <stdbool.h>
 
-#define EECONFIG_MAGIC_NUMBER                   (uint16_t)0xFEED
+
+#define EECONFIG_MAGIC_NUMBER                       (uint16_t)0xFEED
 
 /* eeprom parameteter address */
-#define EECONFIG_MAGIC                          (uint16_t *)0
-#define EECONFIG_DEBUG                          (uint8_t *)2
-#define EECONFIG_DEFAULT_LAYER                  (uint8_t *)3
-#define EECONFIG_MODIFIER                       (uint8_t *)4
-#define EECONFIG_MOUSEKEY_ACCEL                 (uint8_t *)5
+#define EECONFIG_MAGIC                              (uint16_t *)0
+#define EECONFIG_DEBUG                              (uint8_t *)2
+#define EECONFIG_DEFAULT_LAYER                      (uint8_t *)3
+#define EECONFIG_KEYMAP                             (uint8_t *)4
+#define EECONFIG_MOUSEKEY_ACCEL                     (uint8_t *)5
+#define EECONFIG_BACKLIGHT                          (uint8_t *)6
 
 
-/* config bit */
-#define EECONFIG_DEBUG_ENABLE                   (1<<0)
-#define EECONFIG_DEBUG_MATRIX                   (1<<1)
-#define EECONFIG_DEBUG_KEYBOARD                 (1<<2)
-#define EECONFIG_DEBUG_MOUSE                    (1<<3)
+/* debug bit */
+#define EECONFIG_DEBUG_ENABLE                       (1<<0)
+#define EECONFIG_DEBUG_MATRIX                       (1<<1)
+#define EECONFIG_DEBUG_KEYBOARD                     (1<<2)
+#define EECONFIG_DEBUG_MOUSE                        (1<<3)
 
-#define EECONFIG_MODIFIER_CONTROL_CAPSLOCK      (1<<0)
-#define EECONFIG_MODIFIER_ALT_GUI               (1<<1)
-#define EECONFIG_MODIFIER_ESC_GRAVE             (1<<2)
-#define EECONFIG_MODIFIER_BACKSPACE_BACKSLASH   (1<<3)
-#define EECONFIG_MODIFIER_NO_GUI                (1<<4)
+/* keyconf bit */
+#define EECONFIG_KEYMAP_SWAP_CONTROL_CAPSLOCK       (1<<0)
+#define EECONFIG_KEYMAP_CAPSLOCK_TO_CONTROL         (1<<1)
+#define EECONFIG_KEYMAP_SWAP_LALT_LGUI              (1<<2)
+#define EECONFIG_KEYMAP_SWAP_RALT_RGUI              (1<<3)
+#define EECONFIG_KEYMAP_NO_GUI                      (1<<4)
+#define EECONFIG_KEYMAP_SWAP_GRAVE_ESC              (1<<5)
+#define EECONFIG_KEYMAP_SWAP_BACKSLASH_BACKSPACE    (1<<6)
+#define EECONFIG_KEYMAP_NKRO                        (1<<7)
 
 
-bool eeconfig_initialized(void);
+bool eeconfig_is_enabled(void);
 
 void eeconfig_init(void);
 
+void eeconfig_enable(void);
+
+void eeconfig_disable(void);
+
 uint8_t eeconfig_read_debug(void);
 void eeconfig_write_debug(uint8_t val);
 
-uint8_t eeconfig_read_defalt_layer(void);
-void eeconfig_write_defalt_layer(uint8_t val);
+uint8_t eeconfig_read_default_layer(void);
+void eeconfig_write_default_layer(uint8_t val);
 
-uint8_t eeconfig_read_modifier(void);
-void eeconfig_write_modifier(uint8_t val);
+uint8_t eeconfig_read_keymap(void);
+void eeconfig_write_keymap(uint8_t val);
+
+#ifdef BACKLIGHT_ENABLE
+uint8_t eeconfig_read_backlight(void);
+void eeconfig_write_backlight(uint8_t val);
+#endif
 
 #endif