diff --git a/docs/Doxyfile b/docs/Doxyfile
index 18c4c4d..0f75ac2 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile
@@ -1,4 +1,4 @@
-# Doxyfile 1.9.6
+# Doxyfile 1.9.3
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
@@ -12,16 +12,6 @@
# For lists, items can also be appended using:
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (\" \").
-#
-# Note:
-#
-# Use doxygen to compare the used configuration file with the template
-# configuration file:
-# doxygen -x [configFile]
-# Use doxygen to compare the used configuration file with the template
-# configuration file without replacing the environment variables or CMake type
-# replacement variables:
-# doxygen -x_noenv [configFile]
#---------------------------------------------------------------------------
# Project related configuration options
@@ -48,7 +38,7 @@ PROJECT_NAME = "STA Core"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = "1.0.0"
+PROJECT_NUMBER = 1.0.0
# 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
@@ -70,28 +60,16 @@ PROJECT_LOGO =
OUTPUT_DIRECTORY = docs
-# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 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
+# 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. Adapt CREATE_SUBDIRS_LEVEL to
-# control the number of sub-directories.
+# performance problems for the file system.
# The default value is: NO.
CREATE_SUBDIRS = NO
-# Controls the number of sub-directories that will be created when
-# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every
-# level increment doubles the number of directories, resulting in 4096
-# directories at level 8 which is the default and also the maximum value. The
-# sub-directories are organized in 2 levels, the first level always has a fixed
-# number of 16 directories.
-# Minimum value: 0, maximum value: 8, default value: 8.
-# This tag requires that the tag CREATE_SUBDIRS is set to YES.
-
-CREATE_SUBDIRS_LEVEL = 8
-
# 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
@@ -103,14 +81,14 @@ ALLOW_UNICODE_NAMES = NO
# 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, Bulgarian,
-# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English
-# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek,
-# Hindi, 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.
+# 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
@@ -193,15 +171,14 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH = \
- include \
- App/include \
- Libs/sta-core/include \
- Libs/mpaland-printf \
- Libs/rtos2/include \
- Libs/MCP2518FD/include \
- Libs/iso-tp/include \
- Libs/BMP388/include
+STRIP_FROM_INC_PATH = include \
+ App/include \
+ Libs/sta-core/include \
+ Libs/mpaland-printf \
+ Libs/rtos2/include \
+ Libs/MCP2518FD/include \
+ Libs/iso-tp/include \
+ Libs/BMP388/include
# 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
@@ -482,7 +459,7 @@ TYPEDEF_HIDES_STRUCT = NO
LOOKUP_CACHE_SIZE = 0
-# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use
+# 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
@@ -576,8 +553,7 @@ 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
-# will also hide undocumented C++ concepts if enabled. This option has no effect
-# if EXTRACT_ALL is enabled.
+# has no effect if EXTRACT_ALL is enabled.
# The default value is: NO.
HIDE_UNDOC_CLASSES = NO
@@ -608,15 +584,14 @@ INTERNAL_DOCS = NO
# 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 set to NO to properly deal with
+# 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.
-# Possible values are: SYSTEM, NO and YES.
-# The default value is: SYSTEM.
+# The default value is: system dependent.
CASE_SENSE_NAMES = NO
@@ -868,14 +843,6 @@ WARN_IF_INCOMPLETE_DOC = YES
WARN_NO_PARAMDOC = NO
-# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about
-# undocumented enumeration values. If set to NO, doxygen will accept
-# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag
-# will automatically be disabled.
-# The default value is: NO.
-
-WARN_IF_UNDOC_ENUM_VAL = 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
@@ -891,21 +858,10 @@ WARN_AS_ERROR = NO
# 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)
-# See also: WARN_LINE_FORMAT
# The default value is: $file:$line: $text.
WARN_FORMAT = "$file:$line: $text"
-# In the $text part of the WARN_FORMAT command it is possible that a reference
-# to a more specific place is given. To make it easier to jump to this place
-# (outside of doxygen) the user can define a custom "cut" / "paste" string.
-# Example:
-# WARN_LINE_FORMAT = "'vi $file +$line'"
-# See also: WARN_FORMAT
-# The default value is: at line $line of file $file.
-
-WARN_LINE_FORMAT = "at line $line of file $file"
-
# 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). In case the file specified cannot be opened for writing the
@@ -932,21 +888,10 @@ INPUT =
# 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.
-# See also: INPUT_FILE_ENCODING
# The default value is: UTF-8.
INPUT_ENCODING = UTF-8
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify
-# character encoding on a per file pattern basis. Doxygen will compare the file
-# name with each pattern and apply the encoding instead of the default
-# INPUT_ENCODING) if there is a match. The character encodings are a list of the
-# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding
-# "INPUT_ENCODING" for further information on supported encodings.
-
-INPUT_FILE_ENCODING =
-
# 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.
@@ -965,14 +910,13 @@ INPUT_FILE_ENCODING =
# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd,
# *.vhdl, *.ucf, *.qsf and *.ice.
-FILE_PATTERNS = \
- *.c \
- *.cpp \
- *.h \
- *.hpp \
- *.tpp \
- *.py \
- *.pyw
+FILE_PATTERNS = *.c \
+ *.cpp \
+ *.h \
+ *.hpp \
+ *.tpp \
+ *.py \
+ *.pyw
# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
@@ -987,12 +931,11 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE = \
- Core \
- Drivers \
- Middlewares \
- Debug \
- Release
+EXCLUDE = Core \
+ Drivers \
+ Middlewares \
+ Debug \
+ Release
# 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
@@ -1062,11 +1005,6 @@ IMAGE_PATH =
# 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 doxygen will use the data processed and written to standard output
-# for further processing, therefore nothing else, like debug statements or used
-# commands (so in case of a Windows batch file always use @echo OFF), should be
-# written to standard output.
-#
# 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.
@@ -1108,15 +1046,6 @@ FILTER_SOURCE_PATTERNS =
USE_MDFILE_AS_MAINPAGE =
-# The Fortran standard specifies that for fixed formatted Fortran code all
-# characters from position 72 are to be considered as comment. A common
-# extension is to allow longer lines before the automatic comment starts. The
-# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can
-# be processed before the automatic comment starts.
-# Minimum value: 7, maximum value: 10000, default value: 72.
-
-FORTRAN_COMMENT_AFTER = 72
-
#---------------------------------------------------------------------------
# Configuration options related to source browsing
#---------------------------------------------------------------------------
@@ -1203,46 +1132,6 @@ USE_HTAGS = NO
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 the CLANG_ASSISTED_PARSING tag is set to YES 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.
-# This tag requires that the tag CLANG_ASSISTED_PARSING is set to 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
#---------------------------------------------------------------------------
@@ -1254,11 +1143,10 @@ CLANG_DATABASE_PATH =
ALPHABETICAL_INDEX = YES
-# 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. The IGNORE_PREFIX
-# tag works for classes, function and member names. The entity will be placed in
-# the alphabetical list under the first letter of the entity name that remains
-# after removing the prefix.
+# 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 =
@@ -1337,12 +1225,7 @@ HTML_STYLESHEET =
# 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).
-# Note: Since the styling of scrollbars can currently not be overruled in
-# Webkit/Chromium, the styling will be left out of the default doxygen.css if
-# one or more extra stylesheets have been specified. So if scrollbar
-# customization is desired it has to be added explicitly. For an example see the
-# documentation.
+# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET =
@@ -1357,19 +1240,6 @@ HTML_EXTRA_STYLESHEET =
HTML_EXTRA_FILES =
-# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
-# should be rendered with a dark or light theme.
-# Possible values are: LIGHT always generate light mode output, DARK always
-# generate dark mode output, AUTO_LIGHT automatically set the mode according to
-# the user preference, use light mode if no preference is set (the default),
-# AUTO_DARK automatically set the mode according to the user preference, use
-# dark mode if no preference is set and TOGGLE allow to user to switch between
-# light and dark mode via a button.
-# The default value is: AUTO_LIGHT.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE = TOGGLE
-
# 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 color-wheel, see
@@ -1733,6 +1603,17 @@ HTML_FORMULA_FORMAT = png
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.
@@ -2323,8 +2204,7 @@ 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. Note that the INCLUDE_PATH is not recursive, so the setting of
-# RECURSIVE has no effect here.
+# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
INCLUDE_PATH =
@@ -2448,38 +2328,26 @@ HAVE_DOT = NO
DOT_NUM_THREADS = 0
-# DOT_COMMON_ATTR is common attributes for nodes, edges and labels of
-# subgraphs. When you want a differently looking font in the dot files that
-# doxygen generates you can specify fontname, fontcolor and fontsize attributes.
-# For details please see Node,
-# Edge and Graph Attributes specification 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. Default graphviz fontsize is 14.
-# The default value is: fontname=Helvetica,fontsize=10.
+# 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_COMMON_ATTR = "fontname=Helvetica,fontsize=10"
+DOT_FONTNAME = Helvetica
-# DOT_EDGE_ATTR is concatenated with DOT_COMMON_ATTR. For elegant style you can
-# add 'arrowhead=open, arrowtail=open, arrowsize=0.5'. Complete documentation about
-# arrows shapes.
-# The default value is: labelfontname=Helvetica,labelfontsize=10.
+# 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_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10"
+DOT_FONTSIZE = 10
-# DOT_NODE_ATTR is concatenated with DOT_COMMON_ATTR. For view without boxes
-# around nodes set 'shape=plain' or 'shape=plaintext' Shapes specification
-# The default value is: shape=box,height=0.2,width=0.4.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4"
-
-# You can set the path where dot can find font specified with fontname in
-# DOT_COMMON_ATTR and others dot attributes.
+# 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 =
@@ -2505,8 +2373,7 @@ CLASS_GRAPH = 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. See also the chapter Grouping
-# in the manual.
+# groups, showing the direct groups dependencies.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
@@ -2722,6 +2589,18 @@ DOT_GRAPH_MAX_NODES = 50
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 = NO
+
# 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
diff --git a/include/sta/bus/can/iter.hpp b/include/sta/bus/can/iter.hpp
index 95fd187..519a929 100644
--- a/include/sta/bus/can/iter.hpp
+++ b/include/sta/bus/can/iter.hpp
@@ -18,9 +18,13 @@ namespace sta
class CanPendingRxFifos
{
public:
+ /// @brief Value type.
using value_type = uint8_t;
+ /// @brief Pointer to value type.
using reference = value_type &;
+ /// @brief Const pointer to value type.
using const_reference = const value_type &;
+ /// @brief Size of type.
using size_type = uint8_t;
/**
@@ -29,21 +33,42 @@ namespace sta
class const_iterator
{
public:
+ /// @brief Value type.
using value_type = CanPendingRxFifos::value_type;
+ /// @brief Const pointer to value type.
using reference = const_reference;
+ /// @brief Pointer to value type.
using pointer = const value_type *;
public:
+ /// @brief Default constructor.
const_iterator(const const_iterator & iter);
+ /// @brief Copies the contents of the given iterator.
+ /// @param iter Iterator to be copied.
const_iterator & operator=(const const_iterator & iter);
+ /**
+ * @brief Compare iterators by flags, index and end index.
+ */
bool operator==(const const_iterator & iter) const;
+ /**
+ * @brief Compare iterators by flags, index and end index.
+ */
bool operator!=(const const_iterator & iter) const;
+ /**
+ * @brief Increment iterator to next pending RX queue.
+ */
const_iterator & operator++();
+ /**
+ * @brief Increment iterator to next pending RX queue.
+ */
const_iterator operator++(int);
+ /**
+ * @brief Dereference iterator at index.
+ */
reference operator*() const;
private:
@@ -69,7 +94,13 @@ namespace sta
*/
CanPendingRxFifos(uint32_t rxFlags, uint8_t numFifos);
+ /**
+ * @brief Get iterator to first pending RX queue.
+ */
const_iterator begin() const;
+ /**
+ * @brief Get iterator to end of RX queues.
+ */
const_iterator end() const;
private:
diff --git a/include/sta/bus/device.hpp b/include/sta/bus/device.hpp
index c6dc208..1d9b8f1 100644
--- a/include/sta/bus/device.hpp
+++ b/include/sta/bus/device.hpp
@@ -13,7 +13,6 @@ namespace sta
public:
/**
* @param intf %SPI hardware interface
- * @param csPin Chip select pin
*/
Device(Interface * intf);
diff --git a/include/sta/bus/i2c/device.hpp b/include/sta/bus/i2c/device.hpp
index ec6fb7b..61f4c82 100644
--- a/include/sta/bus/i2c/device.hpp
+++ b/include/sta/bus/i2c/device.hpp
@@ -16,7 +16,9 @@ namespace sta
public:
/**
* @param intf %I2C hardware interface
- * @param csPin The peripheral's address.
+ * @param address Device address
+ * @param master Whether the mcu is a master or slave
+ * @param blocking Whether to use blocking or non-blocking transmits / receives
*/
I2CDevice(I2C * intf, int address, bool master=true, bool blocking=true);
diff --git a/include/sta/bus/i2c/i2c.hpp b/include/sta/bus/i2c/i2c.hpp
index 1af5571..e9896fc 100644
--- a/include/sta/bus/i2c/i2c.hpp
+++ b/include/sta/bus/i2c/i2c.hpp
@@ -19,6 +19,11 @@ namespace sta
class I2C : public Interface
{
public:
+ /**
+ * @brief Construct a new %I2C object.
+ *
+ * @param mutex Mutex object for managing shared access. Pass nullptr for no access control.
+ */
I2C(Mutex * mutex=nullptr);
/**
@@ -31,8 +36,11 @@ namespace sta
void setSettings(uint16_t address, bool master, bool blocking);
protected:
+ /// @brief The peripheral's address to communicate with.
uint16_t address_;
+ /// @brief Whether the mcu is a master or slave.
bool master_;
+ /// @brief Whether to use blocking or non-blocking transmits / receives.
bool blocking_;
};
} // namespace sta
diff --git a/include/sta/bus/interface.hpp b/include/sta/bus/interface.hpp
index e4a0cd8..6b0f357 100644
--- a/include/sta/bus/interface.hpp
+++ b/include/sta/bus/interface.hpp
@@ -14,6 +14,9 @@ namespace sta
class Interface
{
public:
+ /**
+ * @param mutex Mutex object for managing shared access. Pass nullptr for no access control.
+ */
Interface(Mutex * mutex);
/**
diff --git a/include/sta/bus/uart/settings.hpp b/include/sta/bus/uart/settings.hpp
index c3bbe2b..0ecec60 100644
--- a/include/sta/bus/uart/settings.hpp
+++ b/include/sta/bus/uart/settings.hpp
@@ -3,8 +3,18 @@
#include
+/**
+ * @defgroup sta_core_uart UART
+ * @ingroup sta_core
+ * @brief UART interface.
+ */
+
+
namespace sta
{
+ /**
+ * @brief UART modes of operation.
+ */
enum class UARTMode
{
RX,
@@ -13,10 +23,11 @@ namespace sta
};
/**
- * @brief %UART settings.
+ * @brief UART settings.
*/
struct UARTSettings
{
+ /// @brief Mode of operation.
UARTMode mode;
};
} // namespace sta
diff --git a/include/sta/bus/uart/uart.hpp b/include/sta/bus/uart/uart.hpp
index 0460c3e..0588aa3 100644
--- a/include/sta/bus/uart/uart.hpp
+++ b/include/sta/bus/uart/uart.hpp
@@ -6,6 +6,11 @@
namespace sta
{
+ /**
+ * @brief UART interface.
+ *
+ * @ingroup sta_core_uart
+ */
class UART : public Interface
{
public:
diff --git a/include/sta/debug/printing/printable.hpp b/include/sta/debug/printing/printable.hpp
index e1030fd..531522f 100644
--- a/include/sta/debug/printing/printable.hpp
+++ b/include/sta/debug/printing/printable.hpp
@@ -23,12 +23,17 @@ namespace sta
HEX /**< Hexadecimal */
};
+ /**
+ * @brief Printable UART interface.
+ *
+ * @ingroup sta_core
+ */
class Printable
{
public:
/**
* @brief fmt The string defining the desired format.
- * @breif ... The parameters for the formatted string.
+ * @brief ... The parameters for the formatted string.
*/
void printf(const char * fmt, ...);
diff --git a/include/sta/debug/printing/printable_printf.hpp b/include/sta/debug/printing/printable_printf.hpp
index 2ef9ed6..a0de3cd 100644
--- a/include/sta/debug/printing/printable_printf.hpp
+++ b/include/sta/debug/printing/printable_printf.hpp
@@ -5,6 +5,11 @@
namespace sta
{
+ /**
+ * @brief A formatted printable class that prints to stdout.
+ *
+ * @ingroup sta_core
+ */
class PrintablePrintf : public Printable
{
public:
diff --git a/include/sta/devices/arduino/gpio_pin.hpp b/include/sta/devices/arduino/gpio_pin.hpp
index dd03289..11feae1 100644
--- a/include/sta/devices/arduino/gpio_pin.hpp
+++ b/include/sta/devices/arduino/gpio_pin.hpp
@@ -15,11 +15,15 @@
namespace sta
{
+ /**
+ * @brief A wrapper class for Arduino GPIO pins.
+ *
+ * @ingroup sta_core_arduino
+ */
class ArduinoGpioPin : public GpioPin
{
public:
/**
- * @param port GPIO port
* @param pin Pin index
*/
ArduinoGpioPin(uint16_t pin);
diff --git a/include/sta/devices/arduino/hal.hpp b/include/sta/devices/arduino/hal.hpp
index 1693555..99b4d31 100644
--- a/include/sta/devices/arduino/hal.hpp
+++ b/include/sta/devices/arduino/hal.hpp
@@ -5,4 +5,10 @@
#include
#include
+/**
+ * @defgroup sta_core_arduino Arduino
+ * @ingroup sta_core_platforms
+ * @brief Modules implemented for the Arduino platform.
+ */
+
#endif // STA_CORE_ARDUINO_HAL_HPP
\ No newline at end of file
diff --git a/include/sta/devices/raspi/gpio_pin.hpp b/include/sta/devices/raspi/gpio_pin.hpp
index 22af920..dabd6e7 100644
--- a/include/sta/devices/raspi/gpio_pin.hpp
+++ b/include/sta/devices/raspi/gpio_pin.hpp
@@ -20,6 +20,11 @@ namespace sta
GPIO_INPUT
};
+ /**
+ * @brief A wrapper class for Raspi GPIO pins.
+ *
+ * @ingroup sta_core_raspi
+ */
class RaspiGpioPin : public GpioPin
{
public:
@@ -29,10 +34,21 @@ namespace sta
*/
RaspiGpioPin(uint8_t pin, GpioMode mode);
+ /**
+ * @brief Set the state of the GPIO pin.
+ *
+ * @param state The state of the GPIO pin. Either HIGH or LOW
+ */
void setState(GpioPinState state) override;
+ /**
+ * @brief Get the state of the GPIO pin.
+ *
+ * @return The state of the GPIO pin. Either HIGH or LOW
+ */
GpioPinState getState() override;
+ /// @brief Dummy GPIO pin
static RaspiGpioPin * DUMMY_GPIO;
private:
diff --git a/include/sta/devices/raspi/hal.hpp b/include/sta/devices/raspi/hal.hpp
index 112597c..c29e031 100644
--- a/include/sta/devices/raspi/hal.hpp
+++ b/include/sta/devices/raspi/hal.hpp
@@ -5,4 +5,10 @@
#include
#include
+/**
+ * @defgroup sta_core_raspi Raspi
+ * @ingroup sta_core_platforms
+ * @brief Modules implemented for the Raspi platform.
+ */
+
#endif //STA_CORE_RASPI_HAL_HPP
diff --git a/include/sta/devices/stm32/adc.hpp b/include/sta/devices/stm32/adc.hpp
index c04e2c6..62b2985 100644
--- a/include/sta/devices/stm32/adc.hpp
+++ b/include/sta/devices/stm32/adc.hpp
@@ -13,6 +13,11 @@
namespace sta
{
+ /**
+ * @brief A wrapper class for the STM32 ADC peripheral.
+ *
+ * @ingroup sta_core_stm32
+ */
class STM32ADC
{
public:
@@ -27,12 +32,17 @@ namespace sta
void start();
/**
- * @brief
+ * @brief Polls for the converted analog signal.
*
* @param timeout
*/
void poll(uint32_t timeout);
+ /**
+ * @brief Get the value of the converted analog signal.
+ *
+ * @return uint32_t
+ */
uint32_t getValue();
private:
ADC_HandleTypeDef * handle_;
diff --git a/include/sta/devices/stm32/bus/spi.hpp b/include/sta/devices/stm32/bus/spi.hpp
index 9ed1ee0..439e06a 100644
--- a/include/sta/devices/stm32/bus/spi.hpp
+++ b/include/sta/devices/stm32/bus/spi.hpp
@@ -49,6 +49,9 @@ namespace sta
class STM32SPI : public SPI
{
public:
+ /**
+ * @brief Handle and corresponding peripheral clock frequency.
+ */
struct Info
{
SPI_HandleTypeDef * handle; /**< STM32 HAL handle */
diff --git a/include/sta/devices/stm32/bus/uart.hpp b/include/sta/devices/stm32/bus/uart.hpp
index 5982c8b..e046f42 100644
--- a/include/sta/devices/stm32/bus/uart.hpp
+++ b/include/sta/devices/stm32/bus/uart.hpp
@@ -40,6 +40,8 @@ namespace sta
public:
/**
* @param handle STM32 HAL handle
+ * @param settings UART settings
+ * @param mutex Mutex for thread safety
*/
STM32UART(UART_HandleTypeDef * handle, UARTSettings & settings, Mutex * mutex);
diff --git a/include/sta/devices/stm32/can.hpp b/include/sta/devices/stm32/can.hpp
index 95a96c5..e935cf5 100644
--- a/include/sta/devices/stm32/can.hpp
+++ b/include/sta/devices/stm32/can.hpp
@@ -12,8 +12,6 @@
* @defgroup sta_core_stm32_can CAN
* @ingroup sta_core_stm32
* @brief STM32 CAN module.
- *
- * Check @ref stm32BuildConfig for configuration options.
*/
// Only enable module on STM32 platform w/ HAL CAN module enabled
diff --git a/include/sta/devices/stm32/mcu/STM32F407xx.hpp b/include/sta/devices/stm32/mcu/STM32F407xx.hpp
index 489efa7..48db885 100644
--- a/include/sta/devices/stm32/mcu/STM32F407xx.hpp
+++ b/include/sta/devices/stm32/mcu/STM32F407xx.hpp
@@ -1,6 +1,13 @@
#ifndef STA_CORE_STM32_MCU_STM32F407xx_HPP
#define STA_CORE_STM32_MCU_STM32F407xx_HPP
+/**
+ * @defgroup sta_core_stm32_mcu_stm32f407xx STM32F407xx
+ * @ingroup sta_core_stm32_mcu
+ *
+ * @brief MCU configuration for the STM32F407xx family.
+*/
+
#ifndef STM32F407xx
# error "MCU config incompatible"
#endif // STM32F407xx
@@ -16,76 +23,81 @@
# endif // STA_STM32_SWD_USART_IDX
#endif // STA_STM32_SWD_USART_IDX
+/**
+ * @ingroup sta_core_stm32_mcu_stm32f407xx
+ * @{
+ */
+
// Peripheral clock mappings
//
// TIM to PCLK
-#define STA_STM32_TIM_1_PCLK_IDX 2
-#define STA_STM32_TIM_2_PCLK_IDX 1
-#define STA_STM32_TIM_3_PCLK_IDX 1
-#define STA_STM32_TIM_4_PCLK_IDX 1
-#define STA_STM32_TIM_5_PCLK_IDX 1
-#define STA_STM32_TIM_6_PCLK_IDX 1
-#define STA_STM32_TIM_7_PCLK_IDX 1
-#define STA_STM32_TIM_8_PCLK_IDX 2
-#define STA_STM32_TIM_9_PCLK_IDX 2
-#define STA_STM32_TIM_10_PCLK_IDX 2
-#define STA_STM32_TIM_11_PCLK_IDX 2
-#define STA_STM32_TIM_12_PCLK_IDX 1
-#define STA_STM32_TIM_13_PCLK_IDX 1
-#define STA_STM32_TIM_14_PCLK_IDX 1
+#define STA_STM32_TIM_1_PCLK_IDX 2 /**< TIM1 to PCLK index */
+#define STA_STM32_TIM_2_PCLK_IDX 1 /**< TIM2 to PCLK index */
+#define STA_STM32_TIM_3_PCLK_IDX 1 /**< TIM3 to PCLK index */
+#define STA_STM32_TIM_4_PCLK_IDX 1 /**< TIM4 to PCLK index */
+#define STA_STM32_TIM_5_PCLK_IDX 1 /**< TIM5 to PCLK index */
+#define STA_STM32_TIM_6_PCLK_IDX 1 /**< TIM6 to PCLK index */
+#define STA_STM32_TIM_7_PCLK_IDX 1 /**< TIM7 to PCLK index */
+#define STA_STM32_TIM_8_PCLK_IDX 2 /**< TIM8 to PCLK index */
+#define STA_STM32_TIM_9_PCLK_IDX 2 /**< TIM9 to PCLK index */
+#define STA_STM32_TIM_10_PCLK_IDX 2 /**< TIM10 to PCLK index */
+#define STA_STM32_TIM_11_PCLK_IDX 2 /**< TIM11 to PCLK index */
+#define STA_STM32_TIM_12_PCLK_IDX 1 /**< TIM12 to PCLK index */
+#define STA_STM32_TIM_13_PCLK_IDX 1 /**< TIM13 to PCLK index */
+#define STA_STM32_TIM_14_PCLK_IDX 1 /**< TIM14 to PCLK index */
// SPI to PCLK
-#define STA_STM32_SPI_1_PCLK_IDX 2
-#define STA_STM32_SPI_2_PCLK_IDX 1
-#define STA_STM32_SPI_3_PCLK_IDX 1
+#define STA_STM32_SPI_1_PCLK_IDX 2 /**< SPI1 to PCLK index */
+#define STA_STM32_SPI_2_PCLK_IDX 1 /**< SPI2 to PCLK index */
+#define STA_STM32_SPI_3_PCLK_IDX 1 /**< SPI3 to PCLK index */
// I2C to PCLK
-#define STA_STM32_I2C_1_PCLK_IDX 1
-#define STA_STM32_I2C_2_PCLK_IDX 1
-#define STA_STM32_I2C_3_PCLK_IDX 1
+#define STA_STM32_I2C_1_PCLK_IDX 1 /**< I2C1 to PCLK index */
+#define STA_STM32_I2C_2_PCLK_IDX 1 /**< I2C2 to PCLK index */
+#define STA_STM32_I2C_3_PCLK_IDX 1 /**< I2C3 to PCLK index */
// USART to PCLK
-#define STA_STM32_USART_1_PCLK_IDX 2
-#define STA_STM32_USART_2_PCLK_IDX 1
-#define STA_STM32_USART_3_PCLK_IDX 1
-#define STA_STM32_USART_6_PCLK_IDX 2
-
+#define STA_STM32_USART_1_PCLK_IDX 2 /**< USART1 to PCLK index */
+#define STA_STM32_USART_2_PCLK_IDX 1 /**< USART2 to PCLK index */
+#define STA_STM32_USART_3_PCLK_IDX 1 /**< USART3 to PCLK index */
+#define STA_STM32_USART_6_PCLK_IDX 2 /**< USART6 to PCLK index */
// HAL handle mappings
//
-#define STA_STM32_htim1_PCLK_IDX STA_STM32_TIM_1_PCLK_IDX
-#define STA_STM32_htim2_PCLK_IDX STA_STM32_TIM_2_PCLK_IDX
-#define STA_STM32_htim3_PCLK_IDX STA_STM32_TIM_3_PCLK_IDX
-#define STA_STM32_htim4_PCLK_IDX STA_STM32_TIM_4_PCLK_IDX
-#define STA_STM32_htim5_PCLK_IDX STA_STM32_TIM_5_PCLK_IDX
-#define STA_STM32_htim6_PCLK_IDX STA_STM32_TIM_6_PCLK_IDX
-#define STA_STM32_htim7_PCLK_IDX STA_STM32_TIM_7_PCLK_IDX
-#define STA_STM32_htim8_PCLK_IDX STA_STM32_TIM_8_PCLK_IDX
-#define STA_STM32_htim9_PCLK_IDX STA_STM32_TIM_9_PCLK_IDX
-#define STA_STM32_htim10_PCLK_IDX STA_STM32_TIM_10_PCLK_IDX
-#define STA_STM32_htim11_PCLK_IDX STA_STM32_TIM_11_PCLK_IDX
-#define STA_STM32_htim12_PCLK_IDX STA_STM32_TIM_12_PCLK_IDX
-#define STA_STM32_htim13_PCLK_IDX STA_STM32_TIM_13_PCLK_IDX
+#define STA_STM32_htim1_PCLK_IDX STA_STM32_TIM_1_PCLK_IDX /**< Mapping for HAL TIM1 to PCLK index */
+#define STA_STM32_htim2_PCLK_IDX STA_STM32_TIM_2_PCLK_IDX /**< Mapping for HAL TIM2 to PCLK index */
+#define STA_STM32_htim3_PCLK_IDX STA_STM32_TIM_3_PCLK_IDX /**< Mapping for HAL TIM3 to PCLK index */
+#define STA_STM32_htim4_PCLK_IDX STA_STM32_TIM_4_PCLK_IDX /**< Mapping for HAL TIM4 to PCLK index */
+#define STA_STM32_htim5_PCLK_IDX STA_STM32_TIM_5_PCLK_IDX /**< Mapping for HAL TIM5 to PCLK index */
+#define STA_STM32_htim6_PCLK_IDX STA_STM32_TIM_6_PCLK_IDX /**< Mapping for HAL TIM6 to PCLK index */
+#define STA_STM32_htim7_PCLK_IDX STA_STM32_TIM_7_PCLK_IDX /**< Mapping for HAL TIM7 to PCLK index */
+#define STA_STM32_htim8_PCLK_IDX STA_STM32_TIM_8_PCLK_IDX /**< Mapping for HAL TIM8 to PCLK index */
+#define STA_STM32_htim9_PCLK_IDX STA_STM32_TIM_9_PCLK_IDX /**< Mapping for HAL TIM9 to PCLK index */
+#define STA_STM32_htim10_PCLK_IDX STA_STM32_TIM_10_PCLK_IDX /**< Mapping for HAL TIM10 to PCLK index */
+#define STA_STM32_htim11_PCLK_IDX STA_STM32_TIM_11_PCLK_IDX /**< Mapping for HAL TIM11 to PCLK index */
+#define STA_STM32_htim12_PCLK_IDX STA_STM32_TIM_12_PCLK_IDX /**< Mapping for HAL TIM12 to PCLK index */
+#define STA_STM32_htim13_PCLK_IDX STA_STM32_TIM_13_PCLK_IDX /**< Mapping for HAL TIM13 to PCLK index */
// SPI to PCLK
-#define STA_STM32_hspi1_PCLK_IDX STA_STM32_SPI_1_PCLK_IDX
-#define STA_STM32_hspi2_PCLK_IDX STA_STM32_SPI_2_PCLK_IDX
-#define STA_STM32_hspi3_PCLK_IDX STA_STM32_SPI_3_PCLK_IDX
-#define STA_STM32_hspi4_PCLK_IDX STA_STM32_SPI_4_PCLK_IDX
-#define STA_STM32_hspi5_PCLK_IDX STA_STM32_SPI_5_PCLK_IDX
+#define STA_STM32_hspi1_PCLK_IDX STA_STM32_SPI_1_PCLK_IDX /**< Mapping for HAL SPI1 to PCLK index */
+#define STA_STM32_hspi2_PCLK_IDX STA_STM32_SPI_2_PCLK_IDX /**< Mapping for HAL SPI2 to PCLK index */
+#define STA_STM32_hspi3_PCLK_IDX STA_STM32_SPI_3_PCLK_IDX /**< Mapping for HAL SPI3 to PCLK index */
+#define STA_STM32_hspi4_PCLK_IDX STA_STM32_SPI_4_PCLK_IDX /**< Mapping for HAL SPI4 to PCLK index */
+#define STA_STM32_hspi5_PCLK_IDX STA_STM32_SPI_5_PCLK_IDX /**< Mapping for HAL SPI5 to PCLK index */
// I2C to PCLK
-#define STA_STM32_hi2c1_PCLK_IDX STA_STM32_I2C_1_PCLK_IDX
-#define STA_STM32_hi2c2_PCLK_IDX STA_STM32_I2C_2_PCLK_IDX
-#define STA_STM32_h12c3_PCLK_IDX STA_STM32_I2C_3_PCLK_IDX
+#define STA_STM32_hi2c1_PCLK_IDX STA_STM32_I2C_1_PCLK_IDX /**< Mapping for HAL I2C1 to PCLK index */
+#define STA_STM32_hi2c2_PCLK_IDX STA_STM32_I2C_2_PCLK_IDX /**< Mapping for HAL I2C2 to PCLK index */
+#define STA_STM32_h12c3_PCLK_IDX STA_STM32_I2C_3_PCLK_IDX /**< Mapping for HAL I2C3 to PCLK index */
// USART to PCLK
-#define STA_STM32_husart1_PCLK_IDX STA_STM32_USART_1_PCLK_IDX
-#define STA_STM32_husart2_PCLK_IDX STA_STM32_USART_2_PCLK_IDX
-#define STA_STM32_husart3_PCLK_IDX STA_STM32_USART_3_PCLK_IDX
-#define STA_STM32_husart6_PCLK_IDX STA_STM32_USART_6_PCLK_IDX
+#define STA_STM32_husart1_PCLK_IDX STA_STM32_USART_1_PCLK_IDX /**< Mapping for HAL USART1 to PCLK index */
+#define STA_STM32_husart2_PCLK_IDX STA_STM32_USART_2_PCLK_IDX /**< Mapping for HAL USART2 to PCLK index */
+#define STA_STM32_husart3_PCLK_IDX STA_STM32_USART_3_PCLK_IDX /**< Mapping for HAL USART3 to PCLK index */
+#define STA_STM32_husart6_PCLK_IDX STA_STM32_USART_6_PCLK_IDX /**< Mapping for HAL USART6 to PCLK index */
+/** @} */
#endif // STA_CORE_STM32_MCU_STM32F407xx_HPP
\ No newline at end of file
diff --git a/include/sta/devices/stm32/mcu/STM32F411xE.hpp b/include/sta/devices/stm32/mcu/STM32F411xE.hpp
index 660a97d..887f00b 100644
--- a/include/sta/devices/stm32/mcu/STM32F411xE.hpp
+++ b/include/sta/devices/stm32/mcu/STM32F411xE.hpp
@@ -5,6 +5,11 @@
#ifndef STA_CORE_STM32_MCU_STM32F411xE_HPP
#define STA_CORE_STM32_MCU_STM32F411xE_HPP
+/**
+ * @defgroup sta_core_stm32_mcu_stm32f411xe STM32F411xE
+ * @ingroup sta_core_stm32_mcu
+ * @brief Configuration for STM32F411xE family.
+*/
#ifndef STM32F411xE
# error "MCU config incompatible"
@@ -13,67 +18,71 @@
#include
+/**
+ * @ingroup sta_core_stm32_mcu_stm32f411xe
+ * @{
+ */
// Peripheral clock mappings
//
// TIM to PCLK
-#define STA_STM32_TIM_1_PCLK_IDX 2
-#define STA_STM32_TIM_2_PCLK_IDX 1
-#define STA_STM32_TIM_3_PCLK_IDX 1
-#define STA_STM32_TIM_4_PCLK_IDX 1
-#define STA_STM32_TIM_5_PCLK_IDX 1
-#define STA_STM32_TIM_9_PCLK_IDX 2
-#define STA_STM32_TIM_10_PCLK_IDX 2
-#define STA_STM32_TIM_11_PCLK_IDX 2
+#define STA_STM32_TIM_1_PCLK_IDX 2 /**< TIM1 to PCLK index 2 */
+#define STA_STM32_TIM_2_PCLK_IDX 1 /**< TIM2 to PCLK index 1 */
+#define STA_STM32_TIM_3_PCLK_IDX 1 /**< TIM3 to PCLK index 1 */
+#define STA_STM32_TIM_4_PCLK_IDX 1 /**< TIM4 to PCLK index 1 */
+#define STA_STM32_TIM_5_PCLK_IDX 1 /**< TIM5 to PCLK index 1 */
+#define STA_STM32_TIM_9_PCLK_IDX 2 /**< TIM9 to PCLK index 2 */
+#define STA_STM32_TIM_10_PCLK_IDX 2 /**< TIM10 to PCLK index 2 */
+#define STA_STM32_TIM_11_PCLK_IDX 2 /**< TIM11 to PCLK index 2 */
// SPI to PCLK
-#define STA_STM32_SPI_1_PCLK_IDX 2
-#define STA_STM32_SPI_2_PCLK_IDX 1
-#define STA_STM32_SPI_3_PCLK_IDX 1
-#define STA_STM32_SPI_4_PCLK_IDX 2
-#define STA_STM32_SPI_5_PCLK_IDX 2
+#define STA_STM32_SPI_1_PCLK_IDX 2 /**< SPI1 to PCLK index 2 */
+#define STA_STM32_SPI_2_PCLK_IDX 1 /**< SPI2 to PCLK index 1 */
+#define STA_STM32_SPI_3_PCLK_IDX 1 /**< SPI3 to PCLK index 1 */
+#define STA_STM32_SPI_4_PCLK_IDX 2 /**< SPI4 to PCLK index 2 */
+#define STA_STM32_SPI_5_PCLK_IDX 2 /**< SPI5 to PCLK index 2 */
// I2C to PCLK
-#define STA_STM32_I2C_1_PCLK_IDX 1
-#define STA_STM32_I2C_2_PCLK_IDX 1
-#define STA_STM32_I2C_3_PCLK_IDX 1
+#define STA_STM32_I2C_1_PCLK_IDX 1 /**< I2C1 to PCLK index 1 */
+#define STA_STM32_I2C_2_PCLK_IDX 1 /**< I2C2 to PCLK index 1 */
+#define STA_STM32_I2C_3_PCLK_IDX 1 /**< I2C3 to PCLK index 1 */
// USART to PCLK
-#define STA_STM32_USART_1_PCLK_IDX 2
-#define STA_STM32_USART_2_PCLK_IDX 1
-#define STA_STM32_USART_6_PCLK_IDX 2
+#define STA_STM32_USART_1_PCLK_IDX 2 /**< USART1 to PCLK index 2 */
+#define STA_STM32_USART_2_PCLK_IDX 1 /**< USART2 to PCLK index 1 */
+#define STA_STM32_USART_6_PCLK_IDX 2 /**< USART6 to PCLK index 2 */
// HAL handle mappings
-//
// TIM to PCLK
-#define STA_STM32_htim1_PCLK_IDX STA_STM32_TIM_1_PCLK_IDX
-#define STA_STM32_htim2_PCLK_IDX STA_STM32_TIM_2_PCLK_IDX
-#define STA_STM32_htim3_PCLK_IDX STA_STM32_TIM_3_PCLK_IDX
-#define STA_STM32_htim4_PCLK_IDX STA_STM32_TIM_4_PCLK_IDX
-#define STA_STM32_htim5_PCLK_IDX STA_STM32_TIM_5_PCLK_IDX
-#define STA_STM32_htim9_PCLK_IDX STA_STM32_TIM_9_PCLK_IDX
-#define STA_STM32_htim10_PCLK_IDX STA_STM32_TIM_10_PCLK_IDX
-#define STA_STM32_htim11_PCLK_IDX STA_STM32_TIM_11_PCLK_IDX
+#define STA_STM32_htim1_PCLK_IDX STA_STM32_TIM_1_PCLK_IDX /**< HAL TIM1 to PCLK index */
+#define STA_STM32_htim2_PCLK_IDX STA_STM32_TIM_2_PCLK_IDX /**< HAL TIM2 to PCLK index */
+#define STA_STM32_htim3_PCLK_IDX STA_STM32_TIM_3_PCLK_IDX /**< HAL TIM3 to PCLK index */
+#define STA_STM32_htim4_PCLK_IDX STA_STM32_TIM_4_PCLK_IDX /**< HAL TIM4 to PCLK index */
+#define STA_STM32_htim5_PCLK_IDX STA_STM32_TIM_5_PCLK_IDX /**< HAL TIM5 to PCLK index */
+#define STA_STM32_htim9_PCLK_IDX STA_STM32_TIM_9_PCLK_IDX /**< HAL TIM9 to PCLK index */
+#define STA_STM32_htim10_PCLK_IDX STA_STM32_TIM_10_PCLK_IDX /**< HAL TIM10 to PCLK index */
+#define STA_STM32_htim11_PCLK_IDX STA_STM32_TIM_11_PCLK_IDX /**< HAL TIM11 to PCLK index */
// SPI to PCLK
-#define STA_STM32_hspi1_PCLK_IDX STA_STM32_SPI_1_PCLK_IDX
-#define STA_STM32_hspi2_PCLK_IDX STA_STM32_SPI_2_PCLK_IDX
-#define STA_STM32_hspi3_PCLK_IDX STA_STM32_SPI_3_PCLK_IDX
-#define STA_STM32_hspi4_PCLK_IDX STA_STM32_SPI_4_PCLK_IDX
-#define STA_STM32_hspi5_PCLK_IDX STA_STM32_SPI_5_PCLK_IDX
+#define STA_STM32_hspi1_PCLK_IDX STA_STM32_SPI_1_PCLK_IDX /**< HAL SPI1 to PCLK index */
+#define STA_STM32_hspi2_PCLK_IDX STA_STM32_SPI_2_PCLK_IDX /**< HAL SPI2 to PCLK index */
+#define STA_STM32_hspi3_PCLK_IDX STA_STM32_SPI_3_PCLK_IDX /**< HAL SPI3 to PCLK index */
+#define STA_STM32_hspi4_PCLK_IDX STA_STM32_SPI_4_PCLK_IDX /**< HAL SPI4 to PCLK index */
+#define STA_STM32_hspi5_PCLK_IDX STA_STM32_SPI_5_PCLK_IDX /**< HAL SPI5 to PCLK index */
// I2C to PCLK
-#define STA_STM32_hi2c1_PCLK_IDX STA_STM32_I2C_1_PCLK_IDX
-#define STA_STM32_hi2c2_PCLK_IDX STA_STM32_I2C_2_PCLK_IDX
-#define STA_STM32_h12c3_PCLK_IDX STA_STM32_I2C_3_PCLK_IDX
+#define STA_STM32_hi2c1_PCLK_IDX STA_STM32_I2C_1_PCLK_IDX /**< HAL I2C1 to PCLK index */
+#define STA_STM32_hi2c2_PCLK_IDX STA_STM32_I2C_2_PCLK_IDX /**< HAL I2C2 to PCLK index */
+#define STA_STM32_h12c3_PCLK_IDX STA_STM32_I2C_3_PCLK_IDX /**< HAL I2C3 to PCLK index */
// USART to PCLK
-#define STA_STM32_husart1_PCLK_IDX STA_STM32_USART_1_PCLK_IDX
-#define STA_STM32_husart2_PCLK_IDX STA_STM32_USART_2_PCLK_IDX
-#define STA_STM32_husart6_PCLK_IDX STA_STM32_USART_6_PCLK_IDX
+#define STA_STM32_husart1_PCLK_IDX STA_STM32_USART_1_PCLK_IDX /**< HAL USART1 to PCLK index */
+#define STA_STM32_husart2_PCLK_IDX STA_STM32_USART_2_PCLK_IDX /**< HAL USART2 to PCLK index */
+#define STA_STM32_husart6_PCLK_IDX STA_STM32_USART_6_PCLK_IDX /**< HAL USART6 to PCLK index */
+/** @} */
#endif // STA_CORE_STM32_MCU_STM32F411xE_HPP
diff --git a/include/sta/devices/stm32/mcu/template.hpp b/include/sta/devices/stm32/mcu/template.hpp
index 80c0eae..022529b 100644
--- a/include/sta/devices/stm32/mcu/template.hpp
+++ b/include/sta/devices/stm32/mcu/template.hpp
@@ -1,6 +1,11 @@
#ifndef STA_CORE_STM32_MCU_TEMPLATE_HPP
#define STA_CORE_STM32_MCU_TEMPLATE_HPP
+/**
+ * @defgroup sta_core_stm32_mcu STM32 MCUs
+ * @ingroup sta_core_stm32
+*/
+
#ifndef STM32_YOUR_MCU_xx
# error "MCU config incompatible"
#endif // STM32_YOUR_MCU_xx
diff --git a/include/sta/devices/template/custom_printable.hpp b/include/sta/devices/template/custom_printable.hpp
index 594ba31..46fef4f 100644
--- a/include/sta/devices/template/custom_printable.hpp
+++ b/include/sta/devices/template/custom_printable.hpp
@@ -9,6 +9,11 @@
namespace sta
{
+ /**
+ * @brief A custom printable class.
+ *
+ * @ingroup sta_core
+ */
class CustomPrintable : public Printable
{
public:
diff --git a/include/sta/devices/template/delay.hpp b/include/sta/devices/template/delay.hpp
index a87bd66..f5fe0bf 100644
--- a/include/sta/devices/template/delay.hpp
+++ b/include/sta/devices/template/delay.hpp
@@ -1,6 +1,6 @@
/**
* @file delay.hpp
- * @author (@.com)
+ * @author [your name] ([you]@[your_domain].com)
* @brief
* @version 0.1
* @date 2023-06-13
diff --git a/include/sta/event.hpp b/include/sta/event.hpp
index dce0b9e..56b05a9 100644
--- a/include/sta/event.hpp
+++ b/include/sta/event.hpp
@@ -19,13 +19,13 @@ namespace sta
/**
* @brief Set event flag.
*
- * @param Flag nr. to set
+ * @param flags nr. to set
*/
virtual void set(uint32_t flags) = 0;
/**
* @brief Clear event flag.
*
- * @param Flag nr. to clear
+ * @param flags nr. to clear
*/
virtual void clear(uint32_t flags) = 0;
/**
@@ -37,7 +37,8 @@ namespace sta
/**
* @brief Wait until event flag is set. Timeout default to forever.
*
- * @param Event flag nr. to wait for.
+ * @param flags flag nr. to wait for.
+ * @param timeout timeout in ms., default to forever.
*/
virtual uint32_t wait(uint32_t flags, uint32_t timeout = osWaitForever) = 0;
};
diff --git a/include/sta/timer.hpp b/include/sta/timer.hpp
index 0ea4a07..8b71cf4 100644
--- a/include/sta/timer.hpp
+++ b/include/sta/timer.hpp
@@ -19,7 +19,7 @@ namespace sta
/**
* @brief Start Timer.
*
- * @param time in milliseconds
+ * @param millis in milliseconds
*/
virtual void start(uint32_t millis) = 0;
/**
diff --git a/src/devices/template/delay.cpp b/src/devices/template/delay.cpp
index 3b19826..703c76f 100644
--- a/src/devices/template/delay.cpp
+++ b/src/devices/template/delay.cpp
@@ -1,6 +1,6 @@
/**
* @file delay.cpp
- * @author (@.com)
+ * @author [your name] ([you]@[your_domain].com)
* @brief
* @version 0.1
* @date 2023-06-13