diff --git a/keyboards/massdrop/shift/keymaps/default_md/keymap.c b/keyboards/massdrop/shift/keymaps/default_md/keymap.c index 27e74022f4bd..d3083d1abcd9 100644 --- a/keyboards/massdrop/shift/keymaps/default_md/keymap.c +++ b/keyboards/massdrop/shift/keymaps/default_md/keymap.c @@ -32,7 +32,7 @@ keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PSCR, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_P1, KC_P2, KC_P3, \ @@ -41,14 +41,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, KC_DOWN, KC_RGHT \ ), [1] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS , _______, _______, KC_PSCR, KC_SLCK, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, KC_BRK , \ - L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_MPLY, KC_MSTP, KC_VOLU, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_SLCK, \ + L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, _______, _______, _______, _______, \ L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, \ _______, _______, _______, DBG_FAC, KC_APP, _______, _______, _______, \ - _______, _______, _______ \ + _______, DBG_TOG, _______ \ ), /* [X] = LAYOUT( diff --git a/keyboards/massdrop/shift/keymaps/mac_md/keymap.c b/keyboards/massdrop/shift/keymaps/mac_md/keymap.c index 9f868d506275..c9ee8e3470e8 100644 --- a/keyboards/massdrop/shift/keymaps/mac_md/keymap.c +++ b/keyboards/massdrop/shift/keymaps/mac_md/keymap.c @@ -32,7 +32,7 @@ keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PSCR, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_P1, KC_P2, KC_P3, \ @@ -41,8 +41,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, KC_DOWN, KC_RGHT \ ), [1] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, KC_MUTE, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_MPLY, KC_MSTP, KC_VOLU, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_SLCK, \ L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, _______, _______, _______, _______, \ L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/tmk_core/common/arm_atsam/suspend.c b/tmk_core/common/arm_atsam/suspend.c index a5db18531d30..2c28258c631e 100644 --- a/tmk_core/common/arm_atsam/suspend.c +++ b/tmk_core/common/arm_atsam/suspend.c @@ -8,45 +8,56 @@ * * FIXME: needs doc */ -void suspend_idle(uint8_t time) { /* Note: Not used anywhere currently */ } +void suspend_idle(uint8_t time) { + /* Note: Not used anywhere currently */ +} /** \brief Run user level Power down * * FIXME: needs doc */ -__attribute__((weak)) void suspend_power_down_user(void) {} +__attribute__ ((weak)) +void suspend_power_down_user (void) { + +} /** \brief Run keyboard level Power down * * FIXME: needs doc */ -__attribute__((weak)) void suspend_power_down_kb(void) { suspend_power_down_user(); } +__attribute__ ((weak)) +void suspend_power_down_kb(void) { + suspend_power_down_user(); +} /** \brief Suspend power down * * FIXME: needs doc */ -void suspend_power_down(void) { +void suspend_power_down(void) +{ #ifdef RGB_MATRIX_ENABLE - I2C3733_Control_Set(0); // Disable LED driver + I2C3733_Control_Set(0); //Disable LED driver #endif suspend_power_down_kb(); } -__attribute__((weak)) void matrix_power_up(void) {} -__attribute__((weak)) void matrix_power_down(void) {} -bool suspend_wakeup_condition(void) { - if (ui_is_remotewakeup_enabled()) { - matrix_power_up(); - matrix_scan(); - matrix_power_down(); - for (uint8_t r = 0; r < MATRIX_ROWS; r++) { - if (matrix_get_row(r)) return true; - } - } else { - matrix_power_down(); - } +__attribute__ ((weak)) void matrix_power_up(void) {} +__attribute__ ((weak)) void matrix_power_down(void) {} +bool suspend_wakeup_condition(void) { + if( ui_is_remotewakeup_enabled() ) { + matrix_power_up(); + matrix_scan(); + matrix_power_down(); + for (uint8_t r = 0; r < MATRIX_ROWS; r++) { + if (matrix_get_row(r)) return true; + } + } + else + { + matrix_power_down(); + } return false; } @@ -54,13 +65,19 @@ bool suspend_wakeup_condition(void) { * * FIXME: needs doc */ -__attribute__((weak)) void suspend_wakeup_init_user(void) {} +__attribute__ ((weak)) +void suspend_wakeup_init_user(void) { + +} /** \brief run keyboard level code immediately after wakeup * * FIXME: needs doc */ -__attribute__((weak)) void suspend_wakeup_init_kb(void) { suspend_wakeup_init_user(); } +__attribute__ ((weak)) +void suspend_wakeup_init_kb(void) { + suspend_wakeup_init_user(); +} /** \brief run immediately after wakeup * @@ -68,15 +85,16 @@ __attribute__((weak)) void suspend_wakeup_init_kb(void) { suspend_wakeup_init_us */ void suspend_wakeup_init(void) { #ifdef RGB_MATRIX_ENABLE -# ifdef USE_MASSDROP_CONFIGURATOR +#ifdef USE_MASSDROP_CONFIGURATOR // TODO: need to re-add led_enabled? // if (I2C3733_Control_Get()) { - I2C3733_Control_Set(1); + I2C3733_Control_Set(1); // } -# else +#else I2C3733_Control_Set(1); -# endif +#endif #endif suspend_wakeup_init_kb(); } + diff --git a/tmk_core/protocol/arm_atsam/usb/ui.c b/tmk_core/protocol/arm_atsam/usb/ui.c index 7156c54785df..64f67813b36a 100644 --- a/tmk_core/protocol/arm_atsam/usb/ui.c +++ b/tmk_core/protocol/arm_atsam/usb/ui.c @@ -69,13 +69,19 @@ static void ui_wakeup_handler(void) } #endif -void ui_init(void) { _isWakeupEnabled = true; } +void ui_init(void) { + _isWakeupEnabled = true; +} void ui_powerdown(void) {} -void ui_wakeup_enable(void) { _isWakeupEnabled = true; } +void ui_wakeup_enable(void) { + _isWakeupEnabled = true; +} -void ui_wakeup_disable(void) { _isWakeupEnabled = false; } +void ui_wakeup_disable(void) { + _isWakeupEnabled = false; +} void ui_wakeup(void) {} @@ -83,4 +89,6 @@ void ui_process(uint16_t framenumber) {} void ui_kbd_led(uint8_t value) {} -bool ui_is_remotewakeup_enabled(void) { return (_isWakeupEnabled); } +bool ui_is_remotewakeup_enabled(void) { + return(_isWakeupEnabled); +}