Set backlight and RGB pins for AVR onekeys (#8533)
authorRyan <fauxpark@gmail.com>
Tue, 24 Mar 2020 03:32:23 +0000 (14:32 +1100)
committerGitHub <noreply@github.com>
Tue, 24 Mar 2020 03:32:23 +0000 (03:32 +0000)
* Set backlight and RGB pins for AVR onekeys

* Set pin for ADC as well

* Define ADC_PIN for F4 blackpills

* Use A0 for F4 ADCs

* Set ADC pins for F0 and F1

keyboards/handwired/onekey/blackpill_f401/config.h
keyboards/handwired/onekey/blackpill_f411/config.h
keyboards/handwired/onekey/bluepill/config.h
keyboards/handwired/onekey/elite_c/config.h
keyboards/handwired/onekey/keymaps/adc/config.h [deleted file]
keyboards/handwired/onekey/keymaps/adc/keymap.c
keyboards/handwired/onekey/promicro/config.h
keyboards/handwired/onekey/proton_c/config.h
keyboards/handwired/onekey/stm32f0_disco/config.h
keyboards/handwired/onekey/teensy_2/config.h
keyboards/handwired/onekey/teensy_2pp/config.h

index 01555e4..c616638 100644 (file)
@@ -27,3 +27,5 @@
 #define BACKLIGHT_PWM_CHANNEL   1
 
 #define RGB_DI_PIN A1
+
+#define ADC_PIN A0
index 01555e4..c616638 100644 (file)
@@ -27,3 +27,5 @@
 #define BACKLIGHT_PWM_CHANNEL   1
 
 #define RGB_DI_PIN A1
+
+#define ADC_PIN A0
index 01555e4..c616638 100644 (file)
@@ -27,3 +27,5 @@
 #define BACKLIGHT_PWM_CHANNEL   1
 
 #define RGB_DI_PIN A1
+
+#define ADC_PIN A0
index fbcd630..167373c 100644 (file)
@@ -21,3 +21,9 @@
 #define MATRIX_COL_PINS { F4 }
 #define MATRIX_ROW_PINS { F5 }
 #define UNUSED_PINS
+
+#define BACKLIGHT_PIN B6
+
+#define RGB_DI_PIN F6
+
+#define ADC_PIN F6
diff --git a/keyboards/handwired/onekey/keymaps/adc/config.h b/keyboards/handwired/onekey/keymaps/adc/config.h
deleted file mode 100644 (file)
index 6f70f09..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#pragma once
index c5294bb..6626894 100644 (file)
@@ -2,10 +2,6 @@
 #include "analog.h"
 #include <stdio.h>
 
-#ifndef ADC_PIN
-#    define ADC_PIN A0
-#endif
-
 enum custom_keycodes {
     ADC_SAMPLE = SAFE_RANGE,
 };
index fbcd630..167373c 100644 (file)
@@ -21,3 +21,9 @@
 #define MATRIX_COL_PINS { F4 }
 #define MATRIX_ROW_PINS { F5 }
 #define UNUSED_PINS
+
+#define BACKLIGHT_PIN B6
+
+#define RGB_DI_PIN F6
+
+#define ADC_PIN F6
index fe34f94..3ba4ba6 100644 (file)
@@ -18,8 +18,8 @@
 
 #include "config_common.h"
 
-#define MATRIX_COL_PINS { A3 }
-#define MATRIX_ROW_PINS { A2 }
+#define MATRIX_COL_PINS { A2 }
+#define MATRIX_ROW_PINS { A1 }
 #define UNUSED_PINS
 
 #define BACKLIGHT_PIN           B8
@@ -27,4 +27,6 @@
 #define BACKLIGHT_PWM_CHANNEL   3
 #define BACKLIGHT_PAL_MODE      2
 
-#define RGB_DI_PIN A1
+#define RGB_DI_PIN A0
+
+#define ADC_PIN A0
index 637ed65..0d6dd18 100644 (file)
@@ -28,3 +28,5 @@
 #define BACKLIGHT_PAL_MODE      0
 
 #define RGB_DI_PIN B15
+
+#define ADC_PIN A0
index fbcd630..167373c 100644 (file)
@@ -21,3 +21,9 @@
 #define MATRIX_COL_PINS { F4 }
 #define MATRIX_ROW_PINS { F5 }
 #define UNUSED_PINS
+
+#define BACKLIGHT_PIN B6
+
+#define RGB_DI_PIN F6
+
+#define ADC_PIN F6
index 9d99398..167373c 100644 (file)
 
 #include "config_common.h"
 
-#define MATRIX_COL_PINS { B2 }
-#define MATRIX_ROW_PINS { B1 }
+#define MATRIX_COL_PINS { F4 }
+#define MATRIX_ROW_PINS { F5 }
 #define UNUSED_PINS
+
+#define BACKLIGHT_PIN B6
+
+#define RGB_DI_PIN F6
+
+#define ADC_PIN F6