diff options
Diffstat (limited to 'keyboards/xiudi')
20 files changed, 91 insertions, 111 deletions
diff --git a/keyboards/xiudi/xd002/keymaps/multilayer_rgb/keymap.c b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/keymap.c index 4ae28fd91b..d74678d76a 100644 --- a/keyboards/xiudi/xd002/keymaps/multilayer_rgb/keymap.c +++ b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/keymap.c @@ -169,5 +169,6 @@ layer_state_t layer_state_set_user(layer_state_t state) { // default color void keyboard_post_init_user(void) { + rgblite_init(); rgblite_setrgb(RGB_GREEN); } diff --git a/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h index 1fa6f899b9..103b228d33 100644 --- a/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h +++ b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h @@ -3,7 +3,11 @@ #include "ws2812.h" #include "color.h" +static inline void rgblite_init(void) { + ws2812_init(); +} + static inline void rgblite_setrgb(uint8_t _r, uint8_t _g, uint8_t _b) { - rgb_led_t leds[RGBLED_NUM] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}}; - ws2812_setleds(leds, RGBLED_NUM); + rgb_led_t leds[RGBLIGHT_LED_COUNT] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}}; + ws2812_setleds(leds, RGBLIGHT_LED_COUNT); } diff --git a/keyboards/xiudi/xd002/keymaps/rgb_lite/keymap.c b/keyboards/xiudi/xd002/keymaps/rgb_lite/keymap.c index a795ca8a6d..aac4dc6fde 100644 --- a/keyboards/xiudi/xd002/keymaps/rgb_lite/keymap.c +++ b/keyboards/xiudi/xd002/keymaps/rgb_lite/keymap.c @@ -27,5 +27,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void keyboard_post_init_user(void) { + rgblite_init(); rgblite_increase_hue(); } diff --git a/keyboards/xiudi/xd002/keymaps/rgb_lite/rgblite.h b/keyboards/xiudi/xd002/keymaps/rgb_lite/rgblite.h index 15ee0c0f6b..0bb0582415 100644 --- a/keyboards/xiudi/xd002/keymaps/rgb_lite/rgblite.h +++ b/keyboards/xiudi/xd002/keymaps/rgb_lite/rgblite.h @@ -3,9 +3,13 @@ #include "ws2812.h" #include "color.h" +static inline void rgblite_init(void) { + ws2812_init(); +} + static inline void rgblite_setrgb(uint8_t _r, uint8_t _g, uint8_t _b) { - rgb_led_t leds[RGBLED_NUM] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}}; - ws2812_setleds(leds, RGBLED_NUM); + rgb_led_t leds[RGBLIGHT_LED_COUNT] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}}; + ws2812_setleds(leds, RGBLIGHT_LED_COUNT); } static void rgblite_increase_hue(void) { diff --git a/keyboards/xiudi/xd004/info.json b/keyboards/xiudi/xd004/v1/keyboard.json index 531283c78a..a6211edfec 100644 --- a/keyboards/xiudi/xd004/info.json +++ b/keyboards/xiudi/xd004/v1/keyboard.json @@ -7,6 +7,18 @@ "pid": "0x0404", "device_version": "0.0.1" }, + "build": { + "lto": true + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": false, + "nkro": false, + "space_cadet": false + }, "backlight": { "pin": "D5", "levels": 6 diff --git a/keyboards/xiudi/xd004/v1/rules.mk b/keyboards/xiudi/xd004/v1/rules.mk deleted file mode 100644 index f5f2138436..0000000000 --- a/keyboards/xiudi/xd004/v1/rules.mk +++ /dev/null @@ -1,15 +0,0 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no # Audio output -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SPACE_CADET_ENABLE = no -# Saves about 5% of space: -LTO_ENABLE = yes diff --git a/keyboards/xiudi/xd60/rev2/info.json b/keyboards/xiudi/xd60/rev2/keyboard.json index 2f994ac2e4..639c2dda9e 100644 --- a/keyboards/xiudi/xd60/rev2/info.json +++ b/keyboards/xiudi/xd60/rev2/keyboard.json @@ -3,6 +3,16 @@ "usb": { "pid": "0x6060" }, + "features": { + "backlight": true, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, "matrix_pins": { "cols": ["F0", "F1", "E6", "C7", "C6", "B6", "D4", "B1", "B7", "B5", "B4", "D7", "D6", "B3"], "rows": ["D0", "D1", "D2", "D3", "D5"] diff --git a/keyboards/xiudi/xd60/rev2/rules.mk b/keyboards/xiudi/xd60/rev2/rules.mk deleted file mode 100644 index 7dfcc1d898..0000000000 --- a/keyboards/xiudi/xd60/rev2/rules.mk +++ /dev/null @@ -1,12 +0,0 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -AUDIO_ENABLE = no # Audio output -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/xiudi/xd60/rev3/info.json b/keyboards/xiudi/xd60/rev3/keyboard.json index 89a0983bf4..5b12c38f8e 100644 --- a/keyboards/xiudi/xd60/rev3/info.json +++ b/keyboards/xiudi/xd60/rev3/keyboard.json @@ -3,6 +3,16 @@ "usb": { "pid": "0x6363" }, + "features": { + "backlight": true, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, "matrix_pins": { "cols": ["F0", "F1", "E6", "C7", "C6", "B6", "D4", "B1", "B7", "B5", "B4", "D7", "D6", "B3"], "rows": ["D0", "D1", "D2", "D3", "D5"] diff --git a/keyboards/xiudi/xd60/rev3/rules.mk b/keyboards/xiudi/xd60/rev3/rules.mk deleted file mode 100644 index 7dfcc1d898..0000000000 --- a/keyboards/xiudi/xd60/rev3/rules.mk +++ /dev/null @@ -1,12 +0,0 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -AUDIO_ENABLE = no # Audio output -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/xiudi/xd68/info.json b/keyboards/xiudi/xd68/keyboard.json index d55a8535c6..1836feb49d 100644 --- a/keyboards/xiudi/xd68/info.json +++ b/keyboards/xiudi/xd68/keyboard.json @@ -8,6 +8,16 @@ "pid": "0x6868", "device_version": "0.0.1" }, + "features": { + "backlight": true, + "bootmagic": true, + "command": true, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, "matrix_pins": { "cols": ["F0", "F1", "E6", "C7", "C6", "B6", "D4", "B1", "B7", "B5", "B4", "D7", "D6", "B3", "F7"], "rows": ["D0", "D1", "D2", "D3", "D5"] diff --git a/keyboards/xiudi/xd68/rules.mk b/keyboards/xiudi/xd68/rules.mk deleted file mode 100644 index 4537738380..0000000000 --- a/keyboards/xiudi/xd68/rules.mk +++ /dev/null @@ -1,12 +0,0 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output diff --git a/keyboards/xiudi/xd75/info.json b/keyboards/xiudi/xd75/keyboard.json index 58af00e972..a928b43f9b 100644 --- a/keyboards/xiudi/xd75/info.json +++ b/keyboards/xiudi/xd75/keyboard.json @@ -8,6 +8,15 @@ "pid": "0x7575", "device_version": "0.0.1" }, + "features": { + "bootmagic": true, + "command": true, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": false, + "rgblight": true + }, "matrix_pins": { "cols": ["F0", "F1", "E6", "C7", "C6", "B6", "D4", "B1", "B7", "B5", "B4", "D7", "D6", "B3", "B0"], "rows": ["D0", "D1", "D2", "D3", "D5"] diff --git a/keyboards/xiudi/xd75/rules.mk b/keyboards/xiudi/xd75/rules.mk deleted file mode 100644 index ffa61ba8c5..0000000000 --- a/keyboards/xiudi/xd75/rules.mk +++ /dev/null @@ -1,12 +0,0 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output diff --git a/keyboards/xiudi/xd84/matrix.c b/keyboards/xiudi/xd84/matrix.c index 04128561ee..ea1b4f55b4 100644 --- a/keyboards/xiudi/xd84/matrix.c +++ b/keyboards/xiudi/xd84/matrix.c @@ -13,15 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <string.h> #include "matrix.h" #include "pca9555.h" -#include "quantum.h" - -#include "debug.h" // PCA9555 slave addresses #define IC1 0x20 @@ -51,10 +44,10 @@ static void select_row(uint8_t row) { } static uint16_t read_cols(void) { - // uint16_t state_1 = pca9555_readPins(IC2, PCA9555_PORT0); - // uint16_t state_2 = pca9555_readPins(IC2, PCA9555_PORT1); + // uint16_t state_1 = pca9555_read_pins(IC2, PCA9555_PORT0); + // uint16_t state_2 = pca9555_read_pins(IC2, PCA9555_PORT1); uint16_t state = 0; - pca9555_readPins_all(IC2, &state); + pca9555_read_pins_all(IC2, &state); // For the XD84 all cols are on the same IC and mapped sequentially // while this technically gives 16 column reads, diff --git a/keyboards/xiudi/xd84pro/info.json b/keyboards/xiudi/xd84pro/keyboard.json index bcdc0d2cf1..23bad3fcab 100644 --- a/keyboards/xiudi/xd84pro/info.json +++ b/keyboards/xiudi/xd84pro/keyboard.json @@ -8,6 +8,16 @@ "pid": "0x8450", "device_version": "0.0.1" }, + "features": { + "backlight": true, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": false, + "nkro": true, + "rgblight": true + }, "matrix_pins": { "cols": ["F0", "F1", "E6", "C7", "C6", "B6", "D4", "B1", "B7", "B5", "B4", "D7", "D6", "B3", "F7"], "rows": ["F4", "D0", "D1", "D2", "D3", "D5"] diff --git a/keyboards/xiudi/xd84pro/rules.mk b/keyboards/xiudi/xd84pro/rules.mk deleted file mode 100644 index 1955f1d315..0000000000 --- a/keyboards/xiudi/xd84pro/rules.mk +++ /dev/null @@ -1,12 +0,0 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output diff --git a/keyboards/xiudi/xd87/info.json b/keyboards/xiudi/xd87/keyboard.json index 3c30f69ba9..a84c5660a8 100644 --- a/keyboards/xiudi/xd87/info.json +++ b/keyboards/xiudi/xd87/keyboard.json @@ -8,6 +8,15 @@ "pid": "0x8787", "device_version": "0.0.1" }, + "features": { + "backlight": true, + "bootmagic": true, + "command": true, + "console": true, + "extrakey": true, + "mousekey": false, + "nkro": false + }, "matrix_pins": { "cols": ["E6", "F0", "F1", "F4", "F5", "F6", "F7", "B5", "B6", "C6", "D4", "D6", "D7", "B4", "B2", "B3", "D2"], "rows": ["D1", "B0", "B1", "C7", "D3", "D5"] diff --git a/keyboards/xiudi/xd87/rules.mk b/keyboards/xiudi/xd87/rules.mk deleted file mode 100644 index a2444417d6..0000000000 --- a/keyboards/xiudi/xd87/rules.mk +++ /dev/null @@ -1,12 +0,0 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output diff --git a/keyboards/xiudi/xd96/matrix.c b/keyboards/xiudi/xd96/matrix.c index beef7fae12..2c433f02b8 100644 --- a/keyboards/xiudi/xd96/matrix.c +++ b/keyboards/xiudi/xd96/matrix.c @@ -13,15 +13,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <string.h> #include "matrix.h" #include "pca9555.h" -#include "quantum.h" - -#include "debug.h" +#include "wait.h" // PCA9555 slave addresses #define IC1 0x20 @@ -53,9 +47,9 @@ static uint32_t read_cols(void) { uint8_t state_1 = 0; uint8_t state_2 = 0; uint8_t state_3 = 0; - pca9555_readPins(IC2, PCA9555_PORT0, &state_1); - pca9555_readPins(IC2, PCA9555_PORT1, &state_2); - pca9555_readPins(IC1, PCA9555_PORT1, &state_3); + pca9555_read_pins(IC2, PCA9555_PORT0, &state_1); + pca9555_read_pins(IC2, PCA9555_PORT1, &state_2); + pca9555_read_pins(IC1, PCA9555_PORT1, &state_3); // For the XD96 the pins are mapped to port expanders as follows: // all 8 pins port 0 IC2, first 6 pins port 1 IC2, first 4 pins port 1 IC1 |