Swatantra-66 opened a new pull request, #21338:
URL: https://github.com/apache/nuttx/pull/21338

   ## Summary
   
   This patch series adds platform-specific driver for WS2812 RGB LED to AVR 
DA/DB architecture. RGB data is transmitted using USART peripheral but the 
driver is designed to allow other peripherals to be supported if needed. In 
addition, there are some fixes for issues discovered when working with existing 
code - USART control in architecture code and some cleanups in the WS2812 
driver upper half.
   
   Breadxavr board is updated to provide example configuration that compiles 
ws2812 program from nuttx-apps to showcase the LEDs.
   
   This series continues the AVR DA/DB peripheral modernization work started in 
#20677 (Step 1), #20706 (Step 2: Zero-latency interrupts), and #21129 (Step 3: 
Software interrupts).
   
   Authored by Kerogit <[email protected]>, shepherded on GitHub by Swatantra 
Yadav <[email protected]>.
   
   ## Impact
   
   **New feature**: driver for WS2812 RGB LED for AVR DA/DB family and example 
configuration for breadxavr board
   
   **Impact on user**: none, new code is not enabled by default. Other AVR 
families are not supported and not affected, same for other architectures
   
   **Impact on build**: new Kconfig options related to the new feature.
   
   Also, configuration of WS2812 upper half is altered slightly. The upper half 
driver initially only supported SPI peripheral and was later extended to 
interact with architecture lower half instead (in which case the upper half is 
no longer tied to any specific hardware.) Even if the new style is used and SPI 
is not needed, the driver enforces "select SPI".
   
   The patch series adds a choice between the old and the new style and only 
the old style selects SPI now. Existing WS2812_NON_SPI_DRIVER configuration 
option is changed from boolean (default false) to a choice option (default not 
chosen.) This should be fully backwards compatible with existing 
configurations. Default configuration selects the old style driver and existing 
board configurations with CONFIG_WS2812_NON_SPI_DRIVER=y continue to work 
without changes.
   
   **Impact on documentation**: added documentation for the driver and 
description of the new configuration to breadxavr board. Description of 
ws2812_register upper half function in the code is altered to match current 
parameters of that function. This forced a formatting cleanup to fix an issue 
reported by checkpatch before any changes were made.
   
   No impact on hardware, security or compatibility
   
   ## Testing
   
   I confirm that changes are verified on local setup and works as intended:
   * Build Host(s): Linux, AMD, GCC avr-gcc 14.2; Windows 11 / WSL2
   * Target(s): AVR DA/DB, tested on breadxavr
   
   Tested with ws2812 example application from nuttx-apps. When executed from 
NSH, the LEDs light up in green color and then repeatedly cycle colors to 
yellow, red, magenta, blue, cyan and back to green. This sequence of colors is 
not expected, first color is supposed to be red. After an examination, it was 
found out that the LEDs used for testing do not behave as documented and 
interpret the first received byte as red (instead of green as described by the 
documentation.) This was confirmed by a simple non-RTOS firmware that drives 
output pin directly with timing achieved by nop instructions. The driver should 
therefore work with LEDs that behave according to the documentation.
   
   Documentation verified by Sphinx HTML build.
   Coding style and commit messages verified with nxstyle and checkpatch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to