Lines Matching +full:off +full:- +full:on +full:- +full:delay +full:- +full:us

4  * SPDX-License-Identifier: Apache-2.0
13 * TLC59731 is a 3-Channel, 8-Bit, PWM LED Driver
14 * With Single-Wire Interface (EasySet)
16 * The EasySet protocol is based on short pulses and the time between
18 * between 1.67us and 50us. We want to go as fast as possible, but
19 * delays under 1us don't work very well, so we settle on 5us for the
21 * A pulse must be high for at least 14ns. In practice, turning a GPIO on
22 * and immediately off again already takes longer than that, so no delay
25 * A one is represented by an additional pulse between 275ns and 2.5us
26 * (half a cycle) after the first one. We need at least some delay to get to
28 * full 1us. After the pulse, we wait an additional T_CYCLE_1 to complete
44 #define TLC59731_DELAY 0x01 /* us */
45 #define TLC59731_T_CYCLE_0 0x04 /* us */
46 #define TLC59731_T_CYCLE_1 0x01 /* us */
99 rgb_write_bit(led_dev, data & BIT((idx--))); in rgb_write_data()
108 const struct tlc59731_cfg *tlc_conf = dev->config; in tlc59731_led_set_color()
109 const struct gpio_dt_spec *led_gpio = &tlc_conf->sdi_gpio; in tlc59731_led_set_color()
112 rgb_write_data(led_gpio, pixel->r); in tlc59731_led_set_color()
113 rgb_write_data(led_gpio, pixel->g); in tlc59731_led_set_color()
114 rgb_write_data(led_gpio, pixel->b); in tlc59731_led_set_color()
137 const struct tlc59731_cfg *config = dev->config; in tlc59731_length()
139 return config->length; in tlc59731_length()
149 const struct tlc59731_cfg *tlc_conf = dev->config; in tlc59731_gpio_init()
150 const struct gpio_dt_spec *led = &tlc_conf->sdi_gpio; in tlc59731_gpio_init()
153 if (!device_is_ready(led->port)) { in tlc59731_gpio_init()
154 LOG_ERR("%s: no LEDs found (DT child nodes missing)", dev->name); in tlc59731_gpio_init()
155 err = -ENODEV; in tlc59731_gpio_init()
161 LOG_ERR("%s: Unable to setup SDI port", dev->name); in tlc59731_gpio_init()
162 err = -EIO; in tlc59731_gpio_init()
168 LOG_ERR("%s: Unable to set the SDI-GPIO)", dev->name); in tlc59731_gpio_init()
169 err = -EIO; in tlc59731_gpio_init()