diff options
author | Joel Challis <git@zvecr.com> | 2019-10-29 22:53:11 +0000 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-10-29 15:53:11 -0700 |
commit | 64b7cfe735339193ae78fe0f13029b0e027af7a7 (patch) | |
tree | 2fcad9781c786061dae9b4dec7d799f7072ad600 /docs | |
parent | 908aede957a66e65d37601fa67548c369137b57b (diff) |
Refactor ps2avrgb i2c ws2812 to core (#7183)
* Refactor ps2avrgb i2c ws2812 to core
* Refactor jj40 to use ws2812 i2c driver
* Refactor ps2avrgb template to use ws2812 i2c driver
* Add ws2812 stub files
* clang-format and driver config
* Add ws2812 driver docs
* Fix default config values
* Update tmk_core/protocol/vusb/main.c
Co-Authored-By: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/_summary.md | 1 | ||||
-rw-r--r-- | docs/ws2812_driver.md | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/docs/_summary.md b/docs/_summary.md index 65bfa11f09..dc6e88f958 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -98,6 +98,7 @@ * [ISP Flashing Guide](isp_flashing_guide.md) * [ARM Debugging Guide](arm_debugging.md) * [I2C Driver](i2c_driver.md) + * [WS2812 Driver](ws2812_driver.md) * [GPIO Controls](internals_gpio_control.md) * [Proton C Conversion](proton_c_conversion.md) diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md new file mode 100644 index 0000000000..6fa5d324cf --- /dev/null +++ b/docs/ws2812_driver.md @@ -0,0 +1,33 @@ +# WS2812 Driver +This driver powers the [RGB Lighting](feature_rgblight.md) and [RGB Matrix](feature_rgb_matrix.md) features. + +Currently QMK supports the following addressable LEDs on AVR microcontrollers (however, the white LED in RGBW variants is not supported): + + WS2811, WS2812, WS2812B, WS2812C, etc. + SK6812, SK6812MINI, SK6805 + +These LEDs are called "addressable" because instead of using a wire per color, each LED contains a small microchip that understands a special protocol sent over a single wire. The chip passes on the remaining data to the next LED, allowing them to be chained together. In this way, you can easily control the color of the individual LEDs. + +## Driver configuration + +### Bitbang +Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk: + +```make +WS2812_DRIVER = bitbang +``` + +!> ARM does not yet support WS2182. Progress is being made, but we are not quite there, yet. + +### I2C +Targeting boards where WS2812 support is offloaded to a 2nd MCU. Currently the driver is limited to AVR given the known consumers are ps2avrGB/BMC. To configure it, add this to your rules.mk: + +```make +WS2812_DRIVER = i2c +``` + +Configure the hardware via your config.h: +```c +#define WS2812_ADDRESS 0xb0 // default: 0xb0 +#define WS2812_TIMEOUT 100 // default: 100 +``` |