Skip to content

Commit

Permalink
Merge pull request #12 from jjinno/master
Browse files Browse the repository at this point in the history
Addition of NeoPixel Destructor
  • Loading branch information
PaintYourDragon committed Sep 24, 2013
2 parents 0fd4d57 + 5d92ea1 commit 4aa6b34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Adafruit_NeoPixel.cpp
Expand Up @@ -44,6 +44,11 @@ Adafruit_NeoPixel::Adafruit_NeoPixel(uint16_t n, uint8_t p, uint8_t t) : numLEDs
}
}

Adafruit_NeoPixel::~Adafruit_NeoPixel()
{
if (pixels != NULL) free(pixels);
}

#ifdef __MK20DX128__ // Teensy 3.0
static inline void delayShort(uint32_t) __attribute__((always_inline, unused));
static inline void delayShort(uint32_t num) {
Expand Down
1 change: 1 addition & 0 deletions Adafruit_NeoPixel.h
Expand Up @@ -40,6 +40,7 @@ class Adafruit_NeoPixel {

// Constructor: number of LEDs, pin number, LED type
Adafruit_NeoPixel(uint16_t n, uint8_t p=6, uint8_t t=NEO_GRB + NEO_KHZ800);
~Adafruit_NeoPixel();

void
begin(void),
Expand Down

0 comments on commit 4aa6b34

Please sign in to comment.