zephyr/samples/display/cfb_custom_font
Tomasz Bursztyka e18fcbba5a device: Const-ify all device driver instance pointers
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>
2020-09-02 13:48:13 +02:00
..
boards
fonts
src device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
CMakeLists.txt
README.rst
prj.conf
sample.yaml sanitycheck: inclusive language 2020-08-27 07:04:07 -04:00

README.rst

.. _cfb_custom_fonts:

Custom Fonts
############

Overview
********
A simple example showing how to generate Character Framebuffer (CFB)
font headers automatically at build time.

This example generates a font with font elements for 6 sided dice from
a PNG image, and then uses the generated header (``cfb_font_dice.h``)
to show the font elements on the display of a supported board.

The source code for this sample application can be found at:
:zephyr_file:`samples/display/cfb_custom_font`.

Building and Running
********************

There are different configuration files in the cfb_custom_font
directory:

- :file:`prj.conf`
  Generic config file, normally you should use this.

- :file:`boards/reel_board.conf`
  This overlay config enables support for SSD16XX display controller
  on the reel_board.


Example building for the reel_board with SSD16XX display support:

.. zephyr-app-commands::
   :zephyr-app: samples/display/cfb_custom_font
   :host-os: unix
   :board: reel_board
   :goals: flash
   :compact: