zephyr/samples/drivers/led_pca9633
Tomasz Bursztyka e18fcbba5a device: Const-ify all device driver instance pointers
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.

A coccinelle rule is used for this:

@r_const_dev_1
  disable optional_qualifier
@
@@
-struct device *
+const struct device *

@r_const_dev_2
 disable optional_qualifier
@
@@
-struct device * const
+const struct device *

Fixes #27399

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-09-02 13:48:13 +02:00
..
boards
src device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
CMakeLists.txt
README.rst
prj.conf
sample.yaml

README.rst

.. _pca9633:

PCA9633: 4-Channel RGB
######################

Overview
********

This sample controls 4 LEDs connected to a PCA9633 driver, using the
following pattern:

 1. turn on LEDs
 2. turn off LEDs
 3. set the brightness to 50%
 4. turn off LEDs
 5. blink the LEDs
 6. turn off LEDs

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

Build the application for the :ref:`stm32373c_eval_board` board, and connect
a PCA9633 LED driver on the bus I2C-1 at the address 0x62.

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/led_pca9633
   :board: stm32373c_eval
   :goals: build
   :compact:

For flashing the application, refer to the Flashing section of the
:ref:`stm32373c_eval_board` board documentation.

References
**********

- PCA9633: https://www.nxp.com/docs/en/data-sheet/PCA9633.pdf