|
MHVLib
20111227
An efficiency oriented runtime library for AVR microcontrollers
|
#include <MHV_WS2801.h>
Public Member Functions | |
| MHV_WS2801 (MHV_RGB buf[], uint16_t length, MHV_Shifter &shifter) | |
| void | setPixel (uint16_t pixel, uint8_t red, uint8_t green, uint8_t blue) |
| void | setPixel (uint16_t pixel, MHV_RGB *value) |
| void | setAll (uint8_t red, uint8_t green, uint8_t blue) |
| void | setAll (MHV_RGB *value) |
| void | setPixelGamma (uint16_t pixel, uint8_t red, uint8_t green, uint8_t blue) |
| void | setPixelGamma (uint16_t pixel, MHV_RGB *value) |
| void | setAllGamma (uint8_t red, uint8_t green, uint8_t blue) |
| void | setAllGamma (MHV_RGB *value) |
| void | rotate (bool forwards) |
| void | flush () |
Definition at line 53 of file MHV_WS2801.h.
| MHV_WS2801::MHV_WS2801 | ( | MHV_RGB | buf[], |
| uint16_t | length, | ||
| MHV_Shifter & | shifter | ||
| ) |
Create a new driver for a string of WS2801 chips See the datasheet at: http://www.adafruit.com/datasheets/WS2801.pdf
| buf | memory to buffer the data into |
| length | the length of the string of controllers |
| shifter | the shifter to use to speak to the string |
Definition at line 38 of file MHV_WS2801.cpp.
| void MHV_WS2801::flush | ( | ) |
Write the current buffer to the string of chips
Definition at line 159 of file MHV_WS2801.cpp.
| void MHV_WS2801::rotate | ( | bool | forwards | ) |
Rotate the string by 1 pixel
| forwards | true for forwards, false for backwards |
Definition at line 167 of file MHV_WS2801.cpp.
| void MHV_WS2801::setAll | ( | uint8_t | red, |
| uint8_t | green, | ||
| uint8_t | blue | ||
| ) |
Set the strip to a particular value
| red | the red value |
| blue | the blue value |
| green | the green value |
Definition at line 73 of file MHV_WS2801.cpp.
| void MHV_WS2801::setAll | ( | MHV_RGB * | value | ) |
Set the strip to a particular value
| value | the value to set |
Definition at line 89 of file MHV_WS2801.cpp.
| void MHV_WS2801::setAllGamma | ( | uint8_t | red, |
| uint8_t | green, | ||
| uint8_t | blue | ||
| ) |
Set the strip to a gamma corrected value
| red | the red value |
| blue | the blue value |
| green | the green value |
Definition at line 129 of file MHV_WS2801.cpp.
| void MHV_WS2801::setAllGamma | ( | MHV_RGB * | value | ) |
Set the strip to a gamma corrected value
| value | the value to set |
Definition at line 145 of file MHV_WS2801.cpp.
| void MHV_WS2801::setPixel | ( | uint16_t | pixel, |
| uint8_t | red, | ||
| uint8_t | green, | ||
| uint8_t | blue | ||
| ) |
Set a pixel to a particular value
| pixel | the pixel to set |
| red | the red value |
| blue | the blue value |
| green | the green value |
Definition at line 50 of file MHV_WS2801.cpp.
| void MHV_WS2801::setPixel | ( | uint16_t | pixel, |
| MHV_RGB * | value | ||
| ) |
Set a pixel to a particular value
| pixel | the pixel to set |
| value | the value to set |
Definition at line 63 of file MHV_WS2801.cpp.
| void MHV_WS2801::setPixelGamma | ( | uint16_t | pixel, |
| uint8_t | red, | ||
| uint8_t | green, | ||
| uint8_t | blue | ||
| ) |
Set a pixel to a gamma corrected value
| pixel | the pixel to set |
| red | the red value |
| blue | the blue value |
| green | the green value |
Definition at line 102 of file MHV_WS2801.cpp.
| void MHV_WS2801::setPixelGamma | ( | uint16_t | pixel, |
| MHV_RGB * | value | ||
| ) |
Set a pixel to a gamma corrected value
| pixel | the pixel to set |
| value | the value to set |
Definition at line 115 of file MHV_WS2801.cpp.