Skip to content

Commit

Permalink
Set backlight and RGB pins for AVR onekeys (#8533)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
fauxpark authored Mar 24, 2020
1 parent 8f69983 commit 297aad6
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 10 deletions.
2 changes: 2 additions & 0 deletions keyboards/handwired/onekey/blackpill_f401/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
#define BACKLIGHT_PWM_CHANNEL 1

#define RGB_DI_PIN A1

#define ADC_PIN A0
2 changes: 2 additions & 0 deletions keyboards/handwired/onekey/blackpill_f411/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
#define BACKLIGHT_PWM_CHANNEL 1

#define RGB_DI_PIN A1

#define ADC_PIN A0
2 changes: 2 additions & 0 deletions keyboards/handwired/onekey/bluepill/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
#define BACKLIGHT_PWM_CHANNEL 1

#define RGB_DI_PIN A1

#define ADC_PIN A0
6 changes: 6 additions & 0 deletions keyboards/handwired/onekey/elite_c/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion keyboards/handwired/onekey/keymaps/adc/config.h

This file was deleted.

4 changes: 0 additions & 4 deletions keyboards/handwired/onekey/keymaps/adc/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
6 changes: 6 additions & 0 deletions keyboards/handwired/onekey/promicro/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 5 additions & 3 deletions keyboards/handwired/onekey/proton_c/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@

#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
#define BACKLIGHT_PWM_DRIVER PWMD4
#define BACKLIGHT_PWM_CHANNEL 3
#define BACKLIGHT_PAL_MODE 2

#define RGB_DI_PIN A1
#define RGB_DI_PIN A0

#define ADC_PIN A0
2 changes: 2 additions & 0 deletions keyboards/handwired/onekey/stm32f0_disco/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@
#define BACKLIGHT_PAL_MODE 0

#define RGB_DI_PIN B15

#define ADC_PIN A0
6 changes: 6 additions & 0 deletions keyboards/handwired/onekey/teensy_2/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 8 additions & 2 deletions keyboards/handwired/onekey/teensy_2pp/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@

#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

0 comments on commit 297aad6

Please sign in to comment.