ws2812b sample firmware.

Dependencies:   BurstSPI

Dependents:   mbed_ws2812b mbed_ws2812b

Fork of PixelArray by Jacob Bramley

neopixel-spi.h

Committer:
JacobBramley
Date:
2014-07-24
Revision:
0:38eeab21a162

File content as of revision 0:38eeab21a162:

#ifndef NEOPIXEL_SPI
#define NEOPIXEL_SPI

#include <stdint.h>
#include "mbed.h"
#include "BurstSPI.h"

namespace neopixel {

struct Pixel {
  uint8_t red;
  uint8_t green;
  uint8_t blue;
};

// Drive a chain of NeoPixels. The 'count' parameter specifies the length of the chain.
class Array {
 public:
  Array(PinName out);
  
  void Update(Pixel buffer[], size_t length);

 private:
  BurstSPI spi_;
};

}

#endif