summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2019-10-21 16:38:22 +1100
committernoroadsleft <18669334+noroadsleft@users.noreply.github.com>2019-10-20 22:38:22 -0700
commit97b8ade1aa7dd96027d10dc92da2a2ccbde61b8c (patch)
tree226082aedeb66c8cb90c4ea4a39fef1b4e360a5d
parent1533483bb2d1278d2c2528cf289392aa2a4f15e0 (diff)
[Keyboard] Use GPIO macros for E6 LED in Planck and Preonic default keymaps (#7098)
-rw-r--r--keyboards/planck/keymaps/default/keymap.c4
-rw-r--r--keyboards/planck/planck.c6
-rw-r--r--keyboards/preonic/keymaps/default/keymap.c4
-rw-r--r--keyboards/preonic/rev1/rev1.c4
-rw-r--r--keyboards/preonic/rev2/rev2.c4
5 files changed, 11 insertions, 11 deletions
diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c
index f0ba47b2a9..47394378c5 100644
--- a/keyboards/planck/keymaps/default/keymap.c
+++ b/keyboards/planck/keymaps/default/keymap.c
@@ -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;
diff --git a/keyboards/planck/planck.c b/keyboards/planck/planck.c
index d9e3f00f2b..5a65d5e5f3 100644
--- a/keyboards/planck/planck.c
+++ b/keyboards/planck/planck.c
@@ -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();
@@ -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
-); \ No newline at end of file
+);
diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c
index 49cc64dc95..d8bb2d5f75 100644
--- a/keyboards/preonic/keymaps/default/keymap.c
+++ b/keyboards/preonic/keymaps/default/keymap.c
@@ -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;
diff --git a/keyboards/preonic/rev1/rev1.c b/keyboards/preonic/rev1/rev1.c
index 4e87796081..fd09d7f2d8 100644
--- a/keyboards/preonic/rev1/rev1.c
+++ b/keyboards/preonic/rev1/rev1.c
@@ -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();
};
diff --git a/keyboards/preonic/rev2/rev2.c b/keyboards/preonic/rev2/rev2.c
index 30e3110e46..785ac3310b 100644
--- a/keyboards/preonic/rev2/rev2.c
+++ b/keyboards/preonic/rev2/rev2.c
@@ -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();
};