diff options
author | TurboMech <32869044+TurboMech@users.noreply.github.com> | 2018-11-04 10:39:58 -0500 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-11-04 07:39:58 -0800 |
commit | 3946ea21413b56ad50e55482ff5c43b576adc1d7 (patch) | |
tree | c22eca0b3c01b4e65156b47e156dcaafae81ebb7 /keyboards/espectro/espectro.c | |
parent | b5d7bb6154f848e4f3fd3e5d3cc8bbb16a18e093 (diff) | |
download | qmk_firmware-3946ea21413b56ad50e55482ff5c43b576adc1d7.tar.gz |
Keyboard: adding Espectro (#4343)
* added Espectro
Added Espectro keyboard from MechKeys.ca
* Update keyboards/espectro/config.h
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/config.h
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/config.h
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/espectro.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/espectro.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/espectro.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/espectro.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/espectro.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/espectro.h
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/espectro.h
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/espectro.h
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/default/keymap.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/default/keymap.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/config.h
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/config.h
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/config.h
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/config.h
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/keymap.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/keymap.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/keymap.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/keymap.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/keymap.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/keymap.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/keymap.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/keymap.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/keymap.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/keymaps/mac/keymap.c
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/readme.md
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/readme.md
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/readme.md
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/readme.md
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/rules.mk
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/rules.mk
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/rules.mk
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/rules.mk
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/rules.mk
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/rules.mk
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/rules.mk
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/rules.mk
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/rules.mk
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/rules.mk
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* Update keyboards/espectro/rules.mk
Co-Authored-By: TurboMech <32869044+TurboMech@users.noreply.github.com>
* fixing Espectro pull request
* fixing macros in mac keymap
Diffstat (limited to 'keyboards/espectro/espectro.c')
-rwxr-xr-x | keyboards/espectro/espectro.c | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/keyboards/espectro/espectro.c b/keyboards/espectro/espectro.c new file mode 100755 index 000000000..13030cdd4 --- /dev/null +++ b/keyboards/espectro/espectro.c @@ -0,0 +1,76 @@ +/* Copyright 2018 @TurboMech /u/TurboMech <discord> @A9entOran9e#6134 + * + * 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 QMK_KEYBOARD_H +#include "quantum.h" + + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + DDRB |= (1 << 0); PORTB &= ~(1 << 0); + } else { + DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 2); PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 1); PORTB &= ~(1 << 1); + } else { + DDRB &= ~(1 << 1); PORTB &= ~(1 << 1); + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} + |