Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
pca9633_regs.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
15
16
#include "
bitarithm.h
"
17
18
#ifdef __cplusplus
19
extern
"C"
20
{
21
#endif
22
23
/* Register definitions (page 11, table 7) */
24
28
#define PCA9633_REG_MODE1 0x00
29
33
#define PCA9633_REG_MODE2 0x01
34
38
#define PCA9633_REG_PWM0 0x02
39
43
#define PCA9633_REG_PWM1 0x03
44
48
#define PCA9633_REG_PWM2 0x04
49
53
#define PCA9633_REG_PWM3 0x05
54
58
#define PCA9633_REG_GRPPWM 0x06
59
63
#define PCA9633_REG_GRPFREQ 0x07
64
68
#define PCA9633_REG_LEDOUT 0x08
69
73
#define PCA9633_REG_SUBADR1 0x09
74
78
#define PCA9633_REG_SUBADR2 0x0A
79
83
#define PCA9633_REG_SUBADR3 0x0B
84
88
#define PCA9633_REG_ALLCALLADR 0x0C
89
90
/* Bits in REG_MODE1 (page 12, table 8) */
91
97
#define PCA9633_BIT_AI2 BIT7
98
102
#define PCA9633_BIT_AI1 BIT6
103
107
#define PCA9633_BIT_AI0 BIT5
108
113
#define PCA9633_BIT_SLEEP BIT4
114
119
#define PCA9633_BIT_SUB1 BIT3
120
125
#define PCA9633_BIT_SUB2 BIT2
126
131
#define PCA9633_BIT_SUB3 BIT1
132
137
#define PCA9633_BIT_ALLCALL BIT0
138
139
/* Bits in REG_MODE2 (page 12-13, table 9) */
140
144
#define PCA9633_BIT_DMBLNK BIT5
145
150
#define PCA9633_BIT_INVRT BIT4
151
156
#define PCA9633_BIT_OCH BIT3
157
162
#define PCA9633_BIT_OUTDRV BIT2
163
172
#define PCA9633_BITMASK_OUTNE 0x03
173
174
/* Bits in REG_LEDOUT (page 14, table 13) */
175
179
#define PCA9633_BITMASK_LDR3 0xC0
180
184
#define PCA9633_BITMASK_LDR2 0x30
185
189
#define PCA9633_BITMASK_LDR1 0x0C
190
194
#define PCA9633_BITMASK_LDR0 0x03
195
196
#ifdef __cplusplus
197
}
198
#endif
199
bitarithm.h
Helper functions for bit arithmetic.
Generated on Wed Apr 15 2026 11:03:04 by
1.13.2