diff options
author | datafx <2432997+datafx@users.noreply.github.com> | 2021-03-05 13:04:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-05 10:04:14 -0800 |
commit | aadea5ab97d4da9af1d75f39a15f5ce498034105 (patch) | |
tree | 4b30a5be44f7b15575dd1a0702c69be1543c14bd /keyboards/monstargear/xo87/solderable/solderable.c | |
parent | 54f7708eaadb838320443a66bb6b25b3969473b7 (diff) | |
download | qmk_firmware-aadea5ab97d4da9af1d75f39a15f5ce498034105.tar.gz qmk_firmware-aadea5ab97d4da9af1d75f39a15f5ce498034105.zip |
[Keyboard] Monstargear XO87 Solderable support (#11716)
* Support for XO87 solderable version
* cleanup
* Remove abandoned code
* replaced KEYMAP with LAYOUT and moved LAYOUT macro to solderable.h. deleted unneeded files.
* Update keyboards/monstargear/xo87/solderable/keymaps/via/keymap.c
* update info.json with missing keys
* Apply suggestions from code review
* Apply suggestions from code review
correct layout macro
Diffstat (limited to 'keyboards/monstargear/xo87/solderable/solderable.c')
-rw-r--r-- | keyboards/monstargear/xo87/solderable/solderable.c | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/keyboards/monstargear/xo87/solderable/solderable.c b/keyboards/monstargear/xo87/solderable/solderable.c new file mode 100644 index 0000000000..f1fc65ea01 --- /dev/null +++ b/keyboards/monstargear/xo87/solderable/solderable.c @@ -0,0 +1,76 @@ +/* Copyright 2021 datafx + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "solderable.h" +#include "quantum.h" + +#define noLed {255,255} + +#define ledSollSP (80+3) +#define ledNumSP (80+7) +#define ledCapSP (80+8) + +void backlight_init_ports(void) { + setPinOutput(Lseg0); + setPinOutput(Lseg1); + setPinOutput(Lseg2); + setPinOutput(Lseg3); + setPinOutput(Lseg4); + setPinOutput(Lseg5); + setPinOutput(Lcom0); + setPinOutput(Lcom1); + setPinOutput(Lcom2); + setPinOutput(Lcom3); + setPinOutput(Lcom4); + setPinOutput(Lcom5); + setPinOutput(Lcom6); + setPinOutput(Lcom7); + setPinOutput(Lcom8); + setPinOutput(Lcom9); + setPinOutput(Lcom10); + setPinOutput(Lcom11); + setPinOutput(Lcom12); + setPinOutput(Lcom13); + setPinOutput(Lcom14); + setPinOutput(Lcom15); +} + +void backlight_set(uint8_t level) { +} + +void backlight_task(void) { + // This is a temporary workaround to get the status LEDs working until we can figure out the LED matrix + led_t host_leds = host_keyboard_led_state(); + if (host_leds.scroll_lock) { + writePinHigh(Lcom3); + writePinHigh(Lseg5); + } else { + writePinLow(Lcom3); + } + if (host_leds.num_lock) { + writePinHigh(Lcom7); + writePinHigh(Lseg5); + } else { + writePinLow(Lcom7); + } + if (host_leds.caps_lock) { + writePinHigh(Lcom8); + writePinHigh(Lseg5); + } else { + writePinLow(Lcom8); + } +} + |