mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-04 11:55:21 +00:00
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> |
||
---|---|---|
.. | ||
src | ||
CMakeLists.txt | ||
prj.conf | ||
README.rst | ||
sample.yaml |
.. _fade-led-sample: Fade LED ######## Overview ******** This application "fades" a LED using the :ref:`PWM API <pwm_api>`. The LED starts off increases its brightness until it is fully or nearly fully on. The brightness then decreases until the LED is off, completing on fade cycle. Each cycle takes 2.5 seconds, and the cycles repeat forever. Requirements and Wiring *********************** This sample has the same requirements and wiring considerations as the :ref:`pwm-blinky-sample`. Building and Running ******************** To build and flash this sample for the :ref:`nrf52840dk_nrf52840`: .. zephyr-app-commands:: :zephyr-app: samples/basic/fade_led :board: nrf52840dk_nrf52840 :goals: build flash :compact: Change ``nrf52840dk_nrf52840`` appropriately for other supported boards. After flashing, the sample starts fading the LED as described above. It also prints information to the board's console.