31 #ifndef PCA9685_PARAM_DEV
33 #define PCA9685_PARAM_DEV I2C_DEV(0)
36 #ifndef PCA9685_PARAM_ADDR
38 #define PCA9685_PARAM_ADDR (PCA9685_I2C_BASE_ADDR + 0)
41 #ifndef PCA9685_PARAM_INV
43 #define PCA9685_PARAM_INV (false)
46 #ifndef PCA9685_PARAM_MODE
48 #define PCA9685_PARAM_MODE (PWM_LEFT)
51 #ifndef PCA9685_PARAM_FREQ
53 #define PCA9685_PARAM_FREQ (100)
56 #ifndef PCA9685_PARAM_RES
58 #define PCA9685_PARAM_RES (4096)
61 #ifndef PCA9685_PARAM_OE_PIN
63 #define PCA9685_PARAM_OE_PIN (GPIO_UNDEF)
66 #ifndef PCA9685_PARAM_EXT_FREQ
68 #define PCA9685_PARAM_EXT_FREQ (0)
71 #ifndef PCA9685_PARAM_OUT_DRV
73 #define PCA9685_PARAM_OUT_DRV (PCA9685_TOTEM_POLE)
76 #ifndef PCA9685_PARAM_OUT_NE
78 #define PCA9685_PARAM_OUT_NE (PCA9685_OFF)
81 #ifndef PCA9685_PARAMS
82 #define PCA9685_PARAMS { \
83 .i2c_dev = PCA9685_PARAM_DEV, \
84 .i2c_addr = PCA9685_PARAM_ADDR, \
85 .inv = PCA9685_PARAM_INV, \
86 .mode = PCA9685_PARAM_MODE, \
87 .freq = PCA9685_PARAM_FREQ, \
88 .res = PCA9685_PARAM_RES, \
89 .ext_freq = PCA9685_PARAM_EXT_FREQ, \
90 .oe_pin = PCA9685_PARAM_OE_PIN, \
91 .out_drv = PCA9685_PARAM_OUT_DRV, \
92 .out_ne = PCA9685_PARAM_OUT_NE, \
96 #ifndef PCA9685_SAUL_PWM_PARAMS
98 #define PCA9685_SAUL_PWM_PARAMS { \
99 .name = "PCA9685-0:0", \
102 .initial = (PCA9685_PARAM_RES >> 1), \
105 .name = "PCA9685-0:1", \
108 .initial = (PCA9685_PARAM_RES >> 2), \
111 .name = "PCA9685-0:1", \
114 .initial = (PCA9685_PARAM_RES >> 3), \
127 #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.