make astyle

pull/389/head
Jesse Vincent 8 years ago
parent 1d2719dc98
commit f2ee554ce6
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -19,21 +19,21 @@
#include <Kaleidoscope-EEPROM-Keymap-Programmer.h> #include <Kaleidoscope-EEPROM-Keymap-Programmer.h>
namespace KaleidoscopePlugins { namespace KaleidoscopePlugins {
uint16_t EEPROMKeymapProgrammer::updatePosition; uint16_t EEPROMKeymapProgrammer::updatePosition;
EEPROMKeymapProgrammer::state_t EEPROMKeymapProgrammer::state; EEPROMKeymapProgrammer::state_t EEPROMKeymapProgrammer::state;
EEPROMKeymapProgrammer::mode_t EEPROMKeymapProgrammer::mode; EEPROMKeymapProgrammer::mode_t EEPROMKeymapProgrammer::mode;
Key EEPROMKeymapProgrammer::newKey; Key EEPROMKeymapProgrammer::newKey;
EEPROMKeymapProgrammer::EEPROMKeymapProgrammer (void) { EEPROMKeymapProgrammer::EEPROMKeymapProgrammer (void) {
} }
void void
EEPROMKeymapProgrammer::begin (void) { EEPROMKeymapProgrammer::begin (void) {
event_handler_hook_use (eventHandlerHook); event_handler_hook_use (eventHandlerHook);
} }
void void
EEPROMKeymapProgrammer::nextState (void) { EEPROMKeymapProgrammer::nextState (void) {
switch (state) { switch (state) {
case INACTIVE: case INACTIVE:
state = WAIT_FOR_KEY; state = WAIT_FOR_KEY;
@ -50,17 +50,17 @@ namespace KaleidoscopePlugins {
cancel (); cancel ();
break; break;
} }
} }
void void
EEPROMKeymapProgrammer::cancel (void) { EEPROMKeymapProgrammer::cancel (void) {
updatePosition = 0; updatePosition = 0;
newKey = Key_NoKey; newKey = Key_NoKey;
state = INACTIVE; state = INACTIVE;
} }
Key Key
EEPROMKeymapProgrammer::eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState) { EEPROMKeymapProgrammer::eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState) {
if (state == INACTIVE) if (state == INACTIVE)
return mappedKey; return mappedKey;
@ -103,7 +103,7 @@ namespace KaleidoscopePlugins {
newKey.raw = newKey.raw * 10 + n; newKey.raw = newKey.raw * 10 + n;
return Key_NoKey; return Key_NoKey;
} }
}; };

@ -22,7 +22,7 @@
#include <Kaleidoscope-EEPROM-Keymap.h> #include <Kaleidoscope-EEPROM-Keymap.h>
namespace KaleidoscopePlugins { namespace KaleidoscopePlugins {
class EEPROMKeymapProgrammer : public KaleidoscopePlugin { class EEPROMKeymapProgrammer : public KaleidoscopePlugin {
public: public:
typedef enum { typedef enum {
CODE, CODE,
@ -50,7 +50,7 @@ namespace KaleidoscopePlugins {
static Key newKey; static Key newKey;
static Key eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState); static Key eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState);
}; };
}; };
extern KaleidoscopePlugins::EEPROMKeymapProgrammer EEPROMKeymapProgrammer; extern KaleidoscopePlugins::EEPROMKeymapProgrammer EEPROMKeymapProgrammer;

Loading…
Cancel
Save