Skip to content

Commit

Permalink
samples: led: consolidate LED samples under same directory
Browse files Browse the repository at this point in the history
With over a dozen LED samples, grouping them in a common drivers/led/
folder helps keep things tidy and lays the groundwork for further
improvements in the way samples are showing up in the docs.

Signed-off-by: Benjamin Cabé <[email protected]>
  • Loading branch information
kartben committed Aug 31, 2024
1 parent 7cf124b commit e8da175
Show file tree
Hide file tree
Showing 118 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,7 @@ Release Notes:
- drivers/led/
- include/zephyr/drivers/led/
- include/zephyr/drivers/led.h
- samples/drivers/led_*/
- samples/drivers/led/
- tests/drivers/led/
- doc/hardware/peripherals/led.rst
- tests/drivers/build_all/led/
Expand Down
4 changes: 2 additions & 2 deletions boards/bcdevices/plt_demo_v2/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ an external programmer. The programmer is attached to the SWD header.
Build the Zephyr kernel and the :zephyr:code-sample:`led-strip` sample application.

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_apa102
:zephyr-app: samples/drivers/led/led_apa102
:board: blueclover_plt_demo_v2/nrf52832
:goals: build
:compact:

Flash the image.

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_apa102
:zephyr-app: samples/drivers/led/led_apa102
:board: blueclover_plt_demo_v2/nrf52832
:goals: flash
:compact:
Expand Down
2 changes: 1 addition & 1 deletion boards/shields/adafruit_neopixel_grid_bff/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ LED Strip Example
Set ``--shield adafruit_neopixel_grid_bff`` when you invoke ``west build``. For example:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_strip
:zephyr-app: samples/drivers/led/led_strip
:board: adafruit_qt_py_rp2040
:shield: adafruit_neopixel_grid_bff
:goals: build
Expand Down
2 changes: 1 addition & 1 deletion boards/shields/adafruit_pca9685/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Set ``--shield adafruit_pca9685`` when you invoke ``west build``.
For example:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_pwm
:zephyr-app: samples/drivers/led/led_pwm
:board: nrf52840dk/nrf52840
:shield: adafruit_pca9685
:goals: build
Expand Down
2 changes: 1 addition & 1 deletion boards/vcc-gnd/yd_esp32/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ The board contains an addressable RGB LED (`XL-5050RGBC-WS2812B`_), driven by GP
Here is an example of how to test it using the :zephyr:code-sample:`led-strip` application.

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_strip
:zephyr-app: samples/drivers/led/led_strip
:board: yd_esp32/esp32/procpu
:goals: flash

Expand Down
13 changes: 13 additions & 0 deletions doc/_scripts/redirects.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,21 @@
('samples/drivers/adc/README', 'samples/drivers/adc/adc_dt/README'),
('samples/drivers/kscan_touch', 'samples/subsys/input/input'),
('samples/drivers/led_apa102/README', 'samples/drivers/led_strip/README'),
('samples/drivers/led_apa102c_bitbang/README', 'samples/drivers/led/led_apa102c_bitbang/README'),
('samples/drivers/led_is31fl3194/README', 'samples/drivers/led/led_is31fl3194/README'),
('samples/drivers/led_is31fl3216a/README', 'samples/drivers/led/led_is31fl3216a/README'),
('samples/drivers/led_is31fl3733/README', 'samples/drivers/led/led_is31fl3733/README'),
('samples/drivers/led_lp3943/README', 'samples/drivers/led/led_lp3943/README'),
('samples/drivers/led_lp50xx/README', 'samples/drivers/led/led_lp50xx/README'),
('samples/drivers/led_lp5562/README', 'samples/drivers/led/led_lp5562/README'),
('samples/drivers/led_lp5569/README', 'samples/drivers/led/led_lp5569/README'),
('samples/drivers/led_lpd8806/README', 'samples/drivers/led_strip/README'),
('samples/drivers/led_pca9633/README', 'samples/drivers/led/led_pca9633/README'),
('samples/drivers/led_pwm/README', 'samples/drivers/led/led_pwm/README'),
('samples/drivers/led_strip/README', 'samples/drivers/led/led_strip/README'),
('samples/drivers/led_sx1509b_intensity/README', 'samples/drivers/led/led_sx1509b_intensity/README'),'

Check failure on line 228 in doc/_scripts/redirects.py

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

E0001

doc/_scripts/redirects.py:228 Parsing failed: 'unterminated string literal (detected at line 228) (redirects, line 228)' (syntax-error)
('samples/drivers/led_ws2812/README', 'samples/drivers/led_strip/README'),
('samples/drivers/led_xec/README', 'samples/drivers/led/led_xec/README'),
('samples/net/cloud/google_iot_mqtt/README', 'samples/net/cloud/cloud'),
('samples/sensor/wsen_hids/README', 'samples/sensor/sensor'),
('samples/sensor/wsen_itds/README', 'samples/sensor/sensor'),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Build the application for the :ref:`96b_neonkey` board, which has an
LP3943 driver included.

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_lp3943
:zephyr-app: samples/drivers/led/led_lp3943
:board: 96b_neonkey
:goals: build
:compact:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Build the application for the :ref:`nrf52840dk_nrf52840` board, and connect
a LP5562 LED driver on the bus I2C0 at the address 0x30.

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_lp5562
:zephyr-app: samples/drivers/led/led_lp5562
:board: nrf52840dk/nrf52840
:goals: build
:compact:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Build the application for the :ref:`nrf52840dk_nrf52840` board, and connect
a LP5569 LED controller on the bus I2C0 at the address 0x32.

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_lp5569
:zephyr-app: samples/drivers/led/led_lp5569
:board: nrf52840dk/nrf52840
:goals: build
:compact:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Build the application for the :ref:`nucleo_f334r8_board` board, and connect
a PCA9633 LED driver on the bus I2C Arduino.

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_pca9633
:zephyr-app: samples/drivers/led/led_pca9633
:board: nucleo_f334r8_board
:goals: build
:compact:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ modified by changing the :kconfig:option:`CONFIG_SAMPLE_LED_UPDATE_DELAY`.
Then build and flash the application:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_strip
:zephyr-app: samples/drivers/led/led_strip
:board: <board>
:goals: flash
:compact:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Building and Running
********************

.. zephyr-app-commands::
:zephyr-app: samples/drivers/led_sx1509b_intensity
:zephyr-app: samples/drivers/led/led_sx1509b_intensity
:board: thingy52/nrf52832
:goals: build flash
:compact:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e8da175

Please sign in to comment.