summaryrefslogtreecommitdiffstats
path: root/keyboards/40percentclub
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/40percentclub')
-rw-r--r--keyboards/40percentclub/gherkin/keymaps/default/keymap.c7
-rw-r--r--keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c40
-rw-r--r--keyboards/40percentclub/luddite/config.h4
-rw-r--r--keyboards/40percentclub/luddite/info.json3
-rw-r--r--keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c7
-rw-r--r--keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c7
-rw-r--r--keyboards/40percentclub/nano/config.h1
-rw-r--r--keyboards/40percentclub/nano/info.json3
-rw-r--r--keyboards/40percentclub/nori/config.h4
-rw-r--r--keyboards/40percentclub/nori/info.json5
-rw-r--r--keyboards/40percentclub/tomato/config.h4
-rw-r--r--keyboards/40percentclub/tomato/info.json5
-rw-r--r--keyboards/40percentclub/ut47/led.c31
13 files changed, 44 insertions, 77 deletions
diff --git a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c
index ab2a1fa1c1..f4d3032857 100644
--- a/keyboards/40percentclub/gherkin/keymaps/default/keymap.c
+++ b/keyboards/40percentclub/gherkin/keymaps/default/keymap.c
@@ -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;
}
diff --git a/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c b/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c
index 40c11739fb..090fd1d296 100644
--- a/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c
+++ b/keyboards/40percentclub/gherkin/keymaps/mjt/keymap.c
@@ -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 {
-
- }
-
-}
-*/
diff --git a/keyboards/40percentclub/luddite/config.h b/keyboards/40percentclub/luddite/config.h
index e388bc9705..06570c9ce9 100644
--- a/keyboards/40percentclub/luddite/config.h
+++ b/keyboards/40percentclub/luddite/config.h
@@ -17,7 +17,3 @@
# 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
diff --git a/keyboards/40percentclub/luddite/info.json b/keyboards/40percentclub/luddite/info.json
index eb5c0e4a9d..9ee787ad63 100644
--- a/keyboards/40percentclub/luddite/info.json
+++ b/keyboards/40percentclub/luddite/info.json
@@ -17,6 +17,9 @@
"pin": "B5",
"levels": 4
},
+ "rgblight": {
+ "led_count": 8
+ },
"ws2812": {
"pin": "B4"
},
diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c
index c3e359e24e..f7899ad886 100644
--- a/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c
+++ b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c
@@ -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
diff --git a/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c
index ea659979ea..3932a1ee9b 100644
--- a/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c
+++ b/keyboards/40percentclub/mf68/keymaps/emdarcher/keymap.c
@@ -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;
}
diff --git a/keyboards/40percentclub/nano/config.h b/keyboards/40percentclub/nano/config.h
index 8641d6a37f..3e8f6e666b 100644
--- a/keyboards/40percentclub/nano/config.h
+++ b/keyboards/40percentclub/nano/config.h
@@ -28,4 +28,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define RGBLIGHT_EFFECT_RGB_TEST
# define RGBLIGHT_EFFECT_ALTERNATING
# define RGBLIGHT_EFFECT_TWINKLE
-#define RGBLED_NUM 6 // Number of LEDs
diff --git a/keyboards/40percentclub/nano/info.json b/keyboards/40percentclub/nano/info.json
index 21e5c2d1d2..5ad37b00b5 100644
--- a/keyboards/40percentclub/nano/info.json
+++ b/keyboards/40percentclub/nano/info.json
@@ -8,6 +8,9 @@
"pid": "0x0007",
"device_version": "0.0.1"
},
+ "rgblight": {
+ "led_count": 6
+ },
"ws2812": {
"pin": "D3"
},
diff --git a/keyboards/40percentclub/nori/config.h b/keyboards/40percentclub/nori/config.h
index 57981dd27f..6d4f10af71 100644
--- a/keyboards/40percentclub/nori/config.h
+++ b/keyboards/40percentclub/nori/config.h
@@ -27,10 +27,6 @@
#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
diff --git a/keyboards/40percentclub/nori/info.json b/keyboards/40percentclub/nori/info.json
index b58ee84edc..dfd2c310bb 100644
--- a/keyboards/40percentclub/nori/info.json
+++ b/keyboards/40percentclub/nori/info.json
@@ -16,6 +16,11 @@
"backlight": {
"pin": "B5"
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 10
+ },
"ws2812": {
"pin": "B4"
},
diff --git a/keyboards/40percentclub/tomato/config.h b/keyboards/40percentclub/tomato/config.h
index 2199981c7c..37576953de 100644
--- a/keyboards/40percentclub/tomato/config.h
+++ b/keyboards/40percentclub/tomato/config.h
@@ -17,7 +17,3 @@
#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
diff --git a/keyboards/40percentclub/tomato/info.json b/keyboards/40percentclub/tomato/info.json
index c881f7c7d1..89c0f7b367 100644
--- a/keyboards/40percentclub/tomato/info.json
+++ b/keyboards/40percentclub/tomato/info.json
@@ -8,6 +8,11 @@
"pid": "0x546F",
"device_version": "0.0.1"
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 30
+ },
"ws2812": {
"pin": "B5"
},
diff --git a/keyboards/40percentclub/ut47/led.c b/keyboards/40percentclub/ut47/led.c
index f5d8ffc12e..867a6e2e2a 100644
--- a/keyboards/40percentclub/ut47/led.c
+++ b/keyboards/40percentclub/ut47/led.c
@@ -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;
}