summaryrefslogtreecommitdiff
path: root/keyboards/handwired
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/handwired')
-rw-r--r--keyboards/handwired/6macro/config.h20
-rw-r--r--keyboards/handwired/6macro/keymaps/osu/config.h18
-rw-r--r--keyboards/handwired/alcor_dactyl/config.h4
-rw-r--r--keyboards/handwired/alcor_dactyl/info.json3
-rw-r--r--keyboards/handwired/chiron/keymaps/default/config.h4
-rw-r--r--keyboards/handwired/colorlice/config.h57
-rw-r--r--keyboards/handwired/colorlice/info.json50
-rw-r--r--keyboards/handwired/d48/ds1307.c5
-rw-r--r--keyboards/handwired/dactyl/matrix.c12
-rw-r--r--keyboards/handwired/dactyl_minidox/config.h5
-rw-r--r--keyboards/handwired/dactyl_minidox/info.json4
-rw-r--r--keyboards/handwired/dactyl_minidox/keymaps/dlford/config.h2
-rw-r--r--keyboards/handwired/dygma/raise/config.h32
-rw-r--r--keyboards/handwired/dygma/raise/info.json15
-rw-r--r--keyboards/handwired/frenchdev/frenchdev.c27
-rw-r--r--keyboards/handwired/frenchdev/frenchdev.h4
-rw-r--r--keyboards/handwired/frenchdev/matrix.c28
-rw-r--r--keyboards/handwired/freoduo/keymaps/default/keymap.c2
-rw-r--r--keyboards/handwired/hnah108/config.h50
-rw-r--r--keyboards/handwired/hnah108/info.json45
-rw-r--r--keyboards/handwired/hnah40rgb/config.h77
-rw-r--r--keyboards/handwired/hnah40rgb/info.json53
-rw-r--r--keyboards/handwired/hnah40rgb/keymaps/default/config.h17
-rw-r--r--keyboards/handwired/macro3/info.json51
-rw-r--r--keyboards/handwired/macro3/keymaps/default/keymap.c25
-rw-r--r--keyboards/handwired/macro3/keymaps/default/rules.mk1
-rw-r--r--keyboards/handwired/macro3/macro3.c27
-rw-r--r--keyboards/handwired/macro3/readme.md26
-rw-r--r--keyboards/handwired/macro3/rules.mk1
-rw-r--r--keyboards/handwired/obuwunkunubi/spaget/keymaps/default/rules.mk1
-rw-r--r--keyboards/handwired/onekey/keymaps/apa102/config.h2
-rw-r--r--keyboards/handwired/onekey/keymaps/dip_switch_map/config.h6
-rw-r--r--keyboards/handwired/onekey/keymaps/dip_switch_map/keymap.c14
-rw-r--r--keyboards/handwired/onekey/keymaps/dip_switch_map/rules.mk2
-rw-r--r--keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c15
-rw-r--r--keyboards/handwired/orbweaver/config.h2
-rw-r--r--keyboards/handwired/orbweaver/info.json1
-rw-r--r--keyboards/handwired/orbweaver/orbweaver.c4
-rw-r--r--keyboards/handwired/p65rgb/config.h53
-rw-r--r--keyboards/handwired/p65rgb/info.json50
-rw-r--r--keyboards/handwired/pterodactyl/matrix.c83
-rw-r--r--keyboards/handwired/steamvan/keymaps/jmdaly/config.h3
-rw-r--r--keyboards/handwired/steamvan/rev1/config.h2
-rw-r--r--keyboards/handwired/tractyl_manuform/4x6_right/config.h9
-rw-r--r--keyboards/handwired/tractyl_manuform/4x6_right/info.json5
-rw-r--r--keyboards/handwired/ziyoulang_k3_mod/config.h8
-rw-r--r--keyboards/handwired/ziyoulang_k3_mod/halconf.h (renamed from keyboards/handwired/6macro/keymaps/default/config.h)5
-rw-r--r--keyboards/handwired/ziyoulang_k3_mod/info.json18
-rw-r--r--keyboards/handwired/ziyoulang_k3_mod/keymaps/via/rules.mk2
-rw-r--r--keyboards/handwired/ziyoulang_k3_mod/mcuconf.h22
-rw-r--r--keyboards/handwired/ziyoulang_k3_mod/readme.md2
-rw-r--r--keyboards/handwired/ziyoulang_k3_mod/ziyoulang_k3_mod.c117
52 files changed, 594 insertions, 497 deletions
diff --git a/keyboards/handwired/6macro/config.h b/keyboards/handwired/6macro/config.h
deleted file mode 100644
index 248e43f88e..0000000000
--- a/keyboards/handwired/6macro/config.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-Copyright 2019 joaofbmaia
-
-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
-
-#define RGB_MATRIX_LED_COUNT 10
diff --git a/keyboards/handwired/6macro/keymaps/osu/config.h b/keyboards/handwired/6macro/keymaps/osu/config.h
deleted file mode 100644
index 64ba57443f..0000000000
--- a/keyboards/handwired/6macro/keymaps/osu/config.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Copyright 2019 joaofbmaia
- *
- * 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
-
diff --git a/keyboards/handwired/alcor_dactyl/config.h b/keyboards/handwired/alcor_dactyl/config.h
index cf2dd7aa8c..42c45acdbf 100644
--- a/keyboards/handwired/alcor_dactyl/config.h
+++ b/keyboards/handwired/alcor_dactyl/config.h
@@ -22,9 +22,9 @@
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 200U
+
#define SERIAL_USART_FULL_DUPLEX
#define SERIAL_USART_TX_PIN GP10
#define SERIAL_USART_RX_PIN GP9
-#define RGB_MATRIX_LED_COUNT 2
-#define RGB_MATRIX_SPLIT { 1, 1 }
+
#define EE_HANDS
diff --git a/keyboards/handwired/alcor_dactyl/info.json b/keyboards/handwired/alcor_dactyl/info.json
index 405436b6f5..65f1f804aa 100644
--- a/keyboards/handwired/alcor_dactyl/info.json
+++ b/keyboards/handwired/alcor_dactyl/info.json
@@ -31,7 +31,8 @@
"layout": [
{"x": 0, "y": 0.375},
{"x": 16.5, "y": 0.38}
- ]
+ ],
+ "split_count": [1, 1]
},
"ws2812": {
"pin": "GP16",
diff --git a/keyboards/handwired/chiron/keymaps/default/config.h b/keyboards/handwired/chiron/keymaps/default/config.h
index c373743a39..5d8a8a083d 100644
--- a/keyboards/handwired/chiron/keymaps/default/config.h
+++ b/keyboards/handwired/chiron/keymaps/default/config.h
@@ -30,8 +30,8 @@
#define MOUSEKEY_WHEEL_MAX_SPEED 8
#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
-#undef RGBLED_NUM
-#define RGBLED_NUM 2
+#undef RGBLIGHT_LED_COUNT
+#define RGBLIGHT_LED_COUNT 2
#define RGBLED_SPLIT {1, 1}
// Don't turn off lights when the host goes to sleep.
diff --git a/keyboards/handwired/colorlice/config.h b/keyboards/handwired/colorlice/config.h
index 5c52df9ffa..a85f398cae 100644
--- a/keyboards/handwired/colorlice/config.h
+++ b/keyboards/handwired/colorlice/config.h
@@ -21,60 +21,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
-
-/* RGB LEDs */
-#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_MATRIX_LED_PROCESS_LIMIT 4
-#define RGB_MATRIX_LED_FLUSH_LIMIT 26
-#define RGB_MATRIX_LED_COUNT 70
-
-// RGB Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
-#define ENABLE_RGB_MATRIX_ALPHAS_MODS
-#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_BREATHING
-#define ENABLE_RGB_MATRIX_BAND_SAT
-#define ENABLE_RGB_MATRIX_BAND_VAL
-#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
-#define ENABLE_RGB_MATRIX_CYCLE_ALL
-#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
-#define ENABLE_RGB_MATRIX_DUAL_BEACON
-#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
-#define ENABLE_RGB_MATRIX_RAINDROPS
-#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-#define ENABLE_RGB_MATRIX_HUE_BREATHING
-#define ENABLE_RGB_MATRIX_HUE_PENDULUM
-#define ENABLE_RGB_MATRIX_HUE_WAVE
-#define ENABLE_RGB_MATRIX_PIXEL_RAIN
-#define ENABLE_RGB_MATRIX_PIXEL_FLOW
-#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
-// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
-#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-#define ENABLE_RGB_MATRIX_SPLASH
-#define ENABLE_RGB_MATRIX_MULTISPLASH
-#define ENABLE_RGB_MATRIX_SOLID_SPLASH
-#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
diff --git a/keyboards/handwired/colorlice/info.json b/keyboards/handwired/colorlice/info.json
index 0f8383a2aa..d81cd849ad 100644
--- a/keyboards/handwired/colorlice/info.json
+++ b/keyboards/handwired/colorlice/info.json
@@ -12,7 +12,55 @@
"pin": "B1"
},
"rgb_matrix": {
- "driver": "ws2812"
+ "animations":{
+ "alphas_mods": true,
+ "gradient_up_down": true,
+ "gradient_left_right": true,
+ "breathing": true,
+ "band_sat": true,
+ "band_val": true,
+ "band_pinwheel_sat": true,
+ "band_pinwheel_val": true,
+ "band_spiral_sat": true,
+ "band_spiral_val": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "rainbow_moving_chevron": true,
+ "cycle_out_in": true,
+ "cycle_out_in_dual": true,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "dual_beacon": true,
+ "rainbow_beacon": true,
+ "rainbow_pinwheels": true,
+ "raindrops": true,
+ "jellybean_raindrops": true,
+ "hue_breathing": true,
+ "hue_pendulum": true,
+ "hue_wave": true,
+ "pixel_rain": true,
+ "pixel_flow": true,
+ "pixel_fractal": true,
+ "typing_heatmap": true,
+ "digital_rain": true,
+ "solid_reactive_simple": true,
+ "solid_reactive": true,
+ "solid_reactive_wide": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_cross": true,
+ "solid_reactive_multicross": true,
+ "solid_reactive_nexus": true,
+ "solid_reactive_multinexus": true,
+ "splash": true,
+ "multisplash": true,
+ "solid_splash": true,
+ "solid_multisplash": true
+ },
+ "driver": "ws2812",
+ "led_flush_limit": 26,
+ "led_process_limit": 4,
+ "sleep": true
},
"matrix_pins": {
"cols": ["F0", "F1", "F4", "F5", "F6", "F7", "C7", "B6", "B5", "B4", "D7", "D6", "D4", "E6", "B0", "B3"],
diff --git a/keyboards/handwired/d48/ds1307.c b/keyboards/handwired/d48/ds1307.c
index f6b57d50d2..5f4931bbf8 100644
--- a/keyboards/handwired/d48/ds1307.c
+++ b/keyboards/handwired/d48/ds1307.c
@@ -8,13 +8,12 @@ void ds1307_set_time(uint8_t h, uint8_t m, uint8_t s) {
((h % 10) | ((h / 10) << 4)) & 0x3F,
0, 0, 0, 0, 0
}; // 24-hour mode
- i2c_writeReg(DS1307_ADDR, 0, data, 8, 100);
+ i2c_write_register(DS1307_ADDR, 0, data, 8, 100);
}
void ds1307_get_time(uint8_t *h, uint8_t *m, uint8_t *s) {
uint8_t data[3];
- i2c_readReg(DS1307_ADDR, 0, data, 3, 100);
- i2c_stop();
+ i2c_read_register(DS1307_ADDR, 0, data, 3, 100);
*s = (data[0] & 0b1111) + ((data[0] & 0b1110000) >> 4) * 10;
*m = (data[1] & 0b1111) + ((data[1] & 0b1110000) >> 4) * 10;
*h = (data[2] & 0b1111) + ((data[2] & 0b0110000) >> 4) * 10;
diff --git a/keyboards/handwired/dactyl/matrix.c b/keyboards/handwired/dactyl/matrix.c
index d87fe4cbd1..140f4236c1 100644
--- a/keyboards/handwired/dactyl/matrix.c
+++ b/keyboards/handwired/dactyl/matrix.c
@@ -216,10 +216,10 @@ void init_expander(void) {
#endif
- expander_status = i2c_writeReg(I2C_ADDR, IODIRA, direction, 2, I2C_TIMEOUT);
+ expander_status = i2c_write_register(I2C_ADDR, IODIRA, direction, 2, I2C_TIMEOUT);
if (expander_status) return;
- expander_status = i2c_writeReg(I2C_ADDR, GPPUA, pullup, 2, I2C_TIMEOUT);
+ expander_status = i2c_write_register(I2C_ADDR, GPPUA, pullup, 2, I2C_TIMEOUT);
}
uint8_t matrix_scan(void)
@@ -333,7 +333,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// Read columns from expander, unless it's in an error state
if (! expander_status) {
uint8_t state = 0;
- expander_status = i2c_readReg(I2C_ADDR, EXPANDER_COL_REGISTER, &state, 1, I2C_TIMEOUT);
+ expander_status = i2c_read_register(I2C_ADDR, EXPANDER_COL_REGISTER, &state, 1, I2C_TIMEOUT);
if (! expander_status) {
current_matrix[current_row] |= (~state) & expander_input_pin_mask;
}
@@ -359,7 +359,7 @@ static void select_row(uint8_t row) {
// set active row low : 0
// set other rows hi-Z : 1
uint8_t port = 0xFF & ~(1<<row);
- expander_status = i2c_writeReg(I2C_ADDR, EXPANDER_ROW_REGISTER, &port, 1, I2C_TIMEOUT);
+ expander_status = i2c_write_register(I2C_ADDR, EXPANDER_ROW_REGISTER, &port, 1, I2C_TIMEOUT);
}
// select on teensy
@@ -415,7 +415,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
return false;
}
- expander_status = i2c_readReg(I2C_ADDR, EXPANDER_ROW_REGISTER, &column_state, 1, I2C_TIMEOUT);
+ expander_status = i2c_read_register(I2C_ADDR, EXPANDER_ROW_REGISTER, &column_state, 1, I2C_TIMEOUT);
column_state = ~column_state;
} else {
@@ -460,7 +460,7 @@ static void select_col(uint8_t col)
// set active col low : 0
// set other cols hi-Z : 1
uint8_t port = 0xFF & ~(1<<col);
- expander_status = i2c_writeReg(I2C_ADDR, EXPANDER_COL_REGISTER, &port, 1, I2C_TIMEOUT);
+ expander_status = i2c_write_register(I2C_ADDR, EXPANDER_COL_REGISTER, &port, 1, I2C_TIMEOUT);
}
} else {
// select on teensy
diff --git a/keyboards/handwired/dactyl_minidox/config.h b/keyboards/handwired/dactyl_minidox/config.h
index d84e9b6440..21ef0b32c2 100644
--- a/keyboards/handwired/dactyl_minidox/config.h
+++ b/keyboards/handwired/dactyl_minidox/config.h
@@ -16,11 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-// WS2812 RGB LED strip input and number of LEDs
-#define RGB_MATRIX_LED_COUNT 36
-#define RGB_MATRIX_SPLIT { 18, 18 }
-#define RGB_MATRIX_CENTER { 133, 54 }
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#undef LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
diff --git a/keyboards/handwired/dactyl_minidox/info.json b/keyboards/handwired/dactyl_minidox/info.json
index a94f517b52..36f71ea525 100644
--- a/keyboards/handwired/dactyl_minidox/info.json
+++ b/keyboards/handwired/dactyl_minidox/info.json
@@ -20,7 +20,9 @@
"pin": "D3"
},
"rgb_matrix": {
- "driver": "ws2812"
+ "center_point": [133, 54],
+ "driver": "ws2812",
+ "split_count": [18, 18]
},
"matrix_pins": {
"cols": ["C6", "D7", "E6", "B4", "B5"],
diff --git a/keyboards/handwired/dactyl_minidox/keymaps/dlford/config.h b/keyboards/handwired/dactyl_minidox/keymaps/dlford/config.h
index 783a2c46b1..a37a54c8fc 100644
--- a/keyboards/handwired/dactyl_minidox/keymaps/dlford/config.h
+++ b/keyboards/handwired/dactyl_minidox/keymaps/dlford/config.h
@@ -43,7 +43,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef RGB_MATRIX_ENABLE
// # define RGB_MATRIX_TIMEOUT 300000 // number of milliseconds to wait until disabling effects
-// # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
+// # define RGB_MATRIX_SLEEP // turn off effects when suspended
# define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
diff --git a/keyboards/handwired/dygma/raise/config.h b/keyboards/handwired/dygma/raise/config.h
index f32a9ea4f0..af073f4988 100644
--- a/keyboards/handwired/dygma/raise/config.h
+++ b/keyboards/handwired/dygma/raise/config.h
@@ -20,35 +20,3 @@
// rows are doubled for split
#define MATRIX_ROWS 10
#define MATRIX_COLS 8
-
-#define RGB_MATRIX_LED_COUNT 132
-
-#ifdef RGB_MATRIX_ENABLE
-// At the default flush limit of 16ms (~62.5 fps), the matrix scan rate is approximately
-// ~140 scans per second under full load (when changes are being made to the LED state).
-// Such a low scan rate will have impact the keyboard's accuracy for faster typists.
-//
-// With RGB completely disabled, the matrix scan rate is ~660 scans per second, and typing
-// accuracy feels on par with the Dygma Raise Neuron.
-//
-// At 100ms (10 fps), the matrix scan rate is ~355 scans per second under full load, and typing
-// accuracy is reasonably good.
-#define RGB_MATRIX_LED_FLUSH_LIMIT 100
-#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
-
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-
-// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
-#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-//# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-#endif
diff --git a/keyboards/handwired/dygma/raise/info.json b/keyboards/handwired/dygma/raise/info.json
index 5c287bcc7e..b9bcd2e639 100644
--- a/keyboards/handwired/dygma/raise/info.json
+++ b/keyboards/handwired/dygma/raise/info.json
@@ -9,7 +9,20 @@
"device_version": "0.0.1"
},
"rgb_matrix": {
- "driver": "custom"
+ "animations": {
+ "typing_heatmap": true,
+ "solid_reactive_simple": true,
+ "solid_reactive": true,
+ "solid_reactive_wide": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_cross": true,
+ "solid_reactive_multicross": true,
+ "solid_reactive_nexus": true,
+ "solid_reactive_multinexus": true
+ },
+ "driver": "custom",
+ "led_flush_limit": 100,
+ "sleep": true
},
"processor": "STM32F411",
"bootloader": "stm32-dfu",
diff --git a/keyboards/handwired/frenchdev/frenchdev.c b/keyboards/handwired/frenchdev/frenchdev.c
index 6eed4de5ff..65f1ccce4b 100644
--- a/keyboards/handwired/frenchdev/frenchdev.c
+++ b/keyboards/handwired/frenchdev/frenchdev.c
@@ -83,23 +83,16 @@ uint8_t init_mcp23018(void) {
// - unused : input : 1
// - input : input : 1
// - driving : output : 0
- mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(IODIRA, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0b00000000, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0b00111111, I2C_TIMEOUT); if (mcp23018_status) goto out;
- i2c_stop();
-
- // set pull-up
- // - unused : on : 1
- // - input : on : 1
- // - driving : off : 0
- mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPPUA, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0b00000000, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(0b00111111, I2C_TIMEOUT); if (mcp23018_status) goto out;
-
-out:
- i2c_stop();
+ uint8_t data[] = {0b00000000, 0b00111111};
+ mcp23018_status = i2c_writeReg(I2C_ADDR, IODIRA, data, sizeof(data), I2C_TIMEOUT);
+
+ if (!mcp23018_status) {
+ // set pull-up
+ // - unused : on : 1
+ // - input : on : 1
+ // - driving : off : 0
+ mcp23018_status = i2c_writeReg(I2C_ADDR, GPPUA, data, sizeof(data), I2C_TIMEOUT);
+ }
// SREG=sreg_prev;
diff --git a/keyboards/handwired/frenchdev/frenchdev.h b/keyboards/handwired/frenchdev/frenchdev.h
index 6bea49d87b..0f1ac7dcaa 100644
--- a/keyboards/handwired/frenchdev/frenchdev.h
+++ b/keyboards/handwired/frenchdev/frenchdev.h
@@ -7,9 +7,7 @@
#include <util/delay.h>
// I2C aliases and register addresses (see "mcp23018.md" on tmk repository)
-#define I2C_ADDR 0b0100000
-#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE )
-#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ )
+#define I2C_ADDR (0b0100000<<1)
#define IODIRA 0x00 // i/o direction register
#define IODIRB 0x01
#define GPPUA 0x0C // GPIO pull-up resistor register
diff --git a/keyboards/handwired/frenchdev/matrix.c b/keyboards/handwired/frenchdev/matrix.c
index 3e859d47ef..3afc6dcee6 100644
--- a/keyboards/handwired/frenchdev/matrix.c
+++ b/keyboards/handwired/frenchdev/matrix.c
@@ -224,15 +224,9 @@ static matrix_row_t read_cols(uint8_t row)
return 0;
} else {
uint8_t data = 0;
- mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPIOB, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT); if (mcp23018_status) goto out;
- data = i2c_read_nack(I2C_TIMEOUT); if (mcp23018_status < 0) goto out;
- data = ~((uint8_t)mcp23018_status);
- mcp23018_status = I2C_STATUS_SUCCESS;
- out:
- i2c_stop();
- return data;
+ mcp23018_status = i2c_readReg(I2C_ADDR, GPIOB, &data, 1, I2C_TIMEOUT);
+
+ return ~data;
}
} else {
// read from teensy
@@ -263,11 +257,10 @@ static void unselect_rows(void)
// do nothing
} else {
// set all rows hi-Z : 1
- mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPIOA, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write( 0xFF & ~(0<<8), I2C_TIMEOUT); if (mcp23018_status) goto out;
- out:
- i2c_stop();
+ uint8_t data;
+ data = 0xFF & ~(0<<8);
+ mcp23018_status = i2c_writeReg(I2C_ADDR, GPIOA, &data, 1, I2C_TIMEOUT);
+
}
// unselect on teensy
@@ -289,11 +282,8 @@ static void select_row(uint8_t row)
} else {
// set active row low : 0
// set other rows hi-Z : 1
- mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write(GPIOA, I2C_TIMEOUT); if (mcp23018_status) goto out;
- mcp23018_status = i2c_write( 0xFF & ~(1<<row) & ~(0<<8), I2C_TIMEOUT); if (mcp23018_status) goto out;
- out:
- i2c_stop();
+ uint8_t data = 0xFF & ~(1<<row) & ~(0<<8);
+ mcp23018_status = i2c_writeReg(I2C_ADDR, GPIOA, &data, 1, I2C_TIMEOUT);
}
} else {
// select on teensy
diff --git a/keyboards/handwired/freoduo/keymaps/default/keymap.c b/keyboards/handwired/freoduo/keymaps/default/keymap.c
index bd01de7585..791e6af318 100644
--- a/keyboards/handwired/freoduo/keymaps/default/keymap.c
+++ b/keyboards/handwired/freoduo/keymaps/default/keymap.c
@@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 7, 0},
{7, 24, HSV_RED},
- {24, RGBLED_NUM, 0}
+ {24, RGBLIGHT_LED_COUNT, 0}
);
// Light all LEDs in green when keyboard layer 1 is active
const rgblight_segment_t PROGMEM layer_lower[] = RGBLIGHT_LAYER_SEGMENTS(
diff --git a/keyboards/handwired/hnah108/config.h b/keyboards/handwired/hnah108/config.h
index bfa158713d..9f9d81bea9 100644
--- a/keyboards/handwired/hnah108/config.h
+++ b/keyboards/handwired/hnah108/config.h
@@ -17,56 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define RGB_MATRIX_LED_COUNT 30
-// RGB Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
-#define ENABLE_RGB_MATRIX_ALPHAS_MODS
-#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_BREATHING
-#define ENABLE_RGB_MATRIX_BAND_SAT
-#define ENABLE_RGB_MATRIX_BAND_VAL
-#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
-#define ENABLE_RGB_MATRIX_CYCLE_ALL
-#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
-#define ENABLE_RGB_MATRIX_DUAL_BEACON
-#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
-#define ENABLE_RGB_MATRIX_RAINDROPS
-#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-#define ENABLE_RGB_MATRIX_HUE_BREATHING
-#define ENABLE_RGB_MATRIX_HUE_PENDULUM
-#define ENABLE_RGB_MATRIX_HUE_WAVE
-#define ENABLE_RGB_MATRIX_PIXEL_RAIN
-#define ENABLE_RGB_MATRIX_PIXEL_FLOW
-#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
-// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
-#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-#define ENABLE_RGB_MATRIX_SPLASH
-#define ENABLE_RGB_MATRIX_MULTISPLASH
-#define ENABLE_RGB_MATRIX_SOLID_SPLASH
-#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
diff --git a/keyboards/handwired/hnah108/info.json b/keyboards/handwired/hnah108/info.json
index a399ffedf5..63017532e3 100644
--- a/keyboards/handwired/hnah108/info.json
+++ b/keyboards/handwired/hnah108/info.json
@@ -9,6 +9,51 @@
"device_version": "0.0.2"
},
"rgb_matrix": {
+ "animations": {
+ "alphas_mods": true,
+ "gradient_up_down": true,
+ "gradient_left_right": true,
+ "breathing": true,
+ "band_sat": true,
+ "band_val": true,
+ "band_pinwheel_sat": true,
+ "band_pinwheel_val": true,
+ "band_spiral_sat": true,
+ "band_spiral_val": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "rainbow_moving_chevron": true,
+ "cycle_out_in": true,
+ "cycle_out_in_dual": true,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "dual_beacon": true,
+ "rainbow_beacon": true,
+ "rainbow_pinwheels": true,
+ "raindrops": true,
+ "jellybean_raindrops": true,
+ "hue_breathing": true,
+ "hue_pendulum": true,
+ "hue_wave": true,
+ "pixel_rain": true,
+ "pixel_flow": true,
+ "pixel_fractal": true,
+ "typing_heatmap": true,
+ "digital_rain": true,
+ "solid_reactive_simple": true,
+ "solid_reactive": true,
+ "solid_reactive_wide": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_cross": true,
+ "solid_reactive_multicross": true,
+ "solid_reactive_nexus": true,
+ "solid_reactive_multinexus": true,
+ "splash": true,
+ "multisplash": true,
+ "solid_splash": true,
+ "solid_multisplash": true
+ },
"driver": "ws2812"
},
"matrix_pins": {
diff --git a/keyboards/handwired/hnah40rgb/config.h b/keyboards/handwired/hnah40rgb/config.h
deleted file mode 100644
index 7b61de013b..0000000000
--- a/keyboards/handwired/hnah40rgb/config.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-Copyright 2019 HnahKB
-
-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
-
-#ifdef RGB_MATRIX_ENABLE
-#define RGB_MATRIX_LED_COUNT 50
-#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
-#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
-#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
-#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
-#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
-// RGB Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
-# define ENABLE_RGB_MATRIX_ALPHAS_MODS
-# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
-# define ENABLE_RGB_MATRIX_BREATHING
-# define ENABLE_RGB_MATRIX_BAND_SAT
-# define ENABLE_RGB_MATRIX_BAND_VAL
-# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
-# define ENABLE_RGB_MATRIX_CYCLE_ALL
-# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
-# define ENABLE_RGB_MATRIX_DUAL_BEACON
-# define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
-# define ENABLE_RGB_MATRIX_RAINDROPS
-# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-# define ENABLE_RGB_MATRIX_HUE_BREATHING
-# define ENABLE_RGB_MATRIX_HUE_PENDULUM
-# define ENABLE_RGB_MATRIX_HUE_WAVE
-# define ENABLE_RGB_MATRIX_PIXEL_RAIN
-# define ENABLE_RGB_MATRIX_PIXEL_FLOW
-# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
-// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
-# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-# define ENABLE_RGB_MATRIX_SPLASH
-# define ENABLE_RGB_MATRIX_MULTISPLASH
-# define ENABLE_RGB_MATRIX_SOLID_SPLASH
-# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
-#endif
diff --git a/keyboards/handwired/hnah40rgb/info.json b/keyboards/handwired/hnah40rgb/info.json
index fce74cefef..51a934564c 100644
--- a/keyboards/handwired/hnah40rgb/info.json
+++ b/keyboards/handwired/hnah40rgb/info.json
@@ -12,7 +12,58 @@
"pin": "E2"
},
"rgb_matrix": {
- "driver": "ws2812"
+ "animations": {
+ "alphas_mods": true,
+ "gradient_up_down": true,
+ "gradient_left_right": true,
+ "breathing": true,
+ "band_sat": true,
+ "band_val": true,
+ "band_pinwheel_sat": true,
+ "band_pinwheel_val": true,
+ "band_spiral_sat": true,
+ "band_spiral_val": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "rainbow_moving_chevron": true,
+ "cycle_out_in": true,
+ "cycle_out_in_dual": true,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "dual_beacon": true,
+ "rainbow_beacon": true,
+ "rainbow_pinwheels": true,
+ "raindrops": true,
+ "jellybean_raindrops": true,
+ "hue_breathing": true,
+ "hue_pendulum": true,
+ "hue_wave": true,
+ "pixel_rain": true,
+ "pixel_flow": true,
+ "pixel_fractal": true,
+ "typing_heatmap": true,
+ "digital_rain": true,
+ "solid_reactive_simple": true,
+ "solid_reactive": true,
+ "solid_reactive_wide": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_cross": true,
+ "solid_reactive_multicross": true,
+ "solid_reactive_nexus": true,
+ "solid_reactive_multinexus": true,
+ "splash": true,
+ "multisplash": true,
+ "solid_splash": true,
+ "solid_multisplash": true
+ },
+ "default": {
+ "animation": "cycle_pinwheel"
+ },
+ "driver": "ws2812",
+ "led_flush_limit": 16,
+ "max_brightness": 200,
+ "react_on_keyup": true
},
"matrix_pins": {
"cols": ["D5", "D6", "D3", "D2", "B6", "C6", "C7", "F7", "F6", "F5", "F4"],
diff --git a/keyboards/handwired/hnah40rgb/keymaps/default/config.h b/keyboards/handwired/hnah40rgb/keymaps/default/config.h
deleted file mode 100644
index aa9325a59d..0000000000
--- a/keyboards/handwired/hnah40rgb/keymaps/default/config.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright 2019 HnahKB
- *
- * 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
diff --git a/keyboards/handwired/macro3/info.json b/keyboards/handwired/macro3/info.json
new file mode 100644
index 0000000000..fa6cd1c471
--- /dev/null
+++ b/keyboards/handwired/macro3/info.json
@@ -0,0 +1,51 @@
+{
+ "keyboard_name": "Macro3",
+ "manufacturer": "DPB",
+ "url": "https://github.com/davidphilipbarr/Macropads/tree/main/macro3",
+ "maintainer": "@davidphilipbarr",
+ "usb": {
+ "vid": "0xC88B",
+ "pid": "0x3388",
+ "device_version": "0.0.3"
+ },
+ "encoder": {
+ "rotary": [
+ {"pin_a": "D2", "pin_b": "D3"},
+ {"pin_a": "F7", "pin_b": "F6"}
+ ]
+ },
+ "development_board": "promicro",
+ "features": {
+ "bootmagic": true,
+ "extrakey": true,
+ "mousekey": true,
+ "encoder": true
+ },
+ "bootmagic": {
+ "matrix": [0, 3]
+ },
+ "matrix_pins": {
+ "direct": [
+ ["D7", "C6", "D4", "D1"],
+ ["B1", "B4", "B5", "B3"]
+ ]
+ },
+ "layout_aliases": {
+ "LAYOUT": "LAYOUT_ortho_2x4"
+ },
+ "layouts": {
+ "LAYOUT_ortho_2x4": {
+ "layout": [
+ {"x": 0, "y": 0, "matrix": [0, 0]},
+ {"x": 1, "y": 0, "matrix": [0, 1]},
+ {"x": 2, "y": 0, "matrix": [0, 2]},
+ {"x": 3, "y": 0, "matrix": [0, 3]},
+
+ {"x": 0, "y": 1, "matrix": [1, 0]},
+ {"x": 1, "y": 1, "matrix": [1, 1]},
+ {"x": 2, "y": 1, "matrix": [1, 2]},
+ {"x": 3, "y": 1, "matrix": [1, 3]}
+ ]
+ }
+ }
+}
diff --git a/keyboards/handwired/macro3/keymaps/default/keymap.c b/keyboards/handwired/macro3/keymaps/default/keymap.c
new file mode 100644
index 0000000000..a7b5cf9db4
--- /dev/null
+++ b/keyboards/handwired/macro3/keymaps/default/keymap.c
@@ -0,0 +1,25 @@
+/* Copyright 2020 David Philip Barr <@davidphilipbarr>
+ * Copyright 2021 @filterpaper
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ortho_2x4(
+ KC_MUTE, KC_MPLY, KC_MRWD, LT(1,KC_MFFD),
+ C(KC_Z), C(KC_X), C(KC_C), C(KC_V)
+ ),
+ [1] = LAYOUT_ortho_2x4(
+ _______, _______, _______, _______,
+ QK_BOOT, _______, _______, _______
+ )
+};
+
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD), ENCODER_CCW_CW(KC_MNXT, KC_MPRV) },
+ [1] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD), ENCODER_CCW_CW(KC_PGDN, KC_PGUP) },
+};
+#endif
+
diff --git a/keyboards/handwired/macro3/keymaps/default/rules.mk b/keyboards/handwired/macro3/keymaps/default/rules.mk
new file mode 100644
index 0000000000..ee32568148
--- /dev/null
+++ b/keyboards/handwired/macro3/keymaps/default/rules.mk
@@ -0,0 +1 @@
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/handwired/macro3/macro3.c b/keyboards/handwired/macro3/macro3.c
new file mode 100644
index 0000000000..54fce243ab
--- /dev/null
+++ b/keyboards/handwired/macro3/macro3.c
@@ -0,0 +1,27 @@
+/* Copyright 2020 David Philip Barr <@davidphilipbarr>
+ * Copyright 2021 @filterpaper
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include "quantum.h"
+
+#ifdef ENCODER_ENABLE
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) { return false; }
+ if (index == 0) {
+ if (clockwise) {
+ tap_code_delay(KC_VOLU, 10);
+ } else {
+ tap_code_delay(KC_VOLD, 10);
+ }
+ } else if (index == 1) {
+ if (clockwise) {
+ tap_code(KC_MNXT);
+ } else {
+ tap_code(KC_MPRV);
+ }
+ }
+ return true;
+}
+#endif
+
diff --git a/keyboards/handwired/macro3/readme.md b/keyboards/handwired/macro3/readme.md
new file mode 100644
index 0000000000..185496ac8b
--- /dev/null
+++ b/keyboards/handwired/macro3/readme.md
@@ -0,0 +1,26 @@
+# Macro3
+
+![Macro3](https://github.com/filterpaper/filterpaper.github.io/raw/main/images/macro3.png)
+
+Macro3 is a low-profile macro pad with dual encoder support designed by [@davidphilipbarr](https://github.com/davidphilipbarr).
+
+## Keyboard Info
+
+* Keyboard Maintainer: [filterpaper](https://github.com/filterpaper)
+* Hardware Supported: Macro3
+* Hardware Availability: [Open-source](https://github.com/davidphilipbarr/Macropads/tree/main/macro3)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/macro3:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+
+## Bootloader
+
+Enter the bootloader in 3 ways:
+
+* **Bootmagic reset**: Hold down the top right key and plug in the controller.
+* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is configured.
+* **Physical reset pins**: Briefly short the RST and GND pins on the microcontroller using tweezers, a paperclip, or any other conductive material.
+
diff --git a/keyboards/handwired/macro3/rules.mk b/keyboards/handwired/macro3/rules.mk
new file mode 100644
index 0000000000..6e7633bfe0
--- /dev/null
+++ b/keyboards/handwired/macro3/rules.mk
@@ -0,0 +1 @@
+# This file intentionally left blank
diff --git a/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/rules.mk b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/rules.mk
deleted file mode 100644
index 916b1154bd..0000000000
--- a/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-# Build Overrides
diff --git a/keyboards/handwired/onekey/keymaps/apa102/config.h b/keyboards/handwired/onekey/keymaps/apa102/config.h
index 756ebb3593..bb618d77fb 100644
--- a/keyboards/handwired/onekey/keymaps/apa102/config.h
+++ b/keyboards/handwired/onekey/keymaps/apa102/config.h
@@ -1,6 +1,6 @@
#pragma once
-#define RGBLED_NUM 40
+#define RGBLIGHT_LED_COUNT 40
#define APA102_DEFAULT_BRIGHTNESS 5
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
diff --git a/keyboards/handwired/onekey/keymaps/dip_switch_map/config.h b/keyboards/handwired/onekey/keymaps/dip_switch_map/config.h
new file mode 100644
index 0000000000..7e5b6c0b91
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/dip_switch_map/config.h
@@ -0,0 +1,6 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+// TODO: Remove reuse of pin
+#define DIP_SWITCH_PINS { WS2812_DI_PIN }
diff --git a/keyboards/handwired/onekey/keymaps/dip_switch_map/keymap.c b/keyboards/handwired/onekey/keymaps/dip_switch_map/keymap.c
new file mode 100644
index 0000000000..35bb16d458
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/dip_switch_map/keymap.c
@@ -0,0 +1,14 @@
+// Copyright 2023 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ortho_1x1(KC_A),
+ [1] = LAYOUT_ortho_1x1(KC_B),
+};
+
+#if defined(DIP_SWITCH_MAP_ENABLE)
+const uint16_t PROGMEM dip_switch_map[NUM_DIP_SWITCHES][NUM_DIP_STATES] = {
+ DIP_SWITCH_OFF_ON(DF(0), DF(1))
+};
+#endif
diff --git a/keyboards/handwired/onekey/keymaps/dip_switch_map/rules.mk b/keyboards/handwired/onekey/keymaps/dip_switch_map/rules.mk
new file mode 100644
index 0000000000..b2429854f1
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/dip_switch_map/rules.mk
@@ -0,0 +1,2 @@
+DIP_SWITCH_ENABLE = yes
+DIP_SWITCH_MAP_ENABLE = yes
diff --git a/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c b/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c
index ea8443709d..1d1a7c2b00 100644
--- a/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c
+++ b/keyboards/handwired/onekey/keymaps/i2c_scanner/keymap.c
@@ -8,16 +8,6 @@
// TODO: remove patch
#ifdef PROTOCOL_CHIBIOS
# pragma message("ChibiOS is currently 'best effort' and might not report accurate results")
-
-i2c_status_t i2c_start_bodge(uint8_t address, uint16_t timeout) {
- i2c_start(address);
-
- // except on ChibiOS where the only way is do do "something"
- uint8_t data = 0;
- return i2c_readReg(address, 0, &data, sizeof(data), TIMEOUT);
-}
-
-# define i2c_start i2c_start_bodge
#endif
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -31,10 +21,9 @@ void do_scan(void) {
for (uint8_t address = 1; address < 127; address++) {
// The i2c_scanner uses the return value of
- // i2c_start to see if a device did acknowledge to the address.
- i2c_status_t error = i2c_start(address << 1, TIMEOUT);
+ // i2c_ping_address to see if a device did acknowledge to the address.
+ i2c_status_t error = i2c_ping_address(address << 1, TIMEOUT);
if (error == I2C_STATUS_SUCCESS) {
- i2c_stop();
dprintf(" I2C device found at address 0x%02X\n", address);
nDevices++;
} else {
diff --git a/keyboards/handwired/orbweaver/config.h b/keyboards/handwired/orbweaver/config.h
index 6a6670a6f6..95a46677c9 100644
--- a/keyboards/handwired/orbweaver/config.h
+++ b/keyboards/handwired/orbweaver/config.h
@@ -18,6 +18,4 @@
#pragma once
#define IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
-#define RGB_MATRIX_LED_COUNT 20
#define I2C1_CLOCK_SPEED 100000
-#define RGB_MATRIX_CENTER { 40, 30 }
diff --git a/keyboards/handwired/orbweaver/info.json b/keyboards/handwired/orbweaver/info.json
index 489a7e2888..14c8718256 100644
--- a/keyboards/handwired/orbweaver/info.json
+++ b/keyboards/handwired/orbweaver/info.json
@@ -13,6 +13,7 @@
"nkro": true
},
"rgb_matrix": {
+ "center_point": [40, 30],
"driver": "is31fl3731"
},
"matrix_pins": {
diff --git a/keyboards/handwired/orbweaver/orbweaver.c b/keyboards/handwired/orbweaver/orbweaver.c
index 63778ea52b..f89d1ca363 100644
--- a/keyboards/handwired/orbweaver/orbweaver.c
+++ b/keyboards/handwired/orbweaver/orbweaver.c
@@ -22,7 +22,7 @@
#include "rgb_matrix.h"
-const is31fl3731_led_t PROGMEM g_is31fl3731_leds[RGB_MATRIX_LED_COUNT] = {
+const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
@@ -60,7 +60,7 @@ led_config_t g_led_config = {
{ 11, 12, 13, 14, 15 },
{ 16, 17, 18, 19, 19 },
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
- { NO_LED, NO_LED }
+ { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }
},
// LED index to physical location
diff --git a/keyboards/handwired/p65rgb/config.h b/keyboards/handwired/p65rgb/config.h
index 326789b998..9a446a904b 100644
--- a/keyboards/handwired/p65rgb/config.h
+++ b/keyboards/handwired/p65rgb/config.h
@@ -17,60 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
-#define RGB_MATRIX_KEYPRESSES
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_MATRIX_LED_PROCESS_LIMIT 4
-#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define RGB_MATRIX_LED_COUNT 83
-// RGB Matrix Animation modes. Explicitly enabled
-// For full list of effects, see:
-// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
-#define ENABLE_RGB_MATRIX_ALPHAS_MODS
-#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
-#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_BREATHING
-#define ENABLE_RGB_MATRIX_BAND_SAT
-#define ENABLE_RGB_MATRIX_BAND_VAL
-#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
-#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
-#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
-#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
-#define ENABLE_RGB_MATRIX_CYCLE_ALL
-#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
-#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
-#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
-#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
-#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
-#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
-#define ENABLE_RGB_MATRIX_DUAL_BEACON
-#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
-#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
-#define ENABLE_RGB_MATRIX_RAINDROPS
-#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
-#define ENABLE_RGB_MATRIX_HUE_BREATHING
-#define ENABLE_RGB_MATRIX_HUE_PENDULUM
-#define ENABLE_RGB_MATRIX_HUE_WAVE
-#define ENABLE_RGB_MATRIX_PIXEL_RAIN
-#define ENABLE_RGB_MATRIX_PIXEL_FLOW
-#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
-// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
-#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
-#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
-// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
-#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
-#define ENABLE_RGB_MATRIX_SPLASH
-#define ENABLE_RGB_MATRIX_MULTISPLASH
-#define ENABLE_RGB_MATRIX_SOLID_SPLASH
-#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
diff --git a/keyboards/handwired/p65rgb/info.json b/keyboards/handwired/p65rgb/info.json
index 2fa35c2cbf..3d8e02cf40 100644
--- a/keyboards/handwired/p65rgb/info.json
+++ b/keyboards/handwired/p65rgb/info.json
@@ -12,7 +12,55 @@
"pin": "B4"
},
"rgb_matrix": {
- "driver": "ws2812"
+ "animations": {
+ "alphas_mods": true,
+ "gradient_up_down": true,
+ "gradient_left_right": true,
+ "breathing": true,
+ "band_sat": true,
+ "band_val": true,
+ "band_pinwheel_sat": true,
+ "band_pinwheel_val": true,
+ "band_spiral_sat": true,
+ "band_spiral_val": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "rainbow_moving_chevron": true,
+ "cycle_out_in": true,
+ "cycle_out_in_dual": true,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "dual_beacon": true,
+ "rainbow_beacon": true,
+ "rainbow_pinwheels": true,
+ "raindrops": true,
+ "jellybean_raindrops": true,
+ "hue_breathing": true,
+ "hue_pendulum": true,
+ "hue_wave": true,
+ "pixel_rain": true,
+ "pixel_flow": true,
+ "pixel_fractal": true,
+ "typing_heatmap": true,
+ "digital_rain": true,
+ "solid_reactive_simple": true,
+ "solid_reactive": true,
+ "solid_reactive_wide": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_cross": true,
+ "solid_reactive_multicross": true,
+ "solid_reactive_nexus": true,
+ "solid_reactive_multinexus": true,
+ "splash": true,
+ "multisplash": true,
+ "solid_splash": true,
+ "solid_multisplash": true
+ },
+ "driver": "ws2812",
+ "led_flush_limit": 26,
+ "led_process_limit": 4,
+ "sleep": true
},
"rgblight": {
"max_brightness": 180
diff --git a/keyboards/handwired/pterodactyl/matrix.c b/keyboards/handwired/pterodactyl/matrix.c
index bc98bdd634..0dff65eda6 100644
--- a/keyboards/handwired/pterodactyl/matrix.c
+++ b/keyboards/handwired/pterodactyl/matrix.c
@@ -29,9 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define I2C_TIMEOUT 100
-#define I2C_ADDR 0b0100000
-#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE )
-#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ )
+#define I2C_ADDR (0b0100000<<1)
#define IODIRA 0x00 // i/o direction register
#define IODIRB 0x01
#define GPPUA 0x0C // GPIO pull-up resistor register
@@ -159,9 +157,6 @@ void init_expander(void) {
#endif
}
- expander_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(IODIRA, I2C_TIMEOUT); if (expander_status) goto out;
-
/*
Pin direction and pull-up depends on both the diode direction
and on whether the column register is GPIOA or GPIOB
@@ -176,50 +171,27 @@ void init_expander(void) {
#if (EXPANDER_COL_REGISTER == GPIOA)
# if (DIODE_DIRECTION == COL2ROW)
- expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out;
+ uint8_t data[] = { expander_input_pin_mask, 0};
# elif (DIODE_DIRECTION == ROW2COL)
- expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out;
+ uint8_t data[] = { 0, expander_input_pin_mask};
# endif
#elif (EXPANDER_COL_REGISTER == GPIOB)
# if (DIODE_DIRECTION == COL2ROW)
- expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out;
+ uint8_t data[] = { 0, expander_input_pin_mask};
# elif (DIODE_DIRECTION == ROW2COL)
- expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out;
-# endif
-#endif
-
- i2c_stop();
-
- // set pull-up
- // - unused : off : 0
- // - input : on : 1
- // - driving : off : 0
- expander_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(GPPUA, I2C_TIMEOUT); if (expander_status) goto out;
-#if (EXPANDER_COL_REGISTER == GPIOA)
-# if (DIODE_DIRECTION == COL2ROW)
- expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out;
-# elif (DIODE_DIRECTION == ROW2COL)
- expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out;
-# endif
-#elif (EXPANDER_COL_REGISTER == GPIOB)
-# if (DIODE_DIRECTION == COL2ROW)
- expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out;
-# elif (DIODE_DIRECTION == ROW2COL)
- expander_status = i2c_write(expander_input_pin_mask, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(0, I2C_TIMEOUT); if (expander_status) goto out;
+ uint8_t data[] = { expander_input_pin_mask, 0};
# endif
#endif
+ expander_status = i2c_writeReg(I2C_ADDR, IODIRA, data, sizeof(data), I2C_TIMEOUT);
+
+ if (!expander_status) {
+ // set pull-up
+ // - unused : off : 0
+ // - input : on : 1
+ // - driving : off : 0
+ expander_status = i2c_writeReg(I2C_ADDR, GPPUA, data, sizeof(data), I2C_TIMEOUT);
+ }
-out:
- i2c_stop();
}
uint8_t matrix_scan(void)
@@ -332,14 +304,9 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// Read columns from expander, unless it's in an error state
if (! expander_status) {
- expander_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(EXPANDER_COL_REGISTER, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT); if (expander_status) goto out;
-
- current_matrix[current_row] |= (~i2c_read_nack(I2C_TIMEOUT)) & expander_input_pin_mask;
-
- out:
- i2c_stop();
+ uint8_t data;
+ i2c_readReg(I2C_ADDR, EXPANDER_COL_REGISTER, &data, 1, I2C_TIMEOUT);
+ current_matrix[current_row] |= (~data) & expander_input_pin_mask;
}
// Read columns from onboard pins
@@ -361,11 +328,8 @@ static void select_row(uint8_t row) {
if (! expander_status) {
// set active row low : 0
// set other rows hi-Z : 1
- expander_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(EXPANDER_ROW_REGISTER, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(0xFF & ~(1<<row), I2C_TIMEOUT); if (expander_status) goto out;
- out:
- i2c_stop();
+ uint8_t data = 0xFF & ~(1<<row);
+ i2c_writeReg(I2C_ADDR, EXPANDER_ROW_REGISTER, &data, 1, I2C_TIMEOUT);
}
// select on teensy
@@ -421,14 +385,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
return false;
}
- expander_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_write(EXPANDER_ROW_REGISTER, I2C_TIMEOUT); if (expander_status) goto out;
- expander_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT); if (expander_status) goto out;
- column_state = i2c_read_nack(I2C_TIMEOUT);
-
- out:
- i2c_stop();
-
+ i2c_writeReg(I2C_ADDR, EXPANDER_ROW_REGISTER, &column_state, 1, I2C_TIMEOUT);
column_state = ~column_state;
} else {
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
diff --git a/keyboards/handwired/steamvan/keymaps/jmdaly/config.h b/keyboards/handwired/steamvan/keymaps/jmdaly/config.h
deleted file mode 100644
index 271f48d001..0000000000
--- a/keyboards/handwired/steamvan/keymaps/jmdaly/config.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-
-// place overrides here
diff --git a/keyboards/handwired/steamvan/rev1/config.h b/keyboards/handwired/steamvan/rev1/config.h
index a779dcccab..b1137a0122 100644
--- a/keyboards/handwired/steamvan/rev1/config.h
+++ b/keyboards/handwired/steamvan/rev1/config.h
@@ -24,5 +24,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define WS2812_SPI_DRIVER SPID1
#define WS2812_SPI_MOSI_PAL_MODE 5
-
-#define RGB_MATRIX_KEYPRESSES
diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/config.h b/keyboards/handwired/tractyl_manuform/4x6_right/config.h
index a1cbfedc0c..9d283866b4 100644
--- a/keyboards/handwired/tractyl_manuform/4x6_right/config.h
+++ b/keyboards/handwired/tractyl_manuform/4x6_right/config.h
@@ -18,15 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-// WS2812 RGB LED strip input and number of LEDs
-#define RGB_MATRIX_LED_COUNT 62
-#define RGB_MATRIX_SPLIT { 32, 30 }
-#define RGB_DISABLE_WHEN_USB_SUSPENDED
-#define RGB_MATRIX_KEYPRESSES
-// #define RGB_MATRIX_KEYRELEASES
-#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
-#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 80
-
#define SPLIT_TRANSPORT_MIRROR
#define SPLIT_HAND_PIN A6
diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/info.json b/keyboards/handwired/tractyl_manuform/4x6_right/info.json
index 9e172c8089..321202383f 100644
--- a/keyboards/handwired/tractyl_manuform/4x6_right/info.json
+++ b/keyboards/handwired/tractyl_manuform/4x6_right/info.json
@@ -7,7 +7,10 @@
"device_version": "0.0.1"
},
"rgb_matrix": {
- "driver": "ws2812"
+ "driver": "ws2812",
+ "max_brightness": 80,
+ "sleep": true,
+ "split_count": [32, 30]
},
"matrix_pins": {
"cols": ["C0", "C1", "C2", "C3", "C4", "C5"],
diff --git a/keyboards/handwired/ziyoulang_k3_mod/config.h b/keyboards/handwired/ziyoulang_k3_mod/config.h
new file mode 100644
index 0000000000..304ca5eb28
--- /dev/null
+++ b/keyboards/handwired/ziyoulang_k3_mod/config.h
@@ -0,0 +1,8 @@
+// Copyright 2023 Coom (@coomstoolbox)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define I2C1_SCL_PIN B10
+#define I2C1_SDA_PIN B11
+#define I2C_DRIVER I2CD2
diff --git a/keyboards/handwired/6macro/keymaps/default/config.h b/keyboards/handwired/ziyoulang_k3_mod/halconf.h
index 64ba57443f..44602147bb 100644
--- a/keyboards/handwired/6macro/keymaps/default/config.h
+++ b/keyboards/handwired/ziyoulang_k3_mod/halconf.h
@@ -1,4 +1,4 @@
-/* Copyright 2019 joaofbmaia
+/* Copyright 2021 QMK
*
* 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
@@ -16,3 +16,6 @@
#pragma once
+#define HAL_USE_I2C TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/handwired/ziyoulang_k3_mod/info.json b/keyboards/handwired/ziyoulang_k3_mod/info.json
index 127cc51299..5d4ca7a254 100644
--- a/keyboards/handwired/ziyoulang_k3_mod/info.json
+++ b/keyboards/handwired/ziyoulang_k3_mod/info.json
@@ -2,7 +2,7 @@
"keyboard_name": "ziyoulang k3 mod",
"development_board": "bluepill",
"usb": {
- "device_version": "1.0.0",
+ "device_version": "1.2.0",
"pid": "0xE002",
"vid": "0x5006"
},
@@ -11,10 +11,14 @@
"command": false,
"console": false,
"extrakey": true,
- "mousekey": true,
- "nkro": false
+ "mousekey": false,
+ "nkro": false,
+ "oled": true
},
- "diode_direction": "COL2ROW",
+ "build": {
+ "lto": true
+ },
+ "diode_direction": "ROW2COL",
"dynamic_keymap": {
"layer_count": 3
},
@@ -78,7 +82,7 @@
{"label":"P", "x":10.5, "y":2.25, "matrix": [2, 10]},
{"label":"{", "x":11.5, "y":2.25, "matrix": [2, 11]},
{"label":"}", "x":12.5, "y":2.25, "matrix": [2, 12]},
- {"label":"|", "x":13.5, "y":2.25, "w":1.5, "matrix": [2, 13]},
+ {"label":"|", "x":13.5, "y":2.25, "w":1.5, "matrix": [3, 13]},
{"label":"7", "x":15.5, "y":2.25, "matrix": [2, 17]},
{"label":"8", "x":16.5, "y":2.25, "matrix": [2, 18]},
{"label":"9", "x":17.5, "y":2.25, "matrix": [2, 19]},
@@ -96,7 +100,7 @@
{"label":"L", "x":9.75, "y":3.25, "matrix": [3, 10]},
{"label":":", "x":10.75, "y":3.25, "matrix": [3, 11]},
{"label":"\"", "x":11.75, "y":3.25, "matrix": [3, 12]},
- {"label":"Enter", "x":12.75, "y":3.25, "w":2.25, "matrix": [3, 13]},
+ {"label":"Enter", "x":12.75, "y":3.25, "w":2.25, "matrix": [2, 13]},
{"label":"4", "x":15.5, "y":3.25, "matrix": [3, 17]},
{"label":"5", "x":16.5, "y":3.25, "matrix": [3, 18]},
{"label":"6", "x":17.5, "y":3.25, "matrix": [3, 19]},
@@ -139,4 +143,4 @@
"manufacturer": "Coom",
"maintainer": "coomstoolbox",
"url": ""
-} \ No newline at end of file
+}
diff --git a/keyboards/handwired/ziyoulang_k3_mod/keymaps/via/rules.mk b/keyboards/handwired/ziyoulang_k3_mod/keymaps/via/rules.mk
index ea877d6786..1e5b99807c 100644
--- a/keyboards/handwired/ziyoulang_k3_mod/keymaps/via/rules.mk
+++ b/keyboards/handwired/ziyoulang_k3_mod/keymaps/via/rules.mk
@@ -1,3 +1 @@
VIA_ENABLE = yes
-MOUSEKEY_ENABLE = no
-LTO_ENABLE = yes
diff --git a/keyboards/handwired/ziyoulang_k3_mod/mcuconf.h b/keyboards/handwired/ziyoulang_k3_mod/mcuconf.h
new file mode 100644
index 0000000000..8f1da10fe2
--- /dev/null
+++ b/keyboards/handwired/ziyoulang_k3_mod/mcuconf.h
@@ -0,0 +1,22 @@
+/* Copyright 2021 QMK
+ *
+ * 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 3 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 <https://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include_next <mcuconf.h>
+
+#undef STM32_I2C_USE_I2C2
+#define STM32_I2C_USE_I2C2 TRUE
diff --git a/keyboards/handwired/ziyoulang_k3_mod/readme.md b/keyboards/handwired/ziyoulang_k3_mod/readme.md
index 7e247fde19..553f735d4c 100644
--- a/keyboards/handwired/ziyoulang_k3_mod/readme.md
+++ b/keyboards/handwired/ziyoulang_k3_mod/readme.md
@@ -23,7 +23,7 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
[KiCAD wiring diagram](https://github.com/coomstoolbox/ZK3-BP-MOD-wiring-diagram)
-![explanation](https://i.imgur.com/yvhvhoBh.png)
+![explanation](https://i.imgur.com/thGIdOth.png)
## Bootloader
diff --git a/keyboards/handwired/ziyoulang_k3_mod/ziyoulang_k3_mod.c b/keyboards/handwired/ziyoulang_k3_mod/ziyoulang_k3_mod.c
new file mode 100644
index 0000000000..cadae4aa28
--- /dev/null
+++ b/keyboards/handwired/ziyoulang_k3_mod/ziyoulang_k3_mod.c
@@ -0,0 +1,117 @@
+// Copyright 2023 Coom (@coomstoolbox)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "quantum.h"
+#include <stdio.h>
+
+void keyboard_post_init_kb(void) {
+#ifdef CONSOLE_ENABLE
+ debug_enable=true;
+ debug_matrix=true;
+#endif
+ keyboard_post_init_user();
+}
+
+static uint16_t last_keycode = KC_NO;
+static keypos_t last_key = {0, 0};
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ if (!process_record_user(keycode, record)) {
+ return false;
+ }
+ // コンソールが有効化されている場合、マトリックス上の位置とキー押下状態を出力します
+#ifdef CONSOLE_ENABLE
+ uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
+#endif
+ if (record->event.pressed) {
+ if (last_keycode != keycode) {
+ last_keycode = keycode;
+ last_key = record->event.key;
+ }
+ }
+ return true;
+}
+
+#ifdef OLED_ENABLE
+oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
+ return OLED_ROTATION_180;
+}
+
+static void render_logo(void) {
+ static const char PROGMEM qmk_logo[] = {
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
+ 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
+ 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
+ };
+ oled_write_P(qmk_logo, false);
+#ifdef CONSOLE_ENABLE
+ uprintf("Ziyoulang K3 Mod\n");
+ oled_set_cursor(3, 0);
+ oled_write_P(PSTR("Ziyoulang K3 Mod"), false);
+#endif
+}
+
+bool oled_task_kb(void) {
+ if (!oled_task_user()) {
+ return false;
+ }
+ int uptime_seconds = (int)(timer_read32() / 1000);
+ if (uptime_seconds < 5) {
+ render_logo();
+ return false;
+ }
+
+ // Host Keyboard Layer Status
+ oled_write_P(PSTR("Layer: "), false);
+
+ switch (get_highest_layer(layer_state | default_layer_state)) {
+ case 0:
+ oled_write_P(PSTR("Default\n"), false);
+ break;
+ case 1:
+ oled_write_P(PSTR("2\n"), false);
+ break;
+ case 2:
+ oled_write_P(PSTR("3\n"), false);
+ break;
+ default:
+ // Or use the write_ln shortcut over adding '\n' to the end of your string
+ oled_write_ln_P(PSTR("Undefined"), false);
+ }
+
+ // Host Keyboard LED Status
+ led_t led_state = host_keyboard_led_state();
+ if (led_state.num_lock) {
+ oled_write_P(PSTR("NUM"), true);
+ oled_write_P(PSTR(" "), false);
+ } else {
+ oled_write_P(PSTR(" "), false);
+ }
+ if (led_state.caps_lock) {
+ oled_write_P(PSTR("CAP"), true);
+ oled_write_P(PSTR(" "), false);
+ } else {
+ oled_write_P(PSTR(" "), false);
+ }
+ if (led_state.scroll_lock) {
+ oled_write_P(PSTR("SCR"), true);
+ oled_write_ln_P(PSTR(" "), false);
+ } else {
+ oled_write_ln_P(PSTR(" "), false);
+ }
+
+ // Last Key pressed info
+ oled_write_P(PSTR("kc : "), false);
+ if (last_keycode > 21000) {
+ oled_write_ln_P(PSTR(" Fn"), false);
+ } else {
+ oled_write_ln_P(get_u16_str(last_keycode, ' '), false);
+ }
+ oled_write_P(PSTR("col: "), false);
+ oled_write_P(get_u8_str(last_key.col, ' '), false);
+ oled_write_P(PSTR(",row: "), false);
+ oled_write_P(get_u8_str(last_key.row, ' '), false);
+
+ return false;
+}
+#endif