diff options
| author | fauxpark <fauxpark@gmail.com> | 2019-09-21 15:11:15 +1000 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-09-20 22:11:15 -0700 |
| commit | 3642a82d37e8c4fb34b9ee60606ab831d642c9ec (patch) | |
| tree | fdfef2b6461519d7c5515308c9ae6bb619b01031 /quantum | |
| parent | c7d0262be7f3bc2c709fd45bd41327433285a11e (diff) | |
| download | qmk_firmware-3642a82d37e8c4fb34b9ee60606ab831d642c9ec.tar.gz qmk_firmware-3642a82d37e8c4fb34b9ee60606ab831d642c9ec.zip | |
Add support for 328P hardware backlight on B1/B2 (#6776)
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/quantum.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index 85a03377f..ec80fa557 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -1104,6 +1104,22 @@ void matrix_scan_quantum() { | |||
| 1104 | # define COMxx1 COM1A1 | 1104 | # define COMxx1 COM1A1 |
| 1105 | # define OCRxx OCR1A | 1105 | # define OCRxx OCR1A |
| 1106 | # endif | 1106 | # endif |
| 1107 | # elif defined(__AVR_ATmega328P__) && (BACKLIGHT_PIN == B1 || BACKLIGHT_PIN == B2) | ||
| 1108 | # define HARDWARE_PWM | ||
| 1109 | # define ICRx ICR1 | ||
| 1110 | # define TCCRxA TCCR1A | ||
| 1111 | # define TCCRxB TCCR1B | ||
| 1112 | # define TIMERx_OVF_vect TIMER1_OVF_vect | ||
| 1113 | # define TIMSKx TIMSK1 | ||
| 1114 | # define TOIEx TOIE1 | ||
| 1115 | |||
| 1116 | # if BACKLIGHT_PIN == B1 | ||
| 1117 | # define COMxx1 COM1A1 | ||
| 1118 | # define OCRxx OCR1A | ||
| 1119 | # elif BACKLIGHT_PIN == B2 | ||
| 1120 | # define COMxx1 COM1B1 | ||
| 1121 | # define OCRxx OCR1B | ||
| 1122 | # endif | ||
| 1107 | # else | 1123 | # else |
| 1108 | # if !defined(BACKLIGHT_CUSTOM_DRIVER) | 1124 | # if !defined(BACKLIGHT_CUSTOM_DRIVER) |
| 1109 | # if !defined(B5_AUDIO) && !defined(B6_AUDIO) && !defined(B7_AUDIO) | 1125 | # if !defined(B5_AUDIO) && !defined(B6_AUDIO) && !defined(B7_AUDIO) |
