Skip to content

Commit

Permalink
Pca9685 pwm should not subclass I2C (#661)
Browse files Browse the repository at this point in the history
* Remove erroneous use of base class I2C with PCA9685PWM.

I2C base class is for I2C ports in MCUs, not for I2C-connected devices.
  • Loading branch information
RobertPHeller authored Sep 27, 2022
1 parent e40bcd6 commit 8cafeae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/freertos_drivers/common/PCA9685PWM.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,19 @@

#include <fcntl.h>
#include <unistd.h>
#include "stropts.h"
#include "i2c.h"
#include "i2c-dev.h"

#include "I2C.hxx"
#include "PWM.hxx"


#include "os/OS.hxx"

class PCA9685PWMBit;

/// Agragate of 16 PWM channels for a PCA9685PWM
class PCA9685PWM : public I2C, public OSThread
class PCA9685PWM : public OSThread
{
public:
/// maximum number of PWM channels supported by the PCA9685
Expand All @@ -53,8 +56,7 @@ public:

/// Constructor.
PCA9685PWM()
: I2C(name)
, sem_(0)
: sem_(0)
, i2c_(-1)
, dirty_(0)
, i2cAddress_(0)
Expand Down

0 comments on commit 8cafeae

Please sign in to comment.