Loading...
Searching...
No Matches
pca9633_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
18#ifndef PCA9633_PARAMS_H
19#define PCA9633_PARAMS_H
20
21#include <stdbool.h>
22
23#include "periph/i2c.h"
24
25#include "pca9633_regs.h"
26
27#ifdef __cplusplus
28extern "C"
29{
30#endif
31
36#ifndef PCA9633_PARAM_I2C_DEV
38#define PCA9633_PARAM_I2C_DEV I2C_DEV(0)
39#endif
40
41#ifndef PCA9633_PARAM_I2C_ADDR
43#define PCA9633_PARAM_I2C_ADDR (0xc0 >> 1)
44#endif
45
46#ifndef PCA9633_PARAM_REG_PWM_RED
48#define PCA9633_PARAM_REG_PWM_RED PCA9633_REG_PWM2
49#endif
50
51#ifndef PCA9633_PARAM_REG_PWM_GREEN
53#define PCA9633_PARAM_REG_PWM_GREEN PCA9633_REG_PWM1
54#endif
55
56#ifndef PCA9633_PARAM_REG_PWM_BLUE
58#define PCA9633_PARAM_REG_PWM_BLUE PCA9633_REG_PWM0
59#endif
60
61#ifndef PCA9633_PARAM_REG_PWM_AMBER
63#define PCA9633_PARAM_REG_PWM_AMBER 0
64#endif
65
66#ifndef PCA9633_PARAM_HAS_AMBER_CHANNEL
68#define PCA9633_PARAM_HAS_AMBER_CHANNEL false
69#endif
70
71#ifndef PCA9633_PARAMS
72#define PCA9633_PARAMS \
73 { \
74 .i2c_dev = PCA9633_PARAM_I2C_DEV, \
75 .i2c_addr = PCA9633_PARAM_I2C_ADDR, \
76 .reg_pwm_red = PCA9633_PARAM_REG_PWM_RED, \
77 .reg_pwm_green = PCA9633_PARAM_REG_PWM_GREEN, \
78 .reg_pwm_blue = PCA9633_PARAM_REG_PWM_BLUE, \
79 .reg_pwm_amber = PCA9633_PARAM_REG_PWM_AMBER, \
80 .has_amber_channel = PCA9633_PARAM_HAS_AMBER_CHANNEL \
81 }
82#endif /* PCA9633_PARAMS */
89{
90 PCA9633_PARAMS
91};
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif /* PCA9633_PARAMS_H */
Low-level I2C peripheral driver interface definition.
static const pca9633_params_t pca9633_params[]
Allocate some memory to store the actual configuration.
Register definitions for the PCA9633 I2C PWM controller.
PCA9633 device initialization parameters.
Definition pca9633.h:48