diff options
Diffstat (limited to 'keyboards/ft/mars80')
-rw-r--r-- | keyboards/ft/mars80/config.h | 1 | ||||
-rw-r--r-- | keyboards/ft/mars80/mars80.c | 52 | ||||
-rw-r--r-- | keyboards/ft/mars80/mars80.h | 4 | ||||
-rw-r--r-- | keyboards/ft/mars80/rules.mk | 42 | ||||
-rw-r--r-- | keyboards/ft/mars80/usbconfig.h | 12 |
5 files changed, 16 insertions, 95 deletions
diff --git a/keyboards/ft/mars80/config.h b/keyboards/ft/mars80/config.h index b56adb1146..1bf9392872 100644 --- a/keyboards/ft/mars80/config.h +++ b/keyboards/ft/mars80/config.h @@ -38,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 -#define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/ft/mars80/mars80.c b/keyboards/ft/mars80/mars80.c index 7543450822..8e51274087 100644 --- a/keyboards/ft/mars80/mars80.c +++ b/keyboards/ft/mars80/mars80.c @@ -16,50 +16,6 @@ #include "mars80.h" -#include "rgblight.h" -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -void matrix_init_kb(void) { -#ifdef RGBLIGHT_ENABLE - if (rgblight_config.enable) { - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - } -#endif - // call user level keymaps, if any - matrix_init_user(); -} - -void matrix_scan_kb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_task(); -#endif - matrix_scan_user(); - /* Nothing else for now. */ -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - void backlight_init_ports(void) { // initialize pins D0, D1, D4 and D6 as output setPinOutput(D0); @@ -75,17 +31,17 @@ void backlight_init_ports(void) { } void backlight_set(uint8_t level) { - if (level == 0) { + if (level == 0) { // turn backlight LEDs off writePinLow(D0); writePinLow(D1); writePinLow(D4); writePinLow(D6); - } else { + } else { // turn backlight LEDs on writePinHigh(D0); writePinHigh(D1); writePinHigh(D4); writePinHigh(D6); - } -}
\ No newline at end of file + } +} diff --git a/keyboards/ft/mars80/mars80.h b/keyboards/ft/mars80/mars80.h index 6308d06d0d..fdeb4f9857 100644 --- a/keyboards/ft/mars80/mars80.h +++ b/keyboards/ft/mars80/mars80.h @@ -37,7 +37,7 @@ { \ { k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \ { k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \ { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \ @@ -55,7 +55,7 @@ { \ { k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \ { k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO }, \ { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \ diff --git a/keyboards/ft/mars80/rules.mk b/keyboards/ft/mars80/rules.mk index 159307f8d0..de85d62c8e 100644 --- a/keyboards/ft/mars80/rules.mk +++ b/keyboards/ft/mars80/rules.mk @@ -1,33 +1,14 @@ -# Copyright 2019 Luiz Ribeiro <luizribeiro@gmail.com> -# -# 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/>. - # MCU name MCU = atmega32a -PROTOCOL = VUSB - -# unsupported features for now -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# processor frequency -F_CPU = 12000000 -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = bootloadHID # build options @@ -38,13 +19,8 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 -SRC += i2c_master.c - -# programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex - LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/ft/mars80/usbconfig.h b/keyboards/ft/mars80/usbconfig.h index 338b67f583..4430d9e67d 100644 --- a/keyboards/ft/mars80/usbconfig.h +++ b/keyboards/ft/mars80/usbconfig.h @@ -108,20 +108,10 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ #define USB_CFG_IMPLEMENT_FN_WRITE 1 /* Set this to 1 if you want usbFunctionWrite() to be called for control-out * transfers. Set it to 0 if you don't need it and want to save a couple of @@ -237,7 +227,7 @@ section at the end of this file). * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand * the implications! */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +#define USB_CFG_DEVICE_VERSION (DEVICE_VER & 0xFF), ((DEVICE_VER >> 8) & 0xFF) /* Version number of the device: Minor number first, then major number. */ #define USB_CFG_VENDOR_NAME 'f', 't' |