Commit Graph

9 Commits

Author SHA1 Message Date
Gerard Marull-Paretas a202341958 devices: constify device pointers initialized at compile time
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).

Automated using:

```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02:00
Gerard Marull-Paretas c7b5b3c419 samples: migrate includes to contain <zephyr/...> prefix
In order to bring consistency in-tree, migrate all samples to the use
the new prefix <zephyr/...>. Note that the conversion has been scripted:

```python
from pathlib import Path
import re

EXTENSIONS = ("c", "h", "cpp", "rst")

for p in Path(".").glob("samples/**/*"):
    if not p.is_file() or p.suffix and p.suffix[1:] not in EXTENSIONS:
        continue

    content = ""
    with open(p) as f:
        for line in f:
            m = re.match(r"^(.*)#include <(.*)>(.*)$", line)
            if (m and
                not m.group(2).startswith("zephyr/") and
                (Path(".") / "include" / "zephyr" / m.group(2)).exists()):
                content += (
                    m.group(1) +
                    "#include <zephyr/" + m.group(2) +">" +
                    m.group(3) + "\n"
                )
            else:
                content += line

    with open(p, "w") as f:
        f.write(content)
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 11:29:59 +02:00
Glauber Maroto Ferreira 0dfc2ea103 doc: samples: display: update documentation
- fixes sample codes' relative paths
- updates instructions to build and run for native posix
platforms on its 64 flavor.

Signed-off-by: Glauber Maroto Ferreira <glauber.ferreira@espressif.com>
2021-12-13 19:39:47 -05:00
Johann Fischer bf0b879067 samples: cfb_custom_font: set required pixel format
Set for this sample required pixel format.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 12:47:30 +01:00
Johann Fischer 4541f1f76a samples: use chosen property to get default display controller
Rework samples to use DEVICE_DT_GET and DT_CHOSEN
to get default display controller device.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-12-10 12:47:30 +01:00
Torsten Rasmussen 1cccc8a8fe cmake: increase minimal required version to 3.20.0
Move to CMake 3.20.0.

At the Toolchain WG it was decided to move to CMake 3.20.0.

The main reason for increasing CMake version is better toolchain
support.

Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-20 09:47:34 +02:00
Henrik Brix Andersen ea1e47d0ef samples: display: cfb_custom_font: convert to using DEVICE_DT_GET()
Convert from using device_get_binding() to DEVICE_DT_GET().

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-06-14 07:04:36 -05:00
Henrik Brix Andersen b99cce3506 samples: display: cfb_custom_font: remove obsolete board configuration
Remove obsolete reel_board configuration from the cfb_custom_font
sample.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-06-14 07:04:36 -05:00
Anas Nashif 6882b5d912 sampels: move display into subsys/display
This should align with subsys/display which we do not have yet. Plan is
to move lib/gui into subsys/display.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-09 17:48:18 -05:00