PX4 Firmware
PX4 Autopilot Software http://px4.io
PCA9685.h File Reference
#include <inttypes.h>
#include "common.h"
Include dependency graph for PCA9685.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  linux_pwm_out::PCA9685
 Main class that exports features for PCA9685 chip. More...
 

Namespaces

 linux_pwm_out
 

Macros

#define MODE1   0x00
 
#define MODE2   0x01
 
#define SUBADR1   0x02
 
#define SUBADR2   0x03
 
#define SUBADR3   0x04
 
#define ALLCALLADR   0x05
 
#define LED0   0x6
 
#define LED0_ON_L   0x6
 
#define LED0_ON_H   0x7
 
#define LED0_OFF_L   0x8
 
#define LED0_OFF_H   0x9
 
#define LED_MULTIPLYER   4
 
#define ALLLED_ON_L   0xFA
 
#define ALLLED_ON_H   0xFB
 
#define ALLLED_OFF_L   0xFC
 
#define ALLLED_OFF_H   0xFD
 
#define PRE_SCALE   0xFE
 
#define MAX_PWM_RES   4096
 
#define CLOCK_FREQ   25000000.0
 
#define PCA9685_DEFAULT_I2C_ADDR   0x40
 
#define PCA9685_DEFAULT_I2C_BUS   1
 

Macro Definition Documentation

◆ ALLCALLADR

#define ALLCALLADR   0x05

Definition at line 54 of file PCA9685.h.

◆ ALLLED_OFF_H

#define ALLLED_OFF_H   0xFD

Definition at line 64 of file PCA9685.h.

◆ ALLLED_OFF_L

#define ALLLED_OFF_L   0xFC

Definition at line 63 of file PCA9685.h.

◆ ALLLED_ON_H

#define ALLLED_ON_H   0xFB

Definition at line 62 of file PCA9685.h.

◆ ALLLED_ON_L

#define ALLLED_ON_L   0xFA

Definition at line 61 of file PCA9685.h.

◆ CLOCK_FREQ

#define CLOCK_FREQ   25000000.0

Definition at line 67 of file PCA9685.h.

Referenced by linux_pwm_out::PCA9685::setPWMFreq().

◆ LED0

#define LED0   0x6

Definition at line 55 of file PCA9685.h.

◆ LED0_OFF_H

#define LED0_OFF_H   0x9

Definition at line 59 of file PCA9685.h.

Referenced by linux_pwm_out::PCA9685::setPWM().

◆ LED0_OFF_L

#define LED0_OFF_L   0x8

Definition at line 58 of file PCA9685.h.

Referenced by linux_pwm_out::PCA9685::setPWM().

◆ LED0_ON_H

#define LED0_ON_H   0x7

Definition at line 57 of file PCA9685.h.

Referenced by linux_pwm_out::PCA9685::setPWM().

◆ LED0_ON_L

#define LED0_ON_L   0x6

Definition at line 56 of file PCA9685.h.

Referenced by linux_pwm_out::PCA9685::setPWM().

◆ LED_MULTIPLYER

#define LED_MULTIPLYER   4

Definition at line 60 of file PCA9685.h.

Referenced by linux_pwm_out::PCA9685::setPWM().

◆ MAX_PWM_RES

#define MAX_PWM_RES   4096

Definition at line 66 of file PCA9685.h.

Referenced by linux_pwm_out::PCA9685::setPWMFreq().

◆ MODE1

#define MODE1   0x00

Definition at line 49 of file PCA9685.h.

Referenced by linux_pwm_out::PCA9685::reset(), and linux_pwm_out::PCA9685::setPWMFreq().

◆ MODE2

#define MODE2   0x01

Definition at line 50 of file PCA9685.h.

Referenced by linux_pwm_out::PCA9685::reset().

◆ PCA9685_DEFAULT_I2C_ADDR

#define PCA9685_DEFAULT_I2C_ADDR   0x40

Definition at line 68 of file PCA9685.h.

Referenced by linux_pwm_out::PCA9685::PCA9685().

◆ PCA9685_DEFAULT_I2C_BUS

#define PCA9685_DEFAULT_I2C_BUS   1

Definition at line 69 of file PCA9685.h.

Referenced by linux_pwm_out::PCA9685::PCA9685().

◆ PRE_SCALE

#define PRE_SCALE   0xFE

Definition at line 65 of file PCA9685.h.

Referenced by linux_pwm_out::PCA9685::setPWMFreq().

◆ SUBADR1

#define SUBADR1   0x02

Definition at line 51 of file PCA9685.h.

◆ SUBADR2

#define SUBADR2   0x03

Definition at line 52 of file PCA9685.h.

◆ SUBADR3

#define SUBADR3   0x04

Definition at line 53 of file PCA9685.h.