diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 00000000..68954db0
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: ['noah1510'] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
+patreon: noasakurajin
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: ['https://www.paypal.me/noasakurajin'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml
new file mode 100644
index 00000000..09a4aea3
--- /dev/null
+++ b/.github/workflows/compile-examples.yml
@@ -0,0 +1,257 @@
+name: Compile Examples
+
+on:
+ pull_request:
+ paths:
+ - ".github/workflows/compile-examples.yml"
+ - "examples/**"
+ - "src/**"
+ push:
+ tags:
+ - 'v*'
+ branches:
+ - 'master'
+ paths:
+ - ".github/workflows/compile-examples.yml"
+ - "examples/**"
+ - "src/**"
+
+jobs:
+ build-arduino:
+ runs-on: ubuntu-latest
+
+ env:
+ SKETCHES_REPORTS_PATH: sketches-reports
+ LIBRARIES: |
+ # Install the library from the local path.
+ - source-path: ./
+ - name: Adafruit Unified Sensor
+ - name: DHT sensor library
+
+ strategy:
+ fail-fast: false
+
+ matrix:
+ board:
+ - fqbn: arduino:avr:uno
+ platforms: |
+ - name: arduino:avr
+
+ - fqbn: arduino:samd:mkr1000
+ platforms: |
+ - name: arduino:samd
+ - fqbn: arduino:samd:mkrzero
+ platforms: |
+ - name: arduino:samd
+ - fqbn: arduino:samd:mkrwifi1010
+ platforms: |
+ - name: arduino:samd
+ - fqbn: arduino:samd:mkrfox1200
+ platforms: |
+ - name: arduino:samd
+ - fqbn: arduino:samd:mkrwan1300
+ platforms: |
+ - name: arduino:samd
+ - fqbn: arduino:samd:mkrwan1310
+ platforms: |
+ - name: arduino:samd
+ - fqbn: arduino:samd:mkrgsm1400
+ platforms: |
+ - name: arduino:samd
+ - fqbn: arduino:samd:mkrnb1500
+ platforms: |
+ - name: arduino:samd
+ - fqbn: arduino:samd:mkrvidor4000
+ platforms: |
+ - name: arduino:samd
+ - fqbn: arduino:mbed_portenta:envie_m7
+ platforms: |
+ - name: arduino:mbed_portenta
+ - fqbn: arduino:mbed_portenta:envie_m4
+ platforms: |
+ - name: arduino:mbed_portenta
+ - fqbn: arduino:mbed_nano:nano33ble
+ platforms: |
+ - name: arduino:mbed_nano
+ - fqbn: arduino:mbed_nano:nanorp2040connect
+ platforms: |
+ - name: arduino:mbed_nano
+ - fqbn: arduino:mbed_edge:edge_control
+ platforms: |
+ - name: arduino:mbed_edge
+ - fqbn: esp32:esp32:esp32
+ platforms: |
+ - name: esp32:esp32
+ source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
+ - fqbn: rp2040:rp2040:rpipico
+ platforms: |
+ - name: rp2040:rp2040
+ source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: setup python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.9'
+ cache: 'pip'
+ - name: install pip dependencies
+ run: pip install pyserial
+
+ - name: Compile examples
+ uses: arduino/compile-sketches@v1
+ with:
+ fqbn: ${{ matrix.board.fqbn }}
+ platforms: ${{ matrix.board.platforms }}
+ libraries: ${{ env.LIBRARIES }}
+ enable-deltas-report: true
+ sketch-paths: "examples/english"
+ sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
+ cli-compile-flags: |
+ - --warnings
+ - default
+
+ - name: Save memory usage change report as artifact
+ if: github.event_name == 'pull_request'
+ uses: actions/upload-artifact@v3
+ with:
+ name: ${{ env.SKETCHES_REPORTS_PATH }}
+ path: ${{ env.SKETCHES_REPORTS_PATH }}
+
+ - uses: actions/upload-artifact@v1
+ if: failure()
+ with:
+ name: build-artifact
+ path: .
+
+ build-pio:
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+
+ matrix:
+ boards:
+ - name: esp32dev
+ - name: d1_mini
+ - name: uno
+ - name: ATmega1280
+ - name: leonardo
+ - name: due
+ - name: teensy41
+ - name: bluefruitmicro
+
+ examples:
+ - name: Led-matrix-rocket
+ - name: Led-matrix-rocket-multi
+ - name: Led-matrix-counting
+ - name: Led-matrix-rocket-hwSPI
+ - name: Led-matrix-message
+ - name: 7-Segment-counting
+ - name: 7-Segment-DHT-temp-humid
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: setup python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.9'
+ cache: 'pip'
+ - name: install pip dependencies
+ run: pip install -r ./.scripts/requirements.txt
+ - name: setup pio
+ run: |
+ python3 -m platformio update
+ python3 -m platformio lib -g install "adafruit/DHT sensor library"
+ python3 -m platformio lib -g install "adafruit/Adafruit Unified Sensor"
+
+ - name: compile examples
+ run: PLATFORMIO_CI_SRC="examples/english/${{ matrix.examples.name }}/${{ matrix.examples.name }}.ino" python3 -m platformio ci --lib="." -b ${{ matrix.boards.name }}
+
+ - uses: actions/upload-artifact@v1
+ if: failure()
+ with:
+ name: build-artifact
+ path: .
+
+ update-release:
+ name: "update the latest release"
+ runs-on: ubuntu-latest
+ needs: [build-pio, build-arduino]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: install doc deps
+ run: sudo apt-get install --yes doxygen graphviz latexmk texlive-latex-extra
+
+ - name: prepare for building docs
+ run: |
+ mkdir -p doc/html
+ mkdir -p doc/latex
+
+ - name: build documentation
+ run: bash .scripts/doxygen_multilang.sh
+
+ - name: pack repo
+ run: |
+ zip -r latest.zip src License README.md library.properties keywords.txt .vscode examples src
+
+ - name: Check code meets quality standards
+ id: codiga
+ uses: codiga/github-action@master
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ codiga_api_token: ${{ secrets.CODIGA_API_TOKEN }}
+ min_quality_grade: 'EXCELLENT'
+ min_quality_score: '99'
+ max_defects_rate: '0.01'
+ max_complex_functions_rate: '0.01'
+ max_long_functions_rate: '0.01'
+ project_name: 'LedController'
+ max_timeout_sec: '600'
+
+ - name: update latest release
+ if: ${{ github.ref_name == 'master' }}
+ uses: "marvinpinto/action-automatic-releases@latest"
+ with:
+ repo_token: "${{ secrets.GITHUB_TOKEN }}"
+ automatic_release_tag: "latest"
+ prerelease: true
+ title: "Development Build"
+ files: |
+ License
+ latest.zip
+ refman_english.pdf
+ refman_german.pdf
+
+ - name: update stable release
+ if: ${{ github.ref_type == 'tag' }}
+ uses: "marvinpinto/action-automatic-releases@latest"
+ with:
+ repo_token: "${{ secrets.GITHUB_TOKEN }}"
+ prerelease: ${{ endsWith( github.ref_name, 'rc') }}
+ files: |
+ License
+ release.zip
+ refman_english.pdf
+ refman_german.pdf
+
+ - name: Deploy to pages
+ if: ${{ contains(github.event.head_commit.message, '--build-docs') }}
+ uses: s0/git-publish-subdir-action@master
+ env:
+ REPO: self
+ BRANCH: gh-pages
+ FOLDER: doc/html
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - uses: actions/upload-artifact@v1
+ if: failure()
+ with:
+ name: build-artifact-${{ matrix.os }}-${{ matrix.compiler }}
+ path: .
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..95515a9c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,13 @@
+doc/html
+doc/man
+doc/latex
+doxywarn*.txt
+refman_*.pdf
+
+.vscode
+.idea
+logs
+.pio
+src/*.ino
+*.~*#
+*.orig
\ No newline at end of file
diff --git a/.restyled.yaml b/.restyled.yaml
new file mode 100644
index 00000000..8e6c7c5f
--- /dev/null
+++ b/.restyled.yaml
@@ -0,0 +1,13 @@
+restylers:
+ - name: astyle
+ enabled: true
+ arguments: ["--style=google","--indent-namespaces", "--indent-col1-comments"]
+ include:
+ - "**/*.hpp"
+ - "**/*.cpp"
+ - name: astyle
+ enabled: true
+ arguments: ["--style=attach","--indent=spaces=2", "--indent-col1-comments"]
+ include:
+ - "**/*.ino"
+
\ No newline at end of file
diff --git a/.scripts/ci_local.sh b/.scripts/ci_local.sh
new file mode 100755
index 00000000..7966c845
--- /dev/null
+++ b/.scripts/ci_local.sh
@@ -0,0 +1,86 @@
+#!/bin/bash
+
+BUILDMODE="full"
+MAX_CORES="4"
+
+if [ $1 ]
+then
+ if [ $1 == '--fast' ]
+ then
+ BUILDMODE="fast"
+ fi
+
+ if [ $1 == '--test-only' ]
+ then
+ BUILDMODE="test-only"
+ fi
+
+ if [ $1 == '--scan-only' ]
+ then
+ BUILDMODE="scan-only"
+ fi
+
+ if [ $1 == '--all-esp32' ]
+ then
+ BUILDMODE="all-esp32"
+ fi
+fi
+
+if [ $BUILDMODE == "fast" ]
+then
+ echo "doing the fast test with 2 boards and 2 examples"
+ boards=("esp32dev" "ATmega1280")
+ examples=("7-Segment-counting" "Led-matrix-rocket-hwSPI")
+else
+ if [ $BUILDMODE == "full" ]
+ then
+ echo "doing the full test with 5 boards and 6 examles"
+ boards=("esp32dev" "d1_mini" "uno" "ATmega1280" "leonardo" "due" "teensy41" "bluefruitmicro")
+ else
+ echo "doing the full test with 1 board and 6 examles"
+ boards=("esp32dev")
+ fi
+ examples=("Led-matrix-rocket" "Led-matrix-rocket-multi" "Led-matrix-counting" "Led-matrix-rocket-hwSPI" "Led-matrix-message" "7-Segment-counting" "7-Segment-DHT-temp-humid")
+fi
+
+function build(){
+ local ex=$1
+ local board=$2
+ PLATFORMIO_CI_SRC="examples/english/$ex/$ex.ino" python3 -m platformio ci --lib="." -b $board > >(tee logs/$ex-$board.log) 2> >(tee logs/$ex-$board.error.log >&2)
+ if [ $? -eq 1 ]
+ then
+ echo "error while building $ex"
+ touch error.tmp
+ fi
+}
+
+if [ $BUILDMODE != "test-only" ] && [ $BUILDMODE != "scan-only" ]
+then
+ rm -rf logs
+ mkdir logs
+ for ex in "${examples[@]}"; do
+ for board in "${boards[@]}"; do
+ ((i=i%MAX_CORES)); ((i++==0)) && wait
+ build "$ex" "$board" &
+ done
+ done
+ wait
+
+ if [ -f "error.tmp" ]
+ then
+ echo "error while building"
+ rm error.tmp
+ exit 1
+ fi
+fi
+
+if [ $BUILDMODE != "scan-only" ]
+then
+ echo "running the native unit tests"
+ python3 -m platformio test -e native > >(tee logs/tests.log) 2> >(tee logs/tests.error.log >&2)
+fi
+
+echo "The following warnings/error are about the LedController:"
+grep LedController logs/*error.log
+
+exit 0
diff --git a/.scripts/doxygen_multilang.sh b/.scripts/doxygen_multilang.sh
new file mode 100755
index 00000000..136826d4
--- /dev/null
+++ b/.scripts/doxygen_multilang.sh
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+#get the number of cores to limit the parallel builds
+MAX_CORES="$(nproc)"
+
+#the languages the output should generate
+OUTPUT_LANGUAGES=("english" "german")
+
+#the old langauge and the strings that should be searched
+OLD_LANGAUGE="English"
+OUTPUT_LANGUAGE_STRING="OUTPUT_LANGUAGE = "
+HTML_DIR="HTML_OUTPUT = html"
+EXAMPLE_DIR="EXAMPLE_PATH = examples"
+LATEX_DIR="LATEX_OUTPUT = latex"
+
+#the base folder for the doxygen output
+DOXYGEN_BASE="doc"
+ROOT_INDEX_LOCATION=".scripts"
+
+build_lang(){
+ local lang=$1
+
+ #create lang specific doxygen file
+ cp Doxyfile Doxyfile.$lang
+
+ #replace the language and add specific subfolder
+ sed -i "s/$OUTPUT_LANGUAGE_STRING$OLD_LANGAUGE/$OUTPUT_LANGUAGE_STRING$lang/g" Doxyfile.$lang
+ sed -i "s/$HTML_DIR/$HTML_DIR\/$lang/g" Doxyfile.$lang
+ sed -i "s/$LATEX_DIR/$LATEX_DIR\/$lang/g" Doxyfile.$lang
+ sed -i "s/$EXAMPLE_DIR/$EXAMPLE_DIR\/$lang/g" Doxyfile.$lang
+ sed -i "s/doxywarn.txt/doxywarn.$lang.txt/g" Doxyfile.$lang
+
+ #check if replacement worked as intended
+ grep OUTPUT_LANGUAGE Doxyfile.$lang
+ grep HTML_OUTPUT Doxyfile.$lang
+
+ #run doxygen
+ doxygen Doxyfile.$lang
+ if [ "$?" -ne 0 ];
+ then
+ rm Doxyfile.$lang
+ return 1
+ fi
+
+ #build pdf file
+ cd doc/latex/$lang/
+ latexmk -f -pdf refman.tex
+ cd ../../../
+
+ #copy and rename reference manual
+ mv doc/latex/$lang/refman.pdf refman_$lang.pdf
+
+ #remove lang specific doxygen file
+ rm Doxyfile.$lang
+
+ return 0
+
+}
+
+#build as much language in parallel as possible
+for lang in "${OUTPUT_LANGUAGES[@]}"
+do
+ #this calls a new subroutine for that language in the array
+ build_lang $lang
+ if [ "$?" -ne 0 ];
+ then
+ exit 1
+ fi
+done
+
+#create new root index file
+rm -f $DOXYGEN_BASE/html/index.html
+cp $ROOT_INDEX_LOCATION/index.html $DOXYGEN_BASE/html/
diff --git a/.scripts/index.html b/.scripts/index.html
new file mode 100644
index 00000000..17de0bab
--- /dev/null
+++ b/.scripts/index.html
@@ -0,0 +1,10 @@
+
+
+ Documentation language selection
+
+
+ Language Selection/Sprachauswahl
+ Click here for the english page
+ Klicke hier für die deutsche Seite
+
+
\ No newline at end of file
diff --git a/.scripts/requirements.txt b/.scripts/requirements.txt
new file mode 100644
index 00000000..0f33db03
--- /dev/null
+++ b/.scripts/requirements.txt
@@ -0,0 +1,2 @@
+platformio >= 6.1.4
+
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 00000000..fd6a681e
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,2626 @@
+# Doxyfile 1.9.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the configuration
+# file that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME = LedController
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER = 2.0.2
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF = "A library for the MAX7219 and the MAX7221 Led display drivers."
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = ./doc
+
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS = YES
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES = YES
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE = English
+
+# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all generated output in the proper direction.
+# Possible values are: None, LTR, RTL and Context.
+# The default value is: None.
+
+OUTPUT_TEXT_DIRECTION = None
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF = "The $name class" \
+ "The $name widget" \
+ "The $name file" \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF = YES
+
+# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
+# such as
+# /***************
+# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
+# Javadoc-style will behave just like regular comments and it will not be
+# interpreted by doxygen.
+# The default value is: NO.
+
+JAVADOC_BANNER = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# By default Python docstrings are displayed as preformatted text and doxygen's
+# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
+# doxygen's special commands can be used and the contents of the docstring
+# documentation blocks is shown as doxygen documentation.
+# The default value is: YES.
+
+PYTHON_DOCSTRING = YES
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines (in the resulting output). You can put ^^ in the value part of an
+# alias to insert a newline as if a physical newline was in the original file.
+# When you need a literal { or } or , in the value part of an alias you have to
+# escape them by means of a backslash (\), this can lead to conflicts with the
+# commands \{ and \} for these it is advised to use the version @{ and @} or use
+# a double escape (\\{ and \\})
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
+# sources only. Doxygen will then generate output that is more tailored for that
+# language. For instance, namespaces will be presented as modules, types will be
+# separated into more groups, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_SLICE = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
+# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL,
+# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
+# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
+# tries to guess whether the code is fixed or free formatted code, this is the
+# default for Fortran type files). For instance to make doxygen treat .inc files
+# as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen. When specifying no_extension you should add
+# * to the FILE_PATTERNS.
+#
+# Note see also the list of default file extension mappings.
+
+EXTENSION_MAPPING = ino=C++
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See https://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = YES
+
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 5.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS = 0
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
+# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use
+# during processing. When set to 0 doxygen will based this on the number of
+# cores available in the system. You can set it explicitly to a value larger
+# than 0 to get more control over the balance between CPU load and processing
+# speed. At this moment only the input processing can be done using multiple
+# threads. Since this is still an experimental feature the default is set to 1,
+# which efficively disables parallel processing. Please report any issues you
+# encounter. Generating dot graphs in parallel is controlled by the
+# DOT_NUM_THREADS setting.
+# Minimum value: 0, maximum value: 32, default value: 1.
+
+NUM_PROC_THREADS = 1
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE = YES
+
+# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
+# methods of a class will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIV_VIRTUAL = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If this flag is set to YES, the name of an unnamed parameter in a declaration
+# will be determined by the corresponding definition. By default unnamed
+# parameters remain unnamed in the output.
+# The default value is: YES.
+
+RESOLVE_UNNAMED_PARAMS = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# declarations. If set to NO, these declarations will be included in the
+# documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS = NO
+
+# With the correct setting of option CASE_SENSE_NAMES doxygen will better be
+# able to match the capabilities of the underlying filesystem. In case the
+# filesystem is case sensitive (i.e. it supports files in the same directory
+# whose names only differ in casing), the option must be set to YES to properly
+# deal with such files in case they appear in the input. For filesystems that
+# are not case sensitive the option should be be set to NO to properly deal with
+# output files written for symbols that only differ in casing, such as for two
+# classes, one named CLASS and the other named Class, and to also support
+# references to files without having to specify the exact matching casing. On
+# Windows (including Cygwin) and MacOS, users should typically set this option
+# to NO, whereas on Linux or other Unix flavors it should typically be set to
+# YES.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS = YES
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if ... \endif and \cond
+# ... \endcond blocks.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation. If
+# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC = NO
+
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
+# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
+# at the end of the doxygen process doxygen will return with a non-zero status.
+# Possible values are: NO, YES and FAIL_ON_WARNINGS.
+# The default value is: NO.
+
+WARN_AS_ERROR = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE = doxywarn.txt
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
+
+INPUT = . \
+ doc/pages/index.doc \
+ doc/pages/install.doc \
+ doc/pages/usage.doc \
+ doc/pages/migration_notes.doc \
+ doc/pages/1.x.y_to_2.0.z.doc \
+ doc/pages/movement.doc \
+ doc/pages/multi_row.doc \
+ doc/pages/controller_configuration.doc \
+ doc/pages/language_selection.doc
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see:
+# https://www.gnu.org/software/libiconv/) for the list of possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# Note the list of default checked file patterns might differ from the list of
+# default file extension mappings.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
+# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment),
+# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl,
+# *.ucf, *.qsf and *.ice.
+
+FILE_PATTERNS = *.cpp \
+ *.hpp \
+ *.md
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE = README.md \
+ test
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH = examples
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS = *.ino
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE = YES
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH = doc/images
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+#
+#
+# where is the value of the INPUT_FILTER tag, and is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# entity all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see https://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS = YES
+
+# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
+# clang parser (see:
+# http://clang.llvm.org/) for more accurate parsing at the cost of reduced
+# performance. This can be particularly helpful with template rich C++ code for
+# which doxygen's built-in parser lacks the necessary type information.
+# Note: The availability of this option depends on whether or not doxygen was
+# generated with the -Duse_libclang=ON option for CMake.
+# The default value is: NO.
+
+CLANG_ASSISTED_PARSING = NO
+
+# If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to
+# YES then doxygen will add the directory of each input to the include path.
+# The default value is: YES.
+
+CLANG_ADD_INC_PATHS = YES
+
+# If clang assisted parsing is enabled you can provide the compiler with command
+# line options that you would normally use when invoking the compiler. Note that
+# the include paths will already be set by doxygen for the files and directories
+# specified with INPUT and INCLUDE_PATH.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+CLANG_OPTIONS =
+
+# If clang assisted parsing is enabled you can provide the clang parser with the
+# path to the directory containing a file called compile_commands.json. This
+# file is the compilation database (see:
+# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the
+# options used when the source files were built. This is equivalent to
+# specifying the -p option to a clang tool, such as clang-check. These options
+# will then be passed to the parser. Any options specified with CLANG_OPTIONS
+# will be added as well.
+# Note: The availability of this option depends on whether or not doxygen was
+# generated with the -Duse_libclang=ON option for CMake.
+
+CLANG_DATABASE_PATH =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX = YES
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP = NO
+
+# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
+# documentation will contain a main index with vertical navigation menus that
+# are dynamically created via JavaScript. If disabled, the navigation index will
+# consists of multiple levels of tabs that are statically embedded in every HTML
+# page. Disable this option to support browsers that do not have JavaScript,
+# like the Qt help browser.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_MENUS = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see:
+# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To
+# create a documentation set, doxygen will generate a Makefile in the HTML
+# output directory. Running make will produce the docset in that directory and
+# running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
+# genXcode/_index.html for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID = de.sakurajin.LedController
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see:
+# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the main .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE = de.sakurajin.LedController
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS =
+
+# The QHG_LOCATION tag can be used to specify the location (absolute path
+# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to
+# run qhelpgenerator on the generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID = de.sakurajin.LedController
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW = YES
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH = 250
+
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
+# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
+# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
+# the HTML output. These images will generally look nicer at scaled resolutions.
+# Possible values are: png (the default) and svg (looks nicer but requires the
+# pdf2svg or inkscape tool).
+# The default value is: png.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FORMULA_FORMAT = png
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT = YES
+
+# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
+# to create new LaTeX commands to be used in formulas as building blocks. See
+# the section "Including formulas" for details.
+
+FORMULA_MACROFILE =
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# https://www.mathjax.org) which uses client side JavaScript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from https://www.mathjax.org before deployment.
+# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see:
+# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use + S
+# (what the is depends on the OS and browser, but it is typically
+# , /, or both). Inside the search box use the to jump into the search results window, the results can be navigated
+# using the . Press to select an item or to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing +. Also here use the
+# to select a filter and or to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using JavaScript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see:
+# https://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see:
+# https://xapian.org/). See the section "External Indexing and Searching" for
+# details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when not enabling USE_PDFLATEX the default is latex when enabling
+# USE_PDFLATEX the default is pdflatex and when in the later case latex is
+# chosen this is overwritten by pdflatex. For specific output languages the
+# default can have been set differently, this depends on the implementation of
+# the output language.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# Note: This tag is used in the Makefile / make.bat.
+# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
+# (.tex).
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
+# generate index for LaTeX. In case there is no backslash (\) as first character
+# it will be automatically added in the LaTeX code.
+# Note: This tag is used in the generated output file (.tex).
+# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
+# The default value is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_MAKEINDEX_CMD = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
+# string, for the replacement values of the other commands the user is referred
+# to HTML_HEADER.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER =
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
+# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
+# files. Set this option to YES, to get a higher quality PDF documentation.
+#
+# See also section LATEX_CMD_NAME for selecting the engine.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE = YES
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE = plain
+
+# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_TIMESTAMP = NO
+
+# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
+# path from which the emoji images will be read. If a relative path is entered,
+# it will be relative to the LATEX_OUTPUT directory. If left blank the
+# LATEX_OUTPUT directory will be used.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EMOJI_DIRECTORY =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# configuration file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's configuration file. A template extensions file can be
+# generated using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE =
+
+# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
+# with syntax highlighting in the RTF output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_SOURCE_CODE = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN = YES
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING = YES
+
+# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
+# namespace members in file scope as well, matching the HTML output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_NS_MEMB_FILE_SCOPE = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
+
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
+# program listings (including syntax highlighting and cross-referencing
+# information) to the DOCBOOK output. Note that enabling this will significantly
+# increase the size of the DOCBOOK output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_PROGRAMLISTING = NO
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
+# the structure of the code including all documentation. Note that this feature
+# is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
+# The default value is: NO.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS = YES
+
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS = YES
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH =
+
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: YES.
+
+HAVE_DOT = YES
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS = 0
+
+# When you want a differently looking font in the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK = YES
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag UML_LOOK is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and
+# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS
+# tag is set to YES, doxygen will add type and arguments for attributes and
+# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen
+# will not generate fields with class member information in the UML graphs. The
+# class diagrams will look similar to the default class diagrams but using UML
+# notation for the relationships.
+# Possible values are: NO, YES and NONE.
+# The default value is: NO.
+# This tag requires that the tag UML_LOOK is set to YES.
+
+DOT_UML_DETAILS = NO
+
+# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters
+# to display on a single line. If the actual line length exceeds this threshold
+# significantly it will wrapped across multiple lines. Some heuristics are apply
+# to avoid ugly line breaks.
+# Minimum value: 0, maximum value: 1000, default value: 17.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_WRAP_THRESHOLD = 17
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH = YES
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# http://www.graphviz.org/)).
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
+# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
+# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS =
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file. If left blank, it is assumed
+# PlantUML is not used or called during a preprocessing step. Doxygen will
+# generate a warning when it encounters a \startuml command in this case and
+# will not generate output for the diagram.
+
+PLANTUML_JAR_PATH =
+
+# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
+# configuration file for plantuml.
+
+PLANTUML_CFG_FILE =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT = YES
+
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate
+# files that are used to generate the various graphs.
+#
+# Note: This setting is not only used for dot files but also for msc and
+# plantuml temporary files.
+# The default value is: YES.
+
+DOT_CLEANUP = YES
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 8d59812a..00000000
--- a/LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-LedControl.h - A library for controling Leds with a MAX7219/MAX7221
-Copyright (c) 2007-2015 Eberhard Fahle
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-This permission notice shall be included in all copies or
-substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
diff --git a/License b/License
new file mode 100644
index 00000000..0a041280
--- /dev/null
+++ b/License
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/README.md b/README.md
index 7e2b71e4..1f719c26 100644
--- a/README.md
+++ b/README.md
@@ -1,25 +1,79 @@
-LedControl
-==========
-LedControl is an [Arduino](http://arduino.cc) library for MAX7219 and MAX7221 Led display drivers.
-The code also works with the [Teensy (3.1)](https://www.pjrc.com/teensy/)
+# LedController
-Documentation
--------------
-Documentation for the library is on the [Github Project Pages](http://wayoda.github.io/LedControl/)
+[](https://github.com/noah1510/LedController/blob/master/License)
+[](https://app.codiga.io/hub/project/8566/LedController)
+[](https://GitHub.com/noah1510/LedController/releases/)
+[](https://www.ardu-badge.com/LedController)
+[](https://github.com/noah1510/LedController/actions?workflow=Compile+Examples)
-Download
---------
-The lastest binary version of the Library is always available from the
-[LedControl Release Page](https://github.com/wayoda/LedControl/releases)
+LedController is an [Arduino](http://arduino.cc) library for MAX7219 and MAX7221 Led display drivers.
+The code should work with most boards and architectures but I only test it for the ESP32 Dev Module.
+Feel free to create an issue if something is missing or not working correctly.
+Please note that while 7-Segment Displays are supported, most functions are intended for use with LED-Matrices and are not tested with 7-Segment Displays.
+Testing and reporting of problems or even fixes are welcome.
-Install
--------
-The library can be installed using the [standard Arduino library install procedure](http://arduino.cc/en/Guide/Libraries)
+## Issues, help and contributer information
+Whatever questions or suggestions you have, please provide detailed information about what you want, what went wrong and what your environment is.
+If you have a feature request or find issues, feel free to open an issue on github.
+For questions that are not bugs or feature requests please start a new [discussion](https://github.com/noah1510/LedController/discussions).
+Also help with more translations is welcome.
+At the moment the documentation is in German and English.
+## Supported boards
+The CI automatically tests the following boards(PlatformIO boards names):
+- esp32dev
+- d1_mini
+- uno
+- ATmega1280
+- leonardo
+- due (since 2.0.0)
+- teensy41 (since 2.0.0)
+- bluefruitmicro (since 2.0.0)
+
+All help regarding compatibility with more boards is welcome.
+
+## Important Notes
+
+You might need changes when migrating with the following transitions:
+
+* 1.6.x to 1.7.x
+* 1.x.y to 2.0.x
+
+Since 2.0.0 is a huge release you will definatly need changes to your code to get it working with that version.
+For information on what needs to be done to transition from one version to another check out the [migration notes](https://noah1510.github.io/LedController/english/d9/dbb/migration_notes.html)
+
+## Documentation
+
+Documentation for the library is on the [Github Project Pages](http://noah1510.github.io/LedController/index.html).
+It is available in [German](http://noah1510.github.io/LedController/german/index.html) and [English](http://noah1510.github.io/LedController/english/index.html).
+
+## Download
+
+The lastest version of the Library is always available from the [LedController Release Page](https://github.com/noah1510/LedController/releases)
+
+The library can be also installed using the [standard Arduino library install procedure](http://arduino.cc/en/Guide/Libraries).
+
+## Supported Editors
+
+The library includes a keywords.txt for the [Arduino ide](https://www.arduino.cc/) and a configuration for visual studio code (with the [platform.io extention](https://platformio.org/platformio-ide)).
+
+## Hardware SPI Pin Assignments
+
+If you want to use hardware SPI you have to use the following port.
+Please keep in mind that the MOSI(Master out Slave in) and the SCK(Serial Clock) signal can be shared by multiple SPI devices, while the SS(Slave Select) signal must be unique to every device(You can use every free pin for this).
+
+| Arduino Board | MOSI | MISO | SCK | SS (Slave) | SS (Master) |
+|---------------|------|------|-----|------------|-------------|
+| Uno or Duemilanove | 11 or ICSP-4 | 12 or ICSP-1 | 13 or ICSP-3 | 10 | - |
+| Mega1280 or Mega2560 | 51 or ICSP-4 | 50 or ICSP-1 | 52 or ICSP-3 | 53 | - |
+| Leonardo | ICSP-4 | ICSP-1 | ICSP-3 | - | - |
+| Due | ICSP-4 | ICSP-1 | ICSP-3 | - | 4, 10, 52 |
+| Deek-Robot Arduino | 11 | 12 | 13 | - | 10 |
+| ESP32-WROOM | 23 | 19 | 18 | - | 5 |
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 00000000..92259a77
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,24 @@
+# Security Policy
+
+## Supported Versions
+
+The versions below will get security fixes if they are reported.
+There will be a seperate branch for the continued version (eg. a branch 1.5.x).
+All fixes will also be applied to the master branch if applicable, so the latest version should have all the features and fixes.
+
+Because of several problems in versions older than 1.5, I will not provide fixes for them.
+Please consider updating, 1.5 is backwards compatible with older version.
+
+| Version | Supported |
+| ------- | ------------------ |
+| 2.0.x | :white_check_mark: |
+| 1.7.x | :white_check_mark: |
+| 1.6.x | :white_check_mark: |
+| 1.5.x | :white_check_mark: |
+| < 1.5.0 | :x: |
+
+## Reporting a Vulnerability
+
+Please report any vulnerabliliy as soon as you find it.
+Simply create a security advisory and I will try to fix is as soon as possible.
+If you have fixed a bug or vulnerability yourself you can simply create a pull request with the fix.
diff --git a/doc/images/Led-matrix-rocket-multi.jpg b/doc/images/Led-matrix-rocket-multi.jpg
new file mode 100644
index 00000000..ac17a290
Binary files /dev/null and b/doc/images/Led-matrix-rocket-multi.jpg differ
diff --git a/doc/images/Led-matrix-rocket_0.jpg b/doc/images/Led-matrix-rocket_0.jpg
new file mode 100644
index 00000000..33180ae7
Binary files /dev/null and b/doc/images/Led-matrix-rocket_0.jpg differ
diff --git a/doc/images/Led-matrix-rocket_1.jpg b/doc/images/Led-matrix-rocket_1.jpg
new file mode 100644
index 00000000..0636f07f
Binary files /dev/null and b/doc/images/Led-matrix-rocket_1.jpg differ
diff --git a/doc/images/Led_matrix_counting.jpg b/doc/images/Led_matrix_counting.jpg
new file mode 100644
index 00000000..2909eee4
Binary files /dev/null and b/doc/images/Led_matrix_counting.jpg differ
diff --git a/doc/images/multi_row_numbering.odg b/doc/images/multi_row_numbering.odg
new file mode 100644
index 00000000..f037ed59
Binary files /dev/null and b/doc/images/multi_row_numbering.odg differ
diff --git a/doc/images/multi_row_numbering.svg b/doc/images/multi_row_numbering.svg
new file mode 100644
index 00000000..2561876b
--- /dev/null
+++ b/doc/images/multi_row_numbering.svg
@@ -0,0 +1 @@
+Index 5 Index 4 Index 6 Index 7 Index 1 Index 0 Index 2 Index 3 Row 0 Row 1 Column 0 Column 1 Column 2 Column 3
\ No newline at end of file
diff --git a/doc/pages/1.x.y_to_2.0.z.doc b/doc/pages/1.x.y_to_2.0.z.doc
new file mode 100644
index 00000000..38e744e2
--- /dev/null
+++ b/doc/pages/1.x.y_to_2.0.z.doc
@@ -0,0 +1,52 @@
+/*!
+
+\~english
+\page 1.x.y_to_2.0.z Migration from 1.x.y to 2.0.z
+
+2.0.0 is not fully released yet but since the release of 2.0.0-rc1 only bug fixes and documentation updates will be pushed so these instructions will apply.
+
+Version 2.0.x is no longer a drop in replacement for 1.7.x!
+Due to some large changes in the code base, the sakurajin::LedController is now a template class which requires the dimensions of your LED-Matrix as Argument so now instead of having the type `LedController`, the type is `sakurajin::LedController`.
+This simplifies the whole interface and reduces the need for pointers.
+The examples are updated and respect these changes and there is now German documentation.
+Another side effect of this is, that you do not need to specify the total nmber of segments any more, since the dimensions are known.
+That is why that argument is removed from all constructors.
+
+2.0.x introduces the sakurajin::controller_configuration as class template.
+It can be used to set all the properties the controller should have and then be passed as argument to the init function or the constructor of the sakurajin::LedController.
+It needs the same dimensions as the sakurajin::LedController and provides a simple check for a valid configuration.
+You can check [this page](@ref controller_configuration_page) to learn more about the sakurajin::controller_configuration class.
+While controller_configuration already existed in 1.7.2, it is used more extensively and it can do a lot more.
+
+The next big feature is support for multiple rows of segments.
+Now you can connect multiple Matricies to different CS Pins and control them all using a single sakurajin::LedController instead of only being able to connect them all in a row.
+Another option is to connect all of the Segments in series and still have them act as if they were in different rows.
+This feature is called virtual multi row and has to be set in the controller configuration.
+For this feature to work, the length of each row has to be the same, in other words it is allowed to have two rows with two segments each but not to have one row with one segment and another with two.
+Check [this page](@ref multi_row) to learn more about how to use multiple rows.
+
+\~german
+\page 1.x.y_to_2.0.z Migration von 1.x.y zu 2.0.z
+
+2.0.0 ist nicht vollständig veröfftlicht, aber seit 2.0.0-rc1 werden nur noch Fixes und Dokumentation hinzugefügt, also sind diese Anweisungen final.
+
+Version 2.0.x ist nicht mehr ein einfacher Ersatz für 1.7.x!
+Wegen einiger großer Änderungen ist der sakurajin::LedController nun eine Template Klasse welche die Dimensionen der Led_Matrix als Argument benötigt.
+So wird nun statt dem Typ `LedController` der Typ `sakurajin::LedController` benötigt.
+Dies vereinfacht das Interface und verringert den Bedarf von Pointern.
+Alle Beispiele wurden mit den Änderungen geupdated und die Dokumentation ist nun auch auf deutsch verfügbar.
+Da die Dimensionen nun bekannt sind, wird nicht mehr die Anzahl der Sgemente benötigt und sie wurde von allen Kontruktoren entfernt.
+
+2.0.x führt die sakurajin::controller_configuration Template Klasse ein.
+Zwar existiert controller_configuration schon in 1.7.2, allerdings ist diese Klasse nun auch ein Template und kann viel mehr.
+Wie der sakurajin::LedController braucht auch diese Klasse die Dimensionen der Matrix und diese müssen auch mit dem sakurajin::LedController übereinstimmen.
+Die Klasse wird [aus dieser Seite](@ref controller_configuration_page) im Detail beschrieben.
+
+Die nächste neue große Änderung ist die Unterstützung von mehreren Reihen von Segmenten.
+Nun können mehrere Matrizen an verschiedene CS Pins angeschlossen werden und mit einem einzigen sakurajin::LedController gesteuert werden.
+Alternativ können alle Segmente in Reihe angeschlossen werden, jdeoch in mehreren Reihen angeordnet werden.
+Diese Funktion nennt sich virtual multi row und kann in der sakurajin::controller_configuration gesetzt werden.
+Damit diese Funktion richtig funktioniert müssen alle Reiehen die gleiche Länge haben.
+Schaue auf [dieser Seite](@ref multi_row) nach um zu erfahren, wie man mehrere Reihen richtig nutzt.
+
+*/
diff --git a/doc/pages/controller_configuration.doc b/doc/pages/controller_configuration.doc
new file mode 100644
index 00000000..49df313a
--- /dev/null
+++ b/doc/pages/controller_configuration.doc
@@ -0,0 +1,154 @@
+/*!
+
+\~english
+\page controller_configuration_page The controller_configuration
+
+Check the sakurajin::controller_configuration for more infomation about its functions or look for the [Examples](examples.html).
+
+This tutorial explains some of the fields of the sakurajin::controller_configuration and how to use it properly.
+All the attributes are explained on the [page for the sakurajin::controller_configuration](@ref sakurajin::controller_configuration), look there if anything is missing.
+On this page each option also lists when it was introduced.
+
+\section configuration_required_fields Required choices/options
+
+To determine the required options there are a few choices that need to be made.
+
+\subsection configuration_spi_choices SPI configuration
+
+First off you need to choose between Hardware SPI and Software SPI.
+You can find more information about it on [this page](@ref SPI_intro).
+
+If you choose Software SPI you need to set the following options:
+
+
+ sakurajin::controller_configuration.mosi_pin The pin that handles the Master Out Slave In Signal (since 1.7.2)
+ sakurajin::controller_configuration.clk_pin The pin that handles the Clock Signal (since 1.7.2)
+ sakurajin::controller_configuration.useHardwareSpi must be false (the default value) (since 1.7.2)
+
+
+If you choose hardware SPI the following option need to be set:
+
+
+ sakurajin::controller_configuration.useHardwareSpi must be true (since 1.7.2)
+
+
+\subsection configuration_multi_row Multi Row configuration
+
+First off this decision has to be made even if there is only one row (in that case it does not matter which one since they behave the same).
+For the multi row support you have to decide between virtual multi row or real multi row.
+You can read the [page on multi row](@ref multi_row) for more information on how this works.
+
+Virtual multi row is the default and the enabled mode when no changes are mode from previous versions.
+For virtual multi row you have to set the following options:
+
+
+ sakurajin::controller_configuration.cs_pin The pin that enables the SPI transfer to the Matrix (since 1.7.2)
+ sakurajin::controller_configuration.virtual_multi_row must be true (the default value) (since 2.0.0)
+
+
+For real multi row the following option have to be set:
+
+
+ sakurajin::controller_configuration.virtual_multi_row must be false (since 2.0.0)
+ sakurajin::controller_configuration.row_cs_pin has to be set. Each index has to differ from 0 and needs to be set (since 2.0.0)
+
+
+If you only have one row you can set either SPI_CS or row_SPI_CS[0] and you can ignore virtual_multi_row.
+
+\section configuration_optional_fields Optional choices/options
+
+The following options are optional and the default value should work fine in most cases.
+
+
+ sakurajin::controller_configuration.debug_output Enables debug output via Serial.println (needs initilisation since that is not done by this library) (default: false) (since 2.0.0)
+ sakurajin::controller_configuration.spiTransferSpeed Sets the transfer speed of the SPI Interface when hardware SPI is used (default: 8000000) (since 2.0.0)
+ sakurajin::controller_configuration.onlySendOnChange When this option is set the sakurajin::LedController only sends needed changes (default: true) (since 2.0.0)
+ sakurajin::controller_configuration.IntensityLevel The brightness all of the segments should have (default: 1) (since 1.7.2)
+
+
+\section removed_configuration_options Removed choices/options
+
+The following options where removed at some point.
+
+
+ rows Lists the number of rows (only existing 1.7.2)
+ row_SPI_CS has been changed from pointer to an actual array with fixed size (only existing 1.7.2)
+
+
+
+\~german
+\page controller_configuration_page Die controller_configuration Klasse
+
+Schau of die Seite der sakurajin::controller_configuration für mehr Informationen oder schau in die [Beispiele](examples.html).
+
+Diese Seite erklärt die Felder der sakurajin::controller_configuration Klasse und wie sie verwendet werden.
+Alle Attribute sind auf der [Seite der sakurajin::controller_configuration](@ref sakurajin::controller_configuration) aufgelistet.
+Außerdem steht bei jeder Option wann sie hinzugefügt wurde.
+
+\section configuration_required_fields Benötigte Entscheidungen/Optionen
+
+Um die benötigten Optionen zu bestimmen, müssen ein paar Entscheidungen getroffen werden.
+
+\subsection configuration_spi_choices SPI Konfiguration
+
+Zuerst muss zwischen hardware SPI und software SPI entschieden werden.
+Mehr Informatioen über die Entscheidung können [auf dieser Seite](@ref SPI_intro) gefunden werden,
+
+Falls spftware SPI verwendet wird müssen die folgenden Optionen gesetzt werden:
+
+
+ sakurajin::controller_configuration.mosi_pin Der Pin, der das Master Out Slave In Signal handhabt (since 1.7.2)
+ sakurajin::controller_configuration.clk_pin Der Pin, der das Clock Signal handhabt (since 1.7.2)
+ sakurajin::controller_configuration.useHardwareSpi muss false sein (the default value) (since 1.7.2)
+
+
+Falls hardware SPI verwendet wird müssen die folgenden Optionen gesetzt werden:
+
+
+ sakurajin::controller_configuration.useHardwareSpi muss true sein (since 1.7.2)
+
+
+\subsection configuration_multi_row Multi Row Konfiguration
+
+Diese Entscheidung muss selbst getroffen werden wenn nur eine Zeile verwendet wird (auch wenn beide Entscheidungen sich in dem Fall gleich verhalten).
+Es muss zwischen virtual multi row oder real multi row entschieden werden.
+Auf der [Seite über multi row](@ref multi_row) kann man mehr über die funktionsweise lesen.
+
+Virtual multi row ist der Standard und das was verwendet wird, wenn man den code von vorherigen Versionen verwendet.
+Für virtual multi row müssen die folgenden Optionen gesetzt werden:
+
+
+ sakurajin::controller_configuration.cs_pin Der Pin, der das Chip Select Signal der Matrix handhabt (since 1.7.2)
+ sakurajin::controller_configuration.virtual_multi_row muss true sein (the default value) (since 2.0.0)
+
+
+Für real multi row müssen die folgenden Optionen gesetzt werden:
+
+
+ sakurajin::controller_configuration.virtual_multi_row muss false sein (since 2.0.0)
+ sakurajin::controller_configuration.row_cs_pin Jeder Index muss auf einen Wert ungleich 0 gesetz sein. (since 2.0.0)
+
+
+Falls nur eine Zeile vorhanden ist kann entweder SPI_CS oder row_SPI_CS[0] gesetzt werden und virtual_multi_row kann ignoriert werden.
+
+\section configuration_optional_fields Optionale Entscheidungen/Optionen
+
+Die folgenden Optionen sind optional und der Standardwert sollte in den meisten Fällen einfach funktionieren.
+
+
+ sakurajin::controller_configuration.debug_output Aktiviert debug output über Serial.println (Initialisierung vor Verwendung benötigt) (default: false) (since 2.0.0)
+ sakurajin::controller_configuration.spiTransferSpeed Setzt die Übertragungsgeschwindigkeit wenn Hardware SPI verwendet wird (default: 8000000) (since 2.0.0)
+ sakurajin::controller_configuration.onlySendOnChange Wenn diese Option verwendet wird, werden nur Änderungen gesendet (default: true) (since 2.0.0)
+ sakurajin::controller_configuration.IntensityLevel Die Helligkeit aller Segmente (default: 1) (since 1.7.2)
+
+
+\section removed_configuration_options Entfernte Entscheidungen/Optionen
+
+Die folgenden Optionen wurden bei einer bestimmten Version entfernt.
+
+
+ rows Gibt die Zahl der Zeilen an (nur in 1.7.2)
+ row_SPI_CS ist nun ein festes Array statt ein pointer wie es vorher der fall war (nur 1.7.2)
+
+
+*/
\ No newline at end of file
diff --git a/doc/pages/index.doc b/doc/pages/index.doc
new file mode 100644
index 00000000..0a03a507
--- /dev/null
+++ b/doc/pages/index.doc
@@ -0,0 +1,110 @@
+/*!
+\mainpage
+
+\~english
+
+sakurajin::LedController is an [Arduino](http://arduino.cc) library for MAX7219 and MAX7221 Led display drivers.
+The code should work with most boards and architectures but I only test it for the ESP32 Dev Module.
+Feel free to create an issue if something is missing or not working correctly.
+Version 2.0.0 should have increased compatibility since the library is now header only and uses templates.
+The only reason why some boards are not compatible is because they do now provide the necessary dependencies or are not compatible with the Arduino framework.
+
+The CI automatically tests the following boards(PlatformIO boards names):
+
+- esp32dev
+- d1_mini
+- uno
+- ATmega1280
+- leonardo
+- due (since 2.0.0)
+- teensy41 (since 2.0.0)
+- bluefruitmicro (since 2.0.0)
+
+The fast mode of the script tests the following boards:
+
+- esp32dev
+- ATmega1280
+
+All help regarding compatibility with more boards is welcome.
+
+\section Documentation
+
+The following links lead to their respective documentation:
+
+- [LedController class](@ref sakurajin::LedController)
+- [LedController configuration class](@ref sakurajin::controller_configuration)
+- [Installation](@ref install)
+- [Usage introduction](@ref usage)
+- [Migration information](@ref migration_notes)
+- [Example code](examples.html)
+
+If you have questions check the [dicussions](https://github.com/noah1510/LedController/discussions) or open a new one.
+
+\section Hardware SPI Pin Assignments
+
+If you want to use hardware SPI you have to use the following port.
+Please keep in mind that the MOSI(Master out Slave in) and the SCK(Serial Clock) signal can be shared by multiple SPI devices, while the SS(Slave Select) signal must be unique to every device(You can use every free pin for this).
+
+| Arduino Board | MOSI | MISO | SCK | SS (Slave) | SS (Master) |
+|---------------|------|------|-----|------------|-------------|
+| Uno or Duemilanove | 11 or ICSP-4 | 12 or ICSP-1 | 13 or ICSP-3 | 10 | - |
+| Mega1280 or Mega2560 | 51 or ICSP-4 | 50 or ICSP-1 | 52 or ICSP-3 | 53 | - |
+| Leonardo | ICSP-4 | ICSP-1 | ICSP-3 | - | - |
+| Due | ICSP-4 | ICSP-1 | ICSP-3 | - | 4, 10, 52 |
+| Deek-Robot Arduino | 11 | 12 | 13 | - | 10 |
+| ESP32-WROOM | 23 | 19 | 18 | - | 5 |
+
+\~german
+
+sakurajin::LedController ist eine [Arduino](http://arduino.cc) Biliothek für MAX7219 und MAX7221 Led Displaytreiber.
+Der Code sollte mit den meisten boards und Architekturen funktionieren, aber ich teste es allerdings nur mit ESP32 Dev Module.
+Fall etwas nicht richtig funktioniert öffne bitte ein Issue (nur englisch).
+Seid Version 2.0.0 sollte die Kompatibilität sehr viel größer sein, da sakurajin::LedController nun ein template ist und (fast) nur in headern geschrieben ist.
+Wenn ein Board nicht Kompatibiliel ist, unterstützt es nicht das Arduino Framework oder stellt keine SPI.h bereit.
+
+In der CI werden wie folgenden Boards automatisch getestet (PlatformIO boards Namen):
+
+- esp32dev
+- d1_mini
+- uno
+- ATmega1280
+- leonardo
+- due (since 2.0.0)
+- teensy41 (since 2.0.0)
+- bluefruitmicro (since 2.0.0)
+
+Der fast mode aus dem script testet die folgenden boards:
+
+- esp32dev
+- ATmega1280
+
+Alles an Hilfe mit der Kompatibilität ist willkommen.
+
+\section Dokumentation
+
+Die folgenden Liks führen zur entsprechenden Dokumentation:
+
+- [LedController Klasse](@ref sakurajin::LedController)
+- [LedController configuration Klasse](@ref sakurajin::controller_configuration)
+- [Installation](@ref install)
+- [Nutzungseinführung](@ref usage)
+- [Migrationsinformationen](@ref migration_notes)
+- [Beispielcode](examples.html)
+
+Bei Fragen schaut in die [dicussions](https://github.com/noah1510/LedController/discussions) oder öffnet eine neue (ausschließlisch auf englisch).
+
+\section Hardware SPI Pin Zuweisung
+
+Falls du hardware SPI nutzten möchtest müssen die folgenden Ports verwendet werden.
+Bitte beachte, dass das MOSI(Master out Slave in) und das SCK(Serial Clock) Signal von mehreren SPI Geräten gnutzt werden kann, während SS(Slave Select) einzigartig für jedes Gerät sein muss(ein bliebiger Pin kann verwendet werden).
+
+| Arduino Board | MOSI | MISO | SCK | SS (Slave) | SS (Master) |
+|---------------|------|------|-----|------------|-------------|
+| Uno or Duemilanove | 11 or ICSP-4 | 12 or ICSP-1 | 13 or ICSP-3 | 10 | - |
+| Mega1280 or Mega2560 | 51 or ICSP-4 | 50 or ICSP-1 | 52 or ICSP-3 | 53 | - |
+| Leonardo | ICSP-4 | ICSP-1 | ICSP-3 | - | - |
+| Due | ICSP-4 | ICSP-1 | ICSP-3 | - | 4, 10, 52 |
+| Deek-Robot Arduino | 11 | 12 | 13 | - | 10 |
+| ESP32-WROOM | 23 | 19 | 18 | - | 5 |
+
+*/
diff --git a/doc/pages/install.doc b/doc/pages/install.doc
new file mode 100644
index 00000000..1b0bedc0
--- /dev/null
+++ b/doc/pages/install.doc
@@ -0,0 +1,76 @@
+/*!
+
+\~english
+\page install Installation instructions
+
+If you want to see how to use the library look [here](@ref usage)
+
+\section arduino_install Arduino Ide
+
+The library is in the Arduino library manager.
+
+1. Open your [Arduino](http://arduino.cc) IDE.
+2. Click on Tools, Manage Libraries..
+3. Type `LedController` in the search bar.
+4. Select the version you want and click install.
+5. That was it you are ready to use the library.
+
+\section PlatformIO
+
+The [library](https://platformio.org/lib/show/7144/LedController) is also available for the [platform.io](https://platformio.org/platformio) library manager.
+Since they get their information from the Arduino Library Manager and the git repository, their version might not be up to date.
+In addition to that, they do not provide release candidates.
+
+\subsection CLI
+
+Just type `pio lib install "LedController"` or `python -m platformio lib install "LedController"` to install the library.
+
+\subsection vsx_install Visual Studio Code extention
+
+Either open a command line and use the CLI instructions or do the following steps:
+
+1. Open [Visual Studio Code](https://code.visualstudio.com/)
+2. Install the [platform.io extention](https://platformio.org/platformio-ide) and wait till it is installed and configured
+3. Open the PlatformIO home (by clicking on the little house symbol)
+4. Click on the libraries tab.
+5. Type `LedController` in the search bar and click on the result named `LedController`
+6. Select the Version you want to install and click on install.
+
+\~german
+\page install Installationsanweisungen
+
+Falls du wissen möchstest, wie man die Bibliothek verwendet klicke [hier](@ref usage).
+
+\section arduino_install Arduino Ide
+
+Diese Bibliothek ist im Arduino library manager.
+
+1. Öffne deine [Arduino](http://arduino.cc) IDE.
+2. Klicke auf Werkzeuge, Bibliotheken verwalten..
+3. Tippe `LedController` in die Suchleiste.
+4. Wähle die gewünschte Version und klicke auf installieren.
+5. Das war alles, du kannst die Bibliothek jetzt nutzen.
+
+\section PlatformIO
+
+Die [Bibliothek](https://platformio.org/lib/show/7144/LedController) ist auch für den [platform.io](https://platformio.org/platformio) library manager verfügbar.
+Da diese ihre Informationen von Arduino bekommen, sind sie nicht immer auf dem neusten Stand.
+Scheinbar sind hier auch keine Realease Candidate versionen verfügbar.
+
+\subsection CLI
+
+Einfach `pio lib install "LedController"` oder `python -m platformio lib install "LedController"` eingeben um die Bibliothek zu installieren.
+Dies funktioniert, wenn platformio bereits über python installiert ist.
+
+\subsection vsx_install Visual Studio Code Erweiterung
+
+Either open a command line and use the CLI instructions or do the following steps:
+
+1. Öffne [Visual Studio Code](https://code.visualstudio.com/)
+2. Installiere die [platform.io extention](https://platformio.org/platformio-ide) und warte bis sie installiert und konfiguriert ist.
+3. Öffne das PlatformIO home (auf das kleine Haus Symbol klicken)
+4. Klicke auf den libraries Tab.
+5. Gebe `LedController` in die Suchleiste ein und klick auf das Ergebnis `LedController`
+6. Wähle die gewünschte Version and klick auf install.
+
+*/
diff --git a/doc/pages/language_selection.doc b/doc/pages/language_selection.doc
new file mode 100644
index 00000000..88f48111
--- /dev/null
+++ b/doc/pages/language_selection.doc
@@ -0,0 +1,15 @@
+/*!
+
+\~english
+\page lang_selection Select a Language
+
+Click [here](../index.html) to choose one of the available languages.
+Or click [here](../german/index.html) to go to the German documentation directly.
+
+\~german
+\page lang_selection Wähle eine Sprache
+
+Klicke [hier](../index.html), um unter den verfügbaren Sprachen auszuwählen.
+Oder klicke [hier](../english/index.html), um direkt zur englishen Dokumentation zu kommen.
+
+*/
diff --git a/doc/pages/migration_notes.doc b/doc/pages/migration_notes.doc
new file mode 100644
index 00000000..a34fff0a
--- /dev/null
+++ b/doc/pages/migration_notes.doc
@@ -0,0 +1,40 @@
+/*!
+
+\~english
+\page migration_notes Migration Notes
+
+This pages contains some basic information on the transition from one release to another and lists where changes are necessary.
+
+## 1.x.y to 2.0.z
+
+No matter which version you come from there are a lot of changes for version 2.0.x.
+Please read the full guide [here](@ref 1.x.y_to_2.0.z) to learn what changes are necessary to get your code working with release 2.0.x.
+Spoiler: no matter how you have written your code it needs changes since the sakurajin::LedController is now a template.
+
+## 1.6.x to 1.7.x
+
+Unless you used ByteBlock as return type and relied on that there should nothing that breaks compatibility.
+
+As of release 1.7.x there is no support for the std data types to reduce the codebase.
+If you do not want to use a pointer to an Array as a parameter to return the result, please wait for release 2.0.x where sakurajin::ByteBlock is implemented as a class and can be returned by functions (there are other bigger changes that make that transition a bit more complicated).
+
+\~german
+\page migration_notes Migrationsinformationen
+
+Diese Seite beinhaltet gererelle Informationen über den Umstieg von einem Release zu einem anderen und erwähnt die Änderungen, die gemacht werden müssen.
+
+## 1.x.y zu 2.0.z
+
+Egal von welcher Version man aus updated, es werden Änderungen für die Version 2.0.x benötigt.
+Lies die vollständige Anweisung [hier](@ref 1.x.y_to_2.0.z), um zu lernen welche Änderungen am Code notwendig sind, damit dieser mit Version 2.0.x funktioniert.
+Da der sakurajin::LedController nun ein Template ist, werden definitiv Änderungen benötigt.
+
+## 1.6.x zu 1.7.x
+
+Außer man verwendet Funktionen, welche ByteBlock als Rückgabewert haben, gibt es nicht was die Kompatibilität verhindert.
+
+Seit Version 1.7.x ist die Unterstützung für die std Datentypen entfernt, um eine Einheitlichere Codebase zu haben.
+Wenn du nicht Pointer auf Arrays als Rückgabe verwenden willst, wechsel einfach direkt auf Version 2.0.x.
+Da sakurajin::ByteBlock dort eine Klasse ist, kann diese auch wieder Rückgabewert sein (allerdings sind die [vollständigen Anweisungen](@ref 1.x.y_to_2.0.z) zu beachten).
+
+*/
diff --git a/doc/pages/movement.doc b/doc/pages/movement.doc
new file mode 100644
index 00000000..1740dbbf
--- /dev/null
+++ b/doc/pages/movement.doc
@@ -0,0 +1,107 @@
+/*!
+
+\~english
+\page movement Moving the displayed data
+
+Check the sakurajin::LedController for more infomation about its functions or look for the [Examples](examples.html).
+
+This pages describes how to move the displayed data around and what you need to know when using the functions.
+As of version 2.0.0 the movement functions are aware of the number of rows and columns and use return types with the correct size.
+To see details on how to use multiple rows check [this](@ref multi_row) page.
+These instructiotions only work as intended when you use an Led Matrix!
+
+All versions since 1.5.0 support some form of data movement but this page will focus on how the movement functions work as of version 2.0.0.
+The functions marked as deprecated will not be explained and only exist for better compatibility.
+You should not use those and start migrating to the new functions.
+
+There are 4 directions you can move the data in: up, down, left and right.
+You can either move all rows/columns or a single row/column.
+
+\section move_single Moving a single Row/Column
+
+sakurajin::LedController.moveRowLeft and sakurajin::LedController.moveRowRight move a single Row left/right.
+The required Argument is the number of the row that should be shifted and the byte that should be shifted in.
+It returns the byte that was shifted out.
+The bytes that are shifted in and out have the LSB (least significant bit) on the bottom.
+
+sakurajin::LedController.moveColumnDown and sakurajin::LedController.moveColumnUp move a single Column down/up.
+The required Argument is the number of the column that should be shifted and the byte that should be shifted in.
+It returns the byte that was shifted out.
+The bytes that are shifted in and out have the LSB (least significant bit) on the right.
+
+\section move_all Moving all Rows/Columns
+
+The sakurajin::LedController.moveLeft and sakurajin::LedController.moveRight functions moves all columns left/right by one pixel.
+If nothing is given 0 will be shifted in.
+If you want to shift some data in you have to pass the parameter `const sakurajin::ByteRow& shiftedInColumn`.
+It is an sakurajin::ByteRow with the length of your number of rows.
+In other words if you have 1 row the type is `sakurajin::ByteRow<1>` or `byte[1]` and if you have 2 rows it is `sakurajin::ByteRow<2>` or `byte[2]` and so on.
+Index 0 of the row corresponds to columns 0 of the Matrix, in other words the bottom segment is first.
+The function will retun a sakurajin::ByteRow with the same length as the input.
+The returned sakurajin::ByteRow is the Column that was shifted out as because of the movement.
+
+The sakurajin::LedController.moveUp and sakurajin::LedController.moveDown functions moves all rows up/down by one pixel.
+If nothing is given 0 will be shifted in.
+If you want to shift some data in you have to pass the parameter `const sakurajin::ByteRow& shiftedInColumn`.
+It is an sakurajin::ByteRow with the length of your number of columns.
+In other words if you have 1 column the type is `sakurajin::ByteRow<1>` or `byte[1]` and if you have 2 column it is `sakurajin::ByteRow<2>` or `byte[2]` and so on.
+Index 0 of the row corresponds to row 0 of the Matrix, in other words the left segment is first.
+The function will retun a sakurajin::ByteRow with the same length as the input.
+The returned sakurajin::ByteRow is the Row that was shifted out as because of the movement.
+
+Check [Led-matrix-rocket-multi.ino](@ref Led-matrix-rocket-multi.ino) to see how this can be implemented.
+
+
+\~german
+\page movement Bewegen der angezeigten Daten
+
+Schau auf die Seite des sakurajin::LedController für mehr Informationen über dessen Funktionen schau in die [Beispiele](examples.html).
+
+Diese Seite beschreibt das Bewegen der angezeigten Daten und was man für die Nutzung der Funktionen wissen muss.
+Seit Version 2.0.0 beachten die Bewegungsfunktionen die Anzahl der Zeilen und Spalten und nutzen Rückgabewerte mit der richtigen Größe.
+Für mehr Details über mehrere Zeile schaue auf [dieser Seite](@ref multi_row) nach.
+Diese Anweisungen funktionieren nur richtig beim Verwenden einer Led Matrix!
+
+Alle Versionen seit Version 1.5.0 unterstützen eine Form von Bewegungsfunktionen, aber diese Seite beschreibt wie diese Funktionen seit Version 2.0.0 funktionieren.
+Die als veraltet markierten Funktionen werden nicht erklärt und existieren nur, um den Umstieg auf Version 2.0.0 zu erleichtern.
+Wenn man diese Funktionen noch verwendet, sollte man anfangen zu den neuen Funktionen zu wechseln.
+Die veralteten Funktionen haben auch keine deutsche Beschreibung, um von der Verwendung weiter abzuraten.
+
+Man kann die Daten in 4 Richtungen verschieben: hoch, runter, links und rechts.
+Man kann entweder alle Zeilen/Spalten oder nur eine einzelne Zeile/Spalte auf einmal verschieben.
+
+\section move_single Bewegen einzelner Zeilen/Spalten
+
+sakurajin::LedController.moveRowLeft und sakurajin::LedController.moveRowRight bewegen eine einzelne Zeile nach links/rechts.
+Das benötigte Argument ist die Nummer, der Zeile, die bewegt werden soll und das byte welches reingeschoben werden soll.
+Die Funktion gibt das byte zurück, was rausgeschoben wird.
+Die bytes die rein- und rausgeschoben werden, haben das LSB (Least Significant bit, also die letzte Stelle) unten.
+
+sakurajin::LedController.moveColumnUp und sakurajin::LedController.moveColumnDown bewegen eine einzelne Splate nach oben/unten.
+Das benötigte Argument ist die Nummer, der Spalte, die bewegt werden soll und das byte welches reingeschoben werden soll.
+Die Funktion gibt das byte zurück, was rausgeschoben wird.
+Die bytes die rein- und rausgeschoben werden, haben das LSB (Least Significant bit, also die letzte Stelle) rechts.
+
+\section move_all Bewegen aller Zeilen/Spalten
+
+sakurajin::LedController.moveLeft und sakurajin::LedController.moveRight bewegen alle Zeilen einen Pixel nach links/rechts.
+Wenn nichts übergeben wird, wird 0 reingeschoben.
+Wenn Daten reingeschoben werden sollen muss das Parameter `const sakurajin::ByteRow& shiftedInColumn` übergeben werden.
+Es ist eine sakurajin::ByteRow mit der Anzahl der Zeilen als Länge.
+In anderen Worten, bei einer Zeile ist der Datentyp `sakurajin::ByteRow<1>` oder `byte[1]` und wenn man 2 Zeilen hatist er `sakurajin::ByteRow<2>` oder `byte[2]` und so weiter.
+Index 0 der sakurajin::ByteRow entspricht der Spalte 0 der Matrix , in anderen Worten das Segment unten zuerst.
+Die Funktion gibt eine sakurajin::ByteRow mit der gleichen Länge wie die Eingabe zurück.
+Der Rückgabewert entspricht der Rausgeschobenen Splate.
+
+sakurajin::LedController.moveUp und sakurajin::LedController.moveDown bewegen alle Splaten einen Pixel nach oben/unten.
+Wenn nichts übergeben wird, wird 0 reingeschoben.
+Wenn Daten reingeschoben werden sollen muss das Parameter `const sakurajin::ByteRow& shiftedInColumn` übergeben werden.
+Es ist eine sakurajin::ByteRow mit der Anzahl der Splaten als Länge.
+In anderen Worten, bei einer Splate ist der Datentyp `sakurajin::ByteRow<1>` oder `byte[1]` und wenn man 2 Splaten hatist er `sakurajin::ByteRow<2>` oder `byte[2]` und so weiter.
+Index 0 der sakurajin::ByteRow entspricht der Zeile 0 der Matrix , in anderen Worten das Segment links zuerst.
+Die Funktion gibt eine sakurajin::ByteRow mit der gleichen Länge wie die Eingabe zurück.
+Der Rückgabewert entspricht der Rausgeschobenen Zeile.
+
+Schaue [Led-matrix-rocket-multi.ino](@ref Led-matrix-rocket-multi.ino) an um zu sehen wie dies implementiert werden kann.
+
+*/
diff --git a/doc/pages/multi_row.doc b/doc/pages/multi_row.doc
new file mode 100644
index 00000000..c5cff76c
--- /dev/null
+++ b/doc/pages/multi_row.doc
@@ -0,0 +1,118 @@
+/*!
+
+\~english
+\page multi_row Controlling multiple rows
+
+Check the sakurajin::LedController for more infomation about its functions or look for the [Examples](examples.html).
+
+As of version 2.0.0 the sakurajin::LedController supports controlling multiple rows from one sakurajin::LedController object.
+This introduction explains everything you need to know to use multiple rows.
+
+\section multi_data_structure Data structure
+
+First look at the image below.
+It explains the data structure of the segments.
+Each square represents one segment and the example has a total of 8 Segments with 4 Segments in each row.
+\image html multi_row_numbering.svg "Data order of the Segements" width=50%
+
+As you can see the 0 is in the bottom left corner (unless you rotate your matrix).
+When you create a new sakurajin::LedController object it is required to specifiy the dimensions of the matrix, in other words the number of columns and rows.
+For this example the type of the sakurajin::LedController would be `sakurajin::LedController<4,2>` because there are 4 columns and 2 rows.
+These dimensions can be an arbitary size as long as you have enough memory (you will notice if you don't have enough).
+
+The example [sakurajin::LedControllerDemoRocketMulti](@ref Led-matrix-rocket-multi.ino) will be used to demonstrate each of the parts that need to be done.
+
+\section valid_multi_conf Creating a valid sakurajin::controller_configuration
+
+If you have a different Chip Select pin for each row, you need to create a custom sakurajin::controller_configuration with the same dimensions as your controller.
+By default it is assumed that all of the segments are connected in series in the order of their indexes.
+
+If you want each row to be connected to a different CS pin you need to set row_SPI_CS to the correct values.
+`row_SPI_CS[0]` should be set to the pin of row 0 and `row_SPI_CS[1]` to the pin of row 1.
+**You have to set the pin of each row to a unique value or you might encounter issues!**
+You also have to set SPI_CS to 0 or virtual_multi_row to false.
+One of those two is enough but setting both makes sure that virtual_multi_row is disabled.
+
+Below is an example of how the sakurajin::controller_configuration might be created for this example.
+
+\code{cpp}
+ sakurajin::controller_configuration<4,2> conf;
+ conf.cs_pin = 0;
+ conf.virtual_multi_row = false;
+
+ conf.row_cs_pin[0] = 25;
+ conf.row_cs_pin[1] = 15;
+\endcode
+
+If you want to use virtual_multi_row (have all of the segments connected in series) then you have to set SPI_CS to you CS pin and set virtual_multi_row to true (which is the default).
+As long as those conditions are satisfied, the values of row_SPI_CS will be ignored.
+
+Look at the [sakurajin::controller_configuration page](@ref controller_configuration_page) for details on how to use all of the other fields.
+
+\section display_multi_data Displaying data on segments
+
+Now you can display data just as in [usage information](@ref usage) using `setSegment` with the coordinates of the segment.
+`getConfig().getSegmentNumber` can be used to calculate the segment index which is required by the `setRow` and `setColumn` function to set a single row or column.
+
+
+\~german
+\page multi_row Steuern von mehreren Zeilen
+
+Schau auf die Seite des sakurajin::LedController für mehr Informationen über dessen Funktionen schau in die [Beispiele](examples.html).
+
+Seit Vesion 2.0.0 kann mit einem sakurajin::LedController Objekt mehr als eine Zeile gesteuert werden.
+Diese Einführung erklärt alles was man wissen muss um mehrere Zeilen verwenden zu können
+
+\section multi_data_structure Datenstruktur
+
+Das Bild beschreibt die Datenstruktur der Segmente bei einer Matrix.
+Jedes Quadrat steht für ein Segment und in diesem Beispiel gibt es insgesamt 8 Segmente mit 4 Segmenten pro Reihe.
+(Kleine Übersetzungshinweis: Row heißt Zeile, Column heißt Splate)
+\image html multi_row_numbering.svg "Datenstruktur der Segmente" width=50%
+
+Wie man sehen kann ist die 0 in der Ecke unten links (außer man sreht die Matrix).
+Wenn ein neues sakurajin::LedController objekt erstellt wird, müssen die Dimensionen der matrix angegeben werden, also die Zahl der Zeilen und Spalten.
+In diesem Beispiel wäre der Datentyp des sakurajin::LedController `sakurajin::LedController<4,2>`, da es 4 Splaten und 2 Zeilen hat.
+Die Dimensionen können beliebig groß sein, solang man genug Arbeitsspeicher und Hardware besitzt.
+
+Das Beispiel [sakurajin::LedControllerDemoRocketMulti](@ref Led-matrix-rocket-multi.ino) wird genutzt um zu zeigen wie man mehrere Zeilen nutzt.
+
+\section valid_multi_conf Erstellen einer gültigen sakurajin::controller_configuration
+
+Falls man verschiedene CS pins für die einzelnen Zeilen verwenden möchte, dann muss man eine eigene sakurajin::controller_configuration erstellen, welche die selben Dimensionen hat wie der sakurajin::LedController.
+Standardmäßig wird angenommen, dass alle Segment in Reihe der Indexe angeschlossen sind.
+
+If you want each row to be connected to a different SPI pin you need to set row_SPI_CS to the correct values.
+`row_SPI_CS[0]` should be set to the pin of row 0 and `row_SPI_CS[1]` to the pin of row 1.
+**You have to set the pin of each row to a unique value or you might encounter issues!**
+You also have to set SPI_CS to 0 or virtual_multi_row to false.
+One of those two is enough but setting both makes sure that virtual_multi_row is disabled.
+
+Falls man jede Reihe an ein eigenen CS pin anschließen will muss row_SPI_CS auf den richtigen Wert gesetzt werden.
+`row_SPI_CS[0]` sollte auf den pin von Zeile 0 und `row_SPI_CS[1]` auf den pin von Zeile 1 gesetzt werden.
+Jede Zeile sollte einen einzigartigen Wert besitzen ansonsten kommt es zu Problemen!
+Außerdem müssen SPI_CS auf 0 und/oder virtual_multi_row auf false gesetzt werden.
+Eins der beiden reicht theoretisch aus, aber sicher ist sicher.
+
+Hier ist ein Beispiel wie eine gültige sakurajin::controller_configuration für dieses Beispiel aussehen könnte.
+
+\code{cpp}
+ sakurajin::controller_configuration<4,2> conf;
+ conf.cs_pin = 0;
+ conf.virtual_multi_row = false;
+
+ conf.row_cs_pin[0] = 25;
+ conf.row_cs_pin[1] = 15;
+\endcode
+
+Falls virtual_multi_row (alle Segmente in Reihe geschaltet) verwendet werden soll, dann muss SPI_CS auf den gewünschten CS pin gesetzt werden und virtual_multi_row muss true sein (was der Standardwert ist).
+Solange diese beiden Bedingungen erfüllt sind wird der Wert von row_SPI_CS ignoriert.
+
+Schau die [sakurajin::controller_configuration Seite](@ref controller_configuration_page) für die Details über die anderen Felder an.
+
+\section display_multi_data Daten auf den Segmenten anzeigen
+
+Nun können Daten wie in [usage information](@ref usage) beschreiben mit `setSegment` mit den Koordinaten des Segments angezeigt werden.
+`getConfig().getSegmentNumber` kann verwendet werden um die Segmentnummer zu bestimmen, welche mitunter für sakurajin::LedController.setRow und sakurajin::LedController.setColumn benötigt wird.
+
+*/
diff --git a/doc/pages/usage.doc b/doc/pages/usage.doc
new file mode 100644
index 00000000..69045956
--- /dev/null
+++ b/doc/pages/usage.doc
@@ -0,0 +1,167 @@
+/*!
+
+\~english
+\page usage How to use this library
+
+Check the sakurajin::LedController for more infomation about its functions or look for the [Examples](examples.html).
+
+This page shows you the basic usage of the sakurajin::LedController and what you can do with it.
+
+\section init_lib Initilizing the Library
+
+You can initilize the library in two ways: with hardware SPI or with software SPI.
+
+1. Hardware SPI is at least 10 times faster but you can only use specific pins for some signals (look [here](index.html) for which pins).
+2. Software SPI is slower (which only mattesrs if you need really tight timings) but you can freely choose which (free) pins you want to use.
+
+\subsection SPI_intro Small introduction to SPI
+
+The Serial Peripheral Interface (SPI) is a synchronous serial communication interface specification used for short-distance communication, primarily in embedded systems.
+In this case your microcontroller is the master which controls the slave (at least one 7-Segment display or led matrix).
+
+The master has three significant pins: SCLK(Serial Clock), MOSI(Master Out Slave In), SS(Slave Select).
+The slave also has tree needed pins (and two for power(GND and VCC)): CLK(Clock), DIN(Data In), CS(Ship Select).
+SCLK has to be connected to CLK and MOSI to DIN.
+These signals can be shared by multiple SPI slaves even if they have nothing to do with each other.
+SS has to be connected to CS and each Slave has its own SS pin(which can be any free pin).
+
+\section getting_started Getting started
+
+To get started you need to first create a new sakurajin::controller_configuration object.
+This is used to configure the setup of the sakurajin::LedController which can get complex.
+sakurajin::controller_configuration has no constructor and is more like an struct with methods than it is a 'real' class.
+Because it is a template you need to know the dimension of your Matrix which causes the type to be `sakurajin::controller_configuration`.
+To see how you can use more than one row with the sakurajin::LedController go [here](@ref multi_row).
+The rest of the example will use `sakurajin::controller_configuration<4,1>` like in the [rocket example](@ref Led-matrix-rocket.ino).
+
+If you want to use Hardware Spi set useHardwareSpi to true, otherwise set it to false.
+If you use hardware SPI you only need to specify the CS pin, if not you also need to CLK and MOSI pins.
+Just assign the wanted values to SPI_CS, SPI_CLK and SPI_MOSI.
+
+Now you can check if the configuration is Valid by calling the sakurajin::controller_configuration.isValid() method.
+If it returns true, you can continue with the next step, if not try setting debug_output and figure out what went wrong.
+
+Now that you have a valid configuration, you can pass it to the init function of a sakurajin::LedController object.
+You can use the sakurajin::LedController.setRow and sakurajin::LedController.setSegment to send data to the LedMatrix.
+
+sakurajin::LedController.setRow sets a specific Row of a given segment to a given byte.
+It needs the segment index which can be calculated from the segment coordinates by calling `lc.getConfig().getSegmentNumber(x,y)`.
+
+sakurajin::LedController.setSegment sets a whole segment but the segment can be specified through coordinates or the index.
+
+The following snippet is (probably working) sample code that initilizes a sakurajin::LedController using Hardware spi and sets some segments using sakurajin::LedController.setRow and sakurajin::LedController.setSegment.
+
+\code{cpp}
+
+#include "sakurajin::LedController.hpp"
+auto lc = sakurajin::LedController<4,1>();
+
+void setup(){
+ auto conf = sakurajin::controller_configuration<4,1>();
+ conf.useHardwareSpi = true;
+ conf.cs_pin = 25;
+
+ lc.init(conf);
+
+ lc.setRow(lc.getConfig().getSegmentNumber(0,1),2,0xAA);
+ lc.setSegment(lc.getConfig().getSegmentNumber(1,1),{0x00,0x01,0x03,0x07,0x0F,0x1F,0x3F,0x7F});
+ lc.setSegment(2,1,{0x7F,0x3F,0x1F,0x0F,0x07,0x03,0x01,0x00});
+
+}
+
+void loop(){
+
+}
+
+\endcode
+
+\section what_after_intro What is next?
+
+Now that you know how to use the sakurajin::LedController you can check the more advanced features like [using multiple rows](@ref multi_row) or [moving the displayed data](@ref movement).
+
+
+
+\~german
+\page usage Nutzungsanleitung
+
+Schau auf die Seite des sakurajin::LedController für mehr Informationen über dessen Funktionen schau in die [Beispiele](examples.html).
+
+Diese Seite zeigt die Grundlegende Nutzung des sakurajin::LedController und was man machen kann.
+
+\section init_lib Initialisieren der Bibliothek
+
+
+1. Hardware SPI is at least 10 times faster but you can only use specific pins for some signals (look [here](index.html) for which pins).
+2. Software SPI is slower (which only mattesrs if you need really tight timings) but you can freely choose which (free) pins you want to use.
+
+Die Library kann auf zwei Weisen initialisiert werden: mit hardware SPI oder mit software SPI.
+
+1. Hardware SPI ist mindestens 10 mal schneller aber es müssen bestimmte pins verwendet werden (schau [hier](index.html) für Details).
+2. Software SPI ist langsamer (was nur bei knappen Timings relevant ist) aber man kann alle freien Pins verwenden.
+
+\subsection SPI_intro Kleine Einführung in SPI
+
+Das Serial Peripheral Interface (SPI) ist eine synchrone serielle Kommunikationsschnittstelle, welche für Kommunitaktion, primär im embedded Bereich, für kurze Distanzen verwendet wird.
+In diesem Fall ist der microcontroller der Master, der die Slaves (mindestens ein 7-Segment display oder Led Matrix Segment) steuert.
+
+Der Master hat frei relevante Pins: SCLK(Serial Clock), MOSI(Master Out Slave In) und SS(Slave Select).
+Der Slave hat drei entsprechende Pins (und zwei für den Strom(GND und VCC)): CLK(Clock), DIN(Data In), CS(Ship Select).
+SCLK muss mit CLK verbunden werden und MOSI mit DIN.
+Diese Signale können zweichen mehreren SPI slaves geteilt werden, auch wenn die Slaves nicht miteinander zu tun haben.
+SS muss mit CS verbunden werden und jeder Slave braucht einen eigenen SS pin(dies kann jeder freier pin sein).
+
+\section getting_started Getting started
+
+Zum Verwenden muss erst ein neues sakurajin::controller_configuration objekt erstellt werden.
+Dieses wird verwendet um das setup des sakurajin::LedController zu konfigurieren, was sehr komplex sein kann.
+sakurajin::controller_configuration hat keinen Konstruktor und ist dadurch mehr wie ein struct als eine 'richtige' Klasse.
+Weil alle Klassen der Bibliothek ein template sind müssen die Dimensionen der Matrix angegeben werden.
+Dadurch wird der Datentyp der sakurajin::controller_configuration `sakurajin::controller_configuration`.
+Um zu sehen wie man mehrere Zeilen mit einem sakurajin::LedController steuern kann schau [diese](@ref multi_row) Seite an.
+Der Rest der Seite wird `sakurajin::controller_configuration<4,1>` verwenden wie im [Beispiel Rakete](@ref Led-matrix-rocket.ino).
+
+Wenn Hardware SPI verwendet werden soll muss useHardwareSpi auf true gesetzt werden, ansonsten auf false.
+Falls hardware SPI verwendet wird dann muss nur der CS pin angegeben werden, ansonsten wird noch der CLK und MOSI pin benötigt.
+Einfach die gewünschten Werte SPI_CS, SPI_CLK und SPI_MOSI zuweisen.
+
+Nun kann die Konfiguration mit der Funktion sakurajin::controller_configuration.isValid() auf Gültigkeit geprüft werden.
+Falls true zurückgegeben wird, kann mit dem nächsten Schritt fortgefahren werden.
+Wenn nicht lohnt es sich debug_output auf true zu setzen und rauszufinden was schief läuft.
+
+Nun da eine Gültige Konfiguration vorhanden ist, kann diese an die init Funktion des sakurajin::LedController Objekts übergeben werden.
+Nun können sakurajin::LedController.setRow und sakurajin::LedController.setSegment verwendet werden um Daten an die Matrix zu senden.
+
+setSegment sets a whole segment but the segment can be specified through coordinates or the index.
+sakurajin::LedController.setSegment setzt ein ganzes Segment, allerdings kann das Segment über Nummer und Koordinaten angegeben werden.
+
+Der folgende Codeschnipsel sollte funktionieren und zeigt wie ein Led initialisiert mit hardware SPI wird und auf einigen Segmenten Daten angezeigt werden.
+
+\code{cpp}
+
+#include "sakurajin::LedController.hpp"
+auto lc = sakurajin::LedController<4,1>();
+
+void setup(){
+ auto conf = sakurajin::controller_configuration<4,1>();
+ conf.useHardwareSpi = true;
+ conf.cs_pin = 25;
+
+ lc.init(conf);
+
+ lc.setRow(lc.getConfig().getSegmentNumber(0,1),2,0xAA);
+ lc.setSegment(lc.getConfig().getSegmentNumber(1,1),{0x00,0x01,0x03,0x07,0x0F,0x1F,0x3F,0x7F});
+ lc.setSegment(2,1,{0x7F,0x3F,0x1F,0x0F,0x07,0x03,0x01,0x00});
+
+}
+
+void loop(){
+
+}
+
+\endcode
+
+\section what_after_intro Was jetzt?
+
+Nun wo die Grundlagen verstanden sind kann man sich den fortgeschrittenen Themen wie dem [Verwenden mehrerer Zeilen](@ref multi_row) oder dem [Bewegen der angezeigten Daten](@ref movement) widmen.
+
+*/
diff --git a/examples/LCDemoCascadedDevices/LCDemoCascadedDevices.ino b/examples/LCDemoCascadedDevices/LCDemoCascadedDevices.ino
deleted file mode 100644
index 090b8dd3..00000000
--- a/examples/LCDemoCascadedDevices/LCDemoCascadedDevices.ino
+++ /dev/null
@@ -1,52 +0,0 @@
-//We always have to include the library
-#include "LedControl.h"
-
-/*
- Now we need a LedControl to work with.
- ***** These pin numbers will probably not work with your hardware *****
- pin 12 is connected to the DataIn
- pin 11 is connected to the CLK
- pin 10 is connected to LOAD
- ***** Please set the number of devices you have *****
- But the maximum default of 8 MAX72XX wil also work.
- */
-LedControl lc=LedControl(12,11,10,8);
-
-/* we always wait a bit between updates of the display */
-unsigned long delaytime=500;
-
-/*
- This time we have more than one device.
- But all of them have to be initialized
- individually.
- */
-void setup() {
- //we have already set the number of devices when we created the LedControl
- int devices=lc.getDeviceCount();
- //we have to init all devices in a loop
- for(int address=0;address
+#include
+#include
+
+#define DHTPIN 17 // Digital pin connected to the DHT sensor
+
+// Uncomment the type of sensor in use:
+//#define DHTTYPE DHT11 // DHT 11
+#define DHTTYPE DHT22 // DHT 22 (AM2302)
+//#define DHTTYPE DHT21 // DHT 21 (AM2301)
+
+// See guide for details on sensor wiring and usage:
+// https://learn.adafruit.com/dht/overview
+
+DHT_Unified dht(DHTPIN, DHTTYPE);
+
+uint32_t delayMS;
+
+//Like alway the library has to be included
+#include "LedController.hpp"
+
+//The variable that is used to store the Controller object.
+//The controller has two rows with one Column each.
+//Since 7-Segment-Displays are used, every Segment has 8 Disigts that can be addressed.
+LedController<1,2> control = LedController<1,2>();
+
+//The chip select Pins for each row of the LedController
+#define CS_BOTTOM 16
+#define CS_TOP 22
+
+//The number of digits used to display each float
+const unsigned int NUMBER_OF_DIGITS = 4;
+
+//The number of values used to smooth the measured values
+#define SMOOTHING_BUFFER_SIZE 10
+
+//This function returns the raw output from the sensor.
+//The unit is degrees Celsius.
+//Because of this the retrun values might not represent the actual temperature.
+//If there was an error reading the value, a value lower than absolute zero in Celsius is returned (less than -273.15) is returned.
+float getRawTemp(){
+ sensors_event_t event;
+ dht.temperature().getEvent(&event);
+ if (isnan(event.temperature)) {
+ Serial.println(F("Error reading temperature!"));
+ return -1000;
+ }
+
+ return event.temperature;
+}
+
+//This function returns the raw output from the sensor.
+//The relative humidity is returned so the value should be between 0 and 100.
+//Because of this the retrun values might not represent the actual humidity.
+//If there was an error reading the value a negative number is returned.
+float getRawHumid(){
+ sensors_event_t event;
+ dht.humidity().getEvent(&event);
+ if (isnan(event.relative_humidity)) {
+ Serial.println(F("Error reading humidity!"));
+ return -1;
+ }
+ return event.relative_humidity;
+}
+
+//This function returns a smoothed valued for the temperature.
+//The unit is degrees Celsius.
+//If you expact fast changes use the raw data and handle the invalid values manually.
+//Its return value is always valid but only good after SMOOTHING_BUFFER_SIZE calls.
+float getTemp(){
+ static float last_temps[SMOOTHING_BUFFER_SIZE];
+ static bool firstCall = true;
+
+ float new_temp = getRawTemp();
+ float sum = new_temp;
+
+ if(new_temp < -370.0){
+ sum = 0;
+ for(unsigned int i = 0; i < SMOOTHING_BUFFER_SIZE;i++){
+ sum += last_temps[i];
+ }
+ }else{
+ for(unsigned int i = 0; i < SMOOTHING_BUFFER_SIZE-1;i++){
+ last_temps[i] = firstCall ? new_temp : last_temps[i+1];
+ sum += last_temps[i];
+ }
+ last_temps[SMOOTHING_BUFFER_SIZE-1] = new_temp;
+
+ if(firstCall){firstCall = false;};
+ }
+
+ return sum/SMOOTHING_BUFFER_SIZE;
+}
+
+//This function returns a smoothed valued for the humidity.
+//The relative humidity is returned so the value should be between 0 and 100.
+//If you expact fast changes use the raw data and handle the invalid values manually.
+//Its return value is always valid but only good after SMOOTHING_BUFFER_SIZE calls.
+float getHumidity(){
+ static float last_humids[SMOOTHING_BUFFER_SIZE];
+ static bool firstCall = true;
+
+ float new_humid = getRawHumid();
+ float sum = new_humid;
+
+ if(new_humid < 0){
+ sum = 0;
+ for(unsigned int i = 0; i < SMOOTHING_BUFFER_SIZE;i++){
+ sum += last_humids[i];
+ }
+ }else{
+
+ for(unsigned int i = 0; i < SMOOTHING_BUFFER_SIZE-1;i++){
+ last_humids[i] = firstCall ? new_humid : last_humids[i+1];
+ sum += last_humids[i];
+ }
+ last_humids[SMOOTHING_BUFFER_SIZE-1] = new_humid;
+
+ if(firstCall){firstCall = false;};
+ }
+
+ return sum/SMOOTHING_BUFFER_SIZE;
+}
+
+//This function can display a float on a 7-Segment display.
+//It assumes the dismension of the LedController is <1,row> and the row can be selected with the second parameter.
+//The third parameter is used to specify how many digits you want to after the decimal Place.
+//The fourth paramether is an offset moving all digits to the left by the specified amount
+void displayFloat(float value, unsigned int row = 0, unsigned int decimalPlaces = 1,unsigned int digitOffset = 0){
+ unsigned int total_length = NUMBER_OF_DIGITS;
+ if(NUMBER_OF_DIGITS conf;
+
+ //disable virtual_muti_row
+ conf.cs_pin = 0;
+ conf.virtual_multi_row = false;
+
+ //These are the chip select pins for each row.
+ //The bottom row (row 0) is connected to pin 16 and the top row (row 1) is connected to pin 22
+ conf.row_cs_pin[0] = CS_BOTTOM;
+ conf.row_cs_pin[1] = CS_TOP;
+
+ //this enables hardware spi check what pins to use for your board
+ conf.useHardwareSpi = true;
+
+ //this enables debug output (nothing should be printed but it helps to fix possible problems with the config)
+ conf.debug_output = true;
+
+ //this specifies the transfer speed of the spi interface. If you want to use high values make sure your cables have a good connection
+ conf.spiTransferSpeed = 600000;
+
+ //initilizing the LedController with the configuration which we just set
+ control.init(conf);
+
+ //set the lowest possible brightness
+ control.setIntensity(0);
+
+ //turn every digit off
+ for(unsigned int i = 0; i < 8;i++){
+ control.setRow(0,i,0x00);
+ control.setRow(1,i,0x00);
+ }
+}
+
+void loop() {
+ // Delay between measurements.
+ delay(delayMS);
+
+ //get and display the temperature in the top row
+ auto temp = getTemp();
+ Serial.print(F("Temperature: "));
+ Serial.println(temp);
+ displayFloat(temp,1,1);
+ control.setChar(1,7,'t',false);
+
+ //get and display the humidity in the bottom row
+ auto humid = getHumidity();
+ Serial.print(F("Humidity: "));
+ Serial.println(humid);
+ displayFloat(humid,0,1);
+ control.setChar(0,7,'H',false);
+
+}
diff --git a/examples/english/7-Segment-counting/7-Segment-counting.ino b/examples/english/7-Segment-counting/7-Segment-counting.ino
new file mode 100644
index 00000000..73ccc700
--- /dev/null
+++ b/examples/english/7-Segment-counting/7-Segment-counting.ino
@@ -0,0 +1,90 @@
+/**
+ * @file 7-Segment-counting.ino
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief counting up on 7-Segment displays
+ * @version 0.1
+ * @date 2020-12-30
+ *
+ * @copyright Copyright (c) 2020
+ *
+ */
+
+//As always include the libraray
+#include "LedController.hpp"
+//for this example math.h is also needed
+#include "math.h"
+
+//the pin where the chip select is connected to
+#define CS 22
+
+//There are two Segments that are connected in series
+#define Segments 2
+
+//Each segment has two digits enabled.
+//This can be any number between 1 and 8 and can be changed
+//without needing to change any other line of code
+#define digitsPerSegment 2
+
+//offset to switch which Digits will be used for output
+//play around with this value
+#define positionOffset 2
+
+//delay before incrementing the counter
+#define delayTime 500
+
+//the uninitilized controller object
+LedController lc = LedController();
+
+//This function calculates the largest number that can be displayed
+unsigned long long getLargestNumber() {
+ return (unsigned long long) pow(10,Segments*digitsPerSegment);
+}
+
+//this function sets the Segments to a given number
+void setLEDs (unsigned long long number) {
+ //the loop is used to split the given number and set the right digit on the Segments
+ for(unsigned int i = 0; i < Segments*digitsPerSegment; i++) {
+ unsigned long long divisor = 1;
+ for(unsigned int j=0; j < i; j++) {
+ divisor *= 10;
+ }
+
+ byte num = number/divisor % 10;
+ lc.setDigit(Segments-i/digitsPerSegment-1,i%digitsPerSegment+positionOffset,num,false);
+ }
+
+}
+
+void setup() {
+ //just make sure that the config is valid
+ static_assert(positionOffset+digitsPerSegment<9,"invalid configuration");
+
+ //initilize a ledcontroller with a hardware spi and one row
+ lc.init(CS);
+
+ //disables all Digits by default
+ for(unsigned int i = 0; i < Segments; i++) {
+ for(unsigned int j = 0; j < 8; j++) {
+ lc.setRow(i,j,0x00);
+ }
+ }
+
+ //Set them to the lowest brightness
+ lc.setIntensity(0);
+}
+
+void loop() {
+
+ //clear the matrix just to be sure there is nothing on it
+ lc.clearMatrix();
+
+ //calculate the highest possible number and set it as end condition for the loop
+ auto limit = getLargestNumber();
+
+ //count up and display the number
+ for (unsigned long long i = 0; i lc;
/* we always wait a bit between updates of the display */
unsigned long delaytime=250;
void setup() {
- /*
- The MAX72XX is in power-saving mode on startup,
- we have to do a wakeup call
- */
- lc.shutdown(0,false);
+
+ //Here a new LedController object is created without hardware SPI.
+ lc=LedController<1,1>(DIN,CLK,CS);
+
/* Set the brightness to a medium values */
- lc.setIntensity(0,8);
+ lc.setIntensity(8);
/* and clear the display */
- lc.clearDisplay(0);
+ lc.clearMatrix();
}
/*
This method will display the characters for the
- word "Arduino" one after the other on digit 0.
+ word "Arduino" one after the other on digit 0.
*/
void writeArduinoOn7Segment() {
lc.setChar(0,0,'a',false);
@@ -46,9 +62,9 @@ void writeArduinoOn7Segment() {
delay(delaytime);
lc.setRow(0,0,0x1D);
delay(delaytime);
- lc.clearDisplay(0);
+ lc.clearMatrix();
delay(delaytime);
-}
+}
/*
This method will scroll all the hexa-decimal
@@ -56,18 +72,18 @@ void writeArduinoOn7Segment() {
four 7-Segment digits. otherwise it won't really look that good.
*/
void scrollDigits() {
- for(int i=0;i<13;i++) {
+ for(int i=0; i<13; i++) {
lc.setDigit(0,3,i,false);
lc.setDigit(0,2,i+1,false);
lc.setDigit(0,1,i+2,false);
lc.setDigit(0,0,i+3,false);
delay(delaytime);
}
- lc.clearDisplay(0);
+ lc.clearMatrix();
delay(delaytime);
}
-void loop() {
+void loop() {
writeArduinoOn7Segment();
scrollDigits();
}
diff --git a/examples/english/Led-matrix-counting/Led-matrix-counting.ino b/examples/english/Led-matrix-counting/Led-matrix-counting.ino
new file mode 100644
index 00000000..1295d0db
--- /dev/null
+++ b/examples/english/Led-matrix-counting/Led-matrix-counting.ino
@@ -0,0 +1,174 @@
+/**
+ * @file Led-matrix-counting.ino
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief counting up on an led matrix
+ * @version 0.1
+ * @date 2020-12-30
+ *
+ * @copyright Copyright (c) 2020
+ *
+ */
+
+#include "LedController.hpp"
+
+//the pin where the chip select is connected to
+#define CS 15
+
+#define Segments 4
+
+#define delayTime 200 // Delay between Frames
+
+LedController lc;
+
+//these are just some digits to display numbers on the matrix
+ByteBlock digits[10] = {
+ {
+ 0b00000000,
+ 0b00011000,
+ 0b00100100,
+ 0b01000010,
+ 0b01000010,
+ 0b00100100,
+ 0b00011000,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b00011100,
+ 0b00101100,
+ 0b01001100,
+ 0b00001100,
+ 0b00001100,
+ 0b00001100,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b00111000,
+ 0b01101100,
+ 0b00011000,
+ 0b00110000,
+ 0b01100000,
+ 0b01111110,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b00111100,
+ 0b01100110,
+ 0b00001100,
+ 0b00000110,
+ 0b01100110,
+ 0b00111100,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b01100000,
+ 0b01100000,
+ 0b01101000,
+ 0b01111110,
+ 0b00001000,
+ 0b00001000,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b01111110,
+ 0b01100000,
+ 0b01111000,
+ 0b00000110,
+ 0b01100110,
+ 0b00111100,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b00001100,
+ 0b00111000,
+ 0b01100000,
+ 0b01111100,
+ 0b01100110,
+ 0b00111100,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b01111110,
+ 0b00000110,
+ 0b00001100,
+ 0b00011000,
+ 0b00110000,
+ 0b01100000,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b00111100,
+ 0b00100100,
+ 0b00011000,
+ 0b01100110,
+ 0b01000010,
+ 0b00111100,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b00111100,
+ 0b01100110,
+ 0b00111110,
+ 0b00000110,
+ 0b00011100,
+ 0b00110000,
+ 0b00000000
+ }
+};
+
+//this function sets the matrix to a given number
+void setLEDs (unsigned int number) {
+ //the loop is used to split the given number and set the right digit on the matix
+ unsigned int places[Segments];
+
+ for(unsigned int i = 0; i < Segments; i++) {
+ unsigned int divisor = 1;
+ for(unsigned int j=0; j < i; j++) {
+ divisor *= 10;
+ }
+
+ places[Segments-1-i] = number/divisor % 10;
+ lc.displayOnSegment(Segments-1-i,digits[places[Segments-1-i]]);
+ }
+
+}
+
+//this function switches a led to have a
+void switchLED() {
+ static bool LEDON = false;
+ if(LEDON) {
+ digitalWrite(13, LOW);
+ } else {
+ digitalWrite(13, HIGH);
+ }
+ LEDON = !LEDON;
+}
+
+void setup() {
+
+ //create a ledcontroller with a hardware spi and one row
+ lc = LedController(CS);
+
+ //enable the led
+ pinMode(13, OUTPUT);
+
+ //rotate all digits by 180 degress to display them correctly
+ //you could leave this but then the orientation would be wrong
+ for(unsigned int i = 0; i < 10; i++) {
+ digits[i] = digits[i].rotate180();
+ }
+
+}
+
+void loop() {
+
+ //clear the matrix just to be sure there is nothing on it
+ lc.clearMatrix();
+
+ //count up and display the number
+ for (unsigned int i = 0; i<10000; i++) {
+ delay(500);
+ switchLED();
+ setLEDs(i);
+ }
+
+}
diff --git a/examples/english/Led-matrix-message/Led-matrix-message.ino b/examples/english/Led-matrix-message/Led-matrix-message.ino
new file mode 100644
index 00000000..74e10e5c
--- /dev/null
+++ b/examples/english/Led-matrix-message/Led-matrix-message.ino
@@ -0,0 +1,122 @@
+/**
+ * @file Led-matrix-message.ino
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief This demo shows how a message can be displayed on an LedMatrix.
+ * This demo is based on https://www.meine-schaltung.de/schaltung/soft/anzeige/vierfach_matrix_mit_arduino/ and modified for the latest LedController.
+ * @version 0.1
+ * @date 2021-02-16
+ *
+ * @copyright Copyright (c) 2021
+ *
+ */
+
+//As always include the library
+#include "LedController.hpp"
+
+//The pin connected to the CS pin of the Matrix
+#define CS 22
+
+//the total number of segments.
+//In this example they are in one row and you can freely change this number.
+#define Segments 4
+
+//The delay time until the contents move left by one.
+#define delayTime 200
+
+//The ledController object, at the moment it is uninitilized
+LedController lc = LedController();
+
+// Symbols and Letters ---------------------------------------------------------------------------------
+ByteBlock A = ByteBlock::rotate180({ 0b00000000, 0b00011000, 0b00100100, 0b00100100, 0b00111100, 0b00100100, 0b00100100, 0b00000000 });
+ByteBlock a = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b00111000, 0b01001000, 0b01001000, 0b01001000, 0b00111000, 0b00000000 });
+ByteBlock b = ByteBlock::rotate180(ByteBlock::reverse({ 0b00000000, 0b00001000, 0b00111000, 0b01001000, 0b01001000, 0b01001000, 0b00111000, 0b00000000 }))<<2;
+ByteBlock c = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b00110000, 0b01000000, 0b01000000, 0b01000000, 0b00110000, 0b00000000 });
+ByteBlock d = ByteBlock::rotate180({ 0b00000000, 0b00001000, 0b00111000, 0b01001000, 0b01001000, 0b01001000, 0b00111000, 0b00000000 });
+ByteBlock e = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b00110000, 0b01001000, 0b01111000, 0b01000000, 0b00111000, 0b00000000 });
+ByteBlock H = ByteBlock::rotate180({ 0b00000000, 0b10010000, 0b10010000, 0b11110000, 0b10010000, 0b10010000, 0b10010000, 0b00000000 });
+ByteBlock h = ByteBlock::rotate180({ 0b00000000, 0b01000000, 0b01110000, 0b01001000, 0b01001000, 0b01001000, 0b01001000, 0b00000000 });
+ByteBlock I = ByteBlock::rotate180({ 0b00000000, 0b01000000, 0b01000000, 0b01000000, 0b01000000, 0b01000000, 0b01000000, 0b00000000 });
+ByteBlock i = ByteBlock::rotate180({ 0b00000000, 0b10000000, 0b00000000, 0b10000000, 0b10000000, 0b10000000, 0b10000000, 0b00000000 });
+ByteBlock J = ByteBlock::rotate180({ 0b00000000, 0b00001000, 0b00001000, 0b00001000, 0b00001000, 0b01001000, 0b00110000, 0b00000000 });
+ByteBlock K = ByteBlock::rotate180({ 0b00000000, 0b10001000, 0b10010000, 0b11100000, 0b10100000, 0b10010000, 0b10001000, 0b00000000 });
+ByteBlock k = ByteBlock::rotate180({ 0b00000000, 0b10000000, 0b10010000, 0b10100000, 0b11000000, 0b10100000, 0b10010000, 0b00000000 });
+ByteBlock l = ByteBlock::rotate180({ 0b00000000, 0b10000000, 0b10000000, 0b10000000, 0b10000000, 0b10000000, 0b01000000, 0b00000000 });
+ByteBlock M = ByteBlock::rotate180({ 0b00000000, 0b01000100, 0b01101100, 0b01010100, 0b01000100, 0b01000100, 0b01000100, 0b00000000 });
+ByteBlock m = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b01110110, 0b01001001, 0b01001001, 0b01001001, 0b01001001, 0b00000000 });
+ByteBlock n = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b01110000, 0b01001000, 0b01001000, 0b01001000, 0b01001000, 0b00000000 });
+ByteBlock o = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b01100000, 0b10010000, 0b10010000, 0b10010000, 0b01100000, 0b00000000 });
+ByteBlock p = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b11100000, 0b10001000, 0b10001000, 0b10001000, 0b11100000, 0b10000000 });
+ByteBlock q = ByteBlock::rotate180(ByteBlock::reverse({ 0b00000000, 0b00000000, 0b11100000, 0b10001000, 0b10001000, 0b10001000, 0b11100000, 0b10000000 }))<<2;
+ByteBlock r = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b10100000, 0b11000000, 0b10000000, 0b10000000, 0b10000000, 0b00000000 });
+ByteBlock s = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b01110000, 0b10000000, 0b01100000, 0b00010000, 0b11100000, 0b00000000 });
+ByteBlock t = ByteBlock::rotate180({ 0b00000000, 0b10000000, 0b11100000, 0b10000000, 0b10000000, 0b10000000, 0b01100000, 0b00000000 });
+ByteBlock u = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b10010000, 0b10010000, 0b10010000, 0b10010000, 0b01100000, 0b00000000 });
+ByteBlock w = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b10001000, 0b10001000, 0b10101000, 0b11011000, 0b10001000, 0b00000000 });
+ByteBlock LB = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 });
+ByteBlock AZ = ByteBlock::rotate180({ 0b01000000, 0b01000000, 0b01000000, 0b01000000, 0b01000000, 0b00000000, 0b01000000, 0b00000000 });
+
+ByteBlock Heart = ByteBlock::rotate180({
+ 0b00000000,
+ 0b01000010,
+ 0b10100101,
+ 0b10011001,
+ 0b10000001,
+ 0b01000010,
+ 0b00100100,
+ 0b00011000,
+});
+
+//The number of ByteBlocks the message consists of.
+const unsigned int message_length = 6;
+
+//This array defines the message that will be displayed on the matrix.
+//By default it says 'Jahallo!! :heart:' and can be modified however needed.
+ByteBlock message[message_length] = {
+ J&(a>>5), //'J' and first half of 'a'
+ (a<<3)&(h>>2), // second half of 'a' and 'h'
+ (a<<1)&(l>>5), // 'a' and 'l'
+ l&(o>>3), // 'l' and 'o'
+ (AZ<<1)&(AZ>>1)&((++Heart)>>5), // ! and ! and first half of ':heart:'
+ (++Heart)<<4 // second half of ':heart:' (change the 4 to a 3 if you want to see the complete heart)
+};
+
+
+void setup() {
+ //setup the config with the same size as the controller
+ controller_configuration conf;
+ //use the specified CS pin
+ conf.cs_pin = CS;
+ //set the transfer speed to the highest stable value
+ conf.spiTransferSpeed = 10000000;
+ //enable hardware spi
+ conf.useHardwareSpi = true;
+
+ //init the controller from the configuration
+ lc.init(conf);
+
+ //set the brightness as low as possible
+ lc.setIntensity(0);
+}
+
+void loop() {
+ //clear just to be safe
+ lc.clearMatrix();
+
+ //shift data in
+ //each segment of the message will be shifted in one by one
+ for(unsigned int i = 0; i < message_length; i++) {
+ //since each segment has a width of 8 pixels there is another loop
+ for(unsigned int j = 0; j < 8; j++) {
+ //move the columns in one by one and wait a bit
+ lc.moveLeft(ByteBlock::makeColumns(message[i])[j]);
+ delay(delayTime);
+ }
+ }
+
+ //shift the contents out
+ //since the sice is 8*segments simply shift left that many times
+ for(unsigned int i = 0; i < 8*Segments; i++) {
+ lc.moveLeft();
+ delay(delayTime);
+ }
+}
diff --git a/examples/english/Led-matrix-rocket-hwSPI/Led-matrix-rocket-hwSPI.ino b/examples/english/Led-matrix-rocket-hwSPI/Led-matrix-rocket-hwSPI.ino
new file mode 100644
index 00000000..d1041782
--- /dev/null
+++ b/examples/english/Led-matrix-rocket-hwSPI/Led-matrix-rocket-hwSPI.ino
@@ -0,0 +1,89 @@
+/**
+ * @file Led-matrix-rocket-hwSPI.ino
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief Led-matrix-rocket.ino with hardware spi
+ * @version 0.1
+ * @date 2020-12-30
+ *
+ * @copyright Copyright (c) 2020
+ *
+ */
+
+//Since this is just Led-matrix-rocket.ino with hardware SPI, view its site for more details.
+#include "LedController.hpp"
+
+#define CS 15
+#define Segments 4
+
+#define delayTime 200
+
+LedController lc = LedController();
+
+ByteBlock rocket= ByteBlock::reverse({
+ 0b00000000,
+ 0b00001111,
+ 0b00111110,
+ 0b11111101,
+ 0b00111110,
+ 0b00001111,
+ 0b00000000,
+ 0b00000000
+});
+
+ByteBlock rocketColumns;
+
+void switchLED() {
+ static bool LEDON = false;
+ if(LEDON) {
+ digitalWrite(13, LOW);
+ } else {
+ digitalWrite(13, HIGH);
+ }
+ LEDON = !LEDON;
+}
+
+void setup() {
+ //Only the following line is different from the example without hardware SPI since in this case only one Pin needs to be specified
+ lc.init(CS);
+
+ rocketColumns = ByteBlock::makeColumns(rocket);
+
+ pinMode(13, OUTPUT);
+
+ lc.setIntensity(0);
+
+}
+
+void loop() {
+
+ lc.clearMatrix();
+
+ for(int dir = 0; dir < 2; dir++) {
+ delay(delayTime);
+ for(int i = 0; i < 8*(Segments+1); i++) {
+ //blink led for each iteration
+ switchLED();
+
+ //if rocket not fully inside let it fly in
+ auto in = (i<8) ? rocketColumns[i] : 0x00;
+
+ //if dir is 0 move right if not move left
+ dir == 0 ? lc.moveRight(in) : lc.moveLeft(in);
+
+ delay(delayTime);
+
+ //decide whether to move up or down
+ if(i > 7) {
+ if(i % 6 < 3) {
+ lc.moveDown();
+ } else {
+ lc.moveUp();
+ }
+ }
+
+ delay(delayTime);
+
+ }
+ }
+
+}
diff --git a/examples/english/Led-matrix-rocket-multi/Led-matrix-rocket-multi.ino b/examples/english/Led-matrix-rocket-multi/Led-matrix-rocket-multi.ino
new file mode 100644
index 00000000..31ab1bab
--- /dev/null
+++ b/examples/english/Led-matrix-rocket-multi/Led-matrix-rocket-multi.ino
@@ -0,0 +1,144 @@
+/**
+ * @file Led-matrix-rocket-multi.ino
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief An exaple for using multiple rows
+ * @version 0.1
+ * @date 2020-12-30
+ *
+ * @copyright Copyright (c) 2020
+ *
+ */
+
+#include "LedController.hpp"
+
+//spi pins if you do not wat to use hardwware spi
+#define DIN 27
+#define CLK 25
+
+//The CS pins that should be used for the bottom/top row
+#define CS_BOTTOM 25
+#define CS_TOP 15
+
+//the number of segments per row
+#define Segments 4
+
+//the pin number of the builtin led or an external led to signal a clock.
+#define LED 13
+
+// Delay between Frames
+#define delayTime 200
+
+//creating an LedController which is not initilized.
+auto lc = LedController();
+
+//the pixelart of our beautiful rocket
+ByteBlock rocket= ByteBlock::reverse({
+ 0b00000000,
+ 0b00001111,
+ 0b00111110,
+ 0b11111101,
+ 0b00111110,
+ 0b00001111,
+ 0b00000000,
+ 0b00000000
+});
+
+ByteBlock rocketColumns;
+
+//switches the state of the builtin led
+void switchLED() {
+ static bool LEDON = false;
+ if(LEDON) {
+ digitalWrite(LED, LOW);
+ } else {
+ digitalWrite(LED, HIGH);
+ }
+ LEDON = !LEDON;
+}
+
+void setup() {
+
+ //creating the configuration of the controller
+ controller_configuration conf;
+
+ //since more than one row is used (without virtual mult row) make sure to set this to 0
+ conf.cs_pin = 0;
+
+ //These are the chip select pins for each row.
+ //The bottom row (row 0) is connected to pin 25 and the top row (row 1) is connected to pin 15
+ conf.row_cs_pin[0] = CS_BOTTOM;
+ conf.row_cs_pin[1] = CS_TOP;
+
+ //this enables hardware spi check what pins to use for your board
+ conf.useHardwareSpi = true;
+
+ //this enables debug output (nothing should be printed but it helps to fix possible problems with the config)
+ conf.debug_output = true;
+
+ //since we use real multi rows this is set to false (this should not matter since SPI_CS is 0 but this is the proper way)
+ conf.virtual_multi_row = false;
+
+ //this specifies the transfer speed of the spi interface. If you want to use high values make sure your cables have a good connection
+ conf.spiTransferSpeed = 800000;
+
+ //initilizing the LedController with the configuration which we just set
+ lc.init(conf);
+
+ //make a array of columns out of the rocket
+ //this is needed to shift it in correctly (you can leave this line if you want to)
+ rocketColumns = ByteBlock::makeColumns(rocket);
+
+ //enables the builtin Led to have a kind of clock
+ pinMode(LED, OUTPUT);
+
+}
+
+//This is basically the same as Led-matrix-rocket.ino
+void loop() {
+ lc.clearMatrix();
+
+ for(int i = 0; i < 8*(Segments+1); i++) {
+ delay(delayTime);
+
+ switchLED();
+
+ if(i < 8) {
+ lc.moveRowRight(rocketColumns[i]);
+ } else {
+ lc.moveRight();
+
+ delay(delayTime);
+ if(i%16 < 8) {
+ lc.moveDown();
+ } else {
+ lc.moveUp();
+ }
+ }
+
+ }
+
+ delay(delayTime);
+
+ for(int i = 0; i < 8*(Segments+1); i++) {
+ delay(delayTime);
+
+ switchLED();
+
+ if(i < 8) {
+ lc.moveRowLeft(rocketColumns[i]);
+ } else {
+ lc.moveLeft();
+
+ delay(delayTime);
+ if(i%16 < 8) {
+ lc.moveDown();
+ } else {
+ lc.moveUp();
+ }
+ }
+
+ }
+
+ delay(delayTime);
+
+}
diff --git a/examples/english/Led-matrix-rocket/Led-matrix-rocket.ino b/examples/english/Led-matrix-rocket/Led-matrix-rocket.ino
new file mode 100644
index 00000000..2ec4e7f4
--- /dev/null
+++ b/examples/english/Led-matrix-rocket/Led-matrix-rocket.ino
@@ -0,0 +1,102 @@
+/**
+ * @file Led-matrix-rocket.ino
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief Using the the LedController to move a rocket
+ * @version 0.1
+ * @date 2020-12-30
+ *
+ * @copyright Copyright (c) 2020
+ *
+ */
+
+//as always include the LedController header on the top
+#include "LedController.hpp"
+
+//These are the Pins used for the SPI transfer
+//See the usage instructions for their meaning
+#define DIN 27
+#define CS 26
+#define CLK 25
+
+//The total numer of Segments
+#define Segments 4
+
+//The delay between movements
+#define delayTime 200
+
+//This creates an uninitilized LedController object.
+//It will be initilized in the setup function.
+LedController lc = LedController();
+
+//This is my pixelart of a rocket which will be used in this example
+ByteBlock rocket= ByteBlock::reverse({
+ 0b00000000,
+ 0b00001111,
+ 0b00111110,
+ 0b11111101,
+ 0b00111110,
+ 0b00001111,
+ 0b00000000,
+ 0b00000000
+});
+
+ByteBlock rocketColumns;
+
+//switches the state of the internal LED
+void switchLED() {
+ static bool LEDON = false;
+ if(LEDON) {
+ digitalWrite(13, LOW);
+ } else {
+ digitalWrite(13, HIGH);
+ }
+ LEDON = !LEDON;
+}
+
+void setup() {
+
+ //initilizes the LedController without hardware spi.
+ lc.init(DIN,CLK,CS);
+
+ //make a array of columns out of the rocket
+ //this is needed to shift it in correctly (you can leave this line if you want to)
+ rocketColumns = ByteBlock::makeColumns(rocket);
+
+ //enable the LED to have a clock
+ pinMode(13, OUTPUT);
+
+}
+
+void loop() {
+
+ lc.clearMatrix();
+
+ for(int dir = 0; dir < 2; dir++) {
+ delay(delayTime);
+ for(int i = 0; i < 8*(Segments+1); i++) {
+ //blink led for each iteration
+ switchLED();
+
+ //if rocket not fully inside let it fly in
+ auto in = (i<8) ? rocketColumns[i] : 0x00;
+
+ //if dir is 0 move right if not move left
+ dir == 0 ? lc.moveRight(in) : lc.moveLeft(in);
+
+ delay(delayTime);
+
+ //decide whether to move up or down
+ if(i > 7) {
+ if(i % 6 < 3) {
+ lc.moveDown();
+ } else {
+ lc.moveUp();
+ }
+ }
+
+ delay(delayTime);
+
+ }
+ }
+
+}
diff --git a/examples/german/7-Segment-DHT-temp-humid/7-Segment-DHT-temp-humid.ino b/examples/german/7-Segment-DHT-temp-humid/7-Segment-DHT-temp-humid.ino
new file mode 100644
index 00000000..bbf57185
--- /dev/null
+++ b/examples/german/7-Segment-DHT-temp-humid/7-Segment-DHT-temp-humid.ino
@@ -0,0 +1,256 @@
+// DTH Temperatur- und Luftfeuchtigkeitssensor auf einem 7-Segment Display angezeigt.
+
+// Die folgenden Arduino Bibliotheken werden benötigt:
+// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library
+// - Adafruit Unified Sensor Lib: https://github.com/adafruit/Adafruit_Sensor
+// - LedController: https://github.com/noah1510/LedController
+
+//Dieser Code basiert auf einem Beispiel der DHT Sensor Library.
+//All der sensor bezogene Code wurde in Funktionen verpackt, um die integration des LedController besser zu zeigen.
+
+#include
+#include
+#include
+
+#define DHTPIN 17 // Digital pin vebunden mit dem DHT sensor
+
+// verwendeten Sensortyp auskommentieren:
+//#define DHTTYPE DHT11 // DHT 11
+#define DHTTYPE DHT22 // DHT 22 (AM2302)
+//#define DHTTYPE DHT21 // DHT 21 (AM2301)
+
+// Anleitung für Verkabelung und Detials über die Sensoren (auf Englisch):
+// https://learn.adafruit.com/dht/overview
+
+DHT_Unified dht(DHTPIN, DHTTYPE);
+
+uint32_t delayMS;
+
+//Wie immer die Bibliothek einbinden
+#include "LedController.hpp"
+
+//Die Variable in der Controller gespeichert ist.
+//Der Controller hat zwei Zeilen mit je einer Spalte.
+//Bei 7-Segment-Displays hat jedes Segment 8 Ziffern, die angezeigt werden können.
+LedController<1,2> control = LedController<1,2>();
+
+//Die CS Pins für die einzelnen Zeilen
+#define CS_BOTTOM 16
+#define CS_TOP 22
+
+//Die Anzahl der Ziffern, die für die Darstellung von floats verwendet werden soll
+const unsigned int NUMBER_OF_DIGITS = 4;
+
+//Wie viele Werte zur Glättung gespeichert werden sollen.
+#define SMOOTHING_BUFFER_SIZE 10
+
+//Diese Funktion gibt die Rohdaten vom Sensor zurück.
+//Die Einheit ist Grad Celsius.
+//Weil keine Glättung stattfindet, kann der Wert stark schwanken.
+//Falls es einen Fehler beim Auslesen gab, wird ein Wert zurückgegeben der niedriger ist als der absolute Nullpunk (-273.15).
+float getRawTemp(){
+ sensors_event_t event;
+ dht.temperature().getEvent(&event);
+ if (isnan(event.temperature)) {
+ Serial.println(F("Error reading temperature!"));
+ return -1000;
+ }
+
+ return event.temperature;
+}
+
+//Diese Funktion gibt die Rohdaten vom Sensor zurück.
+//Die relative Luftfeuchtigkeit wird zurückgegeben, folglich sind die Werte zwischen 0 und 100.
+//Weil keine Glättung stattfindet, kann der Wert stark schwanken.
+//Falls es einen Fehler beim Auslesen gab, wird ein Wert zurückgegeben der negativ ist.
+float getRawHumid(){
+ sensors_event_t event;
+ dht.humidity().getEvent(&event);
+ if (isnan(event.relative_humidity)) {
+ Serial.println(F("Error reading humidity!"));
+ return -1;
+ }
+ return event.relative_humidity;
+}
+
+//Diese Funktion gibt geglättete Werte für fie Temperatur zurück.
+//Die Einheit ist Grad Celsius.
+//Falls man schnelle Änderungen erwartet, sollte man die Rohdaten verwenden.
+//Der Rückgabewert ist immer gültig, aber erst gut nach SMOOTHING_BUFFER_SIZE aufrufen.
+float getTemp(){
+ static float last_temps[SMOOTHING_BUFFER_SIZE];
+ static bool firstCall = true;
+
+ float new_temp = getRawTemp();
+ float sum = new_temp;
+
+ if(new_temp < -370.0){
+ sum = 0;
+ for(unsigned int i = 0; i < SMOOTHING_BUFFER_SIZE;i++){
+ sum += last_temps[i];
+ }
+ }else{
+ for(unsigned int i = 0; i < SMOOTHING_BUFFER_SIZE-1;i++){
+ last_temps[i] = firstCall ? new_temp : last_temps[i+1];
+ sum += last_temps[i];
+ }
+ last_temps[SMOOTHING_BUFFER_SIZE-1] = new_temp;
+
+ if(firstCall){firstCall = false;};
+ }
+
+ return sum/SMOOTHING_BUFFER_SIZE;
+}
+
+//Diese Funktion gibt geglättete Werte für fie Luftfeuchtigkeit zurück.
+//Die relative Luftfeuchtigkeit wird zurückgegeben, folglich sind die Werte zwischen 0 und 100.
+//Falls man schnelle Änderungen erwartet, sollte man die Rohdaten verwenden.
+//Der Rückgabewert ist immer gültig, aber erst gut nach SMOOTHING_BUFFER_SIZE aufrufen.
+float getHumidity(){
+ static float last_humids[SMOOTHING_BUFFER_SIZE];
+ static bool firstCall = true;
+
+ float new_humid = getRawHumid();
+ float sum = new_humid;
+
+ if(new_humid < 0){
+ sum = 0;
+ for(unsigned int i = 0; i < SMOOTHING_BUFFER_SIZE;i++){
+ sum += last_humids[i];
+ }
+ }else{
+
+ for(unsigned int i = 0; i < SMOOTHING_BUFFER_SIZE-1;i++){
+ last_humids[i] = firstCall ? new_humid : last_humids[i+1];
+ sum += last_humids[i];
+ }
+ last_humids[SMOOTHING_BUFFER_SIZE-1] = new_humid;
+
+ if(firstCall){firstCall = false;};
+ }
+
+ return sum/SMOOTHING_BUFFER_SIZE;
+}
+
+//Diese Funktion kann einen float Wert auf einer 7-Segment-anzeige anzeigen.
+//Es wird die Annahme getroffen, dass der LedController nur eine Spalte hat.
+//Die gewünschte Zeile kann mit den zweiten Parameter ausgewählt werden.
+//Das dritte Parameter bestimmt die Anzahl der Stellen nach dem Komma.
+//Das vierte Parameter schiebt die angezeigte Zahl nach links.
+void displayFloat(float value, unsigned int row = 0, unsigned int decimalPlaces = 1,unsigned int digitOffset = 0){
+ unsigned int total_length = NUMBER_OF_DIGITS;
+ if(NUMBER_OF_DIGITS conf;
+
+ //deaktivieren von virtual_muti_row
+ conf.cs_pin = 0;
+ conf.virtual_multi_row = false;
+
+ //hier werden die Chip Select Pins der einzelnen Reihen gesetzt.
+ //Die untere Zeile (Zeile 0) ist an Pin 16 geschlossen und die obere Reihe (Reihe 1) an Pin 22
+ conf.row_cs_pin[0] = CS_BOTTOM;
+ conf.row_cs_pin[1] = CS_TOP;
+
+ //Das setzt die nńutzung von harware SPI
+ //Schaue welche Pins bei deinem Board verwendet werden müssen.
+ conf.useHardwareSpi = true;
+
+ //Das schaltet die Debug Ausgabe an.
+ //Es sollte zwar nichts ausgegeben werden, kann aber trotzdem hilfreich sein.
+ conf.debug_output = true;
+
+ //Das setzt die Übertragungsgeschwindigkeit der SPI Schnittstelle.
+ //Falls hohe Werte gesetzt werden, sollte eine gute Verbingung sichergestellt werden.
+ conf.spiTransferSpeed = 600000;
+
+ //Initialisiere den LedController mit der erstellten Konfiguration.
+ control.init(conf);
+
+ //setzt die Helligkeit auf die niedrigste Helligkeit
+ control.setIntensity(0);
+
+ //schaltet alle Ziffern aus
+ for(unsigned int i = 0; i < 8;i++){
+ control.setRow(0,i,0x00);
+ control.setRow(1,i,0x00);
+ }
+}
+
+void loop() {
+ //Verzögerung zwischen den Messungen
+ delay(delayMS);
+
+ //Temperatur holen und auf der oberen Reihe anzeigen anzeigen
+ auto temp = getTemp();
+ Serial.print(F("Temperature: "));
+ Serial.println(temp);
+ displayFloat(temp,1,1);
+ control.setChar(1,7,'t',false);
+
+ //Luftfeuchtigkeit holen und auf der unteren Reihe anzeigen anzeigen
+ auto humid = getHumidity();
+ Serial.print(F("Humidity: "));
+ Serial.println(humid);
+ displayFloat(humid,0,1);
+ control.setChar(0,7,'H',false);
+
+}
diff --git a/examples/german/7-Segment-counting/7-Segment-counting.ino b/examples/german/7-Segment-counting/7-Segment-counting.ino
new file mode 100644
index 00000000..16fc2b37
--- /dev/null
+++ b/examples/german/7-Segment-counting/7-Segment-counting.ino
@@ -0,0 +1,89 @@
+/**
+ * @file 7-Segment-counting.ino
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief counting up on 7-Segment displays
+ * @version 0.1
+ * @date 2020-12-30
+ *
+ * @copyright Copyright (c) 2020
+ *
+ */
+
+//Wie immer die Bibliothek einbinden
+#include "LedController.hpp"
+//in diesem Beispiel wird zusätzlich math-h benötigt
+#include "math.h"
+
+//Der Pin an dem CS angeschlossen ist
+#define CS 22
+
+//Die Anzahl der in Reihe geschlossenen Segmente
+#define Segments 2
+
+//Die Anzahl der Ziffern pro Segment.
+//Der Wert kann aller von 1 bis 8 sein und frei geändert werden.
+#define digitsPerSegment 2
+
+//Eine Verschiebung, um auszuwählen auf welche Ziffern ausgegeben wird.
+//probier einfach ein paar Werte aus.
+#define positionOffset 2
+
+//Verzögerung vor dem Erhöhen des Zählers
+#define delayTime 500
+
+//Das uninitialisierte controller Objekt
+LedController lc = LedController();
+
+//Diese Funktion berechnet die größte Zahl, die angezeigt werden kann
+unsigned long long getLargestNumber() {
+ return (unsigned long long) pow(10,Segments*digitsPerSegment);
+}
+
+//Diese Funktion setzt die Anzeige auf eine gegebene Zahl
+void setLEDs (unsigned long long number) {
+ //Diese Schleife zerlegt die Zahl und setzt die einzelnen Ziffern
+ for(unsigned int i = 0; i < Segments*digitsPerSegment; i++) {
+ unsigned long long divisor = 1;
+ for(unsigned int j=0; j < i; j++) {
+ divisor *= 10;
+ }
+
+ byte num = number/divisor % 10;
+ lc.setDigit(Segments-i/digitsPerSegment-1,i%digitsPerSegment+positionOffset,num,false);
+ }
+
+}
+
+void setup() {
+ //Sicherstellen, dass die Konfiguration gültig ist
+ static_assert(positionOffset+digitsPerSegment<9,"invalid configuration");
+
+ //initialisieren des LedController Objektes mit hardware SPI und einer Reihe
+ lc.init(CS);
+
+ //alle Segmente sind standardmäßig ausgeschaltet
+ for(unsigned int i = 0; i < Segments; i++) {
+ for(unsigned int j = 0; j < 8; j++) {
+ lc.setRow(i,j,0x00);
+ }
+ }
+
+ //Helligkeit auf das minimum setzten
+ lc.setIntensity(0);
+}
+
+void loop() {
+
+ //Sicherheitshalber die Ausgabe zurücksetzten
+ lc.clearMatrix();
+
+ //bestimmen der größten Zahl
+ auto limit = getLargestNumber();
+
+ //Hochzählen und anzeigen der Zahl
+ for (unsigned long long i = 0; i lc;
+
+//Die verzögerung zwischen updates des Displays
+unsigned long delaytime=250;
+
+void setup() {
+
+ //Nun wird das LedController Objekt ohne Hardware SPI erstellt.
+ lc=LedController<1,1>(DIN,CLK,CS);
+
+ //Setzt die Helligkeit auf einen Mittleren Wert
+ lc.setIntensity(8);
+
+ //leere den Inhalt des Segments
+ lc.clearMatrix();
+}
+
+//Diese Funktion wird das Wort Arduino an Stelle 0 buchstabiert anzeigen.
+void writeArduinoOn7Segment() {
+ lc.setChar(0,0,'a',false);
+ delay(delaytime);
+ lc.setRow(0,0,0x05);
+ delay(delaytime);
+ lc.setChar(0,0,'d',false);
+ delay(delaytime);
+ lc.setRow(0,0,0x1c);
+ delay(delaytime);
+ lc.setRow(0,0,B00010000);
+ delay(delaytime);
+ lc.setRow(0,0,0x15);
+ delay(delaytime);
+ lc.setRow(0,0,0x1D);
+ delay(delaytime);
+ lc.clearMatrix();
+ delay(delaytime);
+}
+
+//Diese Funktion wird alle Hexadezimalziffern entlang des Displays bewegen.
+//Es werden mindestens vier 7-Segment Elemente benötigt damit die Anzeige gut aussieht.
+void scrollDigits() {
+ for(int i=0; i<13; i++) {
+ lc.setDigit(0,3,i,false);
+ lc.setDigit(0,2,i+1,false);
+ lc.setDigit(0,1,i+2,false);
+ lc.setDigit(0,0,i+3,false);
+ delay(delaytime);
+ }
+ lc.clearMatrix();
+ delay(delaytime);
+}
+
+void loop() {
+ writeArduinoOn7Segment();
+ scrollDigits();
+}
diff --git a/examples/german/Led-matrix-counting/Led-matrix-counting.ino b/examples/german/Led-matrix-counting/Led-matrix-counting.ino
new file mode 100644
index 00000000..462ca4e1
--- /dev/null
+++ b/examples/german/Led-matrix-counting/Led-matrix-counting.ino
@@ -0,0 +1,178 @@
+/**
+ * @file Led-matrix-counting.ino
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief counting up on an led matrix
+ * @version 0.1
+ * @date 2020-12-30
+ *
+ * @copyright Copyright (c) 2020
+ *
+ */
+
+//Wie immer muss zuerst die Library verwendet werden
+#include "LedController.hpp"
+
+//Der Pin an den das Chip Select signal der Matrix angeschlossen ist
+#define CS 15
+
+//Die Anzahl der Segmente in der einen Reihe
+#define Segments 4
+
+//Die Zeitverzögerung bis eins weiter gezählt wird
+#define delayTime 200
+
+//Das ist die Variable in der das verwendete Objekt gespeichert wird.
+LedController lc;
+
+//Dieses Array definiert nur wie die Ziffern aussehen.
+ByteBlock digits[10] = {
+ {
+ 0b00000000,
+ 0b00011000,
+ 0b00100100,
+ 0b01000010,
+ 0b01000010,
+ 0b00100100,
+ 0b00011000,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b00011100,
+ 0b00101100,
+ 0b01001100,
+ 0b00001100,
+ 0b00001100,
+ 0b00001100,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b00111000,
+ 0b01101100,
+ 0b00011000,
+ 0b00110000,
+ 0b01100000,
+ 0b01111110,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b00111100,
+ 0b01100110,
+ 0b00001100,
+ 0b00000110,
+ 0b01100110,
+ 0b00111100,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b01100000,
+ 0b01100000,
+ 0b01101000,
+ 0b01111110,
+ 0b00001000,
+ 0b00001000,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b01111110,
+ 0b01100000,
+ 0b01111000,
+ 0b00000110,
+ 0b01100110,
+ 0b00111100,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b00001100,
+ 0b00111000,
+ 0b01100000,
+ 0b01111100,
+ 0b01100110,
+ 0b00111100,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b01111110,
+ 0b00000110,
+ 0b00001100,
+ 0b00011000,
+ 0b00110000,
+ 0b01100000,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b00111100,
+ 0b00100100,
+ 0b00011000,
+ 0b01100110,
+ 0b01000010,
+ 0b00111100,
+ 0b00000000
+ }, {
+ 0b00000000,
+ 0b00111100,
+ 0b01100110,
+ 0b00111110,
+ 0b00000110,
+ 0b00011100,
+ 0b00110000,
+ 0b00000000
+ }
+};
+
+//Diese Funktion zeigt einene gegebene Nummer auf der Matrix an
+void setLEDs (unsigned int number) {
+ //Die Schleife zerlegt die Nummer in die einzalnen Ziffern
+ unsigned int places[Segments];
+
+ for(unsigned int i = 0; i < Segments; i++) {
+ unsigned int divisor = 1;
+ for(unsigned int j=0; j < i; j++) {
+ divisor *= 10;
+ }
+
+ places[Segments-1-i] = number/divisor % 10;
+ lc.displayOnSegment(Segments-1-i,digits[places[Segments-1-i]]);
+ }
+
+}
+
+//Diese Funktion lässt die interne LED blinken
+void switchLED() {
+ static bool LEDON = false;
+ if(LEDON) {
+ digitalWrite(13, LOW);
+ } else {
+ digitalWrite(13, HIGH);
+ }
+ LEDON = !LEDON;
+}
+
+void setup() {
+
+ //Hier wird ein LedController mit Hardware SPI erstelle und lc zugewiesen
+ lc = LedController(CS);
+
+ //Der Pin für die interne LED wird auf output gesetzt
+ pinMode(13, OUTPUT);
+
+ //alle Ziffern müssen um 180 Grad gedreht werden, um sie richtig anzuzeigen.
+ //man kann das weglassen, aber dann sine die Ziffern falsch
+ for(unsigned int i = 0; i < 10; i++) {
+ digits[i] = ByteBlock::rotate180(digits[i]);
+ }
+
+}
+
+void loop() {
+
+ //erst wird die Matrix geleert
+ lc.clearMatrix();
+
+ //In dieser Schleife wird einfach gezählt und jeweils die nummer angezeigt
+ for (unsigned int i = 0; i<10000; i++) {
+ delay(500);
+ switchLED();
+ setLEDs(i);
+ }
+
+}
diff --git a/examples/german/Led-matrix-message/Led-matrix-message.ino b/examples/german/Led-matrix-message/Led-matrix-message.ino
new file mode 100644
index 00000000..bb758e10
--- /dev/null
+++ b/examples/german/Led-matrix-message/Led-matrix-message.ino
@@ -0,0 +1,122 @@
+/**
+ * @file Led-matrix-message.ino
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief This demo shows how a message can be displayed on an LedMatrix.
+ * This demo is based on https://www.meine-schaltung.de/schaltung/soft/anzeige/vierfach_matrix_mit_arduino/ and modified for the latest LedController.
+ * @version 0.1
+ * @date 2021-02-16
+ *
+ * @copyright Copyright (c) 2021
+ *
+ */
+
+//Wie immer die Bibliothek einbinden
+#include "LedController.hpp"
+
+//Der Pin, der mit CS der Matrix verbunden ist.
+#define CS 22
+
+//Die Gesamtzahl der Segments
+//Alle sind in einer Reihe und der Wert kann frei geändert werden.
+#define Segments 4
+
+//Die Verzögerung bis der Inhalt wieder um eins bewegt wird.
+#define delayTime 200
+
+//Das uninitialisierte LedController Objekt
+LedController lc = LedController();
+
+// Zeichen und Buchstaben ---------------------------------------------------------------------------------
+ByteBlock A = ByteBlock::rotate180({ 0b00000000, 0b00011000, 0b00100100, 0b00100100, 0b00111100, 0b00100100, 0b00100100, 0b00000000 });
+ByteBlock a = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b00111000, 0b01001000, 0b01001000, 0b01001000, 0b00111000, 0b00000000 });
+ByteBlock b = ByteBlock::rotate180(ByteBlock::reverse({ 0b00000000, 0b00001000, 0b00111000, 0b01001000, 0b01001000, 0b01001000, 0b00111000, 0b00000000 }))<<2;
+ByteBlock c = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b00110000, 0b01000000, 0b01000000, 0b01000000, 0b00110000, 0b00000000 });
+ByteBlock d = ByteBlock::rotate180({ 0b00000000, 0b00001000, 0b00111000, 0b01001000, 0b01001000, 0b01001000, 0b00111000, 0b00000000 });
+ByteBlock e = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b00110000, 0b01001000, 0b01111000, 0b01000000, 0b00111000, 0b00000000 });
+ByteBlock H = ByteBlock::rotate180({ 0b00000000, 0b10010000, 0b10010000, 0b11110000, 0b10010000, 0b10010000, 0b10010000, 0b00000000 });
+ByteBlock h = ByteBlock::rotate180({ 0b00000000, 0b01000000, 0b01110000, 0b01001000, 0b01001000, 0b01001000, 0b01001000, 0b00000000 });
+ByteBlock I = ByteBlock::rotate180({ 0b00000000, 0b01000000, 0b01000000, 0b01000000, 0b01000000, 0b01000000, 0b01000000, 0b00000000 });
+ByteBlock i = ByteBlock::rotate180({ 0b00000000, 0b10000000, 0b00000000, 0b10000000, 0b10000000, 0b10000000, 0b10000000, 0b00000000 });
+ByteBlock J = ByteBlock::rotate180({ 0b00000000, 0b00001000, 0b00001000, 0b00001000, 0b00001000, 0b01001000, 0b00110000, 0b00000000 });
+ByteBlock K = ByteBlock::rotate180({ 0b00000000, 0b10001000, 0b10010000, 0b11100000, 0b10100000, 0b10010000, 0b10001000, 0b00000000 });
+ByteBlock k = ByteBlock::rotate180({ 0b00000000, 0b10000000, 0b10010000, 0b10100000, 0b11000000, 0b10100000, 0b10010000, 0b00000000 });
+ByteBlock l = ByteBlock::rotate180({ 0b00000000, 0b10000000, 0b10000000, 0b10000000, 0b10000000, 0b10000000, 0b01000000, 0b00000000 });
+ByteBlock M = ByteBlock::rotate180({ 0b00000000, 0b01000100, 0b01101100, 0b01010100, 0b01000100, 0b01000100, 0b01000100, 0b00000000 });
+ByteBlock m = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b01110110, 0b01001001, 0b01001001, 0b01001001, 0b01001001, 0b00000000 });
+ByteBlock n = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b01110000, 0b01001000, 0b01001000, 0b01001000, 0b01001000, 0b00000000 });
+ByteBlock o = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b01100000, 0b10010000, 0b10010000, 0b10010000, 0b01100000, 0b00000000 });
+ByteBlock p = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b11100000, 0b10001000, 0b10001000, 0b10001000, 0b11100000, 0b10000000 });
+ByteBlock q = ByteBlock::rotate180(ByteBlock::reverse({ 0b00000000, 0b00000000, 0b11100000, 0b10001000, 0b10001000, 0b10001000, 0b11100000, 0b10000000 }))<<2;
+ByteBlock r = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b10100000, 0b11000000, 0b10000000, 0b10000000, 0b10000000, 0b00000000 });
+ByteBlock s = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b01110000, 0b10000000, 0b01100000, 0b00010000, 0b11100000, 0b00000000 });
+ByteBlock t = ByteBlock::rotate180({ 0b00000000, 0b10000000, 0b11100000, 0b10000000, 0b10000000, 0b10000000, 0b01100000, 0b00000000 });
+ByteBlock u = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b10010000, 0b10010000, 0b10010000, 0b10010000, 0b01100000, 0b00000000 });
+ByteBlock w = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b10001000, 0b10001000, 0b10101000, 0b11011000, 0b10001000, 0b00000000 });
+ByteBlock LB = ByteBlock::rotate180({ 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000 });
+ByteBlock AZ = ByteBlock::rotate180({ 0b01000000, 0b01000000, 0b01000000, 0b01000000, 0b01000000, 0b00000000, 0b01000000, 0b00000000 });
+
+ByteBlock Heart = ByteBlock::rotate180({
+ 0b00000000,
+ 0b01000010,
+ 0b10100101,
+ 0b10011001,
+ 0b10000001,
+ 0b01000010,
+ 0b00100100,
+ 0b00011000,
+});
+
+//Die Anzahl der ByteBlocks aus der die Nachricht besteht.
+const unsigned int message_length = 6;
+
+//Dieses Array definiert die Nachricht, welche auf der Matrix angezeigt wird.
+//Standardmäßig wird 'Jahallo!! :heart:' ausgegeben, kann aber frei geändert werden.
+ByteBlock message[message_length] = {
+ J&(a>>5), //'J' und erste Hälfte von 'a'
+ (a<<3)&(h>>2), // zweite Hälfte von 'a' und 'h'
+ (a<<1)&(l>>5), // 'a' und 'l'
+ l&(o>>3), // 'l' und 'o'
+ (AZ<<1)&(AZ>>1)&((++Heart)>>5), // ! und ! und erste Hälfte von ':heart:'
+ (++Heart)<<4 // zweite Hälfte von ':heart:' (ändere die 4 zu einer 3 um das ganze Herz anzuzeigen)
+};
+
+
+void setup() {
+ //erstelle eine Konfiguration mit der gleichen Größe wie der Controller
+ controller_configuration conf;
+ //Nutze den CS pin
+ conf.cs_pin = CS;
+ //Setzt die Übertragungsgeschwindigkeit auf den höchsten stabilen Wert
+ conf.spiTransferSpeed = 10000000;
+ //schaltet Hardware SPI an
+ conf.useHardwareSpi = true;
+
+ //initialisiere den Controller mit der Konfiguratin
+ lc.init(conf);
+
+ //setzte die Helligkeit auf das niedrigste
+ lc.setIntensity(0);
+}
+
+void loop() {
+ //sicherheitshalber Matrix leeren
+ lc.clearMatrix();
+
+ //Daten reinschieben
+ //Jedes Segment der Nachricht wird einzeln reingeschoben
+ for(unsigned int i = 0; i < message_length; i++) {
+ //Da jedes Segment eine Breite von 8 pixeln hat noch eine Schleife
+ for(unsigned int j = 0; j < 8; j++) {
+ //Schiebt alles nach links und fügt rechts eine Spalte der Nachricht rein
+ lc.moveLeft(ByteBlock::makeColumns(message[i])[j]);
+ delay(delayTime);
+ }
+ }
+
+ //schiebt die daten raus
+ //Da die größe der Matrix 8*Segments ist muss einfach so oft geschoben werden.
+ for(unsigned int i = 0; i < 8*Segments; i++) {
+ lc.moveLeft();
+ delay(delayTime);
+ }
+}
diff --git a/examples/german/Led-matrix-rocket-hwSPI/Led-matrix-rocket-hwSPI.ino b/examples/german/Led-matrix-rocket-hwSPI/Led-matrix-rocket-hwSPI.ino
new file mode 100644
index 00000000..e8bdcd11
--- /dev/null
+++ b/examples/german/Led-matrix-rocket-hwSPI/Led-matrix-rocket-hwSPI.ino
@@ -0,0 +1,90 @@
+/**
+ * @file Led-matrix-rocket-hwSPI.ino
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief Led-matrix-rocket.ino with hardware spi
+ * @version 0.1
+ * @date 2020-12-30
+ *
+ * @copyright Copyright (c) 2020
+ *
+ */
+
+//Da dieses Beispiel einfach Led-matrix-rocket.ino mit hardware SPI ist, schau auf dessen Seite für Details.
+#include "LedController.hpp"
+
+#define CS 15
+#define Segments 4
+
+#define delayTime 200
+
+LedController lc = LedController();
+
+ByteBlock rocket= ByteBlock::reverse({
+ 0b00000000,
+ 0b00001111,
+ 0b00111110,
+ 0b11111101,
+ 0b00111110,
+ 0b00001111,
+ 0b00000000,
+ 0b00000000
+});
+
+ByteBlock rocketColumns;
+
+void switchLED() {
+ static bool LEDON = false;
+ if(LEDON) {
+ digitalWrite(13, LOW);
+ } else {
+ digitalWrite(13, HIGH);
+ }
+ LEDON = !LEDON;
+}
+
+void setup() {
+ //Nur die folgende Zeile unterscheidet sich von dem Beispiel ohne Hardware SPI, da hier nur ein Pin angegeben werden muss.
+ lc.init(CS);
+
+ rocketColumns = ByteBlock::makeColumns(rocket);
+
+ pinMode(13, OUTPUT);
+
+ lc.setIntensity(0);
+
+}
+
+//Das ist mehr oder weniger identisch zu Led-matrix-rocket.ino
+void loop() {
+
+ lc.clearMatrix();
+
+ for(int dir = 0; dir < 2; dir++) {
+ delay(delayTime);
+ for(int i = 0; i < 8*(Segments+1); i++) {
+ //einmal Bilinken für jeden Durchlauf
+ switchLED();
+
+ //rakete reinfliegen lassen falls sie nicht drin ist
+ auto in = (i<8) ? rocketColumns[i] : 0x00;
+
+ //fall dir 0 ist nach rechsts sonst nach links
+ dir == 0 ? lc.moveRight(in) : lc.moveLeft(in);
+
+ delay(delayTime);
+
+ //hoch- und runterbewegen
+ if(i > 7) {
+ if(i % 6 < 3) {
+ lc.moveDown();
+ } else {
+ lc.moveUp();
+ }
+ }
+
+ delay(delayTime);
+
+ }
+ }
+
+}
diff --git a/examples/german/Led-matrix-rocket-multi/Led-matrix-rocket-multi.ino b/examples/german/Led-matrix-rocket-multi/Led-matrix-rocket-multi.ino
new file mode 100644
index 00000000..647a494f
--- /dev/null
+++ b/examples/german/Led-matrix-rocket-multi/Led-matrix-rocket-multi.ino
@@ -0,0 +1,149 @@
+/**
+ * @file Led-matrix-rocket-multi.ino
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief An exaple for using multiple rows
+ * @version 0.1
+ * @date 2020-12-30
+ *
+ * @copyright Copyright (c) 2020
+ *
+ */
+
+#include "LedController.hpp"
+
+//spi pins falls nicht hardware SPI verwendet werden soll
+#define DIN 27
+#define CLK 25
+
+//Die CS pins die für die untere/obere Zeile verwendet werden sollen
+#define CS_BOTTOM 25
+#define CS_TOP 15
+
+//Die Anzahl der Segmente pro Zeile
+#define Segments 4
+
+//Der Pin der internen LED
+#define LED 13
+
+//Die verzögerung zwischen zwei Bewegungen
+#define delayTime 200
+
+//Hier wird wieder ein uninitialisierter LedController erstellt
+auto lc = LedController();
+
+//Das Pixelart der wunderschönen Rakete
+ByteBlock rocket= ByteBlock::reverse({
+ 0b00000000,
+ 0b00001111,
+ 0b00111110,
+ 0b11111101,
+ 0b00111110,
+ 0b00001111,
+ 0b00000000,
+ 0b00000000
+});
+
+ByteBlock rocketColumns;
+
+//schaltet den Zustand der internen LED um
+void switchLED() {
+ static bool LEDON = false;
+ if(LEDON) {
+ digitalWrite(LED, LOW);
+ } else {
+ digitalWrite(LED, HIGH);
+ }
+ LEDON = !LEDON;
+}
+
+void setup() {
+
+ //Erstellen einer Konfiguration für den LedController
+ controller_configuration conf;
+
+ //Da mehr als eine Zeile verwendet werden soll (ohne virtual multi Row) sollte das 0 sein.
+ conf.cs_pin = 0;
+
+ //hier werden die Chip Select Pins der einzelnen Reihen gesetzt.
+ //Die untere Zeile (Zeile 0) ist an Pin 25 geschlossen und die obere Reihe (Reihe 1) an Pin 15
+ conf.row_cs_pin[0] = CS_BOTTOM;
+ conf.row_cs_pin[1] = CS_TOP;
+
+ //Das setzt die nńutzung von harware SPI
+ //Schaue welche Pins bei deinem Board verwendet werden müssen.
+ conf.useHardwareSpi = true;
+
+ //Das schaltet die Debug Ausgabe an.
+ //Es sollte zwar nichts ausgegeben werden, kann aber trotzdem hilfreich sein.
+ conf.debug_output = true;
+
+ //Da wir virtual_multi_row nicht verwenden sollte es auf false gesetzt werden.
+ //Es sollte zwar egal sein, da SPI_CS 0 ist aber sicher ist sicher.
+ conf.virtual_multi_row = false;
+
+ //Das setzt die Übertragungsgeschwindigkeit der SPI Schnittstelle.
+ //Falls hohe Werte gesetzt werden, sollte eine gute Verbingung sichergestellt werden.
+ conf.spiTransferSpeed = 800000;
+
+ //Initialisiere den LedController mit der erstellten Konfiguration.
+ lc.init(conf);
+
+ //Hier wird ein Array aus Spalten der Rakete erstellt.
+ //Dies wird vewendet, um die Rakete Stück für Stück reinzuschieben
+ //Man kann auch rocketColumns = rocket schreiben, aber dann wird die Rakete um 90 Grad gedreht sein.
+ rocketColumns = ByteBlock::makeColumns(rocket);
+
+ //Erlaubt das steuern der internen LED
+ pinMode(LED, OUTPUT);
+
+}
+
+//Das ist mehr oder weniger identisch zu Led-matrix-rocket.ino
+void loop() {
+ lc.clearMatrix();
+
+ for(int i = 0; i < 8*(Segments+1); i++) {
+ delay(delayTime);
+
+ switchLED();
+
+ if(i < 8) {
+ lc.moveRowRight(rocketColumns[i]);
+ } else {
+ lc.moveRight();
+
+ delay(delayTime);
+ if(i%16 < 8) {
+ lc.moveDown();
+ } else {
+ lc.moveUp();
+ }
+ }
+
+ }
+
+ delay(delayTime);
+
+ for(int i = 0; i < 8*(Segments+1); i++) {
+ delay(delayTime);
+
+ switchLED();
+
+ if(i < 8) {
+ lc.moveRowLeft(rocketColumns[i]);
+ } else {
+ lc.moveLeft();
+
+ delay(delayTime);
+ if(i%16 < 8) {
+ lc.moveDown();
+ } else {
+ lc.moveUp();
+ }
+ }
+
+ }
+
+ delay(delayTime);
+
+}
diff --git a/examples/german/Led-matrix-rocket/Led-matrix-rocket.ino b/examples/german/Led-matrix-rocket/Led-matrix-rocket.ino
new file mode 100644
index 00000000..f1d7592e
--- /dev/null
+++ b/examples/german/Led-matrix-rocket/Led-matrix-rocket.ino
@@ -0,0 +1,103 @@
+/**
+ * @file Led-matrix-rocket.ino
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief Using the the LedController to move a rocket
+ * @version 0.1
+ * @date 2020-12-30
+ *
+ * @copyright Copyright (c) 2020
+ *
+ */
+
+//wie immer muss zuerst die Bibliothek eingebunden werden
+#include "LedController.hpp"
+
+//Diese Pins werden für die SPI übertragung verwendet
+//Schau in die Nutzungsanweisung für eine Beschreibung
+#define DIN 27
+#define CS 26
+#define CLK 25
+
+//Dies Gesamtzahl der Segmente
+#define Segments 4
+
+//Die verzögerung zwischen Bewegungen
+#define delayTime 200
+
+//Diese Zeile erstellt ein unitialisierten LedController.
+//Dieser wird dann in der setup Funktion initialisiert.
+LedController lc = LedController();
+
+//Das ist mein Pixelart und ist die Raktete die angezeigt wird.
+ByteBlock rocket= ByteBlock::reverse({
+ 0b00000000,
+ 0b00001111,
+ 0b00111110,
+ 0b11111101,
+ 0b00111110,
+ 0b00001111,
+ 0b00000000,
+ 0b00000000
+});
+
+ByteBlock rocketColumns;
+
+//die LED wechselt den Zustand der internen LED
+void switchLED() {
+ static bool LEDON = false;
+ if(LEDON) {
+ digitalWrite(13, LOW);
+ } else {
+ digitalWrite(13, HIGH);
+ }
+ LEDON = !LEDON;
+}
+
+void setup() {
+
+ //hier wird der LedController ohne Hardware SPI initialisiert.
+ lc.init(DIN,CLK,CS);
+
+ //Hier wird ein Array aus Spalten der Rakete erstellt.
+ //Dies wird vewendet, um die Rakete Stück für Stück reinzuschieben
+ //Man kann auch rocketColumns = rocket schreiben, aber dann wird die Rakete um 90 Grad gedreht sein.
+ rocketColumns = ByteBlock::makeColumns(rocket);
+
+ //Erlaubt das Schalten der internen LED
+ pinMode(13, OUTPUT);
+
+}
+
+void loop() {
+
+ lc.clearMatrix();
+
+ for(int dir = 0; dir < 2; dir++) {
+ delay(delayTime);
+ for(int i = 0; i < 8*(Segments+1); i++) {
+ //einmal Bilinken für jeden Durchlauf
+ switchLED();
+
+ //rakete reinfliegen lassen falls sie nicht drin ist
+ auto in = (i<8) ? rocketColumns[i] : 0x00;
+
+ //fall dir 0 ist nach rechsts sonst nach links
+ dir == 0 ? lc.moveRight(in) : lc.moveLeft(in);
+
+ delay(delayTime);
+
+ //hoch- und runterbewegen
+ if(i > 7) {
+ if(i % 6 < 3) {
+ lc.moveDown();
+ } else {
+ lc.moveUp();
+ }
+ }
+
+ delay(delayTime);
+
+ }
+ }
+
+}
diff --git a/keywords.txt b/keywords.txt
index 9d2a94f1..46c61e19 100644
--- a/keywords.txt
+++ b/keywords.txt
@@ -1,18 +1,21 @@
#######################################
-# Syntax Coloring Map For LedControl
+# Syntax Coloring Map For LedController
#######################################
#######################################
# Datatypes (KEYWORD1)
#######################################
-LedControl KEYWORD1
+LedController KEYWORD1
+controller_configuration KEYWORD1
+ByteRow KEYWORD1
+ByteBlock KEYWORD1
#######################################
# Methods and Functions (KEYWORD2)
#######################################
-shutdown KEYWORD2
+shutdownAllSegments KEYWORD2
setScanLimit KEYWORD2
setIntensity KEYWORD2
clearDisplay KEYWORD2
@@ -22,7 +25,23 @@ setColumn KEYWORD2
setDigit KEYWORD2
setChar KEYWORD2
+moveLeft KEYWORD2
+moveRight KEYWORD2
+moveUp KEYWORD2
+moveDown KEYWORD2
+makeColumns KEYWORD2
+refreshSegments KEYWORD2
+clearSegment KEYWORD2
+activateAllSegments KEYWORD2
+
+activateSegment KEYWORD2
+shutdownSegment KEYWORD2
+getSegmentCount KEYWORD2
+clearMatrix KEYWORD2
+resetMatrix KEYWORD2
+displayOnSegment KEYWORD2
+setIntensity KEYWORD2
+
#######################################
# Constants (LITERAL1)
#######################################
-
diff --git a/library.properties b/library.properties
index 66baced1..1f63c3a8 100644
--- a/library.properties
+++ b/library.properties
@@ -1,10 +1,12 @@
-name=LedControl
-version=1.0.6
-author=Eberhard Fahle
-maintainer=Eberhard Fahle
-sentence=A library for the MAX7219 and the MAX7221 Led display drivers.
-paragraph=The library supports multiple daisychained drivers and supports Led-Matrix displays as well as 7-Segment displays.
+name=LedController
+version=2.0.2
+author=Noa Sakurajin
+maintainer=Noa Sakurajin
+sentence=The better LedControl library for the MAX7219 and the MAX7221 Led display drivers.
+paragraph="!!Version 2.0.0 comes with a lot of changes plese check the readme on more information!! It can do everything LedControl can, works with more boards (like esp32) and makes working with LedMatricies easier. You can more your displayed data around, set whole segments and have way more symbols for 7-segment displays. If you still miss a feature just create a pull request and I will do my best to add it ASAP."
category=Display
-url=http://wayoda.github.io/LedControl/
+url=https://github.com/noah1510/LedController
+repository=https://github.com/noah1510/LedController.git
architectures=*
-
+includes=LedController.hpp
+license=LGPLv3
diff --git a/platformio.ini b/platformio.ini
new file mode 100644
index 00000000..babd097a
--- /dev/null
+++ b/platformio.ini
@@ -0,0 +1,79 @@
+; PlatformIO Project Configuration File
+;
+; Build options: build flags, source filter
+; Upload options: custom upload port, speed and extra flags
+; Library options: dependencies, extra library storages
+; Advanced options: extra scripting
+;
+; Please visit documentation for the other options and examples
+; https://docs.platformio.org/page/projectconf.html
+
+[env:native]
+platform = native
+lib_ldf_mode = deep+
+lib_extra_dirs = ~/Arduino/libraries
+test_build_project_src = yes
+lib_compat_mode = strict
+lib_deps =
+ fabiobatsilva/ArduinoFake@^0.2.2
+ https://github.com/noah1510/pio-native-spi.git
+
+[platformio]
+default_envs = esp32dev
+
+[env:esp32dev]
+platform = espressif32
+board = esp32dev
+framework = arduino
+lib_extra_dirs = ~/Arduino/libraries
+lib_compat_mode = strict
+
+[env:d1_mini]
+platform = espressif8266
+board = d1_mini
+framework = arduino
+lib_extra_dirs = ~/Arduino/libraries
+lib_compat_mode = strict
+
+[env:uno]
+platform = atmelavr
+board = uno
+framework = arduino
+lib_extra_dirs = ~/Arduino/libraries
+lib_compat_mode = strict
+
+[env:ATmega1280]
+platform = atmelavr
+board = ATmega1280
+framework = arduino
+lib_extra_dirs = ~/Arduino/libraries
+lib_compat_mode = strict
+
+[env:leonardo]
+platform = atmelavr
+board = leonardo
+framework = arduino
+lib_extra_dirs = ~/Arduino/libraries
+lib_compat_mode = strict
+
+[env:bluefruitmicro]
+platform = atmelavr
+board = bluefruitmicro
+framework = arduino
+lib_extra_dirs = ~/Arduino/libraries
+lib_compat_mode = strict
+
+[env:due]
+platform = atmelsam
+board = due
+framework = arduino
+lib_extra_dirs = ~/Arduino/libraries
+lib_compat_mode = strict
+
+[env:teensy41]
+platform = teensy
+board = teensy41
+framework = arduino
+lib_extra_dirs = ~/Arduino/libraries
+lib_compat_mode = strict
+
diff --git a/src/LedControl.cpp b/src/LedControl.cpp
deleted file mode 100644
index e43211fd..00000000
--- a/src/LedControl.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * LedControl.cpp - A library for controling Leds with a MAX7219/MAX7221
- * Copyright (c) 2007 Eberhard Fahle
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * This permission notice shall be included in all copies or
- * substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#include "LedControl.h"
-
-//the opcodes for the MAX7221 and MAX7219
-#define OP_NOOP 0
-#define OP_DIGIT0 1
-#define OP_DIGIT1 2
-#define OP_DIGIT2 3
-#define OP_DIGIT3 4
-#define OP_DIGIT4 5
-#define OP_DIGIT5 6
-#define OP_DIGIT6 7
-#define OP_DIGIT7 8
-#define OP_DECODEMODE 9
-#define OP_INTENSITY 10
-#define OP_SCANLIMIT 11
-#define OP_SHUTDOWN 12
-#define OP_DISPLAYTEST 15
-
-LedControl::LedControl(int dataPin, int clkPin, int csPin, int numDevices) {
- SPI_MOSI=dataPin;
- SPI_CLK=clkPin;
- SPI_CS=csPin;
- if(numDevices<=0 || numDevices>8 )
- numDevices=8;
- maxDevices=numDevices;
- pinMode(SPI_MOSI,OUTPUT);
- pinMode(SPI_CLK,OUTPUT);
- pinMode(SPI_CS,OUTPUT);
- digitalWrite(SPI_CS,HIGH);
- SPI_MOSI=dataPin;
- for(int i=0;i<64;i++)
- status[i]=0x00;
- for(int i=0;i=maxDevices)
- return;
- if(b)
- spiTransfer(addr, OP_SHUTDOWN,0);
- else
- spiTransfer(addr, OP_SHUTDOWN,1);
-}
-
-void LedControl::setScanLimit(int addr, int limit) {
- if(addr<0 || addr>=maxDevices)
- return;
- if(limit>=0 && limit<8)
- spiTransfer(addr, OP_SCANLIMIT,limit);
-}
-
-void LedControl::setIntensity(int addr, int intensity) {
- if(addr<0 || addr>=maxDevices)
- return;
- if(intensity>=0 && intensity<16)
- spiTransfer(addr, OP_INTENSITY,intensity);
-}
-
-void LedControl::clearDisplay(int addr) {
- int offset;
-
- if(addr<0 || addr>=maxDevices)
- return;
- offset=addr*8;
- for(int i=0;i<8;i++) {
- status[offset+i]=0;
- spiTransfer(addr, i+1,status[offset+i]);
- }
-}
-
-void LedControl::setLed(int addr, int row, int column, boolean state) {
- int offset;
- byte val=0x00;
-
- if(addr<0 || addr>=maxDevices)
- return;
- if(row<0 || row>7 || column<0 || column>7)
- return;
- offset=addr*8;
- val=B10000000 >> column;
- if(state)
- status[offset+row]=status[offset+row]|val;
- else {
- val=~val;
- status[offset+row]=status[offset+row]&val;
- }
- spiTransfer(addr, row+1,status[offset+row]);
-}
-
-void LedControl::setRow(int addr, int row, byte value) {
- int offset;
- if(addr<0 || addr>=maxDevices)
- return;
- if(row<0 || row>7)
- return;
- offset=addr*8;
- status[offset+row]=value;
- spiTransfer(addr, row+1,status[offset+row]);
-}
-
-void LedControl::setColumn(int addr, int col, byte value) {
- byte val;
-
- if(addr<0 || addr>=maxDevices)
- return;
- if(col<0 || col>7)
- return;
- for(int row=0;row<8;row++) {
- val=value >> (7-row);
- val=val & 0x01;
- setLed(addr,row,col,val);
- }
-}
-
-void LedControl::setDigit(int addr, int digit, byte value, boolean dp) {
- int offset;
- byte v;
-
- if(addr<0 || addr>=maxDevices)
- return;
- if(digit<0 || digit>7 || value>15)
- return;
- offset=addr*8;
- v=pgm_read_byte_near(charTable + value);
- if(dp)
- v|=B10000000;
- status[offset+digit]=v;
- spiTransfer(addr, digit+1,v);
-}
-
-void LedControl::setChar(int addr, int digit, char value, boolean dp) {
- int offset;
- byte index,v;
-
- if(addr<0 || addr>=maxDevices)
- return;
- if(digit<0 || digit>7)
- return;
- offset=addr*8;
- index=(byte)value;
- if(index >127) {
- //no defined beyond index 127, so we use the space char
- index=32;
- }
- v=pgm_read_byte_near(charTable + index);
- if(dp)
- v|=B10000000;
- status[offset+digit]=v;
- spiTransfer(addr, digit+1,v);
-}
-
-void LedControl::spiTransfer(int addr, volatile byte opcode, volatile byte data) {
- //Create an array with the data to shift out
- int offset=addr*2;
- int maxbytes=maxDevices*2;
-
- for(int i=0;i0;i--)
- shiftOut(SPI_MOSI,SPI_CLK,MSBFIRST,spidata[i-1]);
- //latch the data onto the display
- digitalWrite(SPI_CS,HIGH);
-}
-
-
diff --git a/src/LedControl.h b/src/LedControl.h
deleted file mode 100644
index cdfaa1f5..00000000
--- a/src/LedControl.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * LedControl.h - A library for controling Leds with a MAX7219/MAX7221
- * Copyright (c) 2007 Eberhard Fahle
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following
- * conditions:
- *
- * This permission notice shall be included in all copies or
- * substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef LedControl_h
-#define LedControl_h
-
-#include
-
-#if (ARDUINO >= 100)
-#include
-#else
-#include
-#endif
-
-/*
- * Segments to be switched on for characters and digits on
- * 7-Segment Displays
- */
-const static byte charTable [] PROGMEM = {
- B01111110,B00110000,B01101101,B01111001,B00110011,B01011011,B01011111,B01110000,
- B01111111,B01111011,B01110111,B00011111,B00001101,B00111101,B01001111,B01000111,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B10000000,B00000001,B10000000,B00000000,
- B01111110,B00110000,B01101101,B01111001,B00110011,B01011011,B01011111,B01110000,
- B01111111,B01111011,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B01110111,B00011111,B00001101,B00111101,B01001111,B01000111,B00000000,
- B00110111,B00000000,B00000000,B00000000,B00001110,B00000000,B00000000,B00000000,
- B01100111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001000,
- B00000000,B01110111,B00011111,B00001101,B00111101,B01001111,B01000111,B00000000,
- B00110111,B00000000,B00000000,B00000000,B00001110,B00000000,B00010101,B00011101,
- B01100111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
- B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000
-};
-
-class LedControl {
- private :
- /* The array for shifting the data to the devices */
- byte spidata[16];
- /* Send out a single command to the device */
- void spiTransfer(int addr, byte opcode, byte data);
-
- /* We keep track of the led-status for all 8 devices in this array */
- byte status[64];
- /* Data is shifted out of this pin*/
- int SPI_MOSI;
- /* The clock is signaled on this pin */
- int SPI_CLK;
- /* This one is driven LOW for chip selectzion */
- int SPI_CS;
- /* The maximum number of devices we use */
- int maxDevices;
-
- public:
- /*
- * Create a new controler
- * Params :
- * dataPin pin on the Arduino where data gets shifted out
- * clockPin pin for the clock
- * csPin pin for selecting the device
- * numDevices maximum number of devices that can be controled
- */
- LedControl(int dataPin, int clkPin, int csPin, int numDevices=1);
-
- /*
- * Gets the number of devices attached to this LedControl.
- * Returns :
- * int the number of devices on this LedControl
- */
- int getDeviceCount();
-
- /*
- * Set the shutdown (power saving) mode for the device
- * Params :
- * addr The address of the display to control
- * status If true the device goes into power-down mode. Set to false
- * for normal operation.
- */
- void shutdown(int addr, bool status);
-
- /*
- * Set the number of digits (or rows) to be displayed.
- * See datasheet for sideeffects of the scanlimit on the brightness
- * of the display.
- * Params :
- * addr address of the display to control
- * limit number of digits to be displayed (1..8)
- */
- void setScanLimit(int addr, int limit);
-
- /*
- * Set the brightness of the display.
- * Params:
- * addr the address of the display to control
- * intensity the brightness of the display. (0..15)
- */
- void setIntensity(int addr, int intensity);
-
- /*
- * Switch all Leds on the display off.
- * Params:
- * addr address of the display to control
- */
- void clearDisplay(int addr);
-
- /*
- * Set the status of a single Led.
- * Params :
- * addr address of the display
- * row the row of the Led (0..7)
- * col the column of the Led (0..7)
- * state If true the led is switched on,
- * if false it is switched off
- */
- void setLed(int addr, int row, int col, boolean state);
-
- /*
- * Set all 8 Led's in a row to a new state
- * Params:
- * addr address of the display
- * row row which is to be set (0..7)
- * value each bit set to 1 will light up the
- * corresponding Led.
- */
- void setRow(int addr, int row, byte value);
-
- /*
- * Set all 8 Led's in a column to a new state
- * Params:
- * addr address of the display
- * col column which is to be set (0..7)
- * value each bit set to 1 will light up the
- * corresponding Led.
- */
- void setColumn(int addr, int col, byte value);
-
- /*
- * Display a hexadecimal digit on a 7-Segment Display
- * Params:
- * addr address of the display
- * digit the position of the digit on the display (0..7)
- * value the value to be displayed. (0x00..0x0F)
- * dp sets the decimal point.
- */
- void setDigit(int addr, int digit, byte value, boolean dp);
-
- /*
- * Display a character on a 7-Segment display.
- * There are only a few characters that make sense here :
- * '0','1','2','3','4','5','6','7','8','9','0',
- * 'A','b','c','d','E','F','H','L','P',
- * '.','-','_',' '
- * Params:
- * addr address of the display
- * digit the position of the character on the display (0..7)
- * value the character to be displayed.
- * dp sets the decimal point.
- */
- void setChar(int addr, int digit, char value, boolean dp);
-};
-
-#endif //LedControl.h
-
-
-
diff --git a/src/LedController.cppm b/src/LedController.cppm
new file mode 100644
index 00000000..9582f2f5
--- /dev/null
+++ b/src/LedController.cppm
@@ -0,0 +1,7 @@
+
+#if __cplusplus > 201703L
+export module LedController
+#include "LedController.hpp"
+
+export sakurajin
+#endif
diff --git a/src/LedController.hpp b/src/LedController.hpp
new file mode 100644
index 00000000..83627032
--- /dev/null
+++ b/src/LedController.hpp
@@ -0,0 +1,11 @@
+#pragma once
+
+#include "LedController_config.hpp"
+#include "LedController_template.hpp"
+#include "implementations/LedController_low_level.hpp"
+#include "implementations/LedController_movement.hpp"
+#include "implementations/LedController_display.hpp"
+#include "implementations/LedController_transformation.hpp"
+#include "implementations/LedController_core.hpp"
+
+using namespace sakurajin;
\ No newline at end of file
diff --git a/src/LedController_MAX72XX.hpp b/src/LedController_MAX72XX.hpp
new file mode 100644
index 00000000..2393a6fb
--- /dev/null
+++ b/src/LedController_MAX72XX.hpp
@@ -0,0 +1,43 @@
+#pragma once
+
+#include "LedController_charTable.hpp"
+
+namespace sakurajin {
+ // the opcodes for the MAX7221 and MAX7219
+ class MAX72XX {
+ private:
+ charTable table;
+
+ static const MAX72XX& getInstance() noexcept {
+ static MAX72XX instance = MAX72XX();
+ return instance;
+ }
+
+ MAX72XX() noexcept;
+
+ public:
+ static const unsigned int OP_NOOP = 0;
+ static const unsigned int OP_DIGIT0 = 1;
+ static const unsigned int OP_DIGIT1 = 2;
+ static const unsigned int OP_DIGIT2 = 3;
+ static const unsigned int OP_DIGIT3 = 4;
+ static const unsigned int OP_DIGIT4 = 5;
+ static const unsigned int OP_DIGIT5 = 6;
+ static const unsigned int OP_DIGIT6 = 7;
+ static const unsigned int OP_DIGIT7 = 8;
+ static const unsigned int OP_DECODEMODE = 9;
+ static const unsigned int OP_INTENSITY = 10;
+ static const unsigned int OP_SCANLIMIT = 11;
+ static const unsigned int OP_SHUTDOWN = 12;
+ static const unsigned int OP_DISPLAYTEST = 15;
+
+ static byte getChar(char c) noexcept {
+ return getInstance().table.getChar(c);
+ }
+
+ static const charTable& getTable() noexcept {
+ return getInstance().table;
+ }
+ };
+
+}
diff --git a/src/LedController_byteblock.hpp b/src/LedController_byteblock.hpp
new file mode 100644
index 00000000..27348394
--- /dev/null
+++ b/src/LedController_byteblock.hpp
@@ -0,0 +1,258 @@
+#pragma once
+
+#if (ARDUINO >= 100)
+#include
+#else
+#if __has_include("ArduinoFake.h")
+#include "ArduinoFake.h"
+#else
+#include
+#endif
+#endif
+
+#include "LedController_byterow.hpp"
+
+namespace sakurajin {
+
+ /**
+ * \~english
+ * @brief A block of bytes used to represent all of the data in a Segment.
+ * It is simply a ByteRow with size 8 but useful regardless.
+ *
+ * \~german
+ * @brief Ein Block an bytes, der alle Daten in einem Segment darstellt.
+ * Es ist einfach eine ByteRow mit Länge 8, trotzdem nützlich.
+ */
+ class ByteBlock : public ByteRow<8> {
+ public:
+
+ /**
+ * \~english
+ * @brief Construct a new Byte Block object from an array.
+ *
+ * @param newdata The array which should be used to initilize the row.
+ *
+ * \~german
+ * @brief Konstruiere ein neues Object aus einem Array.
+ *
+ * @param newdata Das Array, das zum initialisieren verwendet werden soll.
+ */
+ ByteBlock(byte newdata[8]) noexcept:ByteRow<8>(newdata) {};
+
+ /**
+ * \~english
+ * @brief Construct a new Byte Block object from a list of values.
+ * This way {0,0,0,0,0,0,0,0} can be used as copy-assignement.
+ *
+ * \~german
+ * @brief Erstelle ein neues Objekt aus einer Liste von Werten.
+ * So kann {0,0,0,0,0,0,0,0} als Kopierzuweisung verwendet werden.
+ */
+ ByteBlock(byte n0,byte n1,byte n2,byte n3,byte n4,byte n5,byte n6,byte n7) noexcept:ByteBlock() {
+ _data[0] = n0;
+ _data[1] = n1;
+ _data[2] = n2;
+ _data[3] = n3;
+ _data[4] = n4;
+ _data[5] = n5;
+ _data[6] = n6;
+ _data[7] = n7;
+ };
+
+ /**
+ * \~english
+ * @brief Construct a new Byte Block object with 0s.
+ *
+ * \~german
+ * @brief Konstruiere ein neuess Objekt mit 0en.
+ */
+ ByteBlock() noexcept:ByteRow<8>() {};
+
+ /**
+ * \~english
+ * @brief Construct a new Byte Block object from a byteRow.
+ * @note This constructor mainly exists for automatic casting.
+ * @param data the data that should be assigned
+ *
+ * \~german
+ * @brief Konstruiere ein neuess Objekt aus einer ByteRow.
+ * @note Dieser Konstruktor existiert hauptsächlich für Typumwandlungen.
+ * @param data Die daten, die zugewiesen werden sollen
+ */
+ ByteBlock(const ByteRow<8>& data) noexcept:ByteRow<8>(data) {};
+
+ /**
+ * \~english
+ * @brief Turns an ByteBlock of rows into an ByteBlock of columns
+ *
+ * @return ByteBlock The Columns of the given ByteBlock
+ *
+ * \~german
+ * @brief Wandelt einen Block aus Zeilen in einen Block aus Spalten.
+ *
+ * @return ByteBlock Die Splaten des gegebenen Blocks
+ */
+ ByteBlock transpose() const noexcept {
+ return ByteBlock::makeColumns(*this);
+ }
+
+ /**
+ * \~english
+ * @brief Turns an ByteBlock of rows into an ByteBlock of columns
+ *
+ * @return ByteBlock The Columns of the given ByteBlock
+ *
+ * \~german
+ * @brief Wandelt einen Block aus Zeilen in einen Block aus Spalten.
+ *
+ * @return ByteBlock Die Splaten des gegebenen Blocks
+ */
+ ByteBlock makeColumns() const noexcept {
+ return this->transpose();
+ }
+
+ /**
+ * \~english
+ * @brief Reverse an ByteBlock of 8 bytes (mirror it)
+ *
+ * @return ByteBlock The reversed ByteBlock
+ *
+ * \~german
+ * @brief Diese Funktion kehrt die Reihnfolge der einzelnen Zeilen um (spiegeln in x-Richtung).
+ *
+ * @return ByteBlock Der umgekehrte ByteBlock.
+ */
+ ByteBlock reverse() const noexcept {
+ return ByteBlock::reverse(*this);
+ }
+
+ /**
+ * \~english
+ * @brief rotate an ByteBlock by 180 degrees
+ *
+ * @return ByteBlock The rotated ByteBlock
+ *
+ * \~german
+ * @brief rotiert einen ByteBlock um 180 Grad
+ *
+ * @return ByteBlock Der rotierte byteBlock.
+ */
+ ByteBlock rotate180() const noexcept {
+ return ByteBlock::rotate180(*this);
+ }
+
+ /**
+ * \~english
+ * @brief This function changes to bitorder of a byte (useful to mirror
+ * "images" you want to display)
+ *
+ * @param input The byte that should be reversed
+ * @return byte The reversed byte
+ *
+ * \~german
+ * @brief Diese Funktion ändert die Bitreihnfolge eines Bytes bzw. kehrt ein Bit um.
+ *
+ * @param input Das byte, das umgekehrt werden soll.
+ * @return byte Das umgekehrte Byte
+ */
+ static byte reverse(byte input) noexcept {
+ byte ret = 0x00;
+ for (unsigned int i = 0; i < 8; i++) {
+ if (input & (0x01U << i)) {
+ ret |= 0x80U >> i;
+ }
+ }
+ return ret;
+ }
+
+ /**
+ * \~english
+ * @brief Reverse an ByteBlock of 8 bytes (mirror it)
+ *
+ * @param input The ByteBlock that should be mirrored
+ * @return ByteBlock The reversed ByteBlock
+ *
+ * \~german
+ * @brief Diese Funktion kehrt die Reihnfolge der einzelnen Zeilen um (spiegeln in x-Richtung).
+ *
+ * @param input Der ByteBlock der umgekehrt werden soll.
+ * @return ByteBlock Der umgekehrte ByteBlock.
+ */
+ static ByteBlock reverse(ByteBlock input) noexcept {
+ auto reversedInput = ByteBlock();
+
+ for (unsigned int i = 0; i < 8; i++) {
+ reversedInput[i] = reverse(input[i]);
+ }
+
+ return reversedInput;
+ }
+
+ /**
+ * \~english
+ * @brief rotate an ByteBlock by 180 degrees
+ *
+ * @param input the ByteBlock that will be rotated
+ * @return ByteBlock The rotated ByteBlock
+ *
+ * \~german
+ * @brief rotiert einen ByteBlock um 180 Grad
+ *
+ * @param input Der zu rotierende ByteBlock.
+ * @return ByteBlock Der rotierte byteBlock.
+ */
+ static ByteBlock rotate180(ByteBlock input) noexcept {
+ auto rotatedInput = ByteBlock();
+
+ for (unsigned int i = 0; i < 8; i++) {
+ rotatedInput[7 - i] = reverse(input[i]);
+ }
+
+ return rotatedInput;
+ }
+
+ /**
+ * \~english
+ * @brief Turns an ByteBlock of rows into an ByteBlock of columns
+ *
+ * @param rowArray the ByteBlock of rows of which you want the columns of
+ * @return ByteBlock The Columns of the given ByteBlock
+ *
+ * \~german
+ * @brief Wandelt einen Block aus Zeilen in einen Block aus Spalten.
+ *
+ * @param rowArray Der Block aus Zeilen
+ * @return ByteBlock Die Splaten des gegebenen Blocks
+ */
+ static ByteBlock makeColumns(ByteBlock rowArray) noexcept {
+ auto columnArray = ByteBlock();
+
+ for (unsigned int i = 0; i < 8; i++) {
+ for (unsigned int j = 0; j < 8; j++) {
+ columnArray[7-i] |= (0b10000000 & (rowArray[j]<> (j);
+ }
+ }
+
+ return reverse(columnArray);
+ }
+
+ /**
+ * \~english
+ * @brief Turns an ByteBlock of rows into an ByteBlock of columns
+ *
+ * @param rowArray the ByteBlock of rows of which you want the columns of
+ * @return ByteBlock The Columns of the given ByteBlock
+ *
+ * \~german
+ * @brief Wandelt einen Block aus Zeilen in einen Block aus Spalten.
+ *
+ * @param rowArray Der Block aus Zeilen
+ * @return ByteBlock Die Splaten des gegebenen Blocks
+ */
+ static ByteBlock transpose(ByteBlock rowArray) noexcept {
+ return ByteBlock::makeColumns(rowArray);
+ }
+
+ };
+
+}
diff --git a/src/LedController_byterow.hpp b/src/LedController_byterow.hpp
new file mode 100644
index 00000000..2e010a25
--- /dev/null
+++ b/src/LedController_byterow.hpp
@@ -0,0 +1,299 @@
+#pragma once
+
+#if (ARDUINO >= 100)
+#include
+#else
+#if __has_include("ArduinoFake.h")
+#include "ArduinoFake.h"
+#else
+#include
+#endif
+#endif
+
+namespace sakurajin {
+
+ /**
+ * \~english
+ * @brief This class is used to handle a row of bytes with a given length.
+ *
+ * @tparam SIZE The length of the row.
+ *
+ * \~german
+ * @brief Diese Klasse wird genutzt, um eine Reihe aus bytes mit bekannter Länge zu handhaben.
+ *
+ * @tparam SIZE Die Länge der Reihe.
+ */
+ template
+ class ByteRow {
+ protected:
+ /**
+ * \~english
+ * @brief The internal array where the actual data is.
+ *
+ * \~german
+ * @brief Das interne Array, was die Daten speichert.
+ */
+ byte _data[SIZE];
+
+ public:
+
+ /**
+ * \~english
+ * @brief Construct a new Byte Row object from an array.
+ *
+ * @param newdata The array which should be used to initilize the row.
+ *
+ * \~german
+ * @brief Konstruiere ein neues Object aus einem Array.
+ *
+ * @param newdata Das Array, das zum initialisieren verwendet werden soll.
+ */
+ ByteRow(byte newdata[SIZE]) noexcept:ByteRow() {
+ for(uint64_t i = 0; i < SIZE; i++) {
+ _data[i] = newdata[i];
+ }
+ };
+
+ /**
+ * \~english
+ * @brief Construct a new Byte Row object with 0s.
+ *
+ * \~german
+ * @brief Konstruiere ein neuess Objekt mit 0en.
+ */
+ ByteRow() noexcept {
+ for(uint64_t i = 0; i < SIZE; i++) {
+ _data[i] = 0;
+ }
+ };
+
+ /**
+ * \~english
+ * @brief Destroy the Byte Row object.
+ *
+ * \~german
+ * @brief Lösche das Objekt.
+ */
+ ~ByteRow() noexcept {};
+
+ /**
+ * \~english
+ * @brief Access the class just like the underlying array.
+ *
+ * @param index the index that is requested.
+ * @return byte& the data at the requested index.
+ *
+ * \~german
+ * @brief Greife auf das Objekt zu, wie auf das unterliegende Array.
+ *
+ * @param index Der Angefragte Index.
+ * @return byte& Die Daten am angefragtem Index.
+ */
+ byte& operator[] (uint64_t index) noexcept {
+ index %= SIZE;
+ return _data[index];
+ }
+
+ /**
+ * \~english
+ * @brief Access the class just like the underlying array.
+ *
+ * @param index the index that is requested.
+ * @return const byte& the data at the requested index.
+ *
+ * \~german
+ * @brief Greife auf das Objekt zu, wie auf das unterliegende Array.
+ *
+ * @param index Der Angefragte Index.
+ * @return byte& Die Daten am angefragtem Index.
+ */
+ const byte& operator[] (uint64_t index) const noexcept {
+ index %= SIZE;
+ return _data[index];
+ }
+
+ /**
+ * \~english
+ * @brief Access the class just like the underlying array.
+ *
+ * @param index he index that is requested.
+ * @return byte the data at the requested index.
+ *
+ * \~german
+ * @brief Greife auf das Objekt zu, wie auf das unterliegende Array.
+ *
+ * @param index Der Angefragte Index.
+ * @return byte& Die Daten am angefragtem Index.
+ */
+ byte at(uint64_t index) const noexcept {
+ index %= SIZE;
+ return _data[index];
+ }
+
+ /**
+ * \~english
+ * @brief Assign an array to this object.
+ *
+ * @param newdata The data that will be assigned to this obejct
+ * @return ByteRow& The modified object
+ *
+ * \~german
+ * @brief Weise diesem Objekt ein array zu.
+ *
+ * @param newdata Die Array, das zugewiesen wird.
+ * @return ByteRow& Das modifizierte Objekt.
+ */
+ ByteRow& operator= (byte newdata[SIZE]) noexcept {
+ for(uint64_t i = 0; i < SIZE; i++) {
+ _data[i] = newdata[i];
+ }
+ return *this;
+ }
+
+ /**
+ * \~english
+ * @brief Overlaps two ByteRows (bitwise or).
+ * This operator can be used to display two ByteRows in one ByteRow.
+ * @param other The ByteRow that should be overlapped with this object
+ * @return ByteRow The resulting ByteRow
+ *
+ * \~german
+ * @brief Überlappt zwei ByteRow Objeckte (bitweises oder)
+ * Dieser operator kann genutzt werden, um zwei ByteRow Objekte in einem Anzuzeigen.
+ * @param other Die ByteRows, welche mit diesem Objekt überladen werden soll
+ * @return ByteRow Die resultierende ByteRow
+ */
+ virtual ByteRow operator&(const ByteRow& other) const noexcept {
+ ByteRow block = ByteRow();
+ for(unsigned int i = 0; i < SIZE; i++) {
+ block[i] = (this->at(i)) | (other.at(i));
+ }
+ return block;
+ }
+
+ /**
+ * \~english
+ * @brief Moves all data of the ByteRow to the left by a given distance.
+ * @note each index is handled on its own and no data is shifted across
+ * @param distance the distance the data should be moved
+ * @return ByteRow the resulting ByteRow
+ *
+ * \~german
+ * @brief Schiebt die Daten um eine gegebene Distanz nach links.
+ * @note Jeder Wert wird einzeln geschoben und nicht alles als eine Reihe.
+ * @param distance Die Distanz die geschoben werden soll
+ * @return ByteRow Die resultierende ByteRow
+ */
+ virtual ByteRow operator<<(unsigned int distance) const noexcept {
+ ByteRow block = ByteRow();
+ for(unsigned int i = 0; i < SIZE; i++) {
+ block[i] = (this->at(i))>>distance;
+ }
+ return block;
+ }
+
+ /**
+ * \~english
+ * @brief Moves all data of the ByteRow to the right by a given distance.
+ * @note each index is handled on its own and no data is shifted across
+ * @param distance the distance the data should be moved
+ * @return ByteRow the resulting ByteRow
+ *
+ * \~german
+ * @brief Schiebt die Daten um eine gegebene Distanz nach rechts.
+ * @note Jeder Wert wird einzeln geschoben und nicht alles als eine Reihe.
+ * @param distance Die Distanz die geschoben werden soll
+ * @return ByteRow Die resultierende ByteRow
+ */
+ virtual ByteRow operator>>(unsigned int distance) const noexcept {
+ ByteRow block = ByteRow();
+ for(unsigned int i = 0; i < SIZE; i++) {
+ block[i] = (this->at(i))< block = ByteRow();
+ for(unsigned int i = 0; i < SIZE-1; i++) {
+ block[i] = (this->at(i+1));
+ }
+ return block;
+ }
+
+ /**
+ * \~english
+ * @brief Moves all data of the ByteRow to the up by one.
+ * @return ByteRow the resulting ByteRow
+ *
+ * \~german
+ * @brief Schiebt die Daten um 1 Distanz nach oben.
+ * @return ByteRow Die resultierende ByteRow
+ */
+ virtual ByteRow operator++() const noexcept {
+ ByteRow block = ByteRow();
+ for(unsigned int i = 1; i < SIZE; i++) {
+ block[i] = (this->at(i-1));
+ }
+ return block;
+ }
+
+ /**
+ * \~english
+ * @brief checks if two byteRows have identical data
+ *
+ * @param other the other byteRow
+ * @return true the data is equal
+ * @return false the data is not equal
+ *
+ * \~german
+ * @brief prüft ob zwei ByteRow objekte identische Daten haben
+ *
+ * @param other das andere byteRow Objekt
+ * @return true die Daten sind identisch
+ * @return false die Daten sind nicht identisch
+ */
+ virtual bool operator==(const ByteRow& other) const noexcept {
+ for (size_t i = 0; i < SIZE; i++) {
+ if(this->at(i) != other.at(i)) {
+ return false;
+ };
+ }
+ return true;
+ }
+
+ /**
+ * @brief checks if two byteRows do not have identical data
+ *
+ * @param other the other byteRow
+ * @return true the data is not equal
+ * @return false the data is equal
+ *
+ * \~german
+ * @brief prüft ob zwei ByteRow objekte nicht identische Daten haben
+ *
+ * @param other das andere byteRow Objekt
+ * @return true die Daten sind nicht identisch
+ * @return false die Daten sind identisch
+ */
+ virtual bool operator!=(const ByteRow& other) const noexcept {
+ for (size_t i = 0; i < SIZE; i++) {
+ if(this->at(i) == other.at(i)) {
+ return false;
+ };
+ }
+ return true;
+ }
+
+ };
+
+}
diff --git a/src/LedController_charTable.hpp b/src/LedController_charTable.hpp
new file mode 100644
index 00000000..b587c49a
--- /dev/null
+++ b/src/LedController_charTable.hpp
@@ -0,0 +1,173 @@
+#pragma once
+#include "LedController_byterow.hpp"
+namespace sakurajin {
+
+ class charTable:public ByteRow<128> {
+ public:
+ charTable(byte newdata[128]) noexcept:ByteRow<128>(newdata) {};
+
+ charTable(
+ byte n0, byte n1, byte n2, byte n3, byte n4, byte n5, byte n6, byte n7, byte n8, byte n9,
+ byte n10, byte n11, byte n12, byte n13, byte n14, byte n15, byte n16, byte n17, byte n18, byte n19,
+ byte n20, byte n21, byte n22, byte n23, byte n24, byte n25, byte n26, byte n27, byte n28, byte n29,
+ byte n30, byte n31, byte n32, byte n33, byte n34, byte n35, byte n36, byte n37, byte n38, byte n39,
+ byte n40, byte n41, byte n42, byte n43, byte n44, byte n45, byte n46, byte n47, byte n48, byte n49,
+ byte n50, byte n51, byte n52, byte n53, byte n54, byte n55, byte n56, byte n57, byte n58, byte n59,
+ byte n60, byte n61, byte n62, byte n63, byte n64, byte n65, byte n66, byte n67, byte n68, byte n69,
+ byte n70, byte n71, byte n72, byte n73, byte n74, byte n75, byte n76, byte n77, byte n78, byte n79,
+ byte n80, byte n81, byte n82, byte n83, byte n84, byte n85, byte n86, byte n87, byte n88, byte n89,
+ byte n90, byte n91, byte n92, byte n93, byte n94, byte n95, byte n96, byte n97, byte n98, byte n99,
+ byte n100, byte n101, byte n102, byte n103, byte n104, byte n105, byte n106, byte n107, byte n108, byte n109,
+ byte n110, byte n111, byte n112, byte n113, byte n114, byte n115, byte n116, byte n117, byte n118, byte n119,
+ byte n120, byte n121, byte n122, byte n123, byte n124, byte n125, byte n126, byte n127
+ ) noexcept {
+ _data[0] = n0;
+ _data[1] = n1;
+ _data[2] = n2;
+ _data[3] = n3;
+ _data[4] = n4;
+ _data[5] = n5;
+ _data[6] = n6;
+ _data[7] = n7;
+ _data[8] = n8;
+ _data[9] = n9;
+
+ _data[10] = n10;
+ _data[11] = n11;
+ _data[12] = n12;
+ _data[13] = n13;
+ _data[14] = n14;
+ _data[15] = n15;
+ _data[16] = n16;
+ _data[17] = n17;
+ _data[18] = n18;
+ _data[19] = n19;
+
+ _data[20] = n20;
+ _data[21] = n21;
+ _data[22] = n22;
+ _data[23] = n23;
+ _data[24] = n24;
+ _data[25] = n25;
+ _data[26] = n26;
+ _data[27] = n27;
+ _data[28] = n28;
+ _data[29] = n29;
+
+ _data[30] = n30;
+ _data[31] = n31;
+ _data[32] = n32;
+ _data[33] = n33;
+ _data[34] = n34;
+ _data[35] = n35;
+ _data[36] = n36;
+ _data[37] = n37;
+ _data[38] = n38;
+ _data[39] = n39;
+
+ _data[40] = n40;
+ _data[41] = n41;
+ _data[42] = n42;
+ _data[43] = n43;
+ _data[44] = n44;
+ _data[45] = n45;
+ _data[46] = n46;
+ _data[47] = n47;
+ _data[48] = n48;
+ _data[49] = n49;
+
+ _data[50] = n50;
+ _data[51] = n51;
+ _data[52] = n52;
+ _data[53] = n53;
+ _data[54] = n54;
+ _data[55] = n55;
+ _data[56] = n56;
+ _data[57] = n57;
+ _data[58] = n58;
+ _data[59] = n59;
+
+ _data[60] = n60;
+ _data[61] = n61;
+ _data[62] = n62;
+ _data[63] = n63;
+ _data[64] = n64;
+ _data[65] = n65;
+ _data[66] = n66;
+ _data[67] = n67;
+ _data[68] = n68;
+ _data[69] = n69;
+
+ _data[70] = n70;
+ _data[71] = n71;
+ _data[72] = n72;
+ _data[73] = n73;
+ _data[74] = n74;
+ _data[75] = n75;
+ _data[76] = n76;
+ _data[77] = n77;
+ _data[78] = n78;
+ _data[79] = n79;
+
+ _data[80] = n80;
+ _data[81] = n81;
+ _data[82] = n82;
+ _data[83] = n83;
+ _data[84] = n84;
+ _data[85] = n85;
+ _data[86] = n86;
+ _data[87] = n87;
+ _data[88] = n88;
+ _data[89] = n89;
+
+ _data[90] = n90;
+ _data[91] = n91;
+ _data[92] = n92;
+ _data[93] = n93;
+ _data[94] = n94;
+ _data[95] = n95;
+ _data[96] = n96;
+ _data[97] = n97;
+ _data[98] = n98;
+ _data[99] = n99;
+
+ _data[100] = n100;
+ _data[101] = n101;
+ _data[102] = n102;
+ _data[103] = n103;
+ _data[104] = n104;
+ _data[105] = n105;
+ _data[106] = n106;
+ _data[107] = n107;
+ _data[108] = n108;
+ _data[109] = n109;
+
+ _data[110] = n110;
+ _data[111] = n111;
+ _data[112] = n112;
+ _data[113] = n113;
+ _data[114] = n114;
+ _data[115] = n115;
+ _data[116] = n116;
+ _data[117] = n117;
+ _data[118] = n118;
+ _data[119] = n119;
+
+ _data[120] = n120;
+ _data[121] = n121;
+ _data[122] = n122;
+ _data[123] = n123;
+ _data[124] = n124;
+ _data[125] = n125;
+ _data[126] = n126;
+ _data[127] = n127;
+ };
+
+ virtual byte getChar(char c) const noexcept {
+ byte index = ((byte)c)%128;
+ return this->at(index);
+ }
+ };
+
+
+}
\ No newline at end of file
diff --git a/src/LedController_config.hpp b/src/LedController_config.hpp
new file mode 100644
index 00000000..c4fb8325
--- /dev/null
+++ b/src/LedController_config.hpp
@@ -0,0 +1,373 @@
+#pragma once
+
+///This check allows the user to define their own PRINTLN method.
+///By doing that more boards and platforms can be supported even
+///if they are not supported by the Arduino IDE.
+#ifndef PRINTLN
+#if (ARDUINO >= 100)
+#include
+#define PRINTLN(x) Serial.println(x)
+#endif
+#endif
+
+#define PRINTLN_IF(condition,x) if(condition){PRINTLN(x);}
+
+#include
+
+#ifdef SPI_MOSI
+ #define LEDCONTROLLER_MOSI = SPI_MOSI
+#else
+ #ifdef MOSI
+ #define LEDCONTROLLER_MOSI = MOSI
+ #else
+ #define LEDCONTROLLER_NO_HW_SPI
+ #endif
+#endif
+
+#ifdef SPI_SCK
+ #define LEDCONTROLLER_CLK = SPI_SCK
+#else
+ #ifdef MOSI
+ #define LEDCONTROLLER_CLK = SCK
+ #else
+ #define LEDCONTROLLER_NO_HW_SPI
+ #endif
+#endif
+
+namespace sakurajin {
+
+ /**
+ * \~english
+ * @brief This class is used to handle the configuration of the sakurajin::LedController
+ *
+ * @tparam columns The number of columns this configuration has.
+ * @tparam rows The number of rows this configuration has.
+ *
+ * \~german
+ * @brief Diese Klasse wird zur Konfiguration des sakurajin::LedController verwendet.
+ *
+ * @tparam columns Die Anzahl der Spalten, die diese Konfiguration hat.
+ * @tparam rows Die Anzahl der Zeilen, die diese Konfiguration hat.
+ */
+ template
+ class controller_configuration {
+ public:
+
+ /**
+ * \~english
+ * @brief The pin for the data transfer signal (MOSI on board and DIN on Matrix).
+ * @warning if this is 0 and useHardwareSpi is false the initilization will fail
+ *
+ * \~german
+ * @brief Der pin für das data transfer Signal (MOSI am Board und DIN an der Matrix).
+ * @warning Wenn das 0 ist und useHardwareSpi false ist, ist die Konfiguration ungültig.
+ */
+ unsigned int mosi_pin = 0;
+
+ /**
+ * \~english
+ * @brief The pin for the chip select signal (CS).
+ * @warning this has to be set if it is 0 the initlization will fail.
+ *
+ * \~german
+ * @brief Der pin für das chip select Signal (CS).
+ * @warning Wenn das 0 ist und useHardwareSpi false ist, ist die Konfiguration ungültig.
+ */
+ unsigned int cs_pin = 0;
+
+ /**
+ * \~english
+ * @brief The pin for the clock signal (CLK).
+ * @warning if this is 0 and useHardwareSpi is false the initilization will fail
+ *
+ * \~german
+ * @brief Der pin für das clock Signal (CLK).
+ * @warning Wenn das 0 ist und useHardwareSpi false ist, ist die Konfiguration ungültig.
+ */
+ unsigned int clk_pin = 0;
+
+ /**
+ * \~english
+ * @brief true if you want to use hardware SPI (view https://www.arduino.cc/en/Reference/SPI for pin config). While this is a
+ * lot faster you cannot use every pin for the MOSI and CLK signal. mosi_pin
+ * and clk_pin will be set automatically if this is true.
+ *
+ * \~german
+ * @brief true falls hardware SPI genutzt werden soll (schaue https://www.arduino.cc/en/Reference/SPI für die Pin Konfiguration).
+ * Diese Einstellung ist zwar sehr viel schneller, dafür kann nicht jeder PIN für MOSI und CLK verwendet werden.
+ * mosi_pin und clk_pin werden automatisch gesetzt wenn diese Variable true ist
+ */
+ bool useHardwareSpi = false;
+
+ /**
+ * \~english
+ * @brief The current brightness level of the leds.
+ * @note The value needs to be between 0 and 15 (inclusive bounds).
+ *
+ * \~german
+ * @brief Die aktuelle Helligkeit der LEDs.
+ * @note Der Wert muss zwischen 0 und 15 sein (inklusive Grenzen).
+ */
+ unsigned int IntensityLevel = 1;
+
+ /**
+ * \~english
+ * @brief This Arrays specifies which Pin to use for each row. @ref multi_row
+ * @warning Each index should have a unique number or you will encounter strange behaviour.
+ *
+ *
+ * \~german
+ * @brief Dieses Array bestimmt welcher CS Pin für welche Reihe verwendet wird. @ref multi_row
+ * @warning Jeder Eintrag sollte eine einzigartige Nummer haben, wenn nicht kann es zu Problemen führen.
+ */
+ unsigned int row_cs_pin[rows];
+
+ /**
+ * \~english
+ * @brief Only send data if something changed if true.
+ * If this is true, new data will only be sent if the data given differes from the data internally stored.
+ *
+ * \~german
+ * @brief Nur Daten übertragen wenn sich etwas geändert hat.
+ * Wenn dies auf true gesetzt ist, werden Daten nur übertragen, wenn diese von den gespeicherten abweichen.
+ */
+ bool onlySendOnChange = true;
+
+ /**
+ * \~english
+ * @brief The speed which with the hardware spi should transfer the data to the matrix.
+ *
+ * \~german
+ * @brief Die Geschwindigkeit mit der hardware SPI die Daten übertragen soll.
+ */
+ uint64_t spiTransferSpeed = 8000000;
+
+ /**
+ * \~english
+ * @brief if this is set to true, debug output will be printed.
+ *
+ * \~german
+ * @brief Wenn das true ist, werden debug informationen ausgegeben.
+ */
+ bool debug_output = false;
+
+ /**
+ * \~english
+ * @brief set to false if each of your rows has a dedicated CS pin.
+ * By default this is true and it is assumed that all Segments are connected in series.
+ *
+ * \~german
+ * @brief Setze das auf false wenn jede Zeile einen eigenen CS Pin besitzt.
+ * Standardmäßig ist es auf true gesetzt und es wird davon ausgegangen, dass alle Segemnte in Reihe geschaltet sind.
+ */
+ bool virtual_multi_row = true;
+
+ /**
+ * \~english
+ * @brief returns the total number of segments (rows*columns)
+ *
+ * @return unsigned int the number of segments
+ *
+ * \~german
+ * @brief Gibt die Anzahl der Segmente zurück (Zeilen*Spalten).
+ *
+ * @return unsigned int Die Anzahl der Segmente.
+ */
+ unsigned int SegmentCount() const noexcept {
+ return rows*columns;
+ }
+
+ /**
+ * \~english
+ * @brief check of this configuration is valid
+ *
+ * @return true the configuration is valid
+ * @return false the configuration is not valid
+ *
+ *
+ * \~german
+ * @brief Prüft ob diese Konfiguration gültig ist.
+ *
+ * @return true Die Konfiguration ist gültig.
+ * @return false Die Konfiguration ist ungültig.
+ */
+ bool isValid() const noexcept {
+ return isValidConfig(*this);
+ }
+
+ /**
+ * \~english
+ * @brief This function returns the row a given segment is in.
+ *
+ * @param segmentNumber The index of the segment which you want the row of.
+ * @return unsigned int The row the given segment is in.
+ *
+ * \~german
+ * @brief Diese Funktion berechnet die Zeile aus der Segmentnummer.
+ *
+ * @param segmentNumber Die Segmentnummer des gesuchten Segments.
+ * @return unsigned int Die Zeile in der das Segment ist.
+ */
+ unsigned int getRow(unsigned int segmentNumber) const noexcept {
+ unsigned int row = 0;
+ if (rows != 0 && columns != 0) {
+ row = segmentNumber / columns;
+ }
+
+ if(row >= rows) {
+ row = 0;
+ }
+
+ return row;
+ }
+
+ /**
+ * \~english
+ * @brief This function returns the column a given segment is in.
+ *
+ * @param segmentNumber The index of the segment which you want the column of.
+ * @return unsigned int The column the given segment is in.
+ *
+ * \~german
+ * @brief Diese Funktion berechnet die Spalte aus der Segmentnummer.
+ *
+ * @param segmentNumber Die Segmentnummer des gesuchten Segments.
+ * @return unsigned int Die Spalte in der das Segment ist.
+ */
+ unsigned int getColumn(unsigned int segmentNumber) const noexcept {
+ unsigned int col = 0;
+ if (rows != 0 && columns != 0) {
+ col = segmentNumber % columns;
+ }
+
+ return col;
+ }
+
+ /**
+ * \~english
+ * @brief Get the length each row has.
+ *
+ * @return unsigned int the length of each row
+ *
+ * \~german
+ * @brief Gibt die Länge einer Zeile zurück.
+ *
+ * @return unsigned int Die Länge einer Zeile
+ */
+ unsigned int getRowLen() const noexcept {
+ return columns;
+ }
+
+ /**
+ * \~english
+ * @brief Calculate the segment Number/index from its coordinates.
+ *
+ * @param column The column the segment is in
+ * @param row The row the segment is in
+ * @return unsigned int the segment number of that segment
+ *
+ * \~german
+ * @brief Berechne die Segmentnummer/-index aus den Coordinaten.
+ *
+ * @param column Die Spalte in der das Segment ist
+ * @param row Die Zeile in der das Segment ist
+ * @return unsigned int Die Segmentnummer des segments
+ */
+ unsigned int getSegmentNumber(unsigned int column, unsigned int row) const noexcept {
+ row %= rows;
+ column %= columns;
+ return row * columns + column;
+ }
+
+ /**
+ * \~english
+ * @brief This function returns a copy of this configuration
+ *
+ * @return controller_configuration a copy of the configuration
+ *
+ * \~german
+ * @brief Diese Funktion gibt eine Kopie dieser Konfiguration zurück.
+ *
+ * @return controller_configuration Eine Kopie der Konfiguration
+ */
+ controller_configuration copy() const noexcept {
+ controller_configuration conf;
+ conf.IntensityLevel = this->IntensityLevel;
+ conf.onlySendOnChange = this->onlySendOnChange;
+ for(unsigned int i = 0; i < this->rows; i++) {
+ conf.row_cs_pin[i] = this->row_cs_pin[i];
+ }
+ conf.clk_pin = this->clk_pin;
+ conf.cs_pin = this->cs_pin;
+ conf.mosi_pin = this->mosi_pin;
+ conf.useHardwareSpi = this->useHardwareSpi;
+ return conf;
+ }
+
+ /**
+ * \~english
+ * @brief check if a given configuragtion is valid
+ *
+ * @param conf the configuration that should be checked
+ * @return true the configuration is valid
+ * @return false the configuration is not valid
+ *
+ * \~german
+ * @brief Prüfe ob die gegebene Konfiguration gültig ist.
+ *
+ * @param conf Die Konfiguration die geprüft werden soll.
+ * @return true Die Konfiguration ist gültig.
+ * @return false Die Konfiguration ist ungültig.
+ */
+ static bool isValidConfig(const controller_configuration &conf) noexcept {
+ //check if the dimenstions are valid
+ if (rows == 0 || columns == 0) {
+ return false;
+ }
+
+ #ifdef LEDCONTROLLER_NO_HW_SPI
+ if(conf.useHardwareSpi){
+ PRINTLN_IF(conf.debug_output, "hardwareSPI is not available but used. Check your config or set useHardwareSpi to false");
+ return false;
+ }
+ #endif
+
+ // checking the clk amd mosi pins
+ if (!conf.useHardwareSpi) {
+ if (conf.clk_pin == 0) {
+ PRINTLN_IF(conf.debug_output, "No CLK Pin given. Specify one or set useHardwareSpi to true");
+ return false;
+ }
+
+ if (conf.mosi_pin == 0) {
+ PRINTLN_IF(conf.debug_output, "No MOSI Pin given. Specify one or set useHardwareSpi to true");
+ return false;
+ }
+ }
+
+ // checking the cs pin(s)
+ if (conf.cs_pin == 0 && conf.row_cs_pin == nullptr) {
+ PRINTLN_IF(conf.debug_output, "No CS Pin given");
+ return false;
+ }
+
+ if (!conf.virtual_multi_row || conf.cs_pin == 0) {
+ for(unsigned int i = 0; i < rows; i++) {
+ if(conf.row_cs_pin[i] == 0) {
+ PRINTLN_IF(conf.debug_output, "Invalid value in row_cs_pin found. 0 is not allowed.");
+ return false;
+ }
+ for(unsigned int j = 0; j < i; j++) {
+ if(conf.row_cs_pin[i] == conf.row_cs_pin[j]) {
+ PRINTLN_IF(conf.debug_output, "None unique value in row_cs_pin found! Each row needs its own pin or consider enabling virtual_multi_row.");
+ return false;
+ }
+ }
+ }
+ }
+
+
+ return true;
+ }
+ };
+}
diff --git a/src/LedController_template.hpp b/src/LedController_template.hpp
new file mode 100644
index 00000000..e8dd9f32
--- /dev/null
+++ b/src/LedController_template.hpp
@@ -0,0 +1,1164 @@
+#pragma once
+
+#if (ARDUINO >= 100)
+#include
+#else
+#if __has_include("ArduinoFake.h")
+#include "ArduinoFake.h"
+#else
+#include
+#endif
+#endif
+
+#include
+#include
+#include
+
+namespace sakurajin {
+
+ /**
+ * \~
+ * @todo make it threading safe
+ *
+ * \~english
+ * @brief This class provied a control interface for MAX7219 and MAX7221 Led
+ * display drivers.
+ * @details This Controller Class is mainly target at led matracies consisting
+ * of more than 1 segment. While it can also handle 7-Segment Displays it is not
+ * tested that well.
+ * @warning This object is not thread safe yet.
+ *
+ * \~german
+ * @brief Diese Klasse bietet ein Interface zur Steuerung von MAX7219 uns MAX7221 LED
+ * Displaytreibern.
+ * @details Diese Steuerundsklasse fokusiert sich primär auf Led Matrizen bestehend
+ * aus mehr als einem Segment. Auch wenn sie 7-Segmentanzeigen steuern kann ist dies nicht getestet.
+ * @warning Diese Klasses ist nicht therding-sicher.
+ *
+ */
+ template
+ class LedController {
+ protected:
+
+ /**
+ * \~english
+ * @brief This array contains the state of all of the LEDs.
+ *
+ * \~german
+ * @brief Dieses Array beinhaltet den Status von allen LEDs.
+ *
+ */
+ sakurajin::ByteBlock LedStates[columns*rows];
+
+ /**
+ * \~english
+ * @brief The configuration of the LedController
+ *
+ * \~german
+ * @brief Die Konfiguration des LedController
+ *
+ */
+ sakurajin::controller_configuration conf;
+
+ /**
+ * \~english
+ * @brief This function transfers one command to the attached module
+ *
+ * @param segment The segment that should execute this command
+ * @param opcode The command that should be executed
+ * @param data The data needed for that command
+ *
+ * \~german
+ * @brief Diese Funktion überträgt einen Befehl an das angeschlosssene Modul
+ *
+ * @param segment Das Segment, das den Befehl ausführen soll.
+ * @param opcode Der Befehl, der ausgeführt werden soll.
+ * @param data Die Daten, die für den Befehl benötigt werden.
+ */
+ void spiTransfer(unsigned int segment, byte opcode, byte data) noexcept;
+
+ /**
+ * \~english
+ * @brief The array for shifting the data to the devices
+ *
+ * \~german
+ * @brief Das Array was benötigt wird, um Daten auf das Gerät zu übertragen.
+ *
+ */
+ byte spidata[rows*columns*2];
+
+ /**
+ * \~english
+ * @brief Set the brightness of the segment.
+ *
+ * @param segmentNumber the address of the segment to control
+ * @param newIntesityLevel the brightness of the display. (0..15)
+ *
+ * \~german
+ * @brief Setzte die Helligkeit eines Segments
+ *
+ * @param segmentNumber Die Nummer, des Segemnts.
+ * @param newIntesityLevel Die gewünschte Helligkeit inklusive der Grenzen von 0 & 15. (0..15)
+ */
+ void setIntensity(unsigned int segmentNumber, unsigned int newIntesityLevel) noexcept;
+
+ /**
+ * \~english
+ * @brief True if the LedController is fully initilized
+ *
+ * \~german
+ * @brief True wenn, der LedController vollständig initialisiert ist.
+ *
+ */
+ bool initilized = false;
+
+ /**
+ * \~english
+ * @brief initilize the internal buffers of the LedController.
+ *
+ * \~german
+ * @brief Initialisiere die internen Puffer des LedController.
+ */
+ void resetBuffers() noexcept;
+
+ /**
+ * \~english
+ * @brief initilize the spi outputs
+ *
+ * \~german
+ * @brief Initialisiere die SPI Ausgabe.
+ */
+ void initSPI() noexcept;
+
+ /**
+ * \~english
+ * @brief initilize the configuration
+ *
+ * \~german
+ * @brief Initialisiere die Konfiguration
+ */
+ void initConf() noexcept;
+
+ public:
+ /**
+ * \~english
+ * @brief Construct a new LedController without initilizing anything.
+ *
+ * \~german
+ * @brief Erstelle einen neuen LedController ohne etwas zu initialisieren.
+ */
+ LedController() noexcept;
+
+ /**
+ * \~english
+ * @brief Construct a new LedController for use with hardware SPI
+ * @note Only virtualMultiRow is possible with this Constructor.
+ * A custom configuration is needed to have different CS Pins for each row.
+ *
+ * @param csPin The pin to select the led matrix
+ *
+ * \~german
+ * @brief Erstelle einen neuen LedController für die Nutzung mit hardwareSPI
+ * @note Nur virtualMultiRow ist mit diesem Konstruktor möglich.
+ * Eine angepasste Konfiguration ist notwendig, um untersciedliche CS Pins für jede Zeile zu haben.
+ *
+ * @param csPin Der CS Pin über den die Matrix gesteuert wird.
+ */
+ LedController(unsigned int csPin) noexcept;
+
+ /**
+ * \~english
+ * @brief Construct a new LedController object
+ * @note Only virtualMultiRow is possible with this Constructor.
+ * A custom configuration is needed to have different CS Pins for each row.
+ *
+ * @param dataPin pin on the Arduino where data gets shifted out (DIN)
+ * @param clkPin pin for the clock (CLK)
+ * @param csPin pin for selecting the device (CS)
+ * @param useHardwareSpi true if you want to use hardware SPI (view
+ * https://www.arduino.cc/en/Reference/SPI for pin config)
+ *
+ * \~german
+ * @brief Konstruiere ein neues LedController Objekt mit gegeben Pins.
+ * @note Nur virtualMultiRow ist mit diesem Konstruktor möglich.
+ * Eine angepasste Konfiguration ist notwendig, um untersciedliche CS Pins für jede Zeile zu haben.
+ *
+ * @param dataPin Der Pin an dem die Daten ausgegeben werden (DIN)
+ * @param clkPin Der Pin für das Taktsignal (CLK)
+ * @param csPin Der Pin zum auswählen der Matrix (CS)
+ * @param useHardwareSpi true wenn hardware SPI genutzt werden soll (schaue
+ * https://www.arduino.cc/en/Reference/SPI für die Pin Konfiguration)
+ */
+ LedController(unsigned int dataPin, unsigned int clkPin, unsigned int csPin,
+ bool useHardwareSpi = false) noexcept;
+
+ /**
+ * \~english
+ * @brief Construct a new Led Controller from a given configuration
+ *
+ * @param configuration the configuration that should be used for the
+ * Controller
+ *
+ * \~german
+ * @brief Erstelle ein neues LedController Objekt aus einer Konfiguration.
+ *
+ * @param configuration die Konfiguration die zum erstellen verwendet werden soll.
+ */
+ LedController(const sakurajin::controller_configuration &configuration) noexcept;
+
+ /**
+ * \~english
+ * @brief Destroy the Led Controller object and free the memory
+ *
+ * \~german
+ * @brief Zerstöre das Objekt und leere den Speicher.
+ */
+ ~LedController() noexcept;
+
+ /**
+ * \~english
+ * @brief The copy constructor for the LedController
+ *
+ * @param other the LedController which should have its state copied
+ *
+ * \~german
+ * @brief Der Kopierkonstruktor für den LedController.
+ *
+ * @param other der LedController, der kopiert werden soll.
+ */
+ LedController(const LedController &other) noexcept;
+
+ /**
+ * \~english
+ * @brief initilizes the LedController for use with hardware SPI
+ * @note Only virtualMultiRow is possible with this initilization.
+ * A custom configuration is needed to have different CS Pins for each row.
+ *
+ * @param csPin The pin to select the led matrix
+ *
+ * \~german
+ * @brief Initialisiere den LedController für Nutzung mit hardware SPI
+ * @note Nur virtualMultiRow ist mit diesem Initialisieren möglich.
+ * Eine angepasste Konfiguration ist notwendig, um untersciedliche CS Pins für jede Zeile zu haben.
+ *
+ * @param csPin Der Pin um die LedMatrix auszuwählen.
+ */
+ void init(unsigned int csPin) noexcept;
+
+ /**
+ * \~english
+ * @brief initilizes the LedController
+ * @note Only virtualMultiRow is possible with this initilization.
+ * A custom configuration is needed to have different CS Pins for each row.
+ *
+ * @param dataPin pin on the Arduino where data gets shifted out (DIN)
+ * @param clkPin pin for the clock (CLK)
+ * @param csPin pin for selecting the device (CS)
+ * @param useHardwareSpi true if you want to use hardware SPI (view
+ * https://www.arduino.cc/en/Reference/SPI for pin config)
+ *
+ * \~german
+ * @brief Initialisiere einen LedController Objekt mit gegeben Pins.
+ * @note Nur virtualMultiRow ist mit diesem Initialisieren möglich.
+ * Eine angepasste Konfiguration ist notwendig, um untersciedliche CS Pins für jede Zeile zu haben.
+ *
+ * @param dataPin Der Pin an dem die Daten ausgegeben werden (DIN)
+ * @param clkPin Der Pin für das Taktsignal (CLK)
+ * @param csPin Der Pin zum auswählen der Matrix (CS)
+ * @param useHardwareSpi true wenn hardware SPI genutzt werden soll (schaue
+ * https://www.arduino.cc/en/Reference/SPI für die Pin Konfiguration)
+ */
+ void init(unsigned int dataPin, unsigned int clkPin, unsigned int csPin,
+ bool useHardwareSpi = false) noexcept;
+
+ /**
+ * \~english
+ * @brief initilizes the LedController with a given configuration
+ *
+ * @param configuration The configuration that should be used
+ *
+ * \~german
+ * @brief Initialisiere einen LedController mit einer gegebenen Konfiguration.
+ *
+ * @param configuration Die Konfiguration, die verwendet werden soll.
+ */
+ void init(const sakurajin::controller_configuration &configuration) noexcept;
+
+ /**
+ * \~english
+ * @brief returns the status of the LedController
+ *
+ * @return true the LedController is initilized
+ * @return false the LedController is not initilized
+ *
+ * \~german
+ * @brief gibt den Status des LedController zurück.
+ *
+ * @return true der LedController ist initialisiert
+ * @return false der LedController ist nicht initialisiert
+ */
+ bool isInitilized() noexcept;
+
+ /**
+ * \~english
+ * @brief Set the Intensity of the whole matrix to the given value.
+ * @note if you want to save more energy disable segments you don't need or
+ * lower the brightness.
+ * @param newIntesityLevel the new brightness of the matrix. (0..15)
+ *
+ * \~german
+ * @brief Setzt die Helligkeit der gesamten Matrix auf den gegebenen Wert.
+ * @note Falls du Energie sparen willst, schalte segmente aus,
+ * die nicht benötigt werden oder verringere die Helligkeit.
+ * @param newIntesityLevel the new brightness of the matrix. (0..15)
+ */
+ void setIntensity(unsigned int newIntesityLevel) noexcept;
+
+ /**
+ * \~english
+ * @brief Display 8 lines on the given segment
+ *
+ * @param segmentindex the Segment number of the desired segment
+ * @param data an array containing the data for all the pixels that should be
+ * displayed on that segment
+ *
+ * \~german
+ * @brief Zeige einen gegebenen sakurajin::ByteBlock auf einem Segemnt an (setzte alle 8 Zeilen).
+ *
+ * @param segmentindex Die Nummer des gewünschten Segments
+ * @param data Die Daten, die angezeigt werden sollen.
+ */
+ void displayOnSegment(unsigned int segmentindex, sakurajin::ByteBlock data) noexcept;
+
+ /**
+ * \~english
+ * @brief Display 8 lines on the given segment
+ *
+ * @param column the column where the wanted segment is
+ * @param row_num the row where the wanted segment is
+ * @param data an array containing the data for all the pixels that should be
+ * displayed on that segment
+ *
+ * \~german
+ * @brief Zeige einen gegebenen sakurajin::ByteBlock auf einem Segemnt an (setzte alle 8 Zeilen).
+ *
+ * @param column Die Spalte in der das Segment ist.
+ * @param row_num Die Zeile in der das Segment ist.
+ * @param data Die Daten, die angezeigt werden sollen.
+ */
+ void displayOnSegment(unsigned int column, unsigned int row_num, sakurajin::ByteBlock data) noexcept;
+
+ /**
+ * \~english
+ * @brief Get the Segment Data of a specific Segment
+ *
+ * @param column the column where the wanted segment is
+ * @param row_num the row where the wanted segment is
+ * @return sakurajin::ByteBlock the requested segment
+ *
+ * \~german
+ * @brief Hole den Zustand eines Segments.
+ *
+ * @param column Die Spalte in der das Segment ist.
+ * @param row_num Die Zeile in der das Segment ist.
+ * @return sakurajin::ByteBlock Die Daten, die in dem Segment angezeigt werden.
+ */
+ sakurajin::ByteBlock getSegmentData(unsigned int column, unsigned int row_num) noexcept;
+
+ /**
+ * \~english
+ * @brief Get the Segment Data of a specific Segment
+ *
+ * @param segmentindex the index of whose data you want to have
+ * @return sakurajin::ByteBlock the requested segment
+ *
+ * \~german
+ * @brief Hole den Zustand eines Segments.
+ *
+ * @param segmentindex Die Nummer des gewünschten Segments
+ * @return sakurajin::ByteBlock Die Daten, die in dem Segment angezeigt werden.
+ */
+ sakurajin::ByteBlock getSegmentData(unsigned int segmentindex) noexcept;
+
+ /**
+ * \~english
+ * @brief activates all segments, sets to same intensity and clears them
+ *
+ * \~german
+ * @brief aktiviere alle Segmente, setzte alle auf die gleiche Helligkeit und leere den Inhalt.
+ */
+ void resetMatrix() noexcept;
+
+ /**
+ * \~english
+ * @brief clears all segments, turning all LEDs off.
+ *
+ * \~german
+ * @brief leere alle Segmente (alle LEDs aus).
+ */
+ void clearMatrix() noexcept;
+
+ /**
+ * \~english
+ * @brief clears a given segment, turning all its LEDs off.
+ *
+ * @param segmentNumber The segment to control.
+ *
+ * \~german
+ * @brief leere ein Segment (alle LEDs aus).
+ *
+ * @param segmentNumber Die Nummer des gewünschten Segments.
+ */
+ void clearSegment(unsigned int segmentNumber) noexcept;
+
+ /**
+ * \~english
+ * @brief Get the number of configured segments
+ *
+ * @return unsigned int The number of configured segments
+ *
+ * \~german
+ * @brief Hole die geasmate Anzahl der konfigurierten Segmenten.
+ *
+ * @return unsigned int Die Anzahl aller konfigurierten Segemente.
+ */
+ unsigned int getSegmentCount() noexcept;
+
+ /**
+ * \~english
+ * @brief Set the segment in power-down mode.
+ *
+ * @param segmentNumber The segment to control
+ *
+ * \~german
+ * @brief Deaktiviere ein Segment.
+ *
+ * @param segmentNumber Die Nummer des gewünschten Segments.
+ */
+ void shutdownSegment(unsigned int segmentNumber) noexcept;
+
+ /**
+ * \~english
+ * @brief Get the segment out of power-down mode for normal operation.
+ *
+ * @param segmentNumber The segment to control
+ *
+ * \~german
+ * @brief Aktiviere ein Segment.
+ *
+ * @param segmentNumber Die Nummer des gewünschten Segments.
+ */
+ void activateSegment(unsigned int segmentNumber) noexcept;
+
+ /**
+ * \~english
+ * @brief Set all segments into power-down mode
+ *
+ * \~german
+ * @brief Deaktiviere alle Segmente.
+ */
+ void shutdownAllSegments() noexcept;
+
+ /**
+ * \~english
+ * @brief Get all segments out of power-down mode for normal operation.
+ *
+ * \~german
+ * @brief Aktiviere alle Segmente.
+ */
+ void activateAllSegments() noexcept;
+
+ /**
+ * \~english
+ * @brief Set the number of digits (or rows) to be displayed (default: 7).
+ * @warning See datasheet for sideeffects of the scanlimit on the brightness of
+ * the display.
+ * @param segmentNumber The segment which should be addressed
+ * @param limit The number of digits to be displayed (0..7)
+ *
+ * \~german
+ * @brief Setzte die Anzahl der Zeilen/Stellen, die auf einem Segment angezeigt werden.
+ * @warning Schau in das Datenblatt für Nebenwirkungen vom scanlimit auf die Helligkeit.
+ * @param segmentNumber Die nummer des gewünschten Segments.
+ * @param limit Die Anzahl der Zeilen/Stellen die angezwigt werden sollen (0..7)
+ */
+ void setScanLimit(unsigned int segmentNumber, unsigned int limit) noexcept;
+
+ /**
+ * \~english
+ * @brief Set one Row of one segment.
+ *
+ * @param segmentNumber The Segment which should be modified
+ * @param row The row which should be modified
+ * @param value each bit set to 1 will light up the corresponding Led.
+ *
+ * \~german
+ * @brief Setze eine Reihe eines Segments.
+ *
+ * @param segmentNumber Die Nummer des gewünschten Segments
+ * @param row Die Reihe in dem Segment, welche gesetzte werden soll.
+ * @param value Der Wert der gesetzt werden soll.
+ */
+ void setRow(unsigned int segmentNumber, unsigned int row, byte value) noexcept;
+
+ /**
+ * \~english
+ * @brief get one Row of one segment.
+ *
+ * @param segmentNumber The Segment which should be modified
+ * @param row The row which should be modified
+ * @return value each bit set to 1 will light up the corresponding Led.
+ *
+ * \~german
+ * @brief Hole den Zustand einer Reihe eines Segments.
+ *
+ * @param segmentNumber Die Nummer des gewünschten Segments
+ * @param row Die Reihe in dem Segment, welche gewünscht ist.
+ * @return byte Der Wert, der angezeigt wird.
+ */
+ byte getRow(unsigned int segmentNumber, unsigned int row) noexcept;
+
+ /**
+ * \~english
+ * @brief Set a single led to a given value
+ *
+ * @param segmentNumber the segment number of the desired led
+ * @param row the row of the desired led (0..7)
+ * @param column the column of the desired led (0..7)
+ * @param state true if it should be on otherwise false
+ *
+ * \~german
+ * @brief Setzte eine einzalne Led auf einen bestimmten Wert
+ *
+ * @param segmentNumber Die Nummer des gewünschten Segments
+ * @param row die Zeile der LED im Segment (0..7)
+ * @param column die Spalte der LED im Segment (0..7)
+ * @param state true wenn sie an sein soll, ansonsten false
+ */
+ void setLed(unsigned int segmentNumber, unsigned int row, unsigned int column,
+ boolean state) noexcept;
+
+ /**
+ * \~english
+ * @brief Set one column of a given segment
+ *
+ * @param segmentNumber The desired Segment number
+ * @param col The desired column
+ * @param value The value, this column should have
+ *
+ * \~german
+ * @brief Setzte eine Spalte eines Segments
+ *
+ * @param segmentNumber Die Nummer des gewünschten Segments
+ * @param col die Spalte im Segment
+ * @param value Der Wert der gesetzt werden soll.
+ */
+ void setColumn(unsigned int segmentNumber, unsigned int col, byte value) noexcept;
+
+ /**
+ * \~english
+ * @brief Set a hexadecimal digit on a 7-Segment Display
+ *
+ * @param segmentNumber The number of the desired Segment
+ * @param digit the position of the digit on the Segment (0..7)
+ * @param value the value to be displayed. (0x00..0x0F)
+ * @param dp if true sets the decimal point
+ *
+ * \~german
+ * @brief Setzte eine Hexadecimalziffer auf einem 7-Segment Display
+ *
+ * @param segmentNumber Die Nummer des gewünschten Segments
+ * @param digit Die Position der Ziffer (0..7)
+ * @param value Der Wert, der angezeigt werden soll. (0x00..0x0F)
+ * @param dp true wenn der Dezimalpunkt gesetzt werden soll.
+ */
+ void setDigit(unsigned int segmentNumber, unsigned int digit, byte value,
+ boolean dp) noexcept;
+
+ /**
+ * \~english
+ * @brief Set the Display a character on a 7-Segment display.
+ * @note There are only a few characters that make sense here :
+ * '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
+ * 'A', 'b', 'c', 'd', 'E', 'F', 'H', 'L', 'P',
+ * '.', '-', '_', ' '
+ * @param segmentNumber The number of the desired segment
+ * @param digit the position of the character on the segment (0..7)
+ * @param value the character to be displayed.
+ * @param dp dp if true sets the decimal point
+ *
+ * \~german
+ * @brief Setzte ein Zeichen auf einem 7-Segment display.
+ * @note Es gibt nur einige Zeichen die Sinn ergeben:
+ * '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
+ * 'A', 'b', 'c', 'd', 'E', 'F', 'H', 'L', 'P',
+ * '.', '-', '_', ' '
+ * @param segmentNumber Die Nummer des gewünschten Segments
+ * @param digit Die Position der Zeichens (0..7)
+ * @param value Der Wert, der angezeigt werden soll.
+ * @param dp true wenn der Dezimalpunkt gesetzt werden soll.
+ */
+ void setChar(unsigned int segmentNumber, unsigned int digit, char value,
+ boolean dp) noexcept;
+
+ /**
+ * \~english
+ * @brief refreshes all segments by first resetting them and then updating
+ * them.
+ *
+ * \~german
+ * @brief Lädt alle Segmente neu (zurücksetzten und dann updaten).
+ */
+ void refreshSegments() noexcept;
+
+ /**
+ * \~english
+ * @brief refreshes a given segment by first resetting it and then updating
+ * it.
+ *
+ * @param segmentNumber the segment that will be resetted
+ *
+ * \~german
+ * @brief Lädt eine Segment neu (zurücksetzten und dann updaten).
+ *
+ * @param segmentNumber Die Nummer des gewünschten Segments
+ */
+ void refreshSegment(unsigned int segmentNumber) noexcept;
+
+ /**
+ * \~english
+ * @brief update all segments by displaying the internally stored state of the
+ * segments.
+ *
+ * \~german
+ * @brief Lädt den Inhalt der internen Daten auf alle Segmente hoch.
+ */
+ void updateSegments() noexcept;
+
+ /**
+ * \~english
+ * @brief update a given segment by displaying the internally stored state of
+ * the segment.
+ *
+ * @param segmentNumber the segment that will be updated
+ *
+ * \~german
+ * @brief Lädt den Inhalt der internen Daten auf ein Segmente hoch.
+ *
+ * @param segmentNumber Die Nummer des gewünschten Segments
+ */
+ void updateSegment(unsigned int segmentNumber) noexcept;
+
+ /**
+ * \~english
+ * @brief moves the data left by one
+ *
+ * @param shiftedInColumn The column that will be shifted to the right
+ * (default 0x00)
+ * @param row_num The row that will be shifted to the right
+ * @warning ONLY moves one row
+ * @return byte The column that gets shifted out on the left
+ *
+ * \~german
+ * @brief schiebt die Daten einer Zeile eins nach links.
+ *
+ * @param shiftedInColumn Die Daten, die rechts reingeschoben werden
+ * (default 0x00)
+ * @param row_num Die Zeile, die geschoben werden soll
+ * @warning Nur EINE ZEILE wird verschoben
+ * @return byte Die Daten, die links rausgeschoben werden.
+ */
+ byte moveRowLeft(byte shiftedInColumn = 0x00, unsigned int row_num = 0) noexcept;
+
+ /**
+ * \~english
+ * @brief moves the data left by one
+ *
+ * @param shiftedInColumn The column that will be shifted to the left
+ * (default 0x00)
+ * @param row_num The row that will be shifted to the left
+ * @warning ONLY moves one row
+ * @return byte The column that gets shifted out on the right
+ *
+ * \~german
+ * @brief schiebt die Daten einer Zeile eins nach rechts.
+ *
+ * @param shiftedInColumn Die Daten, die links reingeschoben werden
+ * (default 0x00)
+ * @param row_num Die Zeile, die geschoben werden soll
+ * @warning Nur EINE ZEILE wird verschoben
+ * @return byte Die Daten, die rechts rausgeschoben werden.
+ */
+ byte moveRowRight(byte shiftedInColumn = 0x00, unsigned int row_num = 0) noexcept;
+
+ /**
+ * \~english
+ * @brief moves the data of a column up by one
+ *
+ * @param shiftedInRow the date the will be shifted in on the bottom
+ * @param col_num the index of the column that will be moved
+ * @return byte the row that will be shifted out
+ *
+ * \~german
+ * @brief schiebt die Daten einer Spalte eins nach oben.
+ *
+ * @param shiftedInRow Die Daten, die unten reingeschoben werden
+ * (default 0x00)
+ * @param col_num Die Spalte, die geschoben werden soll
+ * @warning Nur EINE SPALTE wird verschoben
+ * @return byte Die Daten, die oben rausgeschoben werden.
+ */
+ byte moveColumnUp(byte shiftedInRow = 0x00, unsigned int col_num = 0) noexcept;
+
+ /**
+ * \~english
+ * @brief moves the data of a column down by one
+ *
+ * @param shiftedInRow the date the will be shifted in on the top
+ * @param col_num the index of the column that will be moved
+ * @return byte the row that will be shifted out
+ *
+ * \~german
+ * @brief schiebt die Daten einer Spalte eins nach unten.
+ *
+ * @param shiftedInRow Die Daten, die oben reingeschoben werden
+ * (default 0x00)
+ * @param col_num Die Spalte, die geschoben werden soll
+ * @warning Nur EINE SPALTE wird verschoben
+ * @return byte Die Daten, die unten rausgeschoben werden.
+ */
+ byte moveColumnDown(byte shiftedInRow = 0x00, unsigned int col_num = 0) noexcept;
+
+ /**
+ * \~english
+ * @brief moves the data up by one and 0x00 will be shifted in
+ * @return sakurajin::ByteRow This Array contains the bytes that will be shifted out on each Row.
+ *
+ * \~german
+ * @brief Schibet die Daten eins nach oben und 0x00 wird unten reingeschoben.
+ * @return sakurajin::ByteRow Die Reihen die rausgeschoben werden.
+ */
+ sakurajin::ByteRow moveUp() noexcept;
+
+ /**
+ * \~english
+ * @brief moves the data down by one and 0x00 will be shifted in
+ * @return sakurajin::ByteRow This Array contains the bytes that will be shifted out on each Row.
+ *
+ * \~german
+ * @brief Schibet die Daten eins nach unten und 0x00 wird oben reingeschoben.
+ * @return sakurajin::ByteRow Die Reihen die rausgeschoben werden.
+ */
+ sakurajin::ByteRow moveDown() noexcept;
+
+ /**
+ * \~english
+ * @brief moves the data left by one and 0x00 will be shifted in
+ * @return sakurajin::ByteRow This Array contains the bytes that will be shifted out on each Row.
+ *
+ * \~german
+ * @brief Schibet die Daten eins nach links und 0x00 wird recht reingeschoben.
+ * @return sakurajin::ByteRow Die Splaten die rausgeschoben werden.
+ */
+ sakurajin::ByteRow moveLeft() noexcept;
+
+ /**
+ * \~english
+ * @brief moves the data right by one and 0x00 will be shifted in
+ * @return sakurajin::ByteRow This Array contains the bytes that will be shifted out on each Row.
+ *
+ * \~german
+ * @brief Schibet die Daten eins nach rechts und 0x00 wird links reingeschoben.
+ * @return sakurajin::ByteRow Die Splaten die rausgeschoben werden.
+ */
+ sakurajin::ByteRow moveRight() noexcept;
+
+ /**
+ * \~english
+ * @brief moves all rows to the left.
+ *
+ * @param shiftedInColumn This Array contains what will be shifted in on each Row.
+ * @return sakurajin::ByteRow This Array contains the bytes that will be shifted out on each Row.
+ *
+ * \~german
+ * @brief Schiebt alle Reihen eins nach links
+ *
+ * @param shiftedInColumn Die Splaten die reingeschoben werden.
+ * @return sakurajin::ByteRow Die Splaten die rausgeschoben werden.
+ */
+ sakurajin::ByteRow moveLeft(const sakurajin::ByteRow& shiftedInColumn) noexcept;
+
+ /**
+ * \~english
+ * @brief moves all rows to the right.
+ *
+ * @param shiftedInColumn This Array contains what will be shifted in on each Row.
+ * @return sakurajin::ByteRow This Array contains the bytes that will be shifted out on each Row.
+ *
+ * \~german
+ * @brief Schiebt alle Reihen eins nach rechts
+ *
+ * @param shiftedInColumn Die Splaten die reingeschoben werden.
+ * @return sakurajin::ByteRow Die Splaten die rausgeschoben werden.
+ */
+ sakurajin::ByteRow moveRight(const sakurajin::ByteRow& shiftedInColumn) noexcept;
+
+ /**
+ * \~english
+ * @brief moves all columns up.
+ *
+ * @param shiftedInColumn This Array contains what will be shifted in on each Row
+ * @return sakurajin::ByteRow This Array contains the bytes that will be shifted out on each Row.
+ *
+ * \~german
+ * @brief Schiebt alle Splaten eins nach oben
+ *
+ * @param shiftedInColumn Die Reihen die reingeschoben werden.
+ * @return sakurajin::ByteRow Die Reihen die rausgeschoben werden.
+ */
+ sakurajin::ByteRow moveUp(const sakurajin::ByteRow& shiftedInColumn) noexcept;
+
+ /**
+ * \~english
+ * @brief moves all columns down.
+ *
+ * @param shiftedInColumn This Array contains what will be shifted in on each Row.
+ * @return sakurajin::ByteRow This Array contains the bytes that will be shifted out on each Row.
+ *
+ * \~german
+ * @brief Schiebt alle Splaten eins nach unten
+ *
+ * @param shiftedInColumn Die Reihen die reingeschoben werden.
+ * @return sakurajin::ByteRow Die Reihen die rausgeschoben werden.
+ */
+ sakurajin::ByteRow moveDown(const sakurajin::ByteRow& shiftedInColumn) noexcept;
+
+ /**
+ * \~english
+ * @brief This function changes to bitorder of a byte (useful to mirror
+ * "images" you want to display)
+ *
+ * @param input The byte that should be reversed
+ * @return byte The reversed byte
+ *
+ * \~german
+ * @brief Diese Funktion ändert die Bitreihnfolge eines Bytes bzw. kehrt ein Bit um.
+ *
+ * @param input Das byte, das umgekehrt werden soll.
+ * @return byte Das umgekehrte Byte
+ */
+ byte reverse(byte input) noexcept;
+
+ /**
+ * \~english
+ * @brief Reverse an sakurajin::ByteBlock of 8 bytes (mirror it)
+ *
+ * @param input The sakurajin::ByteBlock that should be mirrored
+ * @return sakurajin::ByteBlock The reversed sakurajin::ByteBlock
+ *
+ * \~german
+ * @brief Diese Funktion kehrt die Reihnfolge der einzelnen Zeilen um (spiegeln in x-Richtung).
+ *
+ * @param input Der sakurajin::ByteBlock der umgekehrt werden soll.
+ * @return sakurajin::ByteBlock Der umgekehrte sakurajin::ByteBlock.
+ */
+ sakurajin::ByteBlock reverse(sakurajin::ByteBlock input) noexcept;
+
+ /**
+ * \~english
+ * @brief Turns an sakurajin::ByteBlock of rows into an sakurajin::ByteBlock of columns
+ *
+ * @param rowArray the sakurajin::ByteBlock of rows of which you want the columns of
+ * @return sakurajin::ByteBlock The Columns of the given sakurajin::ByteBlock
+ *
+ * \~german
+ * @brief Wandelt einen Block aus Zeilen in einen Block aus Spalten.
+ *
+ * @param rowArray Der Block aus Zeilen
+ * @return sakurajin::ByteBlock Die Splaten des gegebenen Blocks
+ */
+ sakurajin::ByteBlock makeColumns(sakurajin::ByteBlock rowArray) noexcept;
+
+ /**
+ * \~english
+ * @brief rotate an sakurajin::ByteBlock by 180 degrees
+ *
+ * @param input the sakurajin::ByteBlock that will be rotated
+ * @return sakurajin::ByteBlock The rotated sakurajin::ByteBlock
+ *
+ * \~german
+ * @brief rotiert einen sakurajin::ByteBlock um 180 Grad
+ *
+ * @param input Der zu rotierende sakurajin::ByteBlock.
+ * @return sakurajin::ByteBlock Der rotierte byteBlock.
+ */
+ sakurajin::ByteBlock rotate180(sakurajin::ByteBlock input) noexcept;
+
+ /**
+ * \~english
+ * @brief Get the Config of the Led Controller
+ *
+ * @return controlller_configuration the configuration
+ *
+ * \~german
+ * @brief Hole die Konfiguration des LedController
+ *
+ * @return controlller_configuration Die aktuelle Konfiguration
+ */
+ const sakurajin::controller_configuration& getConfig() noexcept;
+
+ //The following methods are deprecated and will be removed in the future
+ //They only exist to help the transition to a new version
+ //Because they will be removed in the future the documentation will not be translated
+
+ /**
+ * \~
+ * @deprecated to be reomoved in version 2.1.0, moveRowLeft should be used
+ * @todo remove function in version 2.1.0
+ *
+ * \~english
+ * @brief moves the data left by one
+ * @param shiftedInColumn The column that will be shifted to the right
+ * (default 0x00)
+ * @warning ONLY moves row 0, this function exists for backwards compatibility
+ * @return byte The column that gets shifted out on the left
+ */
+ byte moveLeft(byte shiftedInColumn) noexcept;
+
+ /**
+ * \~
+ * @deprecated to be reomoved in version 2.1.0, moveRowLeft should be used
+ * @todo remove function in version 2.1.0
+ *
+ * \~english
+ * @brief moves the data left by one
+ * @param shiftedInColumn The column that will be shifted to the left
+ * (default 0x00)
+ * @warning ONLY moves row 0, this function exists for backwards compatibility
+ * @return byte The column that gets shifted out on the right
+ */
+ byte moveRight(byte shiftedInColumn) noexcept;
+
+ /**
+ * \~
+ * @deprecated the function with sakurajin::ByteBlock as return type should be used. Will be removed in version 2.2.0
+ * @todo remove function in version 2.2.0
+ *
+ * \~english
+ * @brief Get the Segment Data of a specific Segment
+ * @param column the column where the wanted segment is
+ * @param row_num the row where the wanted segment is
+ * @param resultLocation the location where the data should be stored
+ */
+ void getSegmentData(unsigned int column, unsigned int row_num, sakurajin::ByteBlock* resultLocation) noexcept;
+
+ /**
+ * \~
+ * @deprecated the function with sakurajin::ByteBlock as return type should be used. Will be removed in version 2.2.0
+ * @todo remove function in version 2.2.0
+ *
+ * \~english
+ * @brief Get the Segment Data of a specific Segment
+ * @param segmentindex the index of whose data you want to have
+ * @param resultLocation the location where the data should be stored
+ */
+ void getSegmentData(unsigned int segmentindex, sakurajin::ByteBlock *resultLocation) noexcept;
+
+ /**
+ * \~
+ * @deprecated the function with sakurajin::ByteBlock as return type should be used. Will be removed in version 2.2.0
+ * @todo remove function in version 2.2.0
+ *
+ * \~english
+ * @brief Turns an array of rows into an array of columns
+ * @param rowArray the array of rows of which you want the columns
+ * @param columnArray The address where the result will be stored
+ */
+ void makeColumns(sakurajin::ByteBlock rowArray, sakurajin::ByteBlock *columnArray) noexcept;
+
+ /**
+ * \~
+ * @deprecated the function with sakurajin::ByteBlock as return type should be used. Will be removed in version 2.2.0
+ * @todo remove function in version 2.2.0
+ *
+ * \~english
+ * @brief Reverse an array of 8 bytes (mirror it)
+ * @param input The array that should be mirrored
+ * @param reversedInput The address where the result will be stored
+ */
+ void reverse(sakurajin::ByteBlock input, sakurajin::ByteBlock *reversedInput) noexcept;
+
+ /**
+ * \~
+ * @deprecated the function with sakurajin::ByteBlock as return type should be used. Will be removed in version 2.2.0
+ * @todo remove function in version 2.2.0
+ *
+ * \~english
+ * @brief rotate an byte[8] array by 180 degrees
+ * @param input the array that will be rotated
+ * @param rotatedInput The address where the result will be stored
+ */
+ void rotate180(sakurajin::ByteBlock input, sakurajin::ByteBlock *rotatedInput) noexcept;
+
+ /**
+ * \~
+ * @deprecated the function with sakurajin::ByteRow as return type should be used. Will be removed in version 2.2.0
+ * @todo remove function in version 2.2.0
+ *
+ * \~english
+ * @brief moves the data up by one
+ * @param shiftedInRow The row that will be shifted in on the bottom (default
+ * 0x00)
+ * @param shiftedOutRow The address of the row that will be shifted out on the
+ * bottom
+ */
+ void moveUp(const sakurajin::ByteRow& shiftedInRow, sakurajin::ByteRow* shiftedOutRow) noexcept;
+
+ /**
+ * \~
+ * @deprecated the function with sakurajin::ByteRow as return type should be used. Will be removed in version 2.2.0
+ * @todo remove function in version 2.2.0
+ *
+ * \~english
+ * @brief moves the data down by one
+ * @param shiftedInRow The row that will be shifted in on the top (default
+ * 0x00)
+ * @param shiftedOutRow The address of the row that will be shifted out on the
+ * bottom
+ */
+ void moveDown(const sakurajin::ByteRow& shiftedInRow, sakurajin::ByteRow* shiftedOutRow) noexcept;
+
+ /**
+ * \~
+ * @deprecated the function with sakurajin::ByteRow as return type should be used. Will be removed in version 2.2.0
+ * @todo remove function in version 2.2.0
+ *
+ * \~english
+ * @brief moves the data up by oneand 0x00 will be shifted in
+ * @param shiftedOutRow The address of the row that will be shifted out on the
+ * bottom
+ */
+ void moveUp(sakurajin::ByteRow* shiftedOutRow) noexcept;
+
+ /**
+ * \~
+ * @deprecated the function with sakurajin::ByteRow as return type should be used. Will be removed in version 2.2.0
+ * @todo remove function in version 2.2.0
+ *
+ * \~english
+ * @brief moves the data down by one and 0x00 will be shifted in
+ * @param shiftedOutRow The address of the row that will be shifted out on the
+ * bottom
+ */
+ void moveDown(sakurajin::ByteRow* shiftedOutRow) noexcept;
+
+ /**
+ * \~
+ * @deprecated the function with sakurajin::ByteRow as return type should be used. Will be removed in version 2.2.0
+ * @todo remove function in version 2.2.0
+ *
+ * \~english
+ * @brief moves all rows to the left.
+ * The passed Arrays need to have the same length as the number of rows, or be a nullptr.
+ * If shiftedInColumn is a nullptr, 0x00 will be used for all rows.
+ * @param shiftedInColumn This Array contains what will be shifted in on each Row and needs to be the same size as number of rows or nullptr.
+ * @param shiftedOutColumn This pointer to an Array will contain the bytes that will be shifted out on each Row, it should be the same size as the number of rows or nullptr.
+ */
+ void moveLeft(const sakurajin::ByteRow& shiftedInColumn, sakurajin::ByteRow* shiftedOutColumn) noexcept;
+
+ /**
+ * \~
+ * @deprecated the function with sakurajin::ByteRow as return type should be used. Will be removed in version 2.2.0
+ * @todo remove function in version 2.2.0
+ *
+ * \~english
+ * @brief moves all rows to the right.
+ * The passed Arrays need to have the same length as the number of rows, or be a nullptr.
+ * If shiftedInColumn is a nullptr, 0x00 will be used for all rows.
+ * @param shiftedInColumn This Array contains what will be shifted in on each Row and needs to be the same size as number of rows or nullptr.
+ * @param shiftedOutColumn This pointer to an Array will contain the bytes that will be shifted out on each Row, it should be the same size as the number of rows or nullptr.
+ */
+ void moveRight(const sakurajin::ByteRow& shiftedInColumn, sakurajin::ByteRow* shiftedOutColumn) noexcept;
+ };
+
+}
+
+/**
+ * @example Led-matrix-rocket-multi.ino
+ *
+ * \~english
+ * An example on how to use the LedController with multiple rows
+ *
+ * \~german
+ * Ein Beispiel wie man den LedController mit mehreren Reihen nutzen kann
+ */
+
+/**
+ * @example Led-matrix-rocket.ino
+ *
+ * \~english
+ * An example on how to use the LedController to move a rocket across a led matrix
+ *
+ * \~german
+ * Ein Beispiel wie man den LedController nutzen kann um einen Rakete über die Led Matrix zu bewegen.
+ */
+
+/**
+ * @example Led-matrix-rocket-hwSPI.ino
+ *
+ * \~english
+ * This is simply @ref Led-matrix-rocket.ino just with hardware spi.
+ *
+ * \~german
+ * Dies ist einfach @ref Led-matrix-rocket.ino nur mit hardware spi.
+ */
+
+/**
+ * @example Led-matrix-counting.ino
+ *
+ * \~english
+ * An example on how to use the LedController to create a counter usind a Led Matrix.
+ *
+ * \~german
+ * Ein Beispiel wie man den LedController nutzen kann um einen Zähler mit einer Led Matrix zu erstellen.
+ */
+
+/**
+ * @example Led-matrix-message.ino
+ *
+ * \~english
+ * An example on how to use the LedController to display a message.
+ *
+ * \~german
+ * Ein Beispiel wie man den LedController nutzen kann um eine Nachricht auszugeben.
+ */
+
+/**
+ * @example 7-Segment-counting.ino
+ *
+ * \~english
+ * An example on how to use the LedController to create a counter using 7-Segment displays.
+ *
+ * \~german
+ * Ein Beispiel wie man den LedController nutzen kann um einen Zähler mit 7-Segment Anzeigen zu erstellen.
+ */
+
+/**
+ * @example 7-Segment-DHT-temp-humid.ino
+ *
+ * \~english
+ * An example on how to use the LedController to create a temparature and humidity display with 7-Segment displays.
+ *
+ * \~german
+ * Ein Beispiel wie man den LedController nutzen kann um eine Temperatur- und Luftfeuchtigkeitsanzeige mit 7-Segment Anzeigen zu erstellen.
+ */
+
+/**
+ * @example LCDemo7Segment.ino
+ *
+ * \~english
+ * An example on how to use the LedController with 7-Segment displays.
+ *
+ * \~english
+ * Ein Beispiel wie man den LedController nutzen kann um 7-Segment Anzeigen zu steuern.
+ */
diff --git a/src/implementations/LedController_MAX72XX.cpp b/src/implementations/LedController_MAX72XX.cpp
new file mode 100644
index 00000000..9a078c20
--- /dev/null
+++ b/src/implementations/LedController_MAX72XX.cpp
@@ -0,0 +1,25 @@
+#include "LedController_MAX72XX.hpp"
+
+sakurajin::MAX72XX::MAX72XX() noexcept:table(
+ 0b01111110, 0b00110000, 0b01101101, 0b01111001, 0b00110011, 0b01011011, 0b01011111,
+ 0b01110000, 0b01111111, 0b01111011, 0b01110111, 0b00011111, 0b00001101, 0b00111101,
+ 0b01001111, 0b01000111, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000,
+ 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000,
+ 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b10110000, 0b00100010,
+ 0b00111111, 0b01011011, 0b10100101, 0b00110001, 0b00000010, 0b01001010, 0b01101000,
+ 0b01000010, 0b00000111, 0b00000100, 0b00000001, 0b10000000, 0b00100101, 0b01111110,
+ 0b00110000, 0b01101101, 0b01111001, 0b00110011, 0b01011011, 0b01011111, 0b01110000,
+ 0b01111111, 0b01111011, 0b01001000, 0b01011000, 0b01000011, 0b00001001, 0b01100001,
+ 0b11100101, 0b01111101, 0b01110111, 0b00011111, 0b01001110, 0b00111101, 0b01001111,
+ 0b01000111, 0b01011110, 0b00110111, 0b00000110, 0b00111100, 0b01010111, 0b00001110,
+ 0b01010100, 0b01110110, 0b01111110, 0b01100111, 0b01101011, 0b01100110, 0b01011011,
+ 0b00001111, 0b00111110, 0b00111110, 0b00101010, 0b00110111, 0b00111011, 0b01101101,
+ 0b01001110, 0b00010011, 0b01111000, 0b01100010, 0b00001000, 0b00100000, 0b01111101,
+ 0b00011111, 0b00001101, 0b00111101, 0b01101111, 0b01000111, 0b01111011, 0b00010111,
+ 0b00000100, 0b00011000, 0b01010111, 0b00000110, 0b00010100, 0b00010101, 0b00011101,
+ 0b01100111, 0b01110011, 0b00000101, 0b01011011, 0b00001111, 0b00011100, 0b00011100,
+ 0b00010100, 0b00110111, 0b00111011, 0b01101101, 0b00110001, 0b00000110, 0b00000111,
+ 0b01000000, 0b00000000
+ ) {
+
+};
\ No newline at end of file
diff --git a/src/implementations/LedController_core.hpp b/src/implementations/LedController_core.hpp
new file mode 100644
index 00000000..31bea14f
--- /dev/null
+++ b/src/implementations/LedController_core.hpp
@@ -0,0 +1,175 @@
+#include "LedController.hpp"
+
+template
+sakurajin::LedController::~LedController() noexcept {
+ initilized = false;
+}
+
+template
+sakurajin::LedController::LedController() noexcept {};
+
+template
+sakurajin::LedController::LedController(unsigned int csPin) noexcept {
+ init(csPin);
+};
+
+template
+sakurajin::LedController::LedController(unsigned int dataPin, unsigned int clkPin,
+ unsigned int csPin, bool useHardwareSpiParam) noexcept {
+ init(dataPin, clkPin, csPin, useHardwareSpiParam);
+}
+
+template
+sakurajin::LedController::LedController(const sakurajin::controller_configuration &config) noexcept {
+ init(config);
+};
+
+template
+sakurajin::LedController::LedController(const sakurajin::LedController &other) noexcept {
+ if (!other.initilized) {
+ return;
+ }
+
+ init(other.conf);
+
+ for (unsigned int i = 0; i < conf.SegmentCount(); i++) {
+ for (unsigned int j = 0; i < 8; i++) {
+ LedStates[i][j] = other.LedStates[i][j];
+ }
+ }
+
+ for (unsigned int j = 0; j < rows*columns*2; j++) {
+ spidata[j] = other.spidata[j];
+ }
+
+ refreshSegments();
+}
+
+template
+void sakurajin::LedController::init(unsigned int csPin) noexcept {
+ sakurajin::controller_configuration config;
+
+ config.cs_pin = csPin;
+ config.useHardwareSpi = true;
+
+ return init(config);
+}
+
+template
+void sakurajin::LedController::init(unsigned int dataPin, unsigned int clkPin,
+ unsigned int csPin, bool useHardwareSpiParam) noexcept {
+ if (initilized) {
+ return;
+ }
+
+ sakurajin::controller_configuration config;
+
+ config.mosi_pin = dataPin;
+ config.clk_pin = clkPin;
+ config.cs_pin = csPin;
+ config.useHardwareSpi = useHardwareSpiParam;
+
+ init(config);
+}
+
+template
+void sakurajin::LedController::init(const sakurajin::controller_configuration &configuration) noexcept {
+ if (initilized) {
+ return;
+ }
+
+ if (!configuration.isValid()) {
+ return;
+ }
+ conf = configuration;
+
+ initConf();
+ initSPI();
+
+ initilized = true;
+ refreshSegments();
+}
+
+template
+void sakurajin::LedController::initConf() noexcept {
+ if (conf.useHardwareSpi) {
+ conf.clk_pin = SCK;
+ conf.mosi_pin = MOSI;
+ }
+
+ resetBuffers();
+}
+
+template
+void sakurajin::LedController::initSPI() noexcept {
+ pinMode(conf.mosi_pin, OUTPUT);
+ pinMode(conf.clk_pin, OUTPUT);
+
+ if(conf.virtual_multi_row) {
+ pinMode(conf.cs_pin,OUTPUT);
+ digitalWrite(conf.cs_pin,LOW);
+ } else {
+ for(unsigned int i = 0; i < rows; i++) {
+ pinMode(conf.row_cs_pin[i],OUTPUT);
+ digitalWrite(conf.row_cs_pin[i],LOW);
+ }
+ }
+
+ if (conf.useHardwareSpi) {
+ SPI.begin();
+ }
+
+ if(conf.virtual_multi_row) {
+ digitalWrite(conf.cs_pin,HIGH);
+ } else {
+ for(unsigned int i = 0; i < rows; i++) {
+ digitalWrite(conf.row_cs_pin[i],HIGH);
+ }
+ }
+}
+
+template
+bool sakurajin::LedController::isInitilized() noexcept {
+ return initilized;
+}
+
+// to be remvoed for version 2.2.0
+template
+void sakurajin::LedController::getSegmentData(unsigned int column, unsigned int row_num, sakurajin::ByteBlock* resultLocation) noexcept {
+ getSegmentData(conf.getSegmentNumber(column,row_num),resultLocation);
+}
+
+// to be removed for version 2.2.0
+template
+void sakurajin::LedController::getSegmentData(unsigned int segmentindex,
+ sakurajin::ByteBlock *resultLocation) noexcept {
+ if (!initilized || segmentindex >= conf.SegmentCount() ||
+ resultLocation == nullptr) {
+ return;
+ }
+
+ *resultLocation = getSegmentData(segmentindex);
+}
+
+template
+sakurajin::ByteBlock sakurajin::LedController::getSegmentData(unsigned int segmentindex) noexcept {
+ if (!initilized || segmentindex >= conf.SegmentCount()) {
+ return sakurajin::ByteBlock();
+ };
+ return LedStates[segmentindex];
+}
+
+template
+sakurajin::ByteBlock sakurajin::LedController::getSegmentData(unsigned int column, unsigned int row_num) noexcept {
+ return getSegmentData(conf.getSegmentNumber(column,row_num));
+}
+
+template
+unsigned int sakurajin::LedController::getSegmentCount() noexcept {
+ return columns*rows;
+}
+
+template
+const sakurajin::controller_configuration& sakurajin::LedController::getConfig() noexcept {
+ return conf;
+}
diff --git a/src/implementations/LedController_display.hpp b/src/implementations/LedController_display.hpp
new file mode 100644
index 00000000..610c55e1
--- /dev/null
+++ b/src/implementations/LedController_display.hpp
@@ -0,0 +1,239 @@
+#pragma once
+
+/**
+ * @file sakurajin::LedController_display.hpp
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief This file contains the functions to display data on an sakurajin::LedController
+ * @version 0.1
+ * @date 2020-12-30
+ *
+ * @copyright Copyright (c) 2020
+ *
+ */
+
+#include "LedController_template.hpp"
+#include "LedController_MAX72XX.hpp"
+
+template
+void sakurajin::LedController::resetBuffers() noexcept {
+ for (unsigned int j = 0; j < rows*columns*2; j++) {
+ spidata[j] = j%2 == 0 ? 0x00 : sakurajin::MAX72XX::OP_NOOP;
+ }
+
+ for (unsigned int j = 0; j < conf.SegmentCount(); j++) {
+ for (unsigned int i = 0; i < 8; i++) {
+ LedStates[j][i] = 0x00;
+ }
+ }
+}
+
+template
+void sakurajin::LedController::resetMatrix() noexcept {
+ if (!initilized) {
+ return;
+ }
+
+ activateAllSegments();
+ setIntensity(1);
+ clearMatrix();
+}
+
+template
+void sakurajin::LedController::clearMatrix() noexcept {
+ if (!initilized) {
+ return;
+ }
+
+ for (unsigned int i = 0; i < conf.SegmentCount(); i++) {
+ clearSegment(i); // Clear Segments
+ }
+}
+
+template
+void sakurajin::LedController::displayOnSegment(unsigned int segmentindex,
+ sakurajin::ByteBlock data) noexcept {
+ if (!initilized || segmentindex >= conf.SegmentCount()) {
+ return;
+ }
+
+ for (int i = 0; i < 8; i++) {
+ setRow(segmentindex, i, data[i]);
+ }
+}
+
+template
+void sakurajin::LedController::displayOnSegment(unsigned int column, unsigned int row_num, sakurajin::ByteBlock data) noexcept {
+ displayOnSegment(conf.getSegmentNumber(column,row_num),data);
+}
+
+
+template
+void sakurajin::LedController::shutdownSegment(unsigned int segmentNumber) noexcept {
+ if (!initilized || segmentNumber >= conf.SegmentCount()) {
+ return;
+ }
+
+ spiTransfer(segmentNumber, sakurajin::MAX72XX::OP_SHUTDOWN, 0);
+}
+
+template
+void sakurajin::LedController::activateSegment(unsigned int segmentNumber) noexcept {
+ if (!initilized || segmentNumber >= conf.SegmentCount()) {
+ return;
+ }
+
+ spiTransfer(segmentNumber, sakurajin::MAX72XX::OP_SHUTDOWN, 1);
+}
+
+template
+void sakurajin::LedController::shutdownAllSegments() noexcept {
+ if (!initilized) {
+ return;
+ }
+
+ for (unsigned int i = 0; i < conf.SegmentCount(); i++) {
+ shutdownSegment(i);
+ }
+}
+
+template
+void sakurajin::LedController::activateAllSegments() noexcept {
+ if (!initilized) {
+ return;
+ }
+
+ for (unsigned int i = 0; i < conf.SegmentCount(); i++) {
+ activateSegment(i);
+ }
+}
+
+template
+void sakurajin::LedController::clearSegment(unsigned int segmentNumber) noexcept {
+ if (!initilized || segmentNumber >= conf.SegmentCount()) {
+ return;
+ }
+
+ for (int i = 0; i < 8; i++) {
+ LedStates[segmentNumber][i] = 0x00;
+ spiTransfer(segmentNumber, i + 1, LedStates[segmentNumber][i]);
+ }
+}
+
+template
+void sakurajin::LedController::setRow(unsigned int segmentNumber, unsigned int row,
+ byte value) noexcept {
+ if (!initilized || segmentNumber >= conf.SegmentCount() || row > 7 ||
+ (conf.onlySendOnChange && LedStates[segmentNumber][row] == value)) {
+ return;
+ }
+
+ LedStates[segmentNumber][row] = value;
+ spiTransfer(segmentNumber, row + 1, LedStates[segmentNumber][row]);
+}
+
+template
+byte sakurajin::LedController::getRow(unsigned int segmentNumber, unsigned int row) noexcept {
+ if (!initilized || segmentNumber >= conf.SegmentCount() || row > 7) {
+ return 0x00;
+ }
+
+ return LedStates[segmentNumber][row];
+}
+
+template
+void sakurajin::LedController::setLed(unsigned int segmentNumber, unsigned int row,
+ unsigned int column, boolean state) noexcept {
+ if (!initilized || row > 7 || column > 7 ||
+ segmentNumber >= conf.SegmentCount()) {
+ return;
+ };
+
+ byte val = 0x01 << column;
+
+ if (state)
+ val |= LedStates[segmentNumber][row];
+ else {
+ val = ~val;
+ val &= LedStates[segmentNumber][row];
+ }
+
+ setRow(segmentNumber,row,val);
+}
+
+template
+void sakurajin::LedController::setColumn(unsigned int segmentNumber, unsigned int col,
+ byte value) noexcept {
+ if (!initilized || segmentNumber >= conf.SegmentCount() || col > 7) {
+ return;
+ };
+
+ ByteBlock val = LedStates[segmentNumber].transpose();
+ val[col] = value;
+ displayOnSegment(segmentNumber,val.transpose());
+
+}
+
+template
+void sakurajin::LedController::setDigit(unsigned int segmentNumber, unsigned int digit,
+ byte value, boolean dp) noexcept {
+ if (!initilized || segmentNumber >= conf.SegmentCount() || digit > 7) {
+ return;
+ };
+
+ byte v = sakurajin::MAX72XX::getChar(value%16);
+ if (dp) {
+ v |= 0b10000000;
+ };
+ LedStates[segmentNumber][digit] = v;
+ spiTransfer(segmentNumber, digit + 1, v);
+}
+
+template
+void sakurajin::LedController::setChar(unsigned int segmentNumber, unsigned int digit,
+ char value, boolean dp) noexcept {
+ if (!initilized || segmentNumber >= conf.SegmentCount() || digit > 7) {
+ return;
+ };
+
+ byte v = sakurajin::MAX72XX::getChar(value);
+ if (dp) {
+ v |= 0b10000000;
+ };
+
+ LedStates[segmentNumber][digit] = v;
+ spiTransfer(segmentNumber, digit + 1, v);
+}
+
+template
+void sakurajin::LedController::refreshSegments() noexcept {
+ if (!initilized) {
+ return;
+ }
+
+ for (unsigned int i = 0; i < conf.SegmentCount(); i++) {
+ refreshSegment(i);
+ }
+}
+
+template
+void sakurajin::LedController::updateSegments() noexcept {
+ if (!initilized) {
+ return;
+ }
+
+ for (unsigned int seg = 0; seg < conf.SegmentCount(); seg++) {
+ updateSegment(seg);
+ }
+}
+
+template
+void sakurajin::LedController::updateSegment(unsigned int segmentNumber) noexcept {
+ if (!initilized) {
+ return;
+ }
+
+ for (unsigned int row = 0; row < 8; row++) {
+ spiTransfer(segmentNumber, row + 1, LedStates[segmentNumber][row]);
+ }
+}
+
diff --git a/src/implementations/LedController_low_level.hpp b/src/implementations/LedController_low_level.hpp
new file mode 100644
index 00000000..e2bd1f49
--- /dev/null
+++ b/src/implementations/LedController_low_level.hpp
@@ -0,0 +1,145 @@
+#pragma once
+/**
+ * @file sakurajin::LedController_low_level.hpp
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief This file contains the low level functions of the sakurajin::LedController which are needed to implement most external functions.
+ * @version 0.1
+ * @date 2020-12-30
+ *
+ * @copyright Copyright (c) 2020
+ *
+ */
+
+#include "LedController_template.hpp"
+#include "LedController_MAX72XX.hpp"
+
+template
+void sakurajin::LedController::spiTransfer(unsigned int segment, byte opcode, byte data) noexcept {
+ if (!initilized || segment >= conf.SegmentCount()) {
+ return;
+ }
+
+ // Create an array with the data to shift out
+ unsigned int offset = conf.getColumn(segment) * 2;
+ unsigned int row = conf.getRow(segment);
+ unsigned int maxbytes = conf.SegmentCount() * 2;
+
+ for(unsigned int i = 0; i < maxbytes; i++) {
+ spidata[i] = i%2 == 0 ? 0x00 : sakurajin::MAX72XX::OP_NOOP;
+ }
+
+ // put our device data into the array
+ spidata[row*columns*2+offset+1] = opcode;
+ spidata[row*columns*2+offset] = data;
+
+ if(conf.virtual_multi_row && conf.cs_pin != 0) {
+ auto cs = conf.cs_pin;
+ digitalWrite(cs, LOW);
+
+ if (conf.useHardwareSpi) {
+ SPI.beginTransaction(SPISettings(conf.spiTransferSpeed, MSBFIRST, SPI_MODE0));
+ }
+
+ for (int i = maxbytes; i > 0; i--) {
+ if (conf.useHardwareSpi) {
+ SPI.transfer(spidata[i-1]);
+ } else {
+ shiftOut(conf.mosi_pin, conf.clk_pin, MSBFIRST, spidata[i-1]);
+ }
+ }
+
+ //end the spi transfer if hardware should be used
+ if (conf.useHardwareSpi) {
+ SPI.endTransaction();
+ }
+
+ // latch the data onto the display
+ digitalWrite(cs, HIGH);
+
+ } else {
+ for(unsigned int r = 0; r < rows ; r++) {
+
+ //enable the line
+ auto cs = conf.row_cs_pin[r];
+ digitalWrite(cs, LOW);
+
+ //init the spi transfer if hardware should be used
+ if (conf.useHardwareSpi) {
+ SPI.beginTransaction(SPISettings(conf.spiTransferSpeed, MSBFIRST, SPI_MODE0));
+ }
+
+ // Now shift out the data
+ for (int i = columns*2; i > 0; i--) {
+ if (conf.useHardwareSpi) {
+ SPI.transfer(spidata[r*columns*2+i-1]);
+ } else {
+ shiftOut(conf.mosi_pin, conf.clk_pin, MSBFIRST, spidata[r*columns*2+i-1]);
+ }
+ }
+
+ //end the spi transfer if hardware should be used
+ if (conf.useHardwareSpi) {
+ SPI.endTransaction();
+ }
+
+ // latch the data onto the display
+ digitalWrite(cs, HIGH);
+ }
+ }
+}
+
+template
+void sakurajin::LedController::setScanLimit(unsigned int segmentNumber,
+ unsigned int limit) noexcept {
+ if (!initilized || segmentNumber >= conf.SegmentCount()) {
+ return;
+ };
+ if (limit < 8) {
+ spiTransfer(segmentNumber, sakurajin::MAX72XX::OP_SCANLIMIT, limit);
+ };
+}
+
+template
+void sakurajin::LedController::setIntensity(unsigned int newIntesityLevel) noexcept {
+ if (newIntesityLevel > 15 || !initilized) {
+ return;
+ }
+
+ // std::lock_guard lock(mut_IntensityLevel);
+ conf.IntensityLevel = newIntesityLevel;
+
+ for (unsigned int i = 0; i < conf.SegmentCount(); i++) {
+ setIntensity(i, conf.IntensityLevel);
+ }
+}
+
+template
+void sakurajin::LedController::setIntensity(unsigned int segmentNumber,
+ unsigned int newIntesityLevel) noexcept {
+ if (newIntesityLevel > 15 || !initilized ||
+ segmentNumber >= conf.SegmentCount()) {
+ return;
+ }
+
+ spiTransfer(segmentNumber, sakurajin::MAX72XX::OP_INTENSITY, newIntesityLevel);
+}
+
+template
+void sakurajin::LedController::refreshSegment(unsigned int segmentNumber) noexcept {
+ if (!initilized) {
+ return;
+ }
+
+ spiTransfer(segmentNumber, sakurajin::MAX72XX::OP_DISPLAYTEST, 0);
+ // scanlimit is set to max on startup
+ setScanLimit(segmentNumber, 7);
+ // decode is done in source
+ spiTransfer(segmentNumber, sakurajin::MAX72XX::OP_DECODEMODE, 0);
+ clearSegment(segmentNumber);
+ // we go into shutdown-mode on startup
+ activateSegment(segmentNumber);
+
+ setIntensity(segmentNumber, this->conf.IntensityLevel);
+
+ updateSegment(segmentNumber);
+}
diff --git a/src/implementations/LedController_movement.hpp b/src/implementations/LedController_movement.hpp
new file mode 100644
index 00000000..ef479397
--- /dev/null
+++ b/src/implementations/LedController_movement.hpp
@@ -0,0 +1,266 @@
+#pragma once
+/**
+ * @file sakurajin::LedController_movement.hpp
+ * @author Noa Sakurajin (noasakurajin@web.de)
+ * @brief This file contains the functions to move data on the sakurajin::LedController
+ * @version 0.1
+ * @date 2020-12-21
+ *
+ * @copyright Copyright (c) 2020
+ *
+ */
+
+#include "LedController_template.hpp"
+
+template
+byte sakurajin::LedController::moveRowRight(byte shiftedInColumn, unsigned int row_num) noexcept {
+ if (!initilized || row_num >= rows) {
+ return 0x00;
+ }
+
+ byte returnValue = 0x00;
+
+ for (unsigned int i = 0; i < 8; i++) {
+ if (LedStates[conf.getSegmentNumber(columns-1,row_num)][i] & 0x80) {
+ returnValue |= 0x01 << i;
+ };
+ }
+
+ for (int col = columns-1; col >= 0; col--) {
+ auto seg = conf.getSegmentNumber(col,row_num);
+ auto seg1 = conf.getSegmentNumber(col-1,row_num);
+
+ for(unsigned int i = 0; i < 8; i++) {
+ LedStates[seg][i] = LedStates[seg][i] << 1;
+ if (seg != conf.getSegmentNumber(0,row_num) && LedStates[seg1][i] & 0x80) {
+ LedStates[seg][i] |= 0x01;
+ };
+ }
+ }
+
+ setColumn(conf.getSegmentNumber(conf.getSegmentNumber(0,row_num),row_num), 0, shiftedInColumn);
+
+ updateSegments();
+
+ return returnValue;
+}
+
+template
+byte sakurajin::LedController::moveRowLeft(byte shiftedInColumn, unsigned int row_num) noexcept {
+ if (!initilized || row_num >= rows) {
+ return 0x00;
+ }
+
+ byte returnValue = 0x00;
+
+ for (unsigned int i = 0; i < 8; i++) {
+ if (LedStates[conf.getSegmentNumber(0,row_num)][i] & 0x01) {
+ returnValue |= 0x01 << i;
+ };
+ }
+
+
+ for (unsigned int col = 0; col < columns; col++) {
+ auto seg = conf.getSegmentNumber(col,row_num);
+ auto seg1 = conf.getSegmentNumber(col+1,row_num);
+ for(unsigned int i = 0; i < 8; i++) {
+ LedStates[seg][i] = LedStates[seg][i] >> 1;
+ if (seg != conf.getSegmentNumber(columns-1,row_num) && LedStates[seg1][i] & 0x01) {
+ LedStates[seg][i] |= 0x80;
+ };
+ }
+ }
+
+ setColumn(conf.getSegmentNumber(columns-1,row_num), 7, shiftedInColumn);
+
+ updateSegments();
+
+ return returnValue;
+}
+
+template
+byte sakurajin::LedController::moveColumnUp(byte shiftedInRow, unsigned int col_num) noexcept {
+ if (!initilized) {
+ return 0x00;
+ }
+ col_num%=columns;
+
+ byte retval = LedStates[conf.getSegmentNumber(col_num,rows-1)][7];
+
+ for (unsigned int i = rows-1; i>=0; i--) {
+ auto seg = conf.getSegmentNumber(col_num,i);
+ for(unsigned int j = 7; j>=0; j--) {
+ if(j==0) {
+ if(i == 0) {
+ LedStates[seg][0] = shiftedInRow;
+ } else {
+ LedStates[seg][0] = LedStates[conf.getSegmentNumber(col_num,i-1)][7];
+ }
+ } else {
+ LedStates[seg][j] = LedStates[seg][j - 1];
+ }
+ if(j == 0) {
+ break;
+ };
+ }
+ if(i == 0) {
+ break;
+ };
+ }
+
+ updateSegments();
+
+ return retval;
+}
+
+template
+byte sakurajin::LedController::moveColumnDown(byte shiftedInRow, unsigned int col_num) noexcept {
+ if (!initilized) {
+ return 0x00;
+ }
+
+ byte retval = LedStates[conf.getSegmentNumber(col_num,0)][0];
+
+ for (unsigned int i = 0; i
+sakurajin::ByteRow sakurajin::LedController::moveDown() noexcept {
+ return moveDown(sakurajin::ByteRow());
+}
+
+template
+sakurajin::ByteRow sakurajin::LedController::moveUp() noexcept {
+ return moveUp(sakurajin::ByteRow());
+}
+
+template