diff options
Diffstat (limited to 'keyboards/miiiw/blackio83')
-rw-r--r-- | keyboards/miiiw/blackio83/config.h | 20 | ||||
-rw-r--r-- | keyboards/miiiw/blackio83/rev_0100/config.h | 3 | ||||
-rw-r--r-- | keyboards/miiiw/blackio83/rev_0100/halconf.h (renamed from keyboards/miiiw/blackio83/halconf.h) | 0 | ||||
-rw-r--r-- | keyboards/miiiw/blackio83/rev_0100/keyboard.json (renamed from keyboards/miiiw/blackio83/info.json) | 126 | ||||
-rw-r--r-- | keyboards/miiiw/blackio83/rev_0100/matrix.c (renamed from keyboards/miiiw/blackio83/matrix.c) | 26 | ||||
-rw-r--r-- | keyboards/miiiw/blackio83/rev_0100/mcuconf.h (renamed from keyboards/miiiw/blackio83/mcuconf.h) | 0 | ||||
-rw-r--r-- | keyboards/miiiw/blackio83/rev_0100/rev_0100.c (renamed from keyboards/miiiw/blackio83/blackio83.c) | 36 | ||||
-rw-r--r-- | keyboards/miiiw/blackio83/rev_0100/rev_0100.h (renamed from keyboards/miiiw/blackio83/blackio83.h) | 0 | ||||
-rw-r--r-- | keyboards/miiiw/blackio83/rev_0100/rules.mk | 2 |
9 files changed, 104 insertions, 109 deletions
diff --git a/keyboards/miiiw/blackio83/config.h b/keyboards/miiiw/blackio83/config.h deleted file mode 100644 index 055e8e3579..0000000000 --- a/keyboards/miiiw/blackio83/config.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright 2023 ArthurCyy <https://github.com/ArthurCyy> - * - * 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 - -// EEPROM i2c chip -#define EEPROM_I2C_24LC256 diff --git a/keyboards/miiiw/blackio83/rev_0100/config.h b/keyboards/miiiw/blackio83/rev_0100/config.h index b1eec364ed..008d1448f2 100644 --- a/keyboards/miiiw/blackio83/rev_0100/config.h +++ b/keyboards/miiiw/blackio83/rev_0100/config.h @@ -16,6 +16,9 @@ #pragma once +// EEPROM i2c chip +#define EEPROM_I2C_24LC256 + #define POWER_SWITCH_PIN B0 /* 16 with dummy columns for shift registers */ diff --git a/keyboards/miiiw/blackio83/halconf.h b/keyboards/miiiw/blackio83/rev_0100/halconf.h index 037108a392..037108a392 100644 --- a/keyboards/miiiw/blackio83/halconf.h +++ b/keyboards/miiiw/blackio83/rev_0100/halconf.h diff --git a/keyboards/miiiw/blackio83/info.json b/keyboards/miiiw/blackio83/rev_0100/keyboard.json index ef0e15efb9..d3fb31d109 100644 --- a/keyboards/miiiw/blackio83/info.json +++ b/keyboards/miiiw/blackio83/rev_0100/keyboard.json @@ -6,7 +6,6 @@ "debounce": 3, "diode_direction": "COL2ROW", "features": { - "backlight": false, "bootmagic": true, "command": false, "console": false, @@ -15,8 +14,7 @@ "extrakey": true, "mousekey": true, "nkro": true, - "rgb_matrix": true, - "rgblight": false + "rgb_matrix": true }, "indicators": { "caps_lock": "B2", @@ -32,34 +30,48 @@ "processor": "STM32F072", "rgb_matrix": { "animations": { - "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_sat": true, "band_spiral_sat": true, "band_spiral_val": true, + "band_val": true, + "breathing": 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, + "cycle_up_down": true, + "digital_rain": true, "dual_beacon": true, - "rainbow_beacon": true, - "rainbow_pinwheels": true, - "raindrops": true, - "jellybean_raindrops": true, + "gradient_left_right": true, + "gradient_up_down": true, "hue_breathing": true, "hue_pendulum": true, "hue_wave": true, - "pixel_rain": true, + "jellybean_raindrops": true, + "multisplash": true, "pixel_flow": true, - "pixel_fractal": true + "pixel_fractal": true, + "pixel_rain": true, + "rainbow_beacon": true, + "rainbow_moving_chevron": true, + "rainbow_pinwheels": true, + "raindrops": true, + "solid_multisplash": true, + "solid_reactive": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_multinexus": true, + "solid_reactive_multiwide": true, + "solid_reactive_nexus": true, + "solid_reactive_simple": true, + "solid_reactive_wide": true, + "solid_splash": true, + "splash": true, + "typing_heatmap": true }, "center_point": [62, 42], "default": { @@ -82,21 +94,21 @@ {"matrix": [0, 13], "x": 102, "y": 0, "flags": 4}, {"matrix": [0, 14], "x": 112, "y": 0, "flags": 4}, {"matrix": [0, 15], "x": 124, "y": 0, "flags": 4}, - {"matrix": [1, 0], "x": 124, "y": 20, "flags": 4}, - {"matrix": [1, 1], "x": 108, "y": 20, "flags": 4}, - {"matrix": [1, 2], "x": 96, "y": 20, "flags": 4}, - {"matrix": [1, 3], "x": 88, "y": 20, "flags": 4}, - {"matrix": [1, 4], "x": 80, "y": 20, "flags": 4}, - {"matrix": [1, 5], "x": 72, "y": 20, "flags": 4}, - {"matrix": [1, 6], "x": 64, "y": 20, "flags": 4}, + {"matrix": [1, 15], "x": 124, "y": 20, "flags": 4}, + {"matrix": [1, 13], "x": 108, "y": 20, "flags": 4}, + {"matrix": [1, 12], "x": 96, "y": 20, "flags": 4}, + {"matrix": [1, 11], "x": 88, "y": 20, "flags": 4}, + {"matrix": [1, 10], "x": 80, "y": 20, "flags": 4}, + {"matrix": [1, 9], "x": 72, "y": 20, "flags": 4}, + {"matrix": [1, 8], "x": 64, "y": 20, "flags": 4}, {"matrix": [1, 7], "x": 56, "y": 20, "flags": 4}, - {"matrix": [1, 8], "x": 48, "y": 20, "flags": 4}, - {"matrix": [1, 9], "x": 40, "y": 20, "flags": 4}, - {"matrix": [1, 10], "x": 32, "y": 20, "flags": 4}, - {"matrix": [1, 11], "x": 24, "y": 20, "flags": 4}, - {"matrix": [1, 12], "x": 16, "y": 20, "flags": 4}, - {"matrix": [1, 13], "x": 8, "y": 20, "flags": 4}, - {"matrix": [1, 15], "x": 0, "y": 20, "flags": 4}, + {"matrix": [1, 6], "x": 48, "y": 20, "flags": 4}, + {"matrix": [1, 5], "x": 40, "y": 20, "flags": 4}, + {"matrix": [1, 4], "x": 32, "y": 20, "flags": 4}, + {"matrix": [1, 3], "x": 24, "y": 20, "flags": 4}, + {"matrix": [1, 2], "x": 16, "y": 20, "flags": 4}, + {"matrix": [1, 1], "x": 8, "y": 20, "flags": 4}, + {"matrix": [1, 0], "x": 0, "y": 20, "flags": 4}, {"matrix": [2, 0], "x": 2, "y": 36, "flags": 4}, {"matrix": [2, 1], "x": 12, "y": 36, "flags": 4}, {"matrix": [2, 2], "x": 20, "y": 36, "flags": 4}, @@ -112,20 +124,20 @@ {"matrix": [2, 12], "x": 100, "y": 36, "flags": 4}, {"matrix": [2, 13], "x": 110, "y": 36, "flags": 4}, {"matrix": [2, 15], "x": 124, "y": 36, "flags": 4}, - {"matrix": [3, 0], "x": 124, "y": 52, "flags": 4}, - {"matrix": [3, 1], "x": 107, "y": 52, "flags": 4}, - {"matrix": [3, 2], "x": 94, "y": 52, "flags": 4}, - {"matrix": [3, 3], "x": 86, "y": 52, "flags": 4}, - {"matrix": [3, 4], "x": 78, "y": 52, "flags": 4}, - {"matrix": [3, 5], "x": 70, "y": 52, "flags": 4}, - {"matrix": [3, 6], "x": 62, "y": 52, "flags": 4}, - {"matrix": [3, 7], "x": 54, "y": 52, "flags": 4}, - {"matrix": [3, 8], "x": 46, "y": 52, "flags": 4}, - {"matrix": [3, 9], "x": 38, "y": 52, "flags": 4}, - {"matrix": [3, 10], "x": 30, "y": 52, "flags": 4}, - {"matrix": [3, 11], "x": 22, "y": 52, "flags": 4}, - {"matrix": [3, 12], "x": 14, "y": 52, "flags": 4}, - {"matrix": [3, 15], "x": 3, "y": 52, "flags": 4}, + {"matrix": [3, 15], "x": 124, "y": 52, "flags": 4}, + {"matrix": [3, 12], "x": 107, "y": 52, "flags": 4}, + {"matrix": [3, 11], "x": 94, "y": 52, "flags": 4}, + {"matrix": [3, 10], "x": 86, "y": 52, "flags": 4}, + {"matrix": [3, 9], "x": 78, "y": 52, "flags": 4}, + {"matrix": [3, 8], "x": 70, "y": 52, "flags": 4}, + {"matrix": [3, 7], "x": 62, "y": 52, "flags": 4}, + {"matrix": [3, 6], "x": 54, "y": 52, "flags": 4}, + {"matrix": [3, 5], "x": 46, "y": 52, "flags": 4}, + {"matrix": [3, 4], "x": 38, "y": 52, "flags": 4}, + {"matrix": [3, 3], "x": 30, "y": 52, "flags": 4}, + {"matrix": [3, 2], "x": 22, "y": 52, "flags": 4}, + {"matrix": [3, 1], "x": 14, "y": 52, "flags": 4}, + {"matrix": [3, 0], "x": 3, "y": 52, "flags": 4}, {"matrix": [4, 0], "x": 5, "y": 68, "flags": 4}, {"matrix": [4, 1], "x": 18, "y": 68, "flags": 4}, {"matrix": [4, 2], "x": 26, "y": 68, "flags": 4}, @@ -140,21 +152,23 @@ {"matrix": [4, 11], "x": 104, "y": 68, "flags": 4}, {"matrix": [4, 13], "x": 114, "y": 68, "flags": 4}, {"matrix": [4, 15], "x": 124, "y": 68, "flags": 4}, - {"matrix": [5, 0], "x": 122, "y": 84, "flags": 4}, - {"matrix": [5, 1], "x": 114, "y": 84, "flags": 4}, - {"matrix": [5, 2], "x": 106, "y": 84, "flags": 4}, - {"matrix": [5, 5], "x": 96, "y": 84, "flags": 4}, - {"matrix": [5, 8], "x": 88, "y": 84, "flags": 4}, - {"matrix": [5, 9], "x": 80, "y": 84, "flags": 4}, - {"matrix": [5, 10], "x": 50, "y": 84, "flags": 4}, - {"matrix": [5, 12], "x": 20, "y": 88, "flags": 4}, - {"matrix": [5, 13], "x": 10, "y": 88, "flags": 4}, - {"matrix": [5, 14], "x": 1, "y": 88, "flags": 4} - ] + {"matrix": [5, 14], "x": 122, "y": 84, "flags": 4}, + {"matrix": [5, 13], "x": 114, "y": 84, "flags": 4}, + {"matrix": [5, 12], "x": 106, "y": 84, "flags": 4}, + {"matrix": [5, 10], "x": 96, "y": 84, "flags": 4}, + {"matrix": [5, 9], "x": 88, "y": 84, "flags": 4}, + {"matrix": [5, 8], "x": 80, "y": 84, "flags": 4}, + {"matrix": [5, 5], "x": 50, "y": 84, "flags": 4}, + {"matrix": [5, 2], "x": 20, "y": 88, "flags": 4}, + {"matrix": [5, 1], "x": 10, "y": 88, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 88, "flags": 4} + ], + "max_brightness": 160 }, "url": "https://github.com/ArthurCyy", "usb": { "device_version": "0.0.1", + "force_nkro": true, "pid": "0x83A1", "vid": "0x3044" }, @@ -250,4 +264,4 @@ ] } } -}
\ No newline at end of file +} diff --git a/keyboards/miiiw/blackio83/matrix.c b/keyboards/miiiw/blackio83/rev_0100/matrix.c index 841ff3c16e..11a5aa97e6 100644 --- a/keyboards/miiiw/blackio83/matrix.c +++ b/keyboards/miiiw/blackio83/rev_0100/matrix.c @@ -14,8 +14,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "quantum.h" #include "matrix.h" +#include "wait.h" #include "common/shift_register.h" static uint8_t read_rows(void); @@ -34,7 +34,7 @@ static pin_t dip_switch_pad[] = DIP_SWITCH_PINS; void matrix_init_custom(void) { for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - setPinInputLow(row_pins[row]); + gpio_set_pin_input_low(row_pins[row]); } shift_init(); @@ -65,12 +65,12 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { void matrix_power_up(void) { for (uint8_t row = 0; row < MATRIX_ROWS; row++) { palDisableLineEvent(row_pins[row]); - setPinInputLow(row_pins[row]); + gpio_set_pin_input_low(row_pins[row]); } init_cols(); #ifdef DIP_SWITCH_PINS for (uint8_t i = 1; i < NUMBER_OF_DIP_SWITCHES; i++) { - setPinInputHigh(dip_switch_pad[i]); + gpio_set_pin_input_high(dip_switch_pad[i]); } #endif } @@ -78,12 +78,12 @@ void matrix_power_up(void) { void matrix_power_down(void) { unselect_cols(); for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - setPinInputLow(row_pins[row]); + gpio_set_pin_input_low(row_pins[row]); palEnableLineEvent(row_pins[row], PAL_EVENT_MODE_RISING_EDGE); } #ifdef DIP_SWITCH_PINS for (uint8_t i = 1; i < NUMBER_OF_DIP_SWITCHES; i++) { - setPinInputLow(dip_switch_pad[i]); + gpio_set_pin_input_low(dip_switch_pad[i]); } #endif } @@ -91,7 +91,7 @@ void matrix_power_down(void) { static uint8_t read_rows(void) { uint8_t row_value = 0; for(uint8_t row = 0; row < MATRIX_ROWS; row++) { - row_value |= (readPin(row_pins[row]) << row); + row_value |= (gpio_read_pin(row_pins[row]) << row); } return row_value; } @@ -100,15 +100,15 @@ static void init_cols(void) { shift_writeAll(0); for(uint8_t col = 0; col < MATRIX_COLS; col++) { if(col_pins[col] < H0) { - setPinOutput(col_pins[col]); - writePinLow(col_pins[col]); + gpio_set_pin_output(col_pins[col]); + gpio_write_pin_low(col_pins[col]); } } } static void select_col(uint8_t col) { if(col_pins[col] < H0){ - writePinHigh(col_pins[col]); + gpio_write_pin_high(col_pins[col]); waitInputPinDelay(); waitInputPinDelay(); waitInputPinDelay(); @@ -122,7 +122,7 @@ static void select_col(uint8_t col) { static void unselect_col(uint8_t col) { if(col_pins[col] < H0){ - writePinLow(col_pins[col]); + gpio_write_pin_low(col_pins[col]); }else{ shift_writePin(col_pins[col], 0); } @@ -132,8 +132,8 @@ static void unselect_cols(void) { shift_writeAll(1); for(uint8_t col = 0; col < MATRIX_COLS; col++) { if(col_pins[col] < H0) { - setPinOutput(col_pins[col]); - writePinHigh(col_pins[col]); + gpio_set_pin_output(col_pins[col]); + gpio_write_pin_high(col_pins[col]); } } } diff --git a/keyboards/miiiw/blackio83/mcuconf.h b/keyboards/miiiw/blackio83/rev_0100/mcuconf.h index 89038eba82..89038eba82 100644 --- a/keyboards/miiiw/blackio83/mcuconf.h +++ b/keyboards/miiiw/blackio83/rev_0100/mcuconf.h diff --git a/keyboards/miiiw/blackio83/blackio83.c b/keyboards/miiiw/blackio83/rev_0100/rev_0100.c index 8c80ebd73c..18f4c86510 100644 --- a/keyboards/miiiw/blackio83/blackio83.c +++ b/keyboards/miiiw/blackio83/rev_0100/rev_0100.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "blackio83.h" +#include "rev_0100.h" #include "usb_main.h" #include "usb_util.h" @@ -49,25 +49,25 @@ void ws2812_poweron(void) { if(p_setup) return; p_setup = true; s_init = false; - setPinOutput(RGB_EN_PIN); - writePinHigh(RGB_EN_PIN); + gpio_set_pin_output(RGB_EN_PIN); + gpio_write_pin_high(RGB_EN_PIN); } void ws2812_poweroff(void) { if(!p_setup) return; p_setup = false; - setPinInputLow(WS2812_DI_PIN); - writePinLow(RGB_EN_PIN); + gpio_set_pin_input_low(WS2812_DI_PIN); + gpio_write_pin_low(RGB_EN_PIN); } void keyboard_pre_init_kb() { keyboard_pre_init_user(); - setPinInputLow(MWPROTO_STATUS_PIN); - setPinOutput(MWPROTO_WAKEUP_PIN); - writePinLow(MWPROTO_WAKEUP_PIN); + gpio_set_pin_input_low(MWPROTO_STATUS_PIN); + gpio_set_pin_output(MWPROTO_WAKEUP_PIN); + gpio_write_pin_low(MWPROTO_WAKEUP_PIN); wait_ms(2); - writePinHigh(MWPROTO_WAKEUP_PIN); + gpio_write_pin_high(MWPROTO_WAKEUP_PIN); palSetLineMode(MWPROTO_TX_PIN, PAL_MODE_ALTERNATE(MWPROTO_TX_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN); sdStart(&MWPROTO_DRIVER, &mwproto_uart_config); @@ -84,14 +84,14 @@ void keyboard_post_init_kb(void) { "BUILD: " __DATE__ "\n" ); /* clang-format on */ - writePinLow(MWPROTO_WAKEUP_PIN); + gpio_write_pin_low(MWPROTO_WAKEUP_PIN); wait_ms(50); sdPutI(&MWPROTO_DRIVER, 0xA5); sdPutI(&MWPROTO_DRIVER, 0x12); sdPutI(&MWPROTO_DRIVER, 0x01); sdPutI(&MWPROTO_DRIVER, 0x02); sdPutI(&MWPROTO_DRIVER, 0xB4); - writePinHigh(MWPROTO_WAKEUP_PIN); + gpio_write_pin_high(MWPROTO_WAKEUP_PIN); ws2812_poweron(); loop10hz_token = defer_exec(LOOP_10HZ_PERIOD, loop_10Hz, NULL); @@ -117,7 +117,7 @@ bool dip_switch_update_mask_kb(uint32_t state) { usbDisconnectBus(&USB_DRIVER); usbStop(&USB_DRIVER); shutdown_user(true); - setPinInputHigh(POWER_SWITCH_PIN); + gpio_set_pin_input_high(POWER_SWITCH_PIN); palEnableLineEvent(POWER_SWITCH_PIN, PAL_EVENT_MODE_RISING_EDGE); POWER_EnterSleep(); } @@ -132,8 +132,8 @@ uint32_t loop_10Hz(uint32_t trigger_time, void *cb_arg) { static uint32_t pmu_timer = 0; if(timer_elapsed32(pmu_timer) > 3000) { pmu_timer = timer_read32(); - writePinLow(MWPROTO_WAKEUP_PIN); - if(readPin(MWPROTO_STATUS_PIN)) + gpio_write_pin_low(MWPROTO_WAKEUP_PIN); + if(gpio_read_pin(MWPROTO_STATUS_PIN)) wait_us(500); else wait_us(1500); @@ -141,7 +141,7 @@ uint32_t loop_10Hz(uint32_t trigger_time, void *cb_arg) { sdPutI(&MWPROTO_DRIVER, 0x28); sdPutI(&MWPROTO_DRIVER, 0x00); sdPutI(&MWPROTO_DRIVER, 0x8D); - writePinHigh(MWPROTO_WAKEUP_PIN); + gpio_write_pin_high(MWPROTO_WAKEUP_PIN); } } @@ -151,8 +151,8 @@ uint32_t loop_10Hz(uint32_t trigger_time, void *cb_arg) { matrix[2] == 0 && matrix[3] == 0 && matrix[4] == 0 && matrix[5] == 0x201) { if(restore_tick++ > 50) { restore_tick = 0; - writePinLow(MWPROTO_WAKEUP_PIN); - if(readPin(MWPROTO_STATUS_PIN)) + gpio_write_pin_low(MWPROTO_WAKEUP_PIN); + if(gpio_read_pin(MWPROTO_STATUS_PIN)) wait_us(500); else wait_us(1500); @@ -161,7 +161,7 @@ uint32_t loop_10Hz(uint32_t trigger_time, void *cb_arg) { sdPutI(&MWPROTO_DRIVER, 0x01); sdPutI(&MWPROTO_DRIVER, 0x0F); sdPutI(&MWPROTO_DRIVER, 0xB4); - writePinHigh(MWPROTO_WAKEUP_PIN); + gpio_write_pin_high(MWPROTO_WAKEUP_PIN); wait_ms(50); eeconfig_init(); #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/miiiw/blackio83/blackio83.h b/keyboards/miiiw/blackio83/rev_0100/rev_0100.h index ea371443e3..ea371443e3 100644 --- a/keyboards/miiiw/blackio83/blackio83.h +++ b/keyboards/miiiw/blackio83/rev_0100/rev_0100.h diff --git a/keyboards/miiiw/blackio83/rev_0100/rules.mk b/keyboards/miiiw/blackio83/rev_0100/rules.mk index 5558efa95d..7a361addb3 100644 --- a/keyboards/miiiw/blackio83/rev_0100/rules.mk +++ b/keyboards/miiiw/blackio83/rev_0100/rules.mk @@ -1,7 +1,5 @@ CUSTOM_MATRIX = lite -WS2812_DRIVER_REQUIRED := yes - # Project specific files SRC += matrix.c \ common/shift_register.c |