linux: Add support for pca9685 i2c pwm devices

Add support for controlling pca9685 PWM drivers using the standard
Linux I2C interface.  The pca9685 device is found on Replicape boards.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-08-06 11:20:12 -04:00
parent d851882278
commit 73a1c9d249
4 changed files with 210 additions and 2 deletions

View file

@ -25,7 +25,7 @@ static struct pollfd main_pfd[2];
#define MP_TTY_IDX 1
// Report 'errno' in a message written to stderr
static void
void
report_errno(char *where, int rc)
{
int e = errno;
@ -37,7 +37,7 @@ report_errno(char *where, int rc)
* Setup
****************************************************************/
static int
int
set_non_blocking(int fd)
{
int flags = fcntl(fd, F_GETFL);