Move the documentation to `doc/plugin/LEDEffect-SolidColor.md`, sources under `src/kaleidoscope/plugin/` (appropriately namespaced). This is in preparation of merging plugins into a single monorepo. Signed-off-by: Gergely Nagy <algernon@keyboard.io>pull/365/head
parent
eb30c1d30d
commit
3a7be52642
@ -0,0 +1,33 @@
|
||||
# Kaleidoscope-LEDEffect-SolidColor
|
||||
|
||||
This plugin provides tools to build LED effects that set the entire keyboard to
|
||||
a single color. For show, and for backlighting purposes.
|
||||
|
||||
## Using the extension
|
||||
|
||||
To use the plugin, include the header, declare an effect using the
|
||||
`kaleidoscope::plugin::LEDSolidColor` class, and tell the firmware to use the
|
||||
new effect:
|
||||
|
||||
```c++
|
||||
#include <Kaleidoscope-LEDEffect-SolidColor.h>
|
||||
|
||||
static kaleidoscope::plugin::LEDSolidColor solidRed(160, 0, 0);
|
||||
|
||||
KALEIDOSCOPE_INIT_PLUGINS(LEDControl, solidRed);
|
||||
|
||||
void setup() {
|
||||
Kaleidoscope.setup();
|
||||
}
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
* [Kaleidoscope-LEDControl](https://github.com/keyboardio/Kaleidoscope-LEDControl)
|
||||
|
||||
## Upgrading
|
||||
|
||||
Previous versions of `LEDEffect-SolidColor` used `kaleidoscope::LEDSolidColor`
|
||||
as a class for defining solid-color effects. This is called
|
||||
`kaleidoscope::plugin::LEDSolidColor` now. The old name still works, but is
|
||||
deprecated, and will be removed by 2019-01-14.
|
@ -0,0 +1,39 @@
|
||||
/* Kaleidoscope-LEDEffect-SolidColor - Solid color LED effects for Kaleidoscope.
|
||||
* Copyright (C) 2017 Keyboard.io, Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Kaleidoscope-LEDControl.h"
|
||||
|
||||
namespace kaleidoscope {
|
||||
namespace plugin {
|
||||
class LEDSolidColor : public LEDMode {
|
||||
public:
|
||||
LEDSolidColor(uint8_t r, uint8_t g, uint8_t b);
|
||||
|
||||
protected:
|
||||
void onActivate(void) final;
|
||||
void refreshAt(byte row, byte col) final;
|
||||
|
||||
private:
|
||||
uint8_t r, g, b;
|
||||
};
|
||||
}
|
||||
|
||||
// Backwards compatibility
|
||||
typedef plugin::LEDSolidColor LEDSolidColor;
|
||||
|
||||
}
|
Loading…
Reference in new issue