Skip to content

Commit

Permalink
[Keyboard] Use GPIO macros for E6 LED in Planck and Preonic default k…
Browse files Browse the repository at this point in the history
…eymaps (#7098)
  • Loading branch information
fauxpark authored and noroadsleft committed Oct 21, 2019
1 parent 1533483 commit 97b8ade
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions keyboards/planck/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
backlight_step();
#endif
#ifdef KEYBOARD_planck_rev5
PORTE &= ~(1<<6);
writePinLow(E6);
#endif
} else {
unregister_code(KC_RSFT);
#ifdef KEYBOARD_planck_rev5
PORTE |= (1<<6);
writePinHigh(E6);
#endif
}
return false;
Expand Down
6 changes: 3 additions & 3 deletions keyboards/planck/planck.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ __attribute__ ((weak))
void matrix_init_kb(void) {
// Turn status LED on
#ifdef __AVR__
DDRE |= (1<<6);
PORTE |= (1<<6);
setPinOutput(E6);
writePinHigh(E6);
#endif

matrix_init_user();
Expand All @@ -26,4 +26,4 @@ const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_planck_grid(
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
);
);
4 changes: 2 additions & 2 deletions keyboards/preonic/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
backlight_step();
#endif
#ifdef __AVR__
PORTE &= ~(1<<6);
writePinLow(E6);
#endif
} else {
unregister_code(KC_RSFT);
#ifdef __AVR__
PORTE |= (1<<6);
writePinHigh(E6);
#endif
}
return false;
Expand Down
4 changes: 2 additions & 2 deletions keyboards/preonic/rev1/rev1.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
void matrix_init_kb(void) {

// Turn status LED on
DDRE |= (1<<6);
PORTE |= (1<<6);
setPinOutput(E6);
writePinHigh(E6);

matrix_init_user();
};
4 changes: 2 additions & 2 deletions keyboards/preonic/rev2/rev2.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
void matrix_init_kb(void) {

// Turn status LED on
DDRE |= (1<<6);
PORTE |= (1<<6);
setPinOutput(E6);
writePinHigh(E6);

matrix_init_user();
};

0 comments on commit 97b8ade

Please sign in to comment.