diff options
| author | Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> | 2020-01-27 05:04:39 +0100 |
|---|---|---|
| committer | Danny <nooges@users.noreply.github.com> | 2020-01-26 23:04:38 -0500 |
| commit | 05d6e6ca78087969d7a47862341d10b6b555c37e (patch) | |
| tree | 5cd80f59929781006d2412a9862a47fc05c4ec7c /keyboards | |
| parent | 645c5fabf24411fe65d2172a3509c26e053651a2 (diff) | |
| download | qmk_firmware-05d6e6ca78087969d7a47862341d10b6b555c37e.tar.gz qmk_firmware-05d6e6ca78087969d7a47862341d10b6b555c37e.zip | |
Ensure setPinInput actually sets input high-Z (#6237)
* Ensure setPinInput actually sets input high-z
* Fixed _PIN_ADDRESS Macro arguments
as recommended by vomindoraan
* Fixed instances of setInput to use new behavour
* Changed kmac matrix to use input with pullups
* Update keyboards/gh60/revc/revc.h
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Fixed input state for unselect_rows
* fixed merge conflict
* Updated all instances of older uses of setPinInput()
* Fixed naming mistake
Co-authored-by: fauxpark <fauxpark@gmail.com>
Diffstat (limited to 'keyboards')
| -rw-r--r-- | keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c | 2 | ||||
| -rw-r--r-- | keyboards/atreus62/keymaps/xyverz/keymap.c | 3 | ||||
| -rw-r--r-- | keyboards/atreus62/keymaps/xyverz/readme.md | 4 | ||||
| -rw-r--r-- | keyboards/eco/keymaps/xyverz/keymap.c | 4 | ||||
| -rw-r--r-- | keyboards/gh60/revc/revc.h | 10 | ||||
| -rw-r--r-- | keyboards/gingham/matrix.c | 2 | ||||
| -rw-r--r-- | keyboards/handwired/owlet60/matrix.c | 5 | ||||
| -rw-r--r-- | keyboards/hineybush/h87a/keymaps/wkl/keymap.c | 2 | ||||
| -rw-r--r-- | keyboards/hineybush/h88/h88.c | 2 | ||||
| -rw-r--r-- | keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c | 1 | ||||
| -rw-r--r-- | keyboards/kmac/matrix.c | 2 | ||||
| -rw-r--r-- | keyboards/minidox/keymaps/xyverz/keymap.c | 4 | ||||
| -rw-r--r-- | keyboards/noxary/268_2/268_2.c | 1 | ||||
| -rw-r--r-- | keyboards/orthodox/keymaps/xyverz/keymap.c | 4 | ||||
| -rw-r--r-- | keyboards/yd60mq/yd60mq.c | 1 |
15 files changed, 16 insertions, 31 deletions
diff --git a/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c index 546f862a6..eb281f5f1 100644 --- a/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c +++ b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c | |||
| @@ -48,8 +48,6 @@ void led_set_user(uint8_t usb_led){ | |||
| 48 | } else { | 48 | } else { |
| 49 | //set to Hi-Z | 49 | //set to Hi-Z |
| 50 | setPinInput(B0); | 50 | setPinInput(B0); |
| 51 | writePinLow(B0); | ||
| 52 | setPinInput(D5); | 51 | setPinInput(D5); |
| 53 | writePinLow(D5); | ||
| 54 | } | 52 | } |
| 55 | } | 53 | } |
diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index 4babed4c1..b852d5d7b 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c | |||
| @@ -30,6 +30,7 @@ CHANGELOG: | |||
| 30 | 0.6 - Swapped ESC and GRV in all layers. | 30 | 0.6 - Swapped ESC and GRV in all layers. |
| 31 | 0.7 - Brought code up to current standards. | 31 | 0.7 - Brought code up to current standards. |
| 32 | 0.8 - Added MACLOCK macro. | 32 | 0.8 - Added MACLOCK macro. |
| 33 | 0.9 - Updated code to correspond to new setPinInput behaviour | ||
| 33 | 34 | ||
| 34 | TODO: | 35 | TODO: |
| 35 | 36 | ||
| @@ -124,9 +125,7 @@ void matrix_init_user(void) { | |||
| 124 | #ifdef BOOTLOADER_CATERINA | 125 | #ifdef BOOTLOADER_CATERINA |
| 125 | // This will disable the red LEDs on the ProMicros | 126 | // This will disable the red LEDs on the ProMicros |
| 126 | setPinInput(D5); | 127 | setPinInput(D5); |
| 127 | writePinLow(D5); | ||
| 128 | setPinInput(B0); | 128 | setPinInput(B0); |
| 129 | writePinLow(B0); | ||
| 130 | #endif | 129 | #endif |
| 131 | }; | 130 | }; |
| 132 | 131 | ||
diff --git a/keyboards/atreus62/keymaps/xyverz/readme.md b/keyboards/atreus62/keymaps/xyverz/readme.md index f91a87da4..531e3b28d 100644 --- a/keyboards/atreus62/keymaps/xyverz/readme.md +++ b/keyboards/atreus62/keymaps/xyverz/readme.md | |||
| @@ -30,6 +30,10 @@ The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards h | |||
| 30 | ### 0.7 | 30 | ### 0.7 |
| 31 | * Brought code up to new standards (as of 27 June 2019). | 31 | * Brought code up to new standards (as of 27 June 2019). |
| 32 | * Updated this readme file. | 32 | * Updated this readme file. |
| 33 | ### 0.8 | ||
| 34 | * Added MACLOCK macro. | ||
| 35 | ### 0.9 | ||
| 36 | * Updated code to correspond to new setPinInput behaviour. | ||
| 33 | 37 | ||
| 34 | ### TODO: | 38 | ### TODO: |
| 35 | 39 | ||
diff --git a/keyboards/eco/keymaps/xyverz/keymap.c b/keyboards/eco/keymaps/xyverz/keymap.c index 5a1974336..06054e9ac 100644 --- a/keyboards/eco/keymaps/xyverz/keymap.c +++ b/keyboards/eco/keymaps/xyverz/keymap.c | |||
| @@ -132,9 +132,7 @@ void matrix_init_user(void) { | |||
| 132 | #ifdef BOOTLOADER_CATERINA | 132 | #ifdef BOOTLOADER_CATERINA |
| 133 | // This will disable the red LEDs on the ProMicros | 133 | // This will disable the red LEDs on the ProMicros |
| 134 | setPinInput(D5); | 134 | setPinInput(D5); |
| 135 | writePinLow(D5); | ||
| 136 | setPinInput(B0); | 135 | setPinInput(B0); |
| 137 | writePinLow(B0); | ||
| 138 | #endif | 136 | #endif |
| 139 | }; | 137 | }; |
| 140 | 138 | ||
| @@ -155,4 +153,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 155 | } | 153 | } |
| 156 | } | 154 | } |
| 157 | return true; | 155 | return true; |
| 158 | } \ No newline at end of file | 156 | } |
diff --git a/keyboards/gh60/revc/revc.h b/keyboards/gh60/revc/revc.h index dda7a0db6..e183f776e 100644 --- a/keyboards/gh60/revc/revc.h +++ b/keyboards/gh60/revc/revc.h | |||
| @@ -18,11 +18,11 @@ inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); } | |||
| 18 | inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); } | 18 | inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); } |
| 19 | inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); } | 19 | inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); } |
| 20 | 20 | ||
| 21 | inline void gh60_caps_led_off(void) { setPinInput(B2); writePinLow(B2); } | 21 | inline void gh60_caps_led_off(void) { setPinInput(B2); } |
| 22 | inline void gh60_poker_leds_off(void) { setPinInput(F4); writePinLow(F4); } | 22 | inline void gh60_poker_leds_off(void) { setPinInput(F4); } |
| 23 | inline void gh60_fn_led_off(void) { setPinInput(F5); writePinLow(F5); } | 23 | inline void gh60_fn_led_off(void) { setPinInput(F5); } |
| 24 | inline void gh60_esc_led_off(void) { setPinInput(F6); writePinLow(F6); } | 24 | inline void gh60_esc_led_off(void) { setPinInput(F6); } |
| 25 | inline void gh60_wasd_leds_off(void) { setPinInput(F7); writePinLow(F7); } | 25 | inline void gh60_wasd_leds_off(void) { setPinInput(F7); } |
| 26 | 26 | ||
| 27 | /* GH60 keymap definition macro | 27 | /* GH60 keymap definition macro |
| 28 | * K2C, K31 and K3C are extra keys for ISO | 28 | * K2C, K31 and K3C are extra keys for ISO |
diff --git a/keyboards/gingham/matrix.c b/keyboards/gingham/matrix.c index 790ba9c28..5ac81e791 100644 --- a/keyboards/gingham/matrix.c +++ b/keyboards/gingham/matrix.c | |||
| @@ -150,7 +150,7 @@ static void unselect_row(uint8_t row) | |||
| 150 | static void unselect_rows(void) | 150 | static void unselect_rows(void) |
| 151 | { | 151 | { |
| 152 | for(uint8_t x = 0; x < MATRIX_ROWS; x++) { | 152 | for(uint8_t x = 0; x < MATRIX_ROWS; x++) { |
| 153 | setPinInput(row_pins[x]); | 153 | setPinInputHigh(row_pins[x]); |
| 154 | } | 154 | } |
| 155 | } | 155 | } |
| 156 | 156 | ||
diff --git a/keyboards/handwired/owlet60/matrix.c b/keyboards/handwired/owlet60/matrix.c index 994f527ec..dafc19fcc 100644 --- a/keyboards/handwired/owlet60/matrix.c +++ b/keyboards/handwired/owlet60/matrix.c | |||
| @@ -215,10 +215,7 @@ void matrix_init(void) { | |||
| 215 | matrix_init_quantum(); | 215 | matrix_init_quantum(); |
| 216 | 216 | ||
| 217 | setPinInput(D5); | 217 | setPinInput(D5); |
| 218 | writePinLow(D5); | 218 | setPinInput(B0); |
| 219 | |||
| 220 | setPinInput(B0); | ||
| 221 | writePinLow(B0); | ||
| 222 | } | 219 | } |
| 223 | 220 | ||
| 224 | // modified for per col read matrix scan | 221 | // modified for per col read matrix scan |
diff --git a/keyboards/hineybush/h87a/keymaps/wkl/keymap.c b/keyboards/hineybush/h87a/keymaps/wkl/keymap.c index 72b4d4e44..e3e410823 100644 --- a/keyboards/hineybush/h87a/keymaps/wkl/keymap.c +++ b/keyboards/hineybush/h87a/keymaps/wkl/keymap.c | |||
| @@ -59,7 +59,6 @@ void led_set_user(uint8_t usb_led) { | |||
| 59 | writePinLow(D5); | 59 | writePinLow(D5); |
| 60 | } else { | 60 | } else { |
| 61 | setPinInput(D5); | 61 | setPinInput(D5); |
| 62 | writePinLow(D5); | ||
| 63 | } | 62 | } |
| 64 | 63 | ||
| 65 | if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { | 64 | if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { |
| @@ -67,7 +66,6 @@ void led_set_user(uint8_t usb_led) { | |||
| 67 | writePinLow(E6); | 66 | writePinLow(E6); |
| 68 | } else { | 67 | } else { |
| 69 | setPinInput(E6); | 68 | setPinInput(E6); |
| 70 | writePinLow(E6); | ||
| 71 | } | 69 | } |
| 72 | 70 | ||
| 73 | } | 71 | } |
diff --git a/keyboards/hineybush/h88/h88.c b/keyboards/hineybush/h88/h88.c index 46d639390..1f702e9e9 100644 --- a/keyboards/hineybush/h88/h88.c +++ b/keyboards/hineybush/h88/h88.c | |||
| @@ -54,7 +54,6 @@ void led_set_user(uint8_t usb_led) { | |||
| 54 | writePinLow(D5); | 54 | writePinLow(D5); |
| 55 | } else { | 55 | } else { |
| 56 | setPinInput(D5); | 56 | setPinInput(D5); |
| 57 | writePinLow(D5); | ||
| 58 | } | 57 | } |
| 59 | 58 | ||
| 60 | if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { | 59 | if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { |
| @@ -62,7 +61,6 @@ void led_set_user(uint8_t usb_led) { | |||
| 62 | writePinLow(E6); | 61 | writePinLow(E6); |
| 63 | } else { | 62 | } else { |
| 64 | setPinInput(E6); | 63 | setPinInput(E6); |
| 65 | writePinLow(E6); | ||
| 66 | } | 64 | } |
| 67 | 65 | ||
| 68 | } | 66 | } |
diff --git a/keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c b/keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c index ad3b6f6c5..1221e753a 100644 --- a/keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/tucznak/keymap.c | |||
| @@ -85,6 +85,5 @@ void led_set_user(uint8_t usb_led) { | |||
| 85 | writePinLow(B2); | 85 | writePinLow(B2); |
| 86 | } else { | 86 | } else { |
| 87 | setPinInput(B2); | 87 | setPinInput(B2); |
| 88 | writePinLow(B2); | ||
| 89 | } | 88 | } |
| 90 | } | 89 | } |
diff --git a/keyboards/kmac/matrix.c b/keyboards/kmac/matrix.c index 2212ee076..9bc59a078 100644 --- a/keyboards/kmac/matrix.c +++ b/keyboards/kmac/matrix.c | |||
| @@ -140,7 +140,7 @@ static void select_col(uint8_t col) { | |||
| 140 | static void init_pins(void) { | 140 | static void init_pins(void) { |
| 141 | unselect_cols(); | 141 | unselect_cols(); |
| 142 | for (uint8_t x = 0; x < MATRIX_ROWS; x++) { | 142 | for (uint8_t x = 0; x < MATRIX_ROWS; x++) { |
| 143 | setPinInput(row_pins[x]); | 143 | setPinInputHigh(row_pins[x]); |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | setPinInputHigh(E2); | 146 | setPinInputHigh(E2); |
diff --git a/keyboards/minidox/keymaps/xyverz/keymap.c b/keyboards/minidox/keymaps/xyverz/keymap.c index 994ee4e1b..4c7a05227 100644 --- a/keyboards/minidox/keymaps/xyverz/keymap.c +++ b/keyboards/minidox/keymaps/xyverz/keymap.c | |||
| @@ -169,9 +169,7 @@ void matrix_init_user(void) { | |||
| 169 | #ifdef BOOTLOADER_CATERINA | 169 | #ifdef BOOTLOADER_CATERINA |
| 170 | // This will disable the red LEDs on the ProMicros | 170 | // This will disable the red LEDs on the ProMicros |
| 171 | setPinInput(D5); | 171 | setPinInput(D5); |
| 172 | writePinLow(D5); | ||
| 173 | setPinInput(B0); | 172 | setPinInput(B0); |
| 174 | writePinLow(B0); | ||
| 175 | #endif | 173 | #endif |
| 176 | }; | 174 | }; |
| 177 | 175 | ||
| @@ -192,4 +190,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 192 | } | 190 | } |
| 193 | } | 191 | } |
| 194 | return true; | 192 | return true; |
| 195 | } \ No newline at end of file | 193 | } |
diff --git a/keyboards/noxary/268_2/268_2.c b/keyboards/noxary/268_2/268_2.c index 9e2d82236..5af56a386 100644 --- a/keyboards/noxary/268_2/268_2.c +++ b/keyboards/noxary/268_2/268_2.c | |||
| @@ -21,7 +21,6 @@ void led_set_kb(uint8_t usb_led) { | |||
| 21 | writePinHigh(B0); | 21 | writePinHigh(B0); |
| 22 | } else { | 22 | } else { |
| 23 | setPinInput(B0); | 23 | setPinInput(B0); |
| 24 | writePinLow(B0); | ||
| 25 | } | 24 | } |
| 26 | 25 | ||
| 27 | led_set_user(usb_led); | 26 | led_set_user(usb_led); |
diff --git a/keyboards/orthodox/keymaps/xyverz/keymap.c b/keyboards/orthodox/keymaps/xyverz/keymap.c index cc3c38943..0417c1a4a 100644 --- a/keyboards/orthodox/keymaps/xyverz/keymap.c +++ b/keyboards/orthodox/keymaps/xyverz/keymap.c | |||
| @@ -63,9 +63,7 @@ void matrix_init_user(void) { | |||
| 63 | #ifdef BOOTLOADER_CATERINA | 63 | #ifdef BOOTLOADER_CATERINA |
| 64 | // This will disable the red LEDs on the ProMicros | 64 | // This will disable the red LEDs on the ProMicros |
| 65 | setPinInput(D5); | 65 | setPinInput(D5); |
| 66 | writePinLow(D5); | ||
| 67 | setPinInput(B0); | 66 | setPinInput(B0); |
| 68 | writePinLow(B0); | ||
| 69 | #endif | 67 | #endif |
| 70 | }; | 68 | }; |
| 71 | 69 | ||
| @@ -86,4 +84,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 86 | } | 84 | } |
| 87 | } | 85 | } |
| 88 | return true; | 86 | return true; |
| 89 | } \ No newline at end of file | 87 | } |
diff --git a/keyboards/yd60mq/yd60mq.c b/keyboards/yd60mq/yd60mq.c index 96306d6a6..6e391046e 100644 --- a/keyboards/yd60mq/yd60mq.c +++ b/keyboards/yd60mq/yd60mq.c | |||
| @@ -6,7 +6,6 @@ void led_set_kb(uint8_t usb_led) { | |||
| 6 | writePinLow(F4); | 6 | writePinLow(F4); |
| 7 | } else { | 7 | } else { |
| 8 | setPinInput(F4); | 8 | setPinInput(F4); |
| 9 | writePinLow(F4); | ||
| 10 | } | 9 | } |
| 11 | 10 | ||
| 12 | led_set_user(usb_led); | 11 | led_set_user(usb_led); |
