Skip to content

Commit 82effcf

Browse files
author
Charles-Ellison
committed
add documentation
1 parent 72dc6d0 commit 82effcf

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

Adafruit_PWMServoDriverGroup.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,20 @@ Adafruit_PWMServoDriverGroup::Adafruit_PWMServoDriverGroup(
4444
}
4545
}
4646

47-
/* @brief Gets the number of PCA9685 PWM driver chips connected to this class
47+
/*!
48+
* @brief Gets the number of PCA9685 PWM driver chips connected to this class
4849
*/
4950
uint8_t Adafruit_PWMServoDriverGroup::getNumDrivers() { return _nDrivers; }
5051

51-
/* @brief Gets the number of servos associated with each PCA9685 PWM chip
52+
/*!
53+
* @brief Gets the number of servos associated with each PCA9685 PWM chip
5254
*/
5355
uint8_t Adafruit_PWMServoDriverGroup::getNumServosEach() {
5456
return _nServosEach;
5557
}
5658

57-
/* @brief Gets the total number of servos associated with this class
59+
/*!
60+
* @brief Gets the total number of servos associated with this class
5861
*/
5962
uint8_t Adafruit_PWMServoDriverGroup::getNumServos() {
6063
return _nDrivers * _nServosEach;
@@ -205,7 +208,7 @@ uint8_t Adafruit_PWMServoDriverGroup::readPrescale() {
205208
* microseconds, output is not precise
206209
* @param num One of the PWM output pins, from 0 to (nDrivers * nServosEach -
207210
* 1)
208-
* @param Microseconds The number of Microseconds to turn the PWM output ON
211+
* @param microseconds The number of Microseconds to turn the PWM output ON
209212
*/
210213
void Adafruit_PWMServoDriverGroup::writeMicroseconds(uint8_t num,
211214
uint16_t microseconds) {
@@ -235,6 +238,12 @@ void Adafruit_PWMServoDriverGroup::setOscillatorFrequency(uint32_t freq) {
235238
_drivers[i]->setOscillatorFrequency(freq);
236239
}
237240

241+
/*!
242+
* @brief Setter for the internally tracked oscillator used for freq
243+
* calculations
244+
* @param id The id of the PCA9685 chip to set the frequency on
245+
* @param freq The frequency the PCA9685 should use for frequency calculations
246+
*/
238247
void Adafruit_PWMServoDriverGroup::setOscillatorFrequency(uint8_t id,
239248
uint32_t freq) {
240249
_drivers[id]->setOscillatorFrequency(freq);

Adafruit_PWMServoDriverGroup.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
#include "Adafruit_PWMServoDriver.h"
1717

18-
#define PCA9685_I2C_ADDRESS_1 0x40
19-
#define PCA9685_I2C_ADDRESS_2 0x41
20-
#define PCA9685_I2C_ADDRESS_3 0x42
21-
#define PCA9685_I2C_ADDRESS_4 0x43
22-
#define PCA9685_I2C_ADDRESS_5 0x44
18+
#define PCA9685_I2C_ADDRESS_1 0x40 /**< Default PCA9685 I2C Slave Address */
19+
#define PCA9685_I2C_ADDRESS_2 0x41 /**< Second I2C Slave Address */
20+
#define PCA9685_I2C_ADDRESS_3 0x42 /**< Third I2C Slave Address */
21+
#define PCA9685_I2C_ADDRESS_4 0x43 /**< Fourth I2C Slave Address */
22+
#define PCA9685_I2C_ADDRESS_5 0x44 /**< Fifth I2C Slave Address */
2323

2424
/*!
2525
* @brief Class that stores state and functions for interacting with multiple

0 commit comments

Comments
 (0)