zephyr/samples/drivers/led_is31fl3733
Benjamin Cabé f6a4217a88 doc: driver: samples: Update driver samples to use new Sphinx extension
Migrated existing driver samples to use the new code-sample directive
and role.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-09-22 09:21:43 +02:00
..
boards samples: drivers: add led_is31fl3733 sample to demonstrate usage 2023-07-21 10:51:18 +00:00
src samples drivers led: Fix main return 2023-08-09 16:09:47 +00:00
CMakeLists.txt samples: drivers: add led_is31fl3733 sample to demonstrate usage 2023-07-21 10:51:18 +00:00
Kconfig samples: drivers: add led_is31fl3733 sample to demonstrate usage 2023-07-21 10:51:18 +00:00
prj.conf samples: drivers: add led_is31fl3733 sample to demonstrate usage 2023-07-21 10:51:18 +00:00
README.rst doc: driver: samples: Update driver samples to use new Sphinx extension 2023-09-22 09:21:43 +02:00
sample.yaml samples: drivers: add led_is31fl3733 sample to demonstrate usage 2023-07-21 10:51:18 +00:00

.. zephyr:code-sample:: is31fl3733
   :name: IS31FL3733 LED Matrix
   :relevant-api: led_interface

   Control a matrix of up to 192 LEDs connected to an IS31FL3733 driver chip.

Overview
********

This sample controls a matrix of up to 192 LEDs. The sample performs the
following test steps in an infinite loop:

- Set all LEDs to full brightness with :c:func:`led_write_channels` API
- Disable upper quadrant of LED array with :c:func:`led_write_channels` API
- Dim each LED in sequence using :c:func:`led_set_brightness` API
- Toggle each LED in sequency using :c:func:`led_on` and :c:func:`led_of` APIs
- Toggle between low or high current limit using :c:func:`is31fl3733_current_limit`
  API, and repeat the above tests

Sample Configuration
====================

The number of LEDs can be limited using the following sample specific Kconfigs:

- :kconfig:option:`CONFIG_LED_ROW_COUNT`
- :kconfig:option:`CONFIG_LED_COLUMN_COUNT`

Building and Running
********************

This sample can be run on any board with an IS31FL3733 LED driver connected via
I2C, and a node with the `issi,is31fl3733` compatible present in its devicetree.

This sample provides a DTS overlay for the :ref:`frdm_k22f` board
(:file:`boards/frdm_k22f.overlay`). It assumes that the IS31FL3733 LED
controller is connected to I2C0, at address 0x50. The SDB GPIO should be
connected to PTC2 (A3 on the arduino header)