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
* 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
17
#ifndef PCA9633_REGS_H
18
#define PCA9633_REGS_H
19
20
#include "
bitarithm.h
"
21
22
#ifdef __cplusplus
23
extern
"C"
24
{
25
#endif
26
27
/* Register definitions (page 11, table 7) */
28
32
#define PCA9633_REG_MODE1 0x00
33
37
#define PCA9633_REG_MODE2 0x01
38
42
#define PCA9633_REG_PWM0 0x02
43
47
#define PCA9633_REG_PWM1 0x03
48
52
#define PCA9633_REG_PWM2 0x04
53
57
#define PCA9633_REG_PWM3 0x05
58
62
#define PCA9633_REG_GRPPWM 0x06
63
67
#define PCA9633_REG_GRPFREQ 0x07
68
72
#define PCA9633_REG_LEDOUT 0x08
73
77
#define PCA9633_REG_SUBADR1 0x09
78
82
#define PCA9633_REG_SUBADR2 0x0A
83
87
#define PCA9633_REG_SUBADR3 0x0B
88
92
#define PCA9633_REG_ALLCALLADR 0x0C
93
94
/* Bits in REG_MODE1 (page 12, table 8) */
95
101
#define PCA9633_BIT_AI2 BIT7
102
106
#define PCA9633_BIT_AI1 BIT6
107
111
#define PCA9633_BIT_AI0 BIT5
112
117
#define PCA9633_BIT_SLEEP BIT4
118
123
#define PCA9633_BIT_SUB1 BIT3
124
129
#define PCA9633_BIT_SUB2 BIT2
130
135
#define PCA9633_BIT_SUB3 BIT1
136
141
#define PCA9633_BIT_ALLCALL BIT0
142
143
/* Bits in REG_MODE2 (page 12-13, table 9) */
144
148
#define PCA9633_BIT_DMBLNK BIT5
149
154
#define PCA9633_BIT_INVRT BIT4
155
160
#define PCA9633_BIT_OCH BIT3
161
166
#define PCA9633_BIT_OUTDRV BIT2
167
176
#define PCA9633_BITMASK_OUTNE 0x03
177
178
/* Bits in REG_LEDOUT (page 14, table 13) */
179
183
#define PCA9633_BITMASK_LDR3 0xC0
184
188
#define PCA9633_BITMASK_LDR2 0x30
189
193
#define PCA9633_BITMASK_LDR1 0x0C
194
198
#define PCA9633_BITMASK_LDR0 0x03
199
200
#ifdef __cplusplus
201
}
202
#endif
203
204
#endif
/* PCA9633_REGS_H */
bitarithm.h
Helper functions for bit arithmetic.
Generated on Fri Nov 15 2024 22:46:37 by
1.9.8