aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common_features.mk46
-rw-r--r--docs/feature_rgb_matrix.md22
-rw-r--r--docs/feature_rgblight.md11
-rw-r--r--drivers/apa102/apa102.c151
-rw-r--r--drivers/apa102/apa102.h (renamed from drivers/avr/apa102.h)32
-rw-r--r--drivers/avr/apa102.c96
-rw-r--r--keyboards/handwired/onekey/elite_c/config.h1
-rw-r--r--keyboards/handwired/onekey/keymaps/apa102/config.h5
-rw-r--r--keyboards/handwired/onekey/keymaps/apa102/keymap.c14
-rw-r--r--keyboards/handwired/onekey/keymaps/apa102/rules.mk2
-rw-r--r--keyboards/handwired/onekey/promicro/config.h1
-rw-r--r--keyboards/handwired/onekey/proton_c/config.h1
12 files changed, 259 insertions, 123 deletions
diff --git a/common_features.mk b/common_features.mk
index 8ac53ec45..95b59937c 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -154,18 +154,38 @@ else
154 endif 154 endif
155endif 155endif
156 156
157RGBLIGHT_ENABLE ?= no
158VALID_RGBLIGHT_TYPES := WS2812 APA102 custom
159
160ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
161 RGBLIGHT_DRIVER ?= custom
162endif
163
157ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) 164ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
158 POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h 165 RGBLIGHT_DRIVER ?= WS2812
159 OPT_DEFS += -DRGBLIGHT_ENABLE 166
160 SRC += $(QUANTUM_DIR)/color.c 167 ifeq ($(filter $(RGBLIGHT_DRIVER),$(VALID_RGBLIGHT_TYPES)),)
161 SRC += $(QUANTUM_DIR)/rgblight.c 168 $(error RGBLIGHT_DRIVER="$(RGBLIGHT_DRIVER)" is not a valid RGB type)
162 CIE1931_CURVE := yes
163 RGB_KEYCODES_ENABLE := yes
164 ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
165 OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
166 else 169 else
170 POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
171 OPT_DEFS += -DRGBLIGHT_ENABLE
172 SRC += $(QUANTUM_DIR)/color.c
173 SRC += $(QUANTUM_DIR)/rgblight.c
174 CIE1931_CURVE := yes
175 RGB_KEYCODES_ENABLE := yes
176 endif
177
178 ifeq ($(strip $(RGBLIGHT_DRIVER)), WS2812)
167 WS2812_DRIVER_REQUIRED := yes 179 WS2812_DRIVER_REQUIRED := yes
168 endif 180 endif
181
182 ifeq ($(strip $(RGBLIGHT_DRIVER)), APA102)
183 APA102_DRIVER_REQUIRED := yes
184 endif
185
186 ifeq ($(strip $(RGBLIGHT_DRIVER)), custom)
187 OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
188 endif
169endif 189endif
170 190
171 191
@@ -243,6 +263,11 @@ endif
243 WS2812_DRIVER_REQUIRED := yes 263 WS2812_DRIVER_REQUIRED := yes
244 endif 264 endif
245 265
266 ifeq ($(strip $(RGB_MATRIX_DRIVER)), APA102)
267 OPT_DEFS += -DAPA102
268 APA102_DRIVER_REQUIRED := yes
269 endif
270
246 ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes) 271 ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
247 OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB 272 OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
248 endif 273 endif
@@ -345,6 +370,11 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
345 endif 370 endif
346endif 371endif
347 372
373ifeq ($(strip $(APA102_DRIVER_REQUIRED)), yes)
374 COMMON_VPATH += $(DRIVER_PATH)/apa102
375 SRC += apa102.c
376endif
377
348ifeq ($(strip $(VISUALIZER_ENABLE)), yes) 378ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
349 CIE1931_CURVE := yes 379 CIE1931_CURVE := yes
350endif 380endif
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index a9e711c9f..bb0acba3b 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -129,6 +129,28 @@ Configure the hardware via your `config.h`:
129 129
130--- 130---
131 131
132### APA102 :id=apa102
133
134There is basic support for APA102 based addressable LED strands. To enable it, add this to your `rules.mk`:
135
136```makefile
137RGB_MATRIX_ENABLE = yes
138RGB_MATRIX_DRIVER = APA102
139```
140
141Configure the hardware via your `config.h`:
142
143```c
144// The pin connected to the data pin of the LEDs
145#define RGB_DI_PIN D7
146// The pin connected to the clock pin of the LEDs
147#define RGB_CI_PIN D6
148// The number of LEDs connected
149#define DRIVER_LED_TOTAL 70
150```
151
152---
153
132From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example: 154From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
133 155
134```c 156```c
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 762056b34..f1178c679 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -10,6 +10,7 @@ Currently QMK supports the following addressable LEDs (however, the white LED in
10 10
11 * WS2811, WS2812, WS2812B, WS2812C, etc. 11 * WS2811, WS2812, WS2812B, WS2812C, etc.
12 * SK6812, SK6812MINI, SK6805 12 * SK6812, SK6812MINI, SK6805
13 * APA102
13 14
14These LEDs are called "addressable" because instead of using a wire per color, each LED contains a small microchip that understands a special protocol sent over a single wire. The chip passes on the remaining data to the next LED, allowing them to be chained together. In this way, you can easily control the color of the individual LEDs. 15These LEDs are called "addressable" because instead of using a wire per color, each LED contains a small microchip that understands a special protocol sent over a single wire. The chip passes on the remaining data to the next LED, allowing them to be chained together. In this way, you can easily control the color of the individual LEDs.
15 16
@@ -21,11 +22,19 @@ On keyboards with onboard RGB LEDs, it is usually enabled by default. If it is n
21RGBLIGHT_ENABLE = yes 22RGBLIGHT_ENABLE = yes
22``` 23```
23 24
24At minimum you must define the data pin your LED strip is connected to, and the number of LEDs in the strip, in your `config.h`. If your keyboard has onboard RGB LEDs, and you are simply creating a keymap, you usually won't need to modify these. 25For APA102 LEDs, add the following to your `rules.mk`:
26
27```make
28RGBLIGHT_ENABLE = yes
29RGBLIGHT_DRIVER = APA102
30```
31
32At minimum you must define the data pin your LED strip is connected to, and the number of LEDs in the strip, in your `config.h`. For APA102 LEDs, you must also define the clock pin. If your keyboard has onboard RGB LEDs, and you are simply creating a keymap, you usually won't need to modify these.
25 33
26|Define |Description | 34|Define |Description |
27|---------------|---------------------------------------------------------------------------------------------------------| 35|---------------|---------------------------------------------------------------------------------------------------------|
28|`RGB_DI_PIN` |The pin connected to the data pin of the LEDs | 36|`RGB_DI_PIN` |The pin connected to the data pin of the LEDs |
37|`RGB_CI_PIN` |The pin connected to the clock pin of the LEDs (APA102 only) |
29|`RGBLED_NUM` |The number of LEDs connected | 38|`RGBLED_NUM` |The number of LEDs connected |
30|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half directly wired to `RGB_DI_PIN` | 39|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half directly wired to `RGB_DI_PIN` |
31 40
diff --git a/drivers/apa102/apa102.c b/drivers/apa102/apa102.c
new file mode 100644
index 000000000..7396dc3c5
--- /dev/null
+++ b/drivers/apa102/apa102.c
@@ -0,0 +1,151 @@
1/* Copyright 2020 Aldehir Rojas
2 * Copyright 2017 Mikkel (Duckle29)
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "apa102.h"
19#include "quantum.h"
20
21#ifndef APA102_NOPS
22# if defined(__AVR__)
23# define APA102_NOPS 0 // AVR at 16 MHz already spends 62.5 ns per clock, so no extra delay is needed
24# elif defined(PROTOCOL_CHIBIOS)
25
26# include "hal.h"
27# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX)
28# define APA102_NOPS (100 / (1000000000L / (STM32_SYSCLK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns
29# else
30# error("APA102_NOPS configuration required")
31# define APA102_NOPS 0 // this just pleases the compile so the above error is easier to spot
32# endif
33# endif
34#endif
35
36#define io_wait \
37 do { \
38 for (int i = 0; i < APA102_NOPS; i++) { \
39 __asm__ volatile("nop\n\t" \
40 "nop\n\t" \
41 "nop\n\t" \
42 "nop\n\t"); \
43 } \
44 } while (0)
45
46#define APA102_SEND_BIT(byte, bit) \
47 do { \
48 writePin(RGB_DI_PIN, (byte >> bit) & 1); \
49 io_wait; \
50 writePinHigh(RGB_CI_PIN); \
51 io_wait; \
52 writePinLow(RGB_CI_PIN); \
53 io_wait; \
54 } while (0)
55
56uint8_t apa102_led_brightness = APA102_DEFAULT_BRIGHTNESS;
57
58void static apa102_start_frame(void);
59void static apa102_end_frame(uint16_t num_leds);
60
61void static apa102_send_frame(uint8_t red, uint8_t green, uint8_t blue, uint8_t brightness);
62void static apa102_send_byte(uint8_t byte);
63
64void apa102_setleds(LED_TYPE *start_led, uint16_t num_leds) {
65 LED_TYPE *end = start_led + num_leds;
66
67 apa102_start_frame();
68 for (LED_TYPE *led = start_led; led < end; led++) {
69 apa102_send_frame(led->r, led->g, led->b, apa102_led_brightness);
70 }
71 apa102_end_frame(num_leds);
72}
73
74// Overwrite the default rgblight_call_driver to use apa102 driver
75void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { apa102_setleds(start_led, num_leds); }
76
77void static apa102_init(void) {
78 setPinOutput(RGB_DI_PIN);
79 setPinOutput(RGB_CI_PIN);
80
81 writePinLow(RGB_DI_PIN);
82 writePinLow(RGB_CI_PIN);
83}
84
85void apa102_set_brightness(uint8_t brightness) {
86 if (brightness > APA102_MAX_BRIGHTNESS) {
87 apa102_led_brightness = APA102_MAX_BRIGHTNESS;
88 } else if (brightness < 0) {
89 apa102_led_brightness = 0;
90 } else {
91 apa102_led_brightness = brightness;
92 }
93}
94
95void static apa102_send_frame(uint8_t red, uint8_t green, uint8_t blue, uint8_t brightness) {
96 apa102_send_byte(0b11100000 | brightness);
97 apa102_send_byte(blue);
98 apa102_send_byte(green);
99 apa102_send_byte(red);
100}
101
102void static apa102_start_frame(void) {
103 apa102_init();
104 for (uint16_t i = 0; i < 4; i++) {
105 apa102_send_byte(0);
106 }
107}
108
109void static apa102_end_frame(uint16_t num_leds) {
110 // This function has been taken from: https://github.com/pololu/apa102-arduino/blob/master/APA102.h
111 // and adapted. The code is MIT licensed. I think thats compatible?
112 //
113 // The data stream seen by the last LED in the chain will be delayed by
114 // (count - 1) clock edges, because each LED before it inverts the clock
115 // line and delays the data by one clock edge. Therefore, to make sure
116 // the last LED actually receives the data we wrote, the number of extra
117 // edges we send at the end of the frame must be at least (count - 1).
118 //
119 // Assuming we only want to send these edges in groups of size K, the
120 // C/C++ expression for the minimum number of groups to send is:
121 //
122 // ((count - 1) + (K - 1)) / K
123 //
124 // The C/C++ expression above is just (count - 1) divided by K,
125 // rounded up to the nearest whole number if there is a remainder.
126 //
127 // We set K to 16 and use the formula above as the number of frame-end
128 // bytes to transfer. Each byte has 16 clock edges.
129 //
130 // We are ignoring the specification for the end frame in the APA102
131 // datasheet, which says to send 0xFF four times, because it does not work
132 // when you have 66 LEDs or more, and also it results in unwanted white
133 // pixels if you try to update fewer LEDs than are on your LED strip.
134 uint16_t iterations = (num_leds + 14) / 16;
135 for (uint16_t i = 0; i < iterations; i++) {
136 apa102_send_byte(0);
137 }
138
139 apa102_init();
140}
141
142void static apa102_send_byte(uint8_t byte) {
143 APA102_SEND_BIT(byte, 7);
144 APA102_SEND_BIT(byte, 6);
145 APA102_SEND_BIT(byte, 5);
146 APA102_SEND_BIT(byte, 4);
147 APA102_SEND_BIT(byte, 3);
148 APA102_SEND_BIT(byte, 2);
149 APA102_SEND_BIT(byte, 1);
150 APA102_SEND_BIT(byte, 0);
151}
diff --git a/drivers/avr/apa102.h b/drivers/apa102/apa102.h
index d4c1e18ee..58cf020c1 100644
--- a/drivers/avr/apa102.h
+++ b/drivers/apa102/apa102.h
@@ -1,10 +1,5 @@
1/* 1/* Copyright 2020 Aldehir Rojas
2 * light weight WS2812 lib include 2 * Copyright 2017 Mikkel (Duckle29)
3 *
4 * Version 2.3 - Nev 29th 2015
5 * Author: Tim (cpldcpu@gmail.com)
6 *
7 * Please do not change this file! All configuration is handled in "ws2812_config.h"
8 * 3 *
9 * This program is free software: you can redistribute it and/or modify 4 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
@@ -22,24 +17,25 @@
22 17
23#pragma once 18#pragma once
24 19
25#include <avr/io.h>
26#include <avr/interrupt.h>
27
28#include "color.h" 20#include "color.h"
29 21
22#ifndef APA102_DEFAULT_BRIGHTNESS
23# define APA102_DEFAULT_BRIGHTNESS 31
24#endif
25
26#define APA102_MAX_BRIGHTNESS 31
27
28extern uint8_t apa102_led_brightness;
29
30/* User Interface 30/* User Interface
31 * 31 *
32 * Input: 32 * Input:
33 * ledarray: An array of GRB data describing the LED colors 33 * start_led: An array of GRB data describing the LED colors
34 * number_of_leds: The number of LEDs to write 34 * num_leds: The number of LEDs to write
35 * pinmask (optional): Bitmask describing the output bin. e.g. _BV(PB0)
36 * 35 *
37 * The functions will perform the following actions: 36 * The functions will perform the following actions:
38 * - Set the data-out pin as output 37 * - Set the data-out pin as output
39 * - Send out the LED data 38 * - Send out the LED data
40 * - Wait 50�s to reset the LEDs
41 */ 39 */
42 40void apa102_setleds(LED_TYPE *start_led, uint16_t num_leds);
43void apa102_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); 41void apa102_set_brightness(uint8_t brightness);
44void apa102_setleds_pin(LED_TYPE *ledarray, uint16_t number_of_leds, uint8_t pinmask);
45void apa102_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds);
diff --git a/drivers/avr/apa102.c b/drivers/avr/apa102.c
deleted file mode 100644
index 740acb573..000000000
--- a/drivers/avr/apa102.c
+++ /dev/null
@@ -1,96 +0,0 @@
1/*
2 * APA102 lib V1.0a
3 *
4 * Controls APA102 RGB-LEDs
5 * Author: Mikkel (Duckle29 on GitHub)
6 *
7 * Dec 22th, 2017 v1.0a Initial Version
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 */
22
23#include "apa102.h"
24#include <avr/interrupt.h>
25#include <avr/io.h>
26#include <util/delay.h>
27#include "debug.h"
28
29// Setleds for standard RGB
30void inline apa102_setleds(LED_TYPE *ledarray, uint16_t leds) { apa102_setleds_pin(ledarray, leds, _BV(RGB_DI_PIN & 0xF), _BV(RGB_CLK_PIN & 0xF)); }
31
32void static inline apa102_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask_DI, uint8_t pinmask_CLK) {
33 setPinOutput(RGB_DI_PIN);
34 setPinOutput(RGB_CLK_PIN);
35
36 apa102_send_array((uint8_t *)ledarray, leds)
37}
38
39void apa102_send_array(uint8_t *data, uint16_t leds) { // Data is struct of 3 bytes. RGB - leds is number of leds in data
40 apa102_start_frame();
41 while (leds--) {
42 apa102_send_frame(0xFF000000 | (data->b << 16) | (data->g << 8) | data->r);
43 data++;
44 }
45 apa102_end_frame(leds);
46}
47
48void apa102_send_frame(uint32_t frame) {
49 for (uint32_t i = 0xFF; i > 0;) {
50 apa102_send_byte(frame & i);
51 i = i << 8;
52 }
53}
54
55void apa102_start_frame() { apa102_send_frame(0); }
56
57void apa102_end_frame(uint16_t leds) {
58 // This function has been taken from: https://github.com/pololu/apa102-arduino/blob/master/APA102.h
59 // and adapted. The code is MIT licensed. I think thats compatible?
60
61 // We need to send some more bytes to ensure that all the LEDs in the
62 // chain see their new color and start displaying it.
63 //
64 // The data stream seen by the last LED in the chain will be delayed by
65 // (count - 1) clock edges, because each LED before it inverts the clock
66 // line and delays the data by one clock edge. Therefore, to make sure
67 // the last LED actually receives the data we wrote, the number of extra
68 // edges we send at the end of the frame must be at least (count - 1).
69 // For the APA102C, that is sufficient.
70 //
71 // The SK9822 only updates after it sees 32 zero bits followed by one more
72 // rising edge. To avoid having the update time depend on the color of
73 // the last LED, we send a dummy 0xFF byte. (Unfortunately, this means
74 // that partial updates of the beginning of an LED strip are not possible;
75 // the LED after the last one you are trying to update will be black.)
76 // After that, to ensure that the last LED in the chain sees 32 zero bits
77 // and a rising edge, we need to send at least 65 + (count - 1) edges. It
78 // is sufficent and simpler to just send (5 + count/16) bytes of zeros.
79 //
80 // We are ignoring the specification for the end frame in the APA102/SK9822
81 // datasheets because it does not actually ensure that all the LEDs will
82 // start displaying their new colors right away.
83
84 apa102_send_byte(0xFF);
85 for (uint16_t i = 0; i < 5 + leds / 16; i++) {
86 apa102_send_byte(0);
87 }
88}
89
90void apa102_send_byte(uint8_t byte) {
91 uint8_t i;
92 for (i = 0; i < 8; i++) {
93 writePin(RGB_DI_PIN, !!(byte & (1 << (7 - i))));
94 writePinHigh(RGB_CLK_PIN);
95 }
96}
diff --git a/keyboards/handwired/onekey/elite_c/config.h b/keyboards/handwired/onekey/elite_c/config.h
index 167373cd3..02c81ce74 100644
--- a/keyboards/handwired/onekey/elite_c/config.h
+++ b/keyboards/handwired/onekey/elite_c/config.h
@@ -25,5 +25,6 @@
25#define BACKLIGHT_PIN B6 25#define BACKLIGHT_PIN B6
26 26
27#define RGB_DI_PIN F6 27#define RGB_DI_PIN F6
28#define RGB_CI_PIN B1
28 29
29#define ADC_PIN F6 30#define ADC_PIN F6
diff --git a/keyboards/handwired/onekey/keymaps/apa102/config.h b/keyboards/handwired/onekey/keymaps/apa102/config.h
new file mode 100644
index 000000000..aeb22a261
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/apa102/config.h
@@ -0,0 +1,5 @@
1#pragma once
2
3#define RGBLED_NUM 40
4#define APA102_DEFAULT_BRIGHTNESS 5
5#define RGBLIGHT_ANIMATIONS
diff --git a/keyboards/handwired/onekey/keymaps/apa102/keymap.c b/keyboards/handwired/onekey/keymaps/apa102/keymap.c
new file mode 100644
index 000000000..700755a45
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/apa102/keymap.c
@@ -0,0 +1,14 @@
1#include QMK_KEYBOARD_H
2#include "apa102.h" // Only needed if you want to use the global brightness function
3
4const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
5 LAYOUT_ortho_1x1(RGB_MOD)
6};
7
8void keyboard_post_init_user(void) {
9 apa102_set_brightness(5);
10
11 rgblight_enable_noeeprom();
12 rgblight_sethsv_noeeprom_cyan();
13 rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
14}
diff --git a/keyboards/handwired/onekey/keymaps/apa102/rules.mk b/keyboards/handwired/onekey/keymaps/apa102/rules.mk
new file mode 100644
index 000000000..70932cb75
--- /dev/null
+++ b/keyboards/handwired/onekey/keymaps/apa102/rules.mk
@@ -0,0 +1,2 @@
1RGBLIGHT_ENABLE = yes
2RGBLIGHT_DRIVER = APA102
diff --git a/keyboards/handwired/onekey/promicro/config.h b/keyboards/handwired/onekey/promicro/config.h
index 167373cd3..02c81ce74 100644
--- a/keyboards/handwired/onekey/promicro/config.h
+++ b/keyboards/handwired/onekey/promicro/config.h
@@ -25,5 +25,6 @@
25#define BACKLIGHT_PIN B6 25#define BACKLIGHT_PIN B6
26 26
27#define RGB_DI_PIN F6 27#define RGB_DI_PIN F6
28#define RGB_CI_PIN B1
28 29
29#define ADC_PIN F6 30#define ADC_PIN F6
diff --git a/keyboards/handwired/onekey/proton_c/config.h b/keyboards/handwired/onekey/proton_c/config.h
index 3ba4ba649..a364bbee3 100644
--- a/keyboards/handwired/onekey/proton_c/config.h
+++ b/keyboards/handwired/onekey/proton_c/config.h
@@ -28,5 +28,6 @@
28#define BACKLIGHT_PAL_MODE 2 28#define BACKLIGHT_PAL_MODE 2
29 29
30#define RGB_DI_PIN A0 30#define RGB_DI_PIN A0
31#define RGB_CI_PIN B13
31 32
32#define ADC_PIN A0 33#define ADC_PIN A0