Break out storage related functions into their own file

pull/18/head
Jesse Vincent 9 years ago
parent 9da546f174
commit f1da7437fa

@ -127,22 +127,6 @@ void loop() {
void save_primary_keymap(byte keymap) {
EEPROM.write(EEPROM_KEYMAP_LOCATION, keymap);
}
byte load_primary_keymap() {
byte keymap = EEPROM.read(EEPROM_KEYMAP_LOCATION);
if (keymap >= KEYMAPS ) {
return 0; // undefined positions get saved as 255
}
return 0; // return keymap;
}
// Sending events to the usb host
void handle_synthetic_key_press(byte switchState, Key mappedKey) {

@ -0,0 +1,14 @@
#include "storage.h"
void save_primary_keymap(byte keymap) {
EEPROM.write(EEPROM_KEYMAP_LOCATION, keymap);
}
byte load_primary_keymap() {
byte keymap = EEPROM.read(EEPROM_KEYMAP_LOCATION);
if (keymap >= KEYMAPS ) {
return 0; // undefined positions get saved as 255
}
return 0; // return keymap;
}

@ -0,0 +1,6 @@
#include <Arduino.h>
#include <EEPROM.h>
#include "KeyboardConfig.h"
void save_primary_keymap(byte keymap);
byte load_primary_keymap();
Loading…
Cancel
Save