Skip to content

Commit

Permalink
Merge pull request #42 from sethtroisi/master
Browse files Browse the repository at this point in the history
Add getType() and getPin()
  • Loading branch information
technobly authored Dec 16, 2022
2 parents c77b740 + a588645 commit eed5109
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/neopixel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ Adafruit_NeoPixel::~Adafruit_NeoPixel() {
if (begun) pinMode(pin, INPUT);
}

uint8_t Adafruit_NeoPixel::getPin() const {
return pin;
}

uint8_t Adafruit_NeoPixel::getType() const {
return type;
}

void Adafruit_NeoPixel::updateLength(uint16_t n) {
if (pixels) free(pixels); // Free existing data (if any)

Expand Down
4 changes: 3 additions & 1 deletion src/neopixel.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ class Adafruit_NeoPixel {
clear(void);
uint8_t
*getPixels() const,
getBrightness(void) const;
getBrightness(void) const,
getPin() const,
getType() const;
uint16_t
numPixels(void) const,
getNumLeds(void) const;
Expand Down

0 comments on commit eed5109

Please sign in to comment.