1d2a551c65
Convert the GPIO based driver to the new GPIO API. (Only the gpio_configure() call is affected). Move configuration to DT where appropriate for both SPI and GPIO drivers, only leaving the SPI vs. GPIO decision in Kconfig (in addition to the basic enable for the driver.) Move some files around to clean up as a result of this change. led_ws2812 sample changes: - make the pattern easier to look at by emitting less light - use led_strip alias from DT to get strip device, allocate appropriate struct led_rgb buffer, etc. - move the pins around and remove 96b_carbon support (I have no board to test with) GPIO driver specific changes: - str is required to write OUTSET/OUTCLR, not strb. The registers are word-sized. - the str[b] registers must all be in r0-r7, so "l" is the correct GCC inline assembly constraint for both "base" and "pin" SPI driver specific changes: - match the GPIO driver in not supporting the update_channels API method, which never made sense for this type of strip - return -ENOMEM when the user tries to send more pixel data than we have buffer space for instead of -EINVAL Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
37 lines
910 B
Plaintext
37 lines
910 B
Plaintext
# Top-level configuration file for LED strip drivers.
|
|
|
|
# Copyright (c) 2017 Linaro Limited
|
|
# Copyright (c) 2018 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
menuconfig LED_STRIP
|
|
bool "LED strip drivers"
|
|
help
|
|
Include LED strip drivers in the system configuration.
|
|
|
|
if LED_STRIP
|
|
|
|
module = LED_STRIP
|
|
module-str = LED strip
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
config LED_STRIP_INIT_PRIORITY
|
|
int "LED strip initialization priority"
|
|
default 90
|
|
help
|
|
System initialization priority for LED strip drivers.
|
|
|
|
# Hidden option. The extra byte enables efficient serialization and transmission
|
|
# for drivers which require 4 B on wire for every 3 B of color, e.g. APA102, but
|
|
# is not normally needed.
|
|
config LED_STRIP_RGB_SCRATCH
|
|
bool
|
|
|
|
source "drivers/led_strip/Kconfig.lpd880x"
|
|
|
|
source "drivers/led_strip/Kconfig.ws2812"
|
|
|
|
source "drivers/led_strip/Kconfig.apa102"
|
|
|
|
endif # LED_STRIP
|