Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
lp503x.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Seagate Technology LLC
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7
8#ifndef ZEPHYR_INCLUDE_DRIVERS_LED_LP503X_H_
9#define ZEPHYR_INCLUDE_DRIVERS_LED_LP503X_H_
10
11#define LP503X_MAX_LEDS 12
12#define LP503X_COLORS_PER_LED 3
13
14/*
15 * LED channels mapping.
16 */
17
18#define LP503X_NUM_CHANNELS 52
19
20/* Bank channels. */
21#define LP503X_BANK_CHAN_BASE 0
22#define LP503X_BANK_BRIGHT_CHAN LP503X_BANK_CHAN_BASE
23#define LP503X_BANK_COL1_CHAN(led) (LP503X_BANK_CHAN_BASE + 1)
24#define LP503X_BANK_COL2_CHAN(led) (LP503X_BANK_CHAN_BASE + 2)
25#define LP503X_BANK_COL3_CHAN(led) (LP503X_BANK_CHAN_BASE + 3)
26
27/* LED brightness channels. */
28#define LP503X_LED_BRIGHT_CHAN_BASE 4
29#define LP503X_LED_BRIGHT_CHAN(led) (LP503X_LED_BRIGHT_CHAN_BASE + led)
30
31/* LED color channels. */
32#define LP503X_LED_COL_CHAN_BASE 16
33#define LP503X_LED_COL1_CHAN(led) (LP503X_LED_COL_CHAN_BASE + \
34 led * LP503X_COLORS_PER_LED)
35#define LP503X_LED_COL2_CHAN(led) (LP503X_LED_COL_CHAN_BASE + \
36 led * LP503X_COLORS_PER_LED + 1)
37#define LP503X_LED_COL3_CHAN(led) (LP503X_LED_COL_CHAN_BASE + \
38 led * LP503X_COLORS_PER_LED + 2)
39
40#endif /* ZEPHYR_INCLUDE_DRIVERS_LED_LP503X_H_ */