Save at a working point
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
# Copyright 2013 Jun Wako <wakojun@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/>.
|
||||
|
||||
|
||||
# QMK Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
@@ -1,24 +0,0 @@
|
||||
/* Copyright 2017 REPLACE_WITH_YOUR_NAME
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
||||
@@ -17,7 +17,42 @@
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
KC_1, KC_2, \
|
||||
KC_3, KC_4 \
|
||||
KC_1, F(2), \
|
||||
F(0), F(1) \
|
||||
),
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static bool backlight;
|
||||
|
||||
switch (id) {
|
||||
case 0:
|
||||
palSetPad(GPIOA, 6);
|
||||
palSetPad(GPIOA, 3);
|
||||
palSetPad(GPIOA, 15);
|
||||
palSetPad(GPIOB, 5);
|
||||
backlight = false;
|
||||
break;
|
||||
case 1:
|
||||
palClearPad(GPIOA, 6);
|
||||
palClearPad(GPIOA, 3);
|
||||
palClearPad(GPIOA, 15);
|
||||
palClearPad(GPIOB, 5);
|
||||
backlight = true;
|
||||
break;
|
||||
case 2:
|
||||
if (backlight) {
|
||||
palSetPad(GPIOA, 6);
|
||||
palSetPad(GPIOA, 3);
|
||||
palSetPad(GPIOA, 15);
|
||||
palSetPad(GPIOB, 5);
|
||||
backlight = false;
|
||||
} else {
|
||||
palClearPad(GPIOA, 6);
|
||||
palClearPad(GPIOA, 3);
|
||||
palClearPad(GPIOA, 15);
|
||||
palClearPad(GPIOB, 5);
|
||||
backlight = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user