MHVLib  20111227
An efficiency oriented runtime library for AVR microcontrollers
MHV_WS2801 Class Reference

#include <MHV_WS2801.h>

List of all members.

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 ()

Detailed Description

Definition at line 53 of file MHV_WS2801.h.


Constructor & Destructor Documentation

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

Parameters:
bufmemory to buffer the data into
lengththe length of the string of controllers
shifterthe shifter to use to speak to the string

Definition at line 38 of file MHV_WS2801.cpp.


Member Function Documentation

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

Parameters:
forwardstrue 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

Parameters:
redthe red value
bluethe blue value
greenthe 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

Parameters:
valuethe 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

Parameters:
redthe red value
bluethe blue value
greenthe 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

Parameters:
valuethe 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

Parameters:
pixelthe pixel to set
redthe red value
bluethe blue value
greenthe 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

Parameters:
pixelthe pixel to set
valuethe 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

Parameters:
pixelthe pixel to set
redthe red value
bluethe blue value
greenthe 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

Parameters:
pixelthe pixel to set
valuethe value to set

Definition at line 115 of file MHV_WS2801.cpp.


The documentation for this class was generated from the following files: