| 1 | /* |
| 2 | * PCA9552 I2C LED blinker registers |
| 3 | * |
| 4 | * Copyright (c) 2017-2018, IBM Corporation. |
| 5 | * |
| 6 | * This work is licensed under the terms of the GNU GPL, version 2 or |
| 7 | * later. See the COPYING file in the top-level directory. |
| 8 | */ |
| 9 | #ifndef PCA9552_REGS_H |
| 10 | #define PCA9552_REGS_H |
| 11 | |
| 12 | /* |
| 13 | * Bits [0:3] are used to address a specific register. |
| 14 | */ |
| 15 | #define PCA9552_INPUT0 0 /* read only input register 0 */ |
| 16 | #define PCA9552_INPUT1 1 /* read only input register 1 */ |
| 17 | #define PCA9552_PSC0 2 /* read/write frequency prescaler 0 */ |
| 18 | #define PCA9552_PWM0 3 /* read/write PWM register 0 */ |
| 19 | #define PCA9552_PSC1 4 /* read/write frequency prescaler 1 */ |
| 20 | #define PCA9552_PWM1 5 /* read/write PWM register 1 */ |
| 21 | #define PCA9552_LS0 6 /* read/write LED0 to LED3 selector */ |
| 22 | #define PCA9552_LS1 7 /* read/write LED4 to LED7 selector */ |
| 23 | #define PCA9552_LS2 8 /* read/write LED8 to LED11 selector */ |
| 24 | #define PCA9552_LS3 9 /* read/write LED12 to LED15 selector */ |
| 25 | |
| 26 | /* |
| 27 | * Bit [4] is used to activate the Auto-Increment option of the |
| 28 | * register address |
| 29 | */ |
| 30 | #define PCA9552_AUTOINC (1 << 4) |
| 31 | |
| 32 | /* PCA9535 Registers (same addresses, different semantics) */ |
| 33 | #define PCA9535_INPUT0 0 /* read only input register 0 */ |
| 34 | #define PCA9535_INPUT1 1 /* read only input register 1 */ |
| 35 | #define PCA9535_OUTPUT0 2 /* read/write output register 0 */ |
| 36 | #define PCA9535_OUTPUT1 3 /* read/write output register 1 */ |
| 37 | #define PCA9535_POLARITY0 4 /* read/write polarity inversion register 0 */ |
| 38 | #define PCA9535_POLARITY1 5 /* read/write polarity inversion register 1 */ |
| 39 | #define PCA9535_CONFIG0 6 /* read/write configuration register 0 */ |
| 40 | #define PCA9535_CONFIG1 7 /* read/write configuration register 1 */ |
| 41 | |
| 42 | #endif |