28#ifndef PCA9685_PARAM_DEV
30#define PCA9685_PARAM_DEV I2C_DEV(0)
33#ifndef PCA9685_PARAM_ADDR
35#define PCA9685_PARAM_ADDR (PCA9685_I2C_BASE_ADDR + 0)
38#ifndef PCA9685_PARAM_INV
40#define PCA9685_PARAM_INV (false)
43#ifndef PCA9685_PARAM_MODE
45#define PCA9685_PARAM_MODE (PWM_LEFT)
48#ifndef PCA9685_PARAM_FREQ
50#define PCA9685_PARAM_FREQ (100)
53#ifndef PCA9685_PARAM_RES
55#define PCA9685_PARAM_RES (4096)
58#ifndef PCA9685_PARAM_OE_PIN
60#define PCA9685_PARAM_OE_PIN (GPIO_UNDEF)
63#ifndef PCA9685_PARAM_EXT_FREQ
65#define PCA9685_PARAM_EXT_FREQ (0)
68#ifndef PCA9685_PARAM_OUT_DRV
70#define PCA9685_PARAM_OUT_DRV (PCA9685_TOTEM_POLE)
73#ifndef PCA9685_PARAM_OUT_NE
75#define PCA9685_PARAM_OUT_NE (PCA9685_OFF)
79#define PCA9685_PARAMS { \
80 .i2c_dev = PCA9685_PARAM_DEV, \
81 .i2c_addr = PCA9685_PARAM_ADDR, \
82 .inv = PCA9685_PARAM_INV, \
83 .mode = PCA9685_PARAM_MODE, \
84 .freq = PCA9685_PARAM_FREQ, \
85 .res = PCA9685_PARAM_RES, \
86 .ext_freq = PCA9685_PARAM_EXT_FREQ, \
87 .oe_pin = PCA9685_PARAM_OE_PIN, \
88 .out_drv = PCA9685_PARAM_OUT_DRV, \
89 .out_ne = PCA9685_PARAM_OUT_NE, \
93#ifndef PCA9685_SAUL_PWM_PARAMS
95#define PCA9685_SAUL_PWM_PARAMS { \
96 .name = "PCA9685-0:0", \
99 .initial = (PCA9685_PARAM_RES >> 1), \
102 .name = "PCA9685-0:1", \
105 .initial = (PCA9685_PARAM_RES >> 2), \
108 .name = "PCA9685-0:1", \
111 .initial = (PCA9685_PARAM_RES >> 3), \
124#if MODULE_SAUL || DOXYGEN
static const pca9685_saul_pwm_params_t pca9685_saul_pwm_params[]
Additional meta information to keep in the SAUL registry.
#define PCA9685_SAUL_PWM_PARAMS
Example for mapping PWM channels to SAUL.
static const pca9685_params_t pca9685_params[]
Allocate some memory to store the actual configuration.
SAUL registry interface definition.
PCA9685 device initialization parameters.
PCA9685 configuration structure for mapping PWM channels to SAUL.