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>
|
||
|---|---|---|
| .. | ||
| boards | ||
| src | ||
| CMakeLists.txt | ||
| prj.conf | ||
| README.rst | ||
| sample.yaml | ||
.. _esp32_temp_sensor:
ESP32 Temperature Sensor
########################
Overview
********
This sample periodically reads temperature from the ESP32-S2 and ESP32-C3
Internal Temperature Sensor and display the results.
Building and Running
********************
In order to run this sample, make sure to enable ``esp32_temp`` node in your
board DT file.
.. zephyr-app-commands::
:zephyr-app: samples/sensor/esp32_temp_sensor
:board: esp32s2_saola
:goals: build
:compact:
Sample Output
=============
.. code-block:: console
Current temperature: 22.6 °C
Current temperature: 22.8 °C
Current temperature: 23.1 °C