zephyr/samples/drivers/led_pca9633
Keith Packard 0b90fd5adf samples, tests, boards: Switch main return type from void to int
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.

Most of these changes were automated using coccinelle with the following
script:

@@
@@
- void
+ int
main(...) {
	...
-	return;
+	return 0;
	...
}

Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
..
src samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
app.overlay samples: Remove label property from devicetree overlays 2022-08-01 17:59:32 +02:00
CMakeLists.txt cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
prj.conf drivers: led: Remove unnecessary Kconfig settings 2022-08-11 17:46:43 +02:00
README.rst samples/drivers: led_pca9633: Replace target stm32373c_eval 2021-11-26 11:36:42 +01:00
sample.yaml samples/drivers: led_pca9633: Convert to build_only 2021-12-13 10:02:44 -06:00

.. _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:`nucleo_f334r8_board` board, and connect
a PCA9633 LED driver on the bus I2C Arduino.

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

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

References
**********

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