Driver for W2812 full-color LED lights.
More...
|
|
#define | w_zeropulse (350) |
| |
|
#define | w_onepulse (900) |
| |
|
#define | w_totalperiod (1250) |
| |
|
#define | w_fixedlow (3) |
| |
|
#define | w_fixedhigh (6) |
| |
|
#define | w_fixedtotal (10) |
| |
|
#define | w_zerocycles ( ( (F_CPU / 1000) * w_zeropulse) / 1000000) |
| |
|
#define | w_onecycles ( ( (F_CPU / 1000) * w_onepulse + 500000) / 1000000) |
| |
|
#define | w_totalcycles ( ( (F_CPU / 1000) * w_totalperiod + 500000) / 1000000) |
| |
|
#define | w1 (w_zerocycles - w_fixedlow) |
| |
|
#define | w2 (w_onecycles - w_fixedhigh - w1) |
| |
|
#define | w3 (w_totalcycles - w_fixedtotal - w1 - w2) |
| |
|
#define | w1_nops 0 |
| |
|
#define | w_lowtime ( (w1_nops + w_fixedlow) * 1000000) / (F_CPU / 1000) |
| |
|
#define | w2_nops 0 |
| |
|
#define | w3_nops 0 |
| |
|
#define | w_nop1 "nop \n\t" |
| |
|
#define | w_nop2 "rjmp .+0 \n\t" |
| |
|
#define | w_nop4 w_nop2 w_nop2 |
| |
|
#define | w_nop8 w_nop4 w_nop4 |
| |
|
#define | w_nop16 w_nop8 w_nop8 |
| |
Driver for W2812 full-color LED lights.
- Author
- MakeBlock
- Version
- V1.0.2
- Date
- 2017/06/23
- Copyright
- This software is Copyright (C), 2014-2018, MakeBlock. Use is subject to license
conditions. The main licensing options available are GPL V2 or Commercial:
- Open Source Licensing GPL V2
- This is the appropriate option if you want to share the source code of your
application with everyone you distribute it to, and you also want to give them
the right to share who uses it. If you wish to use this software under Open
Source Licensing, you must contribute all your source code to the open source
community in accordance with the GPL Version 2 when your application is
distributed. See http://www.gnu.org/copyleft/gpl.html
- Description
- This file is a drive for WS2811/2812 full-color LED lights, It supports W2812B full-color LED lights device provided by the MakeBlock.
- Method List:
- void MeRGBLed::reset(uint8_t port)
- void MeRGBLed::reset(uint8_t port,uint8_t slot)
- void MeRGBLed::setpin(uint8_t port)
- uint8_t MeRGBLed::getNumber()
- cRGB MeRGBLed::getColorAt(uint8_t index)
- void MeRGBLed::fillPixelsBak(uint8_t red, uint8_t green, uint8_t blue)
- bool MeRGBLed::setColorAt(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)
- bool MeRGBLed::setColor(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)
- bool MeRGBLed::setColor(uint8_t red, uint8_t green, uint8_t blue)
- bool MeRGBLed::setColor(uint8_t index, long value)
- void MeRGBLed::show()
- History:
`<Author>` `<Time>` `<Version>` `<Descr>`
Mark Yan 2015/09/01 1.0.0 Rebuild the old lib.
Scott 2016/09/20 1.0.1 Add a delay.
Mark Yan 2017/06/23 1.0.2 Add function fillPixelsBak.