Loading...
Searching...
No Matches
pca9633_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include <stdbool.h>
19
20#include "periph/i2c.h"
21
22#include "pca9633_regs.h"
23
24#ifdef __cplusplus
25extern "C"
26{
27#endif
28
33#ifndef PCA9633_PARAM_I2C_DEV
35#define PCA9633_PARAM_I2C_DEV I2C_DEV(0)
36#endif
37
38#ifndef PCA9633_PARAM_I2C_ADDR
40#define PCA9633_PARAM_I2C_ADDR (0xc0 >> 1)
41#endif
42
43#ifndef PCA9633_PARAM_REG_PWM_RED
45#define PCA9633_PARAM_REG_PWM_RED PCA9633_REG_PWM2
46#endif
47
48#ifndef PCA9633_PARAM_REG_PWM_GREEN
50#define PCA9633_PARAM_REG_PWM_GREEN PCA9633_REG_PWM1
51#endif
52
53#ifndef PCA9633_PARAM_REG_PWM_BLUE
55#define PCA9633_PARAM_REG_PWM_BLUE PCA9633_REG_PWM0
56#endif
57
58#ifndef PCA9633_PARAM_REG_PWM_AMBER
60#define PCA9633_PARAM_REG_PWM_AMBER 0
61#endif
62
63#ifndef PCA9633_PARAM_HAS_AMBER_CHANNEL
65#define PCA9633_PARAM_HAS_AMBER_CHANNEL false
66#endif
67
68#ifndef PCA9633_PARAMS
69#define PCA9633_PARAMS \
70 { \
71 .i2c_dev = PCA9633_PARAM_I2C_DEV, \
72 .i2c_addr = PCA9633_PARAM_I2C_ADDR, \
73 .reg_pwm_red = PCA9633_PARAM_REG_PWM_RED, \
74 .reg_pwm_green = PCA9633_PARAM_REG_PWM_GREEN, \
75 .reg_pwm_blue = PCA9633_PARAM_REG_PWM_BLUE, \
76 .reg_pwm_amber = PCA9633_PARAM_REG_PWM_AMBER, \
77 .has_amber_channel = PCA9633_PARAM_HAS_AMBER_CHANNEL \
78 }
79#endif /* PCA9633_PARAMS */
81
86{
87 PCA9633_PARAMS
88};
89
90#ifdef __cplusplus
91}
92#endif
93
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:47