diff options
| author | fauxpark <fauxpark@gmail.com> | 2020-01-19 18:00:32 +1100 |
|---|---|---|
| committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-01-18 23:00:32 -0800 |
| commit | f5209aa4e941c7f3a942ef4a7e256ab432ec98ce (patch) | |
| tree | 29c2a0d197050ff2accb920731ddb1d022cb2a90 /keyboards/eve | |
| parent | eb5d267e637db4c2c639932b8c8176bf47dff78f (diff) | |
| download | qmk_firmware-f5209aa4e941c7f3a942ef4a7e256ab432ec98ce.tar.gz qmk_firmware-f5209aa4e941c7f3a942ef4a7e256ab432ec98ce.zip | |
Remove custom backlight code for PS2AVRGB boards (#7775)
* Remove custom backlight code for PS2AVRGB boards
* Remove custom driver setting
* BACKLIGHT_BREATHING goes in config.h, not here
* Don't need to include backlight.c again here either
* Turn on backlight for Canoe
* Disable console on a few boards due to oversize
Diffstat (limited to 'keyboards/eve')
| -rw-r--r-- | keyboards/eve/meteor/config.h | 3 | ||||
| -rw-r--r-- | keyboards/eve/meteor/meteor.c | 33 |
2 files changed, 12 insertions, 24 deletions
diff --git a/keyboards/eve/meteor/config.h b/keyboards/eve/meteor/config.h index b23bc877f..2100c3a45 100644 --- a/keyboards/eve/meteor/config.h +++ b/keyboards/eve/meteor/config.h | |||
| @@ -36,4 +36,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 36 | #define DIODE_DIRECTION COL2ROW | 36 | #define DIODE_DIRECTION COL2ROW |
| 37 | #define DEBOUNCE 5 | 37 | #define DEBOUNCE 5 |
| 38 | 38 | ||
| 39 | #define BACKLIGHT_LEVELS 1 | 39 | #define BACKLIGHT_PIN D4 |
| 40 | #define BACKLIGHT_LEVELS 3 | ||
diff --git a/keyboards/eve/meteor/meteor.c b/keyboards/eve/meteor/meteor.c index f5ecbad02..ac1ca5d64 100644 --- a/keyboards/eve/meteor/meteor.c +++ b/keyboards/eve/meteor/meteor.c | |||
| @@ -16,32 +16,19 @@ | |||
| 16 | 16 | ||
| 17 | #include "meteor.h" | 17 | #include "meteor.h" |
| 18 | 18 | ||
| 19 | void backlight_init_ports(void) { | 19 | void keyboard_pre_init_kb(void) { |
| 20 | // initialize pins D0, D1, D4 and D6 as output | 20 | led_init_ports(); |
| 21 | setPinOutput(D0); | 21 | keyboard_pre_init_user(); |
| 22 | setPinOutput(D1); | 22 | } |
| 23 | setPinOutput(D4); | ||
| 24 | setPinOutput(D6); | ||
| 25 | 23 | ||
| 26 | // turn backlight LEDs on | 24 | void led_init_ports(void) { |
| 27 | writePinHigh(D0); | 25 | setPinOutput(D1); |
| 28 | writePinHigh(D1); | 26 | writePinHigh(D1); |
| 29 | writePinHigh(D4); | ||
| 30 | writePinHigh(D6); | ||
| 31 | } | 27 | } |
| 32 | 28 | ||
| 33 | void backlight_set(uint8_t level) { | 29 | bool led_update_kb(led_t led_state) { |
| 34 | if (level == 0) { | 30 | if (led_update_user(led_state)) { |
| 35 | // turn backlight LEDs off | 31 | writePin(D1, !led_state.caps_lock); |
| 36 | writePinLow(D0); | ||
| 37 | writePinLow(D1); | ||
| 38 | writePinLow(D4); | ||
| 39 | writePinLow(D6); | ||
| 40 | } else { | ||
| 41 | // turn backlight LEDs on | ||
| 42 | writePinHigh(D0); | ||
| 43 | writePinHigh(D1); | ||
| 44 | writePinHigh(D4); | ||
| 45 | writePinHigh(D6); | ||
| 46 | } | 32 | } |
| 33 | return true; | ||
| 47 | } | 34 | } |
