summaryrefslogtreecommitdiff
path: root/keyboards/clueboard/2x1800
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/clueboard/2x1800')
-rw-r--r--keyboards/clueboard/2x1800/2019/2019.c23
-rw-r--r--keyboards/clueboard/2x1800/2019/2019.h3
-rw-r--r--keyboards/clueboard/2x1800/2019/keyboard.json6
-rw-r--r--keyboards/clueboard/2x1800/2021/2021.c9
4 files changed, 11 insertions, 30 deletions
diff --git a/keyboards/clueboard/2x1800/2019/2019.c b/keyboards/clueboard/2x1800/2019/2019.c
index 8b0ba6a71e..b7fb799ecb 100644
--- a/keyboards/clueboard/2x1800/2019/2019.c
+++ b/keyboards/clueboard/2x1800/2019/2019.c
@@ -18,9 +18,6 @@
void matrix_init_kb(void) {
// Set our LED pins as output
gpio_set_pin_output(D6);
- gpio_set_pin_output(B4);
- gpio_set_pin_output(B5);
- gpio_set_pin_output(B6);
// Set our Tilt Sensor pins as input
gpio_set_pin_input_high(SHAKE_PIN_A);
@@ -61,7 +58,7 @@ uint8_t detected_shakes = 0;
static uint16_t shake_timer;
#endif
-void matrix_scan_kb(void) {
+void housekeeping_task_kb(void) {
#ifdef SHAKE_ENABLE
// Read the current state of the tilt sensor. It is physically
// impossible for both pins to register a low state at the same time.
@@ -84,8 +81,6 @@ void matrix_scan_kb(void) {
detected_shakes = 0;
}
#endif
-
- matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
@@ -133,22 +128,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return process_record_user(keycode, record);
}
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- gpio_write_pin(B4, !led_state.num_lock);
- gpio_write_pin(B5, !led_state.caps_lock);
- gpio_write_pin(B6, !led_state.scroll_lock);
- }
-
- return res;
-}
-
-__attribute__((weak)) bool encoder_update_keymap(uint8_t index, bool clockwise) { return true; }
-__attribute__((weak)) bool encoder_update_user(uint8_t index, bool clockwise) { return encoder_update_keymap(index, clockwise); }
-
bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) {
+ if (encoder_update_user(index, clockwise)) {
// Encoder 1, outside left
if (index == 0 && clockwise) {
tap_code(KC_MS_U); // turned right
diff --git a/keyboards/clueboard/2x1800/2019/2019.h b/keyboards/clueboard/2x1800/2019/2019.h
index c5869ff66f..d5867dacac 100644
--- a/keyboards/clueboard/2x1800/2019/2019.h
+++ b/keyboards/clueboard/2x1800/2019/2019.h
@@ -24,8 +24,5 @@ enum TWOx1800_keycodes {
ENC_BTN4,
};
-// Encoder update function that returns true/false
-bool encoder_update_keymap(uint8_t index, bool clockwise);
-
// Encoder button combo check
void check_encoder_buttons(void);
diff --git a/keyboards/clueboard/2x1800/2019/keyboard.json b/keyboards/clueboard/2x1800/2019/keyboard.json
index 6f33a11ca7..31ff448d17 100644
--- a/keyboards/clueboard/2x1800/2019/keyboard.json
+++ b/keyboards/clueboard/2x1800/2019/keyboard.json
@@ -32,6 +32,12 @@
{"pin_a": "A1", "pin_b": "A0"}
]
},
+ "indicators": {
+ "caps_lock": "B5",
+ "num_lock": "B4",
+ "scroll_lock": "B6",
+ "on_state": 0
+ },
"layout_aliases": {
"LAYOUT": "LAYOUT_all"
},
diff --git a/keyboards/clueboard/2x1800/2021/2021.c b/keyboards/clueboard/2x1800/2021/2021.c
index 2a3f1304c7..511c40a699 100644
--- a/keyboards/clueboard/2x1800/2021/2021.c
+++ b/keyboards/clueboard/2x1800/2021/2021.c
@@ -21,7 +21,7 @@
#ifndef DRAWING_TOY_MODE
static uint16_t led_frame_timer = 0;
-void matrix_scan_kb(void) {
+void housekeeping_task_kb(void) {
if (timer_elapsed(led_frame_timer) > 100) {
max7219_message_sign_task(true);
led_frame_timer = timer_read();
@@ -90,18 +90,15 @@ void matrix_init_kb(void) {
#elif defined(DRAWING_TOY_MODE)
max7219_set_led(0, 0, true);
#endif
-}
-__attribute__ ((weak))
-bool encoder_update_keymap(int8_t index, bool clockwise) {
- return false;
+ matrix_init_user();
}
#define NUM_COLUMNS 8*MAX7219_CONTROLLERS
uint8_t led_position[2] = {0,0}; // The location of the cursor in the matrix
bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_keymap(index, clockwise)) {
+ if (encoder_update_user(index, clockwise)) {
#if defined(DRAWING_TOY_MODE)
// Encoder 1, left
if (index == 0 && clockwise) {