Merge remote-tracking branch 'qmk/master' into merge-2023-09-08
This commit is contained in:
commit
e390a34128
6126 changed files with 113768 additions and 45875 deletions
|
|
@ -9,6 +9,7 @@
|
|||
"device_version": "0.0.1"
|
||||
},
|
||||
"backlight": {
|
||||
"driver": "timer",
|
||||
"pins": ["F6", "F7"]
|
||||
},
|
||||
"processor": "atmega32u4",
|
||||
|
|
|
|||
|
|
@ -59,16 +59,17 @@ void keyboard_pre_init_user(void) {
|
|||
setPinOutput(B0);
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
|
||||
bool led_update_user(led_t led_state) {
|
||||
if (led_state.num_lock) {
|
||||
writePinLow(D5);
|
||||
} else {
|
||||
writePinHigh(D5);
|
||||
}
|
||||
|
||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||
if (led_state.caps_lock) {
|
||||
writePinLow(B0);
|
||||
} else {
|
||||
writePinHigh(B0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,9 +199,6 @@ void music_scale_user(void)
|
|||
|
||||
#endif
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
//Tap Dance Definitions
|
||||
tap_dance_action_t tap_dance_actions[] = {
|
||||
//Tap once for Esc, twice for Caps Lock
|
||||
|
|
@ -211,40 +208,3 @@ tap_dance_action_t tap_dance_actions[] = {
|
|||
[TD_A_TAB] = ACTION_TAP_DANCE_DOUBLE(KC_A, KC_TAB),
|
||||
[TD_Q_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC)
|
||||
};
|
||||
|
||||
// don't know what this is doing...
|
||||
/*
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRD |= (1 << 5); PORTD &= ~(1 << 5);
|
||||
} else {
|
||||
DDRD &= ~(1 << 5); PORTD &= ~(1 << 5);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 0); PORTB &= ~(1 << 0);
|
||||
} else {
|
||||
DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -5,19 +5,3 @@
|
|||
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
# define RGBLIGHT_EFFECT_BREATHING
|
||||
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
# define RGBLIGHT_EFFECT_SNAKE
|
||||
# define RGBLIGHT_EFFECT_KNIGHT
|
||||
# define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
# define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
# define RGBLIGHT_EFFECT_RGB_TEST
|
||||
# define RGBLIGHT_EFFECT_ALTERNATING
|
||||
# define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 8 // Number of LEDs
|
||||
// #define RGBLIGHT_HUE_STEP 10
|
||||
// #define RGBLIGHT_SAT_STEP 17
|
||||
// #define RGBLIGHT_VAL_STEP 17
|
||||
|
|
|
|||
|
|
@ -17,6 +17,21 @@
|
|||
"pin": "B5",
|
||||
"levels": 4
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 8,
|
||||
"animations": {
|
||||
"breathing": true,
|
||||
"rainbow_mood": true,
|
||||
"rainbow_swirl": true,
|
||||
"snake": true,
|
||||
"knight": true,
|
||||
"christmas": true,
|
||||
"static_gradient": true,
|
||||
"rgb_test": true,
|
||||
"alternating": true,
|
||||
"twinkle": true
|
||||
}
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B4"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -157,11 +157,11 @@ void dynamic_macro_record_end_user(int8_t direction) {
|
|||
// Custom Caps Lock backlight behaviour
|
||||
// ------------------------------------
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
bool led_update_user(led_t led_state) {
|
||||
// This exists because I don't like the backlight to turn OFF when the Caps Lock is ON.
|
||||
// That is, this will turn the backlight ON (at half the brightness) when the Caps Lock is ON as well.
|
||||
static bool prev_is_caps_on;
|
||||
bool is_caps_on = IS_LED_ON(usb_led, USB_LED_CAPS_LOCK);
|
||||
bool is_caps_on = led_state.caps_lock;
|
||||
|
||||
if (prev_is_caps_on != is_caps_on) {
|
||||
prev_is_caps_on = is_caps_on;
|
||||
|
|
@ -178,7 +178,7 @@ void led_set_user(uint8_t usb_led) {
|
|||
}
|
||||
|
||||
// Turn on the Pro Micro's on-board LEDs for Caps Lock
|
||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||
if (led_state.caps_lock) {
|
||||
// Set to low
|
||||
setPinOutput(B0);
|
||||
writePinLow(B0);
|
||||
|
|
@ -189,6 +189,7 @@ void led_set_user(uint8_t usb_led) {
|
|||
setPinInput(B0);
|
||||
setPinInput(D5);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Backlight idle timeout feature
|
||||
|
|
|
|||
|
|
@ -35,11 +35,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
)
|
||||
};
|
||||
|
||||
|
||||
|
||||
void led_set_user(uint8_t usb_led){
|
||||
bool led_update_user(led_t led_state){
|
||||
//turn on the Pro Micro's on board LEDs for CAPS LOCK
|
||||
if(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)){
|
||||
if(led_state.caps_lock){
|
||||
//set led pins to low
|
||||
setPinOutput(B0);
|
||||
writePinLow(B0);
|
||||
|
|
@ -50,4 +48,5 @@ void led_set_user(uint8_t usb_led){
|
|||
setPinInput(B0);
|
||||
setPinInput(D5);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@ F_CPU = 8000000
|
|||
# change yes to no to disable
|
||||
#
|
||||
BLUETOOTH_ENABLE = yes
|
||||
BLUETOOTH_DRIVER = BluefruitLE
|
||||
BLUETOOTH_DRIVER = bluefruit_le
|
||||
BACKLIGHT_ENABLE = no
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
Copyright 2012 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
# define RGBLIGHT_EFFECT_BREATHING
|
||||
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
# define RGBLIGHT_EFFECT_SNAKE
|
||||
# define RGBLIGHT_EFFECT_KNIGHT
|
||||
# define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
# define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
# define RGBLIGHT_EFFECT_RGB_TEST
|
||||
# define RGBLIGHT_EFFECT_ALTERNATING
|
||||
# define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 6 // Number of LEDs
|
||||
|
|
@ -8,6 +8,21 @@
|
|||
"pid": "0x0007",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 6,
|
||||
"animations": {
|
||||
"breathing": true,
|
||||
"rainbow_mood": true,
|
||||
"rainbow_swirl": true,
|
||||
"snake": true,
|
||||
"knight": true,
|
||||
"christmas": true,
|
||||
"static_gradient": true,
|
||||
"rgb_test": true,
|
||||
"alternating": true,
|
||||
"twinkle": true
|
||||
}
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "D3"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -16,22 +16,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
// enable RGB underglow
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 10
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
|
|
|
|||
|
|
@ -16,6 +16,23 @@
|
|||
"backlight": {
|
||||
"pin": "B5"
|
||||
},
|
||||
"rgblight": {
|
||||
"saturation_steps": 8,
|
||||
"brightness_steps": 8,
|
||||
"led_count": 10,
|
||||
"animations": {
|
||||
"breathing": true,
|
||||
"rainbow_mood": true,
|
||||
"rainbow_swirl": true,
|
||||
"snake": true,
|
||||
"knight": true,
|
||||
"christmas": true,
|
||||
"static_gradient": true,
|
||||
"rgb_test": true,
|
||||
"alternating": true,
|
||||
"twinkle": true
|
||||
}
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B4"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
"device_version": "10.0.1"
|
||||
},
|
||||
"backlight": {
|
||||
"driver": "timer",
|
||||
"pins": ["F4", "F5"],
|
||||
"levels": 6,
|
||||
"breathing": true
|
||||
|
|
|
|||
|
|
@ -5,19 +5,3 @@
|
|||
|
||||
/* eliminate lag on space cadet mods */
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
/* setup lighting */
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 30
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
|
|
|||
|
|
@ -8,6 +8,23 @@
|
|||
"pid": "0x546F",
|
||||
"device_version": "0.0.1"
|
||||
},
|
||||
"rgblight": {
|
||||
"saturation_steps": 8,
|
||||
"brightness_steps": 8,
|
||||
"led_count": 30,
|
||||
"animations": {
|
||||
"breathing": true,
|
||||
"rainbow_mood": true,
|
||||
"rainbow_swirl": true,
|
||||
"snake": true,
|
||||
"knight": true,
|
||||
"christmas": true,
|
||||
"static_gradient": true,
|
||||
"rgb_test": true,
|
||||
"alternating": true,
|
||||
"twinkle": true
|
||||
}
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B5"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -19,20 +19,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <stdint.h>
|
||||
#include "led.h"
|
||||
|
||||
|
||||
void led_set(uint8_t usb_led)
|
||||
bool led_update_kb(led_t led_state)
|
||||
{
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// output low
|
||||
DDRB |= (1<<0);
|
||||
PORTB &= ~(1<<0);
|
||||
DDRD |= (1<<5);
|
||||
PORTD &= ~(1<<5);
|
||||
} else {
|
||||
// Hi-Z
|
||||
DDRB &= ~(1<<0);
|
||||
PORTB &= ~(1<<0);
|
||||
DDRD &= ~(1<<5);
|
||||
PORTD &= ~(1<<5);
|
||||
bool res = led_update_user(led_state);
|
||||
if (res) {
|
||||
if (led_state.caps_lock) {
|
||||
// output low
|
||||
DDRB |= (1<<0);
|
||||
PORTB &= ~(1<<0);
|
||||
DDRD |= (1<<5);
|
||||
PORTD &= ~(1<<5);
|
||||
} else {
|
||||
// Hi-Z
|
||||
DDRB &= ~(1<<0);
|
||||
PORTB &= ~(1<<0);
|
||||
DDRD &= ~(1<<5);
|
||||
PORTD &= ~(1<<5);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue