Skip to content

Commit d6ef5ec

Browse files
committed
fix for swaped order of constructor params
1 parent ef1983b commit d6ef5ec

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Adafruit_PWMServoDriver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
/*!
3434
* @brief Instantiates a new PCA9685 PWM driver chip with the I2C address on a
3535
* TwoWire interface
36+
* @param addr The 7-bit I2C address to locate this chip, default is 0x40
3637
* @param i2c A pointer to a 'Wire' compatible object that we'll use to
3738
* communicate with
38-
* @param addr The 7-bit I2C address to locate this chip, default is 0x40
3939
*/
40-
Adafruit_PWMServoDriver::Adafruit_PWMServoDriver(TwoWire *i2c, uint8_t addr) {
40+
Adafruit_PWMServoDriver::Adafruit_PWMServoDriver(uint8_t addr, TwoWire *i2c) {
4141
_i2c = i2c;
4242
_i2caddr = addr;
4343
}

Adafruit_PWMServoDriver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
*/
4949
class Adafruit_PWMServoDriver {
5050
public:
51-
Adafruit_PWMServoDriver(TwoWire *I2C = &Wire, uint8_t addr = 0x40);
51+
Adafruit_PWMServoDriver(uint8_t addr = 0x40, TwoWire *I2C = &Wire);
5252
void begin(uint8_t prescale = 0);
5353
void reset();
5454
void sleep();

0 commit comments

Comments
 (0)