mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-05 03: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 |
.. _microbit_sound: BBC micro:bit sound ################### Overview ******** This sample demonstrates how to use a piezo buzzer connected to port P0 on the edge connector of the BBC micro:bit board. Requirements ************ A separate piezo buzzer connected to the board. One example is the MI:Power board that has a piezo buzzer in addition to a coin-cell battery. Resellers of this board can be fairly easily found using online search. Building and running ******************** The sample can be built as follows: .. zephyr-app-commands:: :zephyr-app: samples/boards/bbc_microbit/sound :board: bbc_microbit :goals: build flash :compact: Sample Output ============= This sample outputs sounds through a connected piezo buzzer based on button presses of the two main buttons. For each press the current output frequency will be printed on the 5x5 LED display.