Skip to content

Instantly share code, notes, and snippets.

@ahtn
Last active June 23, 2017 02:51
Show Gist options
  • Save ahtn/51f50fc5080852ad90591fc6b3246ad6 to your computer and use it in GitHub Desktop.
Save ahtn/51f50fc5080852ad90591fc6b3246ad6 to your computer and use it in GitHub Desktop.
#define FORCE_MASTER 1
// this code runs before the usb and keyboard is initialized
void matrix_setup(void) {
#if FORCE_MASTER
// forced master
isLeftHand = true;
keyboard_master_setup();
sei();
#else
// forced slave
isLeftHand = false;
keyboard_slave_setup();
sei();
keyboard_slave_loop();
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment