From 65a80f411f03be466d0b74c5b1d44f161e19ac7e Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 20 Mar 2023 08:12:19 +1100 Subject: [PATCH] Clean up APA102 config and add DD mapping (#20159) --- data/mappings/info_config.hjson | 3 +++ data/schemas/keyboard.jsonschema | 13 ++++++++++ docs/feature_rgb_matrix.md | 4 +-- docs/feature_rgblight.md | 5 ++-- drivers/led/apa102.c | 26 +++++++++---------- .../handwired/onekey/blackpill_f401/config.h | 2 -- .../handwired/onekey/blackpill_f401/info.json | 4 +++ .../onekey/blackpill_f401_tinyuf2/config.h | 2 -- .../onekey/blackpill_f401_tinyuf2/info.json | 4 +++ .../handwired/onekey/blackpill_f411/config.h | 2 -- .../handwired/onekey/blackpill_f411/info.json | 4 +++ .../onekey/blackpill_f411_tinyuf2/config.h | 2 -- .../onekey/blackpill_f411_tinyuf2/info.json | 4 +++ keyboards/handwired/onekey/bluepill/config.h | 2 -- keyboards/handwired/onekey/bluepill/info.json | 4 +++ .../handwired/onekey/bluepill_f103c6/config.h | 2 -- .../onekey/bluepill_f103c6/info.json | 4 +++ .../onekey/bluepill_uf2boot/config.h | 2 -- .../onekey/bluepill_uf2boot/info.json | 4 +++ keyboards/handwired/onekey/elite_c/config.h | 3 --- keyboards/handwired/onekey/elite_c/info.json | 4 +++ .../handwired/onekey/evb_wb32f3g71/config.h | 1 - .../handwired/onekey/evb_wb32f3g71/info.json | 4 +++ .../handwired/onekey/evb_wb32fq95/config.h | 1 - .../handwired/onekey/evb_wb32fq95/info.json | 4 +++ .../handwired/onekey/nucleo_f446re/config.h | 2 -- .../handwired/onekey/nucleo_f446re/info.json | 4 +++ .../handwired/onekey/nucleo_l432kc/config.h | 2 -- .../handwired/onekey/nucleo_l432kc/info.json | 4 +++ keyboards/handwired/onekey/promicro/config.h | 3 --- keyboards/handwired/onekey/promicro/info.json | 4 +++ keyboards/handwired/onekey/proton_c/config.h | 2 -- keyboards/handwired/onekey/proton_c/info.json | 4 +++ .../onekey/sipeed_longan_nano/config.h | 2 -- .../onekey/sipeed_longan_nano/info.json | 4 +++ .../handwired/onekey/stm32f0_disco/config.h | 2 -- .../handwired/onekey/stm32f0_disco/info.json | 4 +++ keyboards/handwired/onekey/teensy_2/config.h | 2 -- keyboards/handwired/onekey/teensy_2/info.json | 4 +++ .../handwired/onekey/teensy_2pp/config.h | 2 -- .../handwired/onekey/teensy_2pp/info.json | 4 +++ 41 files changed, 106 insertions(+), 53 deletions(-) diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson index 46108e6fe6a2c80b0d4958499b6795835ba8301c..239813473c536b40d6499ee4977ca1623b2ee49a 100644 --- a/data/mappings/info_config.hjson +++ b/data/mappings/info_config.hjson @@ -10,6 +10,9 @@ // deprecated: Default `false`. Set to `true` to turn on warning when a value exists // invalid: Default `false`. Set to `true` to generate errors when a value exists // replace_with: use with a key marked deprecated or invalid to designate a replacement + "APA102_DI_PIN": {"info_key": "apa102.data_pin"}, + "APA102_CI_PIN": {"info_key": "apa102.clock_pin"}, + "APA102_DEFAULT_BRIGHTNESS": {"info_key": "apa102.default_brightness", "value_type": "int"}, "AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"}, "BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"}, "BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 2845af14f387e3dd99d195217947c86805a5d3c8..4d180712dcb778e2ef8bbf76efdfa8f7f9e82bc6 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -96,6 +96,19 @@ "unknown" ] }, + "apa102": { + "type": "object", + "additionalProperties": false, + "properties": { + "data_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "clock_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "default_brightness": { + "type": "integer", + "minimum": 0, + "maximum": 31 + } + } + }, "audio": { "type": "object", "additionalProperties": false, diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 20ad4c7faf2285e6a37b1089c2d17127b7df8ea9..8b831f010b9335d3e481d07950cca52c3e0757d1 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -383,9 +383,9 @@ Configure the hardware via your `config.h`: ```c // The pin connected to the data pin of the LEDs -#define RGB_DI_PIN D7 +#define APA102_DI_PIN D7 // The pin connected to the clock pin of the LEDs -#define RGB_CI_PIN D6 +#define APA102_CI_PIN D6 // The number of LEDs connected #define RGB_MATRIX_LED_COUNT 70 ``` diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 060efaf1b351672d6cfd8fe0a6e8a41b33ae45cb..7a1866d44fcb0fdfcde691487215ea659e09cf74 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -35,8 +35,9 @@ At minimum you must define the data pin your LED strip is connected to, and the |Define |Description | |---------------|---------------------------------------------------------------------------------------------------------| -|`RGB_DI_PIN` |The pin connected to the data pin of the LEDs | -|`RGB_CI_PIN` |The pin connected to the clock pin of the LEDs (APA102 only) | +|`RGB_DI_PIN` |The pin connected to the data pin of the LEDs (WS2812) | +|`APA102_DI_PIN`|The pin connected to the data pin of the LEDs (APA102) | +|`APA102_CI_PIN`|The pin connected to the clock pin of the LEDs (APA102) | |`RGBLED_NUM` |The number of LEDs connected | |`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half directly wired to `RGB_DI_PIN` | diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c index f291948975281b2a2f8e759fcd5f00a1ad7bb6f3..40fc68e4f11cf793f6e5bc2715de78ba7bcbe63a 100644 --- a/drivers/led/apa102.c +++ b/drivers/led/apa102.c @@ -27,7 +27,7 @@ # if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) || defined(GD32VF103) # define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns # else -# error("APA102_NOPS configuration required") +# error APA102_NOPS configuration required # define APA102_NOPS 0 // this just pleases the compile so the above error is easier to spot # endif # endif @@ -43,14 +43,14 @@ } \ } while (0) -#define APA102_SEND_BIT(byte, bit) \ - do { \ - writePin(RGB_DI_PIN, (byte >> bit) & 1); \ - io_wait; \ - writePinHigh(RGB_CI_PIN); \ - io_wait; \ - writePinLow(RGB_CI_PIN); \ - io_wait; \ +#define APA102_SEND_BIT(byte, bit) \ + do { \ + writePin(APA102_DI_PIN, (byte >> bit) & 1); \ + io_wait; \ + writePinHigh(APA102_CI_PIN); \ + io_wait; \ + writePinLow(APA102_CI_PIN); \ + io_wait; \ } while (0) uint8_t apa102_led_brightness = APA102_DEFAULT_BRIGHTNESS; @@ -77,11 +77,11 @@ void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { } void static apa102_init(void) { - setPinOutput(RGB_DI_PIN); - setPinOutput(RGB_CI_PIN); + setPinOutput(APA102_DI_PIN); + setPinOutput(APA102_CI_PIN); - writePinLow(RGB_DI_PIN); - writePinLow(RGB_CI_PIN); + writePinLow(APA102_DI_PIN); + writePinLow(APA102_CI_PIN); } void apa102_set_brightness(uint8_t brightness) { diff --git a/keyboards/handwired/onekey/blackpill_f401/config.h b/keyboards/handwired/onekey/blackpill_f401/config.h index 8000ee77d7da6a5f75d9cf6250fb7fcf2bc920d6..6183ee981971d3acaaabea439d5e2cff01ac8fd1 100644 --- a/keyboards/handwired/onekey/blackpill_f401/config.h +++ b/keyboards/handwired/onekey/blackpill_f401/config.h @@ -23,8 +23,6 @@ #define ADC_PIN A0 -#define RGB_CI_PIN A2 - #define SOLENOID_PIN B12 #define SOLENOID_PINS { B12, B13, B14, B15 } #define SOLENOID_PINS_ACTIVE_STATE { high, high, low } diff --git a/keyboards/handwired/onekey/blackpill_f401/info.json b/keyboards/handwired/onekey/blackpill_f401/info.json index b79b17b00098b149cb81c36a4695f1e980be407d..6d75c549cec137deb00566b0f0fcc7283a659ae4 100644 --- a/keyboards/handwired/onekey/blackpill_f401/info.json +++ b/keyboards/handwired/onekey/blackpill_f401/info.json @@ -10,5 +10,9 @@ }, "rgblight": { "pin": "A1" + }, + "apa102": { + "data_pin": "A1", + "clock_pin": "A2" } } diff --git a/keyboards/handwired/onekey/blackpill_f401_tinyuf2/config.h b/keyboards/handwired/onekey/blackpill_f401_tinyuf2/config.h index 8000ee77d7da6a5f75d9cf6250fb7fcf2bc920d6..6183ee981971d3acaaabea439d5e2cff01ac8fd1 100755 --- a/keyboards/handwired/onekey/blackpill_f401_tinyuf2/config.h +++ b/keyboards/handwired/onekey/blackpill_f401_tinyuf2/config.h @@ -23,8 +23,6 @@ #define ADC_PIN A0 -#define RGB_CI_PIN A2 - #define SOLENOID_PIN B12 #define SOLENOID_PINS { B12, B13, B14, B15 } #define SOLENOID_PINS_ACTIVE_STATE { high, high, low } diff --git a/keyboards/handwired/onekey/blackpill_f401_tinyuf2/info.json b/keyboards/handwired/onekey/blackpill_f401_tinyuf2/info.json index 6787be36af496764cc359ad02e5f07780e7af786..8d558c42540954e9eba334623873f8ca5af4c18a 100644 --- a/keyboards/handwired/onekey/blackpill_f401_tinyuf2/info.json +++ b/keyboards/handwired/onekey/blackpill_f401_tinyuf2/info.json @@ -11,5 +11,9 @@ }, "rgblight": { "pin": "A1" + }, + "apa102": { + "data_pin": "A1", + "clock_pin": "A2" } } diff --git a/keyboards/handwired/onekey/blackpill_f411/config.h b/keyboards/handwired/onekey/blackpill_f411/config.h index 8000ee77d7da6a5f75d9cf6250fb7fcf2bc920d6..6183ee981971d3acaaabea439d5e2cff01ac8fd1 100644 --- a/keyboards/handwired/onekey/blackpill_f411/config.h +++ b/keyboards/handwired/onekey/blackpill_f411/config.h @@ -23,8 +23,6 @@ #define ADC_PIN A0 -#define RGB_CI_PIN A2 - #define SOLENOID_PIN B12 #define SOLENOID_PINS { B12, B13, B14, B15 } #define SOLENOID_PINS_ACTIVE_STATE { high, high, low } diff --git a/keyboards/handwired/onekey/blackpill_f411/info.json b/keyboards/handwired/onekey/blackpill_f411/info.json index 19c6cbfed975e60af47c8509b6841488c50d07eb..8ff55f558786cddbe22ecd2caa077b4caa371e9f 100644 --- a/keyboards/handwired/onekey/blackpill_f411/info.json +++ b/keyboards/handwired/onekey/blackpill_f411/info.json @@ -10,5 +10,9 @@ }, "rgblight": { "pin": "A1" + }, + "apa102": { + "data_pin": "A1", + "clock_pin": "A2" } } diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h index 8000ee77d7da6a5f75d9cf6250fb7fcf2bc920d6..6183ee981971d3acaaabea439d5e2cff01ac8fd1 100755 --- a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h +++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h @@ -23,8 +23,6 @@ #define ADC_PIN A0 -#define RGB_CI_PIN A2 - #define SOLENOID_PIN B12 #define SOLENOID_PINS { B12, B13, B14, B15 } #define SOLENOID_PINS_ACTIVE_STATE { high, high, low } diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/info.json b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/info.json index 25d33a7ddec4fe235bc9f59ae473e09ddb1d4f83..4bdbc5241a1f0e4f7742d56f6589532a7e913a09 100644 --- a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/info.json +++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/info.json @@ -11,5 +11,9 @@ }, "rgblight": { "pin": "A1" + }, + "apa102": { + "data_pin": "A1", + "clock_pin": "A2" } } diff --git a/keyboards/handwired/onekey/bluepill/config.h b/keyboards/handwired/onekey/bluepill/config.h index 7c3512b57bd24680c2d9883ce18088d3d2591d93..02cd63ac3f99c3c6b042b46f25b2c305e0d1f1f3 100644 --- a/keyboards/handwired/onekey/bluepill/config.h +++ b/keyboards/handwired/onekey/bluepill/config.h @@ -21,5 +21,3 @@ #define BACKLIGHT_PWM_CHANNEL 1 #define ADC_PIN A0 - -#define RGB_CI_PIN A2 diff --git a/keyboards/handwired/onekey/bluepill/info.json b/keyboards/handwired/onekey/bluepill/info.json index 7bef2db170816f0743fe1fea623b9b9af526a517..21de1b76969521c4dee636771e00ff2ef6d72b72 100644 --- a/keyboards/handwired/onekey/bluepill/info.json +++ b/keyboards/handwired/onekey/bluepill/info.json @@ -10,5 +10,9 @@ }, "rgblight": { "pin": "A1" + }, + "apa102": { + "data_pin": "A1", + "clock_pin": "A2" } } diff --git a/keyboards/handwired/onekey/bluepill_f103c6/config.h b/keyboards/handwired/onekey/bluepill_f103c6/config.h index 12f4596e7b35f617ca5ca7ef536058c39e1196f2..5edcf5a2e17ea82ac8b93afeea5d1685dd460b46 100644 --- a/keyboards/handwired/onekey/bluepill_f103c6/config.h +++ b/keyboards/handwired/onekey/bluepill_f103c6/config.h @@ -22,8 +22,6 @@ #define ADC_PIN A0 -#define RGB_CI_PIN A2 - // This code does not fit into the really small flash of STM32F103x6 together // with CONSOLE_ENABLE=yes, and the debugging console is probably more // important for the "onekey" testing firmware. In a real firmware you may be diff --git a/keyboards/handwired/onekey/bluepill_f103c6/info.json b/keyboards/handwired/onekey/bluepill_f103c6/info.json index 353f074d922ba6cd7d27072b840773d93679b7d7..9a21daf322b1b9e64e29afd2435792042378a6e1 100644 --- a/keyboards/handwired/onekey/bluepill_f103c6/info.json +++ b/keyboards/handwired/onekey/bluepill_f103c6/info.json @@ -11,5 +11,9 @@ }, "rgblight": { "pin": "A1" + }, + "apa102": { + "data_pin": "A1", + "clock_pin": "A2" } } diff --git a/keyboards/handwired/onekey/bluepill_uf2boot/config.h b/keyboards/handwired/onekey/bluepill_uf2boot/config.h index 7c3512b57bd24680c2d9883ce18088d3d2591d93..02cd63ac3f99c3c6b042b46f25b2c305e0d1f1f3 100644 --- a/keyboards/handwired/onekey/bluepill_uf2boot/config.h +++ b/keyboards/handwired/onekey/bluepill_uf2boot/config.h @@ -21,5 +21,3 @@ #define BACKLIGHT_PWM_CHANNEL 1 #define ADC_PIN A0 - -#define RGB_CI_PIN A2 diff --git a/keyboards/handwired/onekey/bluepill_uf2boot/info.json b/keyboards/handwired/onekey/bluepill_uf2boot/info.json index 1f823ea0d7ff0d02ef7f2e16a3193f579d478204..3e874e8532791986ae9072d55a720699a94b5db7 100644 --- a/keyboards/handwired/onekey/bluepill_uf2boot/info.json +++ b/keyboards/handwired/onekey/bluepill_uf2boot/info.json @@ -11,5 +11,9 @@ }, "rgblight": { "pin": "A1" + }, + "apa102": { + "data_pin": "A1", + "clock_pin": "A2" } } diff --git a/keyboards/handwired/onekey/elite_c/config.h b/keyboards/handwired/onekey/elite_c/config.h index 1eb62b44983e9890226d8ee1185708f143dc3fa6..1bd5fb6c14799b633b6cd0a669c6c95d857bddaf 100644 --- a/keyboards/handwired/onekey/elite_c/config.h +++ b/keyboards/handwired/onekey/elite_c/config.h @@ -16,9 +16,6 @@ #pragma once - -#define RGB_CI_PIN B1 - #define ADC_PIN F6 #define QMK_WAITING_TEST_BUSY_PIN F6 diff --git a/keyboards/handwired/onekey/elite_c/info.json b/keyboards/handwired/onekey/elite_c/info.json index 154856104163df876085f49e4965b74b59e30404..4726c87053fa619bb04155e36b191b30a4df237d 100644 --- a/keyboards/handwired/onekey/elite_c/info.json +++ b/keyboards/handwired/onekey/elite_c/info.json @@ -10,5 +10,9 @@ }, "rgblight": { "pin": "F6" + }, + "apa102": { + "data_pin": "F6", + "clock_pin": "B1" } } diff --git a/keyboards/handwired/onekey/evb_wb32f3g71/config.h b/keyboards/handwired/onekey/evb_wb32f3g71/config.h index 11cacfea729303820dbd33531791f108fb93e59e..4a65e9a72fe9cc34d85f6f6c154b7bf1b52737ce 100644 --- a/keyboards/handwired/onekey/evb_wb32f3g71/config.h +++ b/keyboards/handwired/onekey/evb_wb32f3g71/config.h @@ -11,7 +11,6 @@ #define BACKLIGHT_PAL_MODE 2 #define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4))) -#define RGB_CI_PIN B8 #define SOLENOID_PIN B12 #define SOLENOID_PINS { B12, B13, B14, B15 } diff --git a/keyboards/handwired/onekey/evb_wb32f3g71/info.json b/keyboards/handwired/onekey/evb_wb32f3g71/info.json index 304517d26636d49f6cd4b4d1042192666c5dcdef..0bc9001321e2d689477512146f186e8970f8914f 100644 --- a/keyboards/handwired/onekey/evb_wb32f3g71/info.json +++ b/keyboards/handwired/onekey/evb_wb32f3g71/info.json @@ -11,5 +11,9 @@ }, "rgblight": { "pin": "A0" + }, + "apa102": { + "data_pin": "A0", + "clock_pin": "B8" } } diff --git a/keyboards/handwired/onekey/evb_wb32fq95/config.h b/keyboards/handwired/onekey/evb_wb32fq95/config.h index 11cacfea729303820dbd33531791f108fb93e59e..4a65e9a72fe9cc34d85f6f6c154b7bf1b52737ce 100644 --- a/keyboards/handwired/onekey/evb_wb32fq95/config.h +++ b/keyboards/handwired/onekey/evb_wb32fq95/config.h @@ -11,7 +11,6 @@ #define BACKLIGHT_PAL_MODE 2 #define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4))) -#define RGB_CI_PIN B8 #define SOLENOID_PIN B12 #define SOLENOID_PINS { B12, B13, B14, B15 } diff --git a/keyboards/handwired/onekey/evb_wb32fq95/info.json b/keyboards/handwired/onekey/evb_wb32fq95/info.json index bbf5139668308eb804c9651bb901715253fff882..7fcc3d4ebd91de312852cb9241bbccf0677edbce 100644 --- a/keyboards/handwired/onekey/evb_wb32fq95/info.json +++ b/keyboards/handwired/onekey/evb_wb32fq95/info.json @@ -11,5 +11,9 @@ }, "rgblight": { "pin": "A0" + }, + "apa102": { + "data_pin": "A0", + "clock_pin": "B8" } } diff --git a/keyboards/handwired/onekey/nucleo_f446re/config.h b/keyboards/handwired/onekey/nucleo_f446re/config.h index 52fe25dc8c7f8f8530d96506ad99470946ab7793..c6c04ed6154493040ef91a27c93640d217e769ad 100644 --- a/keyboards/handwired/onekey/nucleo_f446re/config.h +++ b/keyboards/handwired/onekey/nucleo_f446re/config.h @@ -7,8 +7,6 @@ #define BACKLIGHT_PWM_CHANNEL 3 #define BACKLIGHT_PAL_MODE 2 -#define RGB_CI_PIN B13 - #define ADC_PIN A0 #define SOLENOID_PINS { B12, B13, B14, B15 } diff --git a/keyboards/handwired/onekey/nucleo_f446re/info.json b/keyboards/handwired/onekey/nucleo_f446re/info.json index 6b9206f98731d3c020ccc83633a0a9e993d3031b..2438c6e482d9634b0929d493c7c02afdfb97c137 100644 --- a/keyboards/handwired/onekey/nucleo_f446re/info.json +++ b/keyboards/handwired/onekey/nucleo_f446re/info.json @@ -11,5 +11,9 @@ }, "rgblight": { "pin": "A0" + }, + "apa102": { + "data_pin": "A0", + "clock_pin": "B13" } } diff --git a/keyboards/handwired/onekey/nucleo_l432kc/config.h b/keyboards/handwired/onekey/nucleo_l432kc/config.h index fcf2c71b4784a0acd1d1aa0b48a5986e3c92b7a4..d344a110942e242bbfef506e3b4d04aa81180f99 100644 --- a/keyboards/handwired/onekey/nucleo_l432kc/config.h +++ b/keyboards/handwired/onekey/nucleo_l432kc/config.h @@ -7,6 +7,4 @@ #define BACKLIGHT_PWM_CHANNEL 3 #define BACKLIGHT_PAL_MODE 2 -#define RGB_CI_PIN B13 - #define ADC_PIN A0 diff --git a/keyboards/handwired/onekey/nucleo_l432kc/info.json b/keyboards/handwired/onekey/nucleo_l432kc/info.json index a6e651104005f38f5a625358460e292501cedd26..43a4b27992c33b5e60b68c67c3687274d4884362 100644 --- a/keyboards/handwired/onekey/nucleo_l432kc/info.json +++ b/keyboards/handwired/onekey/nucleo_l432kc/info.json @@ -11,5 +11,9 @@ }, "rgblight": { "pin": "A0" + }, + "apa102": { + "data_pin": "A0", + "clock_pin": "B13" } } diff --git a/keyboards/handwired/onekey/promicro/config.h b/keyboards/handwired/onekey/promicro/config.h index 1eb62b44983e9890226d8ee1185708f143dc3fa6..1bd5fb6c14799b633b6cd0a669c6c95d857bddaf 100644 --- a/keyboards/handwired/onekey/promicro/config.h +++ b/keyboards/handwired/onekey/promicro/config.h @@ -16,9 +16,6 @@ #pragma once - -#define RGB_CI_PIN B1 - #define ADC_PIN F6 #define QMK_WAITING_TEST_BUSY_PIN F6 diff --git a/keyboards/handwired/onekey/promicro/info.json b/keyboards/handwired/onekey/promicro/info.json index efefd8d45c0d0573bc0b44a2ea886476a32d4a2f..84d2fba1318e3723059a6f9bf5e093f4268c7de5 100644 --- a/keyboards/handwired/onekey/promicro/info.json +++ b/keyboards/handwired/onekey/promicro/info.json @@ -10,5 +10,9 @@ }, "rgblight": { "pin": "F6" + }, + "apa102": { + "data_pin": "F6", + "clock_pin": "B1" } } diff --git a/keyboards/handwired/onekey/proton_c/config.h b/keyboards/handwired/onekey/proton_c/config.h index 1f1c5284002893fae94003abd538575d4334eb1e..49376e474e275f7e34e629a28d1184ae138b81bb 100644 --- a/keyboards/handwired/onekey/proton_c/config.h +++ b/keyboards/handwired/onekey/proton_c/config.h @@ -21,6 +21,4 @@ #define BACKLIGHT_PWM_CHANNEL 3 #define BACKLIGHT_PAL_MODE 2 -#define RGB_CI_PIN B13 - #define ADC_PIN A0 diff --git a/keyboards/handwired/onekey/proton_c/info.json b/keyboards/handwired/onekey/proton_c/info.json index 5292d025678f1ebb9b59c33679f20edb2b97191e..833f7cbf2a4fd128433e5d525dd3f24d39bab865 100644 --- a/keyboards/handwired/onekey/proton_c/info.json +++ b/keyboards/handwired/onekey/proton_c/info.json @@ -10,5 +10,9 @@ }, "rgblight": { "pin": "A0" + }, + "apa102": { + "data_pin": "A0", + "clock_pin": "B13" } } diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/config.h b/keyboards/handwired/onekey/sipeed_longan_nano/config.h index 71ac29e8822cbb55fe14c001e5d60a9e0d261c1d..1e39cf3f1d4b556c406e49d7f5c3fe57275bf9a6 100644 --- a/keyboards/handwired/onekey/sipeed_longan_nano/config.h +++ b/keyboards/handwired/onekey/sipeed_longan_nano/config.h @@ -20,8 +20,6 @@ #define BACKLIGHT_PWM_DRIVER PWMD5 /* GD32 numbering scheme starts from 0, TIMER4 on GD32 boards is TIMER5 on STM32 boards. */ #define BACKLIGHT_PWM_CHANNEL 2 /* GD32 numbering scheme starts from 0, Channel 1 on GD32 boards is Channel 2 on STM32 boards. */ -#define RGB_CI_PIN B13 - #define ADC_PIN A0 #define I2C1_CLOCK_SPEED 1000000 /* GD32VF103 supports fast mode plus. */ diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/info.json b/keyboards/handwired/onekey/sipeed_longan_nano/info.json index d14928139ba26644834af7642ae5855b06615e0f..b37219bbc3ac1b6dfbc237fc573aafe9494c0d1a 100644 --- a/keyboards/handwired/onekey/sipeed_longan_nano/info.json +++ b/keyboards/handwired/onekey/sipeed_longan_nano/info.json @@ -12,5 +12,9 @@ }, "rgblight": { "pin": "A2" + }, + "apa102": { + "data_pin": "A2", + "clock_pin": "B13" } } diff --git a/keyboards/handwired/onekey/stm32f0_disco/config.h b/keyboards/handwired/onekey/stm32f0_disco/config.h index b4665911d45d2cafd616017a434cfcfd55fdb32c..806eb69df4e372e78e8dea0ad299763ebd041020 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/config.h +++ b/keyboards/handwired/onekey/stm32f0_disco/config.h @@ -22,5 +22,3 @@ #define BACKLIGHT_PAL_MODE 0 #define ADC_PIN A0 - -#define RGB_CI_PIN B13 diff --git a/keyboards/handwired/onekey/stm32f0_disco/info.json b/keyboards/handwired/onekey/stm32f0_disco/info.json index c76bd73173297b7755b3db8cc3bf29aa5f8159c9..993003373afbe08769f03148735d7f16d957687e 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/info.json +++ b/keyboards/handwired/onekey/stm32f0_disco/info.json @@ -11,5 +11,9 @@ }, "rgblight": { "pin": "B15" + }, + "apa102": { + "data_pin": "B15", + "clock_pin": "B13" } } diff --git a/keyboards/handwired/onekey/teensy_2/config.h b/keyboards/handwired/onekey/teensy_2/config.h index e70df80fc83cc155a6743f5eec2d593347f5fd82..432ae9b85cce3d392941cc37612bd8ff53af7f84 100644 --- a/keyboards/handwired/onekey/teensy_2/config.h +++ b/keyboards/handwired/onekey/teensy_2/config.h @@ -19,7 +19,5 @@ #define ADC_PIN F6 -#define RGB_CI_PIN F7 - #define QMK_WAITING_TEST_BUSY_PIN F6 #define QMK_WAITING_TEST_YIELD_PIN F7 diff --git a/keyboards/handwired/onekey/teensy_2/info.json b/keyboards/handwired/onekey/teensy_2/info.json index 24251684622536f7c1e059222347e2e847cd2c9a..e62fc69ce71faf1e2b7b01bf5d9685a183fc4200 100644 --- a/keyboards/handwired/onekey/teensy_2/info.json +++ b/keyboards/handwired/onekey/teensy_2/info.json @@ -11,5 +11,9 @@ }, "rgblight": { "pin": "F6" + }, + "apa102": { + "data_pin": "F6", + "clock_pin": "F7" } } diff --git a/keyboards/handwired/onekey/teensy_2pp/config.h b/keyboards/handwired/onekey/teensy_2pp/config.h index e70df80fc83cc155a6743f5eec2d593347f5fd82..432ae9b85cce3d392941cc37612bd8ff53af7f84 100644 --- a/keyboards/handwired/onekey/teensy_2pp/config.h +++ b/keyboards/handwired/onekey/teensy_2pp/config.h @@ -19,7 +19,5 @@ #define ADC_PIN F6 -#define RGB_CI_PIN F7 - #define QMK_WAITING_TEST_BUSY_PIN F6 #define QMK_WAITING_TEST_YIELD_PIN F7 diff --git a/keyboards/handwired/onekey/teensy_2pp/info.json b/keyboards/handwired/onekey/teensy_2pp/info.json index ba7281ce1bd3d1f15d0c266e29d00b0a1cdee1ce..6e134d4506a1303af51e5196be337ce895775d57 100644 --- a/keyboards/handwired/onekey/teensy_2pp/info.json +++ b/keyboards/handwired/onekey/teensy_2pp/info.json @@ -11,5 +11,9 @@ }, "rgblight": { "pin": "F6" + }, + "apa102": { + "data_pin": "F6", + "clock_pin": "F7" } }