Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: led_strip: modernize ws2812 drivers #20393

Merged
merged 1 commit into from
Dec 11, 2019

Commits on Dec 4, 2019

  1. 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>
    mbolivar-nordic committed Dec 4, 2019
    Configuration menu
    Copy the full SHA
    0c860c7 View commit details
    Browse the repository at this point in the history