Merge pull request #97 from algernon/f/hardware-movement
Move more things to the hardware librarypull/98/head
commit
c4a851efbf
@ -1,19 +0,0 @@
|
||||
#include "Storage.h"
|
||||
|
||||
|
||||
Storage_::Storage_(void) {
|
||||
}
|
||||
|
||||
void Storage_::save_primary_keymap(uint8_t keymap) {
|
||||
EEPROM.write(EEPROM_KEYMAP_LOCATION, keymap);
|
||||
}
|
||||
|
||||
uint8_t Storage_::load_primary_keymap(uint8_t keymap_count) {
|
||||
uint8_t keymap = EEPROM.read(EEPROM_KEYMAP_LOCATION);
|
||||
if (keymap >= keymap_count) {
|
||||
return 0; // undefined positions get saved as 255
|
||||
}
|
||||
return 0; // return keymap;
|
||||
}
|
||||
|
||||
Storage_ Storage;
|
@ -1,15 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <EEPROM.h>
|
||||
|
||||
#define EEPROM_KEYMAP_LOCATION 0
|
||||
|
||||
class Storage_ {
|
||||
public:
|
||||
Storage_(void);
|
||||
uint8_t load_primary_keymap(uint8_t keymap_count);
|
||||
void save_primary_keymap(uint8_t keymap);
|
||||
};
|
||||
|
||||
extern Storage_ Storage;
|
@ -1,4 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#define COLS 16
|
||||
#define ROWS 4
|
Loading…
Reference in new issue