Skip to content

Commit

Permalink
Fix types for pin
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeshub committed Jul 28, 2019
1 parent af3c295 commit 61b0306
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Adafruit_NeoPixel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
pixel.
@return Adafruit_NeoPixel object. Call the begin() function before use.
*/
Adafruit_NeoPixel::Adafruit_NeoPixel(uint16_t n, unit16_t p, neoPixelType t) :
Adafruit_NeoPixel::Adafruit_NeoPixel(uint16_t n, uint16_t p, neoPixelType t) :
begun(false), brightness(0), pixels(NULL), endTime(0) {
updateType(t);
updateLength(n);
Expand Down Expand Up @@ -2114,7 +2114,7 @@ void Adafruit_NeoPixel::show(void) {
if any, is set to INPUT and the new pin is set to OUTPUT.
@param p Arduino pin number (-1 = no pin).
*/
void Adafruit_NeoPixel::setPin(unit16_t p) {
void Adafruit_NeoPixel::setPin(uint16_t p) {
if(begun && (pin >= 0)) pinMode(pin, INPUT);
pin = p;
if(begun) {
Expand Down
8 changes: 4 additions & 4 deletions Adafruit_NeoPixel.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,14 @@ class Adafruit_NeoPixel {
public:

// Constructor: number of LEDs, pin number, LED type
Adafruit_NeoPixel(uint16_t n, unit16_t pin=6,
Adafruit_NeoPixel(uint16_t n, uint16_t pin=6,
neoPixelType type=NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel(void);
~Adafruit_NeoPixel();

void begin(void);
void show(void);
void setPin(unit16_t p);
void setPin(uint16_t p);
void setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b);
void setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b,
uint8_t w);
Expand Down Expand Up @@ -246,7 +246,7 @@ class Adafruit_NeoPixel {
@brief Retrieve the pin number used for NeoPixel data output.
@return Arduino pin number (-1 if not set).
*/
int8_t getPin(void) const { return pin; };
int16_t getPin(void) const { return pin; };
/*!
@brief Return the number of pixels in an Adafruit_NeoPixel strip object.
@return Pixel count (0 if not set).
Expand Down Expand Up @@ -334,7 +334,7 @@ class Adafruit_NeoPixel {
boolean begun; ///< true if begin() previously called
uint16_t numLEDs; ///< Number of RGB LEDs in strip
uint16_t numBytes; ///< Size of 'pixels' buffer below
int8_t pin; ///< Output pin number (-1 if not yet set)
int16_t pin; ///< Output pin number (-1 if not yet set)
uint8_t brightness; ///< Strip brightness 0-255 (stored as +1)
uint8_t *pixels; ///< Holds LED color values (3 or 4 bytes each)
uint8_t rOffset; ///< Red index within each 3- or 4-byte pixel
Expand Down

0 comments on commit 61b0306

Please sign in to comment.