17RpiPCA9685::RpiPCA9685(
int deviceId,
int pinBase,
int frequency):
23 mFileHandler = pca9685Setup(pinBase, deviceId, frequency);
27RpiPCA9685::~RpiPCA9685()
30 if (mFileHandler != 0)
33 pca9685Unset(mFileHandler, mPinBase);
38int RpiPCA9685::PwmRead(
int pin)
41 if (mFileHandler != 0)
44 pca9685PWMRead(mFileHandler, pin, &on, 0);
51void RpiPCA9685::PwmWrite(
int pin,
int value)
54 if (mFileHandler != 0)
57 pca9685FullOn(mFileHandler, pin, 1);
59 pca9685PWMWrite(mFileHandler, pin, 0, value);
61 pca9685FullOff(mFileHandler, pin, 1);
66void RpiPCA9685::Reset()
69 if (mFileHandler != 0)
71 pca9685PWMReset(mFileHandler);
76void RpiPCA9685::SetFrequency(
int frequency)
79 if (mFileHandler != 0)
81 pca9685PWMFreq(mFileHandler, frequency);
86void RpiPCA9685::FullOn(
int pin)
89 if (mFileHandler != 0)
91 pca9685FullOn(mFileHandler, pin, 1);
96void RpiPCA9685::FullOff(
int pin)
99 if (mFileHandler != 0)
101 pca9685FullOff(mFileHandler, pin, 1);