diff options
| author | tmk <nobody@nowhere> | 2014-06-17 22:41:14 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2014-07-30 14:07:43 +0900 |
| commit | e81c70149ecf73256f8bb7d77cefc07f2b91d2be (patch) | |
| tree | d918595b92aa099537640cd02285f914b343bd67 /common/eeconfig.c | |
| parent | ee70fe59ee8ebc6dcbf55171b1a2dd72e1744ae6 (diff) | |
| download | qmk_firmware-e81c70149ecf73256f8bb7d77cefc07f2b91d2be.tar.gz qmk_firmware-e81c70149ecf73256f8bb7d77cefc07f2b91d2be.zip | |
Fix common files for mbed
Diffstat (limited to 'common/eeconfig.c')
| -rw-r--r-- | common/eeconfig.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/common/eeconfig.c b/common/eeconfig.c deleted file mode 100644 index 5bd47dc6a..000000000 --- a/common/eeconfig.c +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | #include <stdint.h> | ||
| 2 | #include <stdbool.h> | ||
| 3 | #include <avr/eeprom.h> | ||
| 4 | #include "eeconfig.h" | ||
| 5 | |||
| 6 | void eeconfig_init(void) | ||
| 7 | { | ||
| 8 | eeprom_write_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); | ||
| 9 | eeprom_write_byte(EECONFIG_DEBUG, 0); | ||
| 10 | eeprom_write_byte(EECONFIG_DEFAULT_LAYER, 0); | ||
| 11 | eeprom_write_byte(EECONFIG_KEYMAP, 0); | ||
| 12 | eeprom_write_byte(EECONFIG_MOUSEKEY_ACCEL, 0); | ||
| 13 | #ifdef BACKLIGHT_ENABLE | ||
| 14 | eeprom_write_byte(EECONFIG_BACKLIGHT, 0); | ||
| 15 | #endif | ||
| 16 | } | ||
| 17 | |||
| 18 | void eeconfig_enable(void) | ||
| 19 | { | ||
| 20 | eeprom_write_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); | ||
| 21 | } | ||
| 22 | |||
| 23 | void eeconfig_disable(void) | ||
| 24 | { | ||
| 25 | eeprom_write_word(EECONFIG_MAGIC, 0xFFFF); | ||
| 26 | } | ||
| 27 | |||
| 28 | bool eeconfig_is_enabled(void) | ||
| 29 | { | ||
| 30 | return (eeprom_read_word(EECONFIG_MAGIC) == EECONFIG_MAGIC_NUMBER); | ||
| 31 | } | ||
| 32 | |||
| 33 | uint8_t eeconfig_read_debug(void) { return eeprom_read_byte(EECONFIG_DEBUG); } | ||
| 34 | void eeconfig_write_debug(uint8_t val) { eeprom_write_byte(EECONFIG_DEBUG, val); } | ||
| 35 | |||
| 36 | uint8_t eeconfig_read_default_layer(void) { return eeprom_read_byte(EECONFIG_DEFAULT_LAYER); } | ||
| 37 | void eeconfig_write_default_layer(uint8_t val) { eeprom_write_byte(EECONFIG_DEFAULT_LAYER, val); } | ||
| 38 | |||
| 39 | uint8_t eeconfig_read_keymap(void) { return eeprom_read_byte(EECONFIG_KEYMAP); } | ||
| 40 | void eeconfig_write_keymap(uint8_t val) { eeprom_write_byte(EECONFIG_KEYMAP, val); } | ||
| 41 | |||
| 42 | #ifdef BACKLIGHT_ENABLE | ||
| 43 | uint8_t eeconfig_read_backlight(void) { return eeprom_read_byte(EECONFIG_BACKLIGHT); } | ||
| 44 | void eeconfig_write_backlight(uint8_t val) { eeprom_write_byte(EECONFIG_BACKLIGHT, val); } | ||
| 45 | #endif | ||
