astyle with current project style guidelines

pull/365/head
Jesse Vincent 8 years ago
parent 7d6225f724
commit 1ef902c27e
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -7,7 +7,7 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
byte Macros_::row, Macros_::col; byte Macros_::row, Macros_::col;
static void readKeyCodeAndPlay (const macro_t *macro_p, uint8_t flags, uint8_t keyStates) { static void readKeyCodeAndPlay(const macro_t *macro_p, uint8_t flags, uint8_t keyStates) {
Key key; Key key;
key.flags = flags; key.flags = flags;
key.keyCode = pgm_read_byte(macro_p++); key.keyCode = pgm_read_byte(macro_p++);
@ -42,25 +42,25 @@ void Macros_::play(const macro_t *macro_p) {
} }
case MACRO_ACTION_STEP_KEYDOWN: case MACRO_ACTION_STEP_KEYDOWN:
flags = pgm_read_byte(macro_p++); flags = pgm_read_byte(macro_p++);
readKeyCodeAndPlay (macro_p++, flags, IS_PRESSED); readKeyCodeAndPlay(macro_p++, flags, IS_PRESSED);
break; break;
case MACRO_ACTION_STEP_KEYUP: case MACRO_ACTION_STEP_KEYUP:
flags = pgm_read_byte(macro_p++); flags = pgm_read_byte(macro_p++);
readKeyCodeAndPlay (macro_p++, flags, WAS_PRESSED); readKeyCodeAndPlay(macro_p++, flags, WAS_PRESSED);
break; break;
case MACRO_ACTION_STEP_TAP: case MACRO_ACTION_STEP_TAP:
flags = pgm_read_byte(macro_p++); flags = pgm_read_byte(macro_p++);
readKeyCodeAndPlay (macro_p++, flags, IS_PRESSED | WAS_PRESSED); readKeyCodeAndPlay(macro_p++, flags, IS_PRESSED | WAS_PRESSED);
break; break;
case MACRO_ACTION_STEP_KEYCODEDOWN: case MACRO_ACTION_STEP_KEYCODEDOWN:
readKeyCodeAndPlay (macro_p++, 0, IS_PRESSED); readKeyCodeAndPlay(macro_p++, 0, IS_PRESSED);
break; break;
case MACRO_ACTION_STEP_KEYCODEUP: case MACRO_ACTION_STEP_KEYCODEUP:
readKeyCodeAndPlay (macro_p++, 0, WAS_PRESSED); readKeyCodeAndPlay(macro_p++, 0, WAS_PRESSED);
break; break;
case MACRO_ACTION_STEP_TAPCODE: case MACRO_ACTION_STEP_TAPCODE:
readKeyCodeAndPlay (macro_p++, 0, IS_PRESSED | WAS_PRESSED); readKeyCodeAndPlay(macro_p++, 0, IS_PRESSED | WAS_PRESSED);
break; break;
case END: case END:
@ -84,12 +84,12 @@ static Key handleMacroEvent(Key mappedKey, byte row, byte col, uint8_t keyState)
return Key_NoKey; return Key_NoKey;
} }
Macros_::Macros_ (void) { Macros_::Macros_(void) {
} }
void void
Macros_::begin (void) { Macros_::begin(void) {
event_handler_hook_use (handleMacroEvent); event_handler_hook_use(handleMacroEvent);
} }
Macros_ Macros; Macros_ Macros;

Loading…
Cancel
Save