Lines Matching full:led
11 * @brief LED driver for the PCA9633 I2C LED driver (7-bit slave address 0x62)
15 #include <zephyr/drivers/led.h>
25 /* PCA9633 select registers determine the source that drives LED outputs */
26 #define PCA9633_LED_OFF 0x0 /* LED driver off */
27 #define PCA9633_LED_ON 0x1 /* LED driver on */
56 static int pca9633_led_blink(const struct device *dev, uint32_t led, in pca9633_led_blink() argument
81 LOG_ERR("LED reg write failed"); in pca9633_led_blink()
95 LOG_ERR("LED reg write failed"); in pca9633_led_blink()
104 LOG_ERR("LED reg update failed"); in pca9633_led_blink()
108 /* Select the GRPPWM source to drive the LED output */ in pca9633_led_blink()
111 PCA9633_MASK << (led << 1), in pca9633_led_blink()
112 PCA9633_LED_GRP_PWM << (led << 1))) { in pca9633_led_blink()
113 LOG_ERR("LED reg update failed"); in pca9633_led_blink()
120 static int pca9633_led_set_brightness(const struct device *dev, uint32_t led, in pca9633_led_set_brightness() argument
133 /* Set the LED brightness value */ in pca9633_led_set_brightness()
136 PCA9633_PWM_BASE + led, in pca9633_led_set_brightness()
138 LOG_ERR("LED reg write failed"); in pca9633_led_set_brightness()
142 /* Set the LED driver to be controlled through its PWMx register. */ in pca9633_led_set_brightness()
145 PCA9633_MASK << (led << 1), in pca9633_led_set_brightness()
146 PCA9633_LED_PWM << (led << 1))) { in pca9633_led_set_brightness()
147 LOG_ERR("LED reg update failed"); in pca9633_led_set_brightness()
154 static inline int pca9633_led_on(const struct device *dev, uint32_t led) in pca9633_led_on() argument
158 /* Set LED state to ON */ in pca9633_led_on()
161 PCA9633_MASK << (led << 1), in pca9633_led_on()
162 PCA9633_LED_ON << (led << 1))) { in pca9633_led_on()
163 LOG_ERR("LED reg update failed"); in pca9633_led_on()
170 static inline int pca9633_led_off(const struct device *dev, uint32_t led) in pca9633_led_off() argument
174 /* Set LED state to OFF */ in pca9633_led_off()
177 PCA9633_MASK << (led << 1), in pca9633_led_off()
179 LOG_ERR("LED reg update failed"); in pca9633_led_off()
198 * Take the LED driver out from Sleep mode and disable All Call Address in pca9633_led_init()
207 LOG_ERR("LED reg update failed"); in pca9633_led_init()
219 static DEVICE_API(led, pca9633_led_api) = {