Skip to content

Commit

Permalink
move setOscillatorFrequency() call in begin()
Browse files Browse the repository at this point in the history
  • Loading branch information
caternuson committed Aug 10, 2023
1 parent 032e425 commit 761bc1b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Adafruit_PWMServoDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,16 @@ bool Adafruit_PWMServoDriver::begin(uint8_t prescale) {
if (!i2c_dev->begin())
return false;
reset();

// set the default internal frequency
setOscillatorFrequency(FREQUENCY_OSCILLATOR);

if (prescale) {
setExtClk(prescale);
} else {
// set a default frequency
setPWMFreq(1000);
}
// set the default internal frequency
setOscillatorFrequency(FREQUENCY_OSCILLATOR);

return true;
}
Expand Down

0 comments on commit 761bc1b

Please sign in to comment.