From 6bdcbfb25ae068d9f5351af0f7c6a03385020661 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 18 Jun 2019 12:37:17 +1000 Subject: Fix backlight breathing on C6 (#6102) * Fix backlight breathing on C6 * Account for ATmega32A's single TIMSK register (MT40) * Document hardware PWM on D4 for ATmega32A * Add C6 and D4 to BACKLIGHT_PIN description --- docs/config_options.md | 2 +- docs/feature_backlight.md | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/config_options.md b/docs/config_options.md index f4035809a7..55d25d4c88 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -76,7 +76,7 @@ This is a C header file that is one of the first things included, and will persi * `#define B7_AUDIO` * enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO) * `#define BACKLIGHT_PIN B7` - * pin of the backlight - B5, B6, B7 use PWM, others use softPWM + * pin of the backlight - `B5`, `B6`, `B7` and `C6` (and `D4` on ATmega32A) use hardware PWM, others use software implementation * `#define BACKLIGHT_LEVELS 3` * number of levels your backlight will have (maximum 15 excluding off) * `#define BACKLIGHT_BREATHING` diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index 048d75390d..5a21a67901 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -34,13 +34,14 @@ Hardware PWM is only supported on certain pins of the MCU, so if the backlightin Hardware PWM is supported according to the following table: -| Backlight Pin | Hardware timer | -|---------------|----------------| -|`B5` | Timer 1 | -|`B6` | Timer 1 | -|`B7` | Timer 1 | -|`C6` | Timer 3 | -| other | Software PWM | +| Backlight Pin | Hardware timer | +|---------------|-------------------------| +|`B5` | Timer 1 | +|`B6` | Timer 1 | +|`B7` | Timer 1 | +|`C6` | Timer 3 | +|`D4` | Timer 1 (ATmega32A only)| +| other | Software PWM | The [audio feature](feature_audio.md) also uses hardware timers. Please refer to the following table to know what hardware timer the software PWM will use depending on the audio configuration: -- cgit v1.2.3