Commit graph

10 commits

Author SHA1 Message Date
Javad Rahimipetroudi 9d15f6623a driver: led: add support for TI TLC59731 RGB STRIP controller
TLC59731 is a 3-Channel, 8-Bit, PWM LED Driver with
TI Single-Wire interface (EasySet) protocol.

Signed-off-by: Javad Rahimipetroudi <javad.rahimipetroudi@mind.be>
2024-05-21 16:50:24 -04:00
TOKITA Hiroshi 6699d4d4f9 drivers: led_strip: add rpi_pico's PIO based ws2812 driver
Add driver that based on RPI-PICO's PIO feature for ws2812.

This driver can handle WS2812 or compatible LED strips.
The single PIO node can handle up to 4 strips.
Any pins that can be configured for PIO can be used for strips.

I verified the samples/driver/led_ws2812 sample
working with WS2812(144 pcs) led strip using following patches.

- samples/drivers/led_ws2812/boards/rpi_pico.overlay

```
/ {
        aliases {
                led-strip = &ws2812;
        };
};

&pinctrl {
        ws2812_pio0_default: ws2812_pio0_default {
                ws2812 {
                        pinmux = <PIO0_P21>;
                };
        };
};

&pio0 {
        status = "okay";

        pio-ws2812 {
                compatible = "worldsemi,ws2812-rpi_pico-pio";
                status = "okay";
                pinctrl-0 = <&ws2812_pio0_default>;
                pinctrl-names = "default";
                bit-waveform = <3>, <3>, <4>;

                ws2812: ws2812 {
                        status = "okay";
                        output-pin = <21>;
                        chain-length = <144>;
                        color-mapping = <LED_COLOR_ID_GREEN
                                         LED_COLOR_ID_RED
                                         LED_COLOR_ID_BLUE>;
                        reset-delay = <280>;
                        frequency = <800000>;
                };
        };
};

```

- samples/drivers/led_ws2812/boards/rpi_pico.conf

```
CONFIG_WS2812_STRIP_RPI_PICO_PIO=y
```

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-01-10 12:10:36 +01:00
Jonathan Rico f8e5e17246 drivers: led_strip: add WS2812 I2S-based driver
Add a driver implementation that uses the I2S peripheral.
Based off this blog post:
https://electronut.in/nrf52-i2s-ws2812/

Should help with #33505, #29877 and maybe #47780, as there is no garbage
data at the end of transmissions on nRF52832, and no gaps.

Signed-off-by: Jonathan Rico <jonathan@rico.live>
2023-02-24 10:12:47 -08:00
Mikkel Jakobsen 959afcc93a drivers: led_strip: add tlc5971 driver
the tlc5971 driver uses spi for controlling the global brightness
and individiual pixel brightness of a daisy chain of tlc5971
devices.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
2022-03-23 12:50:11 +01:00
Daniel Leung 08a2be839c drivers: led_strip: build as static library
Instead of putting object files inside libzephyr.a,
simply build a separate static library as most other
driver types are doing this already.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-08-17 06:06:03 -04:00
Martí Bolívar 1d2a551c65 drivers: led_strip: modernize and fix up ws2812 drivers/sample
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>
2020-02-05 12:00:36 +01:00
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Johan Hedberg 9639c00fbb drivers: led_strip: Add driver for software-based WS2812B operation
This driver uses a bit-banging based technique of generating a signal
for the WS2812B LED strip. Since bit-banging is very timing sensitive,
where each CPU cycle counts, the driver uses inline assembly to
perform the most critical operataions. This initial version of the
driver only supports a Cortex-M0 implementation, and can e.g. be used
with the ZIP Halo LED strip for the BBC microbit:

https://www.kitronik.co.uk/5625-zip-halo-for-the-bbc-microbit.html

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-03-03 20:46:53 +01:00
Michael Hope 8ee282e319 led_strip: add a APA102 driver.
The APA102 is a RGB LED with integrated controller.  LEDs can be
daisy-chained and use SPI for communication.  The SPI port is
configured via Device Tree.

Tested on the Adafruit Trinket M0.

Signed-off-by: Michael Hope <mlhx@google.com>
2018-02-17 08:53:23 -05:00
Sebastian Bøe 12f8f76165 Introduce cmake-based rewrite of KBuild
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.

Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.

This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.

For users that just want to continue their work with minimal
disruption the following should suffice:

Install CMake 3.8.2+

Port any out-of-tree Makefiles to CMake.

Learn the absolute minimum about the new command line interface:

$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..

$ cd build
$ make

PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00