Skip to content

Commit

Permalink
Docs: Add Usage section to backlight docs (qmk#3537)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored and yamad committed Mar 21, 2019
1 parent 1e679df commit b1dc315
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions docs/feature_backlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ Many keyboards support backlit keys by way of individual LEDs placed through or

The MCU can only supply so much current to its GPIO pins. Instead of powering the backlight directly from the MCU, the backlight pin is connected to a transistor or MOSFET that switches the power to the LEDs.

## Caveats
## Usage

This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously use multiple different coloured LEDs on a keyboard.
Most keyboards have backlighting enabled by default if they support it, but if it is not working for you, check that your `rules.mk` includes the following:

Hardware PWM is only supported on certain pins of the MCU, so if the backlighting is not connected to one of them, a software implementation will be used, and backlight breathing will not be available. Currently the supported pins are `B5`, `B6`, `B7`, and `C6`.
```make
BACKLIGHT_ENABLE = yes
```

You should then be able to use the keycodes below to change the backlight level.

## Keycodes

Expand All @@ -22,6 +26,12 @@ Hardware PWM is only supported on certain pins of the MCU, so if the backlightin
|`BL_DEC` |Decrease the backlight level |
|`BL_BRTG`|Toggle backlight breathing |

## Caveats

This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously use multiple different coloured LEDs on a keyboard.

Hardware PWM is only supported on certain pins of the MCU, so if the backlighting is not connected to one of them, a software implementation will be used, and backlight breathing will not be available. Currently the supported pins are `B5`, `B6`, `B7`, and `C6`.

## Configuration

To change the behaviour of the backlighting, `#define` these in your `config.h`:
Expand Down

0 comments on commit b1dc315

Please sign in to comment.