Skip to content

Commit 32d165c

Browse files
committed
Complete comments for doxygen
1 parent e7a1097 commit 32d165c

File tree

2 files changed

+25
-26
lines changed

2 files changed

+25
-26
lines changed

Adafruit_PWMServoDriver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void Adafruit_PWMServoDriver::setOutputMode(bool totempole) {
200200

201201
/*!
202202
* @brief Reads set Prescale from PCA9685
203-
* @param void
203+
* @return prescale value
204204
*/
205205
uint8_t Adafruit_PWMServoDriver::readPrescale(void)
206206
{

Adafruit_PWMServoDriver.h

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
// REGISTER ADDRESSES
2929
#define PCA9685_MODE1 0x00 /**< Mode Register 1 */
3030
#define PCA9685_MODE2 0x01 /**< Mode Register 2 */
31-
#define PCA9685_SUBADR1 0x02 /**< i2c bus address 1 */
32-
#define PCA9685_SUBADR2 0x03 /**< i2c bus address 2 */
33-
#define PCA9685_SUBADR3 0x04 /**< i2c bus address 3 */
34-
#define PCA9685_ALLCALLADR 0x05
31+
#define PCA9685_SUBADR1 0x02 /**< I2C-bus subaddress 1 */
32+
#define PCA9685_SUBADR2 0x03 /**< I2C-bus subaddress 2 */
33+
#define PCA9685_SUBADR3 0x04 /**< I2C-bus subaddress 3 */
34+
#define PCA9685_ALLCALLADR 0x05 /**< LED All Call I2C-bus address */
3535
#define PCA9685_LED0_ON_L 0x06 /**< LED0 output and brightness control byte 0 */
3636
#define PCA9685_LED0_ON_H 0x07 /**< LED0 output and brightness control byte 1 */
3737
#define PCA9685_LED0_OFF_L 0x08 /**< LED0 output and brightness control byte 2 */
@@ -42,33 +42,32 @@
4242
#define PCA9685_ALLLED_OFF_L 0xFC /**< load all the LEDn_OFF registers, byte 0 */
4343
#define PCA9685_ALLLED_OFF_H 0xFD /**< load all the LEDn_OFF registers, byte 1 */
4444
#define PCA9685_PRESCALE 0xFE /**< Prescaler for PWM output frequency */
45-
#define PCA9685_TESTMODE 0xFF
45+
#define PCA9685_TESTMODE 0xFF /**< defines the test mode to be entered */
4646

4747
// MODE1 bits
48-
#define MODE1_ALLCAL 0x01
49-
#define MODE1_SUB3 0x02
50-
#define MODE1_SUB2 0x04
51-
#define MODE1_SUB1 0x08
52-
#define MODE1_SLEEP 0x10
53-
#define MODE1_AI 0x20
54-
#define MODE1_EXTCLK 0x40
55-
#define MODE1_RESTART 0x80
48+
#define MODE1_ALLCAL 0x01 /**< respond to LED All Call I2C-bus address */
49+
#define MODE1_SUB3 0x02 /**< respond to I2C-bus subaddress 3 */
50+
#define MODE1_SUB2 0x04 /**< respond to I2C-bus subaddress 2 */
51+
#define MODE1_SUB1 0x08 /**< respond to I2C-bus subaddress 1 */
52+
#define MODE1_SLEEP 0x10 /**< Low power mode. Oscillator off */
53+
#define MODE1_AI 0x20 /**< Auto-Increment enabled */
54+
#define MODE1_EXTCLK 0x40 /**< Use EXTCLK pin clock */
55+
#define MODE1_RESTART 0x80 /**< Restart enabled */
5656
// MODE2 bits
57-
#define MODE2_OUTNE_0 0x01
58-
#define MODE2_OUTNE_1 0x02
59-
#define MODE2_OUTDRV 0x04
60-
#define MODE2_OCH 0x08
61-
#define MODE2_INVRT 0x10
57+
#define MODE2_OUTNE_0 0x01 /**< Active LOW output enable input */
58+
#define MODE2_OUTNE_1 0x02 /**< Active LOW output enable input - high impedience */
59+
#define MODE2_OUTDRV 0x04 /**< totem pole structure vs open-drain */
60+
#define MODE2_OCH 0x08 /**< Outputs change on ACK vs STOP */
61+
#define MODE2_INVRT 0x10 /**< Output logic state inverted */
6262

63-
// Default PCA9685 I2C Slave Address if A0-A5 are not set
64-
#define PCA9685_I2C_ADDRESS 0x40
63+
#define PCA9685_I2C_ADDRESS 0x40 /**< Default PCA9685 I2C Slave Address */
6564

66-
#define FREQUENCY_OSCILLATOR 25000000
67-
#define FREQUENCY_CALIBRATED 26075000 // measured 104.3% compared to official 25 MHz
68-
#define FREQUENCY_LEGACY 27777778 // Effect of freq /= 0,9
65+
#define FREQUENCY_OSCILLATOR 25000000 /**< Oscillator frequency cf satasheet */
66+
#define FREQUENCY_CALIBRATED 26075000 /**< Oscillator frequency measured at 104.3% */
67+
#define FREQUENCY_LEGACY 27777778 /**< Oscillator frequency using freq /= 0,9 */
6968

70-
#define PCA9685_PRESCALE_MIN 3
71-
#define PCA9685_PRESCALE_MAX 255
69+
#define PCA9685_PRESCALE_MIN 3 /**< minimum prescale value */
70+
#define PCA9685_PRESCALE_MAX 255 /**< maximum prescale value */
7271

7372
/*!
7473
* @brief Class that stores state and functions for interacting with PCA9685 PWM chip

0 commit comments

Comments
 (0)