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: http://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: http://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 = NO
+
+# 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 enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# 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.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = 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 pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
+# higher quality PDF documentation.
+# 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 = NO
+
+# 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
+# http://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
+
+#---------------------------------------------------------------------------
+# 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 config
+# 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 config 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 = NO
+
+# 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 = NO
+
+#---------------------------------------------------------------------------
+# 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
+
+#---------------------------------------------------------------------------
+# 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.sf.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: NO.
+
+HAVE_DOT = NO
+
+# 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 = NO
+
+# 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 HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# 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 = NO
+
+# 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, jpg, gif, 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 = 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
+# 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 dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP = YES
diff --git a/clicks/4x4rgb2/doc/image/click_icon.png b/clicks/4x4rgb2/doc/image/click_icon.png
new file mode 100644
index 0000000000..1588817788
Binary files /dev/null and b/clicks/4x4rgb2/doc/image/click_icon.png differ
diff --git a/clicks/4x4rgb2/doc/package/manifest.json b/clicks/4x4rgb2/doc/package/manifest.json
new file mode 100644
index 0000000000..1556e7ab7f
--- /dev/null
+++ b/clicks/4x4rgb2/doc/package/manifest.json
@@ -0,0 +1,36 @@
+{
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Display & LED > LED matrix",
+ "changelog": "Resources/CHANGELOG.md",
+ "contains": [
+ "libraries",
+ "hex_files",
+ "examples",
+ "source_files"
+ ],
+ "dependency_list": [],
+ "details": "Resources/DETAILS.md",
+ "display_name": "4x4 RGB 2 click",
+ "example_list": [
+ {
+ "project_path": "Examples/example"
+ }
+ ],
+ "help": "Help/doc",
+ "icon": "Resources/click_icon.png",
+ "license": {
+ "file_path": "",
+ "id": "46"
+ },
+ "name": "mikroe.click.c4x4rgb2",
+ "product_link": "https://www.mikroe.com/4x4-rgb-2-click",
+ "short_description": "4x4 RGB 2 Click is a compact add-on board that contains a matrix of 16 intelligent RGB LEDs, forming a 4x4 display screen. This board features 16 IN-PC55TBTRGB, 5x5mm RGB LEDs with an integrated IC from Inolux. The LEDs feature an 8-bit color control in 256 steps (256-level greyscale) and a 5-bit brightness control in 32 steps. The intelligent LEDs are cascaded (daisy-chained); thus, every one of them can communicate with the host MCU using the same data lines.",
+ "supported_compiler": "mikroC AI|GCC",
+ "type": "Library",
+ "_type":"mikroSDK Library",
+ "version": "2.1.0.1",
+ "cmake": true,
+ "alias": "Click.4x4RGB2",
+ "subdir_name": "lib_c4x4rgb2"
+}
+
diff --git a/clicks/4x4rgb2/example/CMakeLists.txt b/clicks/4x4rgb2/example/CMakeLists.txt
new file mode 100644
index 0000000000..3ccfcd636b
--- /dev/null
+++ b/clicks/4x4rgb2/example/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_c4x4rgb2 LANGUAGES MikroC)
+else()
+ project(example_c4x4rgb2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_c4x4rgb2
+ main.c
+
+)
+
+
+############################ example_c4x4rgb2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_c4x4rgb2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_c4x4rgb2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_c4x4rgb2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_c4x4rgb2)
+target_link_libraries(example_c4x4rgb2 PUBLIC Click.4x4RGB2)
+############################ example_c4x4rgb2 GENERATED CODE END ###########################
+
diff --git a/clicks/4x4rgb2/example/main.c b/clicks/4x4rgb2/example/main.c
new file mode 100644
index 0000000000..e29417c0dc
--- /dev/null
+++ b/clicks/4x4rgb2/example/main.c
@@ -0,0 +1,118 @@
+/*!
+ * @file main.c
+ * @brief 4x4 RGB 2 Click example
+ *
+ * # Description
+ * This example demonstrates the use of 4x4 RGB 2 click board by setting all 16 LEDs
+ * to different colors and changing the LEDs color every 500 milliseconds.
+ *
+ * The demo application is composed of two sections :
+ *
+ * ## Application Init
+ * Initializes the driver and performs the click default configuration which sets
+ * the LEDs brightness to level 1 and the color to black (all LEDs off).
+ *
+ * ## Application Task
+ * Sets all 16 LEDs to a different colors and changes their color every 500 milliseconds.
+ * All data is displayed on the USB UART where you can track their changes.
+ *
+ * @author Stefan Filipovic
+ *
+ */
+
+#include "board.h"
+#include "log.h"
+#include "c4x4rgb2.h"
+
+static c4x4rgb2_t c4x4rgb2;
+static log_t logger;
+
+static c4x4rgb2_color_t color[ C4X4RGB2_NUM_COLORS ] =
+{
+ { C4X4RGB2_COLOR_BLACK, "BLACK" },
+ { C4X4RGB2_COLOR_WHITE, "WHITE" },
+ { C4X4RGB2_COLOR_RED, "RED" },
+ { C4X4RGB2_COLOR_LIME, "LIME" },
+ { C4X4RGB2_COLOR_BLUE, "BLUE" },
+ { C4X4RGB2_COLOR_YELLOW, "YELLOW" },
+ { C4X4RGB2_COLOR_CYAN, "CYAN" },
+ { C4X4RGB2_COLOR_MAGENTA, "MAGENTA" },
+ { C4X4RGB2_COLOR_SILVER, "SILVER" },
+ { C4X4RGB2_COLOR_GRAY, "GRAY" },
+ { C4X4RGB2_COLOR_MAROON, "MAROON" },
+ { C4X4RGB2_COLOR_OLIVE, "OLIVE" },
+ { C4X4RGB2_COLOR_GREEN, "GREEN" },
+ { C4X4RGB2_COLOR_PURPLE, "PURPLE" },
+ { C4X4RGB2_COLOR_TEAL, "TEAL" },
+ { C4X4RGB2_COLOR_NAVY, "NAVY" }
+};
+
+void application_init ( void )
+{
+ log_cfg_t log_cfg; /**< Logger config object. */
+ c4x4rgb2_cfg_t c4x4rgb2_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ c4x4rgb2_cfg_setup( &c4x4rgb2_cfg );
+ C4X4RGB2_MAP_MIKROBUS( c4x4rgb2_cfg, MIKROBUS_1 );
+ if ( SPI_MASTER_ERROR == c4x4rgb2_init( &c4x4rgb2, &c4x4rgb2_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
+ if ( C4X4RGB2_ERROR == c4x4rgb2_default_cfg ( &c4x4rgb2 ) )
+ {
+ log_error( &logger, " Default configuration." );
+ for ( ; ; );
+ }
+
+ log_info( &logger, " Application Task " );
+}
+
+void application_task ( void )
+{
+ static uint8_t color_num = 0;
+ for ( uint8_t led_cnt = C4X4RGB2_LED_0; led_cnt <= C4X4RGB2_LED_15; led_cnt++ )
+ {
+ c4x4rgb2_set_led_color ( &c4x4rgb2, led_cnt,
+ color[ ( led_cnt + color_num ) % C4X4RGB2_NUM_COLORS ].rgb );
+ log_printf( &logger, " LED %u Color: %s - %.6LX\r\n", ( uint16_t ) led_cnt,
+ color[ ( led_cnt + color_num ) % C4X4RGB2_NUM_COLORS ].name,
+ color[ ( led_cnt + color_num ) % C4X4RGB2_NUM_COLORS ].rgb );
+ }
+ if ( C4X4RGB2_OK == c4x4rgb2_write_led_matrix ( &c4x4rgb2 ) )
+ {
+ log_printf( &logger, " Write LED Matrix\r\n\n" );
+ Delay_ms ( 500 );
+ }
+ if ( ++color_num >= C4X4RGB2_NUM_COLORS )
+ {
+ color_num = 0;
+ }
+}
+
+void main ( void )
+{
+ application_init( );
+
+ for ( ; ; )
+ {
+ application_task( );
+ }
+}
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/4x4rgb2/example/manifest.exm b/clicks/4x4rgb2/example/manifest.exm
new file mode 100644
index 0000000000..cb7d3be3fb
--- /dev/null
+++ b/clicks/4x4rgb2/example/manifest.exm
@@ -0,0 +1,8 @@
+{
+ "name": "4x4 RGB 2 Click",
+ "description": "4x4 RGB 2 Click is a compact add-on board that contains a matrix of 16 intelligent RGB LEDs, forming a 4x4 display screen. This board features 16 IN-PC55TBTRGB, 5x5mm RGB LEDs with an integrated IC from Inolux. The LEDs feature an 8-bit color control in 256 steps (256-level greyscale) and a 5-bit brightness control in 32 steps. The intelligent LEDs are cascaded (daisy-chained); thus, every one of them can communicate with the host MCU using the same data lines.",
+ "image" : "../../Resources/click_icon.png",
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
+ "hw" : ["click","IN-PC55TBTRGB"],
+ "category" : ["Click Boards > Display & LED > LED matrix"]
+}
diff --git a/clicks/4x4rgb2/lib_c4x4rgb2/CMakeLists.txt b/clicks/4x4rgb2/lib_c4x4rgb2/CMakeLists.txt
new file mode 100644
index 0000000000..4d608caa63
--- /dev/null
+++ b/clicks/4x4rgb2/lib_c4x4rgb2/CMakeLists.txt
@@ -0,0 +1,35 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_c4x4rgb2 LANGUAGES MikroC)
+else()
+ project(lib_c4x4rgb2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_c4x4rgb2 STATIC
+ src/c4x4rgb2.c
+ include/c4x4rgb2.h
+)
+add_library(Click.4x4RGB2 ALIAS lib_c4x4rgb2)
+
+if (${MCU_NAME} MATCHES "(^PIC18F(.+)[KQ]4[23]$)|(^PIC32(.+)$)")
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_1")
+else()
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_2")
+endif()
+
+target_compile_definitions(lib_c4x4rgb2 PUBLIC ${sample_mode_reg_case})
+
+
+target_include_directories(lib_c4x4rgb2 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_c4x4rgb2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_c4x4rgb2 PUBLIC MikroSDK.Driver)
+
diff --git a/clicks/4x4rgb2/lib_c4x4rgb2/include/Click.4x4RGB2 b/clicks/4x4rgb2/lib_c4x4rgb2/include/Click.4x4RGB2
new file mode 100644
index 0000000000..d94e456f3b
--- /dev/null
+++ b/clicks/4x4rgb2/lib_c4x4rgb2/include/Click.4x4RGB2
@@ -0,0 +1 @@
+#include "c4x4rgb2.h"
diff --git a/clicks/4x4rgb2/lib_c4x4rgb2/include/c4x4rgb2.h b/clicks/4x4rgb2/lib_c4x4rgb2/include/c4x4rgb2.h
new file mode 100644
index 0000000000..8cb6a05354
--- /dev/null
+++ b/clicks/4x4rgb2/lib_c4x4rgb2/include/c4x4rgb2.h
@@ -0,0 +1,356 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file c4x4rgb2.h
+ * @brief This file contains API for 4x4 RGB 2 Click Driver.
+ */
+
+#ifndef C4X4RGB2_H
+#define C4X4RGB2_H
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_spi_master.h"
+#include "spi_specifics.h"
+
+/*!
+ * @addtogroup c4x4rgb2 4x4 RGB 2 Click Driver
+ * @brief API for configuring and manipulating 4x4 RGB 2 Click driver.
+ * @{
+ */
+
+/**
+ * @defgroup c4x4rgb2_set 4x4 RGB 2 Settings
+ * @brief Settings of 4x4 RGB 2 Click driver.
+ */
+
+/**
+ * @addtogroup c4x4rgb2_set
+ * @{
+ */
+
+/**
+ * @brief 4x4 RGB 2 LED frame setting.
+ * @details Specified LED frame setting of 4x4 RGB 2 Click driver.
+ */
+#define C4X4RGB2_FRAME_START 0x00
+#define C4X4RGB2_FRAME_END 0xFF
+
+/**
+ * @brief 4x4 RGB 2 LED selection values.
+ * @details Specified LED selection values of 4x4 RGB 2 Click driver.
+ */
+#define C4X4RGB2_LED_0 0
+#define C4X4RGB2_LED_1 1
+#define C4X4RGB2_LED_2 2
+#define C4X4RGB2_LED_3 3
+#define C4X4RGB2_LED_4 4
+#define C4X4RGB2_LED_5 5
+#define C4X4RGB2_LED_6 6
+#define C4X4RGB2_LED_7 7
+#define C4X4RGB2_LED_8 8
+#define C4X4RGB2_LED_9 9
+#define C4X4RGB2_LED_10 10
+#define C4X4RGB2_LED_11 11
+#define C4X4RGB2_LED_12 12
+#define C4X4RGB2_LED_13 13
+#define C4X4RGB2_LED_14 14
+#define C4X4RGB2_LED_15 15
+#define C4X4RGB2_NUM_LEDS 16
+
+/**
+ * @brief 4x4 RGB 2 LED brightness setting.
+ * @details Specified LED brightness setting of 4x4 RGB 2 Click driver.
+ */
+#define C4X4RGB2_LED_BRIGHTNESS_MIN 0
+#define C4X4RGB2_LED_BRIGHTNESS_DEFAULT 1
+#define C4X4RGB2_LED_BRIGHTNESS_MAX 31
+#define C4X4RGB2_LED_BRIGHTNESS_MASK 0xE0
+
+/**
+ * @brief 4x4 RGB 2 24-bit RGB color codes.
+ * @details Specified 24-bit RGB color codes of 4x4 RGB 2 Click driver.
+ */
+#define C4X4RGB2_COLOR_BLACK 0x000000ul
+#define C4X4RGB2_COLOR_WHITE 0xFFFFFFul
+#define C4X4RGB2_COLOR_RED 0xFF0000ul
+#define C4X4RGB2_COLOR_LIME 0x00FF00ul
+#define C4X4RGB2_COLOR_BLUE 0x0000FFul
+#define C4X4RGB2_COLOR_YELLOW 0xFFFF00ul
+#define C4X4RGB2_COLOR_CYAN 0x00FFFFul
+#define C4X4RGB2_COLOR_MAGENTA 0xFF00FFul
+#define C4X4RGB2_COLOR_SILVER 0xC0C0C0ul
+#define C4X4RGB2_COLOR_GRAY 0x808080ul
+#define C4X4RGB2_COLOR_MAROON 0x800000ul
+#define C4X4RGB2_COLOR_OLIVE 0x808000ul
+#define C4X4RGB2_COLOR_GREEN 0x008000ul
+#define C4X4RGB2_COLOR_PURPLE 0x800080ul
+#define C4X4RGB2_COLOR_TEAL 0x008080ul
+#define C4X4RGB2_COLOR_NAVY 0x000080ul
+#define C4X4RGB2_NUM_COLORS 16
+#define C4X4RGB2_SIZE_COLOR_NAME 32
+
+/**
+ * @brief Data sample selection.
+ * @details This macro sets data samples for SPI modules.
+ * @note Available only on Microchip PIC family devices.
+ * This macro will set data sampling for all SPI modules on MCU.
+ * Can be overwritten with @b c4x4rgb2_init which will set
+ * @b SET_SPI_DATA_SAMPLE_MIDDLE by default on the mapped mikrobus.
+ */
+#define C4X4RGB2_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
+#define C4X4RGB2_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
+
+/*! @} */ // c4x4rgb2_set
+
+/**
+ * @defgroup c4x4rgb2_map 4x4 RGB 2 MikroBUS Map
+ * @brief MikroBUS pin mapping of 4x4 RGB 2 Click driver.
+ */
+
+/**
+ * @addtogroup c4x4rgb2_map
+ * @{
+ */
+
+/**
+ * @brief MikroBUS pin mapping.
+ * @details Mapping pins of 4x4 RGB 2 Click to the selected MikroBUS.
+ */
+#define C4X4RGB2_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
+ cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
+ cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK );
+
+/*! @} */ // c4x4rgb2_map
+/*! @} */ // c4x4rgb2
+
+/**
+ * @brief 4x4 RGB 2 Click RGB color object.
+ * @details RGB color object definition of 4x4 RGB 2 Click driver.
+ */
+typedef struct
+{
+ uint32_t rgb; /**< 24-bit RGB level: 0xRRGGBB. */
+ uint8_t name[ C4X4RGB2_SIZE_COLOR_NAME ]; /**< Color name */
+
+} c4x4rgb2_color_t;
+
+/**
+ * @brief 4x4 RGB 2 Click led object.
+ * @details LED object definition of 4x4 RGB 2 Click driver.
+ */
+typedef struct
+{
+ uint8_t brightness; /**< Brightness level: 0 to 31. */
+ uint8_t red; /**< Red level: 0 to 255. */
+ uint8_t green; /**< Green level: 0 to 255. */
+ uint8_t blue; /**< Blue level: 0 to 255. */
+
+} c4x4rgb2_led_t;
+
+/**
+ * @brief 4x4 RGB 2 Click context object.
+ * @details Context object definition of 4x4 RGB 2 Click driver.
+ */
+typedef struct
+{
+ // Modules
+ spi_master_t spi; /**< SPI driver object. */
+
+ c4x4rgb2_led_t led_matrix[ C4X4RGB2_NUM_LEDS ]; /**< 4x4 LED matrix. */
+
+} c4x4rgb2_t;
+
+/**
+ * @brief 4x4 RGB 2 Click configuration object.
+ * @details Configuration object definition of 4x4 RGB 2 Click driver.
+ */
+typedef struct
+{
+ // Communication gpio pins
+ pin_name_t miso; /**< Master input - slave output pin descriptor for SPI driver. */
+ pin_name_t mosi; /**< Master output - slave input pin descriptor for SPI driver. */
+ pin_name_t sck; /**< Clock pin descriptor for SPI driver. */
+
+ // static variable
+ uint32_t spi_speed; /**< SPI serial speed. */
+ spi_master_mode_t spi_mode; /**< SPI master mode. */
+
+} c4x4rgb2_cfg_t;
+
+/**
+ * @brief 4x4 RGB 2 Click return value data.
+ * @details Predefined enum values for driver return values.
+ */
+typedef enum
+{
+ C4X4RGB2_OK = 0,
+ C4X4RGB2_ERROR = -1
+
+} c4x4rgb2_return_value_t;
+
+/*!
+ * @addtogroup c4x4rgb2 4x4 RGB 2 Click Driver
+ * @brief API for configuring and manipulating 4x4 RGB 2 Click driver.
+ * @{
+ */
+
+/**
+ * @brief 4x4 RGB 2 configuration object setup function.
+ * @details This function initializes click configuration structure to initial
+ * values.
+ * @param[out] cfg : Click configuration structure.
+ * See #c4x4rgb2_cfg_t object definition for detailed explanation.
+ * @return Nothing.
+ * @note The all used pins will be set to unconnected state.
+ */
+void c4x4rgb2_cfg_setup ( c4x4rgb2_cfg_t *cfg );
+
+/**
+ * @brief 4x4 RGB 2 initialization function.
+ * @details This function initializes all necessary pins and peripherals used
+ * for this click board.
+ * @param[out] ctx : Click context object.
+ * See #c4x4rgb2_t object definition for detailed explanation.
+ * @param[in] cfg : Click configuration structure.
+ * See #c4x4rgb2_cfg_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t c4x4rgb2_init ( c4x4rgb2_t *ctx, c4x4rgb2_cfg_t *cfg );
+
+/**
+ * @brief 4x4 RGB 2 default configuration function.
+ * @details This function executes a default configuration of 4x4 RGB 2
+ * click board.
+ * @param[in] ctx : Click context object.
+ * See #c4x4rgb2_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note This function can consist any necessary configuration or setting to put
+ * device into operating mode.
+ */
+err_t c4x4rgb2_default_cfg ( c4x4rgb2_t *ctx );
+
+/**
+ * @brief 4x4 RGB 2 write leds function.
+ * @details This function writes data to a desired number of leds starting from
+ * the LED 0 by using SPI serial interface.
+ * @param[in] ctx : Click context object.
+ * See #c4x4rgb2_t object definition for detailed explanation.
+ * @param[in] leds : LEDs data to be written.
+ * See #c4x4rgb2_led_t object definition for detailed explanation.
+ * @param[in] num_leds : Number of LEDs to be written (up to 16 leds).
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t c4x4rgb2_write_leds ( c4x4rgb2_t *ctx, c4x4rgb2_led_t *leds, uint8_t num_leds );
+
+/**
+ * @brief 4x4 RGB 2 write led matrix function.
+ * @details This function writes the led matrix data from the click context object.
+ * @param[in] ctx : Click context object.
+ * See #c4x4rgb2_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t c4x4rgb2_write_led_matrix ( c4x4rgb2_t *ctx );
+
+/**
+ * @brief 4x4 RGB 2 set led brightness function.
+ * @details This function sets the brightness of the selected led in the led matrix.
+ * @param[in] ctx : Click context object.
+ * See #c4x4rgb2_t object definition for detailed explanation.
+ * @param[in] led_num : LED number (0 to 15).
+ * @param[in] brightness : Brightness level (0 to 31).
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note This function doesn't write the led matrix to the click board. In order for this change
+ * to take effect you will need to call the c4x4rgb2_write_led_matrix function afterward.
+ */
+void c4x4rgb2_set_led_brightness ( c4x4rgb2_t *ctx, uint8_t led_num, uint8_t brightness );
+
+/**
+ * @brief 4x4 RGB 2 set all leds brightness function.
+ * @details This function sets the brightness of all leds in the led matrix to the selected level.
+ * @param[in] ctx : Click context object.
+ * See #c4x4rgb2_t object definition for detailed explanation.
+ * @param[in] brightness : Brightness level (0 to 31).
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note This function doesn't write the led matrix to the click board. In order for this change
+ * to take effect you will need to call the c4x4rgb2_write_led_matrix function afterward.
+ */
+void c4x4rgb2_set_all_leds_brightness ( c4x4rgb2_t *ctx, uint8_t brightness );
+
+/**
+ * @brief 4x4 RGB 2 set led color function.
+ * @details This function sets the color of the selected led in the led matrix.
+ * @param[in] ctx : Click context object.
+ * See #c4x4rgb2_t object definition for detailed explanation.
+ * @param[in] led_num : LED number (0 to 15).
+ * @param[in] rgb : 24-bit RGB color (in a format RRGGBB).
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note This function doesn't write the led matrix to the click board. In order for this change
+ * to take effect you will need to call the c4x4rgb2_write_led_matrix function afterward.
+ */
+void c4x4rgb2_set_led_color ( c4x4rgb2_t *ctx, uint8_t led_num, uint32_t rgb );
+
+/**
+ * @brief 4x4 RGB 2 set all leds color function.
+ * @details This function sets the color of all leds in the led matrix to the selected level.
+ * @param[in] ctx : Click context object.
+ * See #c4x4rgb2_t object definition for detailed explanation.
+ * @param[in] rgb : 24-bit RGB color (in a format RRGGBB).
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note This function doesn't write the led matrix to the click board. In order for this change
+ * to take effect you will need to call the c4x4rgb2_write_led_matrix function afterward.
+ */
+void c4x4rgb2_set_all_leds_color ( c4x4rgb2_t *ctx, uint32_t rgb );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // C4X4RGB2_H
+
+/*! @} */ // c4x4rgb2
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/gyro6/lib/include/spi_specifics.h b/clicks/4x4rgb2/lib_c4x4rgb2/include/spi_specifics.h
similarity index 100%
rename from clicks/gyro6/lib/include/spi_specifics.h
rename to clicks/4x4rgb2/lib_c4x4rgb2/include/spi_specifics.h
diff --git a/clicks/4x4rgb2/lib_c4x4rgb2/src/c4x4rgb2.c b/clicks/4x4rgb2/lib_c4x4rgb2/src/c4x4rgb2.c
new file mode 100644
index 0000000000..8ec91025b9
--- /dev/null
+++ b/clicks/4x4rgb2/lib_c4x4rgb2/src/c4x4rgb2.c
@@ -0,0 +1,140 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file c4x4rgb2.c
+ * @brief 4x4 RGB 2 Click Driver.
+ */
+
+#include "c4x4rgb2.h"
+
+/**
+ * @brief Dummy data.
+ * @details Definition of dummy data.
+ */
+#define DUMMY 0x00
+
+void c4x4rgb2_cfg_setup ( c4x4rgb2_cfg_t *cfg )
+{
+ cfg->sck = HAL_PIN_NC;
+ cfg->miso = HAL_PIN_NC;
+ cfg->mosi = HAL_PIN_NC;
+
+ cfg->spi_speed = 100000;
+ cfg->spi_mode = SPI_MASTER_MODE_0;
+}
+
+err_t c4x4rgb2_init ( c4x4rgb2_t *ctx, c4x4rgb2_cfg_t *cfg )
+{
+ spi_master_config_t spi_cfg;
+
+ spi_master_configure_default( &spi_cfg );
+
+ spi_cfg.sck = cfg->sck;
+ spi_cfg.miso = cfg->miso;
+ spi_cfg.mosi = cfg->mosi;
+
+ if ( SPI_MASTER_ERROR == spi_master_open( &ctx->spi, &spi_cfg ) )
+ {
+ return SPI_MASTER_ERROR;
+ }
+
+ if ( SPI_MASTER_ERROR == spi_master_set_default_write_data( &ctx->spi, DUMMY ) )
+ {
+ return SPI_MASTER_ERROR;
+ }
+
+ if ( SPI_MASTER_ERROR == spi_master_set_mode( &ctx->spi, cfg->spi_mode ) )
+ {
+ return SPI_MASTER_ERROR;
+ }
+
+ if ( SPI_MASTER_ERROR == spi_master_set_speed( &ctx->spi, cfg->spi_speed ) )
+ {
+ return SPI_MASTER_ERROR;
+ }
+
+ return SPI_MASTER_SUCCESS;
+}
+
+err_t c4x4rgb2_default_cfg ( c4x4rgb2_t *ctx )
+{
+ err_t error_flag = C4X4RGB2_OK;
+ c4x4rgb2_set_all_leds_brightness ( ctx, C4X4RGB2_LED_BRIGHTNESS_DEFAULT );
+ c4x4rgb2_set_all_leds_color ( ctx, C4X4RGB2_COLOR_BLACK );
+ error_flag |= c4x4rgb2_write_led_matrix ( ctx );
+ return error_flag;
+}
+
+err_t c4x4rgb2_write_leds ( c4x4rgb2_t *ctx, c4x4rgb2_led_t *leds, uint8_t num_leds )
+{
+ if ( num_leds > C4X4RGB2_NUM_LEDS )
+ {
+ return C4X4RGB2_ERROR;
+ }
+ uint8_t data_buf[ 72 ] = { 0 };
+ memset ( &data_buf[ 0 ], C4X4RGB2_FRAME_START, 4 );
+ for ( uint8_t led_cnt = C4X4RGB2_LED_0; led_cnt < num_leds; led_cnt++ )
+ {
+ data_buf[ 4 + led_cnt * 4 ] = C4X4RGB2_LED_BRIGHTNESS_MASK | leds[ led_cnt ].brightness;
+ data_buf[ 5 + led_cnt * 4 ] = leds[ led_cnt ].blue;
+ data_buf[ 6 + led_cnt * 4 ] = leds[ led_cnt ].green;
+ data_buf[ 7 + led_cnt * 4 ] = leds[ led_cnt ].red;
+ }
+ memset ( &data_buf[ 4 + num_leds * 4 ], C4X4RGB2_FRAME_END, 4 );
+ return spi_master_write( &ctx->spi, data_buf, 8 + num_leds * 4 );
+}
+
+err_t c4x4rgb2_write_led_matrix ( c4x4rgb2_t *ctx )
+{
+ return c4x4rgb2_write_leds ( ctx, ctx->led_matrix, C4X4RGB2_NUM_LEDS );
+}
+
+void c4x4rgb2_set_led_brightness ( c4x4rgb2_t *ctx, uint8_t led_num, uint8_t brightness )
+{
+ ctx->led_matrix[ led_num % C4X4RGB2_NUM_LEDS ].brightness = brightness % ( C4X4RGB2_LED_BRIGHTNESS_MAX + 1 );
+}
+
+void c4x4rgb2_set_all_leds_brightness ( c4x4rgb2_t *ctx, uint8_t brightness )
+{
+ for ( uint8_t led_cnt = C4X4RGB2_LED_0; led_cnt <= C4X4RGB2_LED_15; led_cnt++ )
+ {
+ c4x4rgb2_set_led_brightness ( ctx, led_cnt, brightness );
+ }
+}
+
+void c4x4rgb2_set_led_color ( c4x4rgb2_t *ctx, uint8_t led_num, uint32_t rgb )
+{
+ ctx->led_matrix[ led_num % C4X4RGB2_NUM_LEDS ].red = ( uint8_t ) ( ( rgb >> 16 ) & 0xFF );
+ ctx->led_matrix[ led_num % C4X4RGB2_NUM_LEDS ].green = ( uint8_t ) ( ( rgb >> 8 ) & 0xFF );
+ ctx->led_matrix[ led_num % C4X4RGB2_NUM_LEDS ].blue = ( uint8_t ) ( rgb & 0xFF );
+}
+
+void c4x4rgb2_set_all_leds_color ( c4x4rgb2_t *ctx, uint32_t rgb )
+{
+ for ( uint8_t led_cnt = C4X4RGB2_LED_0; led_cnt <= C4X4RGB2_LED_15; led_cnt++ )
+ {
+ c4x4rgb2_set_led_color ( ctx, led_cnt, rgb );
+ }
+}
+
+// ------------------------------------------------------------------------- END
diff --git a/clicks/g2c/CHANGELOG.md b/clicks/g2c/CHANGELOG.md
index c2034d7578..59cd5cf490 100644
--- a/clicks/g2c/CHANGELOG.md
+++ b/clicks/g2c/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.1.0.15
+### Version 2.1.0.0
- Initial release
diff --git a/clicks/g2c/CMakeLists.txt b/clicks/g2c/CMakeLists.txt
index 8a4755be05..7e98036f58 100644
--- a/clicks/g2c/CMakeLists.txt
+++ b/clicks/g2c/CMakeLists.txt
@@ -11,7 +11,7 @@ endif()
add_executable(example_g2c
example/main.c
-
+
)
@@ -22,6 +22,9 @@ find_package(MikroSDK.Board REQUIRED)
target_link_libraries(example_g2c PUBLIC MikroSDK.Board)
find_package(MikroSDK.Log REQUIRED)
target_link_libraries(example_g2c PUBLIC MikroSDK.Log)
+find_package(MikroSDK.Conversions REQUIRED)
+target_link_libraries(example_g2c PUBLIC MikroSDK.Conversions)
add_subdirectory(lib_g2c)
target_link_libraries(example_g2c PUBLIC Click.G2C)
############################ example_g2c GENERATED CODE END ###########################
+
diff --git a/clicks/g2c/DETAILS.md b/clicks/g2c/DETAILS.md
index 4385e80b98..35e1d2ac19 100644
--- a/clicks/g2c/DETAILS.md
+++ b/clicks/g2c/DETAILS.md
@@ -2,7 +2,7 @@
---
# G2C click
-Go to Cloud (G2C) click is a gateway Click board™ which provides a simple and reliable connection to the Click Cloud platform.
+> Go to Cloud (G2C) click is a gateway Click board™ which provides a simple and reliable connection to the Click Cloud platform, a cloud-based rapid prototyping environment, hosted by MikroElektronika. Go to Cloud (G2C) click offers an unprecedented simplicity for adding Click Cloud connectivity to any embedded application, by utilizing the simple UART interface: it can be configured and managed using a minimal set of well-documented AT commands.
@@ -13,21 +13,21 @@ Go to Cloud (G2C) click is a gateway Click board™ which provides a simple and
---
-#### Click library
+#### Click library
-- **Author** : MikroE Team
-- **Date** : Apr 2020.
-- **Type** : UART GSM/IOT type
+- **Author** : Stefan Filipovic
+- **Date** : May 2023.
+- **Type** : UART type
# Software Support
-We provide a library for the G2C Click
-as well as a demo application (example), developed using MikroElektronika
-[compilers](https://shop.mikroe.com/compilers).
-The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
+We provide a library for the G2C Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
-Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
## Library Description
@@ -35,39 +35,49 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void g2c_cfg_setup ( g2c_cfg_t *cfg );
-
-- Initialization function.
-> G2C_RETVAL g2c_init ( g2c_t *ctx, g2c_cfg_t *cfg );
+- `g2c_cfg_setup` Config Object Initialization function.
+```c
+void g2c_cfg_setup ( g2c_cfg_t *cfg );
+```
+
+- `g2c_init` Initialization function.
+```c
+err_t g2c_init ( g2c_t *ctx, g2c_cfg_t *cfg );
+```
#### Example key functions :
-- Function for send command.
-> void g2c_send_command ( g2c_t *ctx, char *command );
-
-- Send data reference.
-> void g2c_send_data_ref( g2c_t *ctx, char *reference_buf, char *data_buf );
+- `g2c_reset_device` This function resets the device by toggling the RST pin.
+```c
+void g2c_reset_device ( g2c_t *ctx );
+```
+
+- `g2c_set_net_creds` This function sets the WiFi network credentials.
+```c
+void g2c_set_net_creds ( g2c_t *ctx, uint8_t *sim_apn, uint8_t *username, uint8_t *password );
+```
-- String parser function.
-> g2c_error_t g2c_actuator_str_parser ( char *rsp, char *act_ref, g2c_actuator_str_t *str_data );
+- `g2c_set_broker_creds` This function sets the broker credentials (device key and password).
+```c
+void g2c_set_broker_creds ( g2c_t *ctx, uint8_t *dev_key, uint8_t *password );
+```
-## Examples Description
+## Example Description
-> This example reads and processes data from G2C clicks.
+> This example shows the device capability of connecting to the cloud and updating the sensor data on the cloud and receiving data from actuators.
**The demo application is composed of two sections :**
-### Application Init
+### Application Init
-> Initializes driver and power module.
+> Initializes the driver, restarts the device, and after that tests the communication by sending "AT" command.
```c
void application_init ( void )
{
- log_cfg_t log_cfg;
- g2c_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ g2c_cfg_t g2c_cfg; /**< Click config object. */
/**
* Logger initialization.
@@ -80,88 +90,109 @@ void application_init ( void )
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- // Click initialization.
-
- g2c_cfg_setup( &cfg );
- G2C_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- g2c_init( &g2c, &cfg );
+ log_info( &logger, " Application Init " );
- // Power module.
+ // Click initialization.
+ g2c_cfg_setup( &g2c_cfg );
+ G2C_MAP_MIKROBUS( g2c_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == g2c_init( &g2c, &g2c_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
- g2c_module_power( &g2c, true, 0 );
- g2c_reset( &g2c );
+ // Clear RX buffer
+ g2c_process( );
+ g2c_clear_app_buf( );
+ Delay_ms ( 100 );
- // Send command.
-
- log_printf( &logger, ">> ATE \r\n" );
- g2c_send_command( &g2c, ATE );
- Delay_ms( 3000 );
- g2c_process( );
-
- log_printf( &logger, ">> AT \r\n" );
- g2c_send_command( &g2c, AT );
- Delay_ms( 3000 );
- g2c_process( );
-
- log_printf( &logger, ">> AT_CEN \r\n" );
- g2c_send_command( &g2c, AT_CEN );
- g2c_process( );
-
- log_printf( &logger, ">> NETWORK \r\n" );
- g2c_send_operator_cfg( &g2c, NETWORK_USERNAME, NETWORK_PASSWORD );
- g2c_process( );
-
- log_printf( &logger, ">> AT NWC \r\n" );
- g2c_send_command( &g2c, AT_NWC );
- g2c_process( );
-
- log_printf( &logger, ">> DEVICE \r\n" );
- g2c_send_broker_cfg( &g2c, DEVICE_KEY, DEVICE_PASSWORD );
- g2c_process( );
-
- log_printf( &logger, ">> AT BRC \r\n" );
- g2c_send_command( &g2c, AT_BRC );
- g2c_process( );
-
- Delay_ms( 3000 );
+ // Reset device
+ g2c_reset_device ( &g2c );
+
+ // Check communication
+ log_printf( &logger, "Test communication\r\n" );
+ Delay_ms ( 100 );
+ g2c_send_cmd( &g2c, G2C_CMD_AT );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ g2c_error_check( error_flag );
+
+ // Enable command echo
+ log_printf( &logger, "Enable echo\r\n" );
+ Delay_ms ( 100 );
+ g2c_send_cmd( &g2c, G2C_CMD_ATE1 );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ g2c_error_check( error_flag );
+
+ log_info( &logger, " Application Task " );
+ example_state = G2C_CONNECT_TO_NETWORK;
}
-
+
```
### Application Task
-> Reads the received data and parses it.
+> Application task is split in few stages:
+ - G2C_CONNECT_TO_NETWORK:
+ > Sends commands to configure device to connect to the specified network.
+ - G2C_CONNECT_TO_CLOUD:
+ > Sends commands to configure device to connect to the specified device on the cloud.
+ - G2C_EXAMPLE:
+ > This function executes example which updates sensor data on the cloud and displays
+ > all data received from the module (ex. the actuator switch state change received from the cloud).
```c
-
-
void application_task ( void )
{
- g2c_process( );
- actuator_demo( current_parser_buf );
-
- if ( send_data_cnt == 5 )
+ switch ( example_state )
{
- log_printf( &logger, ">> ACTUATOR REF \r\n" );
- g2c_send_data_ref( &g2c, ACTUATOR_STR_REF, data_buf );
- g2c_process( );
-
- log_printf( &logger, ">> AT PUB \r\n" );
- g2c_send_command( &g2c, AT_PUB );
- g2c_process( );
- send_data_cnt = 0;
+ case G2C_CONNECT_TO_NETWORK:
+ {
+ if ( G2C_OK == g2c_connect_to_network( ) )
+ {
+ example_state = G2C_CONNECT_TO_CLOUD;
+ }
+ break;
+ }
+ case G2C_CONNECT_TO_CLOUD:
+ {
+ if ( G2C_OK == g2c_connect_to_cloud( ) )
+ {
+ example_state = G2C_EXAMPLE;
+ }
+ break;
+ }
+ case G2C_EXAMPLE:
+ {
+ g2c_example( );
+ break;
+ }
+ default:
+ {
+ log_error( &logger, " Example state." );
+ break;
+ }
}
- send_data_cnt++;
}
-
```
+## Note
+
+> In order for the example to work, user needs to set the WiFi credentials and the cloud device parameters.
+Enter valid values for the following macros:
+WIFI_SSID, WIFI_PASS, DEVICE_KEY, DEVICE_PASSWORD, DEVICE_SENSOR_REF.
+> > Example:
+> > - WIFI_SSID "MikroE Public"
+> > - WIFI_PASS "mikroe.guest"
+> > - DEVICE_KEY "xxxxxxxxxxxxxxxx"
+> > - DEVICE_PASSWORD "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+> > - DEVICE_SENSOR_REF "TEMP_SEN_R"
+> DEVICE_KEY and DEVICE_PASSWORD strings should match the device credentials which were generated during the Click Cloud device creation step.
+DEVICE_SENSOR_REF is expected to be a reference to a temperature sensor with a data range from -20 to +80 degrees Celsius.
+For more information about the registration on the Click Cloud and creating the device refer to the following [user guide](https://download.mikroe.com/documents/click-cloud/guide-to-click-cloud.pdf).
-The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
-**Other mikroE Libraries used in the example:**
+**Other Mikroe Libraries used in the example:**
- MikroSDK.Board
- MikroSDK.Log
@@ -169,15 +200,12 @@ The full application code, and ready to use projects can be installed directly
**Additional notes and informations**
-Depending on the development board you are using, you may need
-[USB UART click](https://shop.mikroe.com/usb-uart-click),
-[USB UART 2 Click](https://shop.mikroe.com/usb-uart-2-click) or
-[RS232 Click](https://shop.mikroe.com/rs232-click) to connect to your PC, for
-development systems with no UART to USB interface available on the board. The
-terminal available in all Mikroelektronika
-[compilers](https://shop.mikroe.com/compilers), or any other terminal application
-of your choice, can be used to read the message.
-
-
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
---
diff --git a/clicks/g2c/README.md b/clicks/g2c/README.md
index 90ddca8f2e..60bd3799f7 100644
--- a/clicks/g2c/README.md
+++ b/clicks/g2c/README.md
@@ -1,9 +1,9 @@
\mainpage Main Page
-
+
---
# G2C click
-Go to Cloud (G2C) click is a gateway Click board™ which provides a simple and reliable connection to the Click Cloud platform.
+> Go to Cloud (G2C) click is a gateway Click board™ which provides a simple and reliable connection to the Click Cloud platform, a cloud-based rapid prototyping environment, hosted by MikroElektronika. Go to Cloud (G2C) click offers an unprecedented simplicity for adding Click Cloud connectivity to any embedded application, by utilizing the simple UART interface: it can be configured and managed using a minimal set of well-documented AT commands.
@@ -14,21 +14,21 @@ Go to Cloud (G2C) click is a gateway Click board™ which provides a simple and
---
-#### Click library
+#### Click library
-- **Author** : MikroE Team
-- **Date** : Apr 2020.
-- **Type** : UART GSM/IOT type
+- **Author** : Stefan Filipovic
+- **Date** : May 2023.
+- **Type** : UART type
# Software Support
-We provide a library for the G2C Click
-as well as a demo application (example), developed using MikroElektronika
-[compilers](https://shop.mikroe.com/compilers).
-The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
+We provide a library for the G2C Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
-Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
## Library Description
@@ -36,39 +36,49 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void g2c_cfg_setup ( g2c_cfg_t *cfg );
-
-- Initialization function.
-> G2C_RETVAL g2c_init ( g2c_t *ctx, g2c_cfg_t *cfg );
+- `g2c_cfg_setup` Config Object Initialization function.
+```c
+void g2c_cfg_setup ( g2c_cfg_t *cfg );
+```
+
+- `g2c_init` Initialization function.
+```c
+err_t g2c_init ( g2c_t *ctx, g2c_cfg_t *cfg );
+```
#### Example key functions :
-- Function for send command.
-> void g2c_send_command ( g2c_t *ctx, char *command );
-
-- Send data reference.
-> void g2c_send_data_ref( g2c_t *ctx, char *reference_buf, char *data_buf );
+- `g2c_reset_device` This function resets the device by toggling the RST pin.
+```c
+void g2c_reset_device ( g2c_t *ctx );
+```
+
+- `g2c_set_net_creds` This function sets the WiFi network credentials.
+```c
+void g2c_set_net_creds ( g2c_t *ctx, uint8_t *sim_apn, uint8_t *username, uint8_t *password );
+```
-- String parser function.
-> g2c_error_t g2c_actuator_str_parser ( char *rsp, char *act_ref, g2c_actuator_str_t *str_data );
+- `g2c_set_broker_creds` This function sets the broker credentials (device key and password).
+```c
+void g2c_set_broker_creds ( g2c_t *ctx, uint8_t *dev_key, uint8_t *password );
+```
-## Examples Description
+## Example Description
-> This example reads and processes data from G2C clicks.
+> This example shows the device capability of connecting to the cloud and updating the sensor data on the cloud and receiving data from actuators.
**The demo application is composed of two sections :**
-### Application Init
+### Application Init
-> Initializes driver and power module.
+> Initializes the driver, restarts the device, and after that tests the communication by sending "AT" command.
```c
void application_init ( void )
{
- log_cfg_t log_cfg;
- g2c_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ g2c_cfg_t g2c_cfg; /**< Click config object. */
/**
* Logger initialization.
@@ -81,88 +91,109 @@ void application_init ( void )
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- // Click initialization.
+ log_info( &logger, " Application Init " );
- g2c_cfg_setup( &cfg );
- G2C_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- g2c_init( &g2c, &cfg );
-
- // Power module.
+ // Click initialization.
+ g2c_cfg_setup( &g2c_cfg );
+ G2C_MAP_MIKROBUS( g2c_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == g2c_init( &g2c, &g2c_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
- g2c_module_power( &g2c, true, 0 );
- g2c_reset( &g2c );
+ // Clear RX buffer
+ g2c_process( );
+ g2c_clear_app_buf( );
+ Delay_ms ( 100 );
- // Send command.
-
- log_printf( &logger, ">> ATE \r\n" );
- g2c_send_command( &g2c, ATE );
- Delay_ms( 3000 );
- g2c_process( );
-
- log_printf( &logger, ">> AT \r\n" );
- g2c_send_command( &g2c, AT );
- Delay_ms( 3000 );
- g2c_process( );
-
- log_printf( &logger, ">> AT_CEN \r\n" );
- g2c_send_command( &g2c, AT_CEN );
- g2c_process( );
-
- log_printf( &logger, ">> NETWORK \r\n" );
- g2c_send_operator_cfg( &g2c, NETWORK_USERNAME, NETWORK_PASSWORD );
- g2c_process( );
-
- log_printf( &logger, ">> AT NWC \r\n" );
- g2c_send_command( &g2c, AT_NWC );
- g2c_process( );
-
- log_printf( &logger, ">> DEVICE \r\n" );
- g2c_send_broker_cfg( &g2c, DEVICE_KEY, DEVICE_PASSWORD );
- g2c_process( );
-
- log_printf( &logger, ">> AT BRC \r\n" );
- g2c_send_command( &g2c, AT_BRC );
- g2c_process( );
-
- Delay_ms( 3000 );
+ // Reset device
+ g2c_reset_device ( &g2c );
+
+ // Check communication
+ log_printf( &logger, "Test communication\r\n" );
+ Delay_ms ( 100 );
+ g2c_send_cmd( &g2c, G2C_CMD_AT );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ g2c_error_check( error_flag );
+
+ // Enable command echo
+ log_printf( &logger, "Enable echo\r\n" );
+ Delay_ms ( 100 );
+ g2c_send_cmd( &g2c, G2C_CMD_ATE1 );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ g2c_error_check( error_flag );
+
+ log_info( &logger, " Application Task " );
+ example_state = G2C_CONNECT_TO_NETWORK;
}
-
+
```
### Application Task
-> Reads the received data and parses it.
+> Application task is split in few stages:
+ - G2C_CONNECT_TO_NETWORK:
+ > Sends commands to configure device to connect to the specified network.
+ - G2C_CONNECT_TO_CLOUD:
+ > Sends commands to configure device to connect to the specified device on the cloud.
+ - G2C_EXAMPLE:
+ > This function executes example which updates sensor data on the cloud and displays
+ > all data received from the module (ex. the actuator switch state change received from the cloud).
```c
-
-
void application_task ( void )
{
- g2c_process( );
- actuator_demo( current_parser_buf );
-
- if ( send_data_cnt == 5 )
+ switch ( example_state )
{
- log_printf( &logger, ">> ACTUATOR REF \r\n" );
- g2c_send_data_ref( &g2c, ACTUATOR_STR_REF, data_buf );
- g2c_process( );
-
- log_printf( &logger, ">> AT PUB \r\n" );
- g2c_send_command( &g2c, AT_PUB );
- g2c_process( );
- send_data_cnt = 0;
+ case G2C_CONNECT_TO_NETWORK:
+ {
+ if ( G2C_OK == g2c_connect_to_network( ) )
+ {
+ example_state = G2C_CONNECT_TO_CLOUD;
+ }
+ break;
+ }
+ case G2C_CONNECT_TO_CLOUD:
+ {
+ if ( G2C_OK == g2c_connect_to_cloud( ) )
+ {
+ example_state = G2C_EXAMPLE;
+ }
+ break;
+ }
+ case G2C_EXAMPLE:
+ {
+ g2c_example( );
+ break;
+ }
+ default:
+ {
+ log_error( &logger, " Example state." );
+ break;
+ }
}
- send_data_cnt++;
}
-
```
+## Note
+
+> In order for the example to work, user needs to set the WiFi credentials and the cloud device parameters.
+Enter valid values for the following macros:
+WIFI_SSID, WIFI_PASS, DEVICE_KEY, DEVICE_PASSWORD, DEVICE_SENSOR_REF.
+> > Example:
+> > - WIFI_SSID "MikroE Public"
+> > - WIFI_PASS "mikroe.guest"
+> > - DEVICE_KEY "xxxxxxxxxxxxxxxx"
+> > - DEVICE_PASSWORD "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+> > - DEVICE_SENSOR_REF "TEMP_SEN_R"
+> DEVICE_KEY and DEVICE_PASSWORD strings should match the device credentials which were generated during the Click Cloud device creation step.
+DEVICE_SENSOR_REF is expected to be a reference to a temperature sensor with a data range from -20 to +80 degrees Celsius.
+For more information about the registration on the Click Cloud and creating the device refer to the following [user guide](https://download.mikroe.com/documents/click-cloud/guide-to-click-cloud.pdf).
-The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
-**Other mikroE Libraries used in the example:**
+**Other Mikroe Libraries used in the example:**
- MikroSDK.Board
- MikroSDK.Log
@@ -170,15 +201,12 @@ The full application code, and ready to use projects can be installed directly
**Additional notes and informations**
-Depending on the development board you are using, you may need
-[USB UART click](https://shop.mikroe.com/usb-uart-click),
-[USB UART 2 Click](https://shop.mikroe.com/usb-uart-2-click) or
-[RS232 Click](https://shop.mikroe.com/rs232-click) to connect to your PC, for
-development systems with no UART to USB interface available on the board. The
-terminal available in all Mikroelektronika
-[compilers](https://shop.mikroe.com/compilers), or any other terminal application
-of your choice, can be used to read the message.
-
-
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
---
diff --git a/clicks/g2c/doc/doxy/Doxyfile.doxy b/clicks/g2c/doc/doxy/Doxyfile.doxy
index 0369f5e5ef..14b52931ff 100644
--- a/clicks/g2c/doc/doxy/Doxyfile.doxy
+++ b/clicks/g2c/doc/doxy/Doxyfile.doxy
@@ -20,7 +20,7 @@
# This tag specifies the encoding used for all characters in the config 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
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
# for the list of possible encodings.
# The default value is: UTF-8.
@@ -38,20 +38,20 @@ PROJECT_NAME = g2c
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 2.0.0.0
+PROJECT_NUMBER = 2.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
# quick idea about the purpose of the project. Keep the description short.
-PROJECT_BRIEF =
+PROJECT_BRIEF =
# 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 =
+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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,11 +291,11 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# 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.
+# documentation. See http://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.
@@ -337,7 +337,7 @@ BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# https://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# http://www.riverbankcomputing.co.uk/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.
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,17 +703,17 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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.
+# to be installed. See also http://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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -797,7 +797,7 @@ INPUT = ../cmake/g2c/example \
# 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
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
# possible encodings.
# The default value is: UTF-8.
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,7 +904,7 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1047,7 +1047,7 @@ 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
+# (see http://www.gnu.org/software/global/global.html). You will need version
# 4.8.6 or higher.
#
# To use it do the following:
@@ -1075,7 +1075,7 @@ USE_HTAGS = NO
VERBATIM_HEADERS = YES
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
-# clang parser (see: https://clang.llvm.org/) for more accurate parsing at 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.
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,12 +1206,12 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
+# http://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.
@@ -1270,12 +1270,12 @@ 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_NAME.apple.com/tools/xcode/), introduced with
+# environment (see: http://DEVELOPER_NAME.apple.com/tools/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_NAME/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See https://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.html
+# startup. See http://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.html
# for more information.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
@@ -1288,7 +1288,7 @@ GENERATE_DOCSET = NO
# The default value is: Doxygen generated docs.
# This tag requires that the tag GENERATE_DOCSET is set to YES.
-DOCSET_FEEDNAME = "MikroE Click boards"
+DOCSET_FEEDNAME = "Mikroe Click boards"
# This tag specifies a string that should uniquely identify the documentation
# set bundle. This should be a reverse domain-name style string, e.g.
@@ -1315,7 +1315,7 @@ DOCSET_PUBLISHER_NAME = MikroElektronika
# 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
+# (see: http://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
@@ -1328,14 +1328,14 @@ DOCSET_PUBLISHER_NAME = MikroElektronika
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
-GENERATE_HTMLHELP = 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 =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,11 +1387,11 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# (see: http://qt-project.org/doc/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.
@@ -1399,7 +1399,7 @@ QHP_NAMESPACE = org.doxygen.Project
# 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://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
# folders).
# The default value is: doc.
# This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1408,33 +1408,33 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/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://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1529,7 +1529,7 @@ FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# https://www.mathjax.org) which uses client side Javascript for the rendering
+# http://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
@@ -1541,7 +1541,7 @@ 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:
-# https://docs.mathjax.org/en/latest/output.html) for more details.
+# http://docs.mathjax.org/en/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.
@@ -1556,26 +1556,26 @@ MATHJAX_FORMAT = HTML-CSS
# 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.mathjax.org/mathjax/latest.
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
+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 =
+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: https://docs.mathjax.org/en/latest/output.html) for more details. For an
+# (see: http://docs.mathjax.org/en/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 =
+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
@@ -1618,7 +1618,7 @@ SERVER_BASED_SEARCH = NO
#
# 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/).
+# Xapian (see: http://xapian.org/).
#
# See the section "External Indexing and Searching" for details.
# The default value is: NO.
@@ -1631,11 +1631,11 @@ EXTERNAL_SEARCH = NO
#
# 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
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1818,7 +1818,7 @@ 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.
+# http://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.
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2001,7 +2001,7 @@ DOCBOOK_PROGRAMLISTING = NO
#---------------------------------------------------------------------------
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
-# AutoGen Definitions (see https://autogen.sf.net) file that captures the
+# AutoGen Definitions (see http://autogen.sf.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.
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2170,12 +2170,6 @@ EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH = /usr/bin/perl
-
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
@@ -2189,21 +2183,12 @@ PERL_PATH = /usr/bin/perl
CLASS_DIAGRAMS = YES
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# https://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
# 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 =
+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.
@@ -2213,7 +2198,7 @@ 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:
-# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# 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: NO.
@@ -2252,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2368,7 +2353,7 @@ 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:
-# https://www.graphviz.org/)).
+# 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).
@@ -2396,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/g2c/doc/package/manifest.json b/clicks/g2c/doc/package/manifest.json
index 73ea8cf198..15fb09e569 100644
--- a/clicks/g2c/doc/package/manifest.json
+++ b/clicks/g2c/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
- "category": "Click Boards > Wireless connectivity > WIFI",
+ "architecture": "ARM|PIC|PIC32|RISC-V",
+ "category": "Click Boards > Wireless connectivity > GSM/LTE",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,7 +8,7 @@
"examples",
"source_files"
],
-"dependency_list": [],
+ "dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "G2C click",
"example_list": [
@@ -24,19 +24,15 @@
},
"name": "mikroe.click.g2c",
"product_link": "https://www.mikroe.com/g2c-click",
- "short_description": "Go to Cloud (G2C) click is a gateway Click board™ which provides a simple and reliable connection to the Click Cloud platform.",
+ "short_description": "Go to Cloud (G2C) click is a gateway Click board™ which provides a simple and reliable connection to the Click Cloud platform, a cloud-based rapid prototyping environment, hosted by MikroElektronika. Go to Cloud (G2C) click offers an unprecedented simplicity for adding Click Cloud connectivity to any embedded application, by utilizing the simple UART interface: it can be configured and managed using a minimal set of well-documented AT commands.",
"supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type": "mikroSDK Library",
+ "_type":"mikroSDK Library",
"related_projects": [
2628
],
- "version": "2.1.0.15",
+ "version": "2.1.0.0",
"cmake": true,
"alias": "Click.G2C",
"subdir_name": "lib_g2c"
}
-
-
-
-
diff --git a/clicks/g2c/example/CMakeLists.txt b/clicks/g2c/example/CMakeLists.txt
index 439a3ce652..ff875527c6 100644
--- a/clicks/g2c/example/CMakeLists.txt
+++ b/clicks/g2c/example/CMakeLists.txt
@@ -11,7 +11,7 @@ endif()
add_executable(example_g2c
main.c
-
+
)
@@ -22,6 +22,9 @@ find_package(MikroSDK.Board REQUIRED)
target_link_libraries(example_g2c PUBLIC MikroSDK.Board)
find_package(MikroSDK.Log REQUIRED)
target_link_libraries(example_g2c PUBLIC MikroSDK.Log)
+find_package(MikroSDK.Conversions REQUIRED)
+target_link_libraries(example_g2c PUBLIC MikroSDK.Conversions)
add_subdirectory(lib_g2c)
target_link_libraries(example_g2c PUBLIC Click.G2C)
############################ example_g2c GENERATED CODE END ###########################
+
diff --git a/clicks/g2c/example/main.c b/clicks/g2c/example/main.c
index 6910300867..6361423f70 100644
--- a/clicks/g2c/example/main.c
+++ b/clicks/g2c/example/main.c
@@ -1,159 +1,186 @@
/*!
- * \file
- * \brief G2C Click example
- *
+ * @file main.c
+ * @brief G2C Click Example.
+ *
* # Description
- * This example reads and processes data from G2C clicks.
+ * This example shows the device capability of connecting to the cloud and
+ * updating the sensor data on the cloud and receiving data from actuators.
*
* The demo application is composed of two sections :
- *
- * ## Application Init
- * Initializes driver and power module.
- *
- * ## Application Task
- * Reads the received data and parses it.
- *
+ *
+ * ## Application Init
+ * Initializes the driver, restarts the device, and after that tests
+ * the communication by sending "AT" command.
+ *
+ * ## Application Task
+ * Application task is split in few stages:
+ * - G2C_CONNECT_TO_NETWORK:
+ * Sends commands to configure device to connect to the specified network.
+ *
+ * - G2C_CONNECT_TO_CLOUD:
+ * Sends commands to configure device to connect to the specified device on the cloud.
+ *
+ * - G2C_EXAMPLE:
+ * This function executes example which updates sensor data on the cloud and displays
+ * all data received from the module (ex. the actuator switch state change received
+ * from the cloud).
+ *
* ## Additional Function
- * - g2c_process ( ) - The general process of collecting presponce
- * that sends a module.
- *
- * ## Note
- * - WiFi credentials for Planet Debug utilization: username: MikroE Public
- * password: mikroe.guest
+ * - static void g2c_clear_app_buf ( void )
+ * - static err_t g2c_process ( void )
+ * - static void g2c_error_check( err_t error_flag )
+ * - static void g2c_log_app_buf ( void )
+ * - static err_t g2c_rsp_check ( uint8_t *rsp )
+ * - static err_t g2c_connect_to_network( void )
+ * - static err_t g2c_connect_to_cloud( void )
+ * - static err_t g2c_example( void )
+ *
+ * @note
+ * In order for the example to work, user needs to set the WiFi credentials and the cloud device parameters.
+ * Enter valid values for the following macros:
+ * WIFI_SSID, WIFI_PASS, DEVICE_KEY, DEVICE_PASSWORD, DEVICE_SENSOR_REF.
+ * Example:
+ * WIFI_SSID "MikroE Public"
+ * WIFI_PASS "mikroe.guest"
+ * DEVICE_KEY "xxxxxxxxxxxxxxxx"
+ * DEVICE_PASSWORD "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ * DEVICE_SENSOR_REF "TEMP_SEN_R"
*
- * \author MikroE Team
+ * DEVICE_KEY and DEVICE_PASSWORD strings should match the device credentials which
+ * were generated during the Click Cloud device creation step.
+ * DEVICE_SENSOR_REF is expected to be a reference to a temperature sensor with a data
+ * range from -20 to +80 degrees Celsius.
+ * For more information about the registration on the Click Cloud and creating the device
+ * refer to the following user guide:
+ * https://download.mikroe.com/documents/click-cloud/guide-to-click-cloud.pdf
+ *
+ * @author Stefan Filipovic
*
*/
-// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "g2c.h"
-#include "string.h"
+#include "conversions.h"
-#define PROCESS_COUNTER 10
-#define PROCESS_RX_BUFFER_SIZE 500
-#define PROCESS_PARSER_BUFFER_SIZE 500
+// Network config parameters
+#define WIFI_SSID "MikroE Public" // Set valid WiFi SSID
+#define WIFI_PASS "mikroe.guest" // Set valid WiFi Password
-// ------------------------------------------------------------------ VARIABLES
+// Cloud device config parameters
+#define DEVICE_KEY "vxg29q70r4aceyi9" // Cloud device key
+#define DEVICE_PASSWORD "aa892ccd-4168-4cf4-8b9c-64b0183f7a5c" // Cloud device password
+#define DEVICE_SENSOR_REF "TEMP_SEN_R" // Cloud device sensor reference
-static g2c_t g2c;
-static log_t logger;
+// Application buffer size
+#define APP_BUFFER_SIZE 300
+#define PROCESS_BUFFER_SIZE 300
-// AT commands
-#define ATE "ATE1"
-#define AT "AT"
-#define AT_CEN "AT+CEN=1"
-#define AT_NWCR "AT+NWCR"
-#define AT_NWC "AT+NWC=1"
-#define AT_BRCR "AT+BRCR"
-#define AT_BRC "AT+BRC=1"
-#define AT_DSET "AT+DSET"
-#define AT_PUB "AT+PUB"
-
-// Sensor/Actuator reference
-#define ACTUATOR_SW_REF "G2C_TEST_AB"
-#define ACTUATOR_STR_REF "G2C_TEST_AS"
-#define ACTUATOR_CNT_REF "G2C_TEST_AC"
-#define SENSOR_REF "G2C_TEST_S"
-
-// Operator settings
-#define NETWORK_USERNAME "network_username"
-#define NETWORK_PASSWORD "network_password"
-
-// Broker(device) settings
-#define DEVICE_KEY "device_key"
-#define DEVICE_PASSWORD "device_password"
-
-static char data_buf[ 20 ] = "12.2";
-static char current_parser_buf[ PROCESS_PARSER_BUFFER_SIZE ];
-static uint8_t send_data_cnt = 0;
-
-// ------------------------------------------------------- ADDITIONAL FUNCTIONS
-
-static void g2c_process ( void )
+/**
+ * @brief Example states.
+ * @details Predefined enum values for application example state.
+ */
+typedef enum
{
- int32_t rsp_size;
- uint16_t rsp_cnt = 0;
-
- char uart_rx_buffer[ PROCESS_RX_BUFFER_SIZE ] = { 0 };
- uint8_t check_buf_cnt;
- uint8_t process_cnt = PROCESS_COUNTER;
-
- // Clear parser buffer
- memset( current_parser_buf, 0 , PROCESS_PARSER_BUFFER_SIZE );
-
- while( process_cnt != 0 )
- {
- rsp_size = g2c_generic_read( &g2c, &uart_rx_buffer, PROCESS_RX_BUFFER_SIZE );
+ G2C_CONNECT_TO_NETWORK = 1,
+ G2C_CONNECT_TO_CLOUD,
+ G2C_EXAMPLE
- if ( rsp_size > 0 )
- {
- // Validation of the received data
- for ( check_buf_cnt = 0; check_buf_cnt < rsp_size; check_buf_cnt++ )
- {
- if ( uart_rx_buffer[ check_buf_cnt ] == 0 )
- {
- uart_rx_buffer[ check_buf_cnt ] = 13;
- }
- }
- log_printf( &logger, "%s", uart_rx_buffer );
+} g2c_example_state_t;
- // Storages data in parser buffer
- rsp_cnt += rsp_size;
- if ( rsp_cnt < PROCESS_PARSER_BUFFER_SIZE )
- {
- strncat( current_parser_buf, uart_rx_buffer, rsp_size );
- }
-
- // Clear RX buffer
- memset( uart_rx_buffer, 0, PROCESS_RX_BUFFER_SIZE );
- }
- else
- {
- process_cnt--;
-
- // Process delay
- Delay_100ms( );
- }
- }
-}
+static g2c_t g2c;
+static log_t logger;
-static void actuator_demo( char *rsp )
-{
- uint8_t sw_state;
- int16_t cnt_state;
- char str_data_buf[ 50 ];
-
- uint8_t err = G2C_PARSER_NO_ERROR;
-
- // Actuator switch example
- err = g2c_actuator_sw_parser( rsp, ACTUATOR_SW_REF, &sw_state );
- if ( err == G2C_PARSER_NO_ERROR )
- {
- log_printf( &logger, ">> ACTUATOR SW STATE: %d\r\n", sw_state );
- }
+/**
+ * @brief Application example variables.
+ * @details Variables used in application example.
+ */
+static uint8_t app_buf[ PROCESS_BUFFER_SIZE ] = { 0 };
+static int32_t app_buf_len = 0;
+static err_t error_flag;
+static g2c_example_state_t example_state;
+
+/**
+ * @brief G2C clearing application buffer.
+ * @details This function clears memory of application buffer and reset its length.
+ * @note None.
+ */
+static void g2c_clear_app_buf ( void );
+
+/**
+ * @brief G2C data reading function.
+ * @details This function reads data from device and concatenates data to application buffer.
+ * @return @li @c 0 - Read some data.
+ * @li @c -1 - Nothing is read.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+static err_t g2c_process ( void );
- // Actuator counter example
- err = g2c_actuator_cnt_parser( rsp, ACTUATOR_CNT_REF, &cnt_state );
- if ( err == G2C_PARSER_NO_ERROR )
- {
- log_printf( &logger, ">> ACTUATOR CNT NUM: %d\r\n", cnt_state );
- }
-
- // Actuator string example
- err = g2c_actuator_str_parser( rsp, ACTUATOR_STR_REF, str_data_buf );
- if ( err == G2C_PARSER_NO_ERROR )
- {
- log_printf( &logger, ">> ACTUATOR TEXT DATA: %s\r\n", str_data_buf );
- }
-}
-// ------------------------------------------------------ APPLICATION FUNCTIONS
+/**
+ * @brief Check for errors.
+ * @details This function checks for different types of
+ * errors and logs them on UART or logs the response if no errors occured.
+ * @param[in] error_flag Error flag to check.
+ */
+static void g2c_error_check ( err_t error_flag );
+
+/**
+ * @brief Logs application buffer.
+ * @details This function logs data from application buffer.
+ */
+static void g2c_log_app_buf ( void );
+
+/**
+ * @brief Response check.
+ * @details This function checks for response and returns the status of response.
+ * @param[in] rsp Expected response.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t g2c_rsp_check ( uint8_t *rsp );
+
+/**
+ * @brief Configure device to connect to the network.
+ * @details Sends commands to configure device to connect to the specified network.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t g2c_connect_to_network ( void );
+
+/**
+ * @brief Configure device to connect to the cloud.
+ * @details Sends commands to configure device to connect to the specified device on the cloud.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t g2c_connect_to_cloud ( void );
+
+/**
+ * @brief Execute example.
+ * @details This function executes example which updates sensor data on the cloud and displays
+ * all data received from the module (ex. the actuator state change received from the cloud).
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t g2c_example ( void );
-void application_init ( void )
+void application_init ( void )
{
- log_cfg_t log_cfg;
- g2c_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ g2c_cfg_t g2c_cfg; /**< Click config object. */
/**
* Logger initialization.
@@ -166,81 +193,311 @@ void application_init ( void )
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- // Click initialization.
+ log_info( &logger, " Application Init " );
- g2c_cfg_setup( &cfg );
- G2C_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- g2c_init( &g2c, &cfg );
-
- // Power module.
+ // Click initialization.
+ g2c_cfg_setup( &g2c_cfg );
+ G2C_MAP_MIKROBUS( g2c_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == g2c_init( &g2c, &g2c_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
- g2c_module_power( &g2c, true, 0 );
- g2c_reset( &g2c );
+ // Clear RX buffer
+ g2c_process( );
+ g2c_clear_app_buf( );
+ Delay_ms ( 100 );
+
+ // Reset device
+ g2c_reset_device ( &g2c );
+
+ // Check communication
+ log_printf( &logger, "Test communication\r\n" );
+ Delay_ms ( 100 );
+ g2c_send_cmd( &g2c, G2C_CMD_AT );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ g2c_error_check( error_flag );
- // Send command.
+ // Enable command echo
+ log_printf( &logger, "Enable echo\r\n" );
+ Delay_ms ( 100 );
+ g2c_send_cmd( &g2c, G2C_CMD_ATE1 );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ g2c_error_check( error_flag );
+
+ log_info( &logger, " Application Task " );
+ example_state = G2C_CONNECT_TO_NETWORK;
+}
- log_printf( &logger, ">> ATE \r\n" );
- g2c_send_command( &g2c, ATE );
- Delay_ms( 3000 );
- g2c_process( );
+void application_task ( void )
+{
+ switch ( example_state )
+ {
+ case G2C_CONNECT_TO_NETWORK:
+ {
+ if ( G2C_OK == g2c_connect_to_network( ) )
+ {
+ example_state = G2C_CONNECT_TO_CLOUD;
+ }
+ break;
+ }
+ case G2C_CONNECT_TO_CLOUD:
+ {
+ if ( G2C_OK == g2c_connect_to_cloud( ) )
+ {
+ example_state = G2C_EXAMPLE;
+ }
+ break;
+ }
+ case G2C_EXAMPLE:
+ {
+ g2c_example( );
+ break;
+ }
+ default:
+ {
+ log_error( &logger, " Example state." );
+ break;
+ }
+ }
+}
- log_printf( &logger, ">> AT \r\n" );
- g2c_send_command( &g2c, AT );
- Delay_ms( 3000 );
- g2c_process( );
+void main ( void )
+{
+ application_init( );
- log_printf( &logger, ">> AT_CEN \r\n" );
- g2c_send_command( &g2c, AT_CEN );
- g2c_process( );
+ for ( ; ; )
+ {
+ application_task( );
+ }
+}
- log_printf( &logger, ">> NETWORK \r\n" );
- g2c_send_operator_cfg( &g2c, NETWORK_USERNAME, NETWORK_PASSWORD );
- g2c_process( );
+static void g2c_clear_app_buf ( void )
+{
+ memset( app_buf, 0, app_buf_len );
+ app_buf_len = 0;
+}
- log_printf( &logger, ">> AT NWC \r\n" );
- g2c_send_command( &g2c, AT_NWC );
- g2c_process( );
+static err_t g2c_process ( void )
+{
+ uint8_t rx_buf[ PROCESS_BUFFER_SIZE ] = { 0 };
+ int32_t rx_size = 0;
+ rx_size = g2c_generic_read( &g2c, rx_buf, PROCESS_BUFFER_SIZE );
+ if ( rx_size > 0 )
+ {
+ int32_t buf_cnt = app_buf_len;
+ if ( ( ( app_buf_len + rx_size ) > PROCESS_BUFFER_SIZE ) && ( app_buf_len > 0 ) )
+ {
+ buf_cnt = PROCESS_BUFFER_SIZE - ( ( app_buf_len + rx_size ) - PROCESS_BUFFER_SIZE );
+ memmove ( app_buf, &app_buf[ PROCESS_BUFFER_SIZE - buf_cnt ], buf_cnt );
+ }
+ for ( int32_t rx_cnt = 0; rx_cnt < rx_size; rx_cnt++ )
+ {
+ if ( rx_buf[ rx_cnt ] )
+ {
+ app_buf[ buf_cnt++ ] = rx_buf[ rx_cnt ];
+ if ( app_buf_len < PROCESS_BUFFER_SIZE )
+ {
+ app_buf_len++;
+ }
+ }
+ }
+ return G2C_OK;
+ }
+ return G2C_ERROR;
+}
- log_printf( &logger, ">> DEVICE \r\n" );
- g2c_send_broker_cfg( &g2c, DEVICE_KEY, DEVICE_PASSWORD );
+static err_t g2c_rsp_check ( uint8_t *rsp )
+{
+ uint32_t timeout_cnt = 0;
+ uint32_t timeout = 120000;
+ g2c_clear_app_buf( );
g2c_process( );
-
- log_printf( &logger, ">> AT BRC \r\n" );
- g2c_send_command( &g2c, AT_BRC );
+ while ( ( 0 == strstr( app_buf, rsp ) ) &&
+ ( 0 == strstr( app_buf, G2C_RSP_ERROR ) ) )
+ {
+ g2c_process( );
+ if ( timeout_cnt++ > timeout )
+ {
+ g2c_clear_app_buf( );
+ return G2C_ERROR_TIMEOUT;
+ }
+ Delay_ms( 1 );
+ }
+ Delay_ms( 100 );
g2c_process( );
+ if ( strstr( app_buf, rsp ) )
+ {
+ return G2C_OK;
+ }
+ else if ( strstr( app_buf, G2C_RSP_ERROR ) )
+ {
+ return G2C_ERROR_CMD;
+ }
+ else
+ {
+ return G2C_ERROR_UNKNOWN;
+ }
+}
- Delay_ms( 3000 );
+static void g2c_error_check ( err_t error_flag )
+{
+ switch ( error_flag )
+ {
+ case G2C_OK:
+ {
+ g2c_log_app_buf( );
+ break;
+ }
+ case G2C_ERROR:
+ {
+ log_error( &logger, " Overflow!" );
+ break;
+ }
+ case G2C_ERROR_TIMEOUT:
+ {
+ log_error( &logger, " Timeout!" );
+ break;
+ }
+ case G2C_ERROR_CMD:
+ {
+ log_error( &logger, " CMD!" );
+ break;
+ }
+ case G2C_ERROR_UNKNOWN:
+ default:
+ {
+ log_error( &logger, " Unknown!" );
+ break;
+ }
+ }
+ Delay_ms( 500 );
}
-void application_task ( void )
+static void g2c_log_app_buf ( void )
{
- g2c_process( );
- actuator_demo( current_parser_buf );
-
- if ( send_data_cnt == 5 )
+ for ( int32_t buf_cnt = 0; buf_cnt < app_buf_len; buf_cnt++ )
{
- log_printf( &logger, ">> ACTUATOR REF \r\n" );
- g2c_send_data_ref( &g2c, ACTUATOR_STR_REF, data_buf );
- g2c_process( );
-
- log_printf( &logger, ">> AT PUB \r\n" );
- g2c_send_command( &g2c, AT_PUB );
- g2c_process( );
- send_data_cnt = 0;
+ log_printf( &logger, "%c", app_buf[ buf_cnt ] );
}
- send_data_cnt++;
}
-void main ( void )
+static err_t g2c_connect_to_network ( void )
{
- application_init( );
+ err_t func_error = G2C_OK;
+ Delay_ms ( 500 );
+
+ // Enable connector module
+ #define ENABLE_CONNECTOR_MODULE "1"
+ g2c_send_cmd_with_par( &g2c, G2C_CMD_CEN, ENABLE_CONNECTOR_MODULE );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ func_error |= error_flag;
+ g2c_error_check( error_flag );
+
+ // Enable DHCP
+ #define ENABLE_DHCP "1"
+ g2c_send_cmd_with_par( &g2c, G2C_CMD_NWP, ENABLE_DHCP );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ func_error |= error_flag;
+ g2c_error_check( error_flag );
+
+ // Set network credentials
+ g2c_set_net_creds( &g2c, WIFI_SSID, WIFI_PASS );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ func_error |= error_flag;
+ g2c_error_check( error_flag );
+
+ // Connect to network
+ #define CONNECT_TO_NETWORK "1"
+ g2c_send_cmd_with_par( &g2c, G2C_CMD_NWC, CONNECT_TO_NETWORK );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ func_error |= error_flag;
+ g2c_error_check( error_flag );
+
+ Delay_ms ( 5000 );
+ return func_error;
+}
+
+static err_t g2c_connect_to_cloud ( void )
+{
+ err_t func_error = G2C_OK;
+ Delay_ms ( 500 );
+
+ g2c_set_broker_creds( &g2c, DEVICE_KEY, DEVICE_PASSWORD );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ func_error |= error_flag;
+ g2c_error_check( error_flag );
+
+ // Connect to broker
+ #define CONNECT_TO_BROKER "1"
+ g2c_send_cmd_with_par( &g2c, G2C_CMD_BRC, CONNECT_TO_BROKER );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ func_error |= error_flag;
+ g2c_error_check( error_flag );
+
+ Delay_ms ( 5000 );
+ return func_error;
+}
- for ( ; ; )
+static err_t g2c_example ( void )
+{
+ err_t func_error = G2C_OK;
+
+ #define ACTUATOR_WAIT_TIME_MS 10000 // This setting also affects the sensor data update rate
+ #define TEMPERATURE_MIN -20
+ #define TEMPERATURE_MAX 80
+ #define TEMPERATURE_STEP 5
+ static int8_t temperature = TEMPERATURE_MIN;
+ uint8_t cmd_buf[ 100 ] = { 0 };
+ uint8_t temperature_buf[ 10 ] = { 0 };
+ uint8_t cmd_separator[ 2 ] = { ',', 0 };
+ uint8_t quote_mark[ 2 ] = { '\"', 0 };
+
+ int8_to_str( temperature, temperature_buf );
+ l_trim( temperature_buf );
+ r_trim( temperature_buf );
+
+ // Store data to the internal memory.
+ strcpy( cmd_buf, quote_mark );
+ strcat( cmd_buf, DEVICE_SENSOR_REF );
+ strcat( cmd_buf, quote_mark );
+ strcat( cmd_buf, cmd_separator );
+ strcat( cmd_buf, quote_mark );
+ strcat( cmd_buf, temperature_buf );
+ strcat( cmd_buf, quote_mark );
+ g2c_send_cmd_with_par( &g2c, G2C_CMD_DSET, cmd_buf );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ func_error |= error_flag;
+ g2c_error_check( error_flag );
+ Delay_ms ( 500 );
+
+ // Publish data to the cloud
+ g2c_send_cmd( &g2c, G2C_CMD_PUB );
+ error_flag = g2c_rsp_check( G2C_RSP_OK );
+ func_error |= error_flag;
+ g2c_error_check( error_flag );
+ g2c_clear_app_buf( );
+
+ temperature += TEMPERATURE_STEP;
+ if ( temperature > TEMPERATURE_MAX )
{
- application_task( );
+ temperature = TEMPERATURE_MIN;
}
+
+ // Check for the actuator response
+ for ( uint32_t act_wait_cnt = 0; act_wait_cnt < ACTUATOR_WAIT_TIME_MS; act_wait_cnt++ )
+ {
+ g2c_process ( );
+ if ( app_buf_len )
+ {
+ g2c_log_app_buf ( );
+ g2c_clear_app_buf ( );
+ }
+ Delay_1ms ( );
+ }
+
+ return func_error;
}
// ------------------------------------------------------------------------ END
diff --git a/clicks/g2c/example/manifest.exm b/clicks/g2c/example/manifest.exm
index 63fa2afee9..48237424c7 100644
--- a/clicks/g2c/example/manifest.exm
+++ b/clicks/g2c/example/manifest.exm
@@ -1,8 +1,8 @@
{
"name": "G2C Click",
- "description": "Go to Cloud (G2C) click is a gateway Click board™ which provides a simple and reliable connection to the Click Cloud platform",
+ "description": "Go to Cloud (G2C) click is a gateway Click board™ which provides a simple and reliable connection to the Click Cloud platform, a cloud-based rapid prototyping environment, hosted by MikroElektronika. Go to Cloud (G2C) click offers an unprecedented simplicity for adding Click Cloud connectivity to any embedded application, by utilizing the simple UART interface: it can be configured and managed using a minimal set of well-documented AT commands.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv"],
"hw" : ["click","MK64FN1M0VDC12"],
- "category" : ["WiFi,Cloud Routers"]
+ "category" : ["Click Boards > Wireless connectivity > GSM/LTE"]
}
diff --git a/clicks/g2c/lib_g2c/CMakeLists.txt b/clicks/g2c/lib_g2c/CMakeLists.txt
index 3831eef617..5926be9781 100644
--- a/clicks/g2c/lib_g2c/CMakeLists.txt
+++ b/clicks/g2c/lib_g2c/CMakeLists.txt
@@ -17,7 +17,7 @@ add_library(Click.G2C ALIAS lib_g2c)
-target_include_directories(lib_g2c PUBLIC
+target_include_directories(lib_g2c PUBLIC
include
)
@@ -25,3 +25,4 @@ find_package(MikroC.Core REQUIRED)
target_link_libraries(lib_g2c PUBLIC MikroC.Core)
find_package(MikroSDK.Driver REQUIRED)
target_link_libraries(lib_g2c PUBLIC MikroSDK.Driver)
+
diff --git a/clicks/g2c/lib_g2c/include/g2c.h b/clicks/g2c/lib_g2c/include/g2c.h
index 0ebdf6ef52..bec546fd06 100644
--- a/clicks/g2c/lib_g2c/include/g2c.h
+++ b/clicks/g2c/lib_g2c/include/g2c.h
@@ -1,320 +1,385 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
/*!
- * \file
- *
- * \brief This file contains API for G2C Click driver.
- *
- * \addtogroup g2c G2C Click Driver
- * @{
+ * @file g2c.h
+ * @brief This file contains API for G2C Click Driver.
*/
-// ----------------------------------------------------------------------------
#ifndef G2C_H
#define G2C_H
+#ifdef __cplusplus
+extern "C"{
+#endif
+
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
+/*!
+ * @addtogroup g2c G2C Click Driver
+ * @brief API for configuring and manipulating G2C Click driver.
+ * @{
*/
/**
- * \defgroup map_mikrobus MikroBUS
- * \{
+ * @defgroup g2c_cmd G2C Device Settings
+ * @brief Settings for registers of G2C Click driver.
*/
-#define G2C_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
- cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
- cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
- cfg.cts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
- cfg.rts = MIKROBUS( mikrobus, MIKROBUS_INT )
-/** \} */
/**
- * \defgroup error_code Error Code
- * \{
+ * @addtogroup g2c_cmd
+ * @{
*/
-#define G2C_RETVAL uint8_t
-#define G2C_OK 0x00
-#define G2C_INIT_ERROR 0xFF
-/** \} */
+/**
+ * @brief G2C control commands.
+ * @details Specified setting for control commands of G2C Click driver.
+ */
+#define G2C_CMD_AT "AT" // Communication test
+#define G2C_CMD_GMR "AT+GMR" // Firmware version
+#define G2C_CMD_ATE1 "ATE1" // Enable echo
+#define G2C_CMD_ATE0 "ATE0" // Disable echo
+#define G2C_CMD_RST "AT+RST" // Reset device
+#define G2C_CMD_CRST "AT+CRST" // Connector module reset
+#define G2C_CMD_CEN "AT+CEN" // Enable connector module
+#define G2C_CMD_GPEN "AT+GPEN" // Enable GPIO outputs
+#define G2C_CMD_W "AT+W" // Store configuration
+#define G2C_CMD_R "AT+R" // Restore configuration
+#define G2C_CMD_NWP "AT+NWP" // Network parameters
+#define G2C_CMD_NWCR "AT+NWCR" // Network credentials
+#define G2C_CMD_NWC "AT+NWC" // Connect to network
+#define G2C_CMD_BRCR "AT+BRCR" // Broker credentials
+#define G2C_CMD_BRC "AT+BRC" // Connect to broker
+#define G2C_CMD_ASTA "AT+ASTA" // Actuator status
+#define G2C_CMD_DSET "AT+DSET" // Data set
+#define G2C_CMD_PUB "AT+PUB" // Publish data
/**
- * \defgroup parser_error Parser error
- * \{
+ * @brief G2C device response for AT commands.
+ * @details Device response after commands.
*/
-#define G2C_PARSER_NO_ERROR 0x00
-#define G2C_PARSER_ERROR_REF 0x01
-#define G2C_PARSER_ERROR_CMD 0x02
-#define G2C_PARSER_ERROR_DATA 0x04
-/** \} */
+#define G2C_RSP_OK "OK"
+#define G2C_RSP_ERROR "ERROR"
+#define G2C_RSP_ERR "+ERR"
+#define G2C_RSP_ACT "+ACT"
/**
- * \defgroup click_status G2C 3G click status
- * \{
+ * @brief G2C driver buffer size.
+ * @details Specified size of driver ring buffer.
+ * @note Increase buffer size if needed.
*/
-#define G2C_STATUS_DEVICE_READY 1
-#define G2C_STATUS_ACT_NETWORK_AND_BROKER 4
-#define G2C_STATUS_ACT_NETWORK 2
-#define G2C_STATUS_ACT_BROKER 3
-#define G2C_STATUS_DEVICE_BUSY 0
-/** \} */
+#define G2C_TX_DRV_BUFFER_SIZE 300
+#define G2C_RX_DRV_BUFFER_SIZE 300
+
+/*! @} */ // g2c_cmd
/**
- * \defgroup module_state Module power state
- * \{
+ * @defgroup g2c_map G2C MikroBUS Map
+ * @brief MikroBUS pin mapping of G2C Click driver.
*/
-#define G2C_MODULE_POWER_ON 1
-#define G2C_MODULE_POWER_OFF 0
-/** \} */
/**
- * \defgroup driver Driver define
- * \{
+ * @addtogroup g2c_map
+ * @{
*/
-#define DRV_RX_BUFFER_SIZE 500
-/** \} */
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
/**
- * \defgroup type Types
- * \{
+ * @brief MikroBUS pin mapping.
+ * @details Mapping pins of G2C Click to the selected MikroBUS.
*/
+#define G2C_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
+ cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
+ cfg.gp0 = MIKROBUS( mikrobus, MIKROBUS_AN ); \
+ cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
+ cfg.cts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
+ cfg.gp1 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
+ cfg.rts = MIKROBUS( mikrobus, MIKROBUS_INT );
+
+/*! @} */ // g2c_map
+/*! @} */ // g2c
+
/**
- * @brief Click ctx object definition.
+ * @brief G2C Click context object.
+ * @details Context object definition of G2C Click driver.
*/
typedef struct
{
- // Output pins
-
- digital_out_t rst;
- digital_out_t cts;
+ // Output pins
+ digital_out_t rst; /**< Reset pin. */
+ digital_out_t cts; /**< Clear to send pin. */
- // Input pins
+ // Input pins
+ digital_in_t gp0; /**< General purpose 0 pin. */
+ digital_in_t gp1; /**< General purpose 1 pin. */
+ digital_in_t rts; /**< Request to send pin. */
- digital_in_t rts;
-
- // Modules
+ // Modules
+ uart_t uart; /**< UART driver object. */
- uart_t uart;
-
- char uart_rx_buffer[ DRV_RX_BUFFER_SIZE ];
- char uart_tx_buffer[ DRV_RX_BUFFER_SIZE ];
+ // Buffers
+ uint8_t uart_rx_buffer[ G2C_RX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
+ uint8_t uart_tx_buffer[ G2C_TX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
} g2c_t;
/**
- * @brief Click configuration structure definition.
+ * @brief G2C Click configuration object.
+ * @details Configuration object definition of G2C Click driver.
*/
typedef struct
{
- // Communication gpio pins
-
- pin_name_t rx_pin;
- pin_name_t tx_pin;
-
- // Additional gpio pins
-
- pin_name_t rst;
- pin_name_t cts;
- pin_name_t rts;
-
- // static variable
-
- uint32_t baud_rate; // Clock speed.
- bool uart_blocking;
- uart_data_bits_t data_bit; // Data bits.
- uart_parity_t parity_bit; // Parity bit.
- uart_stop_bits_t stop_bit; // Stop bits.
+ // Communication gpio pins
+ pin_name_t rx_pin; /**< RX pin. */
+ pin_name_t tx_pin; /**< TX pin. */
+
+ // Additional gpio pins
+ pin_name_t gp0; /**< General purpose 0 pin. */
+ pin_name_t rst; /**< Reset pin. */
+ pin_name_t cts; /**< Clear to send pin. */
+ pin_name_t gp1; /**< General purpose 1 pin. */
+ pin_name_t rts; /**< Request to send pin. */
+
+ // Static variable
+ uint32_t baud_rate; /**< Clock speed. */
+ bool uart_blocking; /**< Wait for interrupt or not. */
+ uart_data_bits_t data_bit; /**< Data bits. */
+ uart_parity_t parity_bit; /**< Parity bit. */
+ uart_stop_bits_t stop_bit; /**< Stop bits. */
} g2c_cfg_t;
/**
- * @brief Error type
+ * @brief G2C Click return value data.
+ * @details Predefined enum values for driver return values.
*/
-// Actuator switch type
-typedef uint8_t g2c_actuator_sw_t;
+typedef enum
+{
+ G2C_OK = 0,
+ G2C_ERROR = -1,
+ G2C_ERROR_TIMEOUT = -2,
+ G2C_ERROR_CMD = -3,
+ G2C_ERROR_UNKNOWN = -4
-// Actuator counter type
-typedef int16_t g2c_actuator_cnt_t;
+} g2c_return_value_t;
-// Actuator string type
-typedef char g2c_actuator_str_t;
+/*!
+ * @addtogroup g2c G2C Click Driver
+ * @brief API for configuring and manipulating G2C Click driver.
+ * @{
+ */
-// Parser error type
-typedef uint8_t g2c_error_t;
+/**
+ * @brief G2C configuration object setup function.
+ * @details This function initializes click configuration structure to initial
+ * values.
+ * @param[out] cfg : Click configuration structure.
+ * See #g2c_cfg_t object definition for detailed explanation.
+ * @return Nothing.
+ * @note The all used pins will be set to unconnected state.
+ */
+void g2c_cfg_setup ( g2c_cfg_t *cfg );
-/** \} */ // End types group
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
+/**
+ * @brief G2C initialization function.
+ * @details This function initializes all necessary pins and peripherals used
+ * for this click board.
+ * @param[out] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @param[in] cfg : Click configuration structure.
+ * See #g2c_cfg_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t g2c_init ( g2c_t *ctx, g2c_cfg_t *cfg );
/**
- * \defgroup public_function Public function
- * \{
+ * @brief G2C data writing function.
+ * @details This function writes a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @param[in] data_in : Data buffer for sending.
+ * @param[in] len : Number of bytes for sending.
+ * @return @li @c >=0 - Success,
+ * @li @c <0 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
*/
-
-#ifdef __cplusplus
-extern "C"{
-#endif
+err_t g2c_generic_write ( g2c_t *ctx, uint8_t *data_in, uint16_t len );
/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
+ * @brief G2C data reading function.
+ * @details This function reads a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @param[out] data_out : Output read data.
+ * @param[in] len : Number of bytes to be read.
+ * @return @li @c >0 - Number of data bytes read,
+ * @li @c <=0 - Error/Empty Ring buffer.
+ * See #err_t definition for detailed explanation.
+ * @note None.
*/
-void g2c_cfg_setup ( g2c_cfg_t *cfg );
+err_t g2c_generic_read ( g2c_t *ctx, uint8_t *data_out, uint16_t len );
/**
- * @brief Initialization function.
- *
- * @param g2c Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
+ * @brief G2C set cts pin function.
+ * @details This function sets the Clear to Send (CTS) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @param[in] state : Pin logic state.
+ * @return None.
+ * @note None.
*/
-G2C_RETVAL g2c_init ( g2c_t *ctx, g2c_cfg_t *cfg );
+void g2c_set_cts_pin ( g2c_t *ctx, uint8_t state );
/**
- * @brief Power module.
- *
- * @param g2c Click object.
- * @param power_state State of pin.
- * @param bootloader Bootloader ( 0 or 1 ).
+ * @brief G2C set rst pin function.
+ * @details This function sets the RST pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @param[in] state : Pin logic state.
+ * @return None.
+ * @note None.
*/
-void g2c_module_power( g2c_t *ctx, uint8_t power_state, uint8_t bootloader );
+void g2c_set_rst_pin ( g2c_t *ctx, uint8_t state );
/**
- * @brief Reset module.
- *
- * @param g2c Click object.
+ * @brief G2C get gp0 pin function.
+ * @details This function returns the GPIO 0 pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
*/
-void g2c_reset ( g2c_t *ctx );
+uint8_t g2c_get_gp0_pin ( g2c_t *ctx );
/**
- * @brief Generic write function.
- *
- * @param g2c Click object.
- * @param data_buf Data buffer for sends.
- * @param len Number of bytes for sends.
+ * @brief G2C get gp1 pin function.
+ * @details This function returns the GPIO 1 pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
*/
-void g2c_generic_write ( g2c_t *ctx, char *data_buf, uint16_t len );
+uint8_t g2c_get_gp1_pin ( g2c_t *ctx );
/**
- * @brief Generic read function.
- *
- * @param g2c Click object.
- * @param data_buf Data buffer for read data.
- * @param max_len The maximum length of data that can be read.
- *
- * @return Number of reads data.
+ * @brief G2C get rts pin function.
+ * @details This function returns the Request to Send (RTS) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
*/
-int32_t g2c_generic_read ( g2c_t *ctx, char *data_buf, uint16_t max_len );
+uint8_t g2c_get_rts_pin ( g2c_t *ctx );
/**
- * @brief Function for send command.
- *
- * @param g2c Click object.
- * @param command Command to send.
+ * @brief G2C reset device function.
+ * @details This function resets the device by toggling the RST pin.
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @return None.
+ * @note None.
*/
-void g2c_send_command ( g2c_t *ctx, char *command );
+void g2c_reset_device ( g2c_t *ctx );
/**
- * @brief Operater ( Network ) configuration.
- *
- * @param g2c Click object.
- * @param op_username Network username.
- * @param op_password Network password.
+ * @brief G2C send command function.
+ * @details This function sends a specified command to the click module.
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @param[in] cmd : Command variable.
+ * @return Nothing.
+ * @note None.
*/
-void g2c_send_operator_cfg( g2c_t *ctx, char *op_username, char *op_password );
+void g2c_send_cmd ( g2c_t *ctx, uint8_t *cmd );
/**
- * @brief Broker configuration.
- *
- * @param g2c Click object.
- * @param brc_key Device key.
- * @param brc_password Device password.
+ * @brief G2C send command function with parameter.
+ * @details This function sends a command with specified parameter to the click module.
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @param[in] param_buf : Parameter buffer.
+ * @return Nothing.
+ * @note None.
*/
-void g2c_send_broker_cfg( g2c_t *ctx, char *brc_key, char *brc_password );
+void g2c_send_cmd_with_par ( g2c_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf );
/**
- * @brief Send data reference.
- *
- * @param g2c Click object.
- * @param reference_buf Reference.
- * @param data_buf
+ * @brief G2C check the sent command.
+ * @details This function checks the command that is sent.
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @return Nothing.
+ * @note None.
*/
-void g2c_send_data_ref( g2c_t *ctx, char *reference_buf, char *data_buf );
+void g2c_send_cmd_check ( g2c_t *ctx, uint8_t *at_cmd_buf );
/**
- * @brief Switch parser function.
- *
- * @param g2c Click object.
- * @param act_ref Actuator reference.
- * @param sw_state Switch state of pin.
- *
- * @return error data
+ * @brief G2C check the command parameters.
+ * @details This function checks the command that is sent.
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @return Nothing.
+ * @note None.
*/
-g2c_error_t g2c_actuator_sw_parser ( char *rsp, char *act_ref, g2c_actuator_sw_t *sw_state );
+void g2c_send_cmd_par_check ( g2c_t *ctx, uint8_t *at_cmd_buf );
/**
- * @brief Counter parser function.
- *
- * @param g2c Click object.
- * @param act_ref Actuator reference.
- * @param num_data Number of data.
- *
- * @return error data
+ * @brief G2C set network credentials.
+ * @details This function sets the WiFi network credentials.
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @param[in] wifi_ssid : WiFi SSID.
+ * @param[in] wifi_pass : WiFi Password.
+ * @return Nothing.
+ * @note None.
*/
-g2c_error_t g2c_actuator_cnt_parser ( char *rsp, char *act_ref, g2c_actuator_cnt_t *num_data );
+void g2c_set_net_creds ( g2c_t *ctx, uint8_t *wifi_ssid, uint8_t *wifi_pass );
/**
- * @brief String parser function.
- *
- * @param g2c Click object.
- * @param act_ref Actuator reference.
- * @param str_data String to send.
- *
- * @return error data
+ * @brief G2C set broker credentials.
+ * @details This function sets the broker credentials (device key and password).
+ * @param[in] ctx : Click context object.
+ * See #g2c_t object definition for detailed explanation.
+ * @param[in] dev_key : Device key.
+ * @param[in] password : Device password.
+ * @return Nothing.
+ * @note None.
*/
-g2c_error_t g2c_actuator_str_parser ( char *rsp, char *act_ref, g2c_actuator_str_t *str_data );
+void g2c_set_broker_creds ( g2c_t *ctx, uint8_t *dev_key, uint8_t *password );
#ifdef __cplusplus
}
#endif
-#endif // _G2C_H_
+#endif // G2C_H
+
+/*! @} */ // g2c
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
+// ------------------------------------------------------------------------ END
diff --git a/clicks/g2c/lib_g2c/src/g2c.c b/clicks/g2c/lib_g2c/src/g2c.c
index ff4879c7a7..cc5daa30a5 100644
--- a/clicks/g2c/lib_g2c/src/g2c.c
+++ b/clicks/g2c/lib_g2c/src/g2c.c
@@ -1,89 +1,57 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
/*!
- * \file
- *
+ * @file g2c.c
+ * @brief G2C Click Driver.
*/
#include "g2c.h"
-#include "string.h"
-
-// ------------------------------------------------------------- PRIVATE MACROS
-
-#define OPERATOR_CMD "AT+NWCR"
-#define BROKER_CMD "AT+BRCR"
-#define DATA_CMD "AT+DSET"
-
-// Buffer
-#define G2C_BUF_FIRST_CMD "=\""
-#define G2C_BUF_MID_CMD "\",\""
-#define G2C_BUF_END_CMD "\""
-
-#define G2C_RSP_CMD_ACT "+ACT"
-#define G2C_RSP_CMD_ACT_LEN 4
-// ACTUATOR SWITCH PARSER
-#define G2C_RSP_STATE_TRUE "true"
-#define G2C_RSP_STATE_TRUE_LEN 4
-#define G2C_RSP_STATE_FALSE "false"
-#define G2C_RSP_STATE_FALSE_LEN 5
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void g2c_cfg_setup ( g2c_cfg_t *cfg )
+void g2c_cfg_setup ( g2c_cfg_t *cfg )
{
- // Communication gpio pins
-
+ // Communication gpio pins
cfg->rx_pin = HAL_PIN_NC;
cfg->tx_pin = HAL_PIN_NC;
-
- // Additional gpio pins
+ // Additional gpio pins
+ cfg->gp0 = HAL_PIN_NC;
cfg->rst = HAL_PIN_NC;
- cfg->cts = HAL_PIN_NC;
+ cfg->cts = HAL_PIN_NC;
+ cfg->gp1 = HAL_PIN_NC;
cfg->rts = HAL_PIN_NC;
- cfg->baud_rate = 57600;
- cfg->data_bit = UART_DATA_BITS_DEFAULT;
- cfg->parity_bit = UART_PARITY_DEFAULT;
- cfg->stop_bit = UART_STOP_BITS_DEFAULT;
- cfg->uart_blocking = false;
+ cfg->baud_rate = 57600;
+ cfg->data_bit = UART_DATA_BITS_DEFAULT;
+ cfg->parity_bit = UART_PARITY_DEFAULT;
+ cfg->stop_bit = UART_STOP_BITS_DEFAULT;
+ cfg->uart_blocking = false;
}
-G2C_RETVAL g2c_init ( g2c_t *ctx, g2c_cfg_t *cfg )
+err_t g2c_init ( g2c_t *ctx, g2c_cfg_t *cfg )
{
uart_config_t uart_cfg;
- // Output pins
-
- digital_out_init( &ctx->rst, cfg->rst );
- digital_out_init( &ctx->cts, cfg->cts );
-
- // Input pins
- digital_in_init( &ctx->rts, cfg->rts );
-
+ // Default config
uart_configure_default( &uart_cfg );
// Ring buffer mapping
@@ -91,306 +59,170 @@ G2C_RETVAL g2c_init ( g2c_t *ctx, g2c_cfg_t *cfg )
ctx->uart.rx_ring_buffer = ctx->uart_rx_buffer;
// UART module config
- uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
- uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
- uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
+ uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
+ uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
+ uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
uart_cfg.rx_ring_size = sizeof( ctx->uart_rx_buffer );
- uart_open( &ctx->uart, &uart_cfg );
+ if ( UART_ERROR == uart_open( &ctx->uart, &uart_cfg ) )
+ {
+ return UART_ERROR;
+ }
uart_set_baud( &ctx->uart, cfg->baud_rate );
uart_set_parity( &ctx->uart, cfg->parity_bit );
- uart_set_stop_bits( &ctx->uart, cfg->stop_bit );
+ uart_set_stop_bits( &ctx->uart, cfg->stop_bit );
uart_set_data_bits( &ctx->uart, cfg->data_bit );
uart_set_blocking( &ctx->uart, cfg->uart_blocking );
- return G2C_OK;
-}
+ // Output pins
+ digital_out_init( &ctx->rst, cfg->rst );
+ digital_out_init( &ctx->cts, cfg->cts );
-void g2c_module_power( g2c_t *ctx, uint8_t power_state, uint8_t bootloader )
-{
- if ( 0 != power_state )
- {
-// POWER ON SEQUENCE
- digital_out_high( &ctx->rst );
- }
- else
- {
-// POWER OFF SEQUENCE
- digital_out_low( &ctx->rst );
- }
-
- if ( bootloader == 0 )
- {
- digital_out_high( &ctx->cts );
-
- // 5 sec wait wake up module
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- }
- else
- {
- digital_out_low( &ctx->cts ); // bootloadre
+ // Input pins
+ digital_in_init( &ctx->gp0, cfg->gp0 );
+ digital_in_init( &ctx->gp1, cfg->gp1 );
+ digital_in_init( &ctx->rts, cfg->rts );
- // Wait for the module to get out of the bootloader
- // 7 sec wait bootloader
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- }
+ digital_out_low ( &ctx->cts );
+ digital_out_low ( &ctx->rst );
+ Delay_100ms ( );
+
+ return UART_SUCCESS;
}
-void g2c_reset ( g2c_t *ctx )
+err_t g2c_generic_write ( g2c_t *ctx, uint8_t *data_in, uint16_t len )
{
- Delay_100ms( );
- digital_out_low( &ctx->rst );
- Delay_100ms( );
- Delay_100ms( );
- digital_out_high( &ctx->rst );
- Delay_1sec( );
+ return uart_write( &ctx->uart, data_in, len );
}
-void g2c_generic_write ( g2c_t *ctx, char *data_buf, uint16_t len )
+err_t g2c_generic_read ( g2c_t *ctx, uint8_t *data_out, uint16_t len )
{
- uart_write( &ctx->uart, data_buf, len );
+ return uart_read( &ctx->uart, data_out, len );
}
-int32_t g2c_generic_read ( g2c_t *ctx, char *data_buf, uint16_t max_len )
+void g2c_set_cts_pin ( g2c_t *ctx, uint8_t state )
{
- return uart_read( &ctx->uart, data_buf, max_len );
+ digital_out_write( &ctx->cts, state );
}
-void g2c_send_command ( g2c_t *ctx, char *command )
+void g2c_set_rst_pin ( g2c_t *ctx, uint8_t state )
{
- char tmp_buf[ 100 ];
- uint8_t len;
- memset( tmp_buf, 0, 100 );
- len = strlen( command );
-
- strncpy( tmp_buf, command, len );
- strcat( tmp_buf, "\r" );
-
- g2c_generic_write( ctx, tmp_buf, strlen( tmp_buf ) );
+ digital_out_write( &ctx->rst, state );
}
-void g2c_send_operator_cfg( g2c_t *ctx, char *op_username, char *op_password )
+uint8_t g2c_get_gp0_pin ( g2c_t *ctx )
{
- char tmp_buf[ 100 ];
- memset( tmp_buf, 0, 100 );
-
- strcat( tmp_buf, OPERATOR_CMD );
- strcat( tmp_buf, G2C_BUF_FIRST_CMD );
- strcat( tmp_buf, op_username );
- strcat( tmp_buf, G2C_BUF_MID_CMD );
- strcat( tmp_buf, op_password );
- strcat( tmp_buf, G2C_BUF_END_CMD );
- strcat( tmp_buf, "\r" );
-
- g2c_generic_write( ctx, tmp_buf, strlen( tmp_buf ) );
+ return digital_in_read( &ctx->gp0 );
}
-void g2c_send_broker_cfg( g2c_t *ctx, char *brc_key, char *brc_password )
+uint8_t g2c_get_gp1_pin ( g2c_t *ctx )
{
- uint8_t tmp_buf[ 100 ];
- memset( tmp_buf, 0, 100 );
-
- strcat( tmp_buf, BROKER_CMD );
- strcat( tmp_buf, G2C_BUF_FIRST_CMD );
- strcat( tmp_buf, brc_key );
- strcat( tmp_buf, G2C_BUF_MID_CMD );
- strcat( tmp_buf, brc_password );
- strcat( tmp_buf, G2C_BUF_END_CMD );
- strcat( tmp_buf, "\r" );
-
- g2c_generic_write( ctx, tmp_buf, strlen(tmp_buf));
+ return digital_in_read( &ctx->gp1 );
}
-void g2c_send_data_ref( g2c_t *ctx, char *reference_buf, char *data_buf )
+uint8_t g2c_get_rts_pin ( g2c_t *ctx )
{
- uint8_t tmp_buf[ 100 ];
- memset( tmp_buf, 0, 100 );
-
- strcat( tmp_buf, DATA_CMD );
- strcat( tmp_buf, G2C_BUF_FIRST_CMD );
- strcat( tmp_buf, reference_buf );
- strcat( tmp_buf, G2C_BUF_MID_CMD );
- strcat( tmp_buf, data_buf );
- strcat( tmp_buf, G2C_BUF_END_CMD );
- strcat( tmp_buf, "\r" );
-
- g2c_generic_write( ctx, tmp_buf, strlen(tmp_buf));
+ return digital_in_read( &ctx->rts );
}
-g2c_error_t g2c_actuator_sw_parser( char *rsp, char *act_ref, g2c_actuator_sw_t *sw_state )
+void g2c_reset_device ( g2c_t *ctx )
{
- uint8_t err;
- uint8_t tmp_storage[ 10 ];
- uint8_t len;
-
- // Buffer erase
- memset( tmp_storage, 0, 10 );
- err = G2C_PARSER_NO_ERROR;
-
- // Checking commands
- if ( 0 == strncmp( G2C_RSP_CMD_ACT, rsp + 2, G2C_RSP_CMD_ACT_LEN ) )
- {
- len = strlen( act_ref );
-
- // Checking reference
- if ( 0 == strncmp( act_ref, rsp + 9, len ) )
- {
- len = len + 12;
- strcpy( tmp_storage, rsp + len );
+ digital_out_low ( &ctx->rst );
+ Delay_100ms ( );
+ Delay_100ms ( );
+ Delay_100ms ( );
+ digital_out_high ( &ctx->rst );
+ Delay_1sec ( );
+ Delay_1sec ( );
+ Delay_1sec ( );
+ Delay_1sec ( );
+ Delay_1sec ( );
+ Delay_1sec ( );
+ Delay_1sec ( );
+ Delay_1sec ( );
+ Delay_1sec ( );
+ Delay_1sec ( );
+}
- // Checking data
- if ( 0 == strncmp( tmp_storage, G2C_RSP_STATE_TRUE, G2C_RSP_STATE_TRUE_LEN ) )
- {
- *sw_state = 1;
- }
- else if ( 0 == strncmp( tmp_storage, G2C_RSP_STATE_FALSE, G2C_RSP_STATE_FALSE_LEN ) )
- {
- *sw_state = 0;
- }
- else
- {
- err |= G2C_PARSER_ERROR_DATA;
- }
- }
- else
- {
- err |= G2C_PARSER_ERROR_REF;
- }
- }
- else
+void g2c_send_cmd ( g2c_t *ctx, uint8_t *cmd )
+{
+ uint8_t carriage_return = 13;
+ while ( *cmd != 0 )
{
- err |= G2C_PARSER_ERROR_CMD;
+ uart_write( &ctx->uart, cmd, 1 );
+ cmd++;
}
- return err;
+ uart_write( &ctx->uart, &carriage_return, 1 );
+ Delay_100ms( );
}
-g2c_error_t g2c_actuator_cnt_parser( char *rsp, char *act_ref, g2c_actuator_cnt_t *num_data )
+void g2c_send_cmd_with_par ( g2c_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf )
{
- uint8_t err;
- uint8_t tmp_storage[ 10 ];
- uint8_t len;
- uint8_t cnt;
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t equal_mark[ 2 ] = { '=', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, equal_mark );
+ strcat( final_cmd, param_buf );
- uint8_t num_len = 0;
- uint8_t tmp_data_u8 = 0;
+ g2c_send_cmd( ctx, final_cmd );
+}
- // Buffer erase
- memset( tmp_storage, 0, 10 );
- err = G2C_PARSER_NO_ERROR;
- *num_data = 0;
+void g2c_send_cmd_check ( g2c_t *ctx, uint8_t *at_cmd_buf )
+{
+ uint8_t final_cmd[ 22 ] = { 0 };
+ uint8_t check_mark[ 2 ] = { '?', 0 };
- // Checking commands
- if ( 0 == strncmp( G2C_RSP_CMD_ACT, rsp + 2, G2C_RSP_CMD_ACT_LEN ) )
- {
- len = strlen( act_ref );
-
- // Checking reference
- if ( 0 == strncmp( act_ref, rsp + 9, len ) )
- {
- len = len + 12;
- strcpy( tmp_storage, rsp + len );
-
- num_len = strlen( tmp_storage );
-
- // Checking data
- if ( num_len != 0 )
- {
- for( cnt = 0; cnt < num_len; cnt++ )
- {
- if( ( tmp_storage[ cnt ] >= '0' ) && ( tmp_storage[ cnt ] <= '9' ) )
- {
- *num_data *= 10;
- tmp_data_u8 = tmp_storage[ cnt ];
- *num_data += ( tmp_data_u8 - 48 );
- }
- }
- }
- else
- {
- err |= G2C_PARSER_ERROR_DATA;
- }
- }
- else
- {
- err |= G2C_PARSER_ERROR_REF;
- }
- }
- else
- {
- err |= G2C_PARSER_ERROR_CMD;
- }
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, check_mark );
- return err;
+ g2c_send_cmd( ctx, final_cmd );
}
-g2c_error_t g2c_actuator_str_parser( char *rsp, char *act_ref, g2c_actuator_str_t *str_data )
+void g2c_send_cmd_par_check ( g2c_t *ctx, uint8_t *at_cmd_buf )
{
- uint8_t err;
- uint8_t tmp_storage[ 200 ];
- uint8_t len;
- uint16_t data_len;
- uint16_t str_cnt = 0;
- uint16_t cnt;
+ uint8_t final_cmd[ 23 ] = { 0 };
+ uint8_t test_cmd_mark[ 3 ] = { '=', '?', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, test_cmd_mark );
+
+ g2c_send_cmd( ctx, final_cmd );
+}
- // Buffer erase
- memset( tmp_storage, 0, 10 );
- err = G2C_PARSER_NO_ERROR;
+void g2c_set_net_creds ( g2c_t *ctx, uint8_t *wifi_ssid, uint8_t *wifi_pass )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t cmd_separator[ 2 ] = { ',', 0 };
+ uint8_t quote_mark[ 2 ] = { '\"', 0 };
- // Checking command
- if ( 0 == strncmp( G2C_RSP_CMD_ACT, rsp + 2, G2C_RSP_CMD_ACT_LEN ) )
- {
- len = strlen( act_ref );
+ strcpy( final_cmd, quote_mark );
+ strcat( final_cmd, wifi_ssid );
+ strcat( final_cmd, quote_mark );
+ strcat( final_cmd, cmd_separator );
+ strcat( final_cmd, quote_mark );
+ strcat( final_cmd, wifi_pass );
+ strcat( final_cmd, quote_mark );
+
+ g2c_send_cmd_with_par( ctx, G2C_CMD_NWCR, final_cmd );
+}
- // Checking reference
- if ( 0 == strncmp( act_ref, rsp + 9, len ) )
- {
- len = len + 12;
- strcpy( tmp_storage, rsp + len );
-
- data_len = strlen( tmp_storage );
-
- // Checking data
- if( data_len != 0 )
- {
- for( cnt = 0; cnt < data_len; cnt++ )
- {
- if ( tmp_storage[ cnt ] != '"' )
- {
- str_data[str_cnt++] = tmp_storage[ cnt ];
- }
- else
- {
- break;
- }
- }
- }
- else
- {
- err |= G2C_PARSER_ERROR_DATA;
- }
- }
- else
- {
- err |= G2C_PARSER_ERROR_REF;
- }
- }
- else
- {
- err |= G2C_PARSER_ERROR_CMD;
- }
- return err;
+void g2c_set_broker_creds ( g2c_t *ctx, uint8_t *dev_key, uint8_t *password )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t cmd_separator[ 2 ] = { ',', 0 };
+ uint8_t quote_mark[ 2 ] = { '\"', 0 };
+
+ strcpy( final_cmd, quote_mark );
+ strcat( final_cmd, dev_key );
+ strcat( final_cmd, quote_mark );
+ strcat( final_cmd, cmd_separator );
+ strcat( final_cmd, quote_mark );
+ strcat( final_cmd, password );
+ strcat( final_cmd, quote_mark );
+
+ g2c_send_cmd_with_par( ctx, G2C_CMD_BRCR, final_cmd );
}
// ------------------------------------------------------------------------- END
-
diff --git a/clicks/gsm/CHANGELOG.md b/clicks/gsm/CHANGELOG.md
index 8bafaaf891..283ee8b874 100644
--- a/clicks/gsm/CHANGELOG.md
+++ b/clicks/gsm/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.9
+### Version 2.1.0.0
- Initial release
diff --git a/clicks/gsm/CMakeLists.txt b/clicks/gsm/CMakeLists.txt
new file mode 100644
index 0000000000..8dd3eca64e
--- /dev/null
+++ b/clicks/gsm/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_gsm LANGUAGES MikroC)
+else()
+ project(example_gsm LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_gsm
+ example/main.c
+
+)
+
+
+############################ example_gsm GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_gsm PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_gsm PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_gsm PUBLIC MikroSDK.Log)
+add_subdirectory(lib_gsm)
+target_link_libraries(example_gsm PUBLIC Click.GSM)
+############################ example_gsm GENERATED CODE END ###########################
diff --git a/clicks/gsm/DETAILS.md b/clicks/gsm/DETAILS.md
index 3c529b71f4..199bab33bc 100644
--- a/clicks/gsm/DETAILS.md
+++ b/clicks/gsm/DETAILS.md
@@ -2,7 +2,7 @@
---
# GSM click
-GSM click is a compact and powerful GSM cellular network communication solution, featuring the GSM/GPRS Telit GL865-QUAD module.
+> GSM click is a compact and powerful GSM cellular network communication solution, featuring the GSM/GPRS Telit GL865-QUAD module. This module features a full set of options for the cellular networking and communication, such as the network status indication, jamming detection, embedded TCP/IP stack, including TCP, IP, UDP, SMTP, ICMP and FTP protocols, full GPRS class 10 implementation; GSM supplementary functions such as the call barring, waiting, forwarding, and holding, calling line identification presentation or restriction (CLIP/CLIR), integrated voice communication codecs, and more.
@@ -13,135 +13,200 @@ GSM click is a compact and powerful GSM cellular network communication solution,
---
-#### Click library
+#### Click library
-- **Author** : MikroE Team
-- **Date** : Jun 2020.
-- **Type** : UART GPS/GNSS type
+- **Author** : Stefan Filipovic
+- **Date** : May 2023.
+- **Type** : UART type
# Software Support
-We provide a library for the Gsm Click
-as well as a demo application (example), developed using MikroElektronika
-[compilers](https://shop.mikroe.com/compilers).
-The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
+We provide a library for the GSM Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
-Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
## Library Description
-> This library contains API for Gsm Click driver.
+> This library contains API for GSM Click driver.
#### Standard key functions :
-- Config Object Initialization function.
-> void gsm_cfg_setup ( gsm_cfg_t *cfg );
-
-- Initialization function.
-> GSM_RETVAL gsm_init ( gsm_t *ctx, gsm_cfg_t *cfg );
+- `gsm_cfg_setup` Config Object Initialization function.
+```c
+void gsm_cfg_setup ( gsm_cfg_t *cfg );
+```
+
+- `gsm_init` Initialization function.
+```c
+err_t gsm_init ( gsm_t *ctx, gsm_cfg_t *cfg );
+```
#### Example key functions :
-- Enables or disables module power.
-> void gsm_module_power( gsm_t *ctx );
-
-- Generic write function.
-> void gsm_generic_write ( gsm_t *ctx, char *data_buf, uint16_t len );
+- `gsm_set_sim_apn` This function sets APN for sim card.
+```c
+void gsm_set_sim_apn ( gsm_t *ctx, uint8_t *sim_apn );
+```
+
+- `gsm_send_sms_text` This function sends text message to a phone number.
+```c
+void gsm_send_sms_text ( gsm_t *ctx, uint8_t *phone_number, uint8_t *sms_text );
+```
-- Command function.
-> void gsm_send_command ( gsm_t *ctx, char *command );
+- `gsm_send_sms_pdu` This function sends text message to a phone number in PDU mode.
+```c
+err_t gsm_send_sms_pdu ( gsm_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text );
+```
-## Examples Description
+## Example Description
-> This example reads and processes data from GSM clicks.
+> Application example shows device capability of connecting to the network and sending SMS or TCP/UDP messages using standard "AT" commands.
**The demo application is composed of two sections :**
-### Application Init
+### Application Init
-> Initializes driver, power on module and sends few command for the default module configuration.
+> Initializes the driver, tests the communication by sending "AT" command, and after that restarts the device.
```c
-void application_init ( void )
+void application_init ( void )
{
- log_cfg_t log_cfg;
- gsm_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ gsm_cfg_t gsm_cfg; /**< Click config object. */
- /**
+ /**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
- * @note If USB_UART_RX and USB_UART_TX
- * are defined as HAL_PIN_NC, you will
- * need to define them manually for log to work.
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- gsm_cfg_setup( &cfg );
- GSM_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- gsm_init( &gsm, &cfg );
-
- gsm_process( );
-
- gsm_send_command( &gsm, GSM_SINGLE_CMD_AT );
- gsm_process( );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ gsm_cfg_setup( &gsm_cfg );
+ GSM_MAP_MIKROBUS( gsm_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == gsm_init( &gsm, &gsm_cfg ) )
+ {
+ log_error( &logger, " Application Init Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
- gsm_send_command( &gsm, GSM_SINGLE_CMD_AT );
- gsm_process( );
-
- gsm_send_command( &gsm, GSM_SINGLE_CMD_AT );
- gsm_process( );
-
- gsm_send_command( &gsm, GSM_SINGLE_CMD_ATE0 );
- gsm_process( );
-
- gsm_send_command( &gsm, "AT+IFC=2,2" );
- gsm_process( );
+ gsm_process( );
+ gsm_clear_app_buf( );
- gsm_send_command( &gsm, "AT+CMGF=1" );
-
- Delay_ms( 2000 );
+ // Check communication
+ gsm_send_cmd( &gsm, GSM_CMD_AT );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ gsm_error_check( error_flag );
+
+ // Restart device
+ #define RESTART_DEVICE "1,1"
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_CFUN, RESTART_DEVICE );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ gsm_error_check( error_flag );
+
+ log_info( &logger, " Application Task " );
+ example_state = GSM_CONFIGURE_FOR_NETWORK;
}
-
+
```
### Application Task
-> Reads the received data and parses it.
+> Application task is split in few stages:
+ - GSM_CONFIGURE_FOR_NETWORK:
+ > Sets configuration to device to be able to connect to the network.
+ - GSM_WAIT_FOR_CONNECTION:
+ > Waits for the network registration indicated via CREG URC event and then checks the connection status.
+ - GSM_CONFIGURE_FOR_EXAMPLE:
+ > Sets the device configuration for sending SMS or TCP/UDP messages depending on the selected demo example.
+ - GSM_EXAMPLE:
+ > Depending on the selected demo example, it sends an SMS message (in PDU or TXT mode) or TCP/UDP message.
+> By default, the TCP/UDP example is selected.
```c
-void application_task ( void )
+void application_task ( void )
{
- gsm_process( );
-}
+ switch ( example_state )
+ {
+ case GSM_CONFIGURE_FOR_NETWORK:
+ {
+ if ( GSM_OK == gsm_configure_for_network( ) )
+ {
+ example_state = GSM_WAIT_FOR_CONNECTION;
+ }
+ break;
+ }
+ case GSM_WAIT_FOR_CONNECTION:
+ {
+ if ( GSM_OK == gsm_check_connection( ) )
+ {
+ example_state = GSM_CONFIGURE_FOR_EXAMPLE;
+ }
+ break;
+ }
+ case GSM_CONFIGURE_FOR_EXAMPLE:
+ {
+ if ( GSM_OK == gsm_configure_for_example( ) )
+ {
+ example_state = GSM_EXAMPLE;
+ }
+ break;
+ }
+ case GSM_EXAMPLE:
+ {
+ gsm_example( );
+ break;
+ }
+ default:
+ {
+ log_error( &logger, " Example state." );
+ break;
+ }
+ }
+}
```
-The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
+## Note
+
+> In order for the examples to work, user needs to set the APN and SMSC (SMS PDU mode only)
+of entered SIM card as well as the phone number (SMS mode only) to which he wants to send an SMS.
+Enter valid values for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE.
+> > Example:
+> > - SIM_APN "internet"
+> > - SIM_SMSC "+381610401"
+> > - PHONE_NUMBER_TO_MESSAGE "+381659999999"
+
-**Other mikroE Libraries used in the example:**
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
- MikroSDK.Board
- MikroSDK.Log
-- Click.Gsm
+- Click.GSM
**Additional notes and informations**
-Depending on the development board you are using, you may need
-[USB UART click](https://shop.mikroe.com/usb-uart-click),
-[USB UART 2 Click](https://shop.mikroe.com/usb-uart-2-click) or
-[RS232 Click](https://shop.mikroe.com/rs232-click) to connect to your PC, for
-development systems with no UART to USB interface available on the board. The
-terminal available in all Mikroelektronika
-[compilers](https://shop.mikroe.com/compilers), or any other terminal application
-of your choice, can be used to read the message.
-
-
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
---
diff --git a/clicks/gsm/README.md b/clicks/gsm/README.md
index 6b2dc6dcc7..6be7d90810 100644
--- a/clicks/gsm/README.md
+++ b/clicks/gsm/README.md
@@ -1,9 +1,9 @@
\mainpage Main Page
-
+
---
# GSM click
-GSM click is a compact and powerful GSM cellular network communication solution, featuring the GSM/GPRS Telit GL865-QUAD module.
+> GSM click is a compact and powerful GSM cellular network communication solution, featuring the GSM/GPRS Telit GL865-QUAD module. This module features a full set of options for the cellular networking and communication, such as the network status indication, jamming detection, embedded TCP/IP stack, including TCP, IP, UDP, SMTP, ICMP and FTP protocols, full GPRS class 10 implementation; GSM supplementary functions such as the call barring, waiting, forwarding, and holding, calling line identification presentation or restriction (CLIP/CLIR), integrated voice communication codecs, and more.
@@ -14,135 +14,200 @@ GSM click is a compact and powerful GSM cellular network communication solution,
---
-#### Click library
+#### Click library
-- **Author** : MikroE Team
-- **Date** : Jun 2020.
-- **Type** : UART GPS/GNSS type
+- **Author** : Stefan Filipovic
+- **Date** : May 2023.
+- **Type** : UART type
# Software Support
-We provide a library for the Gsm Click
-as well as a demo application (example), developed using MikroElektronika
-[compilers](https://shop.mikroe.com/compilers).
-The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
+We provide a library for the GSM Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
-Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
## Library Description
-> This library contains API for Gsm Click driver.
+> This library contains API for GSM Click driver.
#### Standard key functions :
-- Config Object Initialization function.
-> void gsm_cfg_setup ( gsm_cfg_t *cfg );
-
-- Initialization function.
-> GSM_RETVAL gsm_init ( gsm_t *ctx, gsm_cfg_t *cfg );
+- `gsm_cfg_setup` Config Object Initialization function.
+```c
+void gsm_cfg_setup ( gsm_cfg_t *cfg );
+```
+
+- `gsm_init` Initialization function.
+```c
+err_t gsm_init ( gsm_t *ctx, gsm_cfg_t *cfg );
+```
#### Example key functions :
-- Enables or disables module power.
-> void gsm_module_power( gsm_t *ctx );
-
-- Generic write function.
-> void gsm_generic_write ( gsm_t *ctx, char *data_buf, uint16_t len );
+- `gsm_set_sim_apn` This function sets APN for sim card.
+```c
+void gsm_set_sim_apn ( gsm_t *ctx, uint8_t *sim_apn );
+```
-- Command function.
-> void gsm_send_command ( gsm_t *ctx, char *command );
+- `gsm_send_sms_text` This function sends text message to a phone number.
+```c
+void gsm_send_sms_text ( gsm_t *ctx, uint8_t *phone_number, uint8_t *sms_text );
+```
-## Examples Description
+- `gsm_send_sms_pdu` This function sends text message to a phone number in PDU mode.
+```c
+err_t gsm_send_sms_pdu ( gsm_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text );
+```
-> This example reads and processes data from GSM clicks.
+## Example Description
+
+> Application example shows device capability of connecting to the network and sending SMS or TCP/UDP messages using standard "AT" commands.
**The demo application is composed of two sections :**
-### Application Init
+### Application Init
-> Initializes driver, power on module and sends few command for the default module configuration.
+> Initializes the driver, tests the communication by sending "AT" command, and after that restarts the device.
```c
-void application_init ( void )
+void application_init ( void )
{
- log_cfg_t log_cfg;
- gsm_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ gsm_cfg_t gsm_cfg; /**< Click config object. */
- /**
+ /**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
- * @note If USB_UART_RX and USB_UART_TX
- * are defined as HAL_PIN_NC, you will
- * need to define them manually for log to work.
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- gsm_cfg_setup( &cfg );
- GSM_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- gsm_init( &gsm, &cfg );
-
- gsm_process( );
-
- gsm_send_command( &gsm, GSM_SINGLE_CMD_AT );
- gsm_process( );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ gsm_cfg_setup( &gsm_cfg );
+ GSM_MAP_MIKROBUS( gsm_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == gsm_init( &gsm, &gsm_cfg ) )
+ {
+ log_error( &logger, " Application Init Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
- gsm_send_command( &gsm, GSM_SINGLE_CMD_AT );
- gsm_process( );
-
- gsm_send_command( &gsm, GSM_SINGLE_CMD_AT );
- gsm_process( );
-
- gsm_send_command( &gsm, GSM_SINGLE_CMD_ATE0 );
- gsm_process( );
-
- gsm_send_command( &gsm, "AT+IFC=2,2" );
- gsm_process( );
+ gsm_process( );
+ gsm_clear_app_buf( );
- gsm_send_command( &gsm, "AT+CMGF=1" );
-
- Delay_ms( 2000 );
+ // Check communication
+ gsm_send_cmd( &gsm, GSM_CMD_AT );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ gsm_error_check( error_flag );
+
+ // Restart device
+ #define RESTART_DEVICE "1,1"
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_CFUN, RESTART_DEVICE );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ gsm_error_check( error_flag );
+
+ log_info( &logger, " Application Task " );
+ example_state = GSM_CONFIGURE_FOR_NETWORK;
}
-
+
```
### Application Task
-> Reads the received data and parses it.
+> Application task is split in few stages:
+ - GSM_CONFIGURE_FOR_NETWORK:
+ > Sets configuration to device to be able to connect to the network.
+ - GSM_WAIT_FOR_CONNECTION:
+ > Waits for the network registration indicated via CREG URC event and then checks the connection status.
+ - GSM_CONFIGURE_FOR_EXAMPLE:
+ > Sets the device configuration for sending SMS or TCP/UDP messages depending on the selected demo example.
+ - GSM_EXAMPLE:
+ > Depending on the selected demo example, it sends an SMS message (in PDU or TXT mode) or TCP/UDP message.
+> By default, the TCP/UDP example is selected.
```c
-void application_task ( void )
+void application_task ( void )
{
- gsm_process( );
-}
+ switch ( example_state )
+ {
+ case GSM_CONFIGURE_FOR_NETWORK:
+ {
+ if ( GSM_OK == gsm_configure_for_network( ) )
+ {
+ example_state = GSM_WAIT_FOR_CONNECTION;
+ }
+ break;
+ }
+ case GSM_WAIT_FOR_CONNECTION:
+ {
+ if ( GSM_OK == gsm_check_connection( ) )
+ {
+ example_state = GSM_CONFIGURE_FOR_EXAMPLE;
+ }
+ break;
+ }
+ case GSM_CONFIGURE_FOR_EXAMPLE:
+ {
+ if ( GSM_OK == gsm_configure_for_example( ) )
+ {
+ example_state = GSM_EXAMPLE;
+ }
+ break;
+ }
+ case GSM_EXAMPLE:
+ {
+ gsm_example( );
+ break;
+ }
+ default:
+ {
+ log_error( &logger, " Example state." );
+ break;
+ }
+ }
+}
```
-The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
+## Note
+
+> In order for the examples to work, user needs to set the APN and SMSC (SMS PDU mode only)
+of entered SIM card as well as the phone number (SMS mode only) to which he wants to send an SMS.
+Enter valid values for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE.
+> > Example:
+> > - SIM_APN "internet"
+> > - SIM_SMSC "+381610401"
+> > - PHONE_NUMBER_TO_MESSAGE "+381659999999"
+
-**Other mikroE Libraries used in the example:**
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
- MikroSDK.Board
- MikroSDK.Log
-- Click.Gsm
+- Click.GSM
**Additional notes and informations**
-Depending on the development board you are using, you may need
-[USB UART click](https://shop.mikroe.com/usb-uart-click),
-[USB UART 2 Click](https://shop.mikroe.com/usb-uart-2-click) or
-[RS232 Click](https://shop.mikroe.com/rs232-click) to connect to your PC, for
-development systems with no UART to USB interface available on the board. The
-terminal available in all Mikroelektronika
-[compilers](https://shop.mikroe.com/compilers), or any other terminal application
-of your choice, can be used to read the message.
-
-
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
---
diff --git a/clicks/gsm/doc/doxy/Doxyfile.doxy b/clicks/gsm/doc/doxy/Doxyfile.doxy
index 450a77059c..963fa139f2 100644
--- a/clicks/gsm/doc/doxy/Doxyfile.doxy
+++ b/clicks/gsm/doc/doxy/Doxyfile.doxy
@@ -20,7 +20,7 @@
# This tag specifies the encoding used for all characters in the config 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
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
# for the list of possible encodings.
# The default value is: UTF-8.
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/gsm/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/gsm/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,11 +291,11 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# 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.
+# documentation. See http://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.
@@ -337,7 +337,7 @@ BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# https://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# http://www.riverbankcomputing.co.uk/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.
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,17 +703,17 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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.
+# to be installed. See also http://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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,14 +790,14 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/gsm/example \
- ../clicks/gsm/lib/include \
- ../clicks/gsm/README.md
+INPUT = ../cmake/gsm/example \
+ ../cmake/gsm/lib_gsm/include \
+ ../cmake/gsm/README.md
# 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
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
# possible encodings.
# The default value is: UTF-8.
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/gsm/example
+EXAMPLE_PATH = ../cmake/gsm/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1047,7 +1047,7 @@ 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
+# (see http://www.gnu.org/software/global/global.html). You will need version
# 4.8.6 or higher.
#
# To use it do the following:
@@ -1075,7 +1075,7 @@ USE_HTAGS = NO
VERBATIM_HEADERS = YES
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
-# clang parser (see: https://clang.llvm.org/) for more accurate parsing at 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.
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,12 +1206,12 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
+# http://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.
@@ -1270,12 +1270,12 @@ 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_NAME.apple.com/tools/xcode/), introduced with
+# environment (see: http://DEVELOPER_NAME.apple.com/tools/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_NAME/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See https://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.html
+# startup. See http://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.html
# for more information.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
@@ -1288,7 +1288,7 @@ GENERATE_DOCSET = NO
# The default value is: Doxygen generated docs.
# This tag requires that the tag GENERATE_DOCSET is set to YES.
-DOCSET_FEEDNAME = "MikroE Click boards"
+DOCSET_FEEDNAME = "Mikroe Click boards"
# This tag specifies a string that should uniquely identify the documentation
# set bundle. This should be a reverse domain-name style string, e.g.
@@ -1315,7 +1315,7 @@ DOCSET_PUBLISHER_NAME = MikroElektronika
# 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
+# (see: http://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
@@ -1328,14 +1328,14 @@ DOCSET_PUBLISHER_NAME = MikroElektronika
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
-GENERATE_HTMLHELP = 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 =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,11 +1387,11 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# (see: http://qt-project.org/doc/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.
@@ -1399,7 +1399,7 @@ QHP_NAMESPACE = org.doxygen.Project
# 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://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
# folders).
# The default value is: doc.
# This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1408,33 +1408,33 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/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://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1529,7 +1529,7 @@ FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# https://www.mathjax.org) which uses client side Javascript for the rendering
+# http://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
@@ -1541,7 +1541,7 @@ 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:
-# https://docs.mathjax.org/en/latest/output.html) for more details.
+# http://docs.mathjax.org/en/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.
@@ -1556,26 +1556,26 @@ MATHJAX_FORMAT = HTML-CSS
# 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.mathjax.org/mathjax/latest.
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
+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 =
+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: https://docs.mathjax.org/en/latest/output.html) for more details. For an
+# (see: http://docs.mathjax.org/en/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 =
+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
@@ -1618,7 +1618,7 @@ SERVER_BASED_SEARCH = NO
#
# 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/).
+# Xapian (see: http://xapian.org/).
#
# See the section "External Indexing and Searching" for details.
# The default value is: NO.
@@ -1631,11 +1631,11 @@ EXTERNAL_SEARCH = NO
#
# 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
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1818,7 +1818,7 @@ 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.
+# http://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.
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2001,7 +2001,7 @@ DOCBOOK_PROGRAMLISTING = NO
#---------------------------------------------------------------------------
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
-# AutoGen Definitions (see https://autogen.sf.net) file that captures the
+# AutoGen Definitions (see http://autogen.sf.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.
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2170,12 +2170,6 @@ EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH = /usr/bin/perl
-
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
@@ -2189,21 +2183,12 @@ PERL_PATH = /usr/bin/perl
CLASS_DIAGRAMS = YES
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# https://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
# 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 =
+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.
@@ -2213,7 +2198,7 @@ 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:
-# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# 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: NO.
@@ -2252,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2368,7 +2353,7 @@ 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:
-# https://www.graphviz.org/)).
+# 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).
@@ -2396,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2479,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/gsm/doc/package/manifest.json b/clicks/gsm/doc/package/manifest.json
index 0145430986..37e33f230a 100644
--- a/clicks/gsm/doc/package/manifest.json
+++ b/clicks/gsm/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "GSM/LTE",
+ "architecture": "ARM|PIC|PIC32|RISC-V",
+ "category": "Click Boards > Wireless connectivity > GSM/LTE",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+ "dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "GSM click",
"example_list": [
@@ -25,15 +24,17 @@
},
"name": "mikroe.click.gsm",
"product_link": "https://www.mikroe.com/gsm-click",
- "short_description": "This example reads and processes data from GSM clicks.",
- "supported_compiler": "mikroC AI",
+ "short_description": "GSM click is a compact and powerful GSM cellular network communication solution, featuring the GSM/GPRS Telit GL865-QUAD module. This module features a full set of options for the cellular networking and communication, such as the network status indication, jamming detection, embedded TCP/IP stack, including TCP, IP, UDP, SMTP, ICMP and FTP protocols, full GPRS class 10 implementation; GSM supplementary functions such as the call barring, waiting, forwarding, and holding, calling line identification presentation or restriction (CLIP/CLIR), integrated voice communication codecs, and more.",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "related_projects": [
463
],
- "version": "2.0.0.9"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.0",
+ "cmake": true,
+ "alias": "Click.GSM",
+ "subdir_name": "lib_gsm"
}
-
diff --git a/clicks/gsm/example/CMakeLists.txt b/clicks/gsm/example/CMakeLists.txt
new file mode 100644
index 0000000000..b080abef71
--- /dev/null
+++ b/clicks/gsm/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_gsm LANGUAGES MikroC)
+else()
+ project(example_gsm LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_gsm
+ main.c
+
+)
+
+
+############################ example_gsm GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_gsm PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_gsm PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_gsm PUBLIC MikroSDK.Log)
+add_subdirectory(lib_gsm)
+target_link_libraries(example_gsm PUBLIC Click.GSM)
+############################ example_gsm GENERATED CODE END ###########################
diff --git a/clicks/gsm/example/main.c b/clicks/gsm/example/main.c
index 5711069817..364256c724 100644
--- a/clicks/gsm/example/main.c
+++ b/clicks/gsm/example/main.c
@@ -1,160 +1,665 @@
/*!
- * \file
- * \brief Gsm Click example
- *
+ * @file main.c
+ * @brief GSM Click Example.
+ *
* # Description
- * This example reads and processes data from GSM clicks.
+ * Application example shows device capability of connecting to the network and
+ * sending SMS or TCP/UDP messages using standard "AT" commands.
*
* The demo application is composed of two sections :
- *
- * ## Application Init
- * Initializes driver, power on module and sends few command for the default module configuration.
- *
- * ## Application Task
- * Reads the received data and parses it.
- *
+ *
+ * ## Application Init
+ * Initializes the driver, tests the communication by sending "AT" command, and after that restarts the device.
+ *
+ * ## Application Task
+ * Application task is split in few stages:
+ * - GSM_CONFIGURE_FOR_NETWORK:
+ * Sets configuration to device to be able to connect to the network.
+ *
+ * - GSM_WAIT_FOR_CONNECTION:
+ * Waits for the network registration indicated via CREG URC event and then checks
+ * the connection status.
+ *
+ * - GSM_CONFIGURE_FOR_EXAMPLE:
+ * Sets the device configuration for sending SMS or TCP/UDP messages depending on the selected demo example.
+ *
+ * - GSM_EXAMPLE:
+ * Depending on the selected demo example, it sends an SMS message (in PDU or TXT mode) or TCP/UDP message.
+ *
+ * By default, the TCP/UDP example is selected.
+ *
* ## Additional Function
- * - gsm_process ( ) - The general process of collecting presponce
- * that sends a module.
- *
- *
- * \author MikroE Team
+ * - static void gsm_clear_app_buf ( void )
+ * - static err_t gsm_process ( void )
+ * - static void gsm_error_check( err_t error_flag )
+ * - static void gsm_log_app_buf ( void )
+ * - static err_t gsm_rsp_check ( uint8_t *rsp )
+ * - static err_t gsm_configure_for_connection( void )
+ * - static err_t gsm_check_connection( void )
+ * - static err_t gsm_configure_for_messages( void )
+ * - static err_t gsm_send_message( void )
+ *
+ * @note
+ * In order for the examples to work, user needs to set the APN and SMSC (SMS PDU mode only)
+ * of entered SIM card as well as the phone number (SMS mode only) to which he wants to send an SMS.
+ * Enter valid values for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE.
+ * Example:
+ SIM_APN "internet"
+ SIM_SMSC "+381610401"
+ PHONE_NUMBER_TO_MESSAGE "+381659999999"
+ *
+ * @author Stefan Filipovic
*
*/
-// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "gsm.h"
-#include "string.h"
+#include "conversions.h"
-#define PROCESS_COUNTER 10
-#define PROCESS_RX_BUFFER_SIZE 500
-#define PROCESS_PARSER_BUFFER_SIZE 500
+// Example selection macros
+#define EXAMPLE_TCP_UDP 0 // Example of sending messages to a TCP/UDP echo server
+#define EXAMPLE_SMS 1 // Example of sending SMS to a phone number
+#define DEMO_EXAMPLE EXAMPLE_TCP_UDP // Example selection macro
-// ------------------------------------------------------------------ VARIABLES
+// SIM APN config
+#define SIM_APN "internet" // Set valid SIM APN
-#define DEMO_APP_RECEIVER
-//#define DEMO_APP_TRANSMITER
+// SMS example parameters
+#define SIM_SMSC "" // Set valid SMS Service Center Address - only in SMS PDU mode
+#define PHONE_NUMBER_TO_MESSAGE "" // Set Phone number to message
+#define SMS_MODE "1" // SMS mode: "0" - PDU, "1" - TXT
+
+// TCP/UDP example parameters
+#define REMOTE_IP "77.46.162.162" // TCP/UDP echo server IP address
+#define REMOTE_PORT "51111" // TCP/UDP echo server port
+
+// Message content
+#define MESSAGE_CONTENT "GSM click board - demo example."
+
+// Application buffer size
+#define APP_BUFFER_SIZE 256
+#define PROCESS_BUFFER_SIZE 256
+
+/**
+ * @brief Example states.
+ * @details Predefined enum values for application example state.
+ */
+typedef enum
+{
+ GSM_CONFIGURE_FOR_NETWORK = 1,
+ GSM_WAIT_FOR_CONNECTION,
+ GSM_CONFIGURE_FOR_EXAMPLE,
+ GSM_EXAMPLE
+
+} gsm_example_state_t;
static gsm_t gsm;
static log_t logger;
-static char data_buf[ 20 ] = "12.2";
-static char current_parser_buf[ PROCESS_PARSER_BUFFER_SIZE ];
-static uint8_t send_data_cnt = 0;
+/**
+ * @brief Application example variables.
+ * @details Variables used in application example.
+ */
+static uint8_t app_buf[ APP_BUFFER_SIZE ] = { 0 };
+static int32_t app_buf_len = 0;
+static err_t error_flag;
+static gsm_example_state_t example_state;
-// ------------------------------------------------------- ADDITIONAL FUNCTIONS
+/**
+ * @brief Clearing application buffer.
+ * @details This function clears memory of application
+ * buffer and reset its length and counter.
+ */
+static void gsm_clear_app_buf ( void );
-static void gsm_process ( void )
+/**
+ * @brief Data reading function.
+ * @details This function reads data from device and
+ * appends it to the application buffer.
+ * @return @li @c 0 - Some data is read.
+ * @li @c -1 - Nothing is read.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm_process ( void );
+
+/**
+ * @brief Check for errors.
+ * @details This function checks for different types of
+ * errors and logs them on UART or logs the response if no errors occured.
+ * @param[in] error_flag Error flag to check.
+ */
+static void gsm_error_check ( err_t error_flag );
+
+/**
+ * @brief Logs application buffer.
+ * @details This function logs data from application buffer.
+ */
+static void gsm_log_app_buf ( void );
+
+/**
+ * @brief Response check.
+ * @details This function checks for response and
+ * returns the status of response.
+ * @param[in] rsp Expected response.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm_rsp_check ( uint8_t *rsp );
+
+/**
+ * @brief Configure device for connection to the network.
+ * @details Sends commands to configure and enable
+ * connection to the specified network.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm_configure_for_network ( void );
+
+/**
+ * @brief Wait for connection signal.
+ * @details Wait for connection signal from CREG URC.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm_check_connection ( void );
+
+/**
+ * @brief Configure device for example.
+ * @details Configure device for the specified example.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm_configure_for_example ( void );
+
+/**
+ * @brief Execute example.
+ * @details This function executes SMS or TCP/UDP example depending on the DEMO_EXAMPLE macro.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm_example ( void );
+
+void application_init ( void )
{
- int16_t rsp_size;
- uint16_t rsp_cnt = 0;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ gsm_cfg_t gsm_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ gsm_cfg_setup( &gsm_cfg );
+ GSM_MAP_MIKROBUS( gsm_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == gsm_init( &gsm, &gsm_cfg ) )
+ {
+ log_error( &logger, " Application Init Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
- char uart_rx_buffer[ PROCESS_RX_BUFFER_SIZE ] = { 0 };
- uint8_t check_buf_cnt;
- uint8_t process_cnt = PROCESS_COUNTER;
+ gsm_process( );
+ gsm_clear_app_buf( );
+
+ // Check communication
+ gsm_send_cmd( &gsm, GSM_CMD_AT );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ gsm_error_check( error_flag );
- // Clear parser buffer
- memset( current_parser_buf, 0 , PROCESS_PARSER_BUFFER_SIZE );
+ // Restart device
+ #define RESTART_DEVICE "1,1"
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_CFUN, RESTART_DEVICE );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ gsm_error_check( error_flag );
- while( process_cnt != 0 )
- {
- rsp_size = gsm_generic_read( &gsm, &uart_rx_buffer, PROCESS_RX_BUFFER_SIZE );
+ log_info( &logger, " Application Task " );
+ example_state = GSM_CONFIGURE_FOR_NETWORK;
+}
- if ( rsp_size > 0 )
- {
- // Validation of the received data
- for ( check_buf_cnt = 0; check_buf_cnt < rsp_size; check_buf_cnt++ )
+void application_task ( void )
+{
+ switch ( example_state )
+ {
+ case GSM_CONFIGURE_FOR_NETWORK:
+ {
+ if ( GSM_OK == gsm_configure_for_network( ) )
{
- if ( uart_rx_buffer[ check_buf_cnt ] == 0 )
- {
- uart_rx_buffer[ check_buf_cnt ] = 13;
- }
+ example_state = GSM_WAIT_FOR_CONNECTION;
}
- log_printf( &logger, "%s", uart_rx_buffer );
-
- // Storages data in parser buffer
- rsp_cnt += rsp_size;
- if ( rsp_cnt < PROCESS_PARSER_BUFFER_SIZE )
+ break;
+ }
+ case GSM_WAIT_FOR_CONNECTION:
+ {
+ if ( GSM_OK == gsm_check_connection( ) )
+ {
+ example_state = GSM_CONFIGURE_FOR_EXAMPLE;
+ }
+ break;
+ }
+ case GSM_CONFIGURE_FOR_EXAMPLE:
+ {
+ if ( GSM_OK == gsm_configure_for_example( ) )
{
- strncat( current_parser_buf, uart_rx_buffer, rsp_size );
+ example_state = GSM_EXAMPLE;
}
-
- // Clear RX buffer
- memset( uart_rx_buffer, 0, PROCESS_RX_BUFFER_SIZE );
- }
- else
+ break;
+ }
+ case GSM_EXAMPLE:
+ {
+ gsm_example( );
+ break;
+ }
+ default:
{
- process_cnt--;
-
- // Process delay
- Delay_ms( 100 );
+ log_error( &logger, " Example state." );
+ break;
}
}
}
-// ------------------------------------------------------ APPLICATION FUNCTIONS
-
-void application_init ( void )
+void main ( void )
{
- log_cfg_t log_cfg;
- gsm_cfg_t cfg;
+ application_init( );
- /**
- * Logger initialization.
- * Default baud rate: 115200
- * Default log level: LOG_LEVEL_DEBUG
- * @note If USB_UART_RX and USB_UART_TX
- * are defined as HAL_PIN_NC, you will
- * need to define them manually for log to work.
- * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
- */
- LOG_MAP_USB_UART( log_cfg );
- log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
+ for ( ; ; )
+ {
+ application_task( );
+ }
+}
- // Click initialization.
+static void gsm_clear_app_buf ( void )
+{
+ memset( app_buf, 0, app_buf_len );
+ app_buf_len = 0;
+}
- gsm_cfg_setup( &cfg );
- GSM_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- gsm_init( &gsm, &cfg );
+static err_t gsm_process ( void )
+{
+ uint8_t rx_buf[ PROCESS_BUFFER_SIZE ] = { 0 };
+ int32_t rx_size = 0;
+ rx_size = gsm_generic_read( &gsm, rx_buf, PROCESS_BUFFER_SIZE );
+ if ( rx_size > 0 )
+ {
+ int32_t buf_cnt = app_buf_len;
+ if ( ( ( app_buf_len + rx_size ) > APP_BUFFER_SIZE ) && ( app_buf_len > 0 ) )
+ {
+ buf_cnt = APP_BUFFER_SIZE - ( ( app_buf_len + rx_size ) - APP_BUFFER_SIZE );
+ memmove ( app_buf, &app_buf[ APP_BUFFER_SIZE - buf_cnt ], buf_cnt );
+ }
+ for ( int32_t rx_cnt = 0; rx_cnt < rx_size; rx_cnt++ )
+ {
+ if ( rx_buf[ rx_cnt ] )
+ {
+ app_buf[ buf_cnt++ ] = rx_buf[ rx_cnt ];
+ if ( app_buf_len < APP_BUFFER_SIZE )
+ {
+ app_buf_len++;
+ }
+ }
+ }
+ return GSM_OK;
+ }
+ return GSM_ERROR;
+}
- gsm_process( );
+static err_t gsm_rsp_check ( uint8_t *rsp )
+{
+ uint32_t timeout_cnt = 0;
+ uint32_t timeout = 120000;
+ gsm_clear_app_buf( );
+ gsm_process( );
+ while ( ( 0 == strstr( app_buf, rsp ) ) &&
+ ( 0 == strstr( app_buf, GSM_RSP_ERROR ) ) )
+ {
+ gsm_process( );
+ if ( timeout_cnt++ > timeout )
+ {
+ gsm_clear_app_buf( );
+ return GSM_ERROR_TIMEOUT;
+ }
+ Delay_ms( 1 );
+ }
+ Delay_ms( 100 );
+ gsm_process( );
+ if ( strstr( app_buf, rsp ) )
+ {
+ return GSM_OK;
+ }
+ else if ( strstr( app_buf, GSM_RSP_ERROR ) )
+ {
+ return GSM_ERROR_CMD;
+ }
+ else
+ {
+ return GSM_ERROR_UNKNOWN;
+ }
+}
- gsm_send_command( &gsm, GSM_SINGLE_CMD_AT );
- gsm_process( );
-
- gsm_send_command( &gsm, GSM_SINGLE_CMD_AT );
- gsm_process( );
+static void gsm_error_check ( err_t error_flag )
+{
+ switch ( error_flag )
+ {
+ case GSM_OK:
+ {
+ gsm_log_app_buf( );
+ break;
+ }
+ case GSM_ERROR:
+ {
+ log_error( &logger, " Overflow!" );
+ break;
+ }
+ case GSM_ERROR_TIMEOUT:
+ {
+ log_error( &logger, " Timeout!" );
+ break;
+ }
+ case GSM_ERROR_CMD:
+ {
+ log_error( &logger, " CMD!" );
+ break;
+ }
+ case GSM_ERROR_UNKNOWN:
+ default:
+ {
+ log_error( &logger, " Unknown!" );
+ break;
+ }
+ }
+ Delay_ms( 500 );
+}
- gsm_send_command( &gsm, GSM_SINGLE_CMD_AT );
- gsm_process( );
+static void gsm_log_app_buf ( void )
+{
+ for ( int32_t buf_cnt = 0; buf_cnt < app_buf_len; buf_cnt++ )
+ {
+ log_printf( &logger, "%c", app_buf[ buf_cnt ] );
+ }
+}
- gsm_send_command( &gsm, GSM_SINGLE_CMD_ATE0 );
- gsm_process( );
+static err_t gsm_configure_for_network ( void )
+{
+ err_t func_error = GSM_OK;
+#if ( ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP ) || ( DEMO_EXAMPLE == EXAMPLE_SMS ) )
+ Delay_ms ( 5000 );
+ // Deregister from network
+ #define DEREGISTER_FROM_NETWORK "2"
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_COPS, DEREGISTER_FROM_NETWORK );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+
+ // Set SIM APN
+ gsm_set_sim_apn( &gsm, SIM_APN );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
- gsm_send_command( &gsm, "AT+IFC=2,2" );
- gsm_process( );
+ // Enable full functionality
+ #define FULL_FUNCTIONALITY "1"
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_CFUN, FULL_FUNCTIONALITY );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
- gsm_send_command( &gsm, "AT+CMGF=1" );
+ // Enable network registartion
+ #define ENABLE_REG "2"
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_CREG, ENABLE_REG );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+
+ // Automatic registration
+ #define AUTOMATIC_REGISTRATION "0"
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_COPS, AUTOMATIC_REGISTRATION );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+
+ Delay_ms ( 3000 );
+#endif
+ return func_error;
+}
- Delay_ms( 2000 );
+static err_t gsm_check_connection ( void )
+{
+#if ( ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP ) || ( DEMO_EXAMPLE == EXAMPLE_SMS ) )
+ #define CONNECTED "+CREG: 2,1"
+ gsm_send_cmd_check ( &gsm, GSM_CMD_CREG );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ gsm_error_check( error_flag );
+ if ( strstr( app_buf, CONNECTED ) )
+ {
+ Delay_ms( 100 );
+ // Check signal quality
+ gsm_send_cmd( &gsm, GSM_CMD_CSQ );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ gsm_error_check( error_flag );
+ #define NO_SIGNAL "99,99"
+ if ( !strstr( app_buf, NO_SIGNAL ) )
+ {
+ Delay_ms ( 1000 );
+ return error_flag;
+ }
+ }
+ Delay_ms ( 1000 );
+ return GSM_ERROR;
+#endif
+ return GSM_OK;
}
-void application_task ( void )
+static err_t gsm_configure_for_example ( void )
{
- gsm_process( );
+ err_t func_error = GSM_OK;
+#if ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP )
+ #define ACTIVATE_PDP_CONTEXT "1,1"
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_SGACT, ACTIVATE_PDP_CONTEXT );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+#elif ( DEMO_EXAMPLE == EXAMPLE_SMS )
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_CMGF, SMS_MODE );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+#else
+ #error "No demo example selected"
+#endif
+ Delay_ms ( 1000 );
+ return func_error;
}
-void main ( void )
+static err_t gsm_example ( void )
{
- application_init( );
+ err_t func_error = GSM_OK;
+#if ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP )
+ uint8_t cmd_buf[ 100 ] = { 0 };
+ uint8_t tcp_socket_num[ 2 ] = { '1', 0 };
+ uint8_t udp_socket_num[ 2 ] = { '2', 0 };
- for ( ; ; )
+ // Socket settings
+ #define SOCKET_CLOSURE_TYPE "255"
+ #define SOCKET_LOCAL_PORT "1111"
+ #define SOCKET_CONN_MODE_CMD "1"
+
+ // Open TCP socket.
+ #define TCP_PROTOCOL "0"
+ strcpy( cmd_buf, tcp_socket_num );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, TCP_PROTOCOL );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, REMOTE_PORT );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, "\"" );
+ strcat( cmd_buf, REMOTE_IP );
+ strcat( cmd_buf, "\"" );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, SOCKET_CLOSURE_TYPE );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, SOCKET_LOCAL_PORT );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, SOCKET_CONN_MODE_CMD );
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_SD, cmd_buf );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+
+ // Open UDP socket.
+ #define UDP_PROTOCOL "1"
+ strcpy( cmd_buf, udp_socket_num );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, UDP_PROTOCOL );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, REMOTE_PORT );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, "\"" );
+ strcat( cmd_buf, REMOTE_IP );
+ strcat( cmd_buf, "\"" );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, SOCKET_CLOSURE_TYPE );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, SOCKET_LOCAL_PORT );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, SOCKET_CONN_MODE_CMD );
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_SD, cmd_buf );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+
+ // Get message length
+ uint8_t message_len_buf[ 10 ] = { 0 };
+ uint16_t message_len = strlen( MESSAGE_CONTENT );
+ uint16_to_str( message_len, message_len_buf );
+ l_trim( message_len_buf );
+ r_trim( message_len_buf );
+
+ // Write message to TCP socket
+ uint8_t ctrl_z = 0x1A;
+ strcpy( cmd_buf, tcp_socket_num );
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_SSEND, cmd_buf );
+ error_flag = gsm_rsp_check( ">" );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+ gsm_generic_write ( &gsm, MESSAGE_CONTENT, message_len );
+ gsm_generic_write ( &gsm, &ctrl_z, 1 );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+
+ // Wait for a response message URC
+ #define RESPONSE_URC "SRING: "
+ strcpy( cmd_buf, RESPONSE_URC );
+ strcat( cmd_buf, tcp_socket_num );
+ error_flag = gsm_rsp_check( cmd_buf );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+
+ // Read response message
+ strcpy( cmd_buf, tcp_socket_num );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, message_len_buf );
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_SRECV, cmd_buf );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+
+ // Write message to UDP socket
+ strcpy( cmd_buf, udp_socket_num );
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_SSEND, cmd_buf );
+ error_flag = gsm_rsp_check( ">" );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+ gsm_generic_write ( &gsm, MESSAGE_CONTENT, message_len );
+ gsm_generic_write ( &gsm, &ctrl_z, 1 );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+
+ // Wait for a response message URC
+ strcpy( cmd_buf, RESPONSE_URC );
+ strcat( cmd_buf, udp_socket_num );
+ error_flag = gsm_rsp_check( cmd_buf );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+
+ // Read response message
+ strcpy( cmd_buf, udp_socket_num );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, message_len_buf );
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_SRECV, cmd_buf );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+
+ // Close TCP socket
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_SH, tcp_socket_num );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+
+ // Close UDP socket
+ gsm_send_cmd_with_par( &gsm, GSM_CMD_SH, udp_socket_num );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+ Delay_ms( 5000 );
+#elif ( DEMO_EXAMPLE == EXAMPLE_SMS )
+ // Check SMS mode
+ #define CMGF_PDU "+CMGF: 0"
+ #define CMGF_TXT "+CMGF: 1"
+ gsm_send_cmd_check( &gsm, GSM_CMD_CMGF );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+ Delay_ms( 1000 );
+ if ( strstr( app_buf, CMGF_PDU ) )
{
- application_task( );
+ // Send SMS in PDU mode
+ gsm_send_sms_pdu( &gsm, SIM_SMSC, PHONE_NUMBER_TO_MESSAGE, MESSAGE_CONTENT );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
+ }
+ else if ( strstr( app_buf, CMGF_TXT ) )
+ {
+ // Send SMS in TXT mode
+ gsm_send_sms_text ( &gsm, PHONE_NUMBER_TO_MESSAGE, MESSAGE_CONTENT );
+ error_flag = gsm_rsp_check( GSM_RSP_OK );
+ func_error |= error_flag;
+ gsm_error_check( error_flag );
}
+ Delay_ms( 10000 );
+ Delay_ms( 10000 );
+ Delay_ms( 10000 );
+#else
+ #error "No demo example selected"
+#endif
+ return func_error;
}
// ------------------------------------------------------------------------ END
diff --git a/clicks/gsm/example/manifest.exm b/clicks/gsm/example/manifest.exm
index 4a1df4d72d..f1e29c70c0 100644
--- a/clicks/gsm/example/manifest.exm
+++ b/clicks/gsm/example/manifest.exm
@@ -1,8 +1,8 @@
{
"name": "GSM Click",
- "description": "GSM click is a compact and powerful GSM cellular network communication solution, featuring the GSM/GPRS Telit GL865-QUAD module.",
+ "description": "GSM click is a compact and powerful GSM cellular network communication solution, featuring the GSM/GPRS Telit GL865-QUAD module. This module features a full set of options for the cellular networking and communication, such as the network status indication, jamming detection, embedded TCP/IP stack, including TCP, IP, UDP, SMTP, ICMP and FTP protocols, full GPRS class 10 implementation; GSM supplementary functions such as the call barring, waiting, forwarding, and holding, calling line identification presentation or restriction (CLIP/CLIR), integrated voice communication codecs, and more.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
- "hw" : ["click","GL865-QUAD GSM/GPRS"],
- "category" : ["GSM/LTE,2G GPRS"]
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv"],
+ "hw" : ["click","GL865-QUAD"],
+ "category" : ["GSM/LTE"]
}
diff --git a/clicks/gsm/example/memake.txt b/clicks/gsm/example/memake.txt
deleted file mode 100644
index 1577e71441..0000000000
--- a/clicks/gsm/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_gsm
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Gsm
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/gsm/lib/include/gsm.h b/clicks/gsm/lib/include/gsm.h
deleted file mode 100644
index 117101f232..0000000000
--- a/clicks/gsm/lib/include/gsm.h
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- * \brief This file contains API for GSM Click driver.
- *
- * \addtogroup gsm GSM Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef GSM_H
-#define GSM_H
-
-#include "drv_digital_out.h"
-#include "drv_digital_in.h"
-#include "drv_uart.h"
-
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-#define GSM_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
- cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
- cfg.pwr = MIKROBUS( mikrobus, MIKROBUS_AN ); \
- cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
- cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
- cfg.gpio2 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
- cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT )
-/** \} */
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define GSM_RETVAL uint8_t
-
-#define GSM_OK 0x00
-#define GSM_INIT_ERROR 0xFF
-/** \} */
-
-/**
- * \defgroup parser_error Parser error
- * \{
- */
-#define GSM_PARSER_NO_ERROR 0x00
-#define GSM_PARSER_ERROR_REF 0x01
-#define GSM_PARSER_ERROR_CMD 0x02
-#define GSM_PARSER_ERROR_DATA 0x04
-/** \} */
-
-/**
- * \defgroup click_status G2C 3G click status
- * \{
- */
-#define GSM_STATUS_DEVICE_READY 1
-#define GSM_STATUS_ACT_NETWORK_AND_BROKER 4
-#define GSM_STATUS_ACT_NETWORK 2
-#define GSM_STATUS_ACT_BROKER 3
-#define GSM_STATUS_DEVICE_BUSY 0
-/** \} */
-
-/**
- * \defgroup module_state Module power state
- * \{
- */
-#define GSM_MODULE_POWER_ON 1
-#define GSM_MODULE_POWER_OFF 0
-/** \} */
-
-/**
- * \defgroup at_command AT command
- * \{
- */
-#define GSM_SINGLE_CMD_AT "AT"
-#define GSM_SINGLE_CMD_AT_W "AT+W"
-#define GSM_SINGLE_CMD_AT_R "AT+R"
-#define GSM_SINGLE_CMD_ATE0 "ATE0"
-#define GSM_SINGLE_CMD_ATE1 "ATE1"
-#define GSM_SINGLE_CMD_AT_RST "AT+RST"
-#define GSM_SINGLE_CMD_AT_CRST "AT+CRST"
-#define GSM_SINGLE_CMD_AT_GMR "AT+GMR"
-#define GSM_SINGLE_CMD_AT_GMSTA "AT+GMSTA"
-#define GSM_SINGLE_CMD_AT_PUB "AT+PUB"
-
-#define GSM_SINGLE_CMD_SET_AT_LRSP_1 "AT+LRSP=1"
-#define GSM_SINGLE_CMD_SET_AT_LRSP_0 "AT+LRSP=0"
-#define GSM_SINGLE_CMD_SET_AT_CEN_1 "AT+CEN=1"
-#define GSM_SINGLE_CMD_SET_AT_CEN_0 "AT+CEN=0"
-#define GSM_SINGLE_CMD_SET_AT_NWC_1 "AT+NWC=1"
-#define GSM_SINGLE_CMD_SET_AT_NWC_0 "AT+NWC=0"
-#define GSM_SINGLE_CMD_SET_AT_BRC_1 "AT+BRC=1"
-#define GSM_SINGLE_CMD_SET_AT_BRC_0 "AT+BRC=0"
-#define GSM_SINGLE_CMD_SET_AT_GPEN_0 "AT+GPEN=0"
-#define GSM_SINGLE_CMD_SET_AT_GPEN_1 "AT+GPEN=1"
-
-#define GSM_SINGLE_CMD_GET_AT_LRSP "AT+LRSP?"
-#define GSM_SINGLE_CMD_GET_AT_CEN "AT+CEN?"
-#define GSM_SINGLE_CMD_GET_AT_NWC "AT+NWC?"
-#define GSM_SINGLE_CMD_GET_AT_BRC "AT+BRC?"
-#define GSM_SINGLE_CMD_GET_AT_GPEN "AT+GPEN?"
-#define GSM_SINGLE_CMD_GET_AT_NWCR "AT+NWCR?"
-#define GSM_SINGLE_CMD_GET_AT_BRCR "AT+BRCR?"
-#define GSM_SINGLE_CMD_GET_AT_DSET "AT+DSET?"
-
-#define GSM_SINGLE_CMD_TEST_AT_LRSP "AT+LRSP=?"
-#define GSM_SINGLE_CMD_TEST_AT_CEN "AT+CEN=?"
-#define GSM_SINGLE_CMD_TEST_AT_NWC "AT+NWC=?"
-#define GSM_SINGLE_CMD_TEST_AT_BRC "AT+BRC=?"
-#define GSM_SINGLE_CMD_TEST_AT_GPEN "AT+GPEN=?"
-#define GSM_SINGLE_CMD_TEST_AT_NWCR "AT+NWCR=?"
-#define GSM_SINGLE_CMD_TEST_AT_BRCR "AT+BRCR=?"
-#define GSM_SINGLE_CMD_TEST_AT_DSET "AT+DSET=?"
-
-#define GSM_MULTI_CMD_AT_DSET "AT+DSET"
-#define GSM_MULTI_CMD_AT_BRCR "AT+BRCR"
-#define GSM_MULTI_CMD_AT_NWCR "AT+NWCR"
-/** \} */
-
-/**
- * \defgroup driver Driver define
- * \{
- */
-#define DRV_RX_BUFFER_SIZE 500
-/** \} */
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
- // Output pins
-
- digital_out_t rst;
- digital_out_t rts;
-
- // Input pins
-
- digital_in_t pwr;
- digital_in_t gpio2;
- digital_in_t cts;
-
- // Modules
-
- uart_t uart;
-
- char uart_rx_buffer[ DRV_RX_BUFFER_SIZE ];
- char uart_tx_buffer[ DRV_RX_BUFFER_SIZE ];
-
-} gsm_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Communication gpio pins
-
- pin_name_t rx_pin;
- pin_name_t tx_pin;
-
- // Additional gpio pins
-
- pin_name_t pwr;
- pin_name_t rst;
- pin_name_t rts;
- pin_name_t gpio2;
- pin_name_t cts;
-
- // static variable
-
- uint32_t baud_rate; // Clock speed.
- bool uart_blocking;
- uart_data_bits_t data_bit; // Data bits.
- uart_parity_t parity_bit; // Parity bit.
- uart_stop_bits_t stop_bit; // Stop bits.
-
-} gsm_cfg_t;
-
-/**
- * @brief Error type
- */
-// Actuator switch type
-typedef uint8_t gsm_actuator_sw_t;
-
-// Actuator counter type
-typedef int16_t gsm_actuator_cnt_t;
-
-// Actuator string type
-typedef char gsm_actuator_str_t;
-
-// Parser error type
-typedef uint8_t gsm_error_t;
-
-/** \} */ // End types group
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
- */
-void gsm_cfg_setup ( gsm_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- * @param gsm Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
- */
-GSM_RETVAL gsm_init ( gsm_t *ctx, gsm_cfg_t *cfg );
-
-/**
- * @brief Enables or disables module power.
- *
- * @param ctx Click object.
- *
- * @description This function Turn ON or OFF the module.
- */
-void gsm_module_power( gsm_t *ctx );
-
-/**
- * @brief Generic write function.
- *
- * @param ctx Click object.
- * @param data_buf Data buff to be written.
- * @param len Number of the bytes in data buf.
- *
- * @description This function writes data to the desired register.
- */
-void gsm_generic_write ( gsm_t *ctx, char *data_buf, uint16_t len );
-
-/**
- * @brief Generic read function.
- *
- * @param ctx Click object.
- * @param data_buf Data buff to be written.
- * @param max_len Max number of the bytes in data buf.
- *
- * @description This function reads data from the desired register.
- */
-int16_t gsm_generic_read ( gsm_t *ctx, char *data_buf, uint16_t max_len );
-
-/**
- * @brief Command function.
- *
- * @param ctx Click object.
- * @param command Command.
- *
- * @description This function send comamnd.
- */
-void gsm_send_command ( gsm_t *ctx, char *command );
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _GSM_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
diff --git a/clicks/gsm/lib/memake.txt b/clicks/gsm/lib/memake.txt
deleted file mode 100644
index 4595a5cf08..0000000000
--- a/clicks/gsm/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_gsm
-
-alias: Click.Gsm
-
-sources: {
- src/gsm.c
-}
-
-headers: {
- include/gsm.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/gsm.h) dst(include/gsm.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/gsm/lib/src/gsm.c b/clicks/gsm/lib/src/gsm.c
deleted file mode 100644
index f13a204da8..0000000000
--- a/clicks/gsm/lib/src/gsm.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- */
-
-#include "gsm.h"
-#include "string.h"
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void gsm_cfg_setup ( gsm_cfg_t *cfg )
-{
- // Communication gpio pins
-
- cfg->rx_pin = HAL_PIN_NC;
- cfg->tx_pin = HAL_PIN_NC;
-
- // Additional gpio pins
-
- cfg->pwr = HAL_PIN_NC;
- cfg->rts = HAL_PIN_NC;
- cfg->gpio2 = HAL_PIN_NC;
- cfg->cts = HAL_PIN_NC;
-
- cfg->baud_rate = 9600;
- cfg->data_bit = UART_DATA_BITS_DEFAULT;
- cfg->parity_bit = UART_PARITY_DEFAULT;
- cfg->stop_bit = UART_STOP_BITS_DEFAULT;
- cfg->uart_blocking = false;
-}
-
-GSM_RETVAL gsm_init ( gsm_t *ctx, gsm_cfg_t *cfg )
-{
- uart_config_t uart_cfg;
-
- uart_configure_default( &uart_cfg );
-
- // Ring buffer mapping
- ctx->uart.tx_ring_buffer = ctx->uart_tx_buffer;
- ctx->uart.rx_ring_buffer = ctx->uart_rx_buffer;
-
- // UART module config
- uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
- uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
- uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
- uart_cfg.rx_ring_size = sizeof( ctx->uart_rx_buffer );
-
- uart_open( &ctx->uart, &uart_cfg );
- uart_set_baud( &ctx->uart, cfg->baud_rate );
- uart_set_parity( &ctx->uart, cfg->parity_bit );
- uart_set_stop_bits( &ctx->uart, cfg->stop_bit );
- uart_set_data_bits( &ctx->uart, cfg->data_bit );
-
- uart_set_blocking( &ctx->uart, cfg->uart_blocking );
-
- // Output pins
-
- digital_out_init( &ctx->rst, cfg->rst );
- digital_out_init( &ctx->rts, cfg->rts );
-
- // Input pins
-
- digital_in_init( &ctx->pwr, cfg->pwr );
- digital_in_init( &ctx->gpio2, cfg->gpio2 );
- digital_in_init( &ctx->cts, cfg->cts );
-
- return GSM_OK;
-
-}
-
-void gsm_module_power( gsm_t *ctx )
-{
- digital_out_low( &ctx->rst );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
-}
-
-void gsm_generic_write ( gsm_t *ctx, char *data_buf, uint16_t len )
-{
- uart_write( &ctx->uart, data_buf, len );
-}
-
-int16_t gsm_generic_read ( gsm_t *ctx, char *data_buf, uint16_t max_len )
-{
- return uart_read( &ctx->uart, data_buf, max_len );
-}
-
-void gsm_send_command ( gsm_t *ctx, char *command )
-{
- char tmp_buf[ 100 ];
- uint8_t len;
- memset( tmp_buf, 0, 100 );
- len = strlen( command );
-
- strncpy( tmp_buf, command, len );
- strcat( tmp_buf, "\r\n" );
-
- gsm_generic_write( ctx, tmp_buf, strlen( tmp_buf ) );
-}
-
-// ------------------------------------------------------------------------- END
-
diff --git a/clicks/gsm/lib_gsm/CMakeLists.txt b/clicks/gsm/lib_gsm/CMakeLists.txt
new file mode 100644
index 0000000000..7c9d46dd77
--- /dev/null
+++ b/clicks/gsm/lib_gsm/CMakeLists.txt
@@ -0,0 +1,31 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_gsm LANGUAGES MikroC)
+else()
+ project(lib_gsm LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_gsm STATIC
+ src/gsm.c
+ include/gsm.h
+)
+add_library(Click.GSM ALIAS lib_gsm)
+
+
+
+target_include_directories(lib_gsm PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_gsm PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_gsm PUBLIC MikroSDK.Driver)
+find_package(MikroSDK.Conversions REQUIRED)
+target_link_libraries(lib_gsm PUBLIC MikroSDK.Conversions)
+find_package(MikroSDK.GenericPointer REQUIRED)
+target_link_libraries(lib_gsm PUBLIC MikroSDK.GenericPointer)
diff --git a/clicks/gsm/lib_gsm/include/Click.Gsm b/clicks/gsm/lib_gsm/include/Click.Gsm
new file mode 100644
index 0000000000..578887596d
--- /dev/null
+++ b/clicks/gsm/lib_gsm/include/Click.Gsm
@@ -0,0 +1 @@
+#include "gsm.h"
diff --git a/clicks/gsm/lib_gsm/include/gsm.h b/clicks/gsm/lib_gsm/include/gsm.h
new file mode 100644
index 0000000000..a91aea94ac
--- /dev/null
+++ b/clicks/gsm/lib_gsm/include/gsm.h
@@ -0,0 +1,383 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file gsm.h
+ * @brief This file contains API for GSM Click Driver.
+ */
+
+#ifndef GSM_H
+#define GSM_H
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_uart.h"
+
+/*!
+ * @addtogroup gsm GSM Click Driver
+ * @brief API for configuring and manipulating GSM Click driver.
+ * @{
+ */
+
+/**
+ * @defgroup gsm_set GSM Device Settings
+ * @brief Settings for registers of GSM Click driver.
+ */
+
+/**
+ * @addtogroup gsm_set
+ * @{
+ */
+
+/**
+ * @brief GSM control commands.
+ * @details Specified setting for control commands of GSM Click driver.
+ */
+#define GSM_CMD_AT "AT"
+#define GSM_CMD_ATI "ATI"
+#define GSM_CMD_CFUN "AT+CFUN"
+#define GSM_CMD_CREG "AT+CREG"
+#define GSM_CMD_CGDCONT "AT+CGDCONT"
+#define GSM_CMD_CSQ "AT+CSQ"
+#define GSM_CMD_COPS "AT+COPS"
+#define GSM_CMD_CMGS "AT+CMGS"
+#define GSM_CMD_CMGF "AT+CMGF"
+#define GSM_CMD_SGACT "AT#SGACT"
+#define GSM_CMD_SD "AT#SD"
+#define GSM_CMD_SH "AT#SH"
+#define GSM_CMD_SSEND "AT#SSEND"
+#define GSM_CMD_SRECV "AT#SRECV"
+
+/**
+ * @brief GSM device response for AT commands.
+ * @details Device response after commands.
+ */
+#define GSM_RSP_OK "OK"
+#define GSM_RSP_ERROR "ERROR"
+
+/**
+ * @brief GSM driver buffer size.
+ * @details Specified size of driver ring buffer.
+ * @note Increase buffer size if needed.
+ */
+#define GSM_RX_DRV_BUFFER_SIZE 256
+#define GSM_TX_DRV_BUFFER_SIZE 256
+
+/*! @} */ // gsm_set
+
+/**
+ * @defgroup gsm_map GSM MikroBUS Map
+ * @brief MikroBUS pin mapping of GSM Click driver.
+ */
+
+/**
+ * @addtogroup gsm_map
+ * @{
+ */
+
+/**
+ * @brief MikroBUS pin mapping.
+ * @details Mapping pins of GSM Click to the selected MikroBUS.
+ */
+#define GSM_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
+ cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
+ cfg.pwr = MIKROBUS( mikrobus, MIKROBUS_AN ); \
+ cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
+ cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
+ cfg.gp2 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
+ cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT )
+
+/*! @} */ // gsm_map
+/*! @} */ // gsm
+
+/**
+ * @brief GSM Click context object.
+ * @details Context object definition of GSM Click driver.
+ */
+typedef struct
+{
+ // Output pins
+ digital_out_t rst; /**< Reset pin. */
+ digital_out_t rts; /**< UART Request to Send. */
+
+ // Input pins
+ digital_in_t pwr; /**< PWR monitor pin. */
+ digital_in_t gp2; /**< GPIO2 pin. */
+ digital_in_t cts; /**< UART Clear to Send. */
+
+ // Modules
+ uart_t uart; /**< UART driver object. */
+
+ // Buffers
+ uint8_t uart_rx_buffer[ GSM_RX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
+ uint8_t uart_tx_buffer[ GSM_TX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
+
+} gsm_t;
+
+/**
+ * @brief GSM Click configuration object.
+ * @details Configuration object definition of GSM Click driver.
+ */
+typedef struct
+{
+ // Communication gpio pins
+ pin_name_t rx_pin; /**< RX pin. */
+ pin_name_t tx_pin; /**< TX pin. */
+
+ // Additional gpio pins
+ pin_name_t pwr; /**< PWR monitor pin. */
+ pin_name_t rst; /**< Reset pin. */
+ pin_name_t rts; /**< UART Request to Send. */
+ pin_name_t gp2; /**< GPIO2 pin. */
+ pin_name_t cts; /**< UART Clear to Send. */
+
+ // Static variable
+ uint32_t baud_rate; /**< Clock speed. */
+ bool uart_blocking; /**< Wait for interrupt or not. */
+ uart_data_bits_t data_bit; /**< Data bits. */
+ uart_parity_t parity_bit; /**< Parity bit. */
+ uart_stop_bits_t stop_bit; /**< Stop bits. */
+
+} gsm_cfg_t;
+
+/**
+ * @brief GSM Click return value data.
+ * @details Predefined enum values for driver return values.
+ */
+typedef enum
+{
+ GSM_OK = 0,
+ GSM_ERROR = -1,
+ GSM_ERROR_TIMEOUT = -2,
+ GSM_ERROR_CMD = -3,
+ GSM_ERROR_UNKNOWN = -4
+
+} gsm_return_value_t;
+
+/*!
+ * @addtogroup gsm GSM Click Driver
+ * @brief API for configuring and manipulating GSM Click driver.
+ * @{
+ */
+
+/**
+ * @brief GSM configuration object setup function.
+ * @details This function initializes click configuration structure to initial
+ * values.
+ * @param[out] cfg : Click configuration structure.
+ * See #gsm_cfg_t object definition for detailed explanation.
+ * @return Nothing.
+ * @note The all used pins will be set to unconnected state.
+ */
+void gsm_cfg_setup ( gsm_cfg_t *cfg );
+
+/**
+ * @brief GSM initialization function.
+ * @details This function initializes all necessary pins and peripherals used
+ * for this click board.
+ * @param[out] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @param[in] cfg : Click configuration structure.
+ * See #gsm_cfg_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm_init ( gsm_t *ctx, gsm_cfg_t *cfg );
+
+/**
+ * @brief GSM data writing function.
+ * @details This function writes a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @param[in] data_in : Data buffer for sending.
+ * @param[in] len : Number of bytes for sending.
+ * @return @li @c >=0 - Success,
+ * @li @c <0 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm_generic_write ( gsm_t *ctx, uint8_t *data_in, uint16_t len );
+
+/**
+ * @brief GSM data reading function.
+ * @details This function reads a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @param[out] data_out : Output read data.
+ * @param[in] len : Number of bytes to be read.
+ * @return @li @c >0 - Number of data bytes read,
+ * @li @c <=0 - Error/Empty Ring buffer.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm_generic_read ( gsm_t *ctx, uint8_t *data_out, uint16_t len );
+
+/**
+ * @brief GSM set rts pin function.
+ * @details This function sets the Request to Send (RTS) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @param[in] state : Pin logic state.
+ * @return None.
+ * @note None.
+ */
+void gsm_set_rts_pin ( gsm_t *ctx, uint8_t state );
+
+/**
+ * @brief GSM set rst pin function.
+ * @details This function sets the RESET pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @param[in] state : Pin logic state.
+ * @return None.
+ * @note None.
+ */
+void gsm_set_rst_pin ( gsm_t *ctx, uint8_t state );
+
+/**
+ * @brief GSM get cts pin function.
+ * @details This function returns the Clear to Send (CTS) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
+ */
+uint8_t gsm_get_cts_pin ( gsm_t *ctx );
+
+/**
+ * @brief GSM get pwr pin function.
+ * @details This function returns the PWR monitor pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
+ */
+uint8_t gsm_get_pwr_pin ( gsm_t *ctx );
+
+/**
+ * @brief GSM get gp2 pin function.
+ * @details This function returns the GPIO2 pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
+ */
+uint8_t gsm_get_gp2_pin ( gsm_t *ctx );
+
+/**
+ * @brief Send command function.
+ * @details This function sends a specified command to the click module.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @param[in] cmd : Command variable.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm_send_cmd ( gsm_t *ctx, uint8_t *cmd );
+
+/**
+ * @brief Send command function with parameter.
+ * @details This function sends a command with specified parameter to the click module.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @param[in] param_buf : Parameter buffer.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm_send_cmd_with_par ( gsm_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf );
+
+/**
+ * @brief Check the sent command.
+ * @details This function checks the command that is sent.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm_send_cmd_check ( gsm_t *ctx, uint8_t *at_cmd_buf );
+
+/**
+ * @brief Check the command parameters.
+ * @details This function checks the command that is sent.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm_send_cmd_par_check ( gsm_t *ctx, uint8_t *at_cmd_buf );
+
+/**
+ * @brief Set sim card APN.
+ * @details This function sets APN for sim card.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @param[in] sim_apn : SIM card APN.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm_set_sim_apn ( gsm_t *ctx, uint8_t *sim_apn );
+
+/**
+ * @brief GSM send SMS in text mode.
+ * @details This function sends text message to a phone number.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @param[in] phone_number : Phone number to message.
+ * @param[in] sms_text : Message to be sent.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm_send_sms_text ( gsm_t *ctx, uint8_t *phone_number, uint8_t *sms_text );
+
+/**
+ * @brief GSM send SMS in PDU mode.
+ * @details This function sends text message to a phone number in PDU mode.
+ * @param[in] ctx : Click context object.
+ * See #gsm_t object definition for detailed explanation.
+ * @param[in] service_center_number : SMSC of the SIM card.
+ * @param[in] phone_number : Phone number to message.
+ * @param[in] sms_text : Message to be sent.
+ * @return @li @c >=0 - Success,
+ * @li @c <0 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm_send_sms_pdu ( gsm_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // GSM_H
+
+/*! @} */ // gsm
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/gsm/lib_gsm/src/gsm.c b/clicks/gsm/lib_gsm/src/gsm.c
new file mode 100644
index 0000000000..b7627f40d3
--- /dev/null
+++ b/clicks/gsm/lib_gsm/src/gsm.c
@@ -0,0 +1,489 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file gsm.c
+ * @brief GSM Click Driver.
+ */
+
+#include "gsm.h"
+#include "conversions.h"
+#include "generic_pointer.h"
+
+/**
+ * @brief PDU macros.
+ * @details Predefined PDU macros for driver use.
+ */
+#define BITMASK_7BITS 0x7F
+#define BITMASK_8BITS 0xFF
+#define BITMASK_HIGH_4BITS 0xF0
+#define BITMASK_LOW_4BITS 0x0F
+#define TYPE_OF_ADDRESS_INTERNATIONAL_PHONE 0x91
+#define TYPE_OF_ADDRESS_NATIONAL_SUBSCRIBER 0xC8
+#define SMS_DELIVER_ONE_MESSAGE 0x04
+#define SMS_DELIVER_ONE_MESSAGE 0x04
+#define SMS_SUBMIT 0x11
+#define SMS_MAX_7BIT_TEXT_LENGTH 160
+#define SMS_MAX_PDU_LENGTH 256
+
+/**
+ * @brief Encode message for PDU mode.
+ * @details Encode message for PDU mode and outputs
+ * the encoded message into output buffer.
+ * @param[in] service_center_number : Service center of devices SIM.
+ * @param[in] phone_number : Phone number to send message to.
+ * @param[in] sms_text : SMS text.
+ * @param[out] output_buffer : Output PDU encoded message.
+ * @param[in] buffer_size : Output buffer size.
+ * @return @li @c >=0 - Length of the SMS encoded message,
+ * @li @c <0 - Error.
+ */
+static int16_t pdu_encode ( uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text,
+ uint8_t *output_buffer, uint16_t buffer_size );
+
+/**
+ * @brief Swap decimal digits of a number.
+ * @details Swap decimal digits of a number (e.g. 12 -> 21).
+ * @param[in] x : Decimal number to swap digits.
+ * @return Swapped decimal number.
+ */
+static uint8_t swap_decimal_nibble ( uint8_t x );
+
+/**
+ * @brief Encode text content for PDU mode.
+ * @details Encode text content for PDU mode and
+ * outputs the encoded message into output buffer.
+ * @param[in] sms_text : Sms text content to encode
+ * @param[in] sms_text_length : Length of the text message.
+ * @param[out] output_buffer : Output PDU encoded text message.
+ * @param[in] buffer_size : Output buffer size.
+ * @return @li @c >=0 - Length of the enccoded text messages,
+ * @li @c <0 - Error.
+ */
+static int16_t encode_pdu_message ( uint8_t *sms_text, int16_t sms_text_length,
+ uint8_t *output_buffer, uint16_t buffer_size );
+
+/**
+ * @brief Encode phone number for PDU mode.
+ * @details Encode phone number for PDU mode and
+ * outputs the encoded message into output buffer.
+ * @param[in] phone_number : Phone number to send message to.
+ * @param[out] output_buffer : Output PDU encoded message.
+ * @param[in] buffer_size : Output buffer size.
+ * @return @li @c >=0 - Length of the SMS encoded message,
+ * @li @c <0 - Error.
+ */
+static int16_t encode_phone_number ( uint8_t *phone_number, uint8_t *output_buffer, uint16_t buffer_size );
+
+/**
+ * @brief GSM str cut chr function.
+ * @details This function removes all selected characters from string str,
+ * and returns it to the same str without those characters.
+ * @param str Address of string.
+ * @param chr Character to cut.
+ */
+static void gsm_str_cut_chr ( uint8_t *str, uint8_t chr );
+
+void gsm_cfg_setup ( gsm_cfg_t *cfg )
+{
+ // Communication gpio pins
+ cfg->rx_pin = HAL_PIN_NC;
+ cfg->tx_pin = HAL_PIN_NC;
+
+ // Additional gpio pins
+ cfg->pwr = HAL_PIN_NC;
+ cfg->rst = HAL_PIN_NC;
+ cfg->rts = HAL_PIN_NC;
+ cfg->gp2 = HAL_PIN_NC;
+ cfg->cts = HAL_PIN_NC;
+
+ cfg->baud_rate = 115200;
+ cfg->data_bit = UART_DATA_BITS_DEFAULT;
+ cfg->parity_bit = UART_PARITY_DEFAULT;
+ cfg->stop_bit = UART_STOP_BITS_DEFAULT;
+ cfg->uart_blocking = false;
+}
+
+err_t gsm_init ( gsm_t *ctx, gsm_cfg_t *cfg )
+{
+ uart_config_t uart_cfg;
+
+ // Default config
+ uart_configure_default( &uart_cfg );
+
+ // Ring buffer mapping
+ ctx->uart.tx_ring_buffer = ctx->uart_tx_buffer;
+ ctx->uart.rx_ring_buffer = ctx->uart_rx_buffer;
+
+ // UART module config
+ uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
+ uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
+ uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
+ uart_cfg.rx_ring_size = sizeof( ctx->uart_rx_buffer );
+
+ if ( UART_ERROR == uart_open( &ctx->uart, &uart_cfg ) )
+ {
+ return UART_ERROR;
+ }
+ uart_set_baud( &ctx->uart, cfg->baud_rate );
+ uart_set_parity( &ctx->uart, cfg->parity_bit );
+ uart_set_stop_bits( &ctx->uart, cfg->stop_bit );
+ uart_set_data_bits( &ctx->uart, cfg->data_bit );
+
+ uart_set_blocking( &ctx->uart, cfg->uart_blocking );
+
+ // Output pins
+ digital_out_init( &ctx->rst, cfg->rst );
+ digital_out_init( &ctx->rts, cfg->rts );
+
+ // Input pins
+ digital_in_init( &ctx->pwr, cfg->pwr );
+ digital_in_init( &ctx->gp2, cfg->gp2 );
+ digital_in_init( &ctx->cts, cfg->cts );
+
+ digital_out_low ( &ctx->rts );
+ digital_out_low ( &ctx->rst );
+ Delay_100ms ( );
+ digital_out_high ( &ctx->rst );
+ Delay_100ms ( );
+ Delay_100ms ( );
+ Delay_100ms ( );
+ digital_out_low ( &ctx->rst );
+ Delay_1sec ( );
+ Delay_1sec ( );
+
+ return UART_SUCCESS;
+}
+
+err_t gsm_generic_write ( gsm_t *ctx, uint8_t *data_in, uint16_t len )
+{
+ return uart_write( &ctx->uart, data_in, len );
+}
+
+err_t gsm_generic_read ( gsm_t *ctx, uint8_t *data_out, uint16_t len )
+{
+ return uart_read( &ctx->uart, data_out, len );
+}
+
+void gsm_set_rst_pin ( gsm_t *ctx, uint8_t state )
+{
+ digital_out_write( &ctx->rst, state );
+}
+
+void gsm_set_rts_pin ( gsm_t *ctx, uint8_t state )
+{
+ digital_out_write( &ctx->rts, state );
+}
+
+uint8_t gsm_get_cts_pin ( gsm_t *ctx )
+{
+ return digital_in_read( &ctx->cts );
+}
+
+uint8_t gsm_get_pwr_pin ( gsm_t *ctx )
+{
+ return digital_in_read( &ctx->pwr );
+}
+
+uint8_t gsm_get_gp2_pin ( gsm_t *ctx )
+{
+ return digital_in_read( &ctx->gp2 );
+}
+
+void gsm_send_cmd ( gsm_t *ctx, uint8_t *cmd )
+{
+ uint8_t carriage_return = 13;
+ while ( *cmd != 0 )
+ {
+ uart_write( &ctx->uart, cmd, 1 );
+ cmd++;
+ }
+ uart_write( &ctx->uart, &carriage_return, 1 );
+ Delay_100ms( );
+}
+
+void gsm_send_cmd_with_par ( gsm_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t check_char[ 2 ] = { '=', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, check_char );
+ strcat( final_cmd, param_buf );
+
+ gsm_send_cmd( ctx, final_cmd );
+}
+
+void gsm_send_cmd_check ( gsm_t *ctx, uint8_t *at_cmd_buf )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t check_char[ 2 ] = { '?', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, check_char );
+
+ gsm_send_cmd( ctx, final_cmd );
+}
+
+void gsm_send_cmd_par_check ( gsm_t *ctx, uint8_t *at_cmd_buf )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t check_char[ 3 ] = { '=' , '?', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, check_char );
+
+ gsm_send_cmd( ctx, final_cmd );
+}
+
+void gsm_set_sim_apn ( gsm_t *ctx, uint8_t *sim_apn )
+{
+ uint8_t final_cmd[ 50 ] = "1,\"IP\",\"";
+ uint8_t end_cmd[ 3 ] = "\"";
+
+ strcat( final_cmd, sim_apn );
+ strcat( final_cmd, end_cmd );
+
+ gsm_send_cmd_with_par( ctx, GSM_CMD_CGDCONT, final_cmd );
+}
+
+void gsm_send_sms_text ( gsm_t *ctx, uint8_t *phone_number, uint8_t *sms_text )
+{
+ uint8_t text[ 200 ] = { 0 };
+ uint8_t cmd_start[ ] = "=\"";
+ uint8_t cmd_end[ ] = "\"\r";
+ uint8_t txt_end[ ] = "\032";
+
+ strcpy( text, GSM_CMD_CMGS );
+ strcat( text, cmd_start );
+ strcat( text, phone_number );
+ strcat( text, cmd_end );
+
+ gsm_send_cmd( ctx, text );
+ memset( text, 0, sizeof ( text ) );
+
+ strcpy( text, sms_text );
+ strcat( text, txt_end );
+ gsm_send_cmd( ctx, text );
+}
+
+err_t gsm_send_sms_pdu ( gsm_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text )
+{
+ uint8_t text[ SMS_MAX_PDU_LENGTH ] = { 0 };
+ uint8_t pdu_buf[ SMS_MAX_PDU_LENGTH ] = { 0 };
+ uint8_t byte_buf[ 4 ] = { 0 };
+ uint8_t ctrl_z[ 2 ] = { 26, 0 };
+ int16_t pdu_buf_len = 0;
+ uint8_t length = 0;
+ uint8_t smsc[ 32 ] = { 0 };
+ uint8_t phone_num[ 32 ] = { 0 };
+ strcpy ( smsc, service_center_number );
+ strcpy ( phone_num, phone_number );
+ gsm_str_cut_chr ( smsc, '+' );
+ gsm_str_cut_chr ( phone_num, '+' );
+
+ pdu_buf_len = pdu_encode( smsc, phone_num, sms_text, pdu_buf, SMS_MAX_PDU_LENGTH );
+
+ if ( pdu_buf_len < 0 )
+ {
+ return GSM_ERROR;
+ }
+
+ length = pdu_buf_len - ( ( strlen( smsc ) - 1 ) / 2 + 3 );
+ uint8_to_str( length, byte_buf );
+ gsm_str_cut_chr ( byte_buf, ' ' );
+
+ strcpy( text, GSM_CMD_CMGS );
+ strcat( text, "=" );
+ strcat( text, byte_buf );
+
+ gsm_send_cmd( ctx, text );
+ memset( text, 0, SMS_MAX_PDU_LENGTH );
+
+ for ( int16_t cnt = 0; cnt < pdu_buf_len; cnt++ )
+ {
+ uint8_to_hex ( pdu_buf[ cnt ], byte_buf );
+ strcat ( text, byte_buf );
+ }
+ strcat( text, ctrl_z );
+
+ gsm_send_cmd( ctx, text );
+
+ return GSM_OK;
+}
+
+static int16_t pdu_encode ( uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text,
+ uint8_t *output_buffer, uint16_t buffer_size )
+{
+ if ( buffer_size < 2 )
+ {
+ return GSM_ERROR;
+ }
+
+ int16_t output_buffer_length = 0;
+
+ // 1. Set SMS center number.
+ int16_t length = 0;
+ if ( ( service_center_number != 0 ) && ( strlen ( service_center_number ) > 0 ) )
+ {
+ output_buffer[ 1 ] = TYPE_OF_ADDRESS_INTERNATIONAL_PHONE; // Add type of address.
+ length = encode_phone_number( service_center_number, output_buffer + 2, buffer_size - 2 );
+ if ( length < 0 && length >= 254 )
+ {
+ return GSM_ERROR;
+ }
+ length++;
+ }
+ output_buffer[ 0 ] = length;
+ output_buffer_length = length + 1;
+ if ( output_buffer_length + 4 > buffer_size )
+ {
+ return GSM_ERROR; // Check if it has space for four more bytes.
+ }
+
+ // 2. Set type of message.
+ output_buffer[ output_buffer_length++ ] = SMS_SUBMIT;
+ output_buffer[ output_buffer_length++ ] = 0x00; // Message reference.
+
+ // 3. Set phone number.
+ output_buffer[ output_buffer_length ] = strlen( phone_number );
+ output_buffer[ output_buffer_length + 1 ] = TYPE_OF_ADDRESS_INTERNATIONAL_PHONE;
+ length = encode_phone_number( phone_number, output_buffer + output_buffer_length + 2,
+ buffer_size - output_buffer_length - 2);
+ output_buffer_length += length + 2;
+ if ( output_buffer_length + 4 > buffer_size )
+ {
+ return GSM_ERROR; // Check if it has space for four more bytes.
+ }
+
+ // 4. Protocol identifiers.
+ output_buffer[ output_buffer_length++ ] = 0x00; // TP-PID: Protocol identifier.
+ output_buffer[ output_buffer_length++ ] = 0x00; // TP-DCS: Data coding scheme.
+ output_buffer[ output_buffer_length++ ] = 0xB0; // TP-VP: Validity: 10 days
+
+ // 5. SMS message.
+ int16_t sms_text_length = strlen( sms_text );
+ if ( sms_text_length > SMS_MAX_7BIT_TEXT_LENGTH )
+ {
+ return GSM_ERROR;
+ }
+ output_buffer[ output_buffer_length++ ] = sms_text_length;
+ length = encode_pdu_message( sms_text, sms_text_length, output_buffer + output_buffer_length,
+ buffer_size - output_buffer_length );
+ if ( length < 0 )
+ {
+ return GSM_ERROR;
+ }
+ output_buffer_length += length;
+
+ return output_buffer_length;
+}
+
+static uint8_t swap_decimal_nibble ( uint8_t x )
+{
+ return ( x / 16 ) + ( ( x % 16 ) * 10 );
+}
+
+static int16_t encode_pdu_message ( uint8_t *sms_text, int16_t sms_text_length,
+ uint8_t *output_buffer, uint16_t buffer_size )
+{
+ // Check if output buffer is big enough.
+ if ( ( sms_text_length * 7 + 7 ) / 8 > buffer_size )
+ {
+ return GSM_ERROR;
+ }
+
+ int16_t output_buffer_length = 0;
+ int16_t carry_on_bits = 1;
+ int16_t i = 0;
+
+ for ( ; i < sms_text_length - 1; ++i )
+ {
+ output_buffer[ output_buffer_length++ ] =
+ ( ( sms_text[ i ] & BITMASK_7BITS ) >> ( carry_on_bits - 1 ) ) |
+ ( ( sms_text[ i + 1 ] & BITMASK_7BITS ) << ( 8 - carry_on_bits ) );
+ carry_on_bits++;
+ if ( carry_on_bits == 8 )
+ {
+ carry_on_bits = 1;
+ ++i;
+ }
+ }
+
+ if ( i < sms_text_length )
+ {
+ output_buffer[ output_buffer_length++ ] = ( sms_text[ i ] & BITMASK_7BITS ) >> ( carry_on_bits - 1 );
+ }
+
+ return output_buffer_length;
+}
+
+static int16_t encode_phone_number ( uint8_t *phone_number, uint8_t *output_buffer, uint16_t buffer_size )
+{
+ int16_t output_buffer_length = 0;
+ int16_t phone_number_length = strlen( phone_number );
+
+ // Check if the output buffer is big enough.
+ if ( ( phone_number_length + 1 ) / 2 > buffer_size )
+ {
+ return GSM_ERROR;
+ }
+
+ int16_t i = 0;
+ for ( ; i < phone_number_length; ++i )
+ {
+ if ( phone_number[ i ] < '0' && phone_number[ i ] > '9' )
+ {
+ return GSM_ERROR;
+ }
+
+ if ( i % 2 == 0 )
+ {
+ output_buffer[ output_buffer_length++ ] = BITMASK_HIGH_4BITS | ( phone_number[ i ] - '0' );
+ }
+ else
+ {
+ output_buffer[ output_buffer_length - 1 ] =
+ ( output_buffer[ output_buffer_length - 1 ] & BITMASK_LOW_4BITS ) |
+ ( ( phone_number[ i ] - '0' ) << 4 );
+ }
+ }
+
+ return output_buffer_length;
+}
+
+static void gsm_str_cut_chr ( uint8_t *str, uint8_t chr )
+{
+ uint16_t cnt_0, cnt_1;
+ for ( cnt_0 = 0; cnt_0 < strlen( str ); cnt_0++ )
+ {
+ if ( str[ cnt_0 ] == chr )
+ {
+ for ( cnt_1 = cnt_0; cnt_1 < strlen( str ); cnt_1++ )
+ {
+ str[ cnt_1 ] = str[ cnt_1 + 1 ];
+ }
+ }
+ }
+}
+
+// ------------------------------------------------------------------------- END
diff --git a/clicks/gsm/memake.txt b/clicks/gsm/memake.txt
deleted file mode 100644
index c98ad37761..0000000000
--- a/clicks/gsm/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Gsm
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/gsm2/CHANGELOG.md b/clicks/gsm2/CHANGELOG.md
index 8bafaaf891..283ee8b874 100644
--- a/clicks/gsm2/CHANGELOG.md
+++ b/clicks/gsm2/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.9
+### Version 2.1.0.0
- Initial release
diff --git a/clicks/gsm2/CMakeLists.txt b/clicks/gsm2/CMakeLists.txt
new file mode 100644
index 0000000000..bc3e73ef08
--- /dev/null
+++ b/clicks/gsm2/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_gsm2 LANGUAGES MikroC)
+else()
+ project(example_gsm2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_gsm2
+ example/main.c
+
+)
+
+
+############################ example_gsm2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_gsm2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_gsm2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_gsm2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_gsm2)
+target_link_libraries(example_gsm2 PUBLIC Click.GSM2)
+############################ example_gsm2 GENERATED CODE END ###########################
diff --git a/clicks/gsm2/DETAILS.md b/clicks/gsm2/DETAILS.md
index 10f1bcbbee..0503f8de1a 100644
--- a/clicks/gsm2/DETAILS.md
+++ b/clicks/gsm2/DETAILS.md
@@ -1,7 +1,8 @@
+---
# GSM 2 click
-GSM2 click is a compact quad-band GSM cellular network communication solution, featuring the GSM/GPRS Quectel M95.
+> GSM2 click is a compact quad-band GSM cellular network communication solution, featuring the GSM/GPRS Quectel M95. This module features a full set of options for the cellular networking and communication, such as the network status indication, jamming detection, embedded internet protocols, including TCP/IP, UDP, FTP, PPP, HTTP, SMTP, full GPRS multislot class 12 implementation, it is fully compliant to GSM Phase 2/2+, and more. Data communication speed is rated up to 85.6 kbps for both uplink and downlink connection.
@@ -12,139 +13,200 @@ GSM2 click is a compact quad-band GSM cellular network communication solution, f
---
-#### Click library
+#### Click library
-- **Author** : MikroE Team
-- **Date** : Apr 2020.
-- **Type** : UART GPS/GNSS type
+- **Author** : Stefan Filipovic
+- **Date** : May 2023.
+- **Type** : UART type
# Software Support
-We provide a library for the Gsm2 Click
-as well as a demo application (example), developed using MikroElektronika
-[compilers](https://shop.mikroe.com/compilers).
-The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
+We provide a library for the GSM2 Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
-Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
## Library Description
-> This library contains API for Gsm2 Click driver.
+> This library contains API for GSM2 Click driver.
#### Standard key functions :
-- Config Object Initialization function.
-> void gsm2_cfg_setup ( gsm2_cfg_t *cfg );
-
-- Initialization function.
-> GSM2_RETVAL gsm2_init ( gsm2_t *ctx, gsm2_cfg_t *cfg );
+- `gsm2_cfg_setup` Config Object Initialization function.
+```c
+void gsm2_cfg_setup ( gsm2_cfg_t *cfg );
+```
+- `gsm2_init` Initialization function.
+```c
+err_t gsm2_init ( gsm2_t *ctx, gsm2_cfg_t *cfg );
+```
#### Example key functions :
-- Enables or disables module power.
-> void gsm2_module_power( gsm2_t *ctx );
-
-- Reset module.
-> void gsm2_reset ( gsm2_t *ctx );
+- `gsm2_set_sim_apn` This function sets APN for sim card.
+```c
+void gsm2_set_sim_apn ( gsm2_t *ctx, uint8_t *sim_apn );
+```
+
+- `gsm2_send_sms_text` This function sends text message to a phone number.
+```c
+void gsm2_send_sms_text ( gsm2_t *ctx, uint8_t *phone_number, uint8_t *sms_text );
+```
-- Command function.
-> void gsm2_send_command ( gsm2_t *ctx, char *command );
+- `gsm2_send_sms_pdu` This function sends text message to a phone number in PDU mode.
+```c
+err_t gsm2_send_sms_pdu ( gsm2_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text );
+```
-## Examples Description
+## Example Description
-> This example reads and processes data from GSM 2 clicks.
+> Application example shows device capability of connecting to the network and sending SMS or TCP/UDP messages using standard "AT" commands.
**The demo application is composed of two sections :**
-### Application Init
+### Application Init
-> Initializes driver and wake-up module.
+> Initializes the driver, tests the communication by sending "AT" command, and after that restarts the device.
```c
-void application_init ( void )
+void application_init ( void )
{
- log_cfg_t log_cfg;
- gsm2_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ gsm2_cfg_t gsm2_cfg; /**< Click config object. */
- /**
+ /**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
- * @note If USB_UART_RX and USB_UART_TX
- * are defined as HAL_PIN_NC, you will
- * need to define them manually for log to work.
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- gsm2_cfg_setup( &cfg );
- GSM2_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- gsm2_init( &gsm2, &cfg );
-
- gsm2_module_power( &gsm2 );
-
- gsm2_process( );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ gsm2_cfg_setup( &gsm2_cfg );
+ GSM2_MAP_MIKROBUS( gsm2_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == gsm2_init( &gsm2, &gsm2_cfg ) )
+ {
+ log_error( &logger, " Application Init Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
- gsm2_send_command( &gsm2, GSM2_SINGLE_CMD_AT );
- gsm2_process( );
-
- gsm2_send_command( &gsm2, GSM2_SINGLE_CMD_AT );
- gsm2_process( );
-
- gsm2_send_command( &gsm2, GSM2_SINGLE_CMD_AT );
- gsm2_process( );
-
- gsm2_send_command( &gsm2, GSM2_SINGLE_CMD_ATE0 );
- gsm2_process( );
+ gsm2_process( );
+ gsm2_clear_app_buf( );
- gsm2_send_command( &gsm2, "AT+IFC=2,2" );
- gsm2_process( );
-
- gsm2_send_command( &gsm2, "AT+CMGF=1" );
- gsm2_process( );
+ // Check communication
+ gsm2_send_cmd( &gsm2, GSM2_CMD_AT );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ gsm2_error_check( error_flag );
+
+ // Restart device
+ #define RESTART_DEVICE "1,1"
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_CFUN, RESTART_DEVICE );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ gsm2_error_check( error_flag );
- Delay_ms( 2000 );
+ log_info( &logger, " Application Task " );
+ example_state = GSM2_CONFIGURE_FOR_NETWORK;
}
-
+
```
### Application Task
-> Reads the received data and parses it.
+> Application task is split in few stages:
+ - GSM2_CONFIGURE_FOR_NETWORK:
+ > Sets configuration to device to be able to connect to the network.
+ - GSM2_WAIT_FOR_CONNECTION:
+ > Waits for the network registration indicated via CREG URC event and then checks the connection status.
+ - GSM2_CONFIGURE_FOR_EXAMPLE:
+ > Sets the device configuration for sending SMS or TCP/UDP messages depending on the selected demo example.
+ - GSM2_EXAMPLE:
+ > Depending on the selected demo example, it sends an SMS message (in PDU or TXT mode) or TCP/UDP message.
+> By default, the TCP/UDP example is selected.
```c
-void application_task ( void )
+void application_task ( void )
{
- gsm2_process( );
-}
+ switch ( example_state )
+ {
+ case GSM2_CONFIGURE_FOR_NETWORK:
+ {
+ if ( GSM2_OK == gsm2_configure_for_network( ) )
+ {
+ example_state = GSM2_WAIT_FOR_CONNECTION;
+ }
+ break;
+ }
+ case GSM2_WAIT_FOR_CONNECTION:
+ {
+ if ( GSM2_OK == gsm2_check_connection( ) )
+ {
+ example_state = GSM2_CONFIGURE_FOR_EXAMPLE;
+ }
+ break;
+ }
+ case GSM2_CONFIGURE_FOR_EXAMPLE:
+ {
+ if ( GSM2_OK == gsm2_configure_for_example( ) )
+ {
+ example_state = GSM2_EXAMPLE;
+ }
+ break;
+ }
+ case GSM2_EXAMPLE:
+ {
+ gsm2_example( );
+ break;
+ }
+ default:
+ {
+ log_error( &logger, " Example state." );
+ break;
+ }
+ }
+}
```
-The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
+## Note
+
+> In order for the examples to work, user needs to set the APN and SMSC (SMS PDU mode only)
+of entered SIM card as well as the phone number (SMS mode only) to which he wants to send an SMS.
+Enter valid values for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE.
+> > Example:
+> > - SIM_APN "internet"
+> > - SIM_SMSC "+381610401"
+> > - PHONE_NUMBER_TO_MESSAGE "+381659999999"
+
-**Other mikroE Libraries used in the example:**
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
- MikroSDK.Board
- MikroSDK.Log
-- Click.Gsm2
+- Click.GSM2
**Additional notes and informations**
-Depending on the development board you are using, you may need
-[USB UART click](https://shop.mikroe.com/usb-uart-click),
-[USB UART 2 Click](https://shop.mikroe.com/usb-uart-2-click) or
-[RS232 Click](https://shop.mikroe.com/rs232-click) to connect to your PC, for
-development systems with no UART to USB interface available on the board. The
-terminal available in all Mikroelektronika
-[compilers](https://shop.mikroe.com/compilers), or any other terminal application
-of your choice, can be used to read the message.
-
-
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
---
diff --git a/clicks/gsm2/README.md b/clicks/gsm2/README.md
index 0fbed2a0bc..81ccbbc7ad 100644
--- a/clicks/gsm2/README.md
+++ b/clicks/gsm2/README.md
@@ -1,9 +1,9 @@
\mainpage Main Page
-
+
---
# GSM 2 click
-GSM2 click is a compact quad-band GSM cellular network communication solution, featuring the GSM/GPRS Quectel M95.
+> GSM2 click is a compact quad-band GSM cellular network communication solution, featuring the GSM/GPRS Quectel M95. This module features a full set of options for the cellular networking and communication, such as the network status indication, jamming detection, embedded internet protocols, including TCP/IP, UDP, FTP, PPP, HTTP, SMTP, full GPRS multislot class 12 implementation, it is fully compliant to GSM Phase 2/2+, and more. Data communication speed is rated up to 85.6 kbps for both uplink and downlink connection.
@@ -14,139 +14,200 @@ GSM2 click is a compact quad-band GSM cellular network communication solution, f
---
-#### Click library
+#### Click library
-- **Author** : MikroE Team
-- **Date** : Apr 2020.
-- **Type** : UART GPS/GNSS type
+- **Author** : Stefan Filipovic
+- **Date** : May 2023.
+- **Type** : UART type
# Software Support
-We provide a library for the Gsm2 Click
-as well as a demo application (example), developed using MikroElektronika
-[compilers](https://shop.mikroe.com/compilers).
-The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
+We provide a library for the GSM2 Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
-Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
## Library Description
-> This library contains API for Gsm2 Click driver.
+> This library contains API for GSM2 Click driver.
#### Standard key functions :
-- Config Object Initialization function.
-> void gsm2_cfg_setup ( gsm2_cfg_t *cfg );
-
-- Initialization function.
-> GSM2_RETVAL gsm2_init ( gsm2_t *ctx, gsm2_cfg_t *cfg );
+- `gsm2_cfg_setup` Config Object Initialization function.
+```c
+void gsm2_cfg_setup ( gsm2_cfg_t *cfg );
+```
+- `gsm2_init` Initialization function.
+```c
+err_t gsm2_init ( gsm2_t *ctx, gsm2_cfg_t *cfg );
+```
#### Example key functions :
-- Enables or disables module power.
-> void gsm2_module_power( gsm2_t *ctx );
-
-- Reset module.
-> void gsm2_reset ( gsm2_t *ctx );
+- `gsm2_set_sim_apn` This function sets APN for sim card.
+```c
+void gsm2_set_sim_apn ( gsm2_t *ctx, uint8_t *sim_apn );
+```
+
+- `gsm2_send_sms_text` This function sends text message to a phone number.
+```c
+void gsm2_send_sms_text ( gsm2_t *ctx, uint8_t *phone_number, uint8_t *sms_text );
+```
-- Command function.
-> void gsm2_send_command ( gsm2_t *ctx, char *command );
+- `gsm2_send_sms_pdu` This function sends text message to a phone number in PDU mode.
+```c
+err_t gsm2_send_sms_pdu ( gsm2_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text );
+```
-## Examples Description
+## Example Description
-> This example reads and processes data from GSM 2 clicks.
+> Application example shows device capability of connecting to the network and sending SMS or TCP/UDP messages using standard "AT" commands.
**The demo application is composed of two sections :**
-### Application Init
+### Application Init
-> Initializes driver and wake-up module.
+> Initializes the driver, tests the communication by sending "AT" command, and after that restarts the device.
```c
-void application_init ( void )
+void application_init ( void )
{
- log_cfg_t log_cfg;
- gsm2_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ gsm2_cfg_t gsm2_cfg; /**< Click config object. */
- /**
+ /**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
- * @note If USB_UART_RX and USB_UART_TX
- * are defined as HAL_PIN_NC, you will
- * need to define them manually for log to work.
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- gsm2_cfg_setup( &cfg );
- GSM2_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- gsm2_init( &gsm2, &cfg );
-
- gsm2_module_power( &gsm2 );
-
- gsm2_process( );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ gsm2_cfg_setup( &gsm2_cfg );
+ GSM2_MAP_MIKROBUS( gsm2_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == gsm2_init( &gsm2, &gsm2_cfg ) )
+ {
+ log_error( &logger, " Application Init Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
- gsm2_send_command( &gsm2, GSM2_SINGLE_CMD_AT );
- gsm2_process( );
-
- gsm2_send_command( &gsm2, GSM2_SINGLE_CMD_AT );
- gsm2_process( );
-
- gsm2_send_command( &gsm2, GSM2_SINGLE_CMD_AT );
- gsm2_process( );
-
- gsm2_send_command( &gsm2, GSM2_SINGLE_CMD_ATE0 );
- gsm2_process( );
+ gsm2_process( );
+ gsm2_clear_app_buf( );
- gsm2_send_command( &gsm2, "AT+IFC=2,2" );
- gsm2_process( );
-
- gsm2_send_command( &gsm2, "AT+CMGF=1" );
- gsm2_process( );
+ // Check communication
+ gsm2_send_cmd( &gsm2, GSM2_CMD_AT );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ gsm2_error_check( error_flag );
+
+ // Restart device
+ #define RESTART_DEVICE "1,1"
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_CFUN, RESTART_DEVICE );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ gsm2_error_check( error_flag );
- Delay_ms( 2000 );
+ log_info( &logger, " Application Task " );
+ example_state = GSM2_CONFIGURE_FOR_NETWORK;
}
-
+
```
### Application Task
-> Reads the received data and parses it.
+> Application task is split in few stages:
+ - GSM2_CONFIGURE_FOR_NETWORK:
+ > Sets configuration to device to be able to connect to the network.
+ - GSM2_WAIT_FOR_CONNECTION:
+ > Waits for the network registration indicated via CREG URC event and then checks the connection status.
+ - GSM2_CONFIGURE_FOR_EXAMPLE:
+ > Sets the device configuration for sending SMS or TCP/UDP messages depending on the selected demo example.
+ - GSM2_EXAMPLE:
+ > Depending on the selected demo example, it sends an SMS message (in PDU or TXT mode) or TCP/UDP message.
+> By default, the TCP/UDP example is selected.
```c
-void application_task ( void )
+void application_task ( void )
{
- gsm2_process( );
-}
+ switch ( example_state )
+ {
+ case GSM2_CONFIGURE_FOR_NETWORK:
+ {
+ if ( GSM2_OK == gsm2_configure_for_network( ) )
+ {
+ example_state = GSM2_WAIT_FOR_CONNECTION;
+ }
+ break;
+ }
+ case GSM2_WAIT_FOR_CONNECTION:
+ {
+ if ( GSM2_OK == gsm2_check_connection( ) )
+ {
+ example_state = GSM2_CONFIGURE_FOR_EXAMPLE;
+ }
+ break;
+ }
+ case GSM2_CONFIGURE_FOR_EXAMPLE:
+ {
+ if ( GSM2_OK == gsm2_configure_for_example( ) )
+ {
+ example_state = GSM2_EXAMPLE;
+ }
+ break;
+ }
+ case GSM2_EXAMPLE:
+ {
+ gsm2_example( );
+ break;
+ }
+ default:
+ {
+ log_error( &logger, " Example state." );
+ break;
+ }
+ }
+}
```
-The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
+## Note
+
+> In order for the examples to work, user needs to set the APN and SMSC (SMS PDU mode only)
+of entered SIM card as well as the phone number (SMS mode only) to which he wants to send an SMS.
+Enter valid values for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE.
+> > Example:
+> > - SIM_APN "internet"
+> > - SIM_SMSC "+381610401"
+> > - PHONE_NUMBER_TO_MESSAGE "+381659999999"
+
-**Other mikroE Libraries used in the example:**
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
- MikroSDK.Board
- MikroSDK.Log
-- Click.Gsm2
+- Click.GSM2
**Additional notes and informations**
-Depending on the development board you are using, you may need
-[USB UART click](https://shop.mikroe.com/usb-uart-click),
-[USB UART 2 Click](https://shop.mikroe.com/usb-uart-2-click) or
-[RS232 Click](https://shop.mikroe.com/rs232-click) to connect to your PC, for
-development systems with no UART to USB interface available on the board. The
-terminal available in all Mikroelektronika
-[compilers](https://shop.mikroe.com/compilers), or any other terminal application
-of your choice, can be used to read the message.
-
-
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
---
diff --git a/clicks/gsm2/doc/doxy/Doxyfile.doxy b/clicks/gsm2/doc/doxy/Doxyfile.doxy
index 970e85f30e..6552c1c035 100644
--- a/clicks/gsm2/doc/doxy/Doxyfile.doxy
+++ b/clicks/gsm2/doc/doxy/Doxyfile.doxy
@@ -20,7 +20,7 @@
# This tag specifies the encoding used for all characters in the config 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
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
# for the list of possible encodings.
# The default value is: UTF-8.
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/gsm2/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/gsm2/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,11 +291,11 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# 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.
+# documentation. See http://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.
@@ -337,7 +337,7 @@ BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# https://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# http://www.riverbankcomputing.co.uk/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.
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,17 +703,17 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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.
+# to be installed. See also http://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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,14 +790,14 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/gsm2/example \
- ../clicks/gsm2/lib/include \
- ../clicks/gsm2/README.md
+INPUT = ../cmake/gsm2/example \
+ ../cmake/gsm2/lib_gsm2/include \
+ ../cmake/gsm2/README.md
# 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
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
# possible encodings.
# The default value is: UTF-8.
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/gsm2/example
+EXAMPLE_PATH = ../cmake/gsm2/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1047,7 +1047,7 @@ 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
+# (see http://www.gnu.org/software/global/global.html). You will need version
# 4.8.6 or higher.
#
# To use it do the following:
@@ -1075,7 +1075,7 @@ USE_HTAGS = NO
VERBATIM_HEADERS = YES
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
-# clang parser (see: https://clang.llvm.org/) for more accurate parsing at 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.
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,12 +1206,12 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
+# http://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.
@@ -1270,12 +1270,12 @@ 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_NAME.apple.com/tools/xcode/), introduced with
+# environment (see: http://DEVELOPER_NAME.apple.com/tools/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_NAME/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See https://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.html
+# startup. See http://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.html
# for more information.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
@@ -1288,7 +1288,7 @@ GENERATE_DOCSET = NO
# The default value is: Doxygen generated docs.
# This tag requires that the tag GENERATE_DOCSET is set to YES.
-DOCSET_FEEDNAME = "MikroE Click boards"
+DOCSET_FEEDNAME = "Mikroe Click boards"
# This tag specifies a string that should uniquely identify the documentation
# set bundle. This should be a reverse domain-name style string, e.g.
@@ -1315,7 +1315,7 @@ DOCSET_PUBLISHER_NAME = MikroElektronika
# 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
+# (see: http://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
@@ -1328,14 +1328,14 @@ DOCSET_PUBLISHER_NAME = MikroElektronika
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
-GENERATE_HTMLHELP = 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 =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,11 +1387,11 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# (see: http://qt-project.org/doc/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.
@@ -1399,7 +1399,7 @@ QHP_NAMESPACE = org.doxygen.Project
# 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://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
# folders).
# The default value is: doc.
# This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1408,33 +1408,33 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/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://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1529,7 +1529,7 @@ FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# https://www.mathjax.org) which uses client side Javascript for the rendering
+# http://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
@@ -1541,7 +1541,7 @@ 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:
-# https://docs.mathjax.org/en/latest/output.html) for more details.
+# http://docs.mathjax.org/en/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.
@@ -1556,26 +1556,26 @@ MATHJAX_FORMAT = HTML-CSS
# 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.mathjax.org/mathjax/latest.
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
+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 =
+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: https://docs.mathjax.org/en/latest/output.html) for more details. For an
+# (see: http://docs.mathjax.org/en/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 =
+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
@@ -1618,7 +1618,7 @@ SERVER_BASED_SEARCH = NO
#
# 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/).
+# Xapian (see: http://xapian.org/).
#
# See the section "External Indexing and Searching" for details.
# The default value is: NO.
@@ -1631,11 +1631,11 @@ EXTERNAL_SEARCH = NO
#
# 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
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1818,7 +1818,7 @@ 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.
+# http://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.
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2001,7 +2001,7 @@ DOCBOOK_PROGRAMLISTING = NO
#---------------------------------------------------------------------------
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
-# AutoGen Definitions (see https://autogen.sf.net) file that captures the
+# AutoGen Definitions (see http://autogen.sf.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.
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2170,12 +2170,6 @@ EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH = /usr/bin/perl
-
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
@@ -2189,21 +2183,12 @@ PERL_PATH = /usr/bin/perl
CLASS_DIAGRAMS = YES
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# https://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
# 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 =
+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.
@@ -2213,7 +2198,7 @@ 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:
-# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# 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: NO.
@@ -2252,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2368,7 +2353,7 @@ 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:
-# https://www.graphviz.org/)).
+# 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).
@@ -2396,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2479,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/gsm2/doc/package/manifest.json b/clicks/gsm2/doc/package/manifest.json
index 8045cbdd86..890e7f251a 100644
--- a/clicks/gsm2/doc/package/manifest.json
+++ b/clicks/gsm2/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "GSM/LTE",
+ "architecture": "ARM|PIC|PIC32|RISC-V",
+ "category": "Click Boards > Wireless connectivity > GSM/LTE",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+ "dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "GSM 2 click",
"example_list": [
@@ -25,15 +24,17 @@
},
"name": "mikroe.click.gsm2",
"product_link": "https://www.mikroe.com/gsm-2-click",
- "short_description": "This example reads and processes data from GSM 2 clicks.",
- "supported_compiler": "mikroC AI",
+ "short_description": "GSM2 click is a compact quad-band GSM cellular network communication solution, featuring the GSM/GPRS Quectel M95. This module features a full set of options for the cellular networking and communication, such as the network status indication, jamming detection, embedded internet protocols, including TCP/IP, UDP, FTP, PPP, HTTP, SMTP, full GPRS multislot class 12 implementation, it is fully compliant to GSM Phase 2/2+, and more. Data communication speed is rated up to 85.6 kbps for both uplink and downlink connection.",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "related_projects": [
535
],
- "version": "2.0.0.9"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.0",
+ "cmake": true,
+ "alias": "Click.GSM2",
+ "subdir_name": "lib_gsm2"
}
-
diff --git a/clicks/gsm2/example/CMakeLists.txt b/clicks/gsm2/example/CMakeLists.txt
new file mode 100644
index 0000000000..ad7d783240
--- /dev/null
+++ b/clicks/gsm2/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_gsm2 LANGUAGES MikroC)
+else()
+ project(example_gsm2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_gsm2
+ main.c
+
+)
+
+
+############################ example_gsm2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_gsm2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_gsm2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_gsm2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_gsm2)
+target_link_libraries(example_gsm2 PUBLIC Click.GSM2)
+############################ example_gsm2 GENERATED CODE END ###########################
diff --git a/clicks/gsm2/example/main.c b/clicks/gsm2/example/main.c
index 4e8e5eac36..1ea745fbf2 100644
--- a/clicks/gsm2/example/main.c
+++ b/clicks/gsm2/example/main.c
@@ -1,162 +1,634 @@
/*!
- * \file
- * \brief Gsm2 Click example
- *
+ * @file main.c
+ * @brief GSM 2 Click Example.
+ *
* # Description
- * This example reads and processes data from GSM 2 clicks.
+ * Application example shows device capability of connecting to the network and
+ * sending SMS or TCP/UDP messages using standard "AT" commands.
*
* The demo application is composed of two sections :
- *
- * ## Application Init
- * Initializes driver and wake-up module.
- *
- * ## Application Task
- * Reads the received data and parses it.
- *
+ *
+ * ## Application Init
+ * Initializes the driver, tests the communication by sending "AT" command, and after that restarts the device.
+ *
+ * ## Application Task
+ * Application task is split in few stages:
+ * - GSM2_CONFIGURE_FOR_NETWORK:
+ * Sets configuration to device to be able to connect to the network.
+ *
+ * - GSM2_WAIT_FOR_CONNECTION:
+ * Waits for the network registration indicated via CREG URC event and then checks
+ * the connection status.
+ *
+ * - GSM2_CONFIGURE_FOR_EXAMPLE:
+ * Sets the device configuration for sending SMS or TCP/UDP messages depending on the selected demo example.
+ *
+ * - GSM2_EXAMPLE:
+ * Depending on the selected demo example, it sends an SMS message (in PDU or TXT mode) or TCP/UDP message.
+ *
+ * By default, the TCP/UDP example is selected.
+ *
* ## Additional Function
- * - gsm2_process ( ) - The general process of collecting presponce
- * that sends a module.
- *
- * \author MikroE Team
+ * - static void gsm2_clear_app_buf ( void )
+ * - static err_t gsm2_process ( void )
+ * - static void gsm2_error_check( err_t error_flag )
+ * - static void gsm2_log_app_buf ( void )
+ * - static err_t gsm2_rsp_check ( uint8_t *rsp )
+ * - static err_t gsm2_configure_for_connection( void )
+ * - static err_t gsm2_check_connection( void )
+ * - static err_t gsm2_configure_for_messages( void )
+ * - static err_t gsm2_send_message( void )
+ *
+ * @note
+ * In order for the examples to work, user needs to set the APN and SMSC (SMS PDU mode only)
+ * of entered SIM card as well as the phone number (SMS mode only) to which he wants to send an SMS.
+ * Enter valid values for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE.
+ * Example:
+ SIM_APN "internet"
+ SIM_SMSC "+381610401"
+ PHONE_NUMBER_TO_MESSAGE "+381659999999"
+ *
+ * @author Stefan Filipovic
*
*/
-// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "gsm2.h"
-#include "string.h"
+#include "conversions.h"
-#define PROCESS_COUNTER 10
-#define PROCESS_RX_BUFFER_SIZE 500
-#define PROCESS_PARSER_BUFFER_SIZE 500
+// Example selection macros
+#define EXAMPLE_TCP_UDP 0 // Example of sending messages to a TCP/UDP echo server
+#define EXAMPLE_SMS 1 // Example of sending SMS to a phone number
+#define DEMO_EXAMPLE EXAMPLE_TCP_UDP // Example selection macro
-// ------------------------------------------------------------------ VARIABLES
+// SIM APN config
+#define SIM_APN "internet" // Set valid SIM APN
-#define DEMO_APP_RECEIVER
-//#define DEMO_APP_TRANSMITER
+// SMS example parameters
+#define SIM_SMSC "" // Set valid SMS Service Center Address - only in SMS PDU mode
+#define PHONE_NUMBER_TO_MESSAGE "" // Set Phone number to message
+#define SMS_MODE "1" // SMS mode: "0" - PDU, "1" - TXT
+
+// TCP/UDP example parameters
+#define REMOTE_IP "77.46.162.162" // TCP/UDP echo server IP address
+#define REMOTE_PORT "51111" // TCP/UDP echo server port
+
+// Message content
+#define MESSAGE_CONTENT "GSM 2 click board - demo example."
+
+// Application buffer size
+#define APP_BUFFER_SIZE 256
+#define PROCESS_BUFFER_SIZE 256
+
+/**
+ * @brief Example states.
+ * @details Predefined enum values for application example state.
+ */
+typedef enum
+{
+ GSM2_CONFIGURE_FOR_NETWORK = 1,
+ GSM2_WAIT_FOR_CONNECTION,
+ GSM2_CONFIGURE_FOR_EXAMPLE,
+ GSM2_EXAMPLE
+
+} gsm2_example_state_t;
static gsm2_t gsm2;
static log_t logger;
-static char current_parser_buf[ PROCESS_PARSER_BUFFER_SIZE ];
-static uint8_t send_data_cnt = 0;
+/**
+ * @brief Application example variables.
+ * @details Variables used in application example.
+ */
+static uint8_t app_buf[ APP_BUFFER_SIZE ] = { 0 };
+static int32_t app_buf_len = 0;
+static err_t error_flag;
+static gsm2_example_state_t example_state;
-// ------------------------------------------------------- ADDITIONAL FUNCTIONS
+/**
+ * @brief Clearing application buffer.
+ * @details This function clears memory of application
+ * buffer and reset its length and counter.
+ */
+static void gsm2_clear_app_buf ( void );
-static void gsm2_process ( void )
+/**
+ * @brief Data reading function.
+ * @details This function reads data from device and
+ * appends it to the application buffer.
+ * @return @li @c 0 - Some data is read.
+ * @li @c -1 - Nothing is read.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm2_process ( void );
+
+/**
+ * @brief Check for errors.
+ * @details This function checks for different types of
+ * errors and logs them on UART or logs the response if no errors occured.
+ * @param[in] error_flag Error flag to check.
+ */
+static void gsm2_error_check ( err_t error_flag );
+
+/**
+ * @brief Logs application buffer.
+ * @details This function logs data from application buffer.
+ */
+static void gsm2_log_app_buf ( void );
+
+/**
+ * @brief Response check.
+ * @details This function checks for response and
+ * returns the status of response.
+ * @param[in] rsp Expected response.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm2_rsp_check ( uint8_t *rsp );
+
+/**
+ * @brief Configure device for connection to the network.
+ * @details Sends commands to configure and enable
+ * connection to the specified network.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm2_configure_for_network ( void );
+
+/**
+ * @brief Wait for connection signal.
+ * @details Wait for connection signal from CREG URC.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm2_check_connection ( void );
+
+/**
+ * @brief Configure device for example.
+ * @details Configure device for the specified example.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm2_configure_for_example ( void );
+
+/**
+ * @brief Execute example.
+ * @details This function executes SMS or TCP/UDP example depending on the DEMO_EXAMPLE macro.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm2_example ( void );
+
+void application_init ( void )
{
- int32_t rsp_size;
- uint16_t rsp_cnt = 0;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ gsm2_cfg_t gsm2_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ gsm2_cfg_setup( &gsm2_cfg );
+ GSM2_MAP_MIKROBUS( gsm2_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == gsm2_init( &gsm2, &gsm2_cfg ) )
+ {
+ log_error( &logger, " Application Init Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
- char uart_rx_buffer[ PROCESS_RX_BUFFER_SIZE ] = { 0 };
- uint16_t check_buf_cnt;
- uint8_t process_cnt = PROCESS_COUNTER;
+ gsm2_process( );
+ gsm2_clear_app_buf( );
+
+ // Check communication
+ gsm2_send_cmd( &gsm2, GSM2_CMD_AT );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ gsm2_error_check( error_flag );
- // Clear parser buffer
- memset( current_parser_buf, 0 , PROCESS_PARSER_BUFFER_SIZE );
+ // Restart device
+ #define RESTART_DEVICE "1,1"
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_CFUN, RESTART_DEVICE );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ gsm2_error_check( error_flag );
+ log_info( &logger, " Application Task " );
+ example_state = GSM2_CONFIGURE_FOR_NETWORK;
+}
- while( process_cnt != 0 )
+void application_task ( void )
+{
+ switch ( example_state )
{
- rsp_size = gsm2_generic_read( &gsm2, &uart_rx_buffer, PROCESS_RX_BUFFER_SIZE );
-
- if ( rsp_size > 0 )
- {
- // Validation of the received data
- for ( check_buf_cnt = 0; check_buf_cnt < rsp_size; check_buf_cnt++ )
+ case GSM2_CONFIGURE_FOR_NETWORK:
+ {
+ if ( GSM2_OK == gsm2_configure_for_network( ) )
{
- if ( uart_rx_buffer[ check_buf_cnt ] == 0 )
- {
- uart_rx_buffer[ check_buf_cnt ] = 13;
- }
+ example_state = GSM2_WAIT_FOR_CONNECTION;
}
- log_printf( &logger, "%s", uart_rx_buffer );
-
- // Storages data in parser buffer
- rsp_cnt += rsp_size;
- if ( rsp_cnt < PROCESS_PARSER_BUFFER_SIZE )
+ break;
+ }
+ case GSM2_WAIT_FOR_CONNECTION:
+ {
+ if ( GSM2_OK == gsm2_check_connection( ) )
{
- strncat( current_parser_buf, uart_rx_buffer, rsp_size );
+ example_state = GSM2_CONFIGURE_FOR_EXAMPLE;
}
-
- // Clear RX buffer
- memset( uart_rx_buffer, 0, PROCESS_RX_BUFFER_SIZE );
- }
- else
+ break;
+ }
+ case GSM2_CONFIGURE_FOR_EXAMPLE:
+ {
+ if ( GSM2_OK == gsm2_configure_for_example( ) )
+ {
+ example_state = GSM2_EXAMPLE;
+ }
+ break;
+ }
+ case GSM2_EXAMPLE:
+ {
+ gsm2_example( );
+ break;
+ }
+ default:
{
- process_cnt--;
-
- // Process delay
- Delay_ms( 100 );
+ log_error( &logger, " Example state." );
+ break;
}
}
}
-// ------------------------------------------------------ APPLICATION FUNCTIONS
-
-void application_init ( void )
+void main ( void )
{
- log_cfg_t log_cfg;
- gsm2_cfg_t cfg;
-
- /**
- * Logger initialization.
- * Default baud rate: 115200
- * Default log level: LOG_LEVEL_DEBUG
- * @note If USB_UART_RX and USB_UART_TX
- * are defined as HAL_PIN_NC, you will
- * need to define them manually for log to work.
- * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
- */
- LOG_MAP_USB_UART( log_cfg );
- log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
+ application_init( );
- // Click initialization.
+ for ( ; ; )
+ {
+ application_task( );
+ }
+}
- gsm2_cfg_setup( &cfg );
- GSM2_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- gsm2_init( &gsm2, &cfg );
+static void gsm2_clear_app_buf ( void )
+{
+ memset( app_buf, 0, app_buf_len );
+ app_buf_len = 0;
+}
- gsm2_module_power( &gsm2 );
+static err_t gsm2_process ( void )
+{
+ uint8_t rx_buf[ PROCESS_BUFFER_SIZE ] = { 0 };
+ int32_t rx_size = 0;
+ rx_size = gsm2_generic_read( &gsm2, rx_buf, PROCESS_BUFFER_SIZE );
+ if ( rx_size > 0 )
+ {
+ int32_t buf_cnt = app_buf_len;
+ if ( ( ( app_buf_len + rx_size ) > APP_BUFFER_SIZE ) && ( app_buf_len > 0 ) )
+ {
+ buf_cnt = APP_BUFFER_SIZE - ( ( app_buf_len + rx_size ) - APP_BUFFER_SIZE );
+ memmove ( app_buf, &app_buf[ APP_BUFFER_SIZE - buf_cnt ], buf_cnt );
+ }
+ for ( int32_t rx_cnt = 0; rx_cnt < rx_size; rx_cnt++ )
+ {
+ if ( rx_buf[ rx_cnt ] )
+ {
+ app_buf[ buf_cnt++ ] = rx_buf[ rx_cnt ];
+ if ( app_buf_len < APP_BUFFER_SIZE )
+ {
+ app_buf_len++;
+ }
+ }
+ }
+ return GSM2_OK;
+ }
+ return GSM2_ERROR;
+}
- gsm2_process( );
-
- gsm2_send_command( &gsm2, GSM2_SINGLE_CMD_AT );
- gsm2_process( );
+static err_t gsm2_rsp_check ( uint8_t *rsp )
+{
+ uint32_t timeout_cnt = 0;
+ uint32_t timeout = 120000;
+ gsm2_clear_app_buf( );
+ gsm2_process( );
+ while ( ( 0 == strstr( app_buf, rsp ) ) &&
+ ( 0 == strstr( app_buf, GSM2_RSP_ERROR ) ) )
+ {
+ gsm2_process( );
+ if ( timeout_cnt++ > timeout )
+ {
+ gsm2_clear_app_buf( );
+ return GSM2_ERROR_TIMEOUT;
+ }
+ Delay_ms( 1 );
+ }
+ Delay_ms( 100 );
+ gsm2_process( );
+ if ( strstr( app_buf, rsp ) )
+ {
+ return GSM2_OK;
+ }
+ else if ( strstr( app_buf, GSM2_RSP_ERROR ) )
+ {
+ return GSM2_ERROR_CMD;
+ }
+ else
+ {
+ return GSM2_ERROR_UNKNOWN;
+ }
+}
- gsm2_send_command( &gsm2, GSM2_SINGLE_CMD_AT );
- gsm2_process( );
+static void gsm2_error_check ( err_t error_flag )
+{
+ switch ( error_flag )
+ {
+ case GSM2_OK:
+ {
+ gsm2_log_app_buf( );
+ break;
+ }
+ case GSM2_ERROR:
+ {
+ log_error( &logger, " Overflow!" );
+ break;
+ }
+ case GSM2_ERROR_TIMEOUT:
+ {
+ log_error( &logger, " Timeout!" );
+ break;
+ }
+ case GSM2_ERROR_CMD:
+ {
+ log_error( &logger, " CMD!" );
+ break;
+ }
+ case GSM2_ERROR_UNKNOWN:
+ default:
+ {
+ log_error( &logger, " Unknown!" );
+ break;
+ }
+ }
+ Delay_ms( 500 );
+}
- gsm2_send_command( &gsm2, GSM2_SINGLE_CMD_AT );
- gsm2_process( );
+static void gsm2_log_app_buf ( void )
+{
+ for ( int32_t buf_cnt = 0; buf_cnt < app_buf_len; buf_cnt++ )
+ {
+ log_printf( &logger, "%c", app_buf[ buf_cnt ] );
+ }
+}
- gsm2_send_command( &gsm2, GSM2_SINGLE_CMD_ATE0 );
- gsm2_process( );
+static err_t gsm2_configure_for_network ( void )
+{
+ err_t func_error = GSM2_OK;
+#if ( ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP ) || ( DEMO_EXAMPLE == EXAMPLE_SMS ) )
+ Delay_ms ( 5000 );
+ // Deregister from network
+ #define DEREGISTER_FROM_NETWORK "2"
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_COPS, DEREGISTER_FROM_NETWORK );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+
+ // Set SIM APN
+ gsm2_set_sim_apn( &gsm2, SIM_APN );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
- gsm2_send_command( &gsm2, "AT+IFC=2,2" );
- gsm2_process( );
+ // Enable full functionality
+ #define FULL_FUNCTIONALITY "1"
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_CFUN, FULL_FUNCTIONALITY );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
- gsm2_send_command( &gsm2, "AT+CMGF=1" );
- gsm2_process( );
+ // Enable network registartion
+ #define ENABLE_REG "2"
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_CREG, ENABLE_REG );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
- Delay_ms( 2000 );
+ // Automatic registration
+ #define AUTOMATIC_REGISTRATION "0"
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_COPS, AUTOMATIC_REGISTRATION );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+#endif
+ return func_error;
}
-void application_task ( void )
+static err_t gsm2_check_connection ( void )
+{
+#if ( ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP ) || ( DEMO_EXAMPLE == EXAMPLE_SMS ) )
+ #define CONNECTED "+CREG: 2,1"
+ gsm2_send_cmd_check ( &gsm2, GSM2_CMD_CREG );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ gsm2_error_check( error_flag );
+ if ( strstr( app_buf, CONNECTED ) )
+ {
+ Delay_ms( 100 );
+ // Check signal quality
+ gsm2_send_cmd( &gsm2, GSM2_CMD_CSQ );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ gsm2_error_check( error_flag );
+ #define NO_SIGNAL "99,99"
+ if ( !strstr( app_buf, NO_SIGNAL ) )
+ {
+ Delay_ms ( 1000 );
+ return error_flag;
+ }
+ }
+ Delay_ms ( 1000 );
+ return GSM2_ERROR;
+#endif
+ return GSM2_OK;
+}
+
+static err_t gsm2_configure_for_example ( void )
{
- gsm2_process( );
+ err_t func_error = GSM2_OK;
+#if ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP )
+ #define ACTIVATE_PDP_CONTEXT "1,1"
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_CGACT, ACTIVATE_PDP_CONTEXT );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+ #define ENABLE_MULTI_SESSION "1"
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_QIMUX, ENABLE_MULTI_SESSION );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+#elif ( DEMO_EXAMPLE == EXAMPLE_SMS )
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_CMGF, SMS_MODE );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+#else
+ #error "No demo example selected"
+#endif
+ return func_error;
}
-void main ( void )
+static err_t gsm2_example ( void )
{
- application_init( );
+ err_t func_error = GSM2_OK;
+#if ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP )
+ uint8_t cmd_buf[ 100 ] = { 0 };
+ uint8_t tcp_socket_num[ 2 ] = { '1', 0 };
+ uint8_t udp_socket_num[ 2 ] = { '2', 0 };
+
+ // Open TCP socket.
+ #define RESPONSE_CONNECT "CONNECT OK"
+ #define TCP_SERVICE_TYPE ",\"TCP\","
+ strcpy( cmd_buf, tcp_socket_num );
+ strcat( cmd_buf, TCP_SERVICE_TYPE );
+ strcat( cmd_buf, "\"" );
+ strcat( cmd_buf, REMOTE_IP );
+ strcat( cmd_buf, "\"" );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, REMOTE_PORT );
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_QIOPEN, cmd_buf );
+ error_flag = gsm2_rsp_check( RESPONSE_CONNECT );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+
+ // Open UDP socket.
+ #define UDP_SERVICE_TYPE ",\"UDP\","
+ strcpy( cmd_buf, udp_socket_num );
+ strcat( cmd_buf, UDP_SERVICE_TYPE );
+ strcat( cmd_buf, "\"" );
+ strcat( cmd_buf, REMOTE_IP );
+ strcat( cmd_buf, "\"" );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, REMOTE_PORT );
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_QIOPEN, cmd_buf );
+ error_flag = gsm2_rsp_check( RESPONSE_CONNECT );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
- for ( ; ; )
+ // Get message length
+ uint8_t message_len_buf[ 10 ] = { 0 };
+ uint16_t message_len = strlen( MESSAGE_CONTENT );
+ uint16_to_str( message_len, message_len_buf );
+ l_trim( message_len_buf );
+ r_trim( message_len_buf );
+
+ // Write message to TCP socket
+ uint8_t ctrl_z = 0x1A;
+ strcpy( cmd_buf, tcp_socket_num );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, message_len_buf );
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_QISEND, cmd_buf );
+ error_flag = gsm2_rsp_check( ">" );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+ gsm2_generic_write ( &gsm2, MESSAGE_CONTENT, message_len );
+ gsm2_generic_write ( &gsm2, &ctrl_z, 1 );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+
+ // Read response
+ #define RESPONSE_URC "+RECEIVE: "
+ strcpy( cmd_buf, RESPONSE_URC );
+ strcat( cmd_buf, tcp_socket_num );
+ error_flag = gsm2_rsp_check( cmd_buf );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+ log_printf( &logger, "\r\n" );
+
+ // Write message to UDP socket
+ strcpy( cmd_buf, udp_socket_num );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, message_len_buf );
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_QISEND, cmd_buf );
+ error_flag = gsm2_rsp_check( ">" );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+ gsm2_generic_write ( &gsm2, MESSAGE_CONTENT, message_len );
+ gsm2_generic_write ( &gsm2, &ctrl_z, 1 );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+
+ // Read response
+ strcpy( cmd_buf, RESPONSE_URC );
+ strcat( cmd_buf, udp_socket_num );
+ error_flag = gsm2_rsp_check( cmd_buf );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+ log_printf( &logger, "\r\n" );
+
+ // Close TCP socket
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_QICLOSE, tcp_socket_num );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+
+ // Close UDP socket
+ gsm2_send_cmd_with_par( &gsm2, GSM2_CMD_QICLOSE, udp_socket_num );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+ Delay_ms( 5000 );
+#elif ( DEMO_EXAMPLE == EXAMPLE_SMS )
+ // Check SMS mode
+ #define CMGF_PDU "+CMGF: 0"
+ #define CMGF_TXT "+CMGF: 1"
+ gsm2_send_cmd_check( &gsm2, GSM2_CMD_CMGF );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+ if ( strstr( app_buf, CMGF_PDU ) )
{
- application_task( );
+ // Send SMS in PDU mode
+ gsm2_send_sms_pdu( &gsm2, SIM_SMSC, PHONE_NUMBER_TO_MESSAGE, MESSAGE_CONTENT );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
+ }
+ else if ( strstr( app_buf, CMGF_TXT ) )
+ {
+ // Send SMS in TXT mode
+ gsm2_send_sms_text ( &gsm2, PHONE_NUMBER_TO_MESSAGE, MESSAGE_CONTENT );
+ error_flag = gsm2_rsp_check( GSM2_RSP_OK );
+ func_error |= error_flag;
+ gsm2_error_check( error_flag );
}
+ Delay_ms( 10000 );
+ Delay_ms( 10000 );
+ Delay_ms( 10000 );
+#else
+ #error "No demo example selected"
+#endif
+ return func_error;
}
// ------------------------------------------------------------------------ END
diff --git a/clicks/gsm2/example/manifest.exm b/clicks/gsm2/example/manifest.exm
index 6d058b96f5..b69ccf4ce8 100644
--- a/clicks/gsm2/example/manifest.exm
+++ b/clicks/gsm2/example/manifest.exm
@@ -1,8 +1,8 @@
{
"name": "GSM 2 Click",
- "description": "GSM2 click is a compact quad-band GSM cellular network communication solution, featuring the GSM/GPRS Quectel M95.",
+ "description": "GSM2 click is a compact quad-band GSM cellular network communication solution, featuring the GSM/GPRS Quectel M95. This module features a full set of options for the cellular networking and communication, such as the network status indication, jamming detection, embedded internet protocols, including TCP/IP, UDP, FTP, PPP, HTTP, SMTP, full GPRS multislot class 12 implementation, it is fully compliant to GSM Phase 2/2+, and more. Data communication speed is rated up to 85.6 kbps for both uplink and downlink connection.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
- "hw" : ["click","Quectel M95 FA GSM/GPRS"],
- "category" : ["GSM/LTE,2G GPRS"]
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv"],
+ "hw" : ["click","Quectel M95"],
+ "category" : ["GSM/LTE"]
}
diff --git a/clicks/gsm2/example/memake.txt b/clicks/gsm2/example/memake.txt
deleted file mode 100644
index 8a81d9f064..0000000000
--- a/clicks/gsm2/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_gsm2
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Gsm2
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/gsm2/lib/include/gsm2.h b/clicks/gsm2/lib/include/gsm2.h
deleted file mode 100644
index fe6dfaa570..0000000000
--- a/clicks/gsm2/lib/include/gsm2.h
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- * \brief This file contains API for GSM 2 Click driver.
- *
- * \addtogroup gsm2 GSM 2 Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef GSM2_H
-#define GSM2_H
-
-#include "drv_digital_out.h"
-#include "drv_digital_in.h"
-#include "drv_uart.h"
-
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-#define GSM2_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
- cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
- cfg.stat = MIKROBUS( mikrobus, MIKROBUS_AN ); \
- cfg.pwrkey = MIKROBUS( mikrobus, MIKROBUS_RST ); \
- cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
- cfg.ri = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
- cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT );
-/** \} */
-
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define GSM2_RETVAL uint8_t
-
-#define GSM2_OK 0x00
-#define GSM2_INIT_ERROR 0xFF
-/** \} */
-
-/**
- * \defgroup parser_error Parser error
- * \{
- */
-#define GSM2_PARSER_NO_ERROR 0x00
-#define GSM2_PARSER_ERROR_REF 0x01
-#define GSM2_PARSER_ERROR_CMD 0x02
-#define GSM2_PARSER_ERROR_DATA 0x04
-/** \} */
-
-/**
- * \defgroup click_status G2C 3G click status
- * \{
- */
-#define GSM2_STATUS_DEVICE_READY 1
-#define GSM2_STATUS_ACT_NETWORK_AND_BROKER 4
-#define GSM2_STATUS_ACT_NETWORK 2
-#define GSM2_STATUS_ACT_BROKER 3
-#define GSM2_STATUS_DEVICE_BUSY 0
-/** \} */
-
-/**
- * \defgroup module_state Module power state
- * \{
- */
-#define GSM2_MODULE_POWER_ON 1
-#define GSM2_MODULE_POWER_OFF 0
-/** \} */
-
-/**
- * \defgroup at_command AT command
- * \{
- */
-#define GSM2_SINGLE_CMD_AT "AT"
-#define GSM2_SINGLE_CMD_AT_W "AT+W"
-#define GSM2_SINGLE_CMD_AT_R "AT+R"
-#define GSM2_SINGLE_CMD_ATE0 "ATE0"
-#define GSM2_SINGLE_CMD_ATE1 "ATE1"
-#define GSM2_SINGLE_CMD_AT_RST "AT+RST"
-#define GSM2_SINGLE_CMD_AT_CRST "AT+CRST"
-#define GSM2_SINGLE_CMD_AT_GMR "AT+GMR"
-#define GSM2_SINGLE_CMD_AT_GMSTA "AT+GMSTA"
-#define GSM2_SINGLE_CMD_AT_PUB "AT+PUB"
-
-#define GSM2_SINGLE_CMD_SET_AT_LRSP_1 "AT+LRSP=1"
-#define GSM2_SINGLE_CMD_SET_AT_LRSP_0 "AT+LRSP=0"
-#define GSM2_SINGLE_CMD_SET_AT_CEN_1 "AT+CEN=1"
-#define GSM2_SINGLE_CMD_SET_AT_CEN_0 "AT+CEN=0"
-#define GSM2_SINGLE_CMD_SET_AT_NWC_1 "AT+NWC=1"
-#define GSM2_SINGLE_CMD_SET_AT_NWC_0 "AT+NWC=0"
-#define GSM2_SINGLE_CMD_SET_AT_BRC_1 "AT+BRC=1"
-#define GSM2_SINGLE_CMD_SET_AT_BRC_0 "AT+BRC=0"
-#define GSM2_SINGLE_CMD_SET_AT_GPEN_0 "AT+GPEN=0"
-#define GSM2_SINGLE_CMD_SET_AT_GPEN_1 "AT+GPEN=1"
-
-#define GSM2_SINGLE_CMD_GET_AT_LRSP "AT+LRSP?"
-#define GSM2_SINGLE_CMD_GET_AT_CEN "AT+CEN?"
-#define GSM2_SINGLE_CMD_GET_AT_NWC "AT+NWC?"
-#define GSM2_SINGLE_CMD_GET_AT_BRC "AT+BRC?"
-#define GSM2_SINGLE_CMD_GET_AT_GPEN "AT+GPEN?"
-#define GSM2_SINGLE_CMD_GET_AT_NWCR "AT+NWCR?"
-#define GSM2_SINGLE_CMD_GET_AT_BRCR "AT+BRCR?"
-#define GSM2_SINGLE_CMD_GET_AT_DSET "AT+DSET?"
-
-#define GSM2_SINGLE_CMD_TEST_AT_LRSP "AT+LRSP=?"
-#define GSM2_SINGLE_CMD_TEST_AT_CEN "AT+CEN=?"
-#define GSM2_SINGLE_CMD_TEST_AT_NWC "AT+NWC=?"
-#define GSM2_SINGLE_CMD_TEST_AT_BRC "AT+BRC=?"
-#define GSM2_SINGLE_CMD_TEST_AT_GPEN "AT+GPEN=?"
-#define GSM2_SINGLE_CMD_TEST_AT_NWCR "AT+NWCR=?"
-#define GSM2_SINGLE_CMD_TEST_AT_BRCR "AT+BRCR=?"
-#define GSM2_SINGLE_CMD_TEST_AT_DSET "AT+DSET=?"
-
-#define GSM2_MULTI_CMD_AT_DSET "AT+DSET"
-#define GSM2_MULTI_CMD_AT_BRCR "AT+BRCR"
-#define GSM2_MULTI_CMD_AT_NWCR "AT+NWCR"
-/** \} */
-
-/**
- * \defgroup driver Driver define
- * \{
- */
-#define DRV_RX_BUFFER_SIZE 500
-/** \} */
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
- // Output pins
-
- digital_out_t pwrkey;
- digital_out_t rts;
-
- // Input pins
-
- digital_in_t stat;
- digital_in_t ri;
- digital_in_t cts;
-
- // Modules
-
- uart_t uart;
-
- char uart_rx_buffer[ DRV_RX_BUFFER_SIZE ];
- char uart_tx_buffer[ DRV_RX_BUFFER_SIZE ];
-
-} gsm2_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Communication gpio pins
-
- pin_name_t rx_pin;
- pin_name_t tx_pin;
-
- // Additional gpio pins
-
- pin_name_t stat;
- pin_name_t pwrkey;
- pin_name_t rts;
- pin_name_t ri;
- pin_name_t cts;
-
- // static variable
-
- uint32_t baud_rate; // Clock speed.
- bool uart_blocking;
- uart_data_bits_t data_bit; // Data bits.
- uart_parity_t parity_bit; // Parity bit.
- uart_stop_bits_t stop_bit; // Stop bits.
-
-} gsm2_cfg_t;
-
-/**
- * @brief Error type
- */
-// Actuator switch type
-typedef uint8_t gsm2_actuator_sw_t;
-
-// Actuator counter type
-typedef int16_t gsm2_actuator_cnt_t;
-
-// Actuator string type
-typedef char gsm2_actuator_str_t;
-
-// Parser error type
-typedef uint8_t gsm2_error_t;
-
-/** \} */ // End types group
-
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
- */
-void gsm2_cfg_setup ( gsm2_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- * @param gsm2 Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
- */
-GSM2_RETVAL gsm2_init ( gsm2_t *ctx, gsm2_cfg_t *cfg );
-
-/**
- * @brief Enables or disables module power.
- *
- * @param ctx Click object.
- *
- * @description This function Turn ON or OFF the module.
- */
-void gsm2_module_power( gsm2_t *ctx );
-
-/**
- * @brief Reset module.
- *
- * @param ctx Click object.
- *
- * @description This function reset module.
- */
-void gsm2_reset ( gsm2_t *ctx );
-
-/**
- * @brief Generic write function.
- *
- * @param ctx Click object.
- * @param data_buf Data buff to be written.
- * @param len Number of the bytes in data buf.
- *
- * @description This function writes data to the desired register.
- */
-void gsm2_generic_write ( gsm2_t *ctx, char *data_buf, uint16_t len );
-
-/**
- * @brief Generic read function.
- *
- * @param ctx Click object.
- * @param data_buf Data buff to be written.
- * @param max_len Max number of the bytes in data buf.
- *
- * @description This function reads data from the desired register.
- */
-int32_t gsm2_generic_read ( gsm2_t *ctx, char *data_buf, uint16_t max_len );
-
-/**
- * @brief Command function.
- *
- * @param ctx Click object.
- * @param command Command.
- *
- * @description This function send comamnd.
- */
-void gsm2_send_command ( gsm2_t *ctx, char *command );
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _GSM2_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
diff --git a/clicks/gsm2/lib/memake.txt b/clicks/gsm2/lib/memake.txt
deleted file mode 100644
index 5a47bf8484..0000000000
--- a/clicks/gsm2/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_gsm2
-
-alias: Click.Gsm2
-
-sources: {
- src/gsm2.c
-}
-
-headers: {
- include/gsm2.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/gsm2.h) dst(include/gsm2.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/gsm2/lib/src/gsm2.c b/clicks/gsm2/lib/src/gsm2.c
deleted file mode 100644
index b9832b95ca..0000000000
--- a/clicks/gsm2/lib/src/gsm2.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- */
-
-#include "gsm2.h"
-#include "string.h"
-
-// ------------------------------------------------------------- PRIVATE MACROS
-
-// Buffer
-#define GSM2_BUF_FIRST_CMD "=\""
-#define GSM2_BUF_MID_CMD "\",\""
-#define GSM2_BUF_END_CMD "\""
-
-#define GSM2_RSP_CMD_ACT "+ACT"
-#define GSM2_RSP_CMD_ACT_LEN 4
-
-// ACTUATOR SWITCH PARSER
-#define GSM2_RSP_STATE_TRUE "true"
-#define GSM2_RSP_STATE_TRUE_LEN 4
-#define GSM2_RSP_STATE_FALSE "false"
-#define GSM2_RSP_STATE_FALSE_LEN 5
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void gsm2_cfg_setup ( gsm2_cfg_t *cfg )
-{
- // Communication gpio pins
-
- cfg->rx_pin = HAL_PIN_NC;
- cfg->tx_pin = HAL_PIN_NC;
-
- // Additional gpio pins
-
- cfg->stat = HAL_PIN_NC;
- cfg->pwrkey = HAL_PIN_NC;
- cfg->rts = HAL_PIN_NC;
- cfg->ri = HAL_PIN_NC;
- cfg->cts = HAL_PIN_NC;
-
- cfg->baud_rate = 9600;
- cfg->data_bit = UART_DATA_BITS_DEFAULT;
- cfg->parity_bit = UART_PARITY_DEFAULT;
- cfg->stop_bit = UART_STOP_BITS_DEFAULT;
- cfg->uart_blocking = false;
-}
-
-GSM2_RETVAL gsm2_init ( gsm2_t *ctx, gsm2_cfg_t *cfg )
-{
- uart_config_t uart_cfg;
-
- uart_configure_default( &uart_cfg );
-
- // Ring buffer mapping
- ctx->uart.tx_ring_buffer = ctx->uart_tx_buffer;
- ctx->uart.rx_ring_buffer = ctx->uart_rx_buffer;
-
- // UART module config
- uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
- uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
- uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
- uart_cfg.rx_ring_size = sizeof( ctx->uart_rx_buffer );
-
- uart_open( &ctx->uart, &uart_cfg );
- uart_set_baud( &ctx->uart, cfg->baud_rate );
- uart_set_parity( &ctx->uart, cfg->parity_bit );
- uart_set_stop_bits( &ctx->uart, cfg->stop_bit );
- uart_set_data_bits( &ctx->uart, cfg->data_bit );
-
- uart_set_blocking( &ctx->uart, cfg->uart_blocking );
-
- // Output pins
-
- digital_out_init( &ctx->pwrkey, cfg->pwrkey );
- digital_out_init( &ctx->rts, cfg->rts );
-
- // Input pins
-
- digital_in_init( &ctx->stat, cfg->stat );
- digital_in_init( &ctx->ri, cfg->ri );
- digital_in_init( &ctx->cts, cfg->cts );
-
- return GSM2_OK;
-
-}
-
-void gsm2_module_power( gsm2_t *ctx )
-{
- digital_out_high( &ctx->pwrkey );
- Delay_100ms( );
- digital_out_low( &ctx->pwrkey );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- digital_out_high( &ctx->pwrkey );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
-}
-
-void gsm2_reset ( gsm2_t *ctx )
-{
- digital_out_high( &ctx->pwrkey );
- Delay_100ms( );
- digital_out_low( &ctx->pwrkey );
- Delay_100ms( );
- Delay_100ms( );
- Delay_100ms( );
- digital_out_high( &ctx->pwrkey );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
-}
-
-void gsm2_generic_write ( gsm2_t *ctx, char *data_buf, uint16_t len )
-{
- uart_write( &ctx->uart, data_buf, len );
-}
-
-int32_t gsm2_generic_read ( gsm2_t *ctx, char *data_buf, uint16_t max_len )
-{
- return uart_read( &ctx->uart, data_buf, max_len );
-}
-
-void gsm2_send_command ( gsm2_t *ctx, char *command )
-{
- char tmp_buf[ 100 ];
- uint8_t len;
- memset( tmp_buf, 0, 100 );
- len = strlen( command );
-
- strncpy( tmp_buf, command, len );
- strcat( tmp_buf, "\n" );
-
- gsm2_generic_write( ctx, tmp_buf, strlen( tmp_buf ) );
-}
-
-// ------------------------------------------------------------------------- END
-
diff --git a/clicks/gsm2/lib_gsm2/CMakeLists.txt b/clicks/gsm2/lib_gsm2/CMakeLists.txt
new file mode 100644
index 0000000000..26cb3d7eac
--- /dev/null
+++ b/clicks/gsm2/lib_gsm2/CMakeLists.txt
@@ -0,0 +1,31 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_gsm2 LANGUAGES MikroC)
+else()
+ project(lib_gsm2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_gsm2 STATIC
+ src/gsm2.c
+ include/gsm2.h
+)
+add_library(Click.GSM2 ALIAS lib_gsm2)
+
+
+
+target_include_directories(lib_gsm2 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_gsm2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_gsm2 PUBLIC MikroSDK.Driver)
+find_package(MikroSDK.Conversions REQUIRED)
+target_link_libraries(lib_gsm2 PUBLIC MikroSDK.Conversions)
+find_package(MikroSDK.GenericPointer REQUIRED)
+target_link_libraries(lib_gsm2 PUBLIC MikroSDK.GenericPointer)
diff --git a/clicks/gsm2/lib_gsm2/include/Click.Gsm2 b/clicks/gsm2/lib_gsm2/include/Click.Gsm2
new file mode 100644
index 0000000000..af7fb040c7
--- /dev/null
+++ b/clicks/gsm2/lib_gsm2/include/Click.Gsm2
@@ -0,0 +1 @@
+#include "gsm2.h"
diff --git a/clicks/gsm2/lib_gsm2/include/gsm2.h b/clicks/gsm2/lib_gsm2/include/gsm2.h
new file mode 100644
index 0000000000..6d29151452
--- /dev/null
+++ b/clicks/gsm2/lib_gsm2/include/gsm2.h
@@ -0,0 +1,384 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file gsm2.h
+ * @brief This file contains API for GSM 2 Click Driver.
+ */
+
+#ifndef GSM2_H
+#define GSM2_H
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_uart.h"
+
+/*!
+ * @addtogroup gsm2 GSM 2 Click Driver
+ * @brief API for configuring and manipulating GSM 2 Click driver.
+ * @{
+ */
+
+/**
+ * @defgroup gsm2_set GSM 2 Device Settings
+ * @brief Settings for registers of GSM 2 Click driver.
+ */
+
+/**
+ * @addtogroup gsm2_set
+ * @{
+ */
+
+/**
+ * @brief GSM 2 control commands.
+ * @details Specified setting for control commands of GSM 2 Click driver.
+ */
+#define GSM2_CMD_AT "AT"
+#define GSM2_CMD_ATI "ATI"
+#define GSM2_CMD_CFUN "AT+CFUN"
+#define GSM2_CMD_CREG "AT+CREG"
+#define GSM2_CMD_CGDCONT "AT+CGDCONT"
+#define GSM2_CMD_CSQ "AT+CSQ"
+#define GSM2_CMD_COPS "AT+COPS"
+#define GSM2_CMD_CMGS "AT+CMGS"
+#define GSM2_CMD_CMGF "AT+CMGF"
+#define GSM2_CMD_CGACT "AT+CGACT"
+#define GSM2_CMD_QIMUX "AT+QIMUX"
+#define GSM2_CMD_QIOPEN "AT+QIOPEN"
+#define GSM2_CMD_QICLOSE "AT+QICLOSE"
+#define GSM2_CMD_QISEND "AT+QISEND"
+#define GSM2_CMD_QIRD "AT+QIRD"
+
+/**
+ * @brief GSM 2 device response for AT commands.
+ * @details Device response after commands.
+ */
+#define GSM2_RSP_OK "OK"
+#define GSM2_RSP_ERROR "ERROR"
+
+/**
+ * @brief GSM 2 driver buffer size.
+ * @details Specified size of driver ring buffer.
+ * @note Increase buffer size if needed.
+ */
+#define GSM2_RX_DRV_BUFFER_SIZE 256
+#define GSM2_TX_DRV_BUFFER_SIZE 256
+
+/*! @} */ // gsm2_set
+
+/**
+ * @defgroup gsm2_map GSM 2 MikroBUS Map
+ * @brief MikroBUS pin mapping of GSM 2 Click driver.
+ */
+
+/**
+ * @addtogroup gsm2_map
+ * @{
+ */
+
+/**
+ * @brief MikroBUS pin mapping.
+ * @details Mapping pins of GSM 2 Click to the selected MikroBUS.
+ */
+#define GSM2_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
+ cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
+ cfg.sta = MIKROBUS( mikrobus, MIKROBUS_AN ); \
+ cfg.pwk = MIKROBUS( mikrobus, MIKROBUS_RST ); \
+ cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
+ cfg.ring = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
+ cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT )
+
+/*! @} */ // gsm2_map
+/*! @} */ // gsm2
+
+/**
+ * @brief GSM 2 Click context object.
+ * @details Context object definition of GSM 2 Click driver.
+ */
+typedef struct
+{
+ // Output pins
+ digital_out_t pwk; /**< Power-up module. */
+ digital_out_t rts; /**< UART Request to Send. */
+
+ // Input pins
+ digital_in_t sta; /**< Module status. */
+ digital_in_t ring; /**< Ring indicator. */
+ digital_in_t cts; /**< UART Clear to Send. */
+
+ // Modules
+ uart_t uart; /**< UART driver object. */
+
+ // Buffers
+ uint8_t uart_rx_buffer[ GSM2_RX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
+ uint8_t uart_tx_buffer[ GSM2_TX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
+
+} gsm2_t;
+
+/**
+ * @brief GSM 2 Click configuration object.
+ * @details Configuration object definition of GSM 2 Click driver.
+ */
+typedef struct
+{
+ // Communication gpio pins
+ pin_name_t rx_pin; /**< RX pin. */
+ pin_name_t tx_pin; /**< TX pin. */
+
+ // Additional gpio pins
+ pin_name_t sta; /**< Module status. */
+ pin_name_t pwk; /**< Power-up module. */
+ pin_name_t rts; /**< UART Request to Send. */
+ pin_name_t ring; /**< Ring indicator. */
+ pin_name_t cts; /**< UART Clear to Send. */
+
+ // Static variable
+ uint32_t baud_rate; /**< Clock speed. */
+ bool uart_blocking; /**< Wait for interrupt or not. */
+ uart_data_bits_t data_bit; /**< Data bits. */
+ uart_parity_t parity_bit; /**< Parity bit. */
+ uart_stop_bits_t stop_bit; /**< Stop bits. */
+
+} gsm2_cfg_t;
+
+/**
+ * @brief GSM 2 Click return value data.
+ * @details Predefined enum values for driver return values.
+ */
+typedef enum
+{
+ GSM2_OK = 0,
+ GSM2_ERROR = -1,
+ GSM2_ERROR_TIMEOUT = -2,
+ GSM2_ERROR_CMD = -3,
+ GSM2_ERROR_UNKNOWN = -4
+
+} gsm2_return_value_t;
+
+/*!
+ * @addtogroup gsm2 GSM 2 Click Driver
+ * @brief API for configuring and manipulating GSM 2 Click driver.
+ * @{
+ */
+
+/**
+ * @brief GSM 2 configuration object setup function.
+ * @details This function initializes click configuration structure to initial
+ * values.
+ * @param[out] cfg : Click configuration structure.
+ * See #gsm2_cfg_t object definition for detailed explanation.
+ * @return Nothing.
+ * @note The all used pins will be set to unconnected state.
+ */
+void gsm2_cfg_setup ( gsm2_cfg_t *cfg );
+
+/**
+ * @brief GSM 2 initialization function.
+ * @details This function initializes all necessary pins and peripherals used
+ * for this click board.
+ * @param[out] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @param[in] cfg : Click configuration structure.
+ * See #gsm2_cfg_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm2_init ( gsm2_t *ctx, gsm2_cfg_t *cfg );
+
+/**
+ * @brief GSM 2 data writing function.
+ * @details This function writes a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @param[in] data_in : Data buffer for sending.
+ * @param[in] len : Number of bytes for sending.
+ * @return @li @c >=0 - Success,
+ * @li @c <0 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm2_generic_write ( gsm2_t *ctx, uint8_t *data_in, uint16_t len );
+
+/**
+ * @brief GSM 2 data reading function.
+ * @details This function reads a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @param[out] data_out : Output read data.
+ * @param[in] len : Number of bytes to be read.
+ * @return @li @c >0 - Number of data bytes read,
+ * @li @c <=0 - Error/Empty Ring buffer.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm2_generic_read ( gsm2_t *ctx, uint8_t *data_out, uint16_t len );
+
+/**
+ * @brief GSM 2 set rts pin function.
+ * @details This function sets the Request to Send (RTS) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @param[in] state : Pin logic state.
+ * @return None.
+ * @note None.
+ */
+void gsm2_set_rts_pin ( gsm2_t *ctx, uint8_t state );
+
+/**
+ * @brief GSM 2 set pwk pin function.
+ * @details This function sets the PWRKEY pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @param[in] state : Pin logic state.
+ * @return None.
+ * @note None.
+ */
+void gsm2_set_pwk_pin ( gsm2_t *ctx, uint8_t state );
+
+/**
+ * @brief GSM 2 get cts pin function.
+ * @details This function returns the Clear to Send (CTS) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
+ */
+uint8_t gsm2_get_cts_pin ( gsm2_t *ctx );
+
+/**
+ * @brief GSM 2 get sta pin function.
+ * @details This function returns the status (STA) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
+ */
+uint8_t gsm2_get_sta_pin ( gsm2_t *ctx );
+
+/**
+ * @brief GSM 2 get ring pin function.
+ * @details This function returns the ring indication (RING) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
+ */
+uint8_t gsm2_get_ring_pin ( gsm2_t *ctx );
+
+/**
+ * @brief Send command function.
+ * @details This function sends a specified command to the click module.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @param[in] cmd : Command variable.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm2_send_cmd ( gsm2_t *ctx, uint8_t *cmd );
+
+/**
+ * @brief Send command function with parameter.
+ * @details This function sends a command with specified parameter to the click module.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @param[in] param_buf : Parameter buffer.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm2_send_cmd_with_par ( gsm2_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf );
+
+/**
+ * @brief Check the sent command.
+ * @details This function checks the command that is sent.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm2_send_cmd_check ( gsm2_t *ctx, uint8_t *at_cmd_buf );
+
+/**
+ * @brief Check the command parameters.
+ * @details This function checks the command that is sent.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm2_send_cmd_par_check ( gsm2_t *ctx, uint8_t *at_cmd_buf );
+
+/**
+ * @brief Set sim card APN.
+ * @details This function sets APN for sim card.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @param[in] sim_apn : SIM card APN.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm2_set_sim_apn ( gsm2_t *ctx, uint8_t *sim_apn );
+
+/**
+ * @brief GSM 2 send SMS in text mode.
+ * @details This function sends text message to a phone number.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @param[in] phone_number : Phone number to message.
+ * @param[in] sms_text : Message to be sent.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm2_send_sms_text ( gsm2_t *ctx, uint8_t *phone_number, uint8_t *sms_text );
+
+/**
+ * @brief GSM 2 send SMS in PDU mode.
+ * @details This function sends text message to a phone number in PDU mode.
+ * @param[in] ctx : Click context object.
+ * See #gsm2_t object definition for detailed explanation.
+ * @param[in] service_center_number : SMSC of the SIM card.
+ * @param[in] phone_number : Phone number to message.
+ * @param[in] sms_text : Message to be sent.
+ * @return @li @c >=0 - Success,
+ * @li @c <0 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm2_send_sms_pdu ( gsm2_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // GSM2_H
+
+/*! @} */ // gsm2
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/gsm2/lib_gsm2/src/gsm2.c b/clicks/gsm2/lib_gsm2/src/gsm2.c
new file mode 100644
index 0000000000..c4bc0dbeb4
--- /dev/null
+++ b/clicks/gsm2/lib_gsm2/src/gsm2.c
@@ -0,0 +1,487 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file gsm2.c
+ * @brief GSM 2 Click Driver.
+ */
+
+#include "gsm2.h"
+#include "conversions.h"
+#include "generic_pointer.h"
+
+/**
+ * @brief PDU macros.
+ * @details Predefined PDU macros for driver use.
+ */
+#define BITMASK_7BITS 0x7F
+#define BITMASK_8BITS 0xFF
+#define BITMASK_HIGH_4BITS 0xF0
+#define BITMASK_LOW_4BITS 0x0F
+#define TYPE_OF_ADDRESS_INTERNATIONAL_PHONE 0x91
+#define TYPE_OF_ADDRESS_NATIONAL_SUBSCRIBER 0xC8
+#define SMS_DELIVER_ONE_MESSAGE 0x04
+#define SMS_DELIVER_ONE_MESSAGE 0x04
+#define SMS_SUBMIT 0x11
+#define SMS_MAX_7BIT_TEXT_LENGTH 160
+#define SMS_MAX_PDU_LENGTH 256
+
+/**
+ * @brief Encode message for PDU mode.
+ * @details Encode message for PDU mode and outputs
+ * the encoded message into output buffer.
+ * @param[in] service_center_number : Service center of devices SIM.
+ * @param[in] phone_number : Phone number to send message to.
+ * @param[in] sms_text : SMS text.
+ * @param[out] output_buffer : Output PDU encoded message.
+ * @param[in] buffer_size : Output buffer size.
+ * @return @li @c >=0 - Length of the SMS encoded message,
+ * @li @c <0 - Error.
+ */
+static int16_t pdu_encode ( uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text,
+ uint8_t *output_buffer, uint16_t buffer_size );
+
+/**
+ * @brief Swap decimal digits of a number.
+ * @details Swap decimal digits of a number (e.g. 12 -> 21).
+ * @param[in] x : Decimal number to swap digits.
+ * @return Swapped decimal number.
+ */
+static uint8_t swap_decimal_nibble ( uint8_t x );
+
+/**
+ * @brief Encode text content for PDU mode.
+ * @details Encode text content for PDU mode and
+ * outputs the encoded message into output buffer.
+ * @param[in] sms_text : Sms text content to encode
+ * @param[in] sms_text_length : Length of the text message.
+ * @param[out] output_buffer : Output PDU encoded text message.
+ * @param[in] buffer_size : Output buffer size.
+ * @return @li @c >=0 - Length of the enccoded text messages,
+ * @li @c <0 - Error.
+ */
+static int16_t encode_pdu_message ( uint8_t *sms_text, int16_t sms_text_length,
+ uint8_t *output_buffer, uint16_t buffer_size );
+
+/**
+ * @brief Encode phone number for PDU mode.
+ * @details Encode phone number for PDU mode and
+ * outputs the encoded message into output buffer.
+ * @param[in] phone_number : Phone number to send message to.
+ * @param[out] output_buffer : Output PDU encoded message.
+ * @param[in] buffer_size : Output buffer size.
+ * @return @li @c >=0 - Length of the SMS encoded message,
+ * @li @c <0 - Error.
+ */
+static int16_t encode_phone_number ( uint8_t *phone_number, uint8_t *output_buffer, uint16_t buffer_size );
+
+/**
+ * @brief GSM 2 str cut chr function.
+ * @details This function removes all selected characters from string str,
+ * and returns it to the same str without those characters.
+ * @param str Address of string.
+ * @param chr Character to cut.
+ */
+static void gsm2_str_cut_chr ( uint8_t *str, uint8_t chr );
+
+void gsm2_cfg_setup ( gsm2_cfg_t *cfg )
+{
+ // Communication gpio pins
+ cfg->rx_pin = HAL_PIN_NC;
+ cfg->tx_pin = HAL_PIN_NC;
+
+ // Additional gpio pins
+ cfg->sta = HAL_PIN_NC;
+ cfg->pwk = HAL_PIN_NC;
+ cfg->rts = HAL_PIN_NC;
+ cfg->ring = HAL_PIN_NC;
+ cfg->cts = HAL_PIN_NC;
+
+ cfg->baud_rate = 9600;
+ cfg->data_bit = UART_DATA_BITS_DEFAULT;
+ cfg->parity_bit = UART_PARITY_DEFAULT;
+ cfg->stop_bit = UART_STOP_BITS_DEFAULT;
+ cfg->uart_blocking = false;
+}
+
+err_t gsm2_init ( gsm2_t *ctx, gsm2_cfg_t *cfg )
+{
+ uart_config_t uart_cfg;
+
+ // Default config
+ uart_configure_default( &uart_cfg );
+
+ // Ring buffer mapping
+ ctx->uart.tx_ring_buffer = ctx->uart_tx_buffer;
+ ctx->uart.rx_ring_buffer = ctx->uart_rx_buffer;
+
+ // UART module config
+ uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
+ uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
+ uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
+ uart_cfg.rx_ring_size = sizeof( ctx->uart_rx_buffer );
+
+ if ( UART_ERROR == uart_open( &ctx->uart, &uart_cfg ) )
+ {
+ return UART_ERROR;
+ }
+ uart_set_baud( &ctx->uart, cfg->baud_rate );
+ uart_set_parity( &ctx->uart, cfg->parity_bit );
+ uart_set_stop_bits( &ctx->uart, cfg->stop_bit );
+ uart_set_data_bits( &ctx->uart, cfg->data_bit );
+
+ uart_set_blocking( &ctx->uart, cfg->uart_blocking );
+
+ // Output pins
+ digital_out_init( &ctx->pwk, cfg->pwk );
+ digital_out_init( &ctx->rts, cfg->rts );
+
+ // Input pins
+ digital_in_init( &ctx->sta, cfg->sta );
+ digital_in_init( &ctx->ring, cfg->ring );
+ digital_in_init( &ctx->cts, cfg->cts );
+
+ digital_out_high ( &ctx->pwk );
+ Delay_1sec ( );
+ digital_out_low ( &ctx->pwk );
+ Delay_100ms ( );
+ Delay_100ms ( );
+ digital_out_high ( &ctx->pwk );
+ Delay_1sec ( );
+ while ( gsm2_get_ring_pin ( ctx ) );
+
+ return UART_SUCCESS;
+}
+
+err_t gsm2_generic_write ( gsm2_t *ctx, uint8_t *data_in, uint16_t len )
+{
+ return uart_write( &ctx->uart, data_in, len );
+}
+
+err_t gsm2_generic_read ( gsm2_t *ctx, uint8_t *data_out, uint16_t len )
+{
+ return uart_read( &ctx->uart, data_out, len );
+}
+
+void gsm2_set_pwk_pin ( gsm2_t *ctx, uint8_t state )
+{
+ digital_out_write( &ctx->pwk, state );
+}
+
+void gsm2_set_rts_pin ( gsm2_t *ctx, uint8_t state )
+{
+ digital_out_write( &ctx->rts, state );
+}
+
+uint8_t gsm2_get_cts_pin ( gsm2_t *ctx )
+{
+ return digital_in_read( &ctx->cts );
+}
+
+uint8_t gsm2_get_sta_pin ( gsm2_t *ctx )
+{
+ return digital_in_read( &ctx->sta );
+}
+
+uint8_t gsm2_get_ring_pin ( gsm2_t *ctx )
+{
+ return digital_in_read( &ctx->ring );
+}
+
+void gsm2_send_cmd ( gsm2_t *ctx, uint8_t *cmd )
+{
+ uint8_t carriage_return = 13;
+ while ( *cmd != 0 )
+ {
+ uart_write( &ctx->uart, cmd, 1 );
+ cmd++;
+ }
+ uart_write( &ctx->uart, &carriage_return, 1 );
+ Delay_100ms( );
+}
+
+void gsm2_send_cmd_with_par ( gsm2_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t check_char[ 2 ] = { '=', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, check_char );
+ strcat( final_cmd, param_buf );
+
+ gsm2_send_cmd( ctx, final_cmd );
+}
+
+void gsm2_send_cmd_check ( gsm2_t *ctx, uint8_t *at_cmd_buf )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t check_char[ 2 ] = { '?', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, check_char );
+
+ gsm2_send_cmd( ctx, final_cmd );
+}
+
+void gsm2_send_cmd_par_check ( gsm2_t *ctx, uint8_t *at_cmd_buf )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t check_char[ 3 ] = { '=' , '?', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, check_char );
+
+ gsm2_send_cmd( ctx, final_cmd );
+}
+
+void gsm2_set_sim_apn ( gsm2_t *ctx, uint8_t *sim_apn )
+{
+ uint8_t final_cmd[ 50 ] = "1,\"IP\",\"";
+ uint8_t end_cmd[ 3 ] = "\"";
+
+ strcat( final_cmd, sim_apn );
+ strcat( final_cmd, end_cmd );
+
+ gsm2_send_cmd_with_par( ctx, GSM2_CMD_CGDCONT, final_cmd );
+}
+
+void gsm2_send_sms_text ( gsm2_t *ctx, uint8_t *phone_number, uint8_t *sms_text )
+{
+ uint8_t text[ 200 ] = { 0 };
+ uint8_t cmd_start[ ] = "=\"";
+ uint8_t cmd_end[ ] = "\"\r";
+ uint8_t txt_end[ ] = "\032";
+
+ strcpy( text, GSM2_CMD_CMGS );
+ strcat( text, cmd_start );
+ strcat( text, phone_number );
+ strcat( text, cmd_end );
+
+ gsm2_send_cmd( ctx, text );
+ memset( text, 0, sizeof ( text ) );
+
+ strcpy( text, sms_text );
+ strcat( text, txt_end );
+ gsm2_send_cmd( ctx, text );
+}
+
+err_t gsm2_send_sms_pdu ( gsm2_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text )
+{
+ uint8_t text[ SMS_MAX_PDU_LENGTH ] = { 0 };
+ uint8_t pdu_buf[ SMS_MAX_PDU_LENGTH ] = { 0 };
+ uint8_t byte_buf[ 4 ] = { 0 };
+ uint8_t ctrl_z[ 2 ] = { 26, 0 };
+ int16_t pdu_buf_len = 0;
+ uint8_t length = 0;
+ uint8_t smsc[ 32 ] = { 0 };
+ uint8_t phone_num[ 32 ] = { 0 };
+ strcpy ( smsc, service_center_number );
+ strcpy ( phone_num, phone_number );
+ gsm2_str_cut_chr ( smsc, '+' );
+ gsm2_str_cut_chr ( phone_num, '+' );
+
+ pdu_buf_len = pdu_encode( smsc, phone_num, sms_text, pdu_buf, SMS_MAX_PDU_LENGTH );
+
+ if ( pdu_buf_len < 0 )
+ {
+ return GSM2_ERROR;
+ }
+
+ length = pdu_buf_len - ( ( strlen( smsc ) - 1 ) / 2 + 3 );
+ uint8_to_str( length, byte_buf );
+ gsm2_str_cut_chr ( byte_buf, ' ' );
+
+ strcpy( text, GSM2_CMD_CMGS );
+ strcat( text, "=" );
+ strcat( text, byte_buf );
+
+ gsm2_send_cmd( ctx, text );
+ memset( text, 0, SMS_MAX_PDU_LENGTH );
+
+ for ( int16_t cnt = 0; cnt < pdu_buf_len; cnt++ )
+ {
+ uint8_to_hex ( pdu_buf[ cnt ], byte_buf );
+ strcat ( text, byte_buf );
+ }
+ strcat( text, ctrl_z );
+
+ gsm2_send_cmd( ctx, text );
+
+ return GSM2_OK;
+}
+
+static int16_t pdu_encode ( uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text,
+ uint8_t *output_buffer, uint16_t buffer_size )
+{
+ if ( buffer_size < 2 )
+ {
+ return GSM2_ERROR;
+ }
+
+ int16_t output_buffer_length = 0;
+
+ // 1. Set SMS center number.
+ int16_t length = 0;
+ if ( ( service_center_number != 0 ) && ( strlen ( service_center_number ) > 0 ) )
+ {
+ output_buffer[ 1 ] = TYPE_OF_ADDRESS_INTERNATIONAL_PHONE; // Add type of address.
+ length = encode_phone_number( service_center_number, output_buffer + 2, buffer_size - 2 );
+ if ( length < 0 && length >= 254 )
+ {
+ return GSM2_ERROR;
+ }
+ length++;
+ }
+ output_buffer[ 0 ] = length;
+ output_buffer_length = length + 1;
+ if ( output_buffer_length + 4 > buffer_size )
+ {
+ return GSM2_ERROR; // Check if it has space for four more bytes.
+ }
+
+ // 2. Set type of message.
+ output_buffer[ output_buffer_length++ ] = SMS_SUBMIT;
+ output_buffer[ output_buffer_length++ ] = 0x00; // Message reference.
+
+ // 3. Set phone number.
+ output_buffer[ output_buffer_length ] = strlen( phone_number );
+ output_buffer[ output_buffer_length + 1 ] = TYPE_OF_ADDRESS_INTERNATIONAL_PHONE;
+ length = encode_phone_number( phone_number, output_buffer + output_buffer_length + 2,
+ buffer_size - output_buffer_length - 2);
+ output_buffer_length += length + 2;
+ if ( output_buffer_length + 4 > buffer_size )
+ {
+ return GSM2_ERROR; // Check if it has space for four more bytes.
+ }
+
+ // 4. Protocol identifiers.
+ output_buffer[ output_buffer_length++ ] = 0x00; // TP-PID: Protocol identifier.
+ output_buffer[ output_buffer_length++ ] = 0x00; // TP-DCS: Data coding scheme.
+ output_buffer[ output_buffer_length++ ] = 0xB0; // TP-VP: Validity: 10 days
+
+ // 5. SMS message.
+ int16_t sms_text_length = strlen( sms_text );
+ if ( sms_text_length > SMS_MAX_7BIT_TEXT_LENGTH )
+ {
+ return GSM2_ERROR;
+ }
+ output_buffer[ output_buffer_length++ ] = sms_text_length;
+ length = encode_pdu_message( sms_text, sms_text_length, output_buffer + output_buffer_length,
+ buffer_size - output_buffer_length );
+ if ( length < 0 )
+ {
+ return GSM2_ERROR;
+ }
+ output_buffer_length += length;
+
+ return output_buffer_length;
+}
+
+static uint8_t swap_decimal_nibble ( uint8_t x )
+{
+ return ( x / 16 ) + ( ( x % 16 ) * 10 );
+}
+
+static int16_t encode_pdu_message ( uint8_t *sms_text, int16_t sms_text_length,
+ uint8_t *output_buffer, uint16_t buffer_size )
+{
+ // Check if output buffer is big enough.
+ if ( ( sms_text_length * 7 + 7 ) / 8 > buffer_size )
+ {
+ return GSM2_ERROR;
+ }
+
+ int16_t output_buffer_length = 0;
+ int16_t carry_on_bits = 1;
+ int16_t i = 0;
+
+ for ( ; i < sms_text_length - 1; ++i )
+ {
+ output_buffer[ output_buffer_length++ ] =
+ ( ( sms_text[ i ] & BITMASK_7BITS ) >> ( carry_on_bits - 1 ) ) |
+ ( ( sms_text[ i + 1 ] & BITMASK_7BITS ) << ( 8 - carry_on_bits ) );
+ carry_on_bits++;
+ if ( carry_on_bits == 8 )
+ {
+ carry_on_bits = 1;
+ ++i;
+ }
+ }
+
+ if ( i < sms_text_length )
+ {
+ output_buffer[ output_buffer_length++ ] = ( sms_text[ i ] & BITMASK_7BITS ) >> ( carry_on_bits - 1 );
+ }
+
+ return output_buffer_length;
+}
+
+static int16_t encode_phone_number ( uint8_t *phone_number, uint8_t *output_buffer, uint16_t buffer_size )
+{
+ int16_t output_buffer_length = 0;
+ int16_t phone_number_length = strlen( phone_number );
+
+ // Check if the output buffer is big enough.
+ if ( ( phone_number_length + 1 ) / 2 > buffer_size )
+ {
+ return GSM2_ERROR;
+ }
+
+ int16_t i = 0;
+ for ( ; i < phone_number_length; ++i )
+ {
+ if ( phone_number[ i ] < '0' && phone_number[ i ] > '9' )
+ {
+ return GSM2_ERROR;
+ }
+
+ if ( i % 2 == 0 )
+ {
+ output_buffer[ output_buffer_length++ ] = BITMASK_HIGH_4BITS | ( phone_number[ i ] - '0' );
+ }
+ else
+ {
+ output_buffer[ output_buffer_length - 1 ] =
+ ( output_buffer[ output_buffer_length - 1 ] & BITMASK_LOW_4BITS ) |
+ ( ( phone_number[ i ] - '0' ) << 4 );
+ }
+ }
+
+ return output_buffer_length;
+}
+
+static void gsm2_str_cut_chr ( uint8_t *str, uint8_t chr )
+{
+ uint16_t cnt_0, cnt_1;
+ for ( cnt_0 = 0; cnt_0 < strlen( str ); cnt_0++ )
+ {
+ if ( str[ cnt_0 ] == chr )
+ {
+ for ( cnt_1 = cnt_0; cnt_1 < strlen( str ); cnt_1++ )
+ {
+ str[ cnt_1 ] = str[ cnt_1 + 1 ];
+ }
+ }
+ }
+}
+
+// ------------------------------------------------------------------------- END
diff --git a/clicks/gsm2/memake.txt b/clicks/gsm2/memake.txt
deleted file mode 100644
index ffce466d2d..0000000000
--- a/clicks/gsm2/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Gsm2
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/gsm3/CHANGELOG.md b/clicks/gsm3/CHANGELOG.md
index 17ab9ddb66..283ee8b874 100644
--- a/clicks/gsm3/CHANGELOG.md
+++ b/clicks/gsm3/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.8
+### Version 2.1.0.0
- Initial release
diff --git a/clicks/gsm3/CMakeLists.txt b/clicks/gsm3/CMakeLists.txt
new file mode 100644
index 0000000000..c51d4919fc
--- /dev/null
+++ b/clicks/gsm3/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_gsm3 LANGUAGES MikroC)
+else()
+ project(example_gsm3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_gsm3
+ example/main.c
+
+)
+
+
+############################ example_gsm3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_gsm3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_gsm3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_gsm3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_gsm3)
+target_link_libraries(example_gsm3 PUBLIC Click.GSM3)
+############################ example_gsm3 GENERATED CODE END ###########################
diff --git a/clicks/gsm3/DETAILS.md b/clicks/gsm3/DETAILS.md
index 434001634e..ebb79547f3 100644
--- a/clicks/gsm3/DETAILS.md
+++ b/clicks/gsm3/DETAILS.md
@@ -1,7 +1,8 @@
+---
# GSM 3 click
-GSM3 click is a complete quad-band GSM cellular network communication solution, featuring the SIM800H-BT, a quad-band 2G GSM/GPRS module.
+> GSM3 click is a complete quad-band GSM cellular network communication solution, featuring the SIM800H-BT, a quad-band 2G GSM/GPRS module. This module is GSM Phase 2/2+ compliant, featuring a full set of options for the cellular networking and communication. It has a network status indication, jamming detection, embedded internet protocols including TCP/IP, UDP, FTP, PPP, HTTP, E-mail, MMS, and more. It also features advanced voice/audio functions, including the FM radio interface. The GPRS multislot class 12 implementation allows 4 uplink and 4 downlink slots, with 5 slots open in total.
@@ -12,141 +13,200 @@ GSM3 click is a complete quad-band GSM cellular network communication solution,
---
-#### Click library
+#### Click library
-- **Author** : MikroE Team
-- **Date** : Apr 2020.
-- **Type** : UART GPS/GNSS type
+- **Author** : Stefan Filipovic
+- **Date** : May 2023.
+- **Type** : UART type
# Software Support
-We provide a library for the Gsm3 Click
-as well as a demo application (example), developed using MikroElektronika
-[compilers](https://shop.mikroe.com/compilers).
-The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
+We provide a library for the GSM3 Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
-Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
## Library Description
-> This library contains API for Gsm3 Click driver.
+> This library contains API for GSM3 Click driver.
#### Standard key functions :
-- Config Object Initialization function.
-> void gsm3_cfg_setup ( gsm3_cfg_t *cfg );
-
-- Initialization function.
-> GSM3_RETVAL gsm3_init ( gsm3_t *ctx, gsm3_cfg_t *cfg );
+- `gsm3_cfg_setup` Config Object Initialization function.
+```c
+void gsm3_cfg_setup ( gsm3_cfg_t *cfg );
+```
+
+- `gsm3_init` Initialization function.
+```c
+err_t gsm3_init ( gsm3_t *ctx, gsm3_cfg_t *cfg );
+```
#### Example key functions :
-- Enables or disables module power.
-> void gsm3_module_power( gsm3_t *ctx );
-
-- Reset module.
-> void gsm3_reset ( gsm3_t *ctx );
+- `gsm3_set_sim_apn` This function sets APN for sim card.
+```c
+void gsm3_set_sim_apn ( gsm3_t *ctx, uint8_t *sim_apn );
+```
-- Command function.
-> void gsm3_send_command ( gsm3_t *ctx, char *command );
+- `gsm3_send_sms_text` This function sends text message to a phone number.
+```c
+void gsm3_send_sms_text ( gsm3_t *ctx, uint8_t *phone_number, uint8_t *sms_text );
+```
-## Examples Description
+- `gsm3_send_sms_pdu` This function sends text message to a phone number in PDU mode.
+```c
+err_t gsm3_send_sms_pdu ( gsm3_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text );
+```
-> This example reads and processes data from GSM 3 clicks.
+## Example Description
+
+> Application example shows device capability of connecting to the network and sending SMS or TCP/UDP messages using standard "AT" commands.
**The demo application is composed of two sections :**
-### Application Init
+### Application Init
-> Initializes driver and wake-up module.
+> Initializes the driver, tests the communication by sending "AT" command, and after that restarts the device.
```c
-void application_init ( void )
+void application_init ( void )
{
- log_cfg_t log_cfg;
- gsm3_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ gsm3_cfg_t gsm3_cfg; /**< Click config object. */
- /**
+ /**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
- * @note If USB_UART_RX and USB_UART_TX
- * are defined as HAL_PIN_NC, you will
- * need to define them manually for log to work.
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- gsm3_cfg_setup( &cfg );
- GSM3_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- gsm3_init( &gsm3, &cfg );
-
- gsm3_module_power( &gsm3 );
-
- gsm3_process( );
-
- while( ( gsm3_get_state_net_led( &gsm3 ) != 0 ) || ( gsm3_get_state_conn_led( &gsm3 ) != 0 ) );
- gsm3_process( );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ gsm3_cfg_setup( &gsm3_cfg );
+ GSM3_MAP_MIKROBUS( gsm3_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == gsm3_init( &gsm3, &gsm3_cfg ) )
+ {
+ log_error( &logger, " Application Init Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
- gsm3_send_command( &gsm3, GSM3_SINGLE_CMD_AT );
- gsm3_process( );
-
- gsm3_send_command( &gsm3, GSM3_SINGLE_CMD_AT );
- gsm3_process( );
-
- gsm3_send_command( &gsm3, GSM3_SINGLE_CMD_AT );
- gsm3_process( );
+ gsm3_process( );
+ gsm3_clear_app_buf( );
- gsm3_send_command( &gsm3, GSM3_SINGLE_CMD_ATE0 );
- gsm3_process( );
-
- gsm3_send_command( &gsm3, "AT+IFC=2,2" );
- gsm3_process( );
+ // Check communication
+ gsm3_send_cmd( &gsm3, GSM3_CMD_AT );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ gsm3_error_check( error_flag );
- gsm3_send_command( &gsm3, "AT+CMGF=1" );
- gsm3_process( );
-
- Delay_ms( 2000 );
+ // Restart device
+ #define RESTART_DEVICE "1,1"
+ gsm3_send_cmd_with_par( &gsm3, GSM3_CMD_CFUN, RESTART_DEVICE );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ gsm3_error_check( error_flag );
+
+ log_info( &logger, " Application Task " );
+ example_state = GSM3_CONFIGURE_FOR_NETWORK;
}
-
+
```
### Application Task
-> Reads the received data and parses it.
+> Application task is split in few stages:
+ - GSM3_CONFIGURE_FOR_NETWORK:
+ > Sets configuration to device to be able to connect to the network.
+ - GSM3_WAIT_FOR_CONNECTION:
+ > Waits for the network registration indicated via CREG URC event and then checks the connection status.
+ - GSM3_CONFIGURE_FOR_EXAMPLE:
+ > Sets the device configuration for sending SMS or TCP/UDP messages depending on the selected demo example.
+ - GSM3_EXAMPLE:
+ > Depending on the selected demo example, it sends an SMS message (in PDU or TXT mode) or TCP/UDP message.
+> By default, the TCP/UDP example is selected.
```c
-void application_task ( void )
+void application_task ( void )
{
- gsm3_process( );
-}
+ switch ( example_state )
+ {
+ case GSM3_CONFIGURE_FOR_NETWORK:
+ {
+ if ( GSM3_OK == gsm3_configure_for_network( ) )
+ {
+ example_state = GSM3_WAIT_FOR_CONNECTION;
+ }
+ break;
+ }
+ case GSM3_WAIT_FOR_CONNECTION:
+ {
+ if ( GSM3_OK == gsm3_check_connection( ) )
+ {
+ example_state = GSM3_CONFIGURE_FOR_EXAMPLE;
+ }
+ break;
+ }
+ case GSM3_CONFIGURE_FOR_EXAMPLE:
+ {
+ if ( GSM3_OK == gsm3_configure_for_example( ) )
+ {
+ example_state = GSM3_EXAMPLE;
+ }
+ break;
+ }
+ case GSM3_EXAMPLE:
+ {
+ gsm3_example( );
+ break;
+ }
+ default:
+ {
+ log_error( &logger, " Example state." );
+ break;
+ }
+ }
+}
```
-The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
+## Note
+
+> In order for the examples to work, user needs to set the APN and SMSC (SMS PDU mode only)
+of entered SIM card as well as the phone number (SMS mode only) to which he wants to send an SMS.
+Enter valid values for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE.
+> > Example:
+> > - SIM_APN "internet"
+> > - SIM_SMSC "+381610401"
+> > - PHONE_NUMBER_TO_MESSAGE "+381659999999"
+
-**Other mikroE Libraries used in the example:**
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
- MikroSDK.Board
- MikroSDK.Log
-- Click.Gsm3
+- Click.GSM3
**Additional notes and informations**
-Depending on the development board you are using, you may need
-[USB UART click](https://shop.mikroe.com/usb-uart-click),
-[USB UART 2 Click](https://shop.mikroe.com/usb-uart-2-click) or
-[RS232 Click](https://shop.mikroe.com/rs232-click) to connect to your PC, for
-development systems with no UART to USB interface available on the board. The
-terminal available in all Mikroelektronika
-[compilers](https://shop.mikroe.com/compilers), or any other terminal application
-of your choice, can be used to read the message.
-
-
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
---
diff --git a/clicks/gsm3/README.md b/clicks/gsm3/README.md
index b70d35a9f1..26a1712a38 100644
--- a/clicks/gsm3/README.md
+++ b/clicks/gsm3/README.md
@@ -1,9 +1,9 @@
\mainpage Main Page
-
+
---
# GSM 3 click
-GSM3 click is a complete quad-band GSM cellular network communication solution, featuring the SIM800H-BT, a quad-band 2G GSM/GPRS module.
+> GSM3 click is a complete quad-band GSM cellular network communication solution, featuring the SIM800H-BT, a quad-band 2G GSM/GPRS module. This module is GSM Phase 2/2+ compliant, featuring a full set of options for the cellular networking and communication. It has a network status indication, jamming detection, embedded internet protocols including TCP/IP, UDP, FTP, PPP, HTTP, E-mail, MMS, and more. It also features advanced voice/audio functions, including the FM radio interface. The GPRS multislot class 12 implementation allows 4 uplink and 4 downlink slots, with 5 slots open in total.
@@ -14,141 +14,200 @@ GSM3 click is a complete quad-band GSM cellular network communication solution,
---
-#### Click library
+#### Click library
-- **Author** : MikroE Team
-- **Date** : Apr 2020.
-- **Type** : UART GPS/GNSS type
+- **Author** : Stefan Filipovic
+- **Date** : May 2023.
+- **Type** : UART type
# Software Support
-We provide a library for the Gsm3 Click
-as well as a demo application (example), developed using MikroElektronika
-[compilers](https://shop.mikroe.com/compilers).
-The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
+We provide a library for the GSM3 Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
-Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
## Library Description
-> This library contains API for Gsm3 Click driver.
+> This library contains API for GSM3 Click driver.
#### Standard key functions :
-- Config Object Initialization function.
-> void gsm3_cfg_setup ( gsm3_cfg_t *cfg );
-
-- Initialization function.
-> GSM3_RETVAL gsm3_init ( gsm3_t *ctx, gsm3_cfg_t *cfg );
+- `gsm3_cfg_setup` Config Object Initialization function.
+```c
+void gsm3_cfg_setup ( gsm3_cfg_t *cfg );
+```
+
+- `gsm3_init` Initialization function.
+```c
+err_t gsm3_init ( gsm3_t *ctx, gsm3_cfg_t *cfg );
+```
#### Example key functions :
-- Enables or disables module power.
-> void gsm3_module_power( gsm3_t *ctx );
-
-- Reset module.
-> void gsm3_reset ( gsm3_t *ctx );
+- `gsm3_set_sim_apn` This function sets APN for sim card.
+```c
+void gsm3_set_sim_apn ( gsm3_t *ctx, uint8_t *sim_apn );
+```
-- Command function.
-> void gsm3_send_command ( gsm3_t *ctx, char *command );
+- `gsm3_send_sms_text` This function sends text message to a phone number.
+```c
+void gsm3_send_sms_text ( gsm3_t *ctx, uint8_t *phone_number, uint8_t *sms_text );
+```
-## Examples Description
+- `gsm3_send_sms_pdu` This function sends text message to a phone number in PDU mode.
+```c
+err_t gsm3_send_sms_pdu ( gsm3_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text );
+```
-> This example reads and processes data from GSM 3 clicks.
+## Example Description
+
+> Application example shows device capability of connecting to the network and sending SMS or TCP/UDP messages using standard "AT" commands.
**The demo application is composed of two sections :**
-### Application Init
+### Application Init
-> Initializes driver and wake-up module.
+> Initializes the driver, tests the communication by sending "AT" command, and after that restarts the device.
```c
-void application_init ( void )
+void application_init ( void )
{
- log_cfg_t log_cfg;
- gsm3_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ gsm3_cfg_t gsm3_cfg; /**< Click config object. */
- /**
+ /**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
- * @note If USB_UART_RX and USB_UART_TX
- * are defined as HAL_PIN_NC, you will
- * need to define them manually for log to work.
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- gsm3_cfg_setup( &cfg );
- GSM3_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- gsm3_init( &gsm3, &cfg );
-
- gsm3_module_power( &gsm3 );
-
- gsm3_process( );
-
- while( ( gsm3_get_state_net_led( &gsm3 ) != 0 ) || ( gsm3_get_state_conn_led( &gsm3 ) != 0 ) );
- gsm3_process( );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ gsm3_cfg_setup( &gsm3_cfg );
+ GSM3_MAP_MIKROBUS( gsm3_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == gsm3_init( &gsm3, &gsm3_cfg ) )
+ {
+ log_error( &logger, " Application Init Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
- gsm3_send_command( &gsm3, GSM3_SINGLE_CMD_AT );
- gsm3_process( );
-
- gsm3_send_command( &gsm3, GSM3_SINGLE_CMD_AT );
- gsm3_process( );
-
- gsm3_send_command( &gsm3, GSM3_SINGLE_CMD_AT );
- gsm3_process( );
+ gsm3_process( );
+ gsm3_clear_app_buf( );
- gsm3_send_command( &gsm3, GSM3_SINGLE_CMD_ATE0 );
- gsm3_process( );
-
- gsm3_send_command( &gsm3, "AT+IFC=2,2" );
- gsm3_process( );
+ // Check communication
+ gsm3_send_cmd( &gsm3, GSM3_CMD_AT );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ gsm3_error_check( error_flag );
- gsm3_send_command( &gsm3, "AT+CMGF=1" );
- gsm3_process( );
-
- Delay_ms( 2000 );
+ // Restart device
+ #define RESTART_DEVICE "1,1"
+ gsm3_send_cmd_with_par( &gsm3, GSM3_CMD_CFUN, RESTART_DEVICE );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ gsm3_error_check( error_flag );
+
+ log_info( &logger, " Application Task " );
+ example_state = GSM3_CONFIGURE_FOR_NETWORK;
}
-
+
```
### Application Task
-> Reads the received data and parses it.
+> Application task is split in few stages:
+ - GSM3_CONFIGURE_FOR_NETWORK:
+ > Sets configuration to device to be able to connect to the network.
+ - GSM3_WAIT_FOR_CONNECTION:
+ > Waits for the network registration indicated via CREG URC event and then checks the connection status.
+ - GSM3_CONFIGURE_FOR_EXAMPLE:
+ > Sets the device configuration for sending SMS or TCP/UDP messages depending on the selected demo example.
+ - GSM3_EXAMPLE:
+ > Depending on the selected demo example, it sends an SMS message (in PDU or TXT mode) or TCP/UDP message.
+> By default, the TCP/UDP example is selected.
```c
-void application_task ( void )
+void application_task ( void )
{
- gsm3_process( );
-}
+ switch ( example_state )
+ {
+ case GSM3_CONFIGURE_FOR_NETWORK:
+ {
+ if ( GSM3_OK == gsm3_configure_for_network( ) )
+ {
+ example_state = GSM3_WAIT_FOR_CONNECTION;
+ }
+ break;
+ }
+ case GSM3_WAIT_FOR_CONNECTION:
+ {
+ if ( GSM3_OK == gsm3_check_connection( ) )
+ {
+ example_state = GSM3_CONFIGURE_FOR_EXAMPLE;
+ }
+ break;
+ }
+ case GSM3_CONFIGURE_FOR_EXAMPLE:
+ {
+ if ( GSM3_OK == gsm3_configure_for_example( ) )
+ {
+ example_state = GSM3_EXAMPLE;
+ }
+ break;
+ }
+ case GSM3_EXAMPLE:
+ {
+ gsm3_example( );
+ break;
+ }
+ default:
+ {
+ log_error( &logger, " Example state." );
+ break;
+ }
+ }
+}
```
-The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
+## Note
+
+> In order for the examples to work, user needs to set the APN and SMSC (SMS PDU mode only)
+of entered SIM card as well as the phone number (SMS mode only) to which he wants to send an SMS.
+Enter valid values for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE.
+> > Example:
+> > - SIM_APN "internet"
+> > - SIM_SMSC "+381610401"
+> > - PHONE_NUMBER_TO_MESSAGE "+381659999999"
+
-**Other mikroE Libraries used in the example:**
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
- MikroSDK.Board
- MikroSDK.Log
-- Click.Gsm3
+- Click.GSM3
**Additional notes and informations**
-Depending on the development board you are using, you may need
-[USB UART click](https://shop.mikroe.com/usb-uart-click),
-[USB UART 2 Click](https://shop.mikroe.com/usb-uart-2-click) or
-[RS232 Click](https://shop.mikroe.com/rs232-click) to connect to your PC, for
-development systems with no UART to USB interface available on the board. The
-terminal available in all Mikroelektronika
-[compilers](https://shop.mikroe.com/compilers), or any other terminal application
-of your choice, can be used to read the message.
-
-
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
---
diff --git a/clicks/gsm3/doc/doxy/Doxyfile.doxy b/clicks/gsm3/doc/doxy/Doxyfile.doxy
index 32f1ac6ac5..ecb7e9ea89 100644
--- a/clicks/gsm3/doc/doxy/Doxyfile.doxy
+++ b/clicks/gsm3/doc/doxy/Doxyfile.doxy
@@ -20,7 +20,7 @@
# This tag specifies the encoding used for all characters in the config 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
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
# for the list of possible encodings.
# The default value is: UTF-8.
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/gsm3/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/gsm3/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,11 +291,11 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# 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.
+# documentation. See http://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.
@@ -337,7 +337,7 @@ BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# https://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# http://www.riverbankcomputing.co.uk/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.
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,17 +703,17 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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.
+# to be installed. See also http://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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,14 +790,14 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/gsm3/example \
- ../clicks/gsm3/lib/include \
- ../clicks/gsm3/README.md
+INPUT = ../cmake/gsm3/example \
+ ../cmake/gsm3/lib_gsm3/include \
+ ../cmake/gsm3/README.md
# 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
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
# possible encodings.
# The default value is: UTF-8.
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/gsm3/example
+EXAMPLE_PATH = ../cmake/gsm3/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1047,7 +1047,7 @@ 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
+# (see http://www.gnu.org/software/global/global.html). You will need version
# 4.8.6 or higher.
#
# To use it do the following:
@@ -1075,7 +1075,7 @@ USE_HTAGS = NO
VERBATIM_HEADERS = YES
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
-# clang parser (see: https://clang.llvm.org/) for more accurate parsing at 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.
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,12 +1206,12 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
+# http://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.
@@ -1270,12 +1270,12 @@ 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_NAME.apple.com/tools/xcode/), introduced with
+# environment (see: http://DEVELOPER_NAME.apple.com/tools/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_NAME/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See https://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.html
+# startup. See http://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.html
# for more information.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
@@ -1288,7 +1288,7 @@ GENERATE_DOCSET = NO
# The default value is: Doxygen generated docs.
# This tag requires that the tag GENERATE_DOCSET is set to YES.
-DOCSET_FEEDNAME = "MikroE Click boards"
+DOCSET_FEEDNAME = "Mikroe Click boards"
# This tag specifies a string that should uniquely identify the documentation
# set bundle. This should be a reverse domain-name style string, e.g.
@@ -1315,7 +1315,7 @@ DOCSET_PUBLISHER_NAME = MikroElektronika
# 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
+# (see: http://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
@@ -1328,14 +1328,14 @@ DOCSET_PUBLISHER_NAME = MikroElektronika
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
-GENERATE_HTMLHELP = 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 =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,11 +1387,11 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# (see: http://qt-project.org/doc/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.
@@ -1399,7 +1399,7 @@ QHP_NAMESPACE = org.doxygen.Project
# 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://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
# folders).
# The default value is: doc.
# This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1408,33 +1408,33 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/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://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1529,7 +1529,7 @@ FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# https://www.mathjax.org) which uses client side Javascript for the rendering
+# http://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
@@ -1541,7 +1541,7 @@ 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:
-# https://docs.mathjax.org/en/latest/output.html) for more details.
+# http://docs.mathjax.org/en/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.
@@ -1556,26 +1556,26 @@ MATHJAX_FORMAT = HTML-CSS
# 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.mathjax.org/mathjax/latest.
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
+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 =
+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: https://docs.mathjax.org/en/latest/output.html) for more details. For an
+# (see: http://docs.mathjax.org/en/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 =
+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
@@ -1618,7 +1618,7 @@ SERVER_BASED_SEARCH = NO
#
# 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/).
+# Xapian (see: http://xapian.org/).
#
# See the section "External Indexing and Searching" for details.
# The default value is: NO.
@@ -1631,11 +1631,11 @@ EXTERNAL_SEARCH = NO
#
# 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
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1818,7 +1818,7 @@ 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.
+# http://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.
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2001,7 +2001,7 @@ DOCBOOK_PROGRAMLISTING = NO
#---------------------------------------------------------------------------
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
-# AutoGen Definitions (see https://autogen.sf.net) file that captures the
+# AutoGen Definitions (see http://autogen.sf.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.
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2170,12 +2170,6 @@ EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH = /usr/bin/perl
-
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
@@ -2189,21 +2183,12 @@ PERL_PATH = /usr/bin/perl
CLASS_DIAGRAMS = YES
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# https://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
# 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 =
+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.
@@ -2213,7 +2198,7 @@ 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:
-# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# 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: NO.
@@ -2252,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2368,7 +2353,7 @@ 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:
-# https://www.graphviz.org/)).
+# 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).
@@ -2396,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2479,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/gsm3/doc/package/manifest.json b/clicks/gsm3/doc/package/manifest.json
index ffa9b05d09..11c8fc13cd 100644
--- a/clicks/gsm3/doc/package/manifest.json
+++ b/clicks/gsm3/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "GSM/LTE",
+ "architecture": "ARM|PIC|PIC32|RISC-V",
+ "category": "Click Boards > Wireless connectivity > GSM/LTE",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+ "dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "GSM 3 click",
"example_list": [
@@ -25,15 +24,17 @@
},
"name": "mikroe.click.gsm3",
"product_link": "https://www.mikroe.com/gsm-3-click",
- "short_description": "This example reads and processes data from GSM 3 clicks.",
- "supported_compiler": "mikroC AI",
+ "short_description": "GSM3 click is a complete quad-band GSM cellular network communication solution, featuring the SIM800H-BT, a quad-band 2G GSM/GPRS module. This module is GSM Phase 2/2+ compliant, featuring a full set of options for the cellular networking and communication. It has a network status indication, jamming detection, embedded internet protocols including TCP/IP, UDP, FTP, PPP, HTTP, E-mail, MMS, and more. It also features advanced voice/audio functions, including the FM radio interface. The GPRS multislot class 12 implementation allows 4 uplink and 4 downlink slots, with 5 slots open in total.",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "related_projects": [
1212
],
- "version": "2.0.0.8"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.0",
+ "cmake": true,
+ "alias": "Click.GSM3",
+ "subdir_name": "lib_gsm3"
}
-
diff --git a/clicks/gsm3/example/CMakeLists.txt b/clicks/gsm3/example/CMakeLists.txt
new file mode 100644
index 0000000000..665e12044d
--- /dev/null
+++ b/clicks/gsm3/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_gsm3 LANGUAGES MikroC)
+else()
+ project(example_gsm3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_gsm3
+ main.c
+
+)
+
+
+############################ example_gsm3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_gsm3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_gsm3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_gsm3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_gsm3)
+target_link_libraries(example_gsm3 PUBLIC Click.GSM3)
+############################ example_gsm3 GENERATED CODE END ###########################
diff --git a/clicks/gsm3/example/main.c b/clicks/gsm3/example/main.c
index 8ca36371a9..10d3e0fb37 100644
--- a/clicks/gsm3/example/main.c
+++ b/clicks/gsm3/example/main.c
@@ -1,162 +1,611 @@
/*!
- * \file
- * \brief Gsm3 Click example
- *
+ * @file main.c
+ * @brief GSM 3 Click Example.
+ *
* # Description
- * This example reads and processes data from GSM 3 clicks.
+ * Application example shows device capability of connecting to the network and
+ * sending SMS or TCP/UDP messages using standard "AT" commands.
*
* The demo application is composed of two sections :
- *
- * ## Application Init
- * Initializes driver and wake-up module.
- *
- * ## Application Task
- * Reads the received data and parses it.
- *
+ *
+ * ## Application Init
+ * Initializes the driver, tests the communication by sending "AT" command, and after that restarts the device.
+ *
+ * ## Application Task
+ * Application task is split in few stages:
+ * - GSM3_CONFIGURE_FOR_NETWORK:
+ * Sets configuration to device to be able to connect to the network.
+ *
+ * - GSM3_WAIT_FOR_CONNECTION:
+ * Waits for the network registration indicated via CREG URC event and then checks
+ * the connection status.
+ *
+ * - GSM3_CONFIGURE_FOR_EXAMPLE:
+ * Sets the device configuration for sending SMS or TCP/UDP messages depending on the selected demo example.
+ *
+ * - GSM3_EXAMPLE:
+ * Depending on the selected demo example, it sends an SMS message (in PDU or TXT mode) or TCP/UDP message.
+ *
+ * By default, the TCP/UDP example is selected.
+ *
* ## Additional Function
- * - gsm3_process ( ) - The general process of collecting presponce
- * that sends a module.
- *
- *
- * \author MikroE Team
+ * - static void gsm3_clear_app_buf ( void )
+ * - static err_t gsm3_process ( void )
+ * - static void gsm3_error_check( err_t error_flag )
+ * - static void gsm3_log_app_buf ( void )
+ * - static err_t gsm3_rsp_check ( uint8_t *rsp )
+ * - static err_t gsm3_configure_for_connection( void )
+ * - static err_t gsm3_check_connection( void )
+ * - static err_t gsm3_configure_for_messages( void )
+ * - static err_t gsm3_send_message( void )
+ *
+ * @note
+ * In order for the examples to work, user needs to set the APN and SMSC (SMS PDU mode only)
+ * of entered SIM card as well as the phone number (SMS mode only) to which he wants to send an SMS.
+ * Enter valid values for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE.
+ * Example:
+ SIM_APN "internet"
+ SIM_SMSC "+381610401"
+ PHONE_NUMBER_TO_MESSAGE "+381659999999"
+ *
+ * @author Stefan Filipovic
*
*/
-// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "gsm3.h"
-#include "string.h"
+#include "conversions.h"
+
+// Example selection macros
+#define EXAMPLE_TCP_UDP 0 // Example of sending messages to a TCP/UDP echo server
+#define EXAMPLE_SMS 1 // Example of sending SMS to a phone number
+#define DEMO_EXAMPLE EXAMPLE_TCP_UDP // Example selection macro
+
+// SIM APN config
+#define SIM_APN "internet" // Set valid SIM APN
-#define PROCESS_COUNTER 10
-#define PROCESS_RX_BUFFER_SIZE 500
-#define PROCESS_PARSER_BUFFER_SIZE 1000
+// SMS example parameters
+#define SIM_SMSC "" // Set valid SMS Service Center Address - only in SMS PDU mode
+#define PHONE_NUMBER_TO_MESSAGE "" // Set Phone number to message
+#define SMS_MODE "1" // SMS mode: "0" - PDU, "1" - TXT
-// ------------------------------------------------------------------ VARIABLES
+// TCP/UDP example parameters
+#define REMOTE_IP "77.46.162.162" // TCP/UDP echo server IP address
+#define REMOTE_PORT "51111" // TCP/UDP echo server port
-#define DEMO_APP_RECEIVER
-//#define DEMO_APP_TRANSMITER
+// Message content
+#define MESSAGE_CONTENT "GSM 3 click board - demo example."
+
+// Application buffer size
+#define APP_BUFFER_SIZE 256
+#define PROCESS_BUFFER_SIZE 256
+
+/**
+ * @brief Example states.
+ * @details Predefined enum values for application example state.
+ */
+typedef enum
+{
+ GSM3_CONFIGURE_FOR_NETWORK = 1,
+ GSM3_WAIT_FOR_CONNECTION,
+ GSM3_CONFIGURE_FOR_EXAMPLE,
+ GSM3_EXAMPLE
+
+} gsm3_example_state_t;
static gsm3_t gsm3;
static log_t logger;
-static char current_parser_buf[ PROCESS_PARSER_BUFFER_SIZE ];
-static uint8_t send_data_cnt = 0;
+/**
+ * @brief Application example variables.
+ * @details Variables used in application example.
+ */
+static uint8_t app_buf[ APP_BUFFER_SIZE ] = { 0 };
+static int32_t app_buf_len = 0;
+static err_t error_flag;
+static gsm3_example_state_t example_state;
+
+/**
+ * @brief Clearing application buffer.
+ * @details This function clears memory of application
+ * buffer and reset its length and counter.
+ */
+static void gsm3_clear_app_buf ( void );
+
+/**
+ * @brief Data reading function.
+ * @details This function reads data from device and
+ * appends it to the application buffer.
+ * @return @li @c 0 - Some data is read.
+ * @li @c -1 - Nothing is read.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm3_process ( void );
+
+/**
+ * @brief Check for errors.
+ * @details This function checks for different types of
+ * errors and logs them on UART or logs the response if no errors occured.
+ * @param[in] error_flag Error flag to check.
+ */
+static void gsm3_error_check ( err_t error_flag );
+
+/**
+ * @brief Logs application buffer.
+ * @details This function logs data from application buffer.
+ */
+static void gsm3_log_app_buf ( void );
+
+/**
+ * @brief Response check.
+ * @details This function checks for response and
+ * returns the status of response.
+ * @param[in] rsp Expected response.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm3_rsp_check ( uint8_t *rsp );
-// ------------------------------------------------------- ADDITIONAL FUNCTIONS
+/**
+ * @brief Configure device for connection to the network.
+ * @details Sends commands to configure and enable
+ * connection to the specified network.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm3_configure_for_network ( void );
-static void gsm3_process ( void )
+/**
+ * @brief Wait for connection signal.
+ * @details Wait for connection signal from CREG URC.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm3_check_connection ( void );
+
+/**
+ * @brief Configure device for example.
+ * @details Configure device for the specified example.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm3_configure_for_example ( void );
+
+/**
+ * @brief Execute example.
+ * @details This function executes SMS or TCP/UDP example depending on the DEMO_EXAMPLE macro.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm3_example ( void );
+
+void application_init ( void )
{
- int32_t rsp_size;
- uint16_t rsp_cnt = 0;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ gsm3_cfg_t gsm3_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ gsm3_cfg_setup( &gsm3_cfg );
+ GSM3_MAP_MIKROBUS( gsm3_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == gsm3_init( &gsm3, &gsm3_cfg ) )
+ {
+ log_error( &logger, " Application Init Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
- char uart_rx_buffer[ PROCESS_RX_BUFFER_SIZE ] = { 0 };
- uint16_t check_buf_cnt;
- uint8_t process_cnt = PROCESS_COUNTER;
+ gsm3_process( );
+ gsm3_clear_app_buf( );
+
+ // Check communication
+ gsm3_send_cmd( &gsm3, GSM3_CMD_AT );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ gsm3_error_check( error_flag );
- // Clear parser buffer
- memset( current_parser_buf, 0 , PROCESS_PARSER_BUFFER_SIZE );
+ // Restart device
+ #define RESTART_DEVICE "1,1"
+ gsm3_send_cmd_with_par( &gsm3, GSM3_CMD_CFUN, RESTART_DEVICE );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ gsm3_error_check( error_flag );
- while( process_cnt != 0 )
- {
- rsp_size = gsm3_generic_read( &gsm3, &uart_rx_buffer, PROCESS_RX_BUFFER_SIZE );
+ log_info( &logger, " Application Task " );
+ example_state = GSM3_CONFIGURE_FOR_NETWORK;
+}
- if ( rsp_size > 0 )
- {
- // Validation of the received data
- for ( check_buf_cnt = 0; check_buf_cnt < rsp_size; check_buf_cnt++ )
+void application_task ( void )
+{
+ switch ( example_state )
+ {
+ case GSM3_CONFIGURE_FOR_NETWORK:
+ {
+ if ( GSM3_OK == gsm3_configure_for_network( ) )
{
- if ( uart_rx_buffer[ check_buf_cnt ] == 0 )
- {
- uart_rx_buffer[ check_buf_cnt ] = 13;
- }
+ example_state = GSM3_WAIT_FOR_CONNECTION;
}
- log_printf( &logger, "%s", uart_rx_buffer );
-
- // Storages data in parser buffer
- rsp_cnt += rsp_size;
- if ( rsp_cnt < PROCESS_PARSER_BUFFER_SIZE )
+ break;
+ }
+ case GSM3_WAIT_FOR_CONNECTION:
+ {
+ if ( GSM3_OK == gsm3_check_connection( ) )
{
- strncat( current_parser_buf, uart_rx_buffer, rsp_size );
+ example_state = GSM3_CONFIGURE_FOR_EXAMPLE;
}
-
- // Clear RX buffer
- memset( uart_rx_buffer, 0, PROCESS_RX_BUFFER_SIZE );
- }
- else
+ break;
+ }
+ case GSM3_CONFIGURE_FOR_EXAMPLE:
+ {
+ if ( GSM3_OK == gsm3_configure_for_example( ) )
+ {
+ example_state = GSM3_EXAMPLE;
+ }
+ break;
+ }
+ case GSM3_EXAMPLE:
{
- process_cnt--;
-
- // Process delay
- Delay_ms( 100 );
+ gsm3_example( );
+ break;
+ }
+ default:
+ {
+ log_error( &logger, " Example state." );
+ break;
}
}
}
-// ------------------------------------------------------ APPLICATION FUNCTIONS
-
-void application_init ( void )
+void main ( void )
{
- log_cfg_t log_cfg;
- gsm3_cfg_t cfg;
-
- /**
- * Logger initialization.
- * Default baud rate: 115200
- * Default log level: LOG_LEVEL_DEBUG
- * @note If USB_UART_RX and USB_UART_TX
- * are defined as HAL_PIN_NC, you will
- * need to define them manually for log to work.
- * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
- */
- LOG_MAP_USB_UART( log_cfg );
- log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
+ application_init( );
- // Click initialization.
+ for ( ; ; )
+ {
+ application_task( );
+ }
+}
- gsm3_cfg_setup( &cfg );
- GSM3_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- gsm3_init( &gsm3, &cfg );
+static void gsm3_clear_app_buf ( void )
+{
+ memset( app_buf, 0, app_buf_len );
+ app_buf_len = 0;
+}
- gsm3_module_power( &gsm3 );
+static err_t gsm3_process ( void )
+{
+ uint8_t rx_buf[ PROCESS_BUFFER_SIZE ] = { 0 };
+ int32_t rx_size = 0;
+ rx_size = gsm3_generic_read( &gsm3, rx_buf, PROCESS_BUFFER_SIZE );
+ if ( rx_size > 0 )
+ {
+ int32_t buf_cnt = app_buf_len;
+ if ( ( ( app_buf_len + rx_size ) > APP_BUFFER_SIZE ) && ( app_buf_len > 0 ) )
+ {
+ buf_cnt = APP_BUFFER_SIZE - ( ( app_buf_len + rx_size ) - APP_BUFFER_SIZE );
+ memmove ( app_buf, &app_buf[ APP_BUFFER_SIZE - buf_cnt ], buf_cnt );
+ }
+ for ( int32_t rx_cnt = 0; rx_cnt < rx_size; rx_cnt++ )
+ {
+ if ( rx_buf[ rx_cnt ] )
+ {
+ app_buf[ buf_cnt++ ] = rx_buf[ rx_cnt ];
+ if ( app_buf_len < APP_BUFFER_SIZE )
+ {
+ app_buf_len++;
+ }
+ }
+ }
+ return GSM3_OK;
+ }
+ return GSM3_ERROR;
+}
- gsm3_process( );
+static err_t gsm3_rsp_check ( uint8_t *rsp )
+{
+ uint32_t timeout_cnt = 0;
+ uint32_t timeout = 120000;
+ gsm3_clear_app_buf( );
+ gsm3_process( );
+ while ( ( 0 == strstr( app_buf, rsp ) ) &&
+ ( 0 == strstr( app_buf, GSM3_RSP_ERROR ) ) )
+ {
+ gsm3_process( );
+ if ( timeout_cnt++ > timeout )
+ {
+ gsm3_clear_app_buf( );
+ return GSM3_ERROR_TIMEOUT;
+ }
+ Delay_ms( 1 );
+ }
+ Delay_ms( 100 );
+ gsm3_process( );
+ if ( strstr( app_buf, rsp ) )
+ {
+ return GSM3_OK;
+ }
+ else if ( strstr( app_buf, GSM3_RSP_ERROR ) )
+ {
+ return GSM3_ERROR_CMD;
+ }
+ else
+ {
+ return GSM3_ERROR_UNKNOWN;
+ }
+}
- gsm3_send_command( &gsm3, GSM3_SINGLE_CMD_AT );
- gsm3_process( );
+static void gsm3_error_check ( err_t error_flag )
+{
+ switch ( error_flag )
+ {
+ case GSM3_OK:
+ {
+ gsm3_log_app_buf( );
+ break;
+ }
+ case GSM3_ERROR:
+ {
+ log_error( &logger, " Overflow!" );
+ break;
+ }
+ case GSM3_ERROR_TIMEOUT:
+ {
+ log_error( &logger, " Timeout!" );
+ break;
+ }
+ case GSM3_ERROR_CMD:
+ {
+ log_error( &logger, " CMD!" );
+ break;
+ }
+ case GSM3_ERROR_UNKNOWN:
+ default:
+ {
+ log_error( &logger, " Unknown!" );
+ break;
+ }
+ }
+ Delay_ms( 500 );
+}
- gsm3_send_command( &gsm3, GSM3_SINGLE_CMD_AT );
- gsm3_process( );
+static void gsm3_log_app_buf ( void )
+{
+ for ( int32_t buf_cnt = 0; buf_cnt < app_buf_len; buf_cnt++ )
+ {
+ log_printf( &logger, "%c", app_buf[ buf_cnt ] );
+ }
+}
- gsm3_send_command( &gsm3, GSM3_SINGLE_CMD_AT );
- gsm3_process( );
+static err_t gsm3_configure_for_network ( void )
+{
+ err_t func_error = GSM3_OK;
+#if ( ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP ) || ( DEMO_EXAMPLE == EXAMPLE_SMS ) )
+ Delay_ms ( 5000 );
+ // Deregister from network
+ #define DEREGISTER_FROM_NETWORK "2"
+ gsm3_send_cmd_with_par( &gsm3, GSM3_CMD_COPS, DEREGISTER_FROM_NETWORK );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+
+ // Set SIM APN
+ gsm3_set_sim_apn( &gsm3, SIM_APN );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
- gsm3_send_command( &gsm3, GSM3_SINGLE_CMD_ATE0 );
- gsm3_process( );
+ // Enable full functionality
+ #define FULL_FUNCTIONALITY "1"
+ gsm3_send_cmd_with_par( &gsm3, GSM3_CMD_CFUN, FULL_FUNCTIONALITY );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
- gsm3_send_command( &gsm3, "AT+IFC=2,2" );
- gsm3_process( );
+ // Enable network registartion
+ #define ENABLE_REG "2"
+ gsm3_send_cmd_with_par( &gsm3, GSM3_CMD_CREG, ENABLE_REG );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
- gsm3_send_command( &gsm3, "AT+CMGF=1" );
- gsm3_process( );
+ // Automatic registration
+ #define AUTOMATIC_REGISTRATION "0"
+ gsm3_send_cmd_with_par( &gsm3, GSM3_CMD_COPS, AUTOMATIC_REGISTRATION );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+#endif
+ return func_error;
+}
- Delay_ms( 2000 );
+static err_t gsm3_check_connection ( void )
+{
+#if ( ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP ) || ( DEMO_EXAMPLE == EXAMPLE_SMS ) )
+ #define CONNECTED "+CREG: 2,1"
+ gsm3_send_cmd_check ( &gsm3, GSM3_CMD_CREG );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ gsm3_error_check( error_flag );
+ if ( strstr( app_buf, CONNECTED ) )
+ {
+ Delay_ms( 100 );
+ // Check signal quality
+ gsm3_send_cmd( &gsm3, GSM3_CMD_CSQ );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ gsm3_error_check( error_flag );
+ #define NO_SIGNAL "99,99"
+ if ( !strstr( app_buf, NO_SIGNAL ) )
+ {
+ Delay_ms ( 1000 );
+ return error_flag;
+ }
+ }
+ Delay_ms ( 1000 );
+ return GSM3_ERROR;
+#endif
+ return GSM3_OK;
}
-void application_task ( void )
+static err_t gsm3_configure_for_example ( void )
{
- gsm3_process( );
+ err_t func_error = GSM3_OK;
+#if ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP )
+ #define ENABLE_RESPONSE_HEADER "1"
+ gsm3_send_cmd_with_par( &gsm3, GSM3_CMD_CIPHEAD, ENABLE_RESPONSE_HEADER );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+#elif ( DEMO_EXAMPLE == EXAMPLE_SMS )
+ gsm3_send_cmd_with_par( &gsm3, GSM3_CMD_CMGF, SMS_MODE );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+#else
+ #error "No demo example selected"
+#endif
+ return func_error;
}
-void main ( void )
+static err_t gsm3_example ( void )
{
- application_init( );
+ err_t func_error = GSM3_OK;
+#if ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP )
+ uint8_t cmd_buf[ 100 ] = { 0 };
+
+ // Open TCP socket.
+ #define RESPONSE_CONNECT "CONNECT OK"
+ #define TCP_SERVICE_TYPE "\"TCP\","
+ strcpy( cmd_buf, TCP_SERVICE_TYPE );
+ strcat( cmd_buf, "\"" );
+ strcat( cmd_buf, REMOTE_IP );
+ strcat( cmd_buf, "\"" );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, REMOTE_PORT );
+ gsm3_send_cmd_with_par( &gsm3, GSM3_CMD_CIPSTART, cmd_buf );
+ error_flag = gsm3_rsp_check( RESPONSE_CONNECT );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+
+ // Get message length
+ uint8_t message_len_buf[ 10 ] = { 0 };
+ uint16_t message_len = strlen( MESSAGE_CONTENT );
+ uint16_to_str( message_len, message_len_buf );
+ l_trim( message_len_buf );
+ r_trim( message_len_buf );
- for ( ; ; )
+ // Write message to TCP socket
+ uint8_t ctrl_z = 0x1A;
+ strcpy( cmd_buf, message_len_buf );
+ gsm3_send_cmd_with_par( &gsm3, GSM3_CMD_CIPSEND, cmd_buf );
+ error_flag = gsm3_rsp_check( ">" );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+ gsm3_generic_write ( &gsm3, MESSAGE_CONTENT, message_len );
+ gsm3_generic_write ( &gsm3, &ctrl_z, 1 );
+
+ // Read response
+ #define RESPONSE_URC "+IPD"
+ error_flag = gsm3_rsp_check( RESPONSE_URC );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+ log_printf( &logger, "\r\n" );
+
+ // Close TCP socket
+ gsm3_send_cmd( &gsm3, GSM3_CMD_CIPCLOSE );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+
+ // Open UDP socket.
+ #define UDP_SERVICE_TYPE "\"UDP\","
+ strcpy( cmd_buf, UDP_SERVICE_TYPE );
+ strcat( cmd_buf, "\"" );
+ strcat( cmd_buf, REMOTE_IP );
+ strcat( cmd_buf, "\"" );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, REMOTE_PORT );
+ gsm3_send_cmd_with_par( &gsm3, GSM3_CMD_CIPSTART, cmd_buf );
+ error_flag = gsm3_rsp_check( RESPONSE_CONNECT );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+
+ // Write message to UDP socket
+ strcpy( cmd_buf, message_len_buf );
+ gsm3_send_cmd_with_par( &gsm3, GSM3_CMD_CIPSEND, cmd_buf );
+ error_flag = gsm3_rsp_check( ">" );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+ gsm3_generic_write ( &gsm3, MESSAGE_CONTENT, message_len );
+ gsm3_generic_write ( &gsm3, &ctrl_z, 1 );
+
+ // Read response
+ error_flag = gsm3_rsp_check( RESPONSE_URC );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+ log_printf( &logger, "\r\n" );
+
+ // Close UDP socket
+ gsm3_send_cmd( &gsm3, GSM3_CMD_CIPCLOSE );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+ Delay_ms( 5000 );
+#elif ( DEMO_EXAMPLE == EXAMPLE_SMS )
+ // Check SMS mode
+ #define CMGF_PDU "+CMGF: 0"
+ #define CMGF_TXT "+CMGF: 1"
+ gsm3_send_cmd_check( &gsm3, GSM3_CMD_CMGF );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+ if ( strstr( app_buf, CMGF_PDU ) )
{
- application_task( );
+ // Send SMS in PDU mode
+ gsm3_send_sms_pdu( &gsm3, SIM_SMSC, PHONE_NUMBER_TO_MESSAGE, MESSAGE_CONTENT );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
+ }
+ else if ( strstr( app_buf, CMGF_TXT ) )
+ {
+ // Send SMS in TXT mode
+ gsm3_send_sms_text ( &gsm3, PHONE_NUMBER_TO_MESSAGE, MESSAGE_CONTENT );
+ error_flag = gsm3_rsp_check( GSM3_RSP_OK );
+ func_error |= error_flag;
+ gsm3_error_check( error_flag );
}
+ Delay_ms( 10000 );
+ Delay_ms( 10000 );
+ Delay_ms( 10000 );
+#else
+ #error "No demo example selected"
+#endif
+ return func_error;
}
// ------------------------------------------------------------------------ END
diff --git a/clicks/gsm3/example/manifest.exm b/clicks/gsm3/example/manifest.exm
index 485f1864aa..8cc528226f 100644
--- a/clicks/gsm3/example/manifest.exm
+++ b/clicks/gsm3/example/manifest.exm
@@ -1,8 +1,8 @@
{
"name": "GSM 3 Click",
- "description": "GSM3 click is a complete quad-band GSM cellular network communication solution, featuring the SIM800H-BT, a quad-band 2G GSM/GPRS module.",
+ "description": "GSM3 click is a complete quad-band GSM cellular network communication solution, featuring the SIM800H-BT, a quad-band 2G GSM/GPRS module. This module is GSM Phase 2/2+ compliant, featuring a full set of options for the cellular networking and communication. It has a network status indication, jamming detection, embedded internet protocols including TCP/IP, UDP, FTP, PPP, HTTP, E-mail, MMS, and more. It also features advanced voice/audio functions, including the FM radio interface. The GPRS multislot class 12 implementation allows 4 uplink and 4 downlink slots, with 5 slots open in total.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv"],
"hw" : ["click","SIM800H-BT"],
- "category" : ["GSM/LTE,2G GPRS"]
+ "category" : ["GSM/LTE"]
}
diff --git a/clicks/gsm3/example/memake.txt b/clicks/gsm3/example/memake.txt
deleted file mode 100644
index b812f6d1c5..0000000000
--- a/clicks/gsm3/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_gsm3
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Gsm3
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/gsm3/lib/include/gsm3.h b/clicks/gsm3/lib/include/gsm3.h
deleted file mode 100644
index 11751f7c56..0000000000
--- a/clicks/gsm3/lib/include/gsm3.h
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- * \brief This file contains API for GSM 3 Click driver.
- *
- * \addtogroup gsm3 GSM 3 Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef GSM3_H
-#define GSM3_H
-
-#include "drv_digital_out.h"
-#include "drv_digital_in.h"
-#include "drv_uart.h"
-
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-#define GSM3_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
- cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
- cfg.sta = MIKROBUS( mikrobus, MIKROBUS_AN ); \
- cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
- cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
- cfg.pwk = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
- cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT );
-/** \} */
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define GSM3_RETVAL uint8_t
-
-#define GSM3_OK 0x00
-#define GSM3_INIT_ERROR 0xFF
-/** \} */
-
-/**
- * \defgroup parser_error Parser error
- * \{
- */
-#define GSM3_PARSER_NO_ERROR 0x00
-#define GSM3_PARSER_ERROR_REF 0x01
-#define GSM3_PARSER_ERROR_CMD 0x02
-#define GSM3_PARSER_ERROR_DATA 0x04
-/** \} */
-
-/**
- * \defgroup click_status G2C 3G click status
- * \{
- */
-#define GSM3_STATUS_DEVICE_READY 1
-#define GSM3_STATUS_ACT_NETWORK_AND_BROKER 4
-#define GSM3_STATUS_ACT_NETWORK 2
-#define GSM3_STATUS_ACT_BROKER 3
-#define GSM3_STATUS_DEVICE_BUSY 0
-/** \} */
-
-/**
- * \defgroup module_state Module power state
- * \{
- */
-#define GSM3_MODULE_POWER_ON 1
-#define GSM3_MODULE_POWER_OFF 0
-/** \} */
-
-/**
- * \defgroup at_command AT command
- * \{
- */
-#define GSM3_SINGLE_CMD_AT "AT"
-#define GSM3_SINGLE_CMD_AT_W "AT+W"
-#define GSM3_SINGLE_CMD_AT_R "AT+R"
-#define GSM3_SINGLE_CMD_ATE0 "ATE0"
-#define GSM3_SINGLE_CMD_ATE1 "ATE1"
-#define GSM3_SINGLE_CMD_AT_RST "AT+RST"
-#define GSM3_SINGLE_CMD_AT_CRST "AT+CRST"
-#define GSM3_SINGLE_CMD_AT_GMR "AT+GMR"
-#define GSM3_SINGLE_CMD_AT_GMSTA "AT+GMSTA"
-#define GSM3_SINGLE_CMD_AT_PUB "AT+PUB"
-
-#define GSM3_SINGLE_CMD_SET_AT_LRSP_1 "AT+LRSP=1"
-#define GSM3_SINGLE_CMD_SET_AT_LRSP_0 "AT+LRSP=0"
-#define GSM3_SINGLE_CMD_SET_AT_CEN_1 "AT+CEN=1"
-#define GSM3_SINGLE_CMD_SET_AT_CEN_0 "AT+CEN=0"
-#define GSM3_SINGLE_CMD_SET_AT_NWC_1 "AT+NWC=1"
-#define GSM3_SINGLE_CMD_SET_AT_NWC_0 "AT+NWC=0"
-#define GSM3_SINGLE_CMD_SET_AT_BRC_1 "AT+BRC=1"
-#define GSM3_SINGLE_CMD_SET_AT_BRC_0 "AT+BRC=0"
-#define GSM3_SINGLE_CMD_SET_AT_GPEN_0 "AT+GPEN=0"
-#define GSM3_SINGLE_CMD_SET_AT_GPEN_1 "AT+GPEN=1"
-
-#define GSM3_SINGLE_CMD_GET_AT_LRSP "AT+LRSP?"
-#define GSM3_SINGLE_CMD_GET_AT_CEN "AT+CEN?"
-#define GSM3_SINGLE_CMD_GET_AT_NWC "AT+NWC?"
-#define GSM3_SINGLE_CMD_GET_AT_BRC "AT+BRC?"
-#define GSM3_SINGLE_CMD_GET_AT_GPEN "AT+GPEN?"
-#define GSM3_SINGLE_CMD_GET_AT_NWCR "AT+NWCR?"
-#define GSM3_SINGLE_CMD_GET_AT_BRCR "AT+BRCR?"
-#define GSM3_SINGLE_CMD_GET_AT_DSET "AT+DSET?"
-
-#define GSM3_SINGLE_CMD_TEST_AT_LRSP "AT+LRSP=?"
-#define GSM3_SINGLE_CMD_TEST_AT_CEN "AT+CEN=?"
-#define GSM3_SINGLE_CMD_TEST_AT_NWC "AT+NWC=?"
-#define GSM3_SINGLE_CMD_TEST_AT_BRC "AT+BRC=?"
-#define GSM3_SINGLE_CMD_TEST_AT_GPEN "AT+GPEN=?"
-#define GSM3_SINGLE_CMD_TEST_AT_NWCR "AT+NWCR=?"
-#define GSM3_SINGLE_CMD_TEST_AT_BRCR "AT+BRCR=?"
-#define GSM3_SINGLE_CMD_TEST_AT_DSET "AT+DSET=?"
-
-#define GSM3_MULTI_CMD_AT_DSET "AT+DSET"
-#define GSM3_MULTI_CMD_AT_BRCR "AT+BRCR"
-#define GSM3_MULTI_CMD_AT_NWCR "AT+NWCR"
-/** \} */
-
-/**
- * \defgroup driver Driver define
- * \{
- */
-#define DRV_RX_BUFFER_SIZE 500
-/** \} */
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
- // Output pins
-
- digital_out_t rst;
- digital_out_t rts;
- digital_out_t pwk;
-
- // Input pins
-
- digital_in_t sta;
- digital_in_t cts;
-
- // Modules
-
- uart_t uart;
-
- char uart_rx_buffer[ DRV_RX_BUFFER_SIZE ];
- char uart_tx_buffer[ DRV_RX_BUFFER_SIZE ];
-
-} gsm3_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Communication gpio pins
-
- pin_name_t rx_pin;
- pin_name_t tx_pin;
-
- // Additional gpio pins
-
- pin_name_t sta;
- pin_name_t rst;
- pin_name_t rts;
- pin_name_t pwk;
- pin_name_t cts;
-
- // static variable
-
- uint32_t baud_rate; // Clock speed.
- bool uart_blocking;
- uart_data_bits_t data_bit; // Data bits.
- uart_parity_t parity_bit; // Parity bit.
- uart_stop_bits_t stop_bit; // Stop bits.
-
-} gsm3_cfg_t;
-
-/**
- * @brief Error type
- */
-// Actuator switch type
-typedef uint8_t gsm3_actuator_sw_t;
-
-// Actuator counter type
-typedef int16_t gsm3_actuator_cnt_t;
-
-// Actuator string type
-typedef char gsm3_actuator_str_t;
-
-// Parser error type
-typedef uint8_t gsm3_error_t;
-
-/** \} */ // End types group
-
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
- */
-void gsm3_cfg_setup ( gsm3_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- * @param gsm3 Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
- */
-GSM3_RETVAL gsm3_init ( gsm3_t *ctx, gsm3_cfg_t *cfg );
-
-/**
- * @brief Enables or disables module power.
- *
- * @param ctx Click object.
- *
- * @description This function Turn ON or OFF the module.
- */
-void gsm3_module_power( gsm3_t *ctx );
-
-/**
- * @brief Reset module.
- *
- * @param ctx Click object.
- *
- * @description This function reset module.
- */
-void gsm3_reset ( gsm3_t *ctx );
-
-/**
- * @brief Generic write function.
- *
- * @param ctx Click object.
- * @param data_buf Data buff to be written.
- * @param len Number of the bytes in data buf.
- *
- * @description This function writes data to the desired register.
- */
-void gsm3_generic_write ( gsm3_t *ctx, char *data_buf, uint16_t len );
-
-/**
- * @brief Generic read function.
- *
- * @param ctx Click object.
- * @param data_buf Data buff to be written.
- * @param max_len Max number of the bytes in data buf.
- *
- * @description This function reads data from the desired register.
- */
-int32_t gsm3_generic_read ( gsm3_t *ctx, char *data_buf, uint16_t max_len );
-
-/**
- * @brief Command function.
- *
- * @param ctx Click object.
- * @param command Command.
- *
- * @description This function send comamnd.
- */
-void gsm3_send_command ( gsm3_t *ctx, char *command );
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _GSM3_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
diff --git a/clicks/gsm3/lib/memake.txt b/clicks/gsm3/lib/memake.txt
deleted file mode 100644
index 0e2c92783e..0000000000
--- a/clicks/gsm3/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_gsm3
-
-alias: Click.Gsm3
-
-sources: {
- src/gsm3.c
-}
-
-headers: {
- include/gsm3.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/gsm3.h) dst(include/gsm3.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/gsm3/lib/src/gsm3.c b/clicks/gsm3/lib/src/gsm3.c
deleted file mode 100644
index c99ca67188..0000000000
--- a/clicks/gsm3/lib/src/gsm3.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- */
-
-#include "gsm3.h"
-#include "string.h"
-
-// ------------------------------------------------------------- PRIVATE MACROS
-
-// Buffer
-#define GSM3_BUF_FIRST_CMD "=\""
-#define GSM3_BUF_MID_CMD "\",\""
-#define GSM3_BUF_END_CMD "\""
-
-#define GSM3_RSP_CMD_ACT "+ACT"
-#define GSM3_RSP_CMD_ACT_LEN 4
-
-// ACTUATOR SWITCH PARSER
-#define GSM3_RSP_STATE_TRUE "true"
-#define GSM3_RSP_STATE_TRUE_LEN 4
-#define GSM3_RSP_STATE_FALSE "false"
-#define GSM3_RSP_STATE_FALSE_LEN 5
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void gsm3_cfg_setup ( gsm3_cfg_t *cfg )
-{
- // Communication gpio pins
-
- cfg->rx_pin = HAL_PIN_NC;
- cfg->tx_pin = HAL_PIN_NC;
-
- // Additional gpio pins
-
- cfg->sta = HAL_PIN_NC;
- cfg->rst = HAL_PIN_NC;
- cfg->rts = HAL_PIN_NC;
- cfg->pwk = HAL_PIN_NC;
- cfg->cts = HAL_PIN_NC;
-
- cfg->baud_rate = 9600;
- cfg->data_bit = UART_DATA_BITS_DEFAULT;
- cfg->parity_bit = UART_PARITY_DEFAULT;
- cfg->stop_bit = UART_STOP_BITS_DEFAULT;
- cfg->uart_blocking = false;
-}
-
-GSM3_RETVAL gsm3_init ( gsm3_t *ctx, gsm3_cfg_t *cfg )
-{
- uart_config_t uart_cfg;
-
- uart_configure_default( &uart_cfg );
-
- // Ring buffer mapping
- ctx->uart.tx_ring_buffer = ctx->uart_tx_buffer;
- ctx->uart.rx_ring_buffer = ctx->uart_rx_buffer;
-
- // UART module config
- uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
- uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
- uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
- uart_cfg.rx_ring_size = sizeof( ctx->uart_rx_buffer );
-
- uart_open( &ctx->uart, &uart_cfg );
- uart_set_baud( &ctx->uart, cfg->baud_rate );
- uart_set_parity( &ctx->uart, cfg->parity_bit );
- uart_set_stop_bits( &ctx->uart, cfg->stop_bit );
- uart_set_data_bits( &ctx->uart, cfg->data_bit );
-
- uart_set_blocking( &ctx->uart, cfg->uart_blocking );
-
- // Output pins
-
- digital_out_init( &ctx->rst, cfg->rst );
- digital_out_init( &ctx->rts, cfg->rts );
- digital_out_init( &ctx->pwk, cfg->pwk );
-
- // Input pins
-
- digital_in_init( &ctx->sta, cfg->sta );
- digital_in_init( &ctx->cts, cfg->cts );
-
- return GSM3_OK;
-
-}
-void gsm3_module_power( gsm3_t *ctx )
-{
- digital_out_high( &ctx->pwk );
- Delay_1sec( );
- digital_out_low( &ctx->pwk );
- Delay_1sec( );
-}
-
-void gsm3_reset ( gsm3_t *ctx )
-{
- digital_out_high( &ctx->rst );
- Delay_100ms( );
- digital_out_low( &ctx->rst );
- Delay_100ms( );
- Delay_100ms( );
- Delay_100ms( );
- digital_out_high( &ctx->rst );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
-}
-
-void gsm3_generic_write ( gsm3_t *ctx, char *data_buf, uint16_t len )
-{
- uart_write( &ctx->uart, data_buf, len );
-}
-
-int32_t gsm3_generic_read ( gsm3_t *ctx, char *data_buf, uint16_t max_len )
-{
- return uart_read( &ctx->uart, data_buf, max_len );
-}
-
-void gsm3_send_command ( gsm3_t *ctx, char *command )
-{
- char tmp_buf[ 100 ];
- uint8_t len;
- memset( tmp_buf, 0, 100 );
- len = strlen( command );
-
- strncpy( tmp_buf, command, len );
- strcat( tmp_buf, "\n" );
-
- gsm3_generic_write( ctx, tmp_buf, strlen( tmp_buf ) );
-}
-
-// ------------------------------------------------------------------------- END
-
diff --git a/clicks/gsm3/lib_gsm3/CMakeLists.txt b/clicks/gsm3/lib_gsm3/CMakeLists.txt
new file mode 100644
index 0000000000..a1f9bb55f7
--- /dev/null
+++ b/clicks/gsm3/lib_gsm3/CMakeLists.txt
@@ -0,0 +1,31 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_gsm3 LANGUAGES MikroC)
+else()
+ project(lib_gsm3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_gsm3 STATIC
+ src/gsm3.c
+ include/gsm3.h
+)
+add_library(Click.GSM3 ALIAS lib_gsm3)
+
+
+
+target_include_directories(lib_gsm3 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_gsm3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_gsm3 PUBLIC MikroSDK.Driver)
+find_package(MikroSDK.Conversions REQUIRED)
+target_link_libraries(lib_gsm3 PUBLIC MikroSDK.Conversions)
+find_package(MikroSDK.GenericPointer REQUIRED)
+target_link_libraries(lib_gsm3 PUBLIC MikroSDK.GenericPointer)
diff --git a/clicks/gsm3/lib_gsm3/include/Click.Gsm3 b/clicks/gsm3/lib_gsm3/include/Click.Gsm3
new file mode 100644
index 0000000000..08efbe2cc6
--- /dev/null
+++ b/clicks/gsm3/lib_gsm3/include/Click.Gsm3
@@ -0,0 +1 @@
+#include "gsm3.h"
diff --git a/clicks/gsm3/lib_gsm3/include/gsm3.h b/clicks/gsm3/lib_gsm3/include/gsm3.h
new file mode 100644
index 0000000000..629737981f
--- /dev/null
+++ b/clicks/gsm3/lib_gsm3/include/gsm3.h
@@ -0,0 +1,383 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file gsm3.h
+ * @brief This file contains API for GSM 3 Click Driver.
+ */
+
+#ifndef GSM3_H
+#define GSM3_H
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_uart.h"
+
+/*!
+ * @addtogroup gsm3 GSM 3 Click Driver
+ * @brief API for configuring and manipulating GSM 3 Click driver.
+ * @{
+ */
+
+/**
+ * @defgroup gsm3_set GSM 3 Device Settings
+ * @brief Settings for registers of GSM 3 Click driver.
+ */
+
+/**
+ * @addtogroup gsm3_set
+ * @{
+ */
+
+/**
+ * @brief GSM 3 control commands.
+ * @details Specified setting for control commands of GSM 3 Click driver.
+ */
+#define GSM3_CMD_AT "AT"
+#define GSM3_CMD_CFUN "AT+CFUN"
+#define GSM3_CMD_CREG "AT+CREG"
+#define GSM3_CMD_CGDCONT "AT+CGDCONT"
+#define GSM3_CMD_CSQ "AT+CSQ"
+#define GSM3_CMD_COPS "AT+COPS"
+#define GSM3_CMD_CMGS "AT+CMGS"
+#define GSM3_CMD_CMGF "AT+CMGF"
+#define GSM3_CMD_CIPMUX "AT+CIPMUX"
+#define GSM3_CMD_CIPSTART "AT+CIPSTART"
+#define GSM3_CMD_CIPCLOSE "AT+CIPCLOSE"
+#define GSM3_CMD_CIPSEND "AT+CIPSEND"
+#define GSM3_CMD_CIPHEAD "AT+CIPHEAD"
+
+/**
+ * @brief GSM 3 device response for AT commands.
+ * @details Device response after commands.
+ */
+#define GSM3_RSP_OK "OK"
+#define GSM3_RSP_ERROR "ERROR"
+
+/**
+ * @brief GSM 3 driver buffer size.
+ * @details Specified size of driver ring buffer.
+ * @note Increase buffer size if needed.
+ */
+#define GSM3_RX_DRV_BUFFER_SIZE 256
+#define GSM3_TX_DRV_BUFFER_SIZE 256
+
+/*! @} */ // gsm3_set
+
+/**
+ * @defgroup gsm3_map GSM 3 MikroBUS Map
+ * @brief MikroBUS pin mapping of GSM 3 Click driver.
+ */
+
+/**
+ * @addtogroup gsm3_map
+ * @{
+ */
+
+/**
+ * @brief MikroBUS pin mapping.
+ * @details Mapping pins of GSM 3 Click to the selected MikroBUS.
+ */
+#define GSM3_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
+ cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
+ cfg.sta = MIKROBUS( mikrobus, MIKROBUS_AN ); \
+ cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
+ cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
+ cfg.pwk = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
+ cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT )
+
+/*! @} */ // gsm3_map
+/*! @} */ // gsm3
+
+/**
+ * @brief GSM 3 Click context object.
+ * @details Context object definition of GSM 3 Click driver.
+ */
+typedef struct
+{
+ // Output pins
+ digital_out_t rst; /**< Reset pin (Active high). */
+ digital_out_t pwk; /**< PWRKEY pin. */
+ digital_out_t rts; /**< UART Request to Send. */
+
+ // Input pins
+ digital_in_t sta; /**< Power on status. */
+ digital_in_t cts; /**< UART Clear to Send. */
+
+ // Modules
+ uart_t uart; /**< UART driver object. */
+
+ // Buffers
+ uint8_t uart_rx_buffer[ GSM3_RX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
+ uint8_t uart_tx_buffer[ GSM3_TX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
+
+} gsm3_t;
+
+/**
+ * @brief GSM 3 Click configuration object.
+ * @details Configuration object definition of GSM 3 Click driver.
+ */
+typedef struct
+{
+ // Communication gpio pins
+ pin_name_t rx_pin; /**< RX pin. */
+ pin_name_t tx_pin; /**< TX pin. */
+
+ // Additional gpio pins
+ pin_name_t rst; /**< Reset pin (Active low). */
+ pin_name_t pwk; /**< PWRKEY pin. */
+ pin_name_t rts; /**< UART Request to Send. */
+ pin_name_t sta; /**< Power on status. */
+ pin_name_t cts; /**< UART Clear to Send. */
+
+ // Static variable
+ uint32_t baud_rate; /**< Clock speed. */
+ bool uart_blocking; /**< Wait for interrupt or not. */
+ uart_data_bits_t data_bit; /**< Data bits. */
+ uart_parity_t parity_bit; /**< Parity bit. */
+ uart_stop_bits_t stop_bit; /**< Stop bits. */
+
+} gsm3_cfg_t;
+
+/**
+ * @brief GSM 3 Click return value data.
+ * @details Predefined enum values for driver return values.
+ */
+typedef enum
+{
+ GSM3_OK = 0,
+ GSM3_ERROR = -1,
+ GSM3_ERROR_TIMEOUT = -2,
+ GSM3_ERROR_CMD = -3,
+ GSM3_ERROR_UNKNOWN = -4
+
+} gsm3_return_value_t;
+
+/*!
+ * @addtogroup gsm3 GSM 3 Click Driver
+ * @brief API for configuring and manipulating GSM 3 Click driver.
+ * @{
+ */
+
+/**
+ * @brief GSM 3 configuration object setup function.
+ * @details This function initializes click configuration structure to initial
+ * values.
+ * @param[out] cfg : Click configuration structure.
+ * See #gsm3_cfg_t object definition for detailed explanation.
+ * @return Nothing.
+ * @note The all used pins will be set to unconnected state.
+ */
+void gsm3_cfg_setup ( gsm3_cfg_t *cfg );
+
+/**
+ * @brief GSM 3 initialization function.
+ * @details This function initializes all necessary pins and peripherals used
+ * for this click board.
+ * @param[out] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @param[in] cfg : Click configuration structure.
+ * See #gsm3_cfg_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm3_init ( gsm3_t *ctx, gsm3_cfg_t *cfg );
+
+/**
+ * @brief GSM 3 data writing function.
+ * @details This function writes a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @param[in] data_in : Data buffer for sending.
+ * @param[in] len : Number of bytes for sending.
+ * @return @li @c >=0 - Success,
+ * @li @c <0 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm3_generic_write ( gsm3_t *ctx, uint8_t *data_in, uint16_t len );
+
+/**
+ * @brief GSM 3 data reading function.
+ * @details This function reads a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @param[out] data_out : Output read data.
+ * @param[in] len : Number of bytes to be read.
+ * @return @li @c >0 - Number of data bytes read,
+ * @li @c <=0 - Error/Empty Ring buffer.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm3_generic_read ( gsm3_t *ctx, uint8_t *data_out, uint16_t len );
+
+/**
+ * @brief GSM 3 set rst pin function.
+ * @details This function sets the RESET pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @param[in] state : Pin logic state.
+ * @return None.
+ * @note None.
+ */
+void gsm3_set_rst_pin ( gsm3_t *ctx, uint8_t state );
+
+/**
+ * @brief GSM 3 set rts pin function.
+ * @details This function sets the Request to Send (RTS) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @param[in] state : Pin logic state.
+ * @return None.
+ * @note None.
+ */
+void gsm3_set_rts_pin ( gsm3_t *ctx, uint8_t state );
+
+/**
+ * @brief GSM 3 set pwk pin function.
+ * @details This function sets the PWRKEY pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @param[in] state : Pin logic state.
+ * @return None.
+ * @note None.
+ */
+void gsm3_set_pwk_pin ( gsm3_t *ctx, uint8_t state );
+
+/**
+ * @brief GSM 3 get cts pin function.
+ * @details This function returns the Clear to Send (CTS) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
+ */
+uint8_t gsm3_get_cts_pin ( gsm3_t *ctx );
+
+/**
+ * @brief GSM 3 get sta pin function.
+ * @details This function returns the status (STA) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
+ */
+uint8_t gsm3_get_sta_pin ( gsm3_t *ctx );
+
+/**
+ * @brief Send command function.
+ * @details This function sends a specified command to the click module.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @param[in] cmd : Command variable.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm3_send_cmd ( gsm3_t *ctx, uint8_t *cmd );
+
+/**
+ * @brief Send command function with parameter.
+ * @details This function sends a command with specified parameter to the click module.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @param[in] param_buf : Parameter buffer.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm3_send_cmd_with_par ( gsm3_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf );
+
+/**
+ * @brief Check the sent command.
+ * @details This function checks the command that is sent.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm3_send_cmd_check ( gsm3_t *ctx, uint8_t *at_cmd_buf );
+
+/**
+ * @brief Check the command parameters.
+ * @details This function checks the command that is sent.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm3_send_cmd_par_check ( gsm3_t *ctx, uint8_t *at_cmd_buf );
+
+/**
+ * @brief Set sim card APN.
+ * @details This function sets APN for sim card.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @param[in] sim_apn : SIM card APN.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm3_set_sim_apn ( gsm3_t *ctx, uint8_t *sim_apn );
+
+/**
+ * @brief GSM 3 send SMS in text mode.
+ * @details This function sends text message to a phone number.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @param[in] phone_number : Phone number to message.
+ * @param[in] sms_text : Message to be sent.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm3_send_sms_text ( gsm3_t *ctx, uint8_t *phone_number, uint8_t *sms_text );
+
+/**
+ * @brief GSM 3 send SMS in PDU mode.
+ * @details This function sends text message to a phone number in PDU mode.
+ * @param[in] ctx : Click context object.
+ * See #gsm3_t object definition for detailed explanation.
+ * @param[in] service_center_number : SMSC of the SIM card.
+ * @param[in] phone_number : Phone number to message.
+ * @param[in] sms_text : Message to be sent.
+ * @return @li @c >=0 - Success,
+ * @li @c <0 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm3_send_sms_pdu ( gsm3_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // GSM3_H
+
+/*! @} */ // gsm3
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/gsm3/lib_gsm3/src/gsm3.c b/clicks/gsm3/lib_gsm3/src/gsm3.c
new file mode 100644
index 0000000000..f5fcaadbe6
--- /dev/null
+++ b/clicks/gsm3/lib_gsm3/src/gsm3.c
@@ -0,0 +1,493 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file gsm3.c
+ * @brief GSM 3 Click Driver.
+ */
+
+#include "gsm3.h"
+#include "conversions.h"
+#include "generic_pointer.h"
+
+/**
+ * @brief PDU macros.
+ * @details Predefined PDU macros for driver use.
+ */
+#define BITMASK_7BITS 0x7F
+#define BITMASK_8BITS 0xFF
+#define BITMASK_HIGH_4BITS 0xF0
+#define BITMASK_LOW_4BITS 0x0F
+#define TYPE_OF_ADDRESS_INTERNATIONAL_PHONE 0x91
+#define TYPE_OF_ADDRESS_NATIONAL_SUBSCRIBER 0xC8
+#define SMS_DELIVER_ONE_MESSAGE 0x04
+#define SMS_DELIVER_ONE_MESSAGE 0x04
+#define SMS_SUBMIT 0x11
+#define SMS_MAX_7BIT_TEXT_LENGTH 160
+#define SMS_MAX_PDU_LENGTH 256
+
+/**
+ * @brief Encode message for PDU mode.
+ * @details Encode message for PDU mode and outputs
+ * the encoded message into output buffer.
+ * @param[in] service_center_number : Service center of devices SIM.
+ * @param[in] phone_number : Phone number to send message to.
+ * @param[in] sms_text : SMS text.
+ * @param[out] output_buffer : Output PDU encoded message.
+ * @param[in] buffer_size : Output buffer size.
+ * @return @li @c >=0 - Length of the SMS encoded message,
+ * @li @c <0 - Error.
+ */
+static int16_t pdu_encode ( uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text,
+ uint8_t *output_buffer, uint16_t buffer_size );
+
+/**
+ * @brief Swap decimal digits of a number.
+ * @details Swap decimal digits of a number (e.g. 12 -> 21).
+ * @param[in] x : Decimal number to swap digits.
+ * @return Swapped decimal number.
+ */
+static uint8_t swap_decimal_nibble ( uint8_t x );
+
+/**
+ * @brief Encode text content for PDU mode.
+ * @details Encode text content for PDU mode and
+ * outputs the encoded message into output buffer.
+ * @param[in] sms_text : Sms text content to encode
+ * @param[in] sms_text_length : Length of the text message.
+ * @param[out] output_buffer : Output PDU encoded text message.
+ * @param[in] buffer_size : Output buffer size.
+ * @return @li @c >=0 - Length of the enccoded text messages,
+ * @li @c <0 - Error.
+ */
+static int16_t encode_pdu_message ( uint8_t *sms_text, int16_t sms_text_length,
+ uint8_t *output_buffer, uint16_t buffer_size );
+
+/**
+ * @brief Encode phone number for PDU mode.
+ * @details Encode phone number for PDU mode and
+ * outputs the encoded message into output buffer.
+ * @param[in] phone_number : Phone number to send message to.
+ * @param[out] output_buffer : Output PDU encoded message.
+ * @param[in] buffer_size : Output buffer size.
+ * @return @li @c >=0 - Length of the SMS encoded message,
+ * @li @c <0 - Error.
+ */
+static int16_t encode_phone_number ( uint8_t *phone_number, uint8_t *output_buffer, uint16_t buffer_size );
+
+/**
+ * @brief GSM 3 str cut chr function.
+ * @details This function removes all selected characters from string str,
+ * and returns it to the same str without those characters.
+ * @param str Address of string.
+ * @param chr Character to cut.
+ */
+static void gsm3_str_cut_chr ( uint8_t *str, uint8_t chr );
+
+void gsm3_cfg_setup ( gsm3_cfg_t *cfg )
+{
+ // Communication gpio pins
+ cfg->rx_pin = HAL_PIN_NC;
+ cfg->tx_pin = HAL_PIN_NC;
+
+ // Additional gpio pins
+ cfg->rst = HAL_PIN_NC;
+ cfg->rts = HAL_PIN_NC;
+ cfg->pwk = HAL_PIN_NC;
+ cfg->sta = HAL_PIN_NC;
+ cfg->cts = HAL_PIN_NC;
+
+ cfg->baud_rate = 9600;
+ cfg->data_bit = UART_DATA_BITS_DEFAULT;
+ cfg->parity_bit = UART_PARITY_DEFAULT;
+ cfg->stop_bit = UART_STOP_BITS_DEFAULT;
+ cfg->uart_blocking = false;
+}
+
+err_t gsm3_init ( gsm3_t *ctx, gsm3_cfg_t *cfg )
+{
+ uart_config_t uart_cfg;
+
+ // Default config
+ uart_configure_default( &uart_cfg );
+
+ // Ring buffer mapping
+ ctx->uart.tx_ring_buffer = ctx->uart_tx_buffer;
+ ctx->uart.rx_ring_buffer = ctx->uart_rx_buffer;
+
+ // UART module config
+ uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
+ uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
+ uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
+ uart_cfg.rx_ring_size = sizeof( ctx->uart_rx_buffer );
+
+ if ( UART_ERROR == uart_open( &ctx->uart, &uart_cfg ) )
+ {
+ return UART_ERROR;
+ }
+ uart_set_baud( &ctx->uart, cfg->baud_rate );
+ uart_set_parity( &ctx->uart, cfg->parity_bit );
+ uart_set_stop_bits( &ctx->uart, cfg->stop_bit );
+ uart_set_data_bits( &ctx->uart, cfg->data_bit );
+
+ uart_set_blocking( &ctx->uart, cfg->uart_blocking );
+
+ // Output pins
+ digital_out_init( &ctx->rst, cfg->rst );
+ digital_out_init( &ctx->rts, cfg->rts );
+ digital_out_init( &ctx->pwk, cfg->pwk );
+
+ // Input pins
+ digital_in_init( &ctx->sta, cfg->sta );
+ digital_in_init( &ctx->cts, cfg->cts );
+
+ digital_out_low ( &ctx->pwk );
+ digital_out_low ( &ctx->rst );
+ Delay_1sec ( );
+ while ( !gsm3_get_sta_pin ( ctx ) )
+ {
+ digital_out_high ( &ctx->pwk );
+ Delay_1sec ( );
+ Delay_100ms ( );
+ Delay_100ms ( );
+ digital_out_low ( &ctx->pwk );
+ Delay_1sec ( );
+ Delay_1sec ( );
+ Delay_1sec ( );
+ }
+
+ return UART_SUCCESS;
+}
+
+err_t gsm3_generic_write ( gsm3_t *ctx, uint8_t *data_in, uint16_t len )
+{
+ return uart_write( &ctx->uart, data_in, len );
+}
+
+err_t gsm3_generic_read ( gsm3_t *ctx, uint8_t *data_out, uint16_t len )
+{
+ return uart_read( &ctx->uart, data_out, len );
+}
+
+void gsm3_set_rst_pin ( gsm3_t *ctx, uint8_t state )
+{
+ digital_out_write( &ctx->rst, state );
+}
+
+void gsm3_set_rts_pin ( gsm3_t *ctx, uint8_t state )
+{
+ digital_out_write( &ctx->rts, state );
+}
+
+void gsm3_set_pwk_pin ( gsm3_t *ctx, uint8_t state )
+{
+ digital_out_write( &ctx->pwk, state );
+}
+
+uint8_t gsm3_get_sta_pin ( gsm3_t *ctx )
+{
+ return digital_in_read( &ctx->sta );
+}
+
+uint8_t gsm3_get_cts_pin ( gsm3_t *ctx )
+{
+ return digital_in_read( &ctx->cts );
+}
+
+void gsm3_send_cmd ( gsm3_t *ctx, uint8_t *cmd )
+{
+ uint8_t carriage_return = 13;
+ while ( *cmd != 0 )
+ {
+ uart_write( &ctx->uart, cmd, 1 );
+ cmd++;
+ }
+ uart_write( &ctx->uart, &carriage_return, 1 );
+ Delay_100ms( );
+}
+
+void gsm3_send_cmd_with_par ( gsm3_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t check_char[ 2 ] = { '=', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, check_char );
+ strcat( final_cmd, param_buf );
+
+ gsm3_send_cmd( ctx, final_cmd );
+}
+
+void gsm3_send_cmd_check ( gsm3_t *ctx, uint8_t *at_cmd_buf )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t check_char[ 2 ] = { '?', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, check_char );
+
+ gsm3_send_cmd( ctx, final_cmd );
+}
+
+void gsm3_send_cmd_par_check ( gsm3_t *ctx, uint8_t *at_cmd_buf )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t check_char[ 3 ] = { '=' , '?', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, check_char );
+
+ gsm3_send_cmd( ctx, final_cmd );
+}
+
+void gsm3_set_sim_apn ( gsm3_t *ctx, uint8_t *sim_apn )
+{
+ uint8_t final_cmd[ 50 ] = "1,\"IP\",\"";
+ uint8_t end_cmd[ 3 ] = "\"";
+
+ strcat( final_cmd, sim_apn );
+ strcat( final_cmd, end_cmd );
+
+ gsm3_send_cmd_with_par( ctx, GSM3_CMD_CGDCONT, final_cmd );
+}
+
+void gsm3_send_sms_text ( gsm3_t *ctx, uint8_t *phone_number, uint8_t *sms_text )
+{
+ uint8_t text[ 200 ] = { 0 };
+ uint8_t cmd_start[ ] = "=\"";
+ uint8_t cmd_end[ ] = "\"\r";
+ uint8_t txt_end[ ] = "\032";
+
+ strcpy( text, GSM3_CMD_CMGS );
+ strcat( text, cmd_start );
+ strcat( text, phone_number );
+ strcat( text, cmd_end );
+
+ gsm3_send_cmd( ctx, text );
+ memset( text, 0, sizeof ( text ) );
+
+ strcpy( text, sms_text );
+ strcat( text, txt_end );
+ gsm3_send_cmd( ctx, text );
+}
+
+err_t gsm3_send_sms_pdu ( gsm3_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text )
+{
+ uint8_t text[ SMS_MAX_PDU_LENGTH ] = { 0 };
+ uint8_t pdu_buf[ SMS_MAX_PDU_LENGTH ] = { 0 };
+ uint8_t byte_buf[ 4 ] = { 0 };
+ uint8_t ctrl_z[ 2 ] = { 26, 0 };
+ int16_t pdu_buf_len = 0;
+ uint8_t length = 0;
+ uint8_t smsc[ 32 ] = { 0 };
+ uint8_t phone_num[ 32 ] = { 0 };
+ strcpy ( smsc, service_center_number );
+ strcpy ( phone_num, phone_number );
+ gsm3_str_cut_chr ( smsc, '+' );
+ gsm3_str_cut_chr ( phone_num, '+' );
+
+ pdu_buf_len = pdu_encode( smsc, phone_num, sms_text, pdu_buf, SMS_MAX_PDU_LENGTH );
+
+ if ( pdu_buf_len < 0 )
+ {
+ return GSM3_ERROR;
+ }
+
+ length = pdu_buf_len - ( ( strlen( smsc ) - 1 ) / 2 + 3 );
+ uint8_to_str( length, byte_buf );
+ gsm3_str_cut_chr ( byte_buf, ' ' );
+
+ strcpy( text, GSM3_CMD_CMGS );
+ strcat( text, "=" );
+ strcat( text, byte_buf );
+
+ gsm3_send_cmd( ctx, text );
+ memset( text, 0, SMS_MAX_PDU_LENGTH );
+
+ for ( int16_t cnt = 0; cnt < pdu_buf_len; cnt++ )
+ {
+ uint8_to_hex ( pdu_buf[ cnt ], byte_buf );
+ strcat ( text, byte_buf );
+ }
+ strcat( text, ctrl_z );
+
+ gsm3_send_cmd( ctx, text );
+
+ return GSM3_OK;
+}
+
+static int16_t pdu_encode ( uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text,
+ uint8_t *output_buffer, uint16_t buffer_size )
+{
+ if ( buffer_size < 2 )
+ {
+ return GSM3_ERROR;
+ }
+
+ int16_t output_buffer_length = 0;
+
+ // 1. Set SMS center number.
+ int16_t length = 0;
+ if ( ( service_center_number != 0 ) && ( strlen ( service_center_number ) > 0 ) )
+ {
+ output_buffer[ 1 ] = TYPE_OF_ADDRESS_INTERNATIONAL_PHONE; // Add type of address.
+ length = encode_phone_number( service_center_number, output_buffer + 2, buffer_size - 2 );
+ if ( length < 0 && length >= 254 )
+ {
+ return GSM3_ERROR;
+ }
+ length++;
+ }
+ output_buffer[ 0 ] = length;
+ output_buffer_length = length + 1;
+ if ( output_buffer_length + 4 > buffer_size )
+ {
+ return GSM3_ERROR; // Check if it has space for four more bytes.
+ }
+
+ // 2. Set type of message.
+ output_buffer[ output_buffer_length++ ] = SMS_SUBMIT;
+ output_buffer[ output_buffer_length++ ] = 0x00; // Message reference.
+
+ // 3. Set phone number.
+ output_buffer[ output_buffer_length ] = strlen( phone_number );
+ output_buffer[ output_buffer_length + 1 ] = TYPE_OF_ADDRESS_INTERNATIONAL_PHONE;
+ length = encode_phone_number( phone_number, output_buffer + output_buffer_length + 2,
+ buffer_size - output_buffer_length - 2);
+ output_buffer_length += length + 2;
+ if ( output_buffer_length + 4 > buffer_size )
+ {
+ return GSM3_ERROR; // Check if it has space for four more bytes.
+ }
+
+ // 4. Protocol identifiers.
+ output_buffer[ output_buffer_length++ ] = 0x00; // TP-PID: Protocol identifier.
+ output_buffer[ output_buffer_length++ ] = 0x00; // TP-DCS: Data coding scheme.
+ output_buffer[ output_buffer_length++ ] = 0xB0; // TP-VP: Validity: 10 days
+
+ // 5. SMS message.
+ int16_t sms_text_length = strlen( sms_text );
+ if ( sms_text_length > SMS_MAX_7BIT_TEXT_LENGTH )
+ {
+ return GSM3_ERROR;
+ }
+ output_buffer[ output_buffer_length++ ] = sms_text_length;
+ length = encode_pdu_message( sms_text, sms_text_length, output_buffer + output_buffer_length,
+ buffer_size - output_buffer_length );
+ if ( length < 0 )
+ {
+ return GSM3_ERROR;
+ }
+ output_buffer_length += length;
+
+ return output_buffer_length;
+}
+
+static uint8_t swap_decimal_nibble ( uint8_t x )
+{
+ return ( x / 16 ) + ( ( x % 16 ) * 10 );
+}
+
+static int16_t encode_pdu_message ( uint8_t *sms_text, int16_t sms_text_length,
+ uint8_t *output_buffer, uint16_t buffer_size )
+{
+ // Check if output buffer is big enough.
+ if ( ( sms_text_length * 7 + 7 ) / 8 > buffer_size )
+ {
+ return GSM3_ERROR;
+ }
+
+ int16_t output_buffer_length = 0;
+ int16_t carry_on_bits = 1;
+ int16_t i = 0;
+
+ for ( ; i < sms_text_length - 1; ++i )
+ {
+ output_buffer[ output_buffer_length++ ] =
+ ( ( sms_text[ i ] & BITMASK_7BITS ) >> ( carry_on_bits - 1 ) ) |
+ ( ( sms_text[ i + 1 ] & BITMASK_7BITS ) << ( 8 - carry_on_bits ) );
+ carry_on_bits++;
+ if ( carry_on_bits == 8 )
+ {
+ carry_on_bits = 1;
+ ++i;
+ }
+ }
+
+ if ( i < sms_text_length )
+ {
+ output_buffer[ output_buffer_length++ ] = ( sms_text[ i ] & BITMASK_7BITS ) >> ( carry_on_bits - 1 );
+ }
+
+ return output_buffer_length;
+}
+
+static int16_t encode_phone_number ( uint8_t *phone_number, uint8_t *output_buffer, uint16_t buffer_size )
+{
+ int16_t output_buffer_length = 0;
+ int16_t phone_number_length = strlen( phone_number );
+
+ // Check if the output buffer is big enough.
+ if ( ( phone_number_length + 1 ) / 2 > buffer_size )
+ {
+ return GSM3_ERROR;
+ }
+
+ int16_t i = 0;
+ for ( ; i < phone_number_length; ++i )
+ {
+ if ( phone_number[ i ] < '0' && phone_number[ i ] > '9' )
+ {
+ return GSM3_ERROR;
+ }
+
+ if ( i % 2 == 0 )
+ {
+ output_buffer[ output_buffer_length++ ] = BITMASK_HIGH_4BITS | ( phone_number[ i ] - '0' );
+ }
+ else
+ {
+ output_buffer[ output_buffer_length - 1 ] =
+ ( output_buffer[ output_buffer_length - 1 ] & BITMASK_LOW_4BITS ) |
+ ( ( phone_number[ i ] - '0' ) << 4 );
+ }
+ }
+
+ return output_buffer_length;
+}
+
+static void gsm3_str_cut_chr ( uint8_t *str, uint8_t chr )
+{
+ uint16_t cnt_0, cnt_1;
+ for ( cnt_0 = 0; cnt_0 < strlen( str ); cnt_0++ )
+ {
+ if ( str[ cnt_0 ] == chr )
+ {
+ for ( cnt_1 = cnt_0; cnt_1 < strlen( str ); cnt_1++ )
+ {
+ str[ cnt_1 ] = str[ cnt_1 + 1 ];
+ }
+ }
+ }
+}
+
+// ------------------------------------------------------------------------- END
diff --git a/clicks/gsm3/memake.txt b/clicks/gsm3/memake.txt
deleted file mode 100644
index 81c4a56944..0000000000
--- a/clicks/gsm3/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Gsm3
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/gsm4/CHANGELOG.md b/clicks/gsm4/CHANGELOG.md
index 9998abf763..283ee8b874 100644
--- a/clicks/gsm4/CHANGELOG.md
+++ b/clicks/gsm4/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.12
+### Version 2.1.0.0
- Initial release
diff --git a/clicks/gsm4/CMakeLists.txt b/clicks/gsm4/CMakeLists.txt
new file mode 100644
index 0000000000..099fdcb42c
--- /dev/null
+++ b/clicks/gsm4/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_gsm4 LANGUAGES MikroC)
+else()
+ project(example_gsm4 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_gsm4
+ example/main.c
+
+)
+
+
+############################ example_gsm4 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_gsm4 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_gsm4 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_gsm4 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_gsm4)
+target_link_libraries(example_gsm4 PUBLIC Click.GSM4)
+############################ example_gsm4 GENERATED CODE END ###########################
diff --git a/clicks/gsm4/DETAILS.md b/clicks/gsm4/DETAILS.md
index 34bb684422..28ab53c5d1 100644
--- a/clicks/gsm4/DETAILS.md
+++ b/clicks/gsm4/DETAILS.md
@@ -1,7 +1,8 @@
+---
# GSM 4 click
-GSM 4 click is a compact quad-band GSM cellular network communication solution, featuring the quad-band 2.5G GSM/GPRS SARA-G350 module.
+> GSM 4 click is a compact quad-band GSM cellular network communication solution, featuring the quad-band 2.5G GSM/GPRS SARA-G350 module. This module features a full set of options for the cellular networking and communication, such as the network status indication, jamming detection, embedded internet protocols, including TCP/IP, UDP, FTP, PPP, HTTP, SMTP, full GPRS multislot class 10 implementation, and more. Data communication speed is rated up to 42.8 for the uplink and 85.6 kbps for downlink connection.
@@ -12,138 +13,200 @@ GSM 4 click is a compact quad-band GSM cellular network communication solution,
---
-#### Click library
+#### Click library
-- **Author** : MikroE Team
-- **Date** : Apr 2020.
-- **Type** : UART GPS/GNSS type
+- **Author** : Stefan Filipovic
+- **Date** : May 2023.
+- **Type** : UART type
# Software Support
-We provide a library for the Gsm4 Click
-as well as a demo application (example), developed using MikroElektronika
-[compilers](https://shop.mikroe.com/compilers).
-The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
+We provide a library for the GSM4 Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
-Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
## Library Description
-> This library contains API for Gsm4 Click driver.
+> This library contains API for GSM4 Click driver.
#### Standard key functions :
-- Config Object Initialization function.
-> void gsm4_cfg_setup ( gsm4_cfg_t *cfg );
-
-- Initialization function.
-> GSM4_RETVAL gsm4_init ( gsm4_t *ctx, gsm4_cfg_t *cfg );
+- `gsm4_cfg_setup` Config Object Initialization function.
+```c
+void gsm4_cfg_setup ( gsm4_cfg_t *cfg );
+```
+
+- `gsm4_init` Initialization function.
+```c
+err_t gsm4_init ( gsm4_t *ctx, gsm4_cfg_t *cfg );
+```
#### Example key functions :
-- Enables or disables module power.
-> void gsm4_module_power( gsm4_t *ctx );
-
-- Reset module.
-> void gsm4_reset ( gsm4_t *ctx );
+- `gsm4_set_sim_apn` This function sets APN for sim card.
+```c
+void gsm4_set_sim_apn ( gsm4_t *ctx, uint8_t *sim_apn );
+```
+
+- `gsm4_send_sms_text` This function sends text message to a phone number.
+```c
+void gsm4_send_sms_text ( gsm4_t *ctx, uint8_t *phone_number, uint8_t *sms_text );
+```
+
+- `gsm4_send_sms_pdu` This function sends text message to a phone number in PDU mode.
+```c
+err_t gsm4_send_sms_pdu ( gsm4_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text );
+```
-- Command function.
-> void gsm4_send_command ( gsm4_t *ctx, char *command );
+## Example Description
-## Examples Description
-
-> This example reads and processes data from GSM 4 clicks.
+> Application example shows device capability of connecting to the network and sending SMS or TCP/UDP messages using standard "AT" commands.
**The demo application is composed of two sections :**
-### Application Init
+### Application Init
-> Initializes driver and wake-up module.
+> Initializes the driver, tests the communication by sending "AT" command, and after that restarts the device.
```c
-void application_init ( void )
+void application_init ( void )
{
- log_cfg_t log_cfg;
- gsm4_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ gsm4_cfg_t gsm4_cfg; /**< Click config object. */
- /**
+ /**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
- * @note If USB_UART_RX and USB_UART_TX
- * are defined as HAL_PIN_NC, you will
- * need to define them manually for log to work.
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- gsm4_cfg_setup( &cfg );
- GSM4_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- gsm4_init( &gsm4, &cfg );
-
- gsm4_module_power( &gsm4 );
-
- gsm4_process( );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ gsm4_cfg_setup( &gsm4_cfg );
+ GSM4_MAP_MIKROBUS( gsm4_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == gsm4_init( &gsm4, &gsm4_cfg ) )
+ {
+ log_error( &logger, " Application Init Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
- gsm4_send_command( &gsm4, GSM4_SINGLE_CMD_AT );
- gsm4_process( );
-
- gsm4_send_command( &gsm4, GSM4_SINGLE_CMD_AT );
- gsm4_process( );
-
- gsm4_send_command( &gsm4, GSM4_SINGLE_CMD_AT );
- gsm4_process( );
-
- gsm4_send_command( &gsm4, GSM4_SINGLE_CMD_ATE0 );
- gsm4_process( );
+ gsm4_process( );
+ gsm4_clear_app_buf( );
- gsm4_send_command( &gsm4, "AT+IFC=2,2" );
- gsm4_process( );
-
- gsm4_send_command( &gsm4, "AT+CMGF=1" );
- gsm4_process( );
-
- Delay_ms( 2000 );
+ // Check communication
+ gsm4_send_cmd( &gsm4, GSM4_CMD_AT );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ gsm4_error_check( error_flag );
+
+ // Restart device
+ #define RESTART_DEVICE "1,1"
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_CFUN, RESTART_DEVICE );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ gsm4_error_check( error_flag );
+
+ log_info( &logger, " Application Task " );
+ example_state = GSM4_CONFIGURE_FOR_NETWORK;
}
-
+
```
### Application Task
-> Reads the received data and parses it.
+> Application task is split in few stages:
+ - GSM4_CONFIGURE_FOR_NETWORK:
+ > Sets configuration to device to be able to connect to the network.
+ - GSM4_WAIT_FOR_CONNECTION:
+ > Waits for the network registration indicated via CREG URC event and then checks the connection status.
+ - GSM4_CONFIGURE_FOR_EXAMPLE:
+ > Sets the device configuration for sending SMS or TCP/UDP messages depending on the selected demo example.
+ - GSM4_EXAMPLE:
+ > Depending on the selected demo example, it sends an SMS message (in PDU or TXT mode) or TCP/UDP message.
+> By default, the TCP/UDP example is selected.
```c
-void application_task ( void )
+void application_task ( void )
{
- gsm4_process( );
-}
+ switch ( example_state )
+ {
+ case GSM4_CONFIGURE_FOR_NETWORK:
+ {
+ if ( GSM4_OK == gsm4_configure_for_network( ) )
+ {
+ example_state = GSM4_WAIT_FOR_CONNECTION;
+ }
+ break;
+ }
+ case GSM4_WAIT_FOR_CONNECTION:
+ {
+ if ( GSM4_OK == gsm4_check_connection( ) )
+ {
+ example_state = GSM4_CONFIGURE_FOR_EXAMPLE;
+ }
+ break;
+ }
+ case GSM4_CONFIGURE_FOR_EXAMPLE:
+ {
+ if ( GSM4_OK == gsm4_configure_for_example( ) )
+ {
+ example_state = GSM4_EXAMPLE;
+ }
+ break;
+ }
+ case GSM4_EXAMPLE:
+ {
+ gsm4_example( );
+ break;
+ }
+ default:
+ {
+ log_error( &logger, " Example state." );
+ break;
+ }
+ }
+}
```
-The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
+## Note
+
+> In order for the examples to work, user needs to set the APN and SMSC (SMS PDU mode only)
+of entered SIM card as well as the phone number (SMS mode only) to which he wants to send an SMS.
+Enter valid values for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE.
+> > Example:
+> > - SIM_APN "internet"
+> > - SIM_SMSC "+381610401"
+> > - PHONE_NUMBER_TO_MESSAGE "+381659999999"
+
-**Other mikroE Libraries used in the example:**
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
- MikroSDK.Board
- MikroSDK.Log
-- Click.Gsm4
+- Click.GSM4
**Additional notes and informations**
-Depending on the development board you are using, you may need
-[USB UART click](https://shop.mikroe.com/usb-uart-click),
-[USB UART 2 Click](https://shop.mikroe.com/usb-uart-2-click) or
-[RS232 Click](https://shop.mikroe.com/rs232-click) to connect to your PC, for
-development systems with no UART to USB interface available on the board. The
-terminal available in all Mikroelektronika
-[compilers](https://shop.mikroe.com/compilers), or any other terminal application
-of your choice, can be used to read the message.
-
-
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
---
diff --git a/clicks/gsm4/README.md b/clicks/gsm4/README.md
index 623f513af7..7f0d32cfd2 100644
--- a/clicks/gsm4/README.md
+++ b/clicks/gsm4/README.md
@@ -1,9 +1,9 @@
\mainpage Main Page
-
+
---
# GSM 4 click
-GSM 4 click is a compact quad-band GSM cellular network communication solution, featuring the quad-band 2.5G GSM/GPRS SARA-G350 module.
+> GSM 4 click is a compact quad-band GSM cellular network communication solution, featuring the quad-band 2.5G GSM/GPRS SARA-G350 module. This module features a full set of options for the cellular networking and communication, such as the network status indication, jamming detection, embedded internet protocols, including TCP/IP, UDP, FTP, PPP, HTTP, SMTP, full GPRS multislot class 10 implementation, and more. Data communication speed is rated up to 42.8 for the uplink and 85.6 kbps for downlink connection.
@@ -14,138 +14,200 @@ GSM 4 click is a compact quad-band GSM cellular network communication solution,
---
-#### Click library
+#### Click library
-- **Author** : MikroE Team
-- **Date** : Apr 2020.
-- **Type** : UART GPS/GNSS type
+- **Author** : Stefan Filipovic
+- **Date** : May 2023.
+- **Type** : UART type
# Software Support
-We provide a library for the Gsm4 Click
-as well as a demo application (example), developed using MikroElektronika
-[compilers](https://shop.mikroe.com/compilers).
-The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
+We provide a library for the GSM4 Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
-Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
## Library Description
-> This library contains API for Gsm4 Click driver.
+> This library contains API for GSM4 Click driver.
#### Standard key functions :
-- Config Object Initialization function.
-> void gsm4_cfg_setup ( gsm4_cfg_t *cfg );
-
-- Initialization function.
-> GSM4_RETVAL gsm4_init ( gsm4_t *ctx, gsm4_cfg_t *cfg );
+- `gsm4_cfg_setup` Config Object Initialization function.
+```c
+void gsm4_cfg_setup ( gsm4_cfg_t *cfg );
+```
+
+- `gsm4_init` Initialization function.
+```c
+err_t gsm4_init ( gsm4_t *ctx, gsm4_cfg_t *cfg );
+```
#### Example key functions :
-- Enables or disables module power.
-> void gsm4_module_power( gsm4_t *ctx );
-
-- Reset module.
-> void gsm4_reset ( gsm4_t *ctx );
+- `gsm4_set_sim_apn` This function sets APN for sim card.
+```c
+void gsm4_set_sim_apn ( gsm4_t *ctx, uint8_t *sim_apn );
+```
+
+- `gsm4_send_sms_text` This function sends text message to a phone number.
+```c
+void gsm4_send_sms_text ( gsm4_t *ctx, uint8_t *phone_number, uint8_t *sms_text );
+```
+
+- `gsm4_send_sms_pdu` This function sends text message to a phone number in PDU mode.
+```c
+err_t gsm4_send_sms_pdu ( gsm4_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text );
+```
-- Command function.
-> void gsm4_send_command ( gsm4_t *ctx, char *command );
+## Example Description
-## Examples Description
-
-> This example reads and processes data from GSM 4 clicks.
+> Application example shows device capability of connecting to the network and sending SMS or TCP/UDP messages using standard "AT" commands.
**The demo application is composed of two sections :**
-### Application Init
+### Application Init
-> Initializes driver and wake-up module.
+> Initializes the driver, tests the communication by sending "AT" command, and after that restarts the device.
```c
-void application_init ( void )
+void application_init ( void )
{
- log_cfg_t log_cfg;
- gsm4_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ gsm4_cfg_t gsm4_cfg; /**< Click config object. */
- /**
+ /**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
- * @note If USB_UART_RX and USB_UART_TX
- * are defined as HAL_PIN_NC, you will
- * need to define them manually for log to work.
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- gsm4_cfg_setup( &cfg );
- GSM4_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- gsm4_init( &gsm4, &cfg );
-
- gsm4_module_power( &gsm4 );
-
- gsm4_process( );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ gsm4_cfg_setup( &gsm4_cfg );
+ GSM4_MAP_MIKROBUS( gsm4_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == gsm4_init( &gsm4, &gsm4_cfg ) )
+ {
+ log_error( &logger, " Application Init Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
- gsm4_send_command( &gsm4, GSM4_SINGLE_CMD_AT );
- gsm4_process( );
-
- gsm4_send_command( &gsm4, GSM4_SINGLE_CMD_AT );
- gsm4_process( );
-
- gsm4_send_command( &gsm4, GSM4_SINGLE_CMD_AT );
- gsm4_process( );
-
- gsm4_send_command( &gsm4, GSM4_SINGLE_CMD_ATE0 );
- gsm4_process( );
+ gsm4_process( );
+ gsm4_clear_app_buf( );
- gsm4_send_command( &gsm4, "AT+IFC=2,2" );
- gsm4_process( );
-
- gsm4_send_command( &gsm4, "AT+CMGF=1" );
- gsm4_process( );
-
- Delay_ms( 2000 );
+ // Check communication
+ gsm4_send_cmd( &gsm4, GSM4_CMD_AT );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ gsm4_error_check( error_flag );
+
+ // Restart device
+ #define RESTART_DEVICE "1,1"
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_CFUN, RESTART_DEVICE );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ gsm4_error_check( error_flag );
+
+ log_info( &logger, " Application Task " );
+ example_state = GSM4_CONFIGURE_FOR_NETWORK;
}
-
+
```
### Application Task
-> Reads the received data and parses it.
+> Application task is split in few stages:
+ - GSM4_CONFIGURE_FOR_NETWORK:
+ > Sets configuration to device to be able to connect to the network.
+ - GSM4_WAIT_FOR_CONNECTION:
+ > Waits for the network registration indicated via CREG URC event and then checks the connection status.
+ - GSM4_CONFIGURE_FOR_EXAMPLE:
+ > Sets the device configuration for sending SMS or TCP/UDP messages depending on the selected demo example.
+ - GSM4_EXAMPLE:
+ > Depending on the selected demo example, it sends an SMS message (in PDU or TXT mode) or TCP/UDP message.
+> By default, the TCP/UDP example is selected.
```c
-void application_task ( void )
+void application_task ( void )
{
- gsm4_process( );
-}
+ switch ( example_state )
+ {
+ case GSM4_CONFIGURE_FOR_NETWORK:
+ {
+ if ( GSM4_OK == gsm4_configure_for_network( ) )
+ {
+ example_state = GSM4_WAIT_FOR_CONNECTION;
+ }
+ break;
+ }
+ case GSM4_WAIT_FOR_CONNECTION:
+ {
+ if ( GSM4_OK == gsm4_check_connection( ) )
+ {
+ example_state = GSM4_CONFIGURE_FOR_EXAMPLE;
+ }
+ break;
+ }
+ case GSM4_CONFIGURE_FOR_EXAMPLE:
+ {
+ if ( GSM4_OK == gsm4_configure_for_example( ) )
+ {
+ example_state = GSM4_EXAMPLE;
+ }
+ break;
+ }
+ case GSM4_EXAMPLE:
+ {
+ gsm4_example( );
+ break;
+ }
+ default:
+ {
+ log_error( &logger, " Example state." );
+ break;
+ }
+ }
+}
```
-The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
+## Note
+
+> In order for the examples to work, user needs to set the APN and SMSC (SMS PDU mode only)
+of entered SIM card as well as the phone number (SMS mode only) to which he wants to send an SMS.
+Enter valid values for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE.
+> > Example:
+> > - SIM_APN "internet"
+> > - SIM_SMSC "+381610401"
+> > - PHONE_NUMBER_TO_MESSAGE "+381659999999"
+
-**Other mikroE Libraries used in the example:**
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
- MikroSDK.Board
- MikroSDK.Log
-- Click.Gsm4
+- Click.GSM4
**Additional notes and informations**
-Depending on the development board you are using, you may need
-[USB UART click](https://shop.mikroe.com/usb-uart-click),
-[USB UART 2 Click](https://shop.mikroe.com/usb-uart-2-click) or
-[RS232 Click](https://shop.mikroe.com/rs232-click) to connect to your PC, for
-development systems with no UART to USB interface available on the board. The
-terminal available in all Mikroelektronika
-[compilers](https://shop.mikroe.com/compilers), or any other terminal application
-of your choice, can be used to read the message.
-
-
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
---
diff --git a/clicks/gsm4/doc/doxy/Doxyfile.doxy b/clicks/gsm4/doc/doxy/Doxyfile.doxy
index d4e0430342..2d0664af63 100644
--- a/clicks/gsm4/doc/doxy/Doxyfile.doxy
+++ b/clicks/gsm4/doc/doxy/Doxyfile.doxy
@@ -20,7 +20,7 @@
# This tag specifies the encoding used for all characters in the config 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
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
# for the list of possible encodings.
# The default value is: UTF-8.
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/gsm4/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/gsm4/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,11 +291,11 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# 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.
+# documentation. See http://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.
@@ -337,7 +337,7 @@ BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# https://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# http://www.riverbankcomputing.co.uk/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.
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,17 +703,17 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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.
+# to be installed. See also http://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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,14 +790,14 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/gsm4/example \
- ../clicks/gsm4/lib/include \
- ../clicks/gsm4/README.md
+INPUT = ../cmake/gsm4/example \
+ ../cmake/gsm4/lib_gsm4/include \
+ ../cmake/gsm4/README.md
# 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
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
# possible encodings.
# The default value is: UTF-8.
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/gsm4/example
+EXAMPLE_PATH = ../cmake/gsm4/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1047,7 +1047,7 @@ 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
+# (see http://www.gnu.org/software/global/global.html). You will need version
# 4.8.6 or higher.
#
# To use it do the following:
@@ -1075,7 +1075,7 @@ USE_HTAGS = NO
VERBATIM_HEADERS = YES
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
-# clang parser (see: https://clang.llvm.org/) for more accurate parsing at 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.
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,12 +1206,12 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
+# http://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.
@@ -1270,12 +1270,12 @@ 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_NAME.apple.com/tools/xcode/), introduced with
+# environment (see: http://DEVELOPER_NAME.apple.com/tools/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_NAME/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See https://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.html
+# startup. See http://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.html
# for more information.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
@@ -1288,7 +1288,7 @@ GENERATE_DOCSET = NO
# The default value is: Doxygen generated docs.
# This tag requires that the tag GENERATE_DOCSET is set to YES.
-DOCSET_FEEDNAME = "MikroE Click boards"
+DOCSET_FEEDNAME = "Mikroe Click boards"
# This tag specifies a string that should uniquely identify the documentation
# set bundle. This should be a reverse domain-name style string, e.g.
@@ -1315,7 +1315,7 @@ DOCSET_PUBLISHER_NAME = MikroElektronika
# 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
+# (see: http://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
@@ -1328,14 +1328,14 @@ DOCSET_PUBLISHER_NAME = MikroElektronika
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
-GENERATE_HTMLHELP = 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 =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,11 +1387,11 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# (see: http://qt-project.org/doc/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.
@@ -1399,7 +1399,7 @@ QHP_NAMESPACE = org.doxygen.Project
# 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://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
# folders).
# The default value is: doc.
# This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1408,33 +1408,33 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/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://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1529,7 +1529,7 @@ FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# https://www.mathjax.org) which uses client side Javascript for the rendering
+# http://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
@@ -1541,7 +1541,7 @@ 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:
-# https://docs.mathjax.org/en/latest/output.html) for more details.
+# http://docs.mathjax.org/en/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.
@@ -1556,26 +1556,26 @@ MATHJAX_FORMAT = HTML-CSS
# 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.mathjax.org/mathjax/latest.
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
+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 =
+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: https://docs.mathjax.org/en/latest/output.html) for more details. For an
+# (see: http://docs.mathjax.org/en/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 =
+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
@@ -1618,7 +1618,7 @@ SERVER_BASED_SEARCH = NO
#
# 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/).
+# Xapian (see: http://xapian.org/).
#
# See the section "External Indexing and Searching" for details.
# The default value is: NO.
@@ -1631,11 +1631,11 @@ EXTERNAL_SEARCH = NO
#
# 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
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1818,7 +1818,7 @@ 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.
+# http://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.
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2001,7 +2001,7 @@ DOCBOOK_PROGRAMLISTING = NO
#---------------------------------------------------------------------------
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
-# AutoGen Definitions (see https://autogen.sf.net) file that captures the
+# AutoGen Definitions (see http://autogen.sf.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.
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2170,12 +2170,6 @@ EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH = /usr/bin/perl
-
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
@@ -2189,21 +2183,12 @@ PERL_PATH = /usr/bin/perl
CLASS_DIAGRAMS = YES
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# https://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
# 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 =
+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.
@@ -2213,7 +2198,7 @@ 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:
-# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# 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: NO.
@@ -2252,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2368,7 +2353,7 @@ 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:
-# https://www.graphviz.org/)).
+# 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).
@@ -2396,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2479,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/gsm4/doc/package/manifest.json b/clicks/gsm4/doc/package/manifest.json
index a60e2310e9..fb332ec455 100644
--- a/clicks/gsm4/doc/package/manifest.json
+++ b/clicks/gsm4/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "GSM/LTE",
+ "architecture": "ARM|PIC|PIC32|RISC-V",
+ "category": "Click Boards > Wireless connectivity > GSM/LTE",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+ "dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "GSM 4 click",
"example_list": [
@@ -25,15 +24,17 @@
},
"name": "mikroe.click.gsm4",
"product_link": "https://www.mikroe.com/gsm-4-click",
- "short_description": "This example reads and processes data from GSM 4 clicks.",
- "supported_compiler": "mikroC AI",
+ "short_description": "GSM 4 click is a compact quad-band GSM cellular network communication solution, featuring the quad-band 2.5G GSM/GPRS SARA-G350 module. This module features a full set of options for the cellular networking and communication, such as the network status indication, jamming detection, embedded internet protocols, including TCP/IP, UDP, FTP, PPP, HTTP, SMTP, full GPRS multislot class 10 implementation, and more. Data communication speed is rated up to 42.8 for the uplink and 85.6 kbps for downlink connection.",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "related_projects": [
1959
],
- "version": "2.0.0.12"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.0",
+ "cmake": true,
+ "alias": "Click.GSM4",
+ "subdir_name": "lib_gsm4"
}
-
diff --git a/clicks/gsm4/example/CMakeLists.txt b/clicks/gsm4/example/CMakeLists.txt
new file mode 100644
index 0000000000..1ca7066814
--- /dev/null
+++ b/clicks/gsm4/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_gsm4 LANGUAGES MikroC)
+else()
+ project(example_gsm4 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_gsm4
+ main.c
+
+)
+
+
+############################ example_gsm4 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_gsm4 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_gsm4 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_gsm4 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_gsm4)
+target_link_libraries(example_gsm4 PUBLIC Click.GSM4)
+############################ example_gsm4 GENERATED CODE END ###########################
diff --git a/clicks/gsm4/example/main.c b/clicks/gsm4/example/main.c
index 05ef00b911..f0f433bb9d 100644
--- a/clicks/gsm4/example/main.c
+++ b/clicks/gsm4/example/main.c
@@ -1,167 +1,694 @@
/*!
- * \file
- * \brief Gsm4 Click example
- *
+ * @file main.c
+ * @brief GSM 4 Click Example.
+ *
* # Description
- * This example reads and processes data from GSM 4 clicks.
+ * Application example shows device capability of connecting to the network and
+ * sending SMS or TCP/UDP messages using standard "AT" commands.
*
* The demo application is composed of two sections :
- *
- * ## Application Init
- * Initializes driver and wake-up module.
- *
- * ## Application Task
- * Reads the received data and parses it.
- *
+ *
+ * ## Application Init
+ * Initializes the driver, tests the communication by sending "AT" command, and after that restarts the device.
+ *
+ * ## Application Task
+ * Application task is split in few stages:
+ * - GSM4_CONFIGURE_FOR_NETWORK:
+ * Sets configuration to device to be able to connect to the network.
+ *
+ * - GSM4_WAIT_FOR_CONNECTION:
+ * Waits for the network registration indicated via CREG URC event and then checks
+ * the connection status.
+ *
+ * - GSM4_CONFIGURE_FOR_EXAMPLE:
+ * Sets the device configuration for sending SMS or TCP/UDP messages depending on the selected demo example.
+ *
+ * - GSM4_EXAMPLE:
+ * Depending on the selected demo example, it sends an SMS message (in PDU or TXT mode) or TCP/UDP message.
+ *
+ * By default, the TCP/UDP example is selected.
+ *
* ## Additional Function
- * - gsm4_process ( ) - The general process of collecting presponce
- * that sends a module.
- *
- * *note:*
- * - Echo must be turned off for succefull parsing. ( ATE0 )
- * - UART polling works much better with HFC enabled.
- * - In case of usage of other MCUs Timer initialization must be adjusted according to your MCU.
- *
- * \author MikroE Team
+ * - static void gsm4_clear_app_buf ( void )
+ * - static err_t gsm4_process ( void )
+ * - static void gsm4_error_check( err_t error_flag )
+ * - static void gsm4_log_app_buf ( void )
+ * - static err_t gsm4_rsp_check ( uint8_t *rsp )
+ * - static err_t gsm4_configure_for_connection( void )
+ * - static err_t gsm4_check_connection( void )
+ * - static err_t gsm4_configure_for_messages( void )
+ * - static err_t gsm4_send_message( void )
+ *
+ * @note
+ * In order for the examples to work, user needs to set the APN and SMSC (SMS PDU mode only)
+ * of entered SIM card as well as the phone number (SMS mode only) to which he wants to send an SMS.
+ * Enter valid values for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE.
+ * Example:
+ SIM_APN "internet"
+ SIM_SMSC "+381610401"
+ PHONE_NUMBER_TO_MESSAGE "+381659999999"
+ *
+ * @author Stefan Filipovic
*
*/
-// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "gsm4.h"
-#include "string.h"
+#include "conversions.h"
+
+// Example selection macros
+#define EXAMPLE_TCP_UDP 0 // Example of sending messages to a TCP/UDP echo server
+#define EXAMPLE_SMS 1 // Example of sending SMS to a phone number
+#define DEMO_EXAMPLE EXAMPLE_TCP_UDP // Example selection macro
-#define PROCESS_COUNTER 10
-#define PROCESS_RX_BUFFER_SIZE 500
-#define PROCESS_PARSER_BUFFER_SIZE 500
+// SIM APN config
+#define SIM_APN "internet" // Set valid SIM APN
-// ------------------------------------------------------------------ VARIABLES
+// SMS example parameters
+#define SIM_SMSC "" // Set valid SMS Service Center Address - only in SMS PDU mode
+#define PHONE_NUMBER_TO_MESSAGE "" // Set Phone number to message
+#define SMS_MODE "1" // SMS mode: "0" - PDU, "1" - TXT
-#define DEMO_APP_RECEIVER
-//#define DEMO_APP_TRANSMITER
+// TCP/UDP example parameters
+#define REMOTE_IP "77.46.162.162" // TCP/UDP echo server IP address
+#define REMOTE_PORT "51111" // TCP/UDP echo server port
+
+// Message content
+#define MESSAGE_CONTENT "GSM 4 click board - demo example."
+
+// Application buffer size
+#define APP_BUFFER_SIZE 256
+#define PROCESS_BUFFER_SIZE 256
+
+/**
+ * @brief Example states.
+ * @details Predefined enum values for application example state.
+ */
+typedef enum
+{
+ GSM4_CONFIGURE_FOR_NETWORK = 1,
+ GSM4_WAIT_FOR_CONNECTION,
+ GSM4_CONFIGURE_FOR_EXAMPLE,
+ GSM4_EXAMPLE
+
+} gsm4_example_state_t;
static gsm4_t gsm4;
static log_t logger;
-static char current_parser_buf[ PROCESS_PARSER_BUFFER_SIZE ];
-static uint8_t send_data_cnt = 0;
+/**
+ * @brief Application example variables.
+ * @details Variables used in application example.
+ */
+static uint8_t app_buf[ APP_BUFFER_SIZE ] = { 0 };
+static int32_t app_buf_len = 0;
+static err_t error_flag;
+static gsm4_example_state_t example_state;
+
+/**
+ * @brief Clearing application buffer.
+ * @details This function clears memory of application
+ * buffer and reset its length and counter.
+ */
+static void gsm4_clear_app_buf ( void );
+
+/**
+ * @brief Data reading function.
+ * @details This function reads data from device and
+ * appends it to the application buffer.
+ * @return @li @c 0 - Some data is read.
+ * @li @c -1 - Nothing is read.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm4_process ( void );
+
+/**
+ * @brief Check for errors.
+ * @details This function checks for different types of
+ * errors and logs them on UART or logs the response if no errors occured.
+ * @param[in] error_flag Error flag to check.
+ */
+static void gsm4_error_check ( err_t error_flag );
-// ------------------------------------------------------- ADDITIONAL FUNCTIONS
+/**
+ * @brief Logs application buffer.
+ * @details This function logs data from application buffer.
+ */
+static void gsm4_log_app_buf ( void );
+
+/**
+ * @brief Response check.
+ * @details This function checks for response and
+ * returns the status of response.
+ * @param[in] rsp Expected response.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm4_rsp_check ( uint8_t *rsp );
-static void gsm4_process ( void )
+/**
+ * @brief Configure device for connection to the network.
+ * @details Sends commands to configure and enable
+ * connection to the specified network.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm4_configure_for_network ( void );
+
+/**
+ * @brief Wait for connection signal.
+ * @details Wait for connection signal from CREG URC.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm4_check_connection ( void );
+
+/**
+ * @brief Configure device for example.
+ * @details Configure device for the specified example.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm4_configure_for_example ( void );
+
+/**
+ * @brief Execute example.
+ * @details This function executes SMS or TCP/UDP example depending on the DEMO_EXAMPLE macro.
+ * @return @li @c 0 - OK response.
+ * @li @c -2 - Timeout error.
+ * @li @c -3 - Command error.
+ * @li @c -4 - Unknown error.
+ * See #err_t definition for detailed explanation.
+ */
+static err_t gsm4_example ( void );
+
+void application_init ( void )
{
- int16_t rsp_size;
- uint16_t rsp_cnt = 0;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ gsm4_cfg_t gsm4_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ gsm4_cfg_setup( &gsm4_cfg );
+ GSM4_MAP_MIKROBUS( gsm4_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == gsm4_init( &gsm4, &gsm4_cfg ) )
+ {
+ log_error( &logger, " Application Init Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
- char uart_rx_buffer[ PROCESS_RX_BUFFER_SIZE ] = { 0 };
- uint16_t check_buf_cnt;
- uint8_t process_cnt = PROCESS_COUNTER;
+ gsm4_process( );
+ gsm4_clear_app_buf( );
+
+ // Check communication
+ gsm4_send_cmd( &gsm4, GSM4_CMD_AT );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ gsm4_error_check( error_flag );
- // Clear parser buffer
- memset( current_parser_buf, 0 , PROCESS_PARSER_BUFFER_SIZE );
+ // Restart device
+ #define RESTART_DEVICE "1,1"
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_CFUN, RESTART_DEVICE );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ gsm4_error_check( error_flag );
- while( process_cnt != 0 )
- {
- rsp_size = gsm4_generic_read( &gsm4, &uart_rx_buffer, PROCESS_RX_BUFFER_SIZE );
+ log_info( &logger, " Application Task " );
+ example_state = GSM4_CONFIGURE_FOR_NETWORK;
+}
- if ( rsp_size > 0 )
- {
- // Validation of the received data
- for ( check_buf_cnt = 0; check_buf_cnt < rsp_size; check_buf_cnt++ )
+void application_task ( void )
+{
+ switch ( example_state )
+ {
+ case GSM4_CONFIGURE_FOR_NETWORK:
+ {
+ if ( GSM4_OK == gsm4_configure_for_network( ) )
{
- if ( uart_rx_buffer[ check_buf_cnt ] == 0 )
- {
- uart_rx_buffer[ check_buf_cnt ] = 13;
- }
+ example_state = GSM4_WAIT_FOR_CONNECTION;
}
- log_printf( &logger, "%s", uart_rx_buffer );
-
- // Storages data in parser buffer
- rsp_cnt += rsp_size;
- if ( rsp_cnt < PROCESS_PARSER_BUFFER_SIZE )
+ break;
+ }
+ case GSM4_WAIT_FOR_CONNECTION:
+ {
+ if ( GSM4_OK == gsm4_check_connection( ) )
{
- strncat( current_parser_buf, uart_rx_buffer, rsp_size );
+ example_state = GSM4_CONFIGURE_FOR_EXAMPLE;
}
-
- // Clear RX buffer
- memset( uart_rx_buffer, 0, PROCESS_RX_BUFFER_SIZE );
- }
- else
- {
- process_cnt--;
-
- // Process delay
- Delay_ms( 100 );
+ break;
+ }
+ case GSM4_CONFIGURE_FOR_EXAMPLE:
+ {
+ if ( GSM4_OK == gsm4_configure_for_example( ) )
+ {
+ example_state = GSM4_EXAMPLE;
+ }
+ break;
+ }
+ case GSM4_EXAMPLE:
+ {
+ gsm4_example( );
+ break;
+ }
+ default:
+ {
+ log_error( &logger, " Example state." );
+ break;
}
}
}
-// ------------------------------------------------------ APPLICATION FUNCTIONS
-
-void application_init ( void )
+void main ( void )
{
- log_cfg_t log_cfg;
- gsm4_cfg_t cfg;
-
- /**
- * Logger initialization.
- * Default baud rate: 115200
- * Default log level: LOG_LEVEL_DEBUG
- * @note If USB_UART_RX and USB_UART_TX
- * are defined as HAL_PIN_NC, you will
- * need to define them manually for log to work.
- * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
- */
- LOG_MAP_USB_UART( log_cfg );
- log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
+ application_init( );
- // Click initialization.
+ for ( ; ; )
+ {
+ application_task( );
+ }
+}
- gsm4_cfg_setup( &cfg );
- GSM4_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- gsm4_init( &gsm4, &cfg );
+static void gsm4_clear_app_buf ( void )
+{
+ memset( app_buf, 0, app_buf_len );
+ app_buf_len = 0;
+}
- gsm4_module_power( &gsm4 );
+static err_t gsm4_process ( void )
+{
+ uint8_t rx_buf[ PROCESS_BUFFER_SIZE ] = { 0 };
+ int32_t rx_size = 0;
+ rx_size = gsm4_generic_read( &gsm4, rx_buf, PROCESS_BUFFER_SIZE );
+ if ( rx_size > 0 )
+ {
+ int32_t buf_cnt = app_buf_len;
+ if ( ( ( app_buf_len + rx_size ) > APP_BUFFER_SIZE ) && ( app_buf_len > 0 ) )
+ {
+ buf_cnt = APP_BUFFER_SIZE - ( ( app_buf_len + rx_size ) - APP_BUFFER_SIZE );
+ memmove ( app_buf, &app_buf[ APP_BUFFER_SIZE - buf_cnt ], buf_cnt );
+ }
+ for ( int32_t rx_cnt = 0; rx_cnt < rx_size; rx_cnt++ )
+ {
+ if ( rx_buf[ rx_cnt ] )
+ {
+ app_buf[ buf_cnt++ ] = rx_buf[ rx_cnt ];
+ if ( app_buf_len < APP_BUFFER_SIZE )
+ {
+ app_buf_len++;
+ }
+ }
+ }
+ return GSM4_OK;
+ }
+ return GSM4_ERROR;
+}
- gsm4_process( );
-
- gsm4_send_command( &gsm4, GSM4_SINGLE_CMD_AT );
- gsm4_process( );
+static err_t gsm4_rsp_check ( uint8_t *rsp )
+{
+ uint32_t timeout_cnt = 0;
+ uint32_t timeout = 120000;
+ gsm4_clear_app_buf( );
+ gsm4_process( );
+ while ( ( 0 == strstr( app_buf, rsp ) ) &&
+ ( 0 == strstr( app_buf, GSM4_RSP_ERROR ) ) )
+ {
+ gsm4_process( );
+ if ( timeout_cnt++ > timeout )
+ {
+ gsm4_clear_app_buf( );
+ return GSM4_ERROR_TIMEOUT;
+ }
+ Delay_ms( 1 );
+ }
+ Delay_ms( 100 );
+ gsm4_process( );
+ if ( strstr( app_buf, rsp ) )
+ {
+ return GSM4_OK;
+ }
+ else if ( strstr( app_buf, GSM4_RSP_ERROR ) )
+ {
+ return GSM4_ERROR_CMD;
+ }
+ else
+ {
+ return GSM4_ERROR_UNKNOWN;
+ }
+}
- gsm4_send_command( &gsm4, GSM4_SINGLE_CMD_AT );
- gsm4_process( );
+static void gsm4_error_check ( err_t error_flag )
+{
+ switch ( error_flag )
+ {
+ case GSM4_OK:
+ {
+ gsm4_log_app_buf( );
+ break;
+ }
+ case GSM4_ERROR:
+ {
+ log_error( &logger, " Overflow!" );
+ break;
+ }
+ case GSM4_ERROR_TIMEOUT:
+ {
+ log_error( &logger, " Timeout!" );
+ break;
+ }
+ case GSM4_ERROR_CMD:
+ {
+ log_error( &logger, " CMD!" );
+ break;
+ }
+ case GSM4_ERROR_UNKNOWN:
+ default:
+ {
+ log_error( &logger, " Unknown!" );
+ break;
+ }
+ }
+ Delay_ms( 500 );
+}
- gsm4_send_command( &gsm4, GSM4_SINGLE_CMD_AT );
- gsm4_process( );
+static void gsm4_log_app_buf ( void )
+{
+ for ( int32_t buf_cnt = 0; buf_cnt < app_buf_len; buf_cnt++ )
+ {
+ log_printf( &logger, "%c", app_buf[ buf_cnt ] );
+ }
+}
- gsm4_send_command( &gsm4, GSM4_SINGLE_CMD_ATE0 );
- gsm4_process( );
+static err_t gsm4_configure_for_network ( void )
+{
+ err_t func_error = GSM4_OK;
+#if ( ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP ) || ( DEMO_EXAMPLE == EXAMPLE_SMS ) )
+ Delay_ms ( 5000 );
+ // Deregister from network
+ #define DEREGISTER_FROM_NETWORK "2"
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_COPS, DEREGISTER_FROM_NETWORK );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+
+ // Set SIM APN
+ gsm4_set_sim_apn( &gsm4, SIM_APN );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
- gsm4_send_command( &gsm4, "AT+IFC=2,2" );
- gsm4_process( );
+ // Enable full functionality
+ #define FULL_FUNCTIONALITY "1"
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_CFUN, FULL_FUNCTIONALITY );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
- gsm4_send_command( &gsm4, "AT+CMGF=1" );
- gsm4_process( );
+ // Enable network registartion
+ #define ENABLE_REG "2"
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_CREG, ENABLE_REG );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+
+ // Automatic registration
+ #define AUTOMATIC_REGISTRATION "0"
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_COPS, AUTOMATIC_REGISTRATION );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+#endif
+ return func_error;
+}
- Delay_ms( 2000 );
+static err_t gsm4_check_connection ( void )
+{
+#if ( ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP ) || ( DEMO_EXAMPLE == EXAMPLE_SMS ) )
+ #define CONNECTED "+CREG: 2,1"
+ gsm4_send_cmd_check ( &gsm4, GSM4_CMD_CREG );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ gsm4_error_check( error_flag );
+ if ( strstr( app_buf, CONNECTED ) )
+ {
+ Delay_ms( 100 );
+ // Check signal quality
+ gsm4_send_cmd( &gsm4, GSM4_CMD_CSQ );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ gsm4_error_check( error_flag );
+ #define NO_SIGNAL "99,99"
+ if ( !strstr( app_buf, NO_SIGNAL ) )
+ {
+ Delay_ms ( 1000 );
+ return error_flag;
+ }
+ }
+ Delay_ms ( 1000 );
+ return GSM4_ERROR;
+#endif
+ return GSM4_OK;
}
-void application_task ( void )
+static err_t gsm4_configure_for_example ( void )
{
- gsm4_process( );
+ err_t func_error = GSM4_OK;
+#if ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP )
+ #define ACTIVATE_PDP_CONTEXT "1,1"
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_CGACT, ACTIVATE_PDP_CONTEXT );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+ #define ACTIVATE_PDP_PROFILE "0,3"
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_UPSDA, ACTIVATE_PDP_PROFILE );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+#elif ( DEMO_EXAMPLE == EXAMPLE_SMS )
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_CMGF, SMS_MODE );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+#else
+ #error "No demo example selected"
+#endif
+ return func_error;
}
-void main ( void )
+static err_t gsm4_example ( void )
{
- application_init( );
+ err_t func_error = GSM4_OK;
+#if ( DEMO_EXAMPLE == EXAMPLE_TCP_UDP )
+ uint8_t cmd_buf[ 100 ] = { 0 };
+ uint8_t urc_buf[ 20 ] = { 0 };
+ uint16_t timeout_cnt = 0;
+ uint16_t timeout = 30000;
+ uint8_t * __generic_ptr socket_num_buf = 0;
+ uint8_t tcp_socket_num[ 2 ] = { 0 };
+ uint8_t udp_socket_num[ 2 ] = { 0 };
+
+ // Create TCP socket
+ #define RSP_USOCR "+USOCR: "
+ #define TCP_PROTOCOL "6"
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_USOCR, TCP_PROTOCOL );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ socket_num_buf = strstr( app_buf, RSP_USOCR ) + strlen ( RSP_USOCR );
+ tcp_socket_num[ 0 ] = *socket_num_buf;
+ gsm4_error_check( error_flag );
+
+ // Create UDP socket
+ #define UDP_PROTOCOL "17"
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_USOCR, UDP_PROTOCOL );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ socket_num_buf = strstr( app_buf, RSP_USOCR ) + strlen ( RSP_USOCR );
+ udp_socket_num[ 0 ] = *socket_num_buf;
+ gsm4_error_check( error_flag );
+
+ // Connect TCP socket to remote IP and port
+ strcpy( cmd_buf, tcp_socket_num );
+ strcat( cmd_buf, ",\"" );
+ strcat( cmd_buf, REMOTE_IP );
+ strcat( cmd_buf, "\"," );
+ strcat( cmd_buf, REMOTE_PORT );
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_USOCO, cmd_buf );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+
+ // Connect UDP socket to remote IP and port
+ strcpy( cmd_buf, udp_socket_num );
+ strcat( cmd_buf, ",\"" );
+ strcat( cmd_buf, REMOTE_IP );
+ strcat( cmd_buf, "\"," );
+ strcat( cmd_buf, REMOTE_PORT );
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_USOCO, cmd_buf );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+ // Get message length
+ uint8_t message_len_buf[ 5 ] = { 0 };
+ uint16_t message_len = strlen( MESSAGE_CONTENT );
+ uint16_to_str( message_len, message_len_buf );
+ l_trim( message_len_buf );
+ r_trim( message_len_buf );
+
+ // Write message to TCP socket
+ strcpy( cmd_buf, tcp_socket_num );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, message_len_buf );
+ strcat( cmd_buf, ",\"" );
+ strcat( cmd_buf, MESSAGE_CONTENT );
+ strcat( cmd_buf, "\"" );
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_USOWR, cmd_buf );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+
+ // Read response message from TCP socket
+ #define URC_READ_SOCKET_DATA "+UUSORD: "
+ strcpy( urc_buf, URC_READ_SOCKET_DATA );
+ strcat( urc_buf, tcp_socket_num );
for ( ; ; )
{
- application_task( );
+ gsm4_process( );
+ uint8_t * __generic_ptr start_response_buf = strstr( app_buf, urc_buf );
+ if ( start_response_buf )
+ {
+ Delay_ms( 100 );
+ gsm4_process( );
+ uint8_t response_len_buf[ 5 ] = { 0 };
+ uint8_t * __generic_ptr start_response_len = strstr( start_response_buf, "," ) + 1;
+ memcpy ( response_len_buf, start_response_len, app_buf_len - ( start_response_len - app_buf ) );
+ strcpy( cmd_buf, tcp_socket_num );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, response_len_buf );
+ gsm4_log_app_buf( );
+ gsm4_clear_app_buf( );
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_USORD, cmd_buf );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+ break;
+ }
+ if ( timeout_cnt++ > timeout )
+ {
+ break;
+ }
+ Delay_ms( 1 );
+ }
+ timeout_cnt = 0;
+
+ // Write message to UDP socket
+ strcpy( cmd_buf, udp_socket_num );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, message_len_buf );
+ strcat( cmd_buf, ",\"" );
+ strcat( cmd_buf, MESSAGE_CONTENT );
+ strcat( cmd_buf, "\"" );
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_USOWR, cmd_buf );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+
+ // Read response message from UDP socket
+ strcpy( urc_buf, URC_READ_SOCKET_DATA );
+ strcat( urc_buf, udp_socket_num );
+ for ( ; ; )
+ {
+ gsm4_process( );
+ uint8_t * __generic_ptr start_response_buf = strstr( app_buf, urc_buf );
+ if ( start_response_buf )
+ {
+ Delay_ms( 100 );
+ gsm4_process( );
+ uint8_t response_len_buf[ 5 ] = { 0 };
+ uint8_t * __generic_ptr start_response_len = strstr( start_response_buf, "," ) + 1;
+ memcpy ( response_len_buf, start_response_len, app_buf_len - ( start_response_len - app_buf ) );
+ strcpy( cmd_buf, udp_socket_num );
+ strcat( cmd_buf, "," );
+ strcat( cmd_buf, response_len_buf );
+ gsm4_log_app_buf( );
+ gsm4_clear_app_buf( );
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_USORF, cmd_buf );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+ break;
+ }
+ if ( timeout_cnt++ > timeout )
+ {
+ break;
+ }
+ Delay_ms( 1 );
+ }
+
+ // Close TCP socket
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_USOCL, tcp_socket_num );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+
+ // Close UDP socket
+ gsm4_send_cmd_with_par( &gsm4, GSM4_CMD_USOCL, udp_socket_num );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+ Delay_ms( 5000 );
+#elif ( DEMO_EXAMPLE == EXAMPLE_SMS )
+ // Check SMS mode
+ #define CMGF_PDU "+CMGF: 0"
+ #define CMGF_TXT "+CMGF: 1"
+ gsm4_send_cmd_check( &gsm4, GSM4_CMD_CMGF );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+ if ( strstr( app_buf, CMGF_PDU ) )
+ {
+ // Send SMS in PDU mode
+ gsm4_send_sms_pdu( &gsm4, SIM_SMSC, PHONE_NUMBER_TO_MESSAGE, MESSAGE_CONTENT );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
}
+ else if ( strstr( app_buf, CMGF_TXT ) )
+ {
+ // Send SMS in TXT mode
+ gsm4_send_sms_text ( &gsm4, PHONE_NUMBER_TO_MESSAGE, MESSAGE_CONTENT );
+ error_flag = gsm4_rsp_check( GSM4_RSP_OK );
+ func_error |= error_flag;
+ gsm4_error_check( error_flag );
+ }
+ Delay_ms( 10000 );
+ Delay_ms( 10000 );
+ Delay_ms( 10000 );
+#else
+ #error "No demo example selected"
+#endif
+ return func_error;
}
-
// ------------------------------------------------------------------------ END
diff --git a/clicks/gsm4/example/manifest.exm b/clicks/gsm4/example/manifest.exm
index ffccfe8a02..1dc0b0a6dc 100644
--- a/clicks/gsm4/example/manifest.exm
+++ b/clicks/gsm4/example/manifest.exm
@@ -1,8 +1,8 @@
{
"name": "GSM 4 Click",
- "description": "GSM 4 click is a compact quad-band GSM cellular network communication solution, featuring the quad-band 2.5G GSM/GPRS SARA-G350 module.",
+ "description": "GSM 4 click is a compact quad-band GSM cellular network communication solution, featuring the quad-band 2.5G GSM/GPRS SARA-G350 module. This module features a full set of options for the cellular networking and communication, such as the network status indication, jamming detection, embedded internet protocols, including TCP/IP, UDP, FTP, PPP, HTTP, SMTP, full GPRS multislot class 10 implementation, and more. Data communication speed is rated up to 42.8 for the uplink and 85.6 kbps for downlink connection.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
- "hw" : ["click","u-blox SARA-G3"],
- "category" : ["GSM/LTE,2G GPRS"]
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv"],
+ "hw" : ["click","SARA-G350"],
+ "category" : ["GSM/LTE"]
}
diff --git a/clicks/gsm4/example/memake.txt b/clicks/gsm4/example/memake.txt
deleted file mode 100644
index 4839bc7f0e..0000000000
--- a/clicks/gsm4/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_gsm4
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Gsm4
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/gsm4/lib/include/gsm4.h b/clicks/gsm4/lib/include/gsm4.h
deleted file mode 100644
index 231f6bf659..0000000000
--- a/clicks/gsm4/lib/include/gsm4.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- * \brief This file contains API for GSM 4 Click driver.
- *
- * \addtogroup gsm4 GSM 4 Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef GSM4_H
-#define GSM4_H
-
-#include "drv_digital_out.h"
-#include "drv_digital_in.h"
-#include "drv_uart.h"
-
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-#define GSM4_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
- cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
- cfg.stat = MIKROBUS( mikrobus, MIKROBUS_AN ); \
- cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
- cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
- cfg.ri = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
- cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT );
-/** \} */
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define GSM4_RETVAL uint8_t
-
-#define GSM4_OK 0x00
-#define GSM4_INIT_ERROR 0xFF
-/** \} */
-
-/**
- * \defgroup parser_error Parser error
- * \{
- */
-#define GSM4_PARSER_NO_ERROR 0x00
-#define GSM4_PARSER_ERROR_REF 0x01
-#define GSM4_PARSER_ERROR_CMD 0x02
-#define GSM4_PARSER_ERROR_DATA 0x04
-/** \} */
-
-/**
- * \defgroup click_status G2C 3G click status
- * \{
- */
-#define GSM4_STATUS_DEVICE_READY 1
-#define GSM4_STATUS_ACT_NETWORK_AND_BROKER 4
-#define GSM4_STATUS_ACT_NETWORK 2
-#define GSM4_STATUS_ACT_BROKER 3
-#define GSM4_STATUS_DEVICE_BUSY 0
-/** \} */
-
-/**
- * \defgroup module_state Module power state
- * \{
- */
-#define GSM4_MODULE_POWER_ON 1
-#define GSM4_MODULE_POWER_OFF 0
-/** \} */
-
-/**
- * \defgroup at_command AT command
- * \{
- */
-#define GSM4_SINGLE_CMD_AT "AT"
-#define GSM4_SINGLE_CMD_AT_W "AT+W"
-#define GSM4_SINGLE_CMD_AT_R "AT+R"
-#define GSM4_SINGLE_CMD_ATE0 "ATE0"
-#define GSM4_SINGLE_CMD_ATE1 "ATE1"
-#define GSM4_SINGLE_CMD_AT_RST "AT+RST"
-#define GSM4_SINGLE_CMD_AT_CRST "AT+CRST"
-#define GSM4_SINGLE_CMD_AT_GMR "AT+GMR"
-#define GSM4_SINGLE_CMD_AT_GMSTA "AT+GMSTA"
-#define GSM4_SINGLE_CMD_AT_PUB "AT+PUB"
-
-#define GSM4_SINGLE_CMD_SET_AT_LRSP_1 "AT+LRSP=1"
-#define GSM4_SINGLE_CMD_SET_AT_LRSP_0 "AT+LRSP=0"
-#define GSM4_SINGLE_CMD_SET_AT_CEN_1 "AT+CEN=1"
-#define GSM4_SINGLE_CMD_SET_AT_CEN_0 "AT+CEN=0"
-#define GSM4_SINGLE_CMD_SET_AT_NWC_1 "AT+NWC=1"
-#define GSM4_SINGLE_CMD_SET_AT_NWC_0 "AT+NWC=0"
-#define GSM4_SINGLE_CMD_SET_AT_BRC_1 "AT+BRC=1"
-#define GSM4_SINGLE_CMD_SET_AT_BRC_0 "AT+BRC=0"
-#define GSM4_SINGLE_CMD_SET_AT_GPEN_0 "AT+GPEN=0"
-#define GSM4_SINGLE_CMD_SET_AT_GPEN_1 "AT+GPEN=1"
-
-#define GSM4_SINGLE_CMD_GET_AT_LRSP "AT+LRSP?"
-#define GSM4_SINGLE_CMD_GET_AT_CEN "AT+CEN?"
-#define GSM4_SINGLE_CMD_GET_AT_NWC "AT+NWC?"
-#define GSM4_SINGLE_CMD_GET_AT_BRC "AT+BRC?"
-#define GSM4_SINGLE_CMD_GET_AT_GPEN "AT+GPEN?"
-#define GSM4_SINGLE_CMD_GET_AT_NWCR "AT+NWCR?"
-#define GSM4_SINGLE_CMD_GET_AT_BRCR "AT+BRCR?"
-#define GSM4_SINGLE_CMD_GET_AT_DSET "AT+DSET?"
-
-#define GSM4_SINGLE_CMD_TEST_AT_LRSP "AT+LRSP=?"
-#define GSM4_SINGLE_CMD_TEST_AT_CEN "AT+CEN=?"
-#define GSM4_SINGLE_CMD_TEST_AT_NWC "AT+NWC=?"
-#define GSM4_SINGLE_CMD_TEST_AT_BRC "AT+BRC=?"
-#define GSM4_SINGLE_CMD_TEST_AT_GPEN "AT+GPEN=?"
-#define GSM4_SINGLE_CMD_TEST_AT_NWCR "AT+NWCR=?"
-#define GSM4_SINGLE_CMD_TEST_AT_BRCR "AT+BRCR=?"
-#define GSM4_SINGLE_CMD_TEST_AT_DSET "AT+DSET=?"
-
-#define GSM4_MULTI_CMD_AT_DSET "AT+DSET"
-#define GSM4_MULTI_CMD_AT_BRCR "AT+BRCR"
-#define GSM4_MULTI_CMD_AT_NWCR "AT+NWCR"
-/** \} */
-
-/**
- * \defgroup driver Driver define
- * \{
- */
-#define DRV_RX_BUFFER_SIZE 500
-/** \} */
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
- // Output pins
-
- digital_out_t rst;
- digital_out_t rts;
-
- // Input pins
-
- digital_in_t stat;
- digital_in_t ri;
- digital_in_t cts;
-
- // Modules
-
- uart_t uart;
-
- char uart_rx_buffer[ DRV_RX_BUFFER_SIZE ];
- char uart_tx_buffer[ DRV_RX_BUFFER_SIZE ];
-
-} gsm4_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Communication gpio pins
-
- pin_name_t rx_pin;
- pin_name_t tx_pin;
-
- // Additional gpio pins
-
- pin_name_t stat;
- pin_name_t rst;
- pin_name_t rts;
- pin_name_t ri;
- pin_name_t cts;
-
- // static variable
-
- uint32_t baud_rate; // Clock speed.
- bool uart_blocking;
- uart_data_bits_t data_bit; // Data bits.
- uart_parity_t parity_bit; // Parity bit.
- uart_stop_bits_t stop_bit; // Stop bits.
-
-} gsm4_cfg_t;
-
-/**
- * @brief Error type
- */
-// Actuator switch type
-typedef uint8_t gsm4_actuator_sw_t;
-
-// Actuator counter type
-typedef int16_t gsm4_actuator_cnt_t;
-
-// Actuator string type
-typedef char gsm4_actuator_str_t;
-
-// Parser error type
-typedef uint8_t gsm4_error_t;
-
-/** \} */ // End types group
-
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
- */
-void gsm4_cfg_setup ( gsm4_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- * @param gsm4 Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
- */
-GSM4_RETVAL gsm4_init ( gsm4_t *ctx, gsm4_cfg_t *cfg );
-/**
- * @brief Enables or disables module power.
- *
- * @param ctx Click object.
- *
- * @description This function Turn ON or OFF the module.
- */
-void gsm4_module_power( gsm4_t *ctx );
-
-/**
- * @brief Reset module.
- *
- * @param ctx Click object.
- *
- * @description This function reset module.
- */
-void gsm4_reset ( gsm4_t *ctx );
-
-/**
- * @brief Generic write function.
- *
- * @param ctx Click object.
- * @param data_buf Data buff to be written.
- * @param len Number of the bytes in data buf.
- *
- * @description This function writes data to the desired register.
- */
-void gsm4_generic_write ( gsm4_t *ctx, char *data_buf, uint16_t len );
-
-/**
- * @brief Generic read function.
- *
- * @param ctx Click object.
- * @param data_buf Data buff to be written.
- * @param max_len Max number of the bytes in data buf.
- *
- * @description This function reads data from the desired register.
- */
-int16_t gsm4_generic_read ( gsm4_t *ctx, char *data_buf, uint16_t max_len );
-
-/**
- * @brief Command function.
- *
- * @param ctx Click object.
- * @param command Command.
- *
- * @description This function send comamnd.
- */
-void gsm4_send_command ( gsm4_t *ctx, char *command );
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _GSM4_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
diff --git a/clicks/gsm4/lib/memake.txt b/clicks/gsm4/lib/memake.txt
deleted file mode 100644
index 41fe98ad92..0000000000
--- a/clicks/gsm4/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_gsm4
-
-alias: Click.Gsm4
-
-sources: {
- src/gsm4.c
-}
-
-headers: {
- include/gsm4.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/gsm4.h) dst(include/gsm4.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/gsm4/lib/src/gsm4.c b/clicks/gsm4/lib/src/gsm4.c
deleted file mode 100644
index 365c554cfb..0000000000
--- a/clicks/gsm4/lib/src/gsm4.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- */
-
-#include "gsm4.h"
-#include "string.h"
-
-// ------------------------------------------------------------- PRIVATE MACROS
-
-// Buffer
-#define GSM4_BUF_FIRST_CMD "=\""
-#define GSM4_BUF_MID_CMD "\",\""
-#define GSM4_BUF_END_CMD "\""
-
-#define GSM4_RSP_CMD_ACT "+ACT"
-#define GSM4_RSP_CMD_ACT_LEN 4
-
-// ACTUATOR SWITCH PARSER
-#define GSM4_RSP_STATE_TRUE "true"
-#define GSM4_RSP_STATE_TRUE_LEN 4
-#define GSM4_RSP_STATE_FALSE "false"
-#define GSM4_RSP_STATE_FALSE_LEN 5
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void gsm4_cfg_setup ( gsm4_cfg_t *cfg )
-{
- // Communication gpio pins
-
- cfg->rx_pin = HAL_PIN_NC;
- cfg->tx_pin = HAL_PIN_NC;
-
- // Additional gpio pins
-
- cfg->stat = HAL_PIN_NC;
- cfg->rst = HAL_PIN_NC;
- cfg->rts = HAL_PIN_NC;
- cfg->ri = HAL_PIN_NC;
- cfg->cts = HAL_PIN_NC;
-
- cfg->baud_rate = 9600;
- cfg->data_bit = UART_DATA_BITS_DEFAULT;
- cfg->parity_bit = UART_PARITY_DEFAULT;
- cfg->stop_bit = UART_STOP_BITS_DEFAULT;
- cfg->uart_blocking = false;
-}
-
-GSM4_RETVAL gsm4_init ( gsm4_t *ctx, gsm4_cfg_t *cfg )
-{
- uart_config_t uart_cfg;
-
- uart_configure_default( &uart_cfg );
-
- // Ring buffer mapping
- ctx->uart.tx_ring_buffer = ctx->uart_tx_buffer;
- ctx->uart.rx_ring_buffer = ctx->uart_rx_buffer;
-
- // UART module config
- uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
- uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
- uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
- uart_cfg.rx_ring_size = sizeof( ctx->uart_rx_buffer );
-
- uart_open( &ctx->uart, &uart_cfg );
- uart_set_baud( &ctx->uart, cfg->baud_rate );
- uart_set_parity( &ctx->uart, cfg->parity_bit );
- uart_set_stop_bits( &ctx->uart, cfg->stop_bit );
- uart_set_data_bits( &ctx->uart, cfg->data_bit );
-
- uart_set_blocking( &ctx->uart, cfg->uart_blocking );
-
- // Output pins
-
- digital_out_init( &ctx->rst, cfg->rst );
- digital_out_init( &ctx->rts, cfg->rts );
-
- // Input pins
-
- digital_in_init( &ctx->stat, cfg->stat );
- digital_in_init( &ctx->ri, cfg->ri );
- digital_in_init( &ctx->cts, cfg->cts );
-
- return GSM4_OK;
-
-}
-
-void gsm4_module_power( gsm4_t *ctx )
-{
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
-}
-
-
-void gsm4_reset ( gsm4_t *ctx )
-{
- digital_out_high( &ctx->rst );
- Delay_100ms( );
- digital_out_low( &ctx->rst );
- Delay_100ms( );
- Delay_100ms( );
- Delay_100ms( );
- digital_out_high( &ctx->rst );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
- Delay_1sec( );
-}
-
-void gsm4_generic_write ( gsm4_t *ctx, char *data_buf, uint16_t len )
-{
- uart_write( &ctx->uart, data_buf, len );
-}
-
-int16_t gsm4_generic_read ( gsm4_t *ctx, char *data_buf, uint16_t max_len )
-{
- return uart_read( &ctx->uart, data_buf, max_len );
-}
-
-void gsm4_send_command ( gsm4_t *ctx, char *command )
-{
- char tmp_buf[ 100 ];
- uint8_t len;
- memset( tmp_buf, 0, 100 );
- len = strlen( command );
-
- strncpy( tmp_buf, command, len );
- strcat( tmp_buf, "\r\n" );
-
- gsm4_generic_write( ctx, tmp_buf, strlen( tmp_buf ) );
-}
-
-// ------------------------------------------------------------------------- END
-
diff --git a/clicks/gsm4/lib_gsm4/CMakeLists.txt b/clicks/gsm4/lib_gsm4/CMakeLists.txt
new file mode 100644
index 0000000000..7cce8f3d67
--- /dev/null
+++ b/clicks/gsm4/lib_gsm4/CMakeLists.txt
@@ -0,0 +1,31 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_gsm4 LANGUAGES MikroC)
+else()
+ project(lib_gsm4 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_gsm4 STATIC
+ src/gsm4.c
+ include/gsm4.h
+)
+add_library(Click.GSM4 ALIAS lib_gsm4)
+
+
+
+target_include_directories(lib_gsm4 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_gsm4 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_gsm4 PUBLIC MikroSDK.Driver)
+find_package(MikroSDK.Conversions REQUIRED)
+target_link_libraries(lib_gsm4 PUBLIC MikroSDK.Conversions)
+find_package(MikroSDK.GenericPointer REQUIRED)
+target_link_libraries(lib_gsm4 PUBLIC MikroSDK.GenericPointer)
diff --git a/clicks/gsm4/lib_gsm4/include/Click.Gsm4 b/clicks/gsm4/lib_gsm4/include/Click.Gsm4
new file mode 100644
index 0000000000..d74ccd613a
--- /dev/null
+++ b/clicks/gsm4/lib_gsm4/include/Click.Gsm4
@@ -0,0 +1 @@
+#include "gsm4.h"
diff --git a/clicks/gsm4/lib_gsm4/include/gsm4.h b/clicks/gsm4/lib_gsm4/include/gsm4.h
new file mode 100644
index 0000000000..63ef6197c3
--- /dev/null
+++ b/clicks/gsm4/lib_gsm4/include/gsm4.h
@@ -0,0 +1,385 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file gsm4.h
+ * @brief This file contains API for GSM 4 Click Driver.
+ */
+
+#ifndef GSM4_H
+#define GSM4_H
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_uart.h"
+
+/*!
+ * @addtogroup gsm4 GSM 4 Click Driver
+ * @brief API for configuring and manipulating GSM 4 Click driver.
+ * @{
+ */
+
+/**
+ * @defgroup gsm4_set GSM 4 Device Settings
+ * @brief Settings for registers of GSM 4 Click driver.
+ */
+
+/**
+ * @addtogroup gsm4_set
+ * @{
+ */
+
+/**
+ * @brief GSM 4 control commands.
+ * @details Specified setting for control commands of GSM 4 Click driver.
+ */
+#define GSM4_CMD_AT "AT"
+#define GSM4_CMD_CFUN "AT+CFUN"
+#define GSM4_CMD_CREG "AT+CREG"
+#define GSM4_CMD_CGDCONT "AT+CGDCONT"
+#define GSM4_CMD_CSQ "AT+CSQ"
+#define GSM4_CMD_COPS "AT+COPS"
+#define GSM4_CMD_CMGS "AT+CMGS"
+#define GSM4_CMD_CMGF "AT+CMGF"
+#define GSM4_CMD_CGACT "AT+CGACT"
+#define GSM4_CMD_UPSDA "AT+UPSDA"
+#define GSM4_CMD_USOCR "AT+USOCR"
+#define GSM4_CMD_USOCO "AT+USOCO"
+#define GSM4_CMD_USOWR "AT+USOWR"
+#define GSM4_CMD_USORD "AT+USORD"
+#define GSM4_CMD_USORF "AT+USORF"
+#define GSM4_CMD_USOCL "AT+USOCL"
+
+/**
+ * @brief GSM 4 device response for AT commands.
+ * @details Device response after commands.
+ */
+#define GSM4_RSP_OK "OK"
+#define GSM4_RSP_ERROR "ERROR"
+
+/**
+ * @brief GSM 4 driver buffer size.
+ * @details Specified size of driver ring buffer.
+ * @note Increase buffer size if needed.
+ */
+#define GSM4_RX_DRV_BUFFER_SIZE 256
+#define GSM4_TX_DRV_BUFFER_SIZE 256
+
+/*! @} */ // gsm4_set
+
+/**
+ * @defgroup gsm4_map GSM 4 MikroBUS Map
+ * @brief MikroBUS pin mapping of GSM 4 Click driver.
+ */
+
+/**
+ * @addtogroup gsm4_map
+ * @{
+ */
+
+/**
+ * @brief MikroBUS pin mapping.
+ * @details Mapping pins of GSM 4 Click to the selected MikroBUS.
+ */
+#define GSM4_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
+ cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
+ cfg.sta = MIKROBUS( mikrobus, MIKROBUS_AN ); \
+ cfg.pwr = MIKROBUS( mikrobus, MIKROBUS_RST ); \
+ cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
+ cfg.ring = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
+ cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT )
+
+/*! @} */ // gsm4_map
+/*! @} */ // gsm4
+
+/**
+ * @brief GSM 4 Click context object.
+ * @details Context object definition of GSM 4 Click driver.
+ */
+typedef struct
+{
+ // Output pins
+ digital_out_t pwr; /**< Power on pin. */
+ digital_out_t rts; /**< UART Ready to Send. */
+
+ // Input pins
+ digital_in_t sta; /**< Power on status. */
+ digital_in_t ring; /**< Ring indication pin. */
+ digital_in_t cts; /**< UART Clear to Send. */
+
+ // Modules
+ uart_t uart; /**< UART driver object. */
+
+ // Buffers
+ uint8_t uart_rx_buffer[ GSM4_RX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
+ uint8_t uart_tx_buffer[ GSM4_TX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
+
+} gsm4_t;
+
+/**
+ * @brief GSM 4 Click configuration object.
+ * @details Configuration object definition of GSM 4 Click driver.
+ */
+typedef struct
+{
+ // Communication gpio pins
+ pin_name_t rx_pin; /**< RX pin. */
+ pin_name_t tx_pin; /**< TX pin. */
+
+ // Additional gpio pins
+ pin_name_t pwr; /**< Power on pin. */
+ pin_name_t rts; /**< UART Ready to Send. */
+ pin_name_t ring; /**< Ring indication pin. */
+ pin_name_t sta; /**< Power on status. */
+ pin_name_t cts; /**< UART Clear to Send. */
+
+ // Static variable
+ uint32_t baud_rate; /**< Clock speed. */
+ bool uart_blocking; /**< Wait for interrupt or not. */
+ uart_data_bits_t data_bit; /**< Data bits. */
+ uart_parity_t parity_bit; /**< Parity bit. */
+ uart_stop_bits_t stop_bit; /**< Stop bits. */
+
+} gsm4_cfg_t;
+
+/**
+ * @brief GSM 4 Click return value data.
+ * @details Predefined enum values for driver return values.
+ */
+typedef enum
+{
+ GSM4_OK = 0,
+ GSM4_ERROR = -1,
+ GSM4_ERROR_TIMEOUT = -2,
+ GSM4_ERROR_CMD = -3,
+ GSM4_ERROR_UNKNOWN = -4
+
+} gsm4_return_value_t;
+
+/*!
+ * @addtogroup gsm4 GSM 4 Click Driver
+ * @brief API for configuring and manipulating GSM 4 Click driver.
+ * @{
+ */
+
+/**
+ * @brief GSM 4 configuration object setup function.
+ * @details This function initializes click configuration structure to initial
+ * values.
+ * @param[out] cfg : Click configuration structure.
+ * See #gsm4_cfg_t object definition for detailed explanation.
+ * @return Nothing.
+ * @note The all used pins will be set to unconnected state.
+ */
+void gsm4_cfg_setup ( gsm4_cfg_t *cfg );
+
+/**
+ * @brief GSM 4 initialization function.
+ * @details This function initializes all necessary pins and peripherals used
+ * for this click board.
+ * @param[out] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @param[in] cfg : Click configuration structure.
+ * See #gsm4_cfg_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm4_init ( gsm4_t *ctx, gsm4_cfg_t *cfg );
+
+/**
+ * @brief GSM 4 data writing function.
+ * @details This function writes a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @param[in] data_in : Data buffer for sending.
+ * @param[in] len : Number of bytes for sending.
+ * @return @li @c >=0 - Success,
+ * @li @c <0 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm4_generic_write ( gsm4_t *ctx, uint8_t *data_in, uint16_t len );
+
+/**
+ * @brief GSM 4 data reading function.
+ * @details This function reads a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @param[out] data_out : Output read data.
+ * @param[in] len : Number of bytes to be read.
+ * @return @li @c >0 - Number of data bytes read,
+ * @li @c <=0 - Error/Empty Ring buffer.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm4_generic_read ( gsm4_t *ctx, uint8_t *data_out, uint16_t len );
+
+/**
+ * @brief GSM 4 set rts pin function.
+ * @details This function sets the Request to Send (RTS) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @param[in] state : Pin logic state.
+ * @return None.
+ * @note None.
+ */
+void gsm4_set_rts_pin ( gsm4_t *ctx, uint8_t state );
+
+/**
+ * @brief GSM 4 set pwr pin function.
+ * @details This function sets the Power ON (PWR) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @param[in] state : Pin logic state.
+ * @return None.
+ * @note None.
+ */
+void gsm4_set_pwr_pin ( gsm4_t *ctx, uint8_t state );
+
+/**
+ * @brief GSM 4 get cts pin function.
+ * @details This function returns the Clear to Send (CTS) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
+ */
+uint8_t gsm4_get_cts_pin ( gsm4_t *ctx );
+
+/**
+ * @brief GSM 4 get sta pin function.
+ * @details This function returns the status (STA) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
+ */
+uint8_t gsm4_get_sta_pin ( gsm4_t *ctx );
+
+/**
+ * @brief GSM 4 get ring pin function.
+ * @details This function returns the Ring Indication (RI) pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
+ */
+uint8_t gsm4_get_ring_pin ( gsm4_t *ctx );
+
+/**
+ * @brief Send command function.
+ * @details This function sends a specified command to the click module.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @param[in] cmd : Command variable.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm4_send_cmd ( gsm4_t *ctx, uint8_t *cmd );
+
+/**
+ * @brief Send command function with parameter.
+ * @details This function sends a command with specified parameter to the click module.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @param[in] param_buf : Parameter buffer.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm4_send_cmd_with_par ( gsm4_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf );
+
+/**
+ * @brief Check the sent command.
+ * @details This function checks the command that is sent.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm4_send_cmd_check ( gsm4_t *ctx, uint8_t *at_cmd_buf );
+
+/**
+ * @brief Check the command parameters.
+ * @details This function checks the command that is sent.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @param[in] at_cmd_buf : Command buffer.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm4_send_cmd_par_check ( gsm4_t *ctx, uint8_t *at_cmd_buf );
+
+/**
+ * @brief Set sim card APN.
+ * @details This function sets APN for sim card.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @param[in] sim_apn : SIM card APN.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm4_set_sim_apn ( gsm4_t *ctx, uint8_t *sim_apn );
+
+/**
+ * @brief GSM 4 send SMS in text mode.
+ * @details This function sends text message to a phone number.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @param[in] phone_number : Phone number to message.
+ * @param[in] sms_text : Message to be sent.
+ * @return Nothing.
+ * @note None.
+ */
+void gsm4_send_sms_text ( gsm4_t *ctx, uint8_t *phone_number, uint8_t *sms_text );
+
+/**
+ * @brief GSM 4 send SMS in PDU mode.
+ * @details This function sends text message to a phone number in PDU mode.
+ * @param[in] ctx : Click context object.
+ * See #gsm4_t object definition for detailed explanation.
+ * @param[in] service_center_number : SMSC of the SIM card.
+ * @param[in] phone_number : Phone number to message.
+ * @param[in] sms_text : Message to be sent.
+ * @return @li @c >=0 - Success,
+ * @li @c <0 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t gsm4_send_sms_pdu ( gsm4_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // GSM4_H
+
+/*! @} */ // gsm4
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/gsm4/lib_gsm4/src/gsm4.c b/clicks/gsm4/lib_gsm4/src/gsm4.c
new file mode 100644
index 0000000000..b2604e8c31
--- /dev/null
+++ b/clicks/gsm4/lib_gsm4/src/gsm4.c
@@ -0,0 +1,481 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file gsm4.c
+ * @brief GSM 4 Click Driver.
+ */
+
+#include "gsm4.h"
+#include "conversions.h"
+#include "generic_pointer.h"
+
+/**
+ * @brief PDU macros.
+ * @details Predefined PDU macros for driver use.
+ */
+#define BITMASK_7BITS 0x7F
+#define BITMASK_8BITS 0xFF
+#define BITMASK_HIGH_4BITS 0xF0
+#define BITMASK_LOW_4BITS 0x0F
+#define TYPE_OF_ADDRESS_INTERNATIONAL_PHONE 0x91
+#define TYPE_OF_ADDRESS_NATIONAL_SUBSCRIBER 0xC8
+#define SMS_DELIVER_ONE_MESSAGE 0x04
+#define SMS_DELIVER_ONE_MESSAGE 0x04
+#define SMS_SUBMIT 0x11
+#define SMS_MAX_7BIT_TEXT_LENGTH 160
+#define SMS_MAX_PDU_LENGTH 256
+
+/**
+ * @brief Encode message for PDU mode.
+ * @details Encode message for PDU mode and outputs
+ * the encoded message into output buffer.
+ * @param[in] service_center_number : Service center of devices SIM.
+ * @param[in] phone_number : Phone number to send message to.
+ * @param[in] sms_text : SMS text.
+ * @param[out] output_buffer : Output PDU encoded message.
+ * @param[in] buffer_size : Output buffer size.
+ * @return @li @c >=0 - Length of the SMS encoded message,
+ * @li @c <0 - Error.
+ */
+static int16_t pdu_encode ( uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text,
+ uint8_t *output_buffer, uint16_t buffer_size );
+
+/**
+ * @brief Swap decimal digits of a number.
+ * @details Swap decimal digits of a number (e.g. 12 -> 21).
+ * @param[in] x : Decimal number to swap digits.
+ * @return Swapped decimal number.
+ */
+static uint8_t swap_decimal_nibble ( uint8_t x );
+
+/**
+ * @brief Encode text content for PDU mode.
+ * @details Encode text content for PDU mode and
+ * outputs the encoded message into output buffer.
+ * @param[in] sms_text : Sms text content to encode
+ * @param[in] sms_text_length : Length of the text message.
+ * @param[out] output_buffer : Output PDU encoded text message.
+ * @param[in] buffer_size : Output buffer size.
+ * @return @li @c >=0 - Length of the enccoded text messages,
+ * @li @c <0 - Error.
+ */
+static int16_t encode_pdu_message ( uint8_t *sms_text, int16_t sms_text_length,
+ uint8_t *output_buffer, uint16_t buffer_size );
+
+/**
+ * @brief Encode phone number for PDU mode.
+ * @details Encode phone number for PDU mode and
+ * outputs the encoded message into output buffer.
+ * @param[in] phone_number : Phone number to send message to.
+ * @param[out] output_buffer : Output PDU encoded message.
+ * @param[in] buffer_size : Output buffer size.
+ * @return @li @c >=0 - Length of the SMS encoded message,
+ * @li @c <0 - Error.
+ */
+static int16_t encode_phone_number ( uint8_t *phone_number, uint8_t *output_buffer, uint16_t buffer_size );
+
+/**
+ * @brief GSM 4 str cut chr function.
+ * @details This function removes all selected characters from string str,
+ * and returns it to the same str without those characters.
+ * @param str Address of string.
+ * @param chr Character to cut.
+ */
+static void gsm4_str_cut_chr ( uint8_t *str, uint8_t chr );
+
+void gsm4_cfg_setup ( gsm4_cfg_t *cfg )
+{
+ // Communication gpio pins
+ cfg->rx_pin = HAL_PIN_NC;
+ cfg->tx_pin = HAL_PIN_NC;
+
+ // Additional gpio pins
+ cfg->pwr = HAL_PIN_NC;
+ cfg->rts = HAL_PIN_NC;
+ cfg->sta = HAL_PIN_NC;
+ cfg->ring = HAL_PIN_NC;
+ cfg->cts = HAL_PIN_NC;
+
+ cfg->baud_rate = 9600;
+ cfg->data_bit = UART_DATA_BITS_DEFAULT;
+ cfg->parity_bit = UART_PARITY_DEFAULT;
+ cfg->stop_bit = UART_STOP_BITS_DEFAULT;
+ cfg->uart_blocking = false;
+}
+
+err_t gsm4_init ( gsm4_t *ctx, gsm4_cfg_t *cfg )
+{
+ uart_config_t uart_cfg;
+
+ // Default config
+ uart_configure_default( &uart_cfg );
+
+ // Ring buffer mapping
+ ctx->uart.tx_ring_buffer = ctx->uart_tx_buffer;
+ ctx->uart.rx_ring_buffer = ctx->uart_rx_buffer;
+
+ // UART module config
+ uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
+ uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
+ uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
+ uart_cfg.rx_ring_size = sizeof( ctx->uart_rx_buffer );
+
+ if ( UART_ERROR == uart_open( &ctx->uart, &uart_cfg ) )
+ {
+ return UART_ERROR;
+ }
+ uart_set_baud( &ctx->uart, cfg->baud_rate );
+ uart_set_parity( &ctx->uart, cfg->parity_bit );
+ uart_set_stop_bits( &ctx->uart, cfg->stop_bit );
+ uart_set_data_bits( &ctx->uart, cfg->data_bit );
+
+ uart_set_blocking( &ctx->uart, cfg->uart_blocking );
+
+ // Output pins
+ digital_out_init( &ctx->rts, cfg->rts );
+ digital_out_init( &ctx->pwr, cfg->pwr );
+
+ // Input pins
+ digital_in_init( &ctx->ring, cfg->ring );
+ digital_in_init( &ctx->sta, cfg->sta );
+ digital_in_init( &ctx->cts, cfg->cts );
+
+ digital_out_low ( &ctx->pwr );
+ Delay_100ms ( );
+
+ return UART_SUCCESS;
+}
+
+err_t gsm4_generic_write ( gsm4_t *ctx, uint8_t *data_in, uint16_t len )
+{
+ return uart_write( &ctx->uart, data_in, len );
+}
+
+err_t gsm4_generic_read ( gsm4_t *ctx, uint8_t *data_out, uint16_t len )
+{
+ return uart_read( &ctx->uart, data_out, len );
+}
+
+void gsm4_set_rts_pin ( gsm4_t *ctx, uint8_t state )
+{
+ digital_out_write( &ctx->rts, state );
+}
+
+void gsm4_set_pwr_pin ( gsm4_t *ctx, uint8_t state )
+{
+ digital_out_write( &ctx->pwr, state );
+}
+
+uint8_t gsm4_get_sta_pin ( gsm4_t *ctx )
+{
+ return digital_in_read( &ctx->sta );
+}
+
+uint8_t gsm4_get_cts_pin ( gsm4_t *ctx )
+{
+ return digital_in_read( &ctx->cts );
+}
+
+uint8_t gsm4_get_ring_pin ( gsm4_t *ctx )
+{
+ return digital_in_read( &ctx->ring );
+}
+
+void gsm4_send_cmd ( gsm4_t *ctx, uint8_t *cmd )
+{
+ uint8_t carriage_return = 13;
+ while ( *cmd != 0 )
+ {
+ uart_write( &ctx->uart, cmd, 1 );
+ cmd++;
+ }
+ uart_write( &ctx->uart, &carriage_return, 1 );
+ Delay_100ms( );
+}
+
+void gsm4_send_cmd_with_par ( gsm4_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t check_char[ 2 ] = { '=', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, check_char );
+ strcat( final_cmd, param_buf );
+
+ gsm4_send_cmd( ctx, final_cmd );
+}
+
+void gsm4_send_cmd_check ( gsm4_t *ctx, uint8_t *at_cmd_buf )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t check_char[ 2 ] = { '?', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, check_char );
+
+ gsm4_send_cmd( ctx, final_cmd );
+}
+
+void gsm4_send_cmd_par_check ( gsm4_t *ctx, uint8_t *at_cmd_buf )
+{
+ uint8_t final_cmd[ 100 ] = { 0 };
+ uint8_t check_char[ 3 ] = { '=' , '?', 0 };
+
+ strcpy( final_cmd, at_cmd_buf );
+ strcat( final_cmd, check_char );
+
+ gsm4_send_cmd( ctx, final_cmd );
+}
+
+void gsm4_set_sim_apn ( gsm4_t *ctx, uint8_t *sim_apn )
+{
+ uint8_t final_cmd[ 50 ] = "1,\"IP\",\"";
+ uint8_t end_cmd[ 3 ] = "\"";
+
+ strcat( final_cmd, sim_apn );
+ strcat( final_cmd, end_cmd );
+
+ gsm4_send_cmd_with_par( ctx, GSM4_CMD_CGDCONT, final_cmd );
+}
+
+void gsm4_send_sms_text ( gsm4_t *ctx, uint8_t *phone_number, uint8_t *sms_text )
+{
+ uint8_t text[ 200 ] = { 0 };
+ uint8_t cmd_start[ ] = "=\"";
+ uint8_t cmd_end[ ] = "\"\r";
+ uint8_t txt_end[ ] = "\032";
+
+ strcpy( text, GSM4_CMD_CMGS );
+ strcat( text, cmd_start );
+ strcat( text, phone_number );
+ strcat( text, cmd_end );
+
+ gsm4_send_cmd( ctx, text );
+ memset( text, 0, sizeof ( text ) );
+
+ strcpy( text, sms_text );
+ strcat( text, txt_end );
+ gsm4_send_cmd( ctx, text );
+}
+
+err_t gsm4_send_sms_pdu ( gsm4_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text )
+{
+ uint8_t text[ SMS_MAX_PDU_LENGTH ] = { 0 };
+ uint8_t pdu_buf[ SMS_MAX_PDU_LENGTH ] = { 0 };
+ uint8_t byte_buf[ 4 ] = { 0 };
+ uint8_t ctrl_z[ 2 ] = { 26, 0 };
+ int16_t pdu_buf_len = 0;
+ uint8_t length = 0;
+ uint8_t smsc[ 32 ] = { 0 };
+ uint8_t phone_num[ 32 ] = { 0 };
+ strcpy ( smsc, service_center_number );
+ strcpy ( phone_num, phone_number );
+ gsm4_str_cut_chr ( smsc, '+' );
+ gsm4_str_cut_chr ( phone_num, '+' );
+
+ pdu_buf_len = pdu_encode( smsc, phone_num, sms_text, pdu_buf, SMS_MAX_PDU_LENGTH );
+
+ if ( pdu_buf_len < 0 )
+ {
+ return GSM4_ERROR;
+ }
+
+ length = pdu_buf_len - ( ( strlen( smsc ) - 1 ) / 2 + 3 );
+ uint8_to_str( length, byte_buf );
+ gsm4_str_cut_chr ( byte_buf, ' ' );
+
+ strcpy( text, GSM4_CMD_CMGS );
+ strcat( text, "=" );
+ strcat( text, byte_buf );
+
+ gsm4_send_cmd( ctx, text );
+ memset( text, 0, SMS_MAX_PDU_LENGTH );
+
+ for ( int16_t cnt = 0; cnt < pdu_buf_len; cnt++ )
+ {
+ uint8_to_hex ( pdu_buf[ cnt ], byte_buf );
+ strcat ( text, byte_buf );
+ }
+ strcat( text, ctrl_z );
+
+ gsm4_send_cmd( ctx, text );
+
+ return GSM4_OK;
+}
+
+static int16_t pdu_encode ( uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text,
+ uint8_t *output_buffer, uint16_t buffer_size )
+{
+ if ( buffer_size < 2 )
+ {
+ return GSM4_ERROR;
+ }
+
+ int16_t output_buffer_length = 0;
+
+ // 1. Set SMS center number.
+ int16_t length = 0;
+ if ( ( service_center_number != 0 ) && ( strlen ( service_center_number ) > 0 ) )
+ {
+ output_buffer[ 1 ] = TYPE_OF_ADDRESS_INTERNATIONAL_PHONE; // Add type of address.
+ length = encode_phone_number( service_center_number, output_buffer + 2, buffer_size - 2 );
+ if ( length < 0 && length >= 254 )
+ {
+ return GSM4_ERROR;
+ }
+ length++;
+ }
+ output_buffer[ 0 ] = length;
+ output_buffer_length = length + 1;
+ if ( output_buffer_length + 4 > buffer_size )
+ {
+ return GSM4_ERROR; // Check if it has space for four more bytes.
+ }
+
+ // 2. Set type of message.
+ output_buffer[ output_buffer_length++ ] = SMS_SUBMIT;
+ output_buffer[ output_buffer_length++ ] = 0x00; // Message reference.
+
+ // 3. Set phone number.
+ output_buffer[ output_buffer_length ] = strlen( phone_number );
+ output_buffer[ output_buffer_length + 1 ] = TYPE_OF_ADDRESS_INTERNATIONAL_PHONE;
+ length = encode_phone_number( phone_number, output_buffer + output_buffer_length + 2,
+ buffer_size - output_buffer_length - 2);
+ output_buffer_length += length + 2;
+ if ( output_buffer_length + 4 > buffer_size )
+ {
+ return GSM4_ERROR; // Check if it has space for four more bytes.
+ }
+
+ // 4. Protocol identifiers.
+ output_buffer[ output_buffer_length++ ] = 0x00; // TP-PID: Protocol identifier.
+ output_buffer[ output_buffer_length++ ] = 0x00; // TP-DCS: Data coding scheme.
+ output_buffer[ output_buffer_length++ ] = 0xB0; // TP-VP: Validity: 10 days
+
+ // 5. SMS message.
+ int16_t sms_text_length = strlen( sms_text );
+ if ( sms_text_length > SMS_MAX_7BIT_TEXT_LENGTH )
+ {
+ return GSM4_ERROR;
+ }
+ output_buffer[ output_buffer_length++ ] = sms_text_length;
+ length = encode_pdu_message( sms_text, sms_text_length, output_buffer + output_buffer_length,
+ buffer_size - output_buffer_length );
+ if ( length < 0 )
+ {
+ return GSM4_ERROR;
+ }
+ output_buffer_length += length;
+
+ return output_buffer_length;
+}
+
+static uint8_t swap_decimal_nibble ( uint8_t x )
+{
+ return ( x / 16 ) + ( ( x % 16 ) * 10 );
+}
+
+static int16_t encode_pdu_message ( uint8_t *sms_text, int16_t sms_text_length,
+ uint8_t *output_buffer, uint16_t buffer_size )
+{
+ // Check if output buffer is big enough.
+ if ( ( sms_text_length * 7 + 7 ) / 8 > buffer_size )
+ {
+ return GSM4_ERROR;
+ }
+
+ int16_t output_buffer_length = 0;
+ int16_t carry_on_bits = 1;
+ int16_t i = 0;
+
+ for ( ; i < sms_text_length - 1; ++i )
+ {
+ output_buffer[ output_buffer_length++ ] =
+ ( ( sms_text[ i ] & BITMASK_7BITS ) >> ( carry_on_bits - 1 ) ) |
+ ( ( sms_text[ i + 1 ] & BITMASK_7BITS ) << ( 8 - carry_on_bits ) );
+ carry_on_bits++;
+ if ( carry_on_bits == 8 )
+ {
+ carry_on_bits = 1;
+ ++i;
+ }
+ }
+
+ if ( i < sms_text_length )
+ {
+ output_buffer[ output_buffer_length++ ] = ( sms_text[ i ] & BITMASK_7BITS ) >> ( carry_on_bits - 1 );
+ }
+
+ return output_buffer_length;
+}
+
+static int16_t encode_phone_number ( uint8_t *phone_number, uint8_t *output_buffer, uint16_t buffer_size )
+{
+ int16_t output_buffer_length = 0;
+ int16_t phone_number_length = strlen( phone_number );
+
+ // Check if the output buffer is big enough.
+ if ( ( phone_number_length + 1 ) / 2 > buffer_size )
+ {
+ return GSM4_ERROR;
+ }
+
+ int16_t i = 0;
+ for ( ; i < phone_number_length; ++i )
+ {
+ if ( phone_number[ i ] < '0' && phone_number[ i ] > '9' )
+ {
+ return GSM4_ERROR;
+ }
+
+ if ( i % 2 == 0 )
+ {
+ output_buffer[ output_buffer_length++ ] = BITMASK_HIGH_4BITS | ( phone_number[ i ] - '0' );
+ }
+ else
+ {
+ output_buffer[ output_buffer_length - 1 ] =
+ ( output_buffer[ output_buffer_length - 1 ] & BITMASK_LOW_4BITS ) |
+ ( ( phone_number[ i ] - '0' ) << 4 );
+ }
+ }
+
+ return output_buffer_length;
+}
+
+static void gsm4_str_cut_chr ( uint8_t *str, uint8_t chr )
+{
+ uint16_t cnt_0, cnt_1;
+ for ( cnt_0 = 0; cnt_0 < strlen( str ); cnt_0++ )
+ {
+ if ( str[ cnt_0 ] == chr )
+ {
+ for ( cnt_1 = cnt_0; cnt_1 < strlen( str ); cnt_1++ )
+ {
+ str[ cnt_1 ] = str[ cnt_1 + 1 ];
+ }
+ }
+ }
+}
+
+// ------------------------------------------------------------------------- END
diff --git a/clicks/gsm4/memake.txt b/clicks/gsm4/memake.txt
deleted file mode 100644
index 843d7c0333..0000000000
--- a/clicks/gsm4/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Gsm4
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/gyro6/CMakeLists.txt b/clicks/gyro6/CMakeLists.txt
new file mode 100644
index 0000000000..8a5a8b7570
--- /dev/null
+++ b/clicks/gyro6/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_gyro6 LANGUAGES MikroC)
+else()
+ project(example_gyro6 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_gyro6
+ example/main.c
+
+)
+
+
+############################ example_gyro6 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_gyro6 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_gyro6 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_gyro6 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_gyro6)
+target_link_libraries(example_gyro6 PUBLIC Click.Gyro6)
+############################ example_gyro6 GENERATED CODE END ###########################
diff --git a/clicks/gyro6/changelog.md b/clicks/gyro6/changelog.md
index b96039c092..0426704bc7 100644
--- a/clicks/gyro6/changelog.md
+++ b/clicks/gyro6/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.3
+### Version 2.1.0.3
- Initial release
diff --git a/clicks/gyro6/doc/doxy/Doxyfile.doxy b/clicks/gyro6/doc/doxy/Doxyfile.doxy
index 8456785d55..9f48c12bc4 100644
--- a/clicks/gyro6/doc/doxy/Doxyfile.doxy
+++ b/clicks/gyro6/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/gyro6/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/gyro6/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/gyro6/example \
- ../clicks/gyro6/lib/include \
- ../clicks/gyro6/README.md
+INPUT = ../cmake/gyro6/example \
+ ../cmake/gyro6/lib_gyro6/include \
+ ../cmake/gyro6/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/gyro6/example
+EXAMPLE_PATH = ../cmake/gyro6/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/gyro6/doc/package/manifest.json b/clicks/gyro6/doc/package/manifest.json
index f3055354f1..7c76f19bb4 100644
--- a/clicks/gyro6/doc/package/manifest.json
+++ b/clicks/gyro6/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Motion",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Motion",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Gyro 6 click",
"example_list": [
@@ -26,11 +25,11 @@
"name": "mikroe.click.gyro6",
"product_link": "https://www.mikroe.com/gyro-6-click",
"short_description": "Gyro 6 Click is a compact add-on board that contains a high-performance gyroscope. This board features the IAM-20380, a 3-axis, digital-output X-, Y-, and Z-axis angular rate sensor (gyroscope) from TDK InvenSense. It has a full-scale programmable range of ±250DPS, ±500DPS, ±1000DPS, and ±2000DPS with a factory-calibrated initial sensitivity and configurable host interface that supports both SPI and I2C serial communication.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.3"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.3",
+ "cmake": true,
+ "alias": "Click.Gyro6",
+ "subdir_name": "lib_gyro6"
}
-
-
-
diff --git a/clicks/gyro6/example/CMakeLists.txt b/clicks/gyro6/example/CMakeLists.txt
new file mode 100644
index 0000000000..55a40bbcb3
--- /dev/null
+++ b/clicks/gyro6/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_gyro6 LANGUAGES MikroC)
+else()
+ project(example_gyro6 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_gyro6
+ main.c
+
+)
+
+
+############################ example_gyro6 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_gyro6 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_gyro6 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_gyro6 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_gyro6)
+target_link_libraries(example_gyro6 PUBLIC Click.Gyro6)
+############################ example_gyro6 GENERATED CODE END ###########################
diff --git a/clicks/gyro6/example/manifest.exm b/clicks/gyro6/example/manifest.exm
index 0a31f58ab2..482ae96563 100644
--- a/clicks/gyro6/example/manifest.exm
+++ b/clicks/gyro6/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Gyro 6 Click",
"description": "Gyro 6 Click is a compact add-on board that contains a high-performance gyroscope. This board features the IAM-20380, a 3-axis, digital-output X-, Y-, and Z-axis angular rate sensor (gyroscope) from TDK InvenSense. It has a full-scale programmable range of ±250DPS, ±500DPS, ±1000DPS, and ±2000DPS with a factory-calibrated initial sensitivity and configurable host interface that supports both SPI and I2C serial communication.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","IAM-20380"],
"category" : ["Motion"]
}
diff --git a/clicks/gyro6/example/memake.txt b/clicks/gyro6/example/memake.txt
deleted file mode 100644
index ceae9599db..0000000000
--- a/clicks/gyro6/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_gyro6
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Gyro6
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/gyro6/lib/memake.txt b/clicks/gyro6/lib/memake.txt
deleted file mode 100644
index e84545de98..0000000000
--- a/clicks/gyro6/lib/memake.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-type: library
-target: lib_gyro6
-
-#begin python
-import re
-
-if ( re.match("(^PIC18F(.+)[KQ]4[23]$)|(^PIC32(.+)$)",MEMAKE_MCU_NAME) ):
- sample_mode_reg_case = "SAMPLE_REG_CASE_1"
-else:
- sample_mode_reg_case = "SAMPLE_REG_CASE_2"
-#end python
-
-defines: {
- <[sample_mode_reg_case]>
-}
-
-sources: {
- src/gyro6.c
-}
-
-headers: {
- include/gyro6.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/gyro6.h) dst(include/gyro6.h)
- src(include/spi_specifics.h) dst(include/spi_specifics.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.Gyro6
diff --git a/clicks/gyro6/lib_gyro6/CMakeLists.txt b/clicks/gyro6/lib_gyro6/CMakeLists.txt
new file mode 100644
index 0000000000..7d56e74fc0
--- /dev/null
+++ b/clicks/gyro6/lib_gyro6/CMakeLists.txt
@@ -0,0 +1,34 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_gyro6 LANGUAGES MikroC)
+else()
+ project(lib_gyro6 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_gyro6 STATIC
+ src/gyro6.c
+ include/gyro6.h
+)
+add_library(Click.Gyro6 ALIAS lib_gyro6)
+
+if (${MCU_NAME} MATCHES "(^PIC18F(.+)[KQ]4[23]$)|(^PIC32(.+)$)")
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_1")
+else()
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_2")
+endif()
+
+target_compile_definitions(lib_gyro6 PUBLIC ${sample_mode_reg_case})
+
+
+target_include_directories(lib_gyro6 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_gyro6 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_gyro6 PUBLIC MikroSDK.Driver)
diff --git a/clicks/gyro6/lib_gyro6/include/Click.Gyro6 b/clicks/gyro6/lib_gyro6/include/Click.Gyro6
new file mode 100644
index 0000000000..2921fd4825
--- /dev/null
+++ b/clicks/gyro6/lib_gyro6/include/Click.Gyro6
@@ -0,0 +1 @@
+#include "gyro6.h"
diff --git a/clicks/gyro6/lib/include/gyro6.h b/clicks/gyro6/lib_gyro6/include/gyro6.h
similarity index 100%
rename from clicks/gyro6/lib/include/gyro6.h
rename to clicks/gyro6/lib_gyro6/include/gyro6.h
diff --git a/clicks/hbridgedriver2/lib/include/spi_specifics.h b/clicks/gyro6/lib_gyro6/include/spi_specifics.h
similarity index 100%
rename from clicks/hbridgedriver2/lib/include/spi_specifics.h
rename to clicks/gyro6/lib_gyro6/include/spi_specifics.h
diff --git a/clicks/gyro6/lib/src/gyro6.c b/clicks/gyro6/lib_gyro6/src/gyro6.c
similarity index 100%
rename from clicks/gyro6/lib/src/gyro6.c
rename to clicks/gyro6/lib_gyro6/src/gyro6.c
diff --git a/clicks/gyro6/memake.txt b/clicks/gyro6/memake.txt
deleted file mode 100644
index 8f205ad800..0000000000
--- a/clicks/gyro6/memake.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-type: subdirs
-
-project: Gyro6
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/hallcurrent/CHANGELOG.md b/clicks/hallcurrent/CHANGELOG.md
index 4edeeb3aab..ac23ae3dc2 100644
--- a/clicks/hallcurrent/CHANGELOG.md
+++ b/clicks/hallcurrent/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.6
+### Version 2.1.0.6
- Initial release
diff --git a/clicks/hallcurrent/CMakeLists.txt b/clicks/hallcurrent/CMakeLists.txt
new file mode 100644
index 0000000000..33a130c7b9
--- /dev/null
+++ b/clicks/hallcurrent/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_hallcurrent LANGUAGES MikroC)
+else()
+ project(example_hallcurrent LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_hallcurrent
+ example/main.c
+
+)
+
+
+############################ example_hallcurrent GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_hallcurrent PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_hallcurrent PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_hallcurrent PUBLIC MikroSDK.Log)
+add_subdirectory(lib_hallcurrent)
+target_link_libraries(example_hallcurrent PUBLIC Click.HallCurrent)
+############################ example_hallcurrent GENERATED CODE END ###########################
diff --git a/clicks/hallcurrent/DETAILS.md b/clicks/hallcurrent/DETAILS.md
index bf1f33b455..747601b2ca 100644
--- a/clicks/hallcurrent/DETAILS.md
+++ b/clicks/hallcurrent/DETAILS.md
@@ -2,7 +2,7 @@
---
# Hall Current click
-Hall current click is a high precision current sensor. It carries a galvanically isolated TLI4970-D050T4 miniature magnetic digital current sensor that utilizes the Hall effect to measure electric current.
+> Hall Current Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4970-D050T4, a 16-bit digital SPI output (13-bit current value) coreless magnetic current sensor designed for the current range of ±25A from Infineon Technology. A differential measurement principle allows effective stray field suppression with a highly linear output signal without hysteresis. Due to the integrated primary conductor (current rail), there is no need for external calibration. The TLI4970-D050T4 is highly accurate over temperature range and lifetime with fast overcurrent detection with a configurable threshold.
@@ -35,27 +35,36 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void hallcurrent_cfg_setup ( hallcurrent_cfg_t *cfg );
-
-- Initialization function.
-> HALLCURRENT_RETVAL hallcurrent_init ( hallcurrent_t *ctx, hallcurrent_cfg_t *cfg );
+- `hallcurrent_cfg_setup` Config Object Initialization function.
+```c
+void hallcurrent_cfg_setup ( hallcurrent_cfg_t *cfg );
+```
+- `hallcurrent_init` Initialization function.
+```c
+err_t hallcurrent_init ( hallcurrent_t *ctx, hallcurrent_cfg_t *cfg );
+```
#### Example key functions :
-- Generic read 16-bit data function
-> hallcurrent_read_data ( hallcurrent_t *ctx )
-
-- Check status of read data function.
-> hallcurrent_chack_status ( hallcurrent_t *ctx )
+- `hallcurrent_read_data` Generic read 16-bit data function
+```c
+uint16_t hallcurrent_read_data ( hallcurrent_t *ctx );
+```
+
+- `hallcurrent_check_status` Check status of read data function.
+```c
+uint8_t hallcurrent_check_status ( hallcurrent_t *ctx );
+```
-- Read electric current function
-> hallcurrent_read_current ( hallcurrent_t *ctx )
+- `hallcurrent_read_current` Read electric current function
+```c
+float hallcurrent_read_current ( hallcurrent_t *ctx );
+```
## Examples Description
-> The application is current sensor.
+> The application is current sensor.
**The demo application is composed of two sections :**
@@ -84,11 +93,12 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
hallcurrent_cfg_setup( &cfg );
HALLCURRENT_MAP_MIKROBUS( cfg, MIKROBUS_1 );
hallcurrent_init( &hallcurrent, &cfg );
-
+
+ HALLCURRENT_SET_DATA_SAMPLE_EDGE;
+
log_printf( &logger,"------------------------\r\n" );
log_printf( &logger, " Hall Current \r\n" );
log_printf( &logger, "------------------------\r\n" );
@@ -98,22 +108,15 @@ void application_init ( void )
### Application Task
-> This is a example which demonstrates the use of Hall Current Click board.
+> This is an example which demonstrates the use of Hall Current Click board.
```c
void application_task ( void )
{
- float current_read_float;
- current_read_float = hallcurrent_read_current( &hallcurrent );
-
- Delay_ms( 100 );
-
- log_printf( &logger, " Current : %f ", current_read_float );
- log_printf( &logger, " [ A ] \r\n" );
+ log_printf( &logger, " Current : %.3f A \r\n", hallcurrent_read_current( &hallcurrent ) );
log_printf( &logger, "------------------------\r\n" );
-
- Delay_ms( 5000 );
+ Delay_ms( 1000 );
}
```
diff --git a/clicks/hallcurrent/README.md b/clicks/hallcurrent/README.md
index ae3de9d0b8..7fd3690b93 100644
--- a/clicks/hallcurrent/README.md
+++ b/clicks/hallcurrent/README.md
@@ -1,11 +1,9 @@
\mainpage Main Page
-
-
---
# Hall Current click
-Hall current click is a high precision current sensor. It carries a galvanically isolated TLI4970-D050T4 miniature magnetic digital current sensor that utilizes the Hall effect to measure electric current.
+> Hall Current Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4970-D050T4, a 16-bit digital SPI output (13-bit current value) coreless magnetic current sensor designed for the current range of ±25A from Infineon Technology. A differential measurement principle allows effective stray field suppression with a highly linear output signal without hysteresis. Due to the integrated primary conductor (current rail), there is no need for external calibration. The TLI4970-D050T4 is highly accurate over temperature range and lifetime with fast overcurrent detection with a configurable threshold.
@@ -38,27 +36,36 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void hallcurrent_cfg_setup ( hallcurrent_cfg_t *cfg );
-
-- Initialization function.
-> HALLCURRENT_RETVAL hallcurrent_init ( hallcurrent_t *ctx, hallcurrent_cfg_t *cfg );
+- `hallcurrent_cfg_setup` Config Object Initialization function.
+```c
+void hallcurrent_cfg_setup ( hallcurrent_cfg_t *cfg );
+```
+- `hallcurrent_init` Initialization function.
+```c
+err_t hallcurrent_init ( hallcurrent_t *ctx, hallcurrent_cfg_t *cfg );
+```
#### Example key functions :
-- Generic read 16-bit data function
-> hallcurrent_read_data ( hallcurrent_t *ctx )
-
-- Check status of read data function.
-> hallcurrent_chack_status ( hallcurrent_t *ctx )
+- `hallcurrent_read_data` Generic read 16-bit data function
+```c
+uint16_t hallcurrent_read_data ( hallcurrent_t *ctx );
+```
+
+- `hallcurrent_check_status` Check status of read data function.
+```c
+uint8_t hallcurrent_check_status ( hallcurrent_t *ctx );
+```
-- Read electric current function
-> hallcurrent_read_current ( hallcurrent_t *ctx )
+- `hallcurrent_read_current` Read electric current function
+```c
+float hallcurrent_read_current ( hallcurrent_t *ctx );
+```
## Examples Description
-> The application is current sensor.
+> The application is current sensor.
**The demo application is composed of two sections :**
@@ -87,11 +94,12 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
hallcurrent_cfg_setup( &cfg );
HALLCURRENT_MAP_MIKROBUS( cfg, MIKROBUS_1 );
hallcurrent_init( &hallcurrent, &cfg );
-
+
+ HALLCURRENT_SET_DATA_SAMPLE_EDGE;
+
log_printf( &logger,"------------------------\r\n" );
log_printf( &logger, " Hall Current \r\n" );
log_printf( &logger, "------------------------\r\n" );
@@ -101,22 +109,15 @@ void application_init ( void )
### Application Task
-> This is a example which demonstrates the use of Hall Current Click board.
+> This is an example which demonstrates the use of Hall Current Click board.
```c
void application_task ( void )
{
- float current_read_float;
- current_read_float = hallcurrent_read_current( &hallcurrent );
-
- Delay_ms( 100 );
-
- log_printf( &logger, " Current : %f ", current_read_float );
- log_printf( &logger, " [ A ] \r\n" );
+ log_printf( &logger, " Current : %.3f A \r\n", hallcurrent_read_current( &hallcurrent ) );
log_printf( &logger, "------------------------\r\n" );
-
- Delay_ms( 5000 );
+ Delay_ms( 1000 );
}
```
diff --git a/clicks/hallcurrent/doc/doxy/Doxyfile.doxy b/clicks/hallcurrent/doc/doxy/Doxyfile.doxy
index 01fc143b91..5a4359e88d 100644
--- a/clicks/hallcurrent/doc/doxy/Doxyfile.doxy
+++ b/clicks/hallcurrent/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/hallcurrent/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/hallcurrent/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/hallcurrent/example \
- ../clicks/hallcurrent/lib/include \
- ../clicks/hallcurrent/README.md
+INPUT = ../cmake/hallcurrent/example \
+ ../cmake/hallcurrent/lib_hallcurrent/include \
+ ../cmake/hallcurrent/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/hallcurrent/example
+EXAMPLE_PATH = ../cmake/hallcurrent/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/hallcurrent/doc/package/manifest.json b/clicks/hallcurrent/doc/package/manifest.json
index 2009995cbb..e93e380806 100644
--- a/clicks/hallcurrent/doc/package/manifest.json
+++ b/clicks/hallcurrent/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Current sensor",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Current sensor",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+ "dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Hall Current click",
"example_list": [
@@ -25,19 +24,15 @@
},
"name": "mikroe.click.hallcurrent",
"product_link": "https://www.mikroe.com/hall-current-click",
- "short_description": "The application is current sensor.",
- "supported_compiler": "mikroC AI",
+ "short_description": "Hall Current Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4970-D050T4, a 16-bit digital SPI output (13-bit current value) coreless magnetic current sensor designed for the current range of ±25A from Infineon Technology. A differential measurement principle allows effective stray field suppression with a highly linear output signal without hysteresis. Due to the integrated primary conductor (current rail), there is no need for external calibration. The TLI4970-D050T4 is highly accurate over temperature range and lifetime with fast overcurrent detection with a configurable threshold.",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "_type": "mikroSDK Library",
+ "related_projects": [
1039
],
- "_type": "mikroSDK Library",
- "version": "2.0.0.6"
+ "version": "2.1.0.6",
+ "cmake": true,
+ "alias": "Click.HallCurrent",
+ "subdir_name": "lib_hallcurrent"
}
-
-
-
-
-
-
diff --git a/clicks/hallcurrent/example/CMakeLists.txt b/clicks/hallcurrent/example/CMakeLists.txt
new file mode 100644
index 0000000000..ac23a7f10c
--- /dev/null
+++ b/clicks/hallcurrent/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_hallcurrent LANGUAGES MikroC)
+else()
+ project(example_hallcurrent LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_hallcurrent
+ main.c
+
+)
+
+
+############################ example_hallcurrent GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_hallcurrent PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_hallcurrent PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_hallcurrent PUBLIC MikroSDK.Log)
+add_subdirectory(lib_hallcurrent)
+target_link_libraries(example_hallcurrent PUBLIC Click.HallCurrent)
+############################ example_hallcurrent GENERATED CODE END ###########################
diff --git a/clicks/hallcurrent/example/main.c b/clicks/hallcurrent/example/main.c
index bc146fcd78..11b75fd4c6 100644
--- a/clicks/hallcurrent/example/main.c
+++ b/clicks/hallcurrent/example/main.c
@@ -3,7 +3,7 @@
* \brief HallCurrent Click example
*
* # Description
- * The application is current sensor.
+ * The application is current sensor.
*
* The demo application is composed of two sections :
*
@@ -11,8 +11,7 @@
* Initialization driver enable's - SPI and start write log.
*
* ## Application Task
- * This is a example which demonstrates the use of Hall Current Click board.
- *
+ * This is an example which demonstrates the use of Hall Current Click board.
*
* \author MikroE Team
*
@@ -49,11 +48,12 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
hallcurrent_cfg_setup( &cfg );
HALLCURRENT_MAP_MIKROBUS( cfg, MIKROBUS_1 );
hallcurrent_init( &hallcurrent, &cfg );
-
+
+ HALLCURRENT_SET_DATA_SAMPLE_EDGE;
+
log_printf( &logger,"------------------------\r\n" );
log_printf( &logger, " Hall Current \r\n" );
log_printf( &logger, "------------------------\r\n" );
@@ -61,15 +61,9 @@ void application_init ( void )
void application_task ( void )
{
- float current_read_float;
-
- current_read_float = hallcurrent_read_current( &hallcurrent );
- Delay_ms( 100 );
-
- log_printf( &logger, " Current : %f A \r\n", current_read_float );
+ log_printf( &logger, " Current : %.3f A \r\n", hallcurrent_read_current( &hallcurrent ) );
log_printf( &logger, "------------------------\r\n" );
-
- Delay_ms( 5000 );
+ Delay_ms( 1000 );
}
void main ( void )
diff --git a/clicks/hallcurrent/example/manifest.exm b/clicks/hallcurrent/example/manifest.exm
index 88bebf94b5..86b63ecdf8 100644
--- a/clicks/hallcurrent/example/manifest.exm
+++ b/clicks/hallcurrent/example/manifest.exm
@@ -1,8 +1,8 @@
{
"name": "Hall current Click",
- "description": "Hall current click is a high precision current sensor. It carries a galvanically isolated TLI4970-D050T4 miniature magnetic digital current sensor that utilizes the Hall effect to measure electric current.",
+ "description": "Hall Current Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4970-D050T4, a 16-bit digital SPI output (13-bit current value) coreless magnetic current sensor designed for the current range of ±25A from Infineon Technology. A differential measurement principle allows effective stray field suppression with a highly linear output signal without hysteresis. Due to the integrated primary conductor (current rail), there is no need for external calibration. The TLI4970-D050T4 is highly accurate over temperature range and lifetime with fast overcurrent detection with a configurable threshold.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","TLI4970-D050T4"],
"category" : ["Magnetic"]
}
diff --git a/clicks/hallcurrent/example/memake.txt b/clicks/hallcurrent/example/memake.txt
deleted file mode 100644
index c460fe7ae9..0000000000
--- a/clicks/hallcurrent/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_hallcurrent
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.HallCurrent
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/hallcurrent/lib/memake.txt b/clicks/hallcurrent/lib/memake.txt
deleted file mode 100644
index d39a02600e..0000000000
--- a/clicks/hallcurrent/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_hallcurrent
-
-alias: Click.HallCurrent
-
-sources: {
- src/hallcurrent.c
-}
-
-headers: {
- include/hallcurrent.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/hallcurrent.h) dst(include/hallcurrent.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/hallcurrent/lib_hallcurrent/CMakeLists.txt b/clicks/hallcurrent/lib_hallcurrent/CMakeLists.txt
new file mode 100644
index 0000000000..a99e310db9
--- /dev/null
+++ b/clicks/hallcurrent/lib_hallcurrent/CMakeLists.txt
@@ -0,0 +1,33 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_hallcurrent LANGUAGES MikroC)
+else()
+ project(lib_hallcurrent LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_hallcurrent STATIC
+ src/hallcurrent.c
+ include/hallcurrent.h
+)
+add_library(Click.HallCurrent ALIAS lib_hallcurrent)
+
+if (${MCU_NAME} MATCHES "(^PIC18F(.+)[KQ]4[23]$)|(^PIC32(.+)$)")
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_1")
+else()
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_2")
+endif()
+
+target_compile_definitions(lib_hallcurrent PUBLIC ${sample_mode_reg_case})
+
+target_include_directories(lib_hallcurrent PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_hallcurrent PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_hallcurrent PUBLIC MikroSDK.Driver)
diff --git a/clicks/hallcurrent/lib_hallcurrent/include/Click.HallCurrent b/clicks/hallcurrent/lib_hallcurrent/include/Click.HallCurrent
new file mode 100644
index 0000000000..aae130211c
--- /dev/null
+++ b/clicks/hallcurrent/lib_hallcurrent/include/Click.HallCurrent
@@ -0,0 +1 @@
+#include "hallcurrent.h"
diff --git a/clicks/hallcurrent/lib/include/hallcurrent.h b/clicks/hallcurrent/lib_hallcurrent/include/hallcurrent.h
similarity index 71%
rename from clicks/hallcurrent/lib/include/hallcurrent.h
rename to clicks/hallcurrent/lib_hallcurrent/include/hallcurrent.h
index e389d0a6a7..9d751dc6d0 100644
--- a/clicks/hallcurrent/lib/include/hallcurrent.h
+++ b/clicks/hallcurrent/lib_hallcurrent/include/hallcurrent.h
@@ -1,210 +1,201 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- * \brief This file contains API for Hall Current Click driver.
- *
- * \addtogroup hallcurrent Hall Current Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef HALLCURRENT_H
-#define HALLCURRENT_H
-
-#include "drv_digital_out.h"
-#include "drv_digital_in.h"
-#include "drv_spi_master.h"
-
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-
-#define HALLCURRENT_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
- cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
- cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
- cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
- cfg.ocd = MIKROBUS( mikrobus, MIKROBUS_INT );
-/** \} */
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define HALLCURRENT_RETVAL uint8_t
-
-#define HALLCURRENT_OK 0x00
-#define HALLCURRENT_INIT_ERROR 0xFF
-/** \} */
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
- digital_in_t ocd;
- digital_out_t cs;
-
- // Modules
-
- spi_master_t spi;
- pin_name_t chip_select;
-
-} hallcurrent_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Communication gpio pins
-
- pin_name_t miso;
- pin_name_t mosi;
- pin_name_t sck;
- pin_name_t cs;
-
- // Additional gpio pins
-
- pin_name_t ocd;
-
- // static variable
-
- uint32_t spi_speed;
- uint8_t spi_mode;
- spi_master_chip_select_polarity_t cs_polarity;
-
-} hallcurrent_cfg_t;
-
-/** \} */ // End types group
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
- */
-void hallcurrent_cfg_setup ( hallcurrent_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- * @param hallcurrent Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
- */
-HALLCURRENT_RETVAL hallcurrent_init ( hallcurrent_t *ctx, hallcurrent_cfg_t *cfg );
-
-/**
- * @brief Generic transfer function.
- *
- * @param ctx Click object.
- * @param wr_buf Write data buffer
- * @param wr_len Number of byte in write data buffer
- * @param rd_buf Read data buffer
- * @param rd_len Number of byte in read data buffer
- *
- * @description Generic SPI transfer, for sending and receiving packages
- */
-void hallcurrent_generic_transfer
-(
- hallcurrent_t *ctx,
- uint8_t *wr_buf,
- uint16_t wr_len,
- uint8_t *rd_buf,
- uint16_t rd_len
-);
-
-/**
-**
- * @brief Generic read 16-bit data function
- *
- * @return result 16-bit read data
- *
- * @description Function read the 16-bit data from the target register address
- * of TLI4970-D050T4 miniature magnetic digital current sensor
- */
-uint16_t hallcurrent_read_data ( hallcurrent_t *ctx );
-
-/**
-**
- * @brief Check status of read data function.
- *
- * @return status
- * - 0 : OK, Sensor Value Message.
- * - 1 : ERROR, Sensor Status Message.
- *
- * @description Function read the 16-bit data from the target register address
- * and return 0 if data is valid or 1 of data not valid.
- */
-uint8_t hallcurrent_chack_status ( hallcurrent_t *ctx );
-
-/**
-**
- * @brief Read electric current function
- *
- * @return result float electric current data
- *
- * @description Generic SPI transfer, for sending and receiving packages
- */
-float hallcurrent_read_current ( hallcurrent_t *ctx );
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _HALLCURRENT_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ * \brief This file contains API for Hall Current Click driver.
+ *
+ * \addtogroup hallcurrent Hall Current Click Driver
+ * @{
+ */
+// ----------------------------------------------------------------------------
+
+#ifndef HALLCURRENT_H
+#define HALLCURRENT_H
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_spi_master.h"
+#include "spi_specifics.h"
+
+
+// -------------------------------------------------------------- PUBLIC MACROS
+/**
+ * \defgroup macros Macros
+ * \{
+ */
+
+/**
+ * \defgroup map_mikrobus MikroBUS
+ * \{
+ */
+
+#define HALLCURRENT_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
+ cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
+ cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
+ cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
+ cfg.ocd = MIKROBUS( mikrobus, MIKROBUS_INT );
+/** \} */
+
+/**
+ * \defgroup error_code Error Code
+ * \{
+ */
+#define HALLCURRENT_OK 0
+#define HALLCURRENT_ERROR -1
+/** \} */
+
+/**
+ * @brief Data sample selection.
+ * @details This macro sets data samples for SPI modules.
+ * @note Available only on Microchip PIC family devices.
+ * This macro will set data sampling for all SPI modules on MCU.
+ * Can be overwritten with @b hallcurrent_init which will set
+ * @b SET_SPI_DATA_SAMPLE_MIDDLE by default on the mapped mikrobus.
+ */
+#define HALLCURRENT_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
+#define HALLCURRENT_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
+
+/** \} */ // End group macro
+// --------------------------------------------------------------- PUBLIC TYPES
+/**
+ * \defgroup type Types
+ * \{
+ */
+
+/**
+ * @brief Click ctx object definition.
+ */
+typedef struct
+{
+ digital_in_t ocd;
+
+ // Modules
+ spi_master_t spi;
+ pin_name_t chip_select;
+
+} hallcurrent_t;
+
+/**
+ * @brief Click configuration structure definition.
+ */
+typedef struct
+{
+ // Communication gpio pins
+ pin_name_t miso;
+ pin_name_t mosi;
+ pin_name_t sck;
+ pin_name_t cs;
+
+ // Additional gpio pins
+ pin_name_t ocd;
+
+ // static variable
+ uint32_t spi_speed;
+ spi_master_mode_t spi_mode;
+ spi_master_chip_select_polarity_t cs_polarity;
+
+} hallcurrent_cfg_t;
+
+/** \} */ // End types group
+// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
+
+/**
+ * \defgroup public_function Public function
+ * \{
+ */
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+/**
+ * @brief Config Object Initialization function.
+ *
+ * @param cfg Click configuration structure.
+ *
+ * @details This function initializes click configuration structure to init state.
+ * @note All used pins will be set to unconnected state.
+ */
+void hallcurrent_cfg_setup ( hallcurrent_cfg_t *cfg );
+
+/**
+ * @brief Initialization function.
+ * @param hallcurrent Click object.
+ * @param cfg Click configuration structure.
+ *
+ * @details This function initializes all necessary pins and peripherals used for this click.
+ */
+err_t hallcurrent_init ( hallcurrent_t *ctx, hallcurrent_cfg_t *cfg );
+
+/**
+ * @brief Generic read 16-bit data function
+ *
+ * @return 16-bit read data
+ *
+ * @details Function read the 16-bit data from the target register address
+ * of TLI4970-D050T4 miniature magnetic digital current sensor
+ */
+uint16_t hallcurrent_read_data ( hallcurrent_t *ctx );
+
+/**
+ * @brief Check status of read data function.
+ *
+ * @return status
+ * - 0 : OK, Sensor Value Message.
+ * - 1 : ERROR, Sensor Status Message.
+ *
+ * @details Function read the 16-bit data from the target register address
+ * and return 0 if data is valid or 1 of data not valid.
+ */
+uint8_t hallcurrent_check_status ( hallcurrent_t *ctx );
+
+/**
+ * @brief Read electric current function
+ *
+ * @return float electric current data
+ *
+ * @details Function read the current data and return 0 if data is not valid.
+ */
+float hallcurrent_read_current ( hallcurrent_t *ctx );
+
+/**
+ * @brief Read OCD pin state function
+ *
+ * @return Pin logic state
+ *
+ * @details Reads the OCD pin logic state.
+ */
+uint8_t hallcurrent_get_ocd_pin ( hallcurrent_t *ctx );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _HALLCURRENT_H_
+
+/** \} */ // End public_function group
+/// \} // End click Driver group
+/*! @} */
+// ------------------------------------------------------------------------- END
diff --git a/clicks/inclinometer2/lib/include/spi_specifics.h b/clicks/hallcurrent/lib_hallcurrent/include/spi_specifics.h
similarity index 100%
rename from clicks/inclinometer2/lib/include/spi_specifics.h
rename to clicks/hallcurrent/lib_hallcurrent/include/spi_specifics.h
diff --git a/clicks/hallcurrent/lib/src/hallcurrent.c b/clicks/hallcurrent/lib_hallcurrent/src/hallcurrent.c
similarity index 66%
rename from clicks/hallcurrent/lib/src/hallcurrent.c
rename to clicks/hallcurrent/lib_hallcurrent/src/hallcurrent.c
index 9c14132e78..7ee523df76 100644
--- a/clicks/hallcurrent/lib/src/hallcurrent.c
+++ b/clicks/hallcurrent/lib_hallcurrent/src/hallcurrent.c
@@ -1,158 +1,158 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- */
-
-#include "hallcurrent.h"
-
-// ------------------------------------------------------------- PRIVATE MACROS
-
-#define HALLCURRENT_DUMMY 0
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void hallcurrent_cfg_setup ( hallcurrent_cfg_t *cfg )
-{
- // Communication gpio pins
-
- cfg->sck = HAL_PIN_NC;
- cfg->miso = HAL_PIN_NC;
- cfg->mosi = HAL_PIN_NC;
- cfg->cs = HAL_PIN_NC;
-
- // Additional gpio pins
-
- cfg->ocd = HAL_PIN_NC;
-
- cfg->spi_speed = 100000;
- cfg->spi_mode = SPI_MASTER_MODE_0;
- cfg->cs_polarity = SPI_MASTER_CHIP_SELECT_POLARITY_ACTIVE_LOW;
-}
-
-HALLCURRENT_RETVAL hallcurrent_init ( hallcurrent_t *ctx, hallcurrent_cfg_t *cfg )
-{
- spi_master_config_t spi_cfg;
-
- spi_master_configure_default( &spi_cfg );
- spi_cfg.speed = cfg->spi_speed;
- spi_cfg.sck = cfg->sck;
- spi_cfg.miso = cfg->miso;
- spi_cfg.mosi = cfg->mosi;
- spi_cfg.default_write_data = HALLCURRENT_DUMMY;
-
- digital_out_init( &ctx->cs, cfg->cs );
- ctx->chip_select = cfg->cs;
-
- if ( spi_master_open( &ctx->spi, &spi_cfg ) == SPI_MASTER_ERROR )
- {
- return HALLCURRENT_INIT_ERROR;
- }
-
- spi_master_set_default_write_data( &ctx->spi, HALLCURRENT_DUMMY );
- spi_master_set_speed( &ctx->spi, cfg->spi_speed );
- spi_master_set_mode( &ctx->spi, cfg->spi_mode );
- spi_master_set_chip_select_polarity( cfg->cs_polarity );
-
- digital_in_init( &ctx->ocd, cfg->ocd );
-
- return HALLCURRENT_OK;
-}
-
-void hallcurrent_generic_transfer
-(
- hallcurrent_t *ctx,
- uint8_t *wr_buf,
- uint16_t wr_len,
- uint8_t *rd_buf,
- uint16_t rd_len
-)
-{
- spi_master_select_device( ctx->chip_select );
- spi_master_write_then_read( &ctx->spi, wr_buf, wr_len, rd_buf, rd_len );
- spi_master_deselect_device( ctx->chip_select );
-}
-
-uint16_t hallcurrent_read_data ( hallcurrent_t *ctx )
-{
- uint8_t buffer[ 2 ];
- uint16_t result;
-
- spi_master_select_device( ctx->chip_select );
-
- spi_master_read( &ctx->spi, buffer, 2 );
-
- result = buffer[ 0 ];
- result <<= 8;
- result |= buffer[ 1 ];
-
- return result;
-}
-
-uint8_t hallcurrent_chack_status( hallcurrent_t *ctx )
-{
- uint16_t read_value;
-
- read_value = hallcurrent_read_data( ctx );
-
- if ( ( read_value >> 15 ) == 0 )
- {
- return 0;
- }
- else
- {
- return 1;
- }
-}
-
-float hallcurrent_read_current( hallcurrent_t *ctx )
-{
- float result;
- uint16_t current_value;
-
- result = 0.0;
-
- current_value = hallcurrent_read_data( ctx );
-
- if ( !hallcurrent_chack_status( ctx ) )
- {
- current_value &= 0x1FFF;
-
- current_value -= 4096;
-
- result = ( float ) current_value;
- result *= 0.0125;
- }
-
- if ( result > 50 )
- {
- result = 0.0;
- }
- return result;
-}
-
-// ------------------------------------------------------------------------- END
-
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ */
+
+#include "hallcurrent.h"
+
+// ------------------------------------------------------------- PRIVATE MACROS
+
+#define HALLCURRENT_DUMMY 0
+
+// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
+
+void hallcurrent_cfg_setup ( hallcurrent_cfg_t *cfg )
+{
+ // Communication gpio pins
+ cfg->sck = HAL_PIN_NC;
+ cfg->miso = HAL_PIN_NC;
+ cfg->mosi = HAL_PIN_NC;
+ cfg->cs = HAL_PIN_NC;
+
+ // Additional gpio pins
+ cfg->ocd = HAL_PIN_NC;
+
+ cfg->spi_speed = 100000;
+ cfg->spi_mode = SPI_MASTER_MODE_1;
+ cfg->cs_polarity = SPI_MASTER_CHIP_SELECT_POLARITY_ACTIVE_LOW;
+}
+
+err_t hallcurrent_init ( hallcurrent_t *ctx, hallcurrent_cfg_t *cfg )
+{
+ spi_master_config_t spi_cfg;
+
+ spi_master_configure_default( &spi_cfg );
+
+ spi_cfg.sck = cfg->sck;
+ spi_cfg.miso = cfg->miso;
+ spi_cfg.mosi = cfg->mosi;
+
+ ctx->chip_select = cfg->cs;
+
+ if ( SPI_MASTER_ERROR == spi_master_open( &ctx->spi, &spi_cfg ) )
+ {
+ return SPI_MASTER_ERROR;
+ }
+
+ if ( SPI_MASTER_ERROR == spi_master_set_default_write_data( &ctx->spi, HALLCURRENT_DUMMY ) )
+ {
+ return SPI_MASTER_ERROR;
+ }
+
+ if ( SPI_MASTER_ERROR == spi_master_set_mode( &ctx->spi, cfg->spi_mode ) )
+ {
+ return SPI_MASTER_ERROR;
+ }
+
+ if ( SPI_MASTER_ERROR == spi_master_set_speed( &ctx->spi, cfg->spi_speed ) )
+ {
+ return SPI_MASTER_ERROR;
+ }
+
+ spi_master_set_chip_select_polarity( cfg->cs_polarity );
+ spi_master_deselect_device( ctx->chip_select );
+
+ digital_in_init( &ctx->ocd, cfg->ocd );
+
+ return HALLCURRENT_OK;
+}
+
+uint16_t hallcurrent_read_data ( hallcurrent_t *ctx )
+{
+ uint8_t buffer[ 2 ] = { 0 };
+ uint16_t result = 0;
+
+ spi_master_select_device( ctx->chip_select );
+
+ spi_master_read( &ctx->spi, buffer, 2 );
+
+ spi_master_deselect_device( ctx->chip_select );
+
+ result = buffer[ 0 ];
+ result <<= 8;
+ result |= buffer[ 1 ];
+
+ return result;
+}
+
+uint8_t hallcurrent_check_status( hallcurrent_t *ctx )
+{
+ uint16_t read_value = 0;
+
+ read_value = hallcurrent_read_data( ctx );
+
+ if ( ( read_value >> 15 ) == 0 )
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
+}
+
+float hallcurrent_read_current( hallcurrent_t *ctx )
+{
+ float result = 0;
+ uint16_t current_value = 0;
+
+ current_value = hallcurrent_read_data( ctx );
+
+ if ( !hallcurrent_check_status( ctx ) )
+ {
+ current_value &= 0x1FFF;
+
+ current_value -= 4096;
+
+ result = ( float ) current_value;
+ result *= 0.0125;
+ }
+
+ if ( result > 50 )
+ {
+ result = 0.0;
+ }
+ return result;
+}
+
+uint8_t hallcurrent_get_ocd_pin ( hallcurrent_t *ctx )
+{
+ return digital_in_read ( &ctx->ocd );
+}
+
+// ------------------------------------------------------------------------- END
+
diff --git a/clicks/hallcurrent/memake.txt b/clicks/hallcurrent/memake.txt
deleted file mode 100644
index 6a0099f8f8..0000000000
--- a/clicks/hallcurrent/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: HallCurrent
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/hallcurrent10/CMakeLists.txt b/clicks/hallcurrent10/CMakeLists.txt
new file mode 100644
index 0000000000..f82caaf844
--- /dev/null
+++ b/clicks/hallcurrent10/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_hallcurrent10 LANGUAGES MikroC)
+else()
+ project(example_hallcurrent10 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_hallcurrent10
+ example/main.c
+
+)
+
+
+############################ example_hallcurrent10 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_hallcurrent10 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_hallcurrent10 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_hallcurrent10 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_hallcurrent10)
+target_link_libraries(example_hallcurrent10 PUBLIC Click.HallCurrent10)
+############################ example_hallcurrent10 GENERATED CODE END ###########################
diff --git a/clicks/hallcurrent10/README.md b/clicks/hallcurrent10/README.md
index 01ecdadc1c..96106b8331 100644
--- a/clicks/hallcurrent10/README.md
+++ b/clicks/hallcurrent10/README.md
@@ -3,7 +3,7 @@
---
# Hall Current 10 click
-Hall Current 10 Click is a compact add-on board that provides economical and precise AC or DC current sensing solutions. This board features the ACHS-7194, a fully integrated Hall-effect-based isolated linear current sensor designed for the current range of ±40A from Broadcom Limited. Inside ACHS-7194 is a precise, low-offset, linear Hall circuit with a copper conduction path located near the surface of the die. Applied current flowing through this copper conduction path generates a magnetic field that the differential Hall sensors convert into a proportional voltage, where after that, the user is given the option to process the output voltage as an analog or digital value. This Click board™ is suitable for AC or DC current-sensing in industrial, commercial, and communications systems.
+> Hall Current 10 Click is a compact add-on board that provides economical and precise AC or DC current sensing solutions. This board features the ACHS-7194, a fully integrated Hall-effect-based isolated linear current sensor designed for the current range of ±40A from Broadcom Limited. Inside ACHS-7194 is a precise, low-offset, linear Hall circuit with a copper conduction path located near the surface of the die. Applied current flowing through this copper conduction path generates a magnetic field that the differential Hall sensors convert into a proportional voltage, where after that, the user is given the option to process the output voltage as an analog or digital value. This Click board™ is suitable for AC or DC current-sensing in industrial, commercial, and communications systems.
@@ -43,7 +43,7 @@ void hallcurrent10_cfg_setup ( hallcurrent10_cfg_t *cfg );
- `hallcurrent10_init` Initialization function.
```c
-HALLCURRENT10_RETVAL hallcurrent10_init ( hallcurrent10_t *ctx, hallcurrent10_cfg_t *cfg );
+err_t hallcurrent10_init ( hallcurrent10_t *ctx, hallcurrent10_cfg_t *cfg );
```
- `hallcurrent10_default_cfg` Click Default Configuration function.
@@ -55,17 +55,17 @@ void hallcurrent10_default_cfg ( hallcurrent10_t *ctx );
- `hallcurrent10_read_adc` Hall Current 10 I2C ADC reading function.
```c
-HALLCURRENT10_RETVAL hallcurrent10_read_adc ( hallcurrent10_t *ctx, uint16_t *read_adc );
+err_t hallcurrent10_read_adc ( hallcurrent10_t *ctx, uint16_t *read_adc );
```
- `hallcurrent10_get_adc_volatge` Hall Current 10 get ADC voltage function.
```c
-HALLCURRENT10_RETVAL hallcurrent10_get_adc_voltage ( hallcurrent10_t *ctx, float *adc_vtg );
+err_t hallcurrent10_get_adc_voltage ( hallcurrent10_t *ctx, float *adc_vtg );
```
- `hallcurrent10_get_current` Hall Current 10 get current function.
```c
-HALLCURRENT10_RETVAL hallcurrent10_get_current ( hallcurrent10_t *ctx, float *current );
+err_t hallcurrent10_get_current ( hallcurrent10_t *ctx, float *current );
```
## Example Description
@@ -103,16 +103,13 @@ void application_init ( void )
// Click initialization.
hallcurrent10_cfg_setup( &hallcurrent10_cfg );
HALLCURRENT10_MAP_MIKROBUS( hallcurrent10_cfg, MIKROBUS_1 );
- err_t init_flag = hallcurrent10_init( &hallcurrent10, &hallcurrent10_cfg );
- if ( I2C_MASTER_ERROR == init_flag )
+ if ( I2C_MASTER_ERROR == hallcurrent10_init( &hallcurrent10, &hallcurrent10_cfg ) )
{
log_info( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
- hallcurrent10_default_cfg ( &hallcurrent10 );
log_info( &logger, " Application Task " );
log_printf( &logger, "--------------------------\r\n" );
Delay_ms( 100 );
@@ -134,7 +131,7 @@ void application_task ( void )
log_printf( &logger, " ADC Value : %d \r\n", adc_data );
Delay_ms( 100 );
- hallcurrent10_get_adc_volatge( &hallcurrent10, &adc_voltage );
+ hallcurrent10_get_adc_voltage( &hallcurrent10, &adc_voltage );
log_printf( &logger, " ADC Voltage : %.2f mV \r\n", adc_voltage );
log_printf( &logger, "- - - - - - - - - - - - -\r\n" );
Delay_ms( 100 );
diff --git a/clicks/hallcurrent10/changelog.md b/clicks/hallcurrent10/changelog.md
index 8a902bbfaf..ca09ef759f 100644
--- a/clicks/hallcurrent10/changelog.md
+++ b/clicks/hallcurrent10/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.4
+### Version 2.1.0.4
- Initial release
diff --git a/clicks/hallcurrent10/details.md b/clicks/hallcurrent10/details.md
index b55771f48e..3a692d715b 100644
--- a/clicks/hallcurrent10/details.md
+++ b/clicks/hallcurrent10/details.md
@@ -2,7 +2,7 @@
---
# Hall Current 10 click
-Hall Current 10 Click is a compact add-on board that provides economical and precise AC or DC current sensing solutions. This board features the ACHS-7194, a fully integrated Hall-effect-based isolated linear current sensor designed for the current range of ±40A from Broadcom Limited. Inside ACHS-7194 is a precise, low-offset, linear Hall circuit with a copper conduction path located near the surface of the die. Applied current flowing through this copper conduction path generates a magnetic field that the differential Hall sensors convert into a proportional voltage, where after that, the user is given the option to process the output voltage as an analog or digital value. This Click board™ is suitable for AC or DC current-sensing in industrial, commercial, and communications systems.
+> Hall Current 10 Click is a compact add-on board that provides economical and precise AC or DC current sensing solutions. This board features the ACHS-7194, a fully integrated Hall-effect-based isolated linear current sensor designed for the current range of ±40A from Broadcom Limited. Inside ACHS-7194 is a precise, low-offset, linear Hall circuit with a copper conduction path located near the surface of the die. Applied current flowing through this copper conduction path generates a magnetic field that the differential Hall sensors convert into a proportional voltage, where after that, the user is given the option to process the output voltage as an analog or digital value. This Click board™ is suitable for AC or DC current-sensing in industrial, commercial, and communications systems.
@@ -42,7 +42,7 @@ void hallcurrent10_cfg_setup ( hallcurrent10_cfg_t *cfg );
- `hallcurrent10_init` Initialization function.
```c
-HALLCURRENT10_RETVAL hallcurrent10_init ( hallcurrent10_t *ctx, hallcurrent10_cfg_t *cfg );
+err_t hallcurrent10_init ( hallcurrent10_t *ctx, hallcurrent10_cfg_t *cfg );
```
- `hallcurrent10_default_cfg` Click Default Configuration function.
@@ -54,17 +54,17 @@ void hallcurrent10_default_cfg ( hallcurrent10_t *ctx );
- `hallcurrent10_read_adc` Hall Current 10 I2C ADC reading function.
```c
-HALLCURRENT10_RETVAL hallcurrent10_read_adc ( hallcurrent10_t *ctx, uint16_t *read_adc );
+err_t hallcurrent10_read_adc ( hallcurrent10_t *ctx, uint16_t *read_adc );
```
- `hallcurrent10_get_adc_volatge` Hall Current 10 get ADC voltage function.
```c
-HALLCURRENT10_RETVAL hallcurrent10_get_adc_voltage ( hallcurrent10_t *ctx, float *adc_vtg );
+err_t hallcurrent10_get_adc_voltage ( hallcurrent10_t *ctx, float *adc_vtg );
```
- `hallcurrent10_get_current` Hall Current 10 get current function.
```c
-HALLCURRENT10_RETVAL hallcurrent10_get_current ( hallcurrent10_t *ctx, float *current );
+err_t hallcurrent10_get_current ( hallcurrent10_t *ctx, float *current );
```
## Example Description
@@ -102,16 +102,13 @@ void application_init ( void )
// Click initialization.
hallcurrent10_cfg_setup( &hallcurrent10_cfg );
HALLCURRENT10_MAP_MIKROBUS( hallcurrent10_cfg, MIKROBUS_1 );
- err_t init_flag = hallcurrent10_init( &hallcurrent10, &hallcurrent10_cfg );
- if ( I2C_MASTER_ERROR == init_flag )
+ if ( I2C_MASTER_ERROR == hallcurrent10_init( &hallcurrent10, &hallcurrent10_cfg ) )
{
log_info( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
- hallcurrent10_default_cfg ( &hallcurrent10 );
log_info( &logger, " Application Task " );
log_printf( &logger, "--------------------------\r\n" );
Delay_ms( 100 );
@@ -133,7 +130,7 @@ void application_task ( void )
log_printf( &logger, " ADC Value : %d \r\n", adc_data );
Delay_ms( 100 );
- hallcurrent10_get_adc_volatge( &hallcurrent10, &adc_voltage );
+ hallcurrent10_get_adc_voltage( &hallcurrent10, &adc_voltage );
log_printf( &logger, " ADC Voltage : %.2f mV \r\n", adc_voltage );
log_printf( &logger, "- - - - - - - - - - - - -\r\n" );
Delay_ms( 100 );
diff --git a/clicks/hallcurrent10/doc/doxy/Doxyfile.doxy b/clicks/hallcurrent10/doc/doxy/Doxyfile.doxy
index 98b3ab6a6d..22e07cb112 100644
--- a/clicks/hallcurrent10/doc/doxy/Doxyfile.doxy
+++ b/clicks/hallcurrent10/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/hallcurrent10/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/hallcurrent10/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/hallcurrent10/example \
- ../clicks/hallcurrent10/lib/include \
- ../clicks/hallcurrent10/README.md
+INPUT = ../cmake/hallcurrent10/example \
+ ../cmake/hallcurrent10/lib_hallcurrent10/include \
+ ../cmake/hallcurrent10/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/hallcurrent10/example
+EXAMPLE_PATH = ../cmake/hallcurrent10/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/hallcurrent10/doc/package/manifest.json b/clicks/hallcurrent10/doc/package/manifest.json
index 42fa9d58b7..bb48cad5c1 100644
--- a/clicks/hallcurrent10/doc/package/manifest.json
+++ b/clicks/hallcurrent10/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Current sensor",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Current sensor",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Hall Current 10 click",
"example_list": [
@@ -26,11 +25,11 @@
"name": "mikroe.click.hallcurrent10",
"product_link": "https://www.mikroe.com/hall-current-10-click",
"short_description": "Hall Current 10 Click is a compact add-on board that provides economical and precise AC or DC current sensing solutions. This board features the ACHS-7194, a fully integrated Hall-effect-based isolated linear current sensor designed for the current range of ±40A from Broadcom Limited. Inside ACHS-7194 is a precise, low-offset, linear Hall circuit with a copper conduction path located near the surface of the die. Applied current flowing through this copper conduction path generates a magnetic field that the differential Hall sensors convert into a proportional voltage, where after that, the user is given the option to process the output voltage as an analog or digital value. This Click board™ is suitable for AC or DC current-sensing in industrial, commercial, and communications systems.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.4"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.4",
+ "cmake": true,
+ "alias": "Click.HallCurrent10",
+ "subdir_name": "lib_hallcurrent10"
}
-
-
-
diff --git a/clicks/hallcurrent10/example/CMakeLists.txt b/clicks/hallcurrent10/example/CMakeLists.txt
new file mode 100644
index 0000000000..b2a9ecc3d6
--- /dev/null
+++ b/clicks/hallcurrent10/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_hallcurrent10 LANGUAGES MikroC)
+else()
+ project(example_hallcurrent10 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_hallcurrent10
+ main.c
+
+)
+
+
+############################ example_hallcurrent10 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_hallcurrent10 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_hallcurrent10 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_hallcurrent10 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_hallcurrent10)
+target_link_libraries(example_hallcurrent10 PUBLIC Click.HallCurrent10)
+############################ example_hallcurrent10 GENERATED CODE END ###########################
diff --git a/clicks/hallcurrent10/example/main.c b/clicks/hallcurrent10/example/main.c
index d22dcfe23b..e1219d5c97 100644
--- a/clicks/hallcurrent10/example/main.c
+++ b/clicks/hallcurrent10/example/main.c
@@ -52,16 +52,13 @@ void application_init ( void )
// Click initialization.
hallcurrent10_cfg_setup( &hallcurrent10_cfg );
HALLCURRENT10_MAP_MIKROBUS( hallcurrent10_cfg, MIKROBUS_1 );
- err_t init_flag = hallcurrent10_init( &hallcurrent10, &hallcurrent10_cfg );
- if ( I2C_MASTER_ERROR == init_flag )
+ if ( I2C_MASTER_ERROR == hallcurrent10_init( &hallcurrent10, &hallcurrent10_cfg ) )
{
log_info( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
- hallcurrent10_default_cfg ( &hallcurrent10 );
log_info( &logger, " Application Task " );
log_printf( &logger, "--------------------------\r\n" );
Delay_ms( 100 );
@@ -73,7 +70,7 @@ void application_task ( void )
log_printf( &logger, " ADC Value : %d \r\n", adc_data );
Delay_ms( 100 );
- hallcurrent10_get_adc_volatge( &hallcurrent10, &adc_voltage );
+ hallcurrent10_get_adc_voltage( &hallcurrent10, &adc_voltage );
log_printf( &logger, " ADC Voltage : %.2f mV \r\n", adc_voltage );
log_printf( &logger, "- - - - - - - - - - - - -\r\n" );
Delay_ms( 100 );
diff --git a/clicks/hallcurrent10/example/manifest.exm b/clicks/hallcurrent10/example/manifest.exm
index 3f748ca104..778e616118 100644
--- a/clicks/hallcurrent10/example/manifest.exm
+++ b/clicks/hallcurrent10/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Hall Current 10 Click",
"description": "slave_address = cfg->i2c_address;
- if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR )
+ if ( I2C_MASTER_ERROR == i2c_master_open( &ctx->i2c, &i2c_cfg ) )
{
return I2C_MASTER_ERROR;
}
- if ( i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address ) == I2C_MASTER_ERROR )
+ if ( I2C_MASTER_ERROR == i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address ) )
{
return I2C_MASTER_ERROR;
}
- if ( i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) == I2C_MASTER_ERROR )
+ if ( I2C_MASTER_ERROR == i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) )
{
return I2C_MASTER_ERROR;
}
@@ -74,17 +74,11 @@ err_t hallcurrent10_init ( hallcurrent10_t *ctx, hallcurrent10_cfg_t *cfg )
return I2C_MASTER_SUCCESS;
}
-err_t hallcurrent10_default_cfg ( hallcurrent10_t *ctx )
-{
- uint16_t read_adc;
-
- return hallcurrent10_read_adc( ctx, &read_adc );
-}
err_t hallcurrent10_read_adc ( hallcurrent10_t *ctx, uint16_t *read_adc )
{
- uint8_t rx_buf[ 2 ];
- uint16_t adc_val;
+ uint8_t rx_buf[ 2 ] = { 0 };
+ uint16_t adc_val = 0;
err_t err_flag = i2c_master_read( &ctx->i2c, rx_buf, 2 );
@@ -100,7 +94,7 @@ err_t hallcurrent10_read_adc ( hallcurrent10_t *ctx, uint16_t *read_adc )
err_t hallcurrent10_get_adc_voltage ( hallcurrent10_t *ctx, float *adc_vtg )
{
- uint16_t adc_val;
+ uint16_t adc_val = 0;
err_t err_flag = hallcurrent10_read_adc( ctx, &adc_val );
@@ -115,10 +109,11 @@ err_t hallcurrent10_get_adc_voltage ( hallcurrent10_t *ctx, float *adc_vtg )
err_t hallcurrent10_get_current ( hallcurrent10_t *ctx, float *current )
{
float adc_vtg_sum = 0;
- float adc_vtg;
- err_t err_flag;
+ float adc_vtg = 0;
+ err_t err_flag = 0;
+ uint8_t n_cnt = 0;
- for ( uint8_t n_cnt = 0; n_cnt < HALLCURRENT10_ADC_NUM_OF_MEASURE; n_cnt++ )
+ for ( n_cnt = 0; n_cnt < HALLCURRENT10_ADC_NUM_OF_MEASURE; n_cnt++ )
{
err_flag |= hallcurrent10_get_adc_voltage( ctx, &adc_vtg );
adc_vtg_sum += adc_vtg;
diff --git a/clicks/hallcurrent10/memake.txt b/clicks/hallcurrent10/memake.txt
deleted file mode 100644
index 0d8e320609..0000000000
--- a/clicks/hallcurrent10/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: HallCurrent10
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/hallcurrent12/CMakeLists.txt b/clicks/hallcurrent12/CMakeLists.txt
new file mode 100644
index 0000000000..08f11f3a62
--- /dev/null
+++ b/clicks/hallcurrent12/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_hallcurrent12 LANGUAGES MikroC)
+else()
+ project(example_hallcurrent12 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_hallcurrent12
+ example/main.c
+
+)
+
+
+############################ example_hallcurrent12 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_hallcurrent12 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_hallcurrent12 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_hallcurrent12 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_hallcurrent12)
+target_link_libraries(example_hallcurrent12 PUBLIC Click.HallCurrent12)
+############################ example_hallcurrent12 GENERATED CODE END ###########################
diff --git a/clicks/hallcurrent12/README.md b/clicks/hallcurrent12/README.md
index dbdd9a8adb..fc994aa547 100644
--- a/clicks/hallcurrent12/README.md
+++ b/clicks/hallcurrent12/README.md
@@ -18,7 +18,7 @@
- **Author** : Nenad Filipovic
- **Date** : Jul 2021.
-- **Type** : I2C type
+- **Type** : ADC/I2C type
# Software Support
@@ -46,21 +46,16 @@ void hallcurrent12_cfg_setup ( hallcurrent12_cfg_t *cfg );
err_t hallcurrent12_init ( hallcurrent12_t *ctx, hallcurrent12_cfg_t *cfg );
```
-- `hallcurrent12_default_cfg` Click Default Configuration function.
-```c
-err_t hallcurrent12_default_cfg ( hallcurrent12_t *ctx );
-```
-
#### Example key functions :
-- `hallcurrent12_get_adc` Hall Current 12 get ADC function.
+- `hallcurrent12_calibration` Hall Current 12 calibration function.
```c
-err_t hallcurrent12_get_adc ( hallcurrent12_t *ctx, uint16_t *data_out );
+err_t hallcurrent12_calibration ( hallcurrent12_t *ctx )
```
-- `hallcurrent12_get_adc_voltage` Hall Current 12 get ADC voltage function.
+- `hallcurrent12_get_adc` Hall Current 12 get ADC function.
```c
-err_t hallcurrent12_get_adc_voltage ( hallcurrent12_t *ctx, float *adc_vtg );
+err_t hallcurrent12_get_adc ( hallcurrent12_t *ctx, float *adc_vtg );
```
- `hallcurrent12_get_current` Hall Current 12 get current function.
@@ -70,15 +65,13 @@ err_t hallcurrent12_get_current ( hallcurrent12_t *ctx, float *current );
## Example Description
-> This library contains API for Hall Current 12 Click driver.
-> The demo application reads ADC value and current ( A ).
+> This library contains API for Hall Current 12 Click driver. The demo application reads ADC voltage ( V ) and current ( A ).
**The demo application is composed of two sections :**
### Application Init
-> Initializes I2C driver and log UART.
-> After driver initialization the app set default settings.
+> Initializes the driver and logger and calibrates the device offset.
```c
@@ -103,16 +96,24 @@ void application_init ( void )
// Click initialization.
hallcurrent12_cfg_setup( &hallcurrent12_cfg );
HALLCURRENT12_MAP_MIKROBUS( hallcurrent12_cfg, MIKROBUS_1 );
- err_t init_flag = hallcurrent12_init( &hallcurrent12, &hallcurrent12_cfg );
- if ( I2C_MASTER_ERROR == init_flag )
+ if ( I2C_MASTER_ERROR == hallcurrent12_init( &hallcurrent12, &hallcurrent12_cfg ) )
{
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
+
+ log_info( &logger, " Calibrating device, remove input current in the next 5 seconds..." );
+ Delay_ms( 5000 );
+
+ if ( I2C_MASTER_ERROR == hallcurrent12_calibration ( &hallcurrent12 ) )
+ {
+ log_error( &logger, " Calibration Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
+ log_info( &logger, " Calibration done!" );
- hallcurrent12_default_cfg ( &hallcurrent12 );
log_info( &logger, " Application Task " );
log_printf( &logger, "--------------------------\r\n" );
Delay_ms( 100 );
@@ -123,23 +124,24 @@ void application_init ( void )
### Application Task
> This is an example that demonstrates the use of the Hall Current 12 Click board™.
-> In this example, we read and display the ADC values and current ( A ) data.
+> In this example, we read and display the ADC voltage ( V ) and current ( A ) data.
> Results are being sent to the Usart Terminal where you can track their changes.
```c
void application_task ( void )
{
- static uint16_t adc_data;
- static float current;
-
- hallcurrent12_get_adc( &hallcurrent12, &adc_data );
- log_printf( &logger, " ADC Value : %d \r\n", adc_data );
- Delay_ms( 100 );
-
- hallcurrent12_get_current ( &hallcurrent12, ¤t );
- log_printf( &logger, " Current : %.3f A \r\n", current );
- log_printf( &logger, "--------------------------\r\n" );
+ static float adc_voltage = 0;
+ static float current = 0;
+ if ( HALLCURRENT12_OK == hallcurrent12_get_adc( &hallcurrent12, &adc_voltage ) )
+ {
+ log_printf( &logger, " ADC voltage : %.3f V \r\n", adc_voltage );
+ }
+ if ( HALLCURRENT12_OK == hallcurrent12_get_current ( &hallcurrent12, ¤t ) )
+ {
+ log_printf( &logger, " Current : %.3f A \r\n", current );
+ log_printf( &logger, "--------------------------\r\n" );
+ }
Delay_ms( 1000 );
}
@@ -149,8 +151,8 @@ void application_task ( void )
> Switches:
> Sensitivity : Low ( GAIN = 1 ),
-> Vout_Sel : ADC ( I2C serial interface ),
-> Vref_Sel : GND ( unidirectional measurement ).
+> Vout_Sel : AN ( Analog interface ),
+> Vref_Sel : VCC/2 ( bidirectional measurement ).
The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
diff --git a/clicks/hallcurrent12/changelog.md b/clicks/hallcurrent12/changelog.md
index 34c1de4c45..0426704bc7 100644
--- a/clicks/hallcurrent12/changelog.md
+++ b/clicks/hallcurrent12/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.2
+### Version 2.1.0.3
- Initial release
diff --git a/clicks/hallcurrent12/details.md b/clicks/hallcurrent12/details.md
index 3d2bfc2983..b33a609e30 100644
--- a/clicks/hallcurrent12/details.md
+++ b/clicks/hallcurrent12/details.md
@@ -17,7 +17,7 @@
- **Author** : Nenad Filipovic
- **Date** : Jul 2021.
-- **Type** : I2C type
+- **Type** : ADC/I2C type
# Software Support
@@ -45,21 +45,16 @@ void hallcurrent12_cfg_setup ( hallcurrent12_cfg_t *cfg );
err_t hallcurrent12_init ( hallcurrent12_t *ctx, hallcurrent12_cfg_t *cfg );
```
-- `hallcurrent12_default_cfg` Click Default Configuration function.
-```c
-err_t hallcurrent12_default_cfg ( hallcurrent12_t *ctx );
-```
-
#### Example key functions :
-- `hallcurrent12_get_adc` Hall Current 12 get ADC function.
+- `hallcurrent12_calibration` Hall Current 12 calibration function.
```c
-err_t hallcurrent12_get_adc ( hallcurrent12_t *ctx, uint16_t *data_out );
+err_t hallcurrent12_calibration ( hallcurrent12_t *ctx )
```
-- `hallcurrent12_get_adc_voltage` Hall Current 12 get ADC voltage function.
+- `hallcurrent12_get_adc` Hall Current 12 get ADC function.
```c
-err_t hallcurrent12_get_adc_voltage ( hallcurrent12_t *ctx, float *adc_vtg );
+err_t hallcurrent12_get_adc ( hallcurrent12_t *ctx, float *adc_vtg );
```
- `hallcurrent12_get_current` Hall Current 12 get current function.
@@ -69,15 +64,13 @@ err_t hallcurrent12_get_current ( hallcurrent12_t *ctx, float *current );
## Example Description
-> This library contains API for Hall Current 12 Click driver.
-> The demo application reads ADC value and current ( A ).
+> This library contains API for Hall Current 12 Click driver. The demo application reads ADC voltage ( V ) and current ( A ).
**The demo application is composed of two sections :**
### Application Init
-> Initializes I2C driver and log UART.
-> After driver initialization the app set default settings.
+> Initializes the driver and logger and calibrates the device offset.
```c
@@ -102,16 +95,24 @@ void application_init ( void )
// Click initialization.
hallcurrent12_cfg_setup( &hallcurrent12_cfg );
HALLCURRENT12_MAP_MIKROBUS( hallcurrent12_cfg, MIKROBUS_1 );
- err_t init_flag = hallcurrent12_init( &hallcurrent12, &hallcurrent12_cfg );
- if ( I2C_MASTER_ERROR == init_flag )
+ if ( I2C_MASTER_ERROR == hallcurrent12_init( &hallcurrent12, &hallcurrent12_cfg ) )
{
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
+
+ log_info( &logger, " Calibrating device, remove input current in the next 5 seconds..." );
+ Delay_ms( 5000 );
+
+ if ( I2C_MASTER_ERROR == hallcurrent12_calibration ( &hallcurrent12 ) )
+ {
+ log_error( &logger, " Calibration Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
+ log_info( &logger, " Calibration done!" );
- hallcurrent12_default_cfg ( &hallcurrent12 );
log_info( &logger, " Application Task " );
log_printf( &logger, "--------------------------\r\n" );
Delay_ms( 100 );
@@ -122,23 +123,24 @@ void application_init ( void )
### Application Task
> This is an example that demonstrates the use of the Hall Current 12 Click board™.
-> In this example, we read and display the ADC values and current ( A ) data.
+> In this example, we read and display the ADC voltage ( V ) and current ( A ) data.
> Results are being sent to the Usart Terminal where you can track their changes.
```c
void application_task ( void )
{
- static uint16_t adc_data;
- static float current;
-
- hallcurrent12_get_adc( &hallcurrent12, &adc_data );
- log_printf( &logger, " ADC Value : %d \r\n", adc_data );
- Delay_ms( 100 );
-
- hallcurrent12_get_current ( &hallcurrent12, ¤t );
- log_printf( &logger, " Current : %.3f A \r\n", current );
- log_printf( &logger, "--------------------------\r\n" );
+ static float adc_voltage = 0;
+ static float current = 0;
+ if ( HALLCURRENT12_OK == hallcurrent12_get_adc( &hallcurrent12, &adc_voltage ) )
+ {
+ log_printf( &logger, " ADC voltage : %.3f V \r\n", adc_voltage );
+ }
+ if ( HALLCURRENT12_OK == hallcurrent12_get_current ( &hallcurrent12, ¤t ) )
+ {
+ log_printf( &logger, " Current : %.3f A \r\n", current );
+ log_printf( &logger, "--------------------------\r\n" );
+ }
Delay_ms( 1000 );
}
@@ -148,8 +150,8 @@ void application_task ( void )
> Switches:
> Sensitivity : Low ( GAIN = 1 ),
-> Vout_Sel : ADC ( I2C serial interface ),
-> Vref_Sel : GND ( unidirectional measurement ).
+> Vout_Sel : AN ( Analog interface ),
+> Vref_Sel : VCC/2 ( bidirectional measurement ).
The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
diff --git a/clicks/hallcurrent12/doc/doxy/Doxyfile.doxy b/clicks/hallcurrent12/doc/doxy/Doxyfile.doxy
index 844c1116bc..95a70079cb 100644
--- a/clicks/hallcurrent12/doc/doxy/Doxyfile.doxy
+++ b/clicks/hallcurrent12/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/hallcurrent12/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/hallcurrent12/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/hallcurrent12/example \
- ../clicks/hallcurrent12/lib/include \
- ../clicks/hallcurrent12/README.md
+INPUT = ../cmake/hallcurrent12/example \
+ ../cmake/hallcurrent12/lib_hallcurrent12/include \
+ ../cmake/hallcurrent12/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/hallcurrent12/example
+EXAMPLE_PATH = ../cmake/hallcurrent12/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/hallcurrent12/doc/package/manifest.json b/clicks/hallcurrent12/doc/package/manifest.json
index 145d93262c..d134de6578 100644
--- a/clicks/hallcurrent12/doc/package/manifest.json
+++ b/clicks/hallcurrent12/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Current sensor",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Current sensor",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Hall Current 12 click",
"example_list": [
@@ -26,9 +25,11 @@
"name": "mikroe.click.hallcurrent12",
"product_link": "https://www.mikroe.com/hall-current-12-click",
"short_description": "Hall Current 12 Click is a compact add-on board that provides economical and precise AC or DC current sensing solutions. This board features the TMCS1100, a galvanically isolated Hall-effect current sensor capable of DC or AC current measurement with high accuracy, excellent linearity, and temperature stability from Texas Instruments. It enables the lowest drift, <1% full-scale error, and highest accuracy over time and temperature. It also provides a reliable 600V lifetime working voltage and 3kVRMS isolation between the current path and circuitry with uni/bidirectional current sensing. Besides, the user is allowed to process the output signal in analog or digital form.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.2"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.3",
+ "cmake": true,
+ "alias": "Click.HallCurrent12",
+ "subdir_name": "lib_hallcurrent12"
}
-
diff --git a/clicks/hallcurrent12/example/CMakeLists.txt b/clicks/hallcurrent12/example/CMakeLists.txt
new file mode 100644
index 0000000000..591f380845
--- /dev/null
+++ b/clicks/hallcurrent12/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_hallcurrent12 LANGUAGES MikroC)
+else()
+ project(example_hallcurrent12 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_hallcurrent12
+ main.c
+
+)
+
+
+############################ example_hallcurrent12 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_hallcurrent12 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_hallcurrent12 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_hallcurrent12 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_hallcurrent12)
+target_link_libraries(example_hallcurrent12 PUBLIC Click.HallCurrent12)
+############################ example_hallcurrent12 GENERATED CODE END ###########################
diff --git a/clicks/hallcurrent12/example/main.c b/clicks/hallcurrent12/example/main.c
index 3d8717402c..575fb816d1 100644
--- a/clicks/hallcurrent12/example/main.c
+++ b/clicks/hallcurrent12/example/main.c
@@ -4,24 +4,23 @@
*
* # Description
* This library contains API for Hall Current 12 Click driver.
- * The demo application reads ADC value and current ( A ).
+ * The demo application reads ADC voltage ( V ) and current ( A ).
*
* The demo application is composed of two sections :
*
* ## Application Init
- * Initializes I2C driver and log UART.
- * After driver initialization the app set default settings.
+ * Initializes the driver and logger and calibrates the device offset.
*
* ## Application Task
* This is an example that demonstrates the use of the Hall Current 12 Click board™.
- * In this example, we read and display the ADC values and current ( A ) data.
+ * In this example, we read and display the ADC voltage ( V ) and current ( A ) data.
* Results are being sent to the Usart Terminal where you can track their changes.
*
* @note
* Switches:
* Sensitivity : Low ( GAIN = 1 ),
- * Vout_Sel : ADC ( I2C serial interface ),
- * Vref_Sel : GND ( unidirectional measurement ).
+ * Vout_Sel : AN ( Analog interface ),
+ * Vref_Sel : VCC/2 ( bidirectional measurement ).
*
* @author Nenad Filipovic
*
@@ -55,16 +54,24 @@ void application_init ( void )
// Click initialization.
hallcurrent12_cfg_setup( &hallcurrent12_cfg );
HALLCURRENT12_MAP_MIKROBUS( hallcurrent12_cfg, MIKROBUS_1 );
- err_t init_flag = hallcurrent12_init( &hallcurrent12, &hallcurrent12_cfg );
- if ( I2C_MASTER_ERROR == init_flag )
+ if ( I2C_MASTER_ERROR == hallcurrent12_init( &hallcurrent12, &hallcurrent12_cfg ) )
{
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
+
+ log_info( &logger, " Calibrating device, remove input current in the next 5 seconds..." );
+ Delay_ms( 5000 );
+
+ if ( I2C_MASTER_ERROR == hallcurrent12_calibration ( &hallcurrent12 ) )
+ {
+ log_error( &logger, " Calibration Error. " );
+ log_info( &logger, " Please, run program again... " );
+ for ( ; ; );
+ }
+ log_info( &logger, " Calibration done!" );
- hallcurrent12_default_cfg ( &hallcurrent12 );
log_info( &logger, " Application Task " );
log_printf( &logger, "--------------------------\r\n" );
Delay_ms( 100 );
@@ -72,16 +79,17 @@ void application_init ( void )
void application_task ( void )
{
- static uint16_t adc_data;
- static float current;
-
- hallcurrent12_get_adc( &hallcurrent12, &adc_data );
- log_printf( &logger, " ADC Value : %d \r\n", adc_data );
- Delay_ms( 100 );
-
- hallcurrent12_get_current ( &hallcurrent12, ¤t );
- log_printf( &logger, " Current : %.3f A \r\n", current );
- log_printf( &logger, "--------------------------\r\n" );
+ static float adc_voltage = 0;
+ static float current = 0;
+ if ( HALLCURRENT12_OK == hallcurrent12_get_adc( &hallcurrent12, &adc_voltage ) )
+ {
+ log_printf( &logger, " ADC voltage : %.3f V \r\n", adc_voltage );
+ }
+ if ( HALLCURRENT12_OK == hallcurrent12_get_current ( &hallcurrent12, ¤t ) )
+ {
+ log_printf( &logger, " Current : %.3f A \r\n", current );
+ log_printf( &logger, "--------------------------\r\n" );
+ }
Delay_ms( 1000 );
}
diff --git a/clicks/hallcurrent12/example/manifest.exm b/clicks/hallcurrent12/example/manifest.exm
index cbfb6dc9b1..b8575583bc 100644
--- a/clicks/hallcurrent12/example/manifest.exm
+++ b/clicks/hallcurrent12/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Hall Current 12 Click",
"description": "Hall Current 12 Click is a compact add-on board that provides economical and precise AC or DC current sensing solutions. This board features the TMCS1100, a galvanically isolated Hall-effect current sensor capable of DC or AC current measurement with high accuracy, excellent linearity, and temperature stability from Texas Instruments. It enables the lowest drift, <1% full-scale error, and highest accuracy over time and temperature. It also provides a reliable 600V lifetime working voltage and 3kVRMS isolation between the current path and circuitry with uni/bidirectional current sensing. Besides, the user is allowed to process the output signal in analog or digital form.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","TMCS1100A4"],
"category" : ["Current sensor"]
}
diff --git a/clicks/hallcurrent12/example/memake.txt b/clicks/hallcurrent12/example/memake.txt
deleted file mode 100644
index 5498ee6f1e..0000000000
--- a/clicks/hallcurrent12/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_hallcurrent12
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.HallCurrent12
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/hallcurrent12/lib/memake.txt b/clicks/hallcurrent12/lib/memake.txt
deleted file mode 100644
index 4299bc3ff3..0000000000
--- a/clicks/hallcurrent12/lib/memake.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-type: library
-
-target: lib_hallcurrent12
-
-sources: {
- src/hallcurrent12.c
-}
-
-headers: {
- include/hallcurrent12.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/hallcurrent12.h) dst(include/hallcurrent12.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.HallCurrent12
diff --git a/clicks/hallcurrent12/lib_hallcurrent12/CMakeLists.txt b/clicks/hallcurrent12/lib_hallcurrent12/CMakeLists.txt
new file mode 100644
index 0000000000..5548f2995d
--- /dev/null
+++ b/clicks/hallcurrent12/lib_hallcurrent12/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_hallcurrent12 LANGUAGES MikroC)
+else()
+ project(lib_hallcurrent12 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_hallcurrent12 STATIC
+ src/hallcurrent12.c
+ include/hallcurrent12.h
+)
+add_library(Click.HallCurrent12 ALIAS lib_hallcurrent12)
+
+
+
+target_include_directories(lib_hallcurrent12 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_hallcurrent12 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_hallcurrent12 PUBLIC MikroSDK.Driver)
diff --git a/clicks/hallcurrent12/lib_hallcurrent12/include/Click.HallCurrent12 b/clicks/hallcurrent12/lib_hallcurrent12/include/Click.HallCurrent12
new file mode 100644
index 0000000000..9546e962fe
--- /dev/null
+++ b/clicks/hallcurrent12/lib_hallcurrent12/include/Click.HallCurrent12
@@ -0,0 +1 @@
+#include "hallcurrent12.h"
diff --git a/clicks/hallcurrent12/lib/include/hallcurrent12.h b/clicks/hallcurrent12/lib_hallcurrent12/include/hallcurrent12.h
similarity index 85%
rename from clicks/hallcurrent12/lib/include/hallcurrent12.h
rename to clicks/hallcurrent12/lib_hallcurrent12/include/hallcurrent12.h
index 327cdd5399..a2e62e2f50 100644
--- a/clicks/hallcurrent12/lib/include/hallcurrent12.h
+++ b/clicks/hallcurrent12/lib_hallcurrent12/include/hallcurrent12.h
@@ -83,7 +83,7 @@ extern "C"{
*/
typedef enum
{
- HALLCURRENT12_DRV_SEL_AN, /**< AN driver descriptor. */
+ HALLCURRENT12_DRV_SEL_AN, /**< AN driver descriptor. */
HALLCURRENT12_DRV_SEL_I2C /**< I2C driver descriptor. */
} hallcurrent12_drv_t;
@@ -92,7 +92,7 @@ typedef enum
* @brief Hall Current 12 Click driver interface.
* @details Definition of driver interface of Hall Current 12 Click driver.
*/
-typedef err_t ( *hallcurrent12_master_io_t )( struct hallcurrent12_s*, uint16_t* );
+typedef err_t ( *hallcurrent12_master_io_t )( struct hallcurrent12_s*, float* );
/**
* @brief Hall Current 12 Click context object.
@@ -100,17 +100,17 @@ typedef err_t ( *hallcurrent12_master_io_t )( struct hallcurrent12_s*, uint16_t*
*/
typedef struct hallcurrent12_s
{
- analog_in_t adc; /**< ADC module object. */
+ analog_in_t adc; /**< ADC module object. */
- i2c_master_t i2c; /**< I2C driver object. */
+ i2c_master_t i2c; /**< I2C driver object. */
- uint8_t slave_address; /**< Device slave address (used for I2C driver). */
+ uint8_t slave_address; /**< Device slave address (used for I2C driver). */
- hallcurrent12_drv_t drv_sel; /**< Master driver interface selector. */
-
- hallcurrent12_master_io_t read_adc_f; /**< Master write function. */
+ hallcurrent12_drv_t drv_sel; /**< Master driver interface selector. */
- int16_t offset; /**< ADC offset. */
+ hallcurrent12_master_io_t read_adc_f; /**< Master write function. */
+
+ float offset; /**< Calibrated voltage offset. */
} hallcurrent12_t;
@@ -133,8 +133,6 @@ typedef struct
hallcurrent12_drv_t drv_sel; /**< Master driver interface selector. */
- int16_t adc_offset; /**< ADC offset. */
-
} hallcurrent12_cfg_t;
/**
@@ -162,8 +160,6 @@ typedef enum
* See #hallcurrent12_cfg_t object definition for detailed explanation.
* @return Nothing.
* @note The all used pins will be set to unconnected state.
- *
- * @endcode
*/
void hallcurrent12_cfg_setup ( hallcurrent12_cfg_t *cfg );
@@ -177,48 +173,25 @@ void hallcurrent12_cfg_setup ( hallcurrent12_cfg_t *cfg );
* See #hallcurrent12_cfg_t object definition for detailed explanation.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
- *
- * @endcode
*/
err_t hallcurrent12_init ( hallcurrent12_t *ctx, hallcurrent12_cfg_t *cfg );
-/**
- * @brief Hall Current 12 default configuration function.
- * @details This function executes a default configuration of Hall Current 12
- * click board.
- * @param[in] ctx : Click context object.
- * See #hallcurrent12_t object definition for detailed explanation.
- * @return @li @c 0 - Success,
- * @li @c -1 - Error.
- *
- * See #err_t definition for detailed explanation.
- * @note This function can consist any necessary configuration or setting to put
- * device into operating mode.
- *
- * @endcode
- */
-err_t hallcurrent12_default_cfg ( hallcurrent12_t *ctx );
-
/**
* @brief Hall Current 12 get ADC function.
- * @details This function reads 12-bit ADC data
+ * @details This function reads ADC voltage ( V )
* of the TMCS1100 1% High-Precision, Basic Isolation Hall-Effect Current Sensor
* on the Hall Current 12 click board™.
* @param[in] ctx : Click context object.
* See #hallcurrent12_t object definition for detailed explanation.
- * @param[out] data_out : Output ADC result.
+ * @param[out] adc_vtg : Output ADC voltage ( V ) data.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
- *
- * @endcode
*/
-err_t hallcurrent12_get_adc ( hallcurrent12_t *ctx, uint16_t *data_out );
+err_t hallcurrent12_get_adc ( hallcurrent12_t *ctx, float *adc_vtg );
/**
* @brief Hall Current 12 get ADC voltage function.
@@ -230,11 +203,8 @@ err_t hallcurrent12_get_adc ( hallcurrent12_t *ctx, uint16_t *data_out );
* @param[out] adc_vtg : Output ADC voltage ( V ) data.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
- * @note TNone.
- *
- * @endcode
+ * @note None.
*/
err_t hallcurrent12_get_adc_voltage ( hallcurrent12_t *ctx, float *adc_vtg );
@@ -248,11 +218,8 @@ err_t hallcurrent12_get_adc_voltage ( hallcurrent12_t *ctx, float *adc_vtg );
* @param[out] adc_vtg : Output current ( A ) data.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
- *
- * @endcode
*/
err_t hallcurrent12_get_current ( hallcurrent12_t *ctx, float *current );
@@ -262,16 +229,25 @@ err_t hallcurrent12_get_current ( hallcurrent12_t *ctx, float *current );
* converts them to proportional voltage level.
* @param[in] ctx : Click context object.
* See #hallcurrent12_t object definition for detailed explanation.
- * @param[out] data_out : Output voltage level of the analog pin ( V ).
+ * @param[out] adc_vtg : Output voltage level of the analog pin ( V ).
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t hallcurrent12_get_pin_voltage ( hallcurrent12_t *ctx, float *adc_vtg );
+
+/**
+ * @brief Hall Current 12 calibration function.
+ * @details This function calculates voltage offset when there's no input current applied.
+ * @param[in] ctx : Click context object.
+ * See #hallcurrent12_t object definition for detailed explanation.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
- *
- * @endcode
*/
-err_t hallcurrent12_read_an_pin_voltage ( hallcurrent12_t *ctx, float *data_out );
+err_t hallcurrent12_calibration ( hallcurrent12_t *ctx );
#ifdef __cplusplus
}
diff --git a/clicks/hallcurrent12/lib/src/hallcurrent12.c b/clicks/hallcurrent12/lib_hallcurrent12/src/hallcurrent12.c
similarity index 70%
rename from clicks/hallcurrent12/lib/src/hallcurrent12.c
rename to clicks/hallcurrent12/lib_hallcurrent12/src/hallcurrent12.c
index 02aa484c01..37b84a5cbd 100644
--- a/clicks/hallcurrent12/lib/src/hallcurrent12.c
+++ b/clicks/hallcurrent12/lib_hallcurrent12/src/hallcurrent12.c
@@ -28,12 +28,10 @@
#include "hallcurrent12.h"
#define HALLCURRENT12_DATA_12_BIT 0x0FFF
-#define HALLCURRENT12_ADC_FULL_RESOLUTION 4096.0
-#define HALLCURRENT12_VREF_3300_mV 3.3
-#define HALLCURRENT12_VCC_2 1.65
-#define HALLCURRENT12_ADC_NUM_OF_MEASURE 50.0
-#define HALLCURRENT12_CONV_TO_MILI 1000.0
-#define HALLCURRENT12_CURRENT_MULTIPLE_SENSITIVITY 400.0
+#define HALLCURRENT12_VREF_3300_mV 3.3
+#define HALLCURRENT12_VCC_2 1.65
+#define HALLCURRENT12_ADC_NUM_OF_MEASURE 200
+#define HALLCURRENT12_CURRENT_SENSITIVITY_V 0.4
/**
* @brief Hall Current 12 read AN pin value function.
@@ -46,8 +44,6 @@
*
* See #err_t definition for detailed explanation.
* @note None.
- *
- * @endcode
*/
static err_t hallcurrent12_read_an_pin_value ( hallcurrent12_t *ctx, uint16_t *data_out );
@@ -62,8 +58,6 @@ static err_t hallcurrent12_read_an_pin_value ( hallcurrent12_t *ctx, uint16_t *d
*
* See #err_t definition for detailed explanation.
* @note None.
- *
- * @endcode
*/
static err_t hallcurrent12_read_adc_value ( hallcurrent12_t *ctx, uint16_t *read_adc );
@@ -74,8 +68,6 @@ static err_t hallcurrent12_read_adc_value ( hallcurrent12_t *ctx, uint16_t *read
* @return Nothing.
*
* @note None.
- *
- * @endcode
*/
static void dev_measurement_delay ( void );
@@ -89,17 +81,15 @@ void hallcurrent12_cfg_setup ( hallcurrent12_cfg_t *cfg )
cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD;
cfg->i2c_address = HALLCURRENT12_SET_DEV_ADDR;
- cfg->resolution = ANALOG_IN_RESOLUTION_12_BIT;
+ cfg->resolution = ANALOG_IN_RESOLUTION_DEFAULT;
cfg->vref = HALLCURRENT12_VREF_3300_mV;
cfg->drv_sel = HALLCURRENT12_DRV_SEL_AN;
- cfg->adc_offset = 80;
}
err_t hallcurrent12_init ( hallcurrent12_t *ctx, hallcurrent12_cfg_t *cfg )
{
ctx->drv_sel = cfg->drv_sel;
- ctx->offset = cfg->adc_offset;
if ( HALLCURRENT12_DRV_SEL_I2C == ctx->drv_sel )
{
@@ -127,7 +117,7 @@ err_t hallcurrent12_init ( hallcurrent12_t *ctx, hallcurrent12_cfg_t *cfg )
return I2C_MASTER_ERROR;
}
- ctx->read_adc_f = hallcurrent12_read_adc_value;
+ ctx->read_adc_f = hallcurrent12_get_adc_voltage;
}
else
{
@@ -137,89 +127,93 @@ err_t hallcurrent12_init ( hallcurrent12_t *ctx, hallcurrent12_cfg_t *cfg )
adc_cfg.input_pin = cfg->an;
- if ( analog_in_open( &ctx->adc, &adc_cfg ) == ADC_ERROR ) {
+ if ( ADC_ERROR == analog_in_open( &ctx->adc, &adc_cfg ) )
+ {
return ADC_ERROR;
}
- if ( analog_in_set_vref_value( &ctx->adc, cfg->vref ) == ADC_ERROR ) {
+ if ( ADC_ERROR == analog_in_set_vref_value( &ctx->adc, cfg->vref ) )
+ {
return ADC_ERROR;
}
- if ( analog_in_set_resolution( &ctx->adc, cfg->resolution ) == ADC_ERROR ) {
+ if ( ADC_ERROR == analog_in_set_resolution( &ctx->adc, cfg->resolution ) )
+ {
return ADC_ERROR;
}
- ctx->read_adc_f = hallcurrent12_read_an_pin_value;
+ ctx->read_adc_f = hallcurrent12_get_pin_voltage;
}
return I2C_MASTER_SUCCESS;
}
-err_t hallcurrent12_default_cfg ( hallcurrent12_t *ctx )
+err_t hallcurrent12_get_adc ( hallcurrent12_t *ctx, float *adc_vtg )
{
- uint16_t adc_val;
-
- return hallcurrent12_get_adc( ctx, &adc_val );
-}
+ float adc_vtg_sum = 0;
+ float adc_vtg_tmp = 0;
+ err_t err_flag = 0;
+ uint16_t n_cnt = 0;
+
+ for ( n_cnt = 0; n_cnt < HALLCURRENT12_ADC_NUM_OF_MEASURE; n_cnt++ )
+ {
+ err_flag |= ctx->read_adc_f( ctx, &adc_vtg_tmp );
+ adc_vtg_sum += adc_vtg_tmp;
+ dev_measurement_delay( );
+ }
-err_t hallcurrent12_get_adc ( hallcurrent12_t *ctx, uint16_t *data_out )
-{
- return ctx->read_adc_f( ctx, data_out );
+ *adc_vtg = adc_vtg_sum / HALLCURRENT12_ADC_NUM_OF_MEASURE;
+ return err_flag;
}
err_t hallcurrent12_get_adc_voltage ( hallcurrent12_t *ctx, float *adc_vtg )
{
- uint16_t adc_val;
+ uint16_t adc_val = 0;
- err_t err_flag = hallcurrent12_get_adc( ctx, &adc_val );
+ err_t err_flag = hallcurrent12_read_adc_value( ctx, &adc_val );
*adc_vtg = ( float ) ( adc_val );
*adc_vtg *= HALLCURRENT12_VREF_3300_mV;
- *adc_vtg /= HALLCURRENT12_ADC_FULL_RESOLUTION;
- *adc_vtg -= HALLCURRENT12_VCC_2;
+ *adc_vtg /= HALLCURRENT12_DATA_12_BIT;
return err_flag;
}
err_t hallcurrent12_get_current ( hallcurrent12_t *ctx, float *current )
{
- float adc_vtg_sum = 0;
- float adc_vtg;
- err_t err_flag;
+ float adc_vtg = 0;
+ err_t err_flag = 0;
- for ( uint8_t n_cnt = 0; n_cnt < HALLCURRENT12_ADC_NUM_OF_MEASURE; n_cnt++ )
- {
- err_flag |= hallcurrent12_get_adc_voltage( ctx, &adc_vtg );
- adc_vtg_sum += adc_vtg;
- dev_measurement_delay( );
- }
+ err_flag |= hallcurrent12_get_adc( ctx, &adc_vtg );
+
+ adc_vtg -= ( HALLCURRENT12_VCC_2 - ctx->offset );
- *current = adc_vtg_sum;
- *current /= HALLCURRENT12_ADC_NUM_OF_MEASURE;
- *current /= HALLCURRENT12_CURRENT_MULTIPLE_SENSITIVITY;
- *current *= HALLCURRENT12_CONV_TO_MILI;
+ *current = adc_vtg / HALLCURRENT12_CURRENT_SENSITIVITY_V;
return err_flag;
}
-err_t hallcurrent12_read_an_pin_voltage ( hallcurrent12_t *ctx, float *data_out )
+err_t hallcurrent12_get_pin_voltage ( hallcurrent12_t *ctx, float *adc_vtg )
{
- return analog_in_read_voltage( &ctx->adc, data_out );
+ return analog_in_read_voltage( &ctx->adc, adc_vtg );
}
-static err_t hallcurrent12_read_an_pin_value ( hallcurrent12_t *ctx, uint16_t *data_out )
+err_t hallcurrent12_calibration ( hallcurrent12_t *ctx )
{
- err_t err_flag = analog_in_read( &ctx->adc, data_out );
-
- *data_out -= ctx->offset;
-
+ err_t err_flag = HALLCURRENT12_OK;
+ float adc_vtg = 0;
+
+ err_flag |= hallcurrent12_get_adc( ctx, &adc_vtg );
+
+ ctx->offset = HALLCURRENT12_VCC_2 - adc_vtg;
+
return err_flag;
}
static err_t hallcurrent12_read_adc_value ( hallcurrent12_t *ctx, uint16_t *read_adc )
{
- uint8_t rx_buf[ 2 ];
- uint16_t adc_val;
+ uint8_t rx_buf[ 2 ] = { 0 };
+ uint16_t adc_val = 0;
err_t err_flag = i2c_master_read( &ctx->i2c, rx_buf, 2 );
@@ -228,12 +222,13 @@ static err_t hallcurrent12_read_adc_value ( hallcurrent12_t *ctx, uint16_t *read
adc_val |= rx_buf[ 1 ];
adc_val &= HALLCURRENT12_DATA_12_BIT;
- *read_adc = adc_val - ctx->offset;
+ *read_adc = adc_val;
return err_flag;
}
-static void dev_measurement_delay ( void ) {
+static void dev_measurement_delay ( void )
+{
Delay_1ms( );
}
diff --git a/clicks/hallcurrent12/memake.txt b/clicks/hallcurrent12/memake.txt
deleted file mode 100644
index e6adf878fb..0000000000
--- a/clicks/hallcurrent12/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: HallCurrent12
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/hallcurrent8120a/CMakeLists.txt b/clicks/hallcurrent8120a/CMakeLists.txt
new file mode 100644
index 0000000000..543c4b9c80
--- /dev/null
+++ b/clicks/hallcurrent8120a/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_hallcurrent8120a LANGUAGES MikroC)
+else()
+ project(example_hallcurrent8120a LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_hallcurrent8120a
+ example/main.c
+
+)
+
+
+############################ example_hallcurrent8120a GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_hallcurrent8120a PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_hallcurrent8120a PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_hallcurrent8120a PUBLIC MikroSDK.Log)
+add_subdirectory(lib_hallcurrent8120a)
+target_link_libraries(example_hallcurrent8120a PUBLIC Click.HallCurrent8120A)
+############################ example_hallcurrent8120a GENERATED CODE END ###########################
diff --git a/clicks/hallcurrent8120a/README.md b/clicks/hallcurrent8120a/README.md
index 2c5975cb4b..4aea0ad519 100644
--- a/clicks/hallcurrent8120a/README.md
+++ b/clicks/hallcurrent8120a/README.md
@@ -3,7 +3,7 @@
---
# Hall Current 8 120A click
-Hall Current 8 Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4971-A120T5, a high-precision coreless current sensor for industrial/consumer applications from Infineon Technologies. The TLI4971-A120T5 has an analog interface and two fast overcurrent detection outputs, which support the protection of the power circuitry. Galvanic isolation is also provided according to the magnetic sensing principle. Infineon's monolithic Hall technology enables accurate and highly linear measurement of currents with a full scale up to 120A. This Click board™ is suitable for AC/DC current measurement applications: electrical drives, general-purpose inverters, chargers, current monitoring, overload, over-current detection, and many more.
+> Hall Current 8 Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4971-A120T5, a high-precision coreless current sensor for industrial/consumer applications from Infineon Technologies. The TLI4971-A120T5 has an analog interface and two fast overcurrent detection outputs, which support the protection of the power circuitry. Galvanic isolation is also provided according to the magnetic sensing principle. Infineon's monolithic Hall technology enables accurate and highly linear measurement of currents with a full scale up to 120A. This Click board™ is suitable for AC/DC current measurement applications: electrical drives, general-purpose inverters, chargers, current monitoring, overload, over-current detection, and many more.
@@ -43,24 +43,24 @@ void hallcurrent8120a_cfg_setup ( hallcurrent8120a_cfg_t *cfg );
- `hallcurrent8120a_init` Initialization function.
```c
-HALLCURRENT8120A_RETVAL hallcurrent8120a_init ( hallcurrent8120a_t *ctx, hallcurrent8120a_cfg_t *cfg );
+err_t hallcurrent8120a_init ( hallcurrent8120a_t *ctx, hallcurrent8120a_cfg_t *cfg );
```
#### Example key functions :
-- `hallcurrent8120a_calibration` This function sets the calibration value into the offset data structure of the TLI4971 high precision coreless current sensor on Hall Current 8 25A Click board.
+- `hallcurrent8120a_calibration` This function sets the calibration value into the offset data from context object of the TLI4971 high precision coreless current sensor on Hall Current 8 120A Click board.
```c
-HALLCURRENT8120A_RETVAL hallcurrent8120a_calibration ( hallcurrent8120a_t *ctx, hallcurrent8120a_offset_t *offset_val );
+err_t hallcurrent8120a_calibration ( hallcurrent8120a_t *ctx );
```
- `hallcurrent8120a_get_voltage` This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
```c
-HALLCURRENT8120A_RETVAL hallcurrent8120a_get_voltage ( hallcurrent8120a_t *ctx, float *avr_voltage );
+err_t hallcurrent8120a_get_voltage ( hallcurrent8120a_t *ctx, float *avr_voltage );
```
- `hallcurrent8120a_get_current` This function reads results of AD conversion of the AN pin and converts them to proportional current level.
```c
-HALLCURRENT8120A_RETVAL hallcurrent8120a_get_current ( hallcurrent8120a_t *ctx, hallcurrent8120a_offset_t *offset_val, float *current );
+err_t hallcurrent8120a_get_current ( hallcurrent8120a_t *ctx, float *current );
```
## Example Description
@@ -75,7 +75,8 @@ HALLCURRENT8120A_RETVAL hallcurrent8120a_get_current ( hallcurrent8120a_t *ctx,
```c
-void application_init ( void ) {
+void application_init ( void )
+{
log_cfg_t log_cfg; /**< Logger config object. */
hallcurrent8120a_cfg_t hallcurrent8120a_cfg; /**< Click config object. */
@@ -94,59 +95,57 @@ void application_init ( void ) {
// Click initialization.
- hallcurrent8120a_cfg_setup( &hallcurrent8120a_cfg );
- HALLCURRENT8120A_MAP_MIKROBUS( hallcurrent8120a_cfg, MIKROBUS_1 );
- if ( hallcurrent8120a_init( &hallcurrent8120a, &hallcurrent8120a_cfg ) == ADC_ERROR ) {
+ hallcurrent8120a_cfg_setup( &hallcurrent8120a_cfg );
+ HALLCURRENT8120A_MAP_MIKROBUS( hallcurrent8120a_cfg, MIKROBUS_1 );
+ if ( ADC_ERROR == hallcurrent8120a_init( &hallcurrent8120a, &hallcurrent8120a_cfg ) )
+ {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
- Delay_ms( 1000 );
-
- log_printf( &logger, "---------------------------\r\n" );
- log_printf( &logger, " Turn OFF the power supply \r\n" );
- Delay_ms( 5000 );
-
- log_printf( &logger, "---------------------------\r\n" );
- log_printf( &logger, " Start Calibration \r\n" );
- hallcurrent8120a_calibration ( &hallcurrent8120a, &offset_val );
- Delay_ms( 1000 );
-
- log_printf( &logger, "---------------------------\r\n");
- log_printf( &logger, " Turn ON the power supply \r\n" );
- Delay_ms( 5000 );
-
- log_printf( &logger, "---------------------------\r\n");
- log_printf( &logger, " Start measurements : \r\n");
- log_printf( &logger, "---------------------------\r\n");
+ Delay_ms( 1000 );
+
+ log_printf( &logger, "---------------------------\r\n" );
+ log_printf( &logger, " Turn OFF the power supply \r\n" );
+ Delay_ms( 5000 );
+
+ log_printf( &logger, "---------------------------\r\n" );
+ log_printf( &logger, " Start Calibration \r\n" );
+ hallcurrent8120a_calibration ( &hallcurrent8120a );
+ Delay_ms( 1000 );
+
+ log_printf( &logger, "---------------------------\r\n");
+ log_printf( &logger, " Turn ON the power supply \r\n" );
+ Delay_ms( 5000 );
+
+ log_printf( &logger, "---------------------------\r\n");
+ log_printf( &logger, " Start measurements : \r\n");
+ log_printf( &logger, "---------------------------\r\n");
}
```
### Application Task
-> This is an example that demonstrates the use of the Hall Current 8 120A click board. In this example, we read and display current data [A], ADC value and AN pin voltage level [V]. Results are being sent to the Usart Terminal where you can track their changes.
+> This is an example that demonstrates the use of the Hall Current 8 120A click board.
+In this example, we read and display current data [A], AN pin voltage level [V].
+Results are being sent to the Usart Terminal where you can track their changes.
```c
-void application_task ( void ) {
- float hallcurrent8120a_current = 0;
+void application_task ( void )
+{
+ float current = 0;
+ float avg_voltage = 0;
- if ( hallcurrent8120a_get_current ( &hallcurrent8120a, &offset_val, &hallcurrent8120a_current ) != ADC_ERROR ) {
- log_printf( &logger, " Current : %.2f [A]\r\n", hallcurrent8120a_current );
+ if ( HALLCURRENT8120A_OK == hallcurrent8120a_get_current ( &hallcurrent8120a, ¤t ) )
+ {
+ log_printf( &logger, " Current : %.2f [A]\r\n", current );
}
- uint16_t hallcurrent8120a_an_value = 0;
-
- if ( hallcurrent8120a_read_an_pin_value ( &hallcurrent8120a, &hallcurrent8120a_an_value ) != ADC_ERROR ) {
- log_printf( &logger, " ADC Value : %u\r\n", hallcurrent8120a_an_value );
- }
-
- float hallcurrent8120a_an_voltage = 0;
-
- if ( hallcurrent8120a_read_an_pin_voltage ( &hallcurrent8120a, &hallcurrent8120a_an_voltage ) != ADC_ERROR ) {
- log_printf( &logger, " AN Voltage : %.2f [V]\r\n", hallcurrent8120a_an_voltage );
+ if ( HALLCURRENT8120A_OK == hallcurrent8120a_get_voltage ( &hallcurrent8120a, &avg_voltage ) )
+ {
+ log_printf( &logger, " AN pin voltage : %.2f [V]\r\n", avg_voltage );
}
log_printf( &logger, "---------------------------\r\n");
Delay_ms( 1000 );
diff --git a/clicks/hallcurrent8120a/changelog.md b/clicks/hallcurrent8120a/changelog.md
index b96039c092..0426704bc7 100644
--- a/clicks/hallcurrent8120a/changelog.md
+++ b/clicks/hallcurrent8120a/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.3
+### Version 2.1.0.3
- Initial release
diff --git a/clicks/hallcurrent8120a/details.md b/clicks/hallcurrent8120a/details.md
index 9063220b44..9bfefc1ed8 100644
--- a/clicks/hallcurrent8120a/details.md
+++ b/clicks/hallcurrent8120a/details.md
@@ -2,7 +2,7 @@
---
# Hall Current 8 120A click
-Hall Current 8 Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4971-A120T5, a high-precision coreless current sensor for industrial/consumer applications from Infineon Technologies. The TLI4971-A120T5 has an analog interface and two fast overcurrent detection outputs, which support the protection of the power circuitry. Galvanic isolation is also provided according to the magnetic sensing principle. Infineon's monolithic Hall technology enables accurate and highly linear measurement of currents with a full scale up to 120A. This Click board™ is suitable for AC/DC current measurement applications: electrical drives, general-purpose inverters, chargers, current monitoring, overload, over-current detection, and many more.
+> Hall Current 8 Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4971-A120T5, a high-precision coreless current sensor for industrial/consumer applications from Infineon Technologies. The TLI4971-A120T5 has an analog interface and two fast overcurrent detection outputs, which support the protection of the power circuitry. Galvanic isolation is also provided according to the magnetic sensing principle. Infineon's monolithic Hall technology enables accurate and highly linear measurement of currents with a full scale up to 120A. This Click board™ is suitable for AC/DC current measurement applications: electrical drives, general-purpose inverters, chargers, current monitoring, overload, over-current detection, and many more.
@@ -42,29 +42,24 @@ void hallcurrent8120a_cfg_setup ( hallcurrent8120a_cfg_t *cfg );
- `hallcurrent8120a_init` Initialization function.
```c
-HALLCURRENT8120A_RETVAL hallcurrent8120a_init ( hallcurrent8120a_t *ctx, hallcurrent8120a_cfg_t *cfg );
-```
-
-- `hallcurrent8120a_default_cfg` Click Default Configuration function.
-```c
-void hallcurrent8120a_default_cfg ( hallcurrent8120a_t *ctx );
+err_t hallcurrent8120a_init ( hallcurrent8120a_t *ctx, hallcurrent8120a_cfg_t *cfg );
```
#### Example key functions :
-- `hallcurrent8120a_calibration` This function sets the calibration value into the offset data structure of the TLI4971 high precision coreless current sensor on Hall Current 8 25A Click board.
+- `hallcurrent8120a_calibration` This function sets the calibration value into the offset data from context object of the TLI4971 high precision coreless current sensor on Hall Current 8 120A Click board.
```c
-HALLCURRENT8120A_RETVAL hallcurrent8120a_calibration ( hallcurrent8120a_t *ctx, hallcurrent8120a_offset_t *offset_val );
+err_t hallcurrent8120a_calibration ( hallcurrent8120a_t *ctx );
```
- `hallcurrent8120a_get_voltage` This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
```c
-HALLCURRENT8120A_RETVAL hallcurrent8120a_get_voltage ( hallcurrent8120a_t *ctx, float *avr_voltage );
+err_t hallcurrent8120a_get_voltage ( hallcurrent8120a_t *ctx, float *avr_voltage );
```
- `hallcurrent8120a_get_current` This function reads results of AD conversion of the AN pin and converts them to proportional current level.
```c
-HALLCURRENT8120A_RETVAL hallcurrent8120a_get_current ( hallcurrent8120a_t *ctx, hallcurrent8120a_offset_t *offset_val, float *current );
+err_t hallcurrent8120a_get_current ( hallcurrent8120a_t *ctx, float *current );
```
## Example Description
@@ -79,7 +74,8 @@ HALLCURRENT8120A_RETVAL hallcurrent8120a_get_current ( hallcurrent8120a_t *ctx,
```c
-void application_init ( void ) {
+void application_init ( void )
+{
log_cfg_t log_cfg; /**< Logger config object. */
hallcurrent8120a_cfg_t hallcurrent8120a_cfg; /**< Click config object. */
@@ -98,59 +94,57 @@ void application_init ( void ) {
// Click initialization.
- hallcurrent8120a_cfg_setup( &hallcurrent8120a_cfg );
- HALLCURRENT8120A_MAP_MIKROBUS( hallcurrent8120a_cfg, MIKROBUS_1 );
- if ( hallcurrent8120a_init( &hallcurrent8120a, &hallcurrent8120a_cfg ) == ADC_ERROR ) {
+ hallcurrent8120a_cfg_setup( &hallcurrent8120a_cfg );
+ HALLCURRENT8120A_MAP_MIKROBUS( hallcurrent8120a_cfg, MIKROBUS_1 );
+ if ( ADC_ERROR == hallcurrent8120a_init( &hallcurrent8120a, &hallcurrent8120a_cfg ) )
+ {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
- Delay_ms( 1000 );
-
- log_printf( &logger, "---------------------------\r\n" );
- log_printf( &logger, " Turn OFF the power supply \r\n" );
- Delay_ms( 5000 );
-
- log_printf( &logger, "---------------------------\r\n" );
- log_printf( &logger, " Start Calibration \r\n" );
- hallcurrent8120a_calibration ( &hallcurrent8120a, &offset_val );
- Delay_ms( 1000 );
-
- log_printf( &logger, "---------------------------\r\n");
- log_printf( &logger, " Turn ON the power supply \r\n" );
- Delay_ms( 5000 );
-
- log_printf( &logger, "---------------------------\r\n");
- log_printf( &logger, " Start measurements : \r\n");
- log_printf( &logger, "---------------------------\r\n");
+ Delay_ms( 1000 );
+
+ log_printf( &logger, "---------------------------\r\n" );
+ log_printf( &logger, " Turn OFF the power supply \r\n" );
+ Delay_ms( 5000 );
+
+ log_printf( &logger, "---------------------------\r\n" );
+ log_printf( &logger, " Start Calibration \r\n" );
+ hallcurrent8120a_calibration ( &hallcurrent8120a );
+ Delay_ms( 1000 );
+
+ log_printf( &logger, "---------------------------\r\n");
+ log_printf( &logger, " Turn ON the power supply \r\n" );
+ Delay_ms( 5000 );
+
+ log_printf( &logger, "---------------------------\r\n");
+ log_printf( &logger, " Start measurements : \r\n");
+ log_printf( &logger, "---------------------------\r\n");
}
```
### Application Task
-> This is an example that demonstrates the use of the Hall Current 8 120A click board. In this example, we read and display current data [A], ADC value and AN pin voltage level [V]. Results are being sent to the Usart Terminal where you can track their changes.
+> This is an example that demonstrates the use of the Hall Current 8 120A click board.
+In this example, we read and display current data [A], AN pin voltage level [V].
+Results are being sent to the Usart Terminal where you can track their changes.
```c
-void application_task ( void ) {
- float hallcurrent8120a_current = 0;
+void application_task ( void )
+{
+ float current = 0;
+ float avg_voltage = 0;
- if ( hallcurrent8120a_get_current ( &hallcurrent8120a, &offset_val, &hallcurrent8120a_current ) != ADC_ERROR ) {
- log_printf( &logger, " Current : %.2f [A]\r\n", hallcurrent8120a_current );
+ if ( HALLCURRENT8120A_OK == hallcurrent8120a_get_current ( &hallcurrent8120a, ¤t ) )
+ {
+ log_printf( &logger, " Current : %.2f [A]\r\n", current );
}
- uint16_t hallcurrent8120a_an_value = 0;
-
- if ( hallcurrent8120a_read_an_pin_value ( &hallcurrent8120a, &hallcurrent8120a_an_value ) != ADC_ERROR ) {
- log_printf( &logger, " ADC Value : %u\r\n", hallcurrent8120a_an_value );
- }
-
- float hallcurrent8120a_an_voltage = 0;
-
- if ( hallcurrent8120a_read_an_pin_voltage ( &hallcurrent8120a, &hallcurrent8120a_an_voltage ) != ADC_ERROR ) {
- log_printf( &logger, " AN Voltage : %.2f [V]\r\n", hallcurrent8120a_an_voltage );
+ if ( HALLCURRENT8120A_OK == hallcurrent8120a_get_voltage ( &hallcurrent8120a, &avg_voltage ) )
+ {
+ log_printf( &logger, " AN pin voltage : %.2f [V]\r\n", avg_voltage );
}
log_printf( &logger, "---------------------------\r\n");
Delay_ms( 1000 );
diff --git a/clicks/hallcurrent8120a/doc/doxy/Doxyfile.doxy b/clicks/hallcurrent8120a/doc/doxy/Doxyfile.doxy
index 98f6233362..5b69307b2c 100644
--- a/clicks/hallcurrent8120a/doc/doxy/Doxyfile.doxy
+++ b/clicks/hallcurrent8120a/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/hallcurrent8120a/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/hallcurrent8120a/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/hallcurrent8120a/example \
- ../clicks/hallcurrent8120a/lib/include \
- ../clicks/hallcurrent8120a/README.md
+INPUT = ../cmake/hallcurrent8120a/example \
+ ../cmake/hallcurrent8120a/lib_hallcurrent8120a/include \
+ ../cmake/hallcurrent8120a/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/hallcurrent8120a/example
+EXAMPLE_PATH = ../cmake/hallcurrent8120a/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/hallcurrent8120a/doc/package/manifest.json b/clicks/hallcurrent8120a/doc/package/manifest.json
index 526316934e..2083c85a63 100644
--- a/clicks/hallcurrent8120a/doc/package/manifest.json
+++ b/clicks/hallcurrent8120a/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Current sensor",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Current sensor",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Hall Current 8 120A click",
"example_list": [
@@ -26,11 +25,11 @@
"name": "mikroe.click.hallcurrent8120a",
"product_link": "https://www.mikroe.com/hall-current-8-click-120a",
"short_description": "Hall Current 8 Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4971-A120T5, a high-precision coreless current sensor for industrial/consumer applications from Infineon Technologies. The TLI4971-A120T5 has an analog interface and two fast overcurrent detection outputs, which support the protection of the power circuitry. Galvanic isolation is also provided according to the magnetic sensing principle. Infineon's monolithic Hall technology enables accurate and highly linear measurement of currents with a full scale up to 120A. This Click board™ is suitable for AC/DC current measurement applications: electrical drives, general-purpose inverters, chargers, current monitoring, overload, over-current detection, and many more.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.3"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.3",
+ "cmake": true,
+ "alias": "Click.HallCurrent8120A",
+ "subdir_name": "lib_hallcurrent8120a"
}
-
-
-
diff --git a/clicks/hallcurrent8120a/example/CMakeLists.txt b/clicks/hallcurrent8120a/example/CMakeLists.txt
new file mode 100644
index 0000000000..f2e11e893b
--- /dev/null
+++ b/clicks/hallcurrent8120a/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_hallcurrent8120a LANGUAGES MikroC)
+else()
+ project(example_hallcurrent8120a LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_hallcurrent8120a
+ main.c
+
+)
+
+
+############################ example_hallcurrent8120a GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_hallcurrent8120a PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_hallcurrent8120a PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_hallcurrent8120a PUBLIC MikroSDK.Log)
+add_subdirectory(lib_hallcurrent8120a)
+target_link_libraries(example_hallcurrent8120a PUBLIC Click.HallCurrent8120A)
+############################ example_hallcurrent8120a GENERATED CODE END ###########################
diff --git a/clicks/hallcurrent8120a/example/main.c b/clicks/hallcurrent8120a/example/main.c
index 93a001eaae..d72f03b088 100644
--- a/clicks/hallcurrent8120a/example/main.c
+++ b/clicks/hallcurrent8120a/example/main.c
@@ -11,13 +11,11 @@
* The demo application is composed of two sections :
*
* ## Application Init
- * Initializes ADC driver, calibrate AD conversion
- * of the AN pin and start to write log.
+ * Initializes ADC driver, calibrate AD conversion of the AN pin and start to write log.
*
* ## Application Task
* This is an example that demonstrates the use of the Hall Current 8 120A click board.
- * In this example, we read and display current data [A],
- * ADC value and AN pin voltage level [V].
+ * In this example, we read and display current data [A], AN pin voltage level [V].
* Results are being sent to the Usart Terminal where you can track their changes.
*
* @author Stefan Ilic
@@ -31,9 +29,8 @@
static hallcurrent8120a_t hallcurrent8120a; /**< Hall Current 8 120A Click driver object. */
static log_t logger; /**< Logger object. */
-hallcurrent8120a_offset_t offset_val;
-
-void application_init ( void ) {
+void application_init ( void )
+{
log_cfg_t log_cfg; /**< Logger config object. */
hallcurrent8120a_cfg_t hallcurrent8120a_cfg; /**< Click config object. */
@@ -54,10 +51,10 @@ void application_init ( void ) {
hallcurrent8120a_cfg_setup( &hallcurrent8120a_cfg );
HALLCURRENT8120A_MAP_MIKROBUS( hallcurrent8120a_cfg, MIKROBUS_1 );
- if ( hallcurrent8120a_init( &hallcurrent8120a, &hallcurrent8120a_cfg ) == ADC_ERROR ) {
+ if ( ADC_ERROR == hallcurrent8120a_init( &hallcurrent8120a, &hallcurrent8120a_cfg ) )
+ {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
Delay_ms( 1000 );
@@ -68,7 +65,7 @@ void application_init ( void ) {
log_printf( &logger, "---------------------------\r\n" );
log_printf( &logger, " Start Calibration \r\n" );
- hallcurrent8120a_calibration ( &hallcurrent8120a, &offset_val );
+ hallcurrent8120a_calibration ( &hallcurrent8120a );
Delay_ms( 1000 );
log_printf( &logger, "---------------------------\r\n");
@@ -80,23 +77,19 @@ void application_init ( void ) {
log_printf( &logger, "---------------------------\r\n");
}
-void application_task ( void ) {
- float hallcurrent8120a_current = 0;
+void application_task ( void )
+{
+ float current = 0;
+ float avg_voltage = 0;
- if ( hallcurrent8120a_get_current ( &hallcurrent8120a, &offset_val, &hallcurrent8120a_current ) != ADC_ERROR ) {
- log_printf( &logger, " Current : %.2f [A]\r\n", hallcurrent8120a_current );
+ if ( HALLCURRENT8120A_OK == hallcurrent8120a_get_current ( &hallcurrent8120a, ¤t ) )
+ {
+ log_printf( &logger, " Current : %.2f [A]\r\n", current );
}
- uint16_t hallcurrent8120a_an_value = 0;
-
- if ( hallcurrent8120a_read_an_pin_value ( &hallcurrent8120a, &hallcurrent8120a_an_value ) != ADC_ERROR ) {
- log_printf( &logger, " ADC Value : %u\r\n", hallcurrent8120a_an_value );
- }
-
- float hallcurrent8120a_an_voltage = 0;
-
- if ( hallcurrent8120a_read_an_pin_voltage ( &hallcurrent8120a, &hallcurrent8120a_an_voltage ) != ADC_ERROR ) {
- log_printf( &logger, " AN Voltage : %.2f [V]\r\n", hallcurrent8120a_an_voltage );
+ if ( HALLCURRENT8120A_OK == hallcurrent8120a_get_voltage ( &hallcurrent8120a, &avg_voltage ) )
+ {
+ log_printf( &logger, " AN pin voltage : %.2f [V]\r\n", avg_voltage );
}
log_printf( &logger, "---------------------------\r\n");
Delay_ms( 1000 );
diff --git a/clicks/hallcurrent8120a/example/manifest.exm b/clicks/hallcurrent8120a/example/manifest.exm
index c2998e0f4a..5b2612402e 100644
--- a/clicks/hallcurrent8120a/example/manifest.exm
+++ b/clicks/hallcurrent8120a/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Hall Current 8 120A Click",
"description": "Hall Current 8 Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4971-A120T5, a high-precision coreless current sensor for industrial/consumer applications from Infineon Technologies. The TLI4971-A120T5 has an analog interface and two fast overcurrent detection outputs, which support the protection of the power circuitry. Galvanic isolation is also provided according to the magnetic sensing principle. Infineon's monolithic Hall technology enables accurate and highly linear measurement of currents with a full scale up to 120A. This Click board™ is suitable for AC/DC current measurement applications: electrical drives, general-purpose inverters, chargers, current monitoring, overload, over-current detection, and many more.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","TLI4971"],
"category" : ["Current sensor"]
}
diff --git a/clicks/hallcurrent8120a/example/memake.txt b/clicks/hallcurrent8120a/example/memake.txt
deleted file mode 100644
index f8a8d403df..0000000000
--- a/clicks/hallcurrent8120a/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_hallcurrent8120a
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.HallCurrent8120A
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/hallcurrent8120a/lib/memake.txt b/clicks/hallcurrent8120a/lib/memake.txt
deleted file mode 100644
index 9b18cd68c8..0000000000
--- a/clicks/hallcurrent8120a/lib/memake.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-type: library
-
-target: lib_hallcurrent8120a
-
-sources: {
- src/hallcurrent8120a.c
-}
-
-headers: {
- include/hallcurrent8120a.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/hallcurrent8120a.h) dst(include/hallcurrent8120a.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.HallCurrent8120A
diff --git a/clicks/hallcurrent8120a/lib_hallcurrent8120a/CMakeLists.txt b/clicks/hallcurrent8120a/lib_hallcurrent8120a/CMakeLists.txt
new file mode 100644
index 0000000000..c5b6e5ae92
--- /dev/null
+++ b/clicks/hallcurrent8120a/lib_hallcurrent8120a/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_hallcurrent8120a LANGUAGES MikroC)
+else()
+ project(lib_hallcurrent8120a LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_hallcurrent8120a STATIC
+ src/hallcurrent8120a.c
+ include/hallcurrent8120a.h
+)
+add_library(Click.HallCurrent8120A ALIAS lib_hallcurrent8120a)
+
+
+
+target_include_directories(lib_hallcurrent8120a PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_hallcurrent8120a PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_hallcurrent8120a PUBLIC MikroSDK.Driver)
diff --git a/clicks/hallcurrent8120a/lib_hallcurrent8120a/include/Click.HallCurrent8120A b/clicks/hallcurrent8120a/lib_hallcurrent8120a/include/Click.HallCurrent8120A
new file mode 100644
index 0000000000..5e2f38260d
--- /dev/null
+++ b/clicks/hallcurrent8120a/lib_hallcurrent8120a/include/Click.HallCurrent8120A
@@ -0,0 +1 @@
+#include "hallcurrent8120a.h"
diff --git a/clicks/hallcurrent8120a/lib/include/hallcurrent8120a.h b/clicks/hallcurrent8120a/lib_hallcurrent8120a/include/hallcurrent8120a.h
similarity index 88%
rename from clicks/hallcurrent8120a/lib/include/hallcurrent8120a.h
rename to clicks/hallcurrent8120a/lib_hallcurrent8120a/include/hallcurrent8120a.h
index 16ad1325ec..78217b8b0e 100644
--- a/clicks/hallcurrent8120a/lib/include/hallcurrent8120a.h
+++ b/clicks/hallcurrent8120a/lib_hallcurrent8120a/include/hallcurrent8120a.h
@@ -42,11 +42,6 @@ extern "C"{
* @{
*/
-/**
- * @defgroup hallcurrent8120a_set Hall Current 8 120A Registers Settings
- * @brief Settings for registers of Hall Current 8 120A Click driver.
- */
-
/**
* @defgroup hallcurrent8120a_map Hall Current 8 120A MikroBUS Map
* @brief MikroBUS pin mapping of Hall Current 8 120A Click driver.
@@ -75,10 +70,12 @@ extern "C"{
*/
typedef struct
{
- digital_in_t oc1; /**< OCD threshold of channel 1. */
- digital_in_t oc2; /**< OCD threshold of channel 2. */
+ digital_in_t oc1; /**< OCD threshold of channel 1. */
+ digital_in_t oc2; /**< OCD threshold of channel 2. */
analog_in_t adc; /**< ADC module object. */
+
+ float offset; /**< Calibration offset voltage. */
} hallcurrent8120a_t;
@@ -97,16 +94,6 @@ typedef struct
} hallcurrent8120a_cfg_t;
-/**
- * @brief Hall Current 8 120A Click configuration object.
- * @details Configuration object definition of Hall Current 8 120A Click driver.
- */
-typedef struct
-{
- float offset;
-
-} hallcurrent8120a_offset_t;
-
/**
* @brief Hall Current 8 120A Click return value data.
* @details Predefined enum values for driver return values.
@@ -163,7 +150,7 @@ err_t hallcurrent8120a_init ( hallcurrent8120a_t *ctx, hallcurrent8120a_cfg_t *c
* See #err_t definition for detailed explanation.
* @note None.
*/
-err_t hallcurrent8120a_read_an_pin_value ( hallcurrent8120a_t *ctx, uint16_t *data_out );
+err_t hallcurrent8120a_read_pin_value ( hallcurrent8120a_t *ctx, uint16_t *data_out );
/**
* @brief Hall Current 8 120A read AN pin voltage level function.
@@ -179,16 +166,15 @@ err_t hallcurrent8120a_read_an_pin_value ( hallcurrent8120a_t *ctx, uint16_t *da
* @note The conversion to voltage depends on the entered configuration of the
* ADC (resolution, reference voltage).
*/
-err_t hallcurrent8120a_read_an_pin_voltage ( hallcurrent8120a_t *ctx, float *data_out );
+err_t hallcurrent8120a_read_pin_volt ( hallcurrent8120a_t *ctx, float *data_out );
/**
* @brief Hall Current 8 120A calibration function.
- * @details This function sets the calibration value into the offset data structure of
+ * @details This function sets the calibration value into the offset data from context object of
* the TLI4971 high precision coreless current sensor
* on Hall Current 8 120A Click board.
* @param[in] ctx : Click context object.
* See #hallcurrent8120a_t object definition for detailed explanation.
- * @param[out] offset_val : Pointer to the memory location of the structure where data be stored.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
*
@@ -196,7 +182,7 @@ err_t hallcurrent8120a_read_an_pin_voltage ( hallcurrent8120a_t *ctx, float *dat
*
* @note Function delay is approximately 500 ms.
*/
-err_t hallcurrent8120a_calibration ( hallcurrent8120a_t *ctx, hallcurrent8120a_offset_t *offset_val );
+err_t hallcurrent8120a_calibration ( hallcurrent8120a_t *ctx );
/**
* @brief Hall Current 8 120A read voltage level function.
@@ -220,7 +206,6 @@ err_t hallcurrent8120a_get_voltage ( hallcurrent8120a_t *ctx, float *avr_voltage
* converts them to proportional current level.
* @param[in] ctx : Click context object.
* See #hallcurrent8120a_t object definition for detailed explanation.
- * @param[out] offset_val : Pointer to the memory location of the structure where data be stored.
* @param[out] current : Average current level of the analog pin [A].
* @return @li @c 0 - Success,
* @li @c -1 - Error.
@@ -229,7 +214,7 @@ err_t hallcurrent8120a_get_voltage ( hallcurrent8120a_t *ctx, float *avr_voltage
*
* @note Function delay is approximately 500 ms.
*/
-err_t hallcurrent8120a_get_current ( hallcurrent8120a_t *ctx, hallcurrent8120a_offset_t *offset_val, float *current );
+err_t hallcurrent8120a_get_current ( hallcurrent8120a_t *ctx, float *current );
/**
* @brief Hall Current 8 120A get state of OC1 function.
diff --git a/clicks/hallcurrent8120a/lib/src/hallcurrent8120a.c b/clicks/hallcurrent8120a/lib_hallcurrent8120a/src/hallcurrent8120a.c
similarity index 53%
rename from clicks/hallcurrent8120a/lib/src/hallcurrent8120a.c
rename to clicks/hallcurrent8120a/lib_hallcurrent8120a/src/hallcurrent8120a.c
index c64afafa05..7a392aa01e 100644
--- a/clicks/hallcurrent8120a/lib/src/hallcurrent8120a.c
+++ b/clicks/hallcurrent8120a/lib_hallcurrent8120a/src/hallcurrent8120a.c
@@ -29,10 +29,8 @@
// ------------------------------------------------------------- PRIVATE MACROS
-#define HALLCURRENT8120A_QUIESCENT_VOLTAGE 1.65
-#define HALLCURRENT8120A_CONVERT_V_TO_mV 1000
-#define HALLCURRENT8120A_FACTOR_SENSITIVITY_OF_10mV_A 10
-#define HALLCURRENT8120A_FACTOR_PRECISION_SENSITIVITY 1.1
+#define HALLCURRENT8120A_QUIESCENT_VOLTAGE 1.65f
+#define HALLCURRENT8120A_SENSITIVITY_OF_10_V_A 0.01f
// ---------------------------------------------- PRIVATE FUNCTION DECLARATIONS
@@ -50,127 +48,108 @@ void hallcurrent8120a_cfg_setup ( hallcurrent8120a_cfg_t *cfg )
cfg->oc1 = HAL_PIN_NC;
cfg->oc2 = HAL_PIN_NC;
- cfg->resolution = ANALOG_IN_RESOLUTION_10_BIT;
+ cfg->resolution = ANALOG_IN_RESOLUTION_DEFAULT;
cfg->vref = 3.3;
}
-err_t hallcurrent8120a_init ( hallcurrent8120a_t *ctx, hallcurrent8120a_cfg_t *cfg ) {
+err_t hallcurrent8120a_init ( hallcurrent8120a_t *ctx, hallcurrent8120a_cfg_t *cfg )
+{
analog_in_config_t adc_cfg;
analog_in_configure_default( &adc_cfg );
adc_cfg.input_pin = cfg->an;
- if ( analog_in_open( &ctx->adc, &adc_cfg ) == ADC_ERROR ) {
+ if ( ADC_ERROR == analog_in_open( &ctx->adc, &adc_cfg ) )
+ {
return ADC_ERROR;
}
- if ( analog_in_set_vref_value( &ctx->adc, cfg->vref ) == ADC_ERROR ) {
+ if ( ADC_ERROR == analog_in_set_vref_value( &ctx->adc, cfg->vref ) )
+ {
return ADC_ERROR;
}
- if ( analog_in_set_resolution( &ctx->adc, cfg->resolution ) == ADC_ERROR ) {
+ if ( ADC_ERROR == analog_in_set_resolution( &ctx->adc, cfg->resolution ) )
+ {
return ADC_ERROR;
}
- // It should contain the error status checking for every pin init.
-
digital_in_init( &ctx->oc1, cfg->oc1 );
digital_in_init( &ctx->oc2, cfg->oc2 );
return ADC_SUCCESS;
}
-err_t hallcurrent8120a_read_an_pin_value ( hallcurrent8120a_t *ctx, uint16_t *data_out ) {
+err_t hallcurrent8120a_read_pin_value ( hallcurrent8120a_t *ctx, uint16_t *data_out )
+{
return analog_in_read( &ctx->adc, data_out );
}
-err_t hallcurrent8120a_read_an_pin_voltage ( hallcurrent8120a_t *ctx, float *data_out ) {
+err_t hallcurrent8120a_read_pin_volt ( hallcurrent8120a_t *ctx, float *data_out )
+{
return analog_in_read_voltage( &ctx->adc, data_out );
}
-err_t hallcurrent8120a_calibration ( hallcurrent8120a_t *ctx, hallcurrent8120a_offset_t *offset_val ) {
- err_t status;
- float voltage;
- float temp;
-
- status = HALLCURRENT8120A_OK;
- temp = 0;
-
- for ( uint16_t n_cnt = 0; n_cnt < 500; n_cnt++ ) {
- status |= analog_in_read_voltage( &ctx->adc, &voltage );
- temp += voltage;
- dev_measure_delay( );
- }
+err_t hallcurrent8120a_calibration ( hallcurrent8120a_t *ctx )
+{
+ err_t status = HALLCURRENT8120A_OK;
+ float voltage = 0;
- temp /= 500;
- temp = HALLCURRENT8120A_QUIESCENT_VOLTAGE - temp;
+ status |= hallcurrent8120a_get_voltage( ctx, &voltage );
- offset_val->offset = temp;
+ ctx->offset = HALLCURRENT8120A_QUIESCENT_VOLTAGE - voltage;
return status;
}
-err_t hallcurrent8120a_get_voltage ( hallcurrent8120a_t *ctx, float *avr_voltage ) {
- err_t status;
- float voltage;
- float temp;
-
- status = HALLCURRENT8120A_OK;
- temp = 0;
+err_t hallcurrent8120a_get_voltage ( hallcurrent8120a_t *ctx, float *avr_voltage )
+{
+ err_t status = HALLCURRENT8120A_OK;
+ float voltage = 0;
+ float sum_voltage = 0;
+ uint16_t n_cnt = 0;
- for ( uint16_t n_cnt = 0; n_cnt < 500; n_cnt++ ) {
- status |= analog_in_read_voltage( &ctx->adc, &voltage );
- temp += voltage;
+ for ( n_cnt = 0; n_cnt < 500; n_cnt++ )
+ {
+ status |= hallcurrent8120a_read_pin_volt( ctx, &voltage );
+ sum_voltage += voltage;
dev_measure_delay( );
}
- *avr_voltage = temp / 500;
+ *avr_voltage = sum_voltage / 500;
return status;
}
-err_t hallcurrent8120a_get_current( hallcurrent8120a_t *ctx, hallcurrent8120a_offset_t *offset_val, float *current ) {
- err_t status;
- float curr_val;
- float voltage;
- float sum;
- float sensor_offset;
+err_t hallcurrent8120a_get_current( hallcurrent8120a_t *ctx, float *current )
+{
+ err_t status = HALLCURRENT8120A_OK;
+ float voltage = 0;
- sensor_offset = offset_val->offset;
+ status |= hallcurrent8120a_get_voltage( ctx, &voltage );
- status = HALLCURRENT8120A_OK;
- sum = 0;
+ voltage -= ( HALLCURRENT8120A_QUIESCENT_VOLTAGE - ctx->offset );
- for ( uint16_t n_cnt = 0; n_cnt < 500; n_cnt++ ) {
- status |= analog_in_read_voltage( &ctx->adc, &voltage );
- sum += voltage;
- dev_measure_delay( );
- }
-
- curr_val = sum / 500;
- curr_val -= HALLCURRENT8120A_QUIESCENT_VOLTAGE;
- curr_val += sensor_offset;
- curr_val *= HALLCURRENT8120A_CONVERT_V_TO_mV;
- curr_val /= HALLCURRENT8120A_FACTOR_SENSITIVITY_OF_10mV_A;
- curr_val /= HALLCURRENT8120A_FACTOR_PRECISION_SENSITIVITY;
-
- *current = curr_val;
+ *current = voltage / HALLCURRENT8120A_SENSITIVITY_OF_10_V_A;
return status;
}
-uint8_t hallcurrent8120a_get_odc1 ( hallcurrent8120a_t *ctx ) {
+uint8_t hallcurrent8120a_get_odc1 ( hallcurrent8120a_t *ctx )
+{
return digital_in_read( &ctx->oc1 );
}
-uint8_t hallcurrent8120a_get_odc2 ( hallcurrent8120a_t *ctx ) {
+uint8_t hallcurrent8120a_get_odc2 ( hallcurrent8120a_t *ctx )
+{
return digital_in_read( &ctx->oc2 );
}
// ----------------------------------------------- PRIVATE FUNCTION DEFINITIONS
-static void dev_measure_delay ( void ) {
+static void dev_measure_delay ( void )
+{
Delay_1ms( );
}
diff --git a/clicks/hallcurrent8120a/memake.txt b/clicks/hallcurrent8120a/memake.txt
deleted file mode 100644
index c2a8205c46..0000000000
--- a/clicks/hallcurrent8120a/memake.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-type: subdirs
-
-project: HallCurrent8120A
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/hallcurrent825a/CMakeLists.txt b/clicks/hallcurrent825a/CMakeLists.txt
new file mode 100644
index 0000000000..f9adb4fb05
--- /dev/null
+++ b/clicks/hallcurrent825a/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_hallcurrent825a LANGUAGES MikroC)
+else()
+ project(example_hallcurrent825a LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_hallcurrent825a
+ example/main.c
+
+)
+
+
+############################ example_hallcurrent825a GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_hallcurrent825a PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_hallcurrent825a PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_hallcurrent825a PUBLIC MikroSDK.Log)
+add_subdirectory(lib_hallcurrent825a)
+target_link_libraries(example_hallcurrent825a PUBLIC Click.HallCurrent825A)
+############################ example_hallcurrent825a GENERATED CODE END ###########################
diff --git a/clicks/hallcurrent825a/README.md b/clicks/hallcurrent825a/README.md
index 9394805edc..6e10ac16dd 100644
--- a/clicks/hallcurrent825a/README.md
+++ b/clicks/hallcurrent825a/README.md
@@ -3,10 +3,10 @@
---
# Hall Current 8 25A click
-Hall Current 8 Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4971-A025T5, a high-precision coreless current sensor for industrial/consumer applications from Infineon Technologies. The TLI4971-A025T5 has an analog interface and two fast overcurrent detection outputs, which support the protection of the power circuitry. Galvanic isolation is also provided according to the magnetic sensing principle. Infineon's monolithic Hall technology enables accurate and highly linear measurement of currents with a full scale up to 25A. This Click board™ is suitable for AC/DC current measurement applications: electrical drives, general-purpose inverters, chargers, current monitoring, overload, over-current detection, and many more.
+> Hall Current 8 Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4971-A025T5, a high-precision coreless current sensor for industrial/consumer applications from Infineon Technologies. The TLI4971-A025T5 has an analog interface and two fast overcurrent detection outputs, which support the protection of the power circuitry. Galvanic isolation is also provided according to the magnetic sensing principle. Infineon's monolithic Hall technology enables accurate and highly linear measurement of currents with a full scale up to 25A. This Click board™ is suitable for AC/DC current measurement applications: electrical drives, general-purpose inverters, chargers, current monitoring, overload, over-current detection, and many more.
-
+
[click Product page](https://www.mikroe.com/hall-current-8-click-25a)
@@ -43,30 +43,24 @@ void hallcurrent825a_cfg_setup ( hallcurrent825a_cfg_t *cfg );
- `hallcurrent825a_init` Initialization function.
```c
-HALLCURRENT825A_RETVAL hallcurrent825a_init ( hallcurrent825a_t *ctx, hallcurrent825a_cfg_t *cfg );
-```
-
-- `hallcurrent825a_default_cfg` Click Default Configuration function.
-```c
-void hallcurrent825a_default_cfg ( hallcurrent825a_t *ctx );
+err_t hallcurrent825a_init ( hallcurrent825a_t *ctx, hallcurrent825a_cfg_t *cfg );
```
#### Example key functions :
-- `hallcurrent825a_calibration` This function sets the calibration value into the offset data structure of the TLI4971 high precision coreless current sensor on Hall Current 8 25A Click board.
+- `hallcurrent825a_calibration` This function sets the calibration value into the offset data from context object of the TLI4971 high precision coreless current sensor on Hall Current 8 25A Click board.
```c
-HALLCURRENT825A_RETVAL hallcurrent825a_calibration ( hallcurrent825a_t *ctx, hallcurrent825a_offset_t *offset_val );
+err_t hallcurrent825a_calibration ( hallcurrent825a_t *ctx );
```
- `hallcurrent825a_get_voltage` This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
```c
-HALLCURRENT825A_RETVAL hallcurrent825a_get_voltage ( hallcurrent825a_t *ctx, float *avr_voltage );
-
+err_t hallcurrent825a_get_voltage ( hallcurrent825a_t *ctx, float *avr_voltage );
```
- `hallcurrent825a_get_current` This function reads results of AD conversion of the AN pin and converts them to proportional current level.
```c
-HALLCURRENT825A_RETVAL hallcurrent825a_get_current ( hallcurrent825a_t *ctx, hallcurrent825a_offset_t *offset_val, float *current );
+err_t hallcurrent825a_get_current ( hallcurrent825a_t *ctx, float *current );
```
## Example Description
@@ -81,8 +75,9 @@ HALLCURRENT825A_RETVAL hallcurrent825a_get_current ( hallcurrent825a_t *ctx, hal
```c
-void application_init ( void ) {
- log_cfg_t log_cfg; /**< Logger config object. */
+void application_init ( void )
+{
+ log_cfg_t log_cfg; /**< Logger config object. */
hallcurrent825a_cfg_t hallcurrent825a_cfg; /**< Click config object. */
/**
@@ -100,66 +95,64 @@ void application_init ( void ) {
// Click initialization.
- hallcurrent825a_cfg_setup( &hallcurrent825a_cfg );
- HALLCURRENT825A_MAP_MIKROBUS( hallcurrent825a_cfg, MIKROBUS_1 );
- if ( hallcurrent825a_init( &hallcurrent825a, &hallcurrent825a_cfg ) == ADC_ERROR ) {
+ hallcurrent825a_cfg_setup( &hallcurrent825a_cfg );
+ HALLCURRENT825A_MAP_MIKROBUS( hallcurrent825a_cfg, MIKROBUS_1 );
+ if ( ADC_ERROR == hallcurrent825a_init( &hallcurrent825a, &hallcurrent825a_cfg ) )
+ {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
- Delay_ms( 1000 );
-
- log_printf( &logger, "---------------------------\r\n" );
- log_printf( &logger, " Turn OFF the power supply \r\n" );
- Delay_ms( 5000 );
-
- log_printf( &logger, "---------------------------\r\n" );
- log_printf( &logger, " Start Calibration \r\n" );
- hallcurrent825a_calibration ( &hallcurrent825a, &offset_val );
- Delay_ms( 1000 );
-
- log_printf( &logger, "---------------------------\r\n");
- log_printf( &logger, " Turn ON the power supply \r\n" );
- Delay_ms( 5000 );
-
- log_printf( &logger, "---------------------------\r\n");
- log_printf( &logger, " Start measurements : \r\n");
- log_printf( &logger, "---------------------------\r\n");
+ Delay_ms( 1000 );
+
+ log_printf( &logger, "---------------------------\r\n" );
+ log_printf( &logger, " Turn OFF the power supply \r\n" );
+ Delay_ms( 5000 );
+
+ log_printf( &logger, "---------------------------\r\n" );
+ log_printf( &logger, " Start Calibration \r\n" );
+ hallcurrent825a_calibration ( &hallcurrent825a );
+ Delay_ms( 1000 );
+
+ log_printf( &logger, "---------------------------\r\n");
+ log_printf( &logger, " Turn ON the power supply \r\n" );
+ Delay_ms( 5000 );
+
+ log_printf( &logger, "---------------------------\r\n");
+ log_printf( &logger, " Start measurements : \r\n");
+ log_printf( &logger, "---------------------------\r\n");
}
```
### Application Task
-> This is an example that demonstrates the use of the Hall Current 8 25A click board. In this example, we read and display current data [A], ADC value and AN pin voltage level [V]. Results are being sent to the Usart Terminal where you can track their changes.
+> This is an example that demonstrates the use of the Hall Current 8 25A click board.
+In this example, we read and display current data [A], AN pin voltage level [V].
+Results are being sent to the Usart Terminal where you can track their changes.
```c
-void application_task ( void ) {
- float hallcurrent825a_current = 0;
+void application_task ( void )
+{
+ float current = 0;
+ float avg_voltage = 0;
- if ( hallcurrent825a_get_current ( &hallcurrent825a, &offset_val, &hallcurrent825a_current ) != ADC_ERROR ) {
- log_printf( &logger, " Current : %.2f [A]\r\n", hallcurrent825a_current );
+ if ( HALLCURRENT825A_OK == hallcurrent825a_get_current ( &hallcurrent825a, ¤t ) )
+ {
+ log_printf( &logger, " Current : %.2f [A]\r\n", current );
}
- uint16_t hallcurrent825a_an_value = 0;
-
- if ( hallcurrent825a_read_an_pin_value ( &hallcurrent825a, &hallcurrent825a_an_value ) != ADC_ERROR ) {
- log_printf( &logger, " ADC Value : %u\r\n", hallcurrent825a_an_value );
- }
-
- float hallcurrent825a_an_voltage = 0;
-
- if ( hallcurrent825a_read_an_pin_voltage ( &hallcurrent825a, &hallcurrent825a_an_voltage ) != ADC_ERROR ) {
- log_printf( &logger, " AN Voltage : %.2f [V]\r\n", hallcurrent825a_an_voltage );
+ if ( HALLCURRENT825A_OK == hallcurrent825a_get_voltage ( &hallcurrent825a, &avg_voltage ) )
+ {
+ log_printf( &logger, " AN pin voltage : %.2f [V]\r\n", avg_voltage );
}
log_printf( &logger, "---------------------------\r\n");
Delay_ms( 1000 );
}
```
-
+
The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
diff --git a/clicks/hallcurrent825a/changelog.md b/clicks/hallcurrent825a/changelog.md
index b96039c092..0426704bc7 100644
--- a/clicks/hallcurrent825a/changelog.md
+++ b/clicks/hallcurrent825a/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.3
+### Version 2.1.0.3
- Initial release
diff --git a/clicks/hallcurrent825a/details.md b/clicks/hallcurrent825a/details.md
index 19043e937a..1e72dc4d77 100644
--- a/clicks/hallcurrent825a/details.md
+++ b/clicks/hallcurrent825a/details.md
@@ -2,10 +2,10 @@
---
# Hall Current 8 25A click
-Hall Current 8 Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4971-A025T5, a high-precision coreless current sensor for industrial/consumer applications from Infineon Technologies. The TLI4971-A025T5 has an analog interface and two fast overcurrent detection outputs, which support the protection of the power circuitry. Galvanic isolation is also provided according to the magnetic sensing principle. Infineon's monolithic Hall technology enables accurate and highly linear measurement of currents with a full scale up to 25A. This Click board™ is suitable for AC/DC current measurement applications: electrical drives, general-purpose inverters, chargers, current monitoring, overload, over-current detection, and many more.
+> Hall Current 8 Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4971-A025T5, a high-precision coreless current sensor for industrial/consumer applications from Infineon Technologies. The TLI4971-A025T5 has an analog interface and two fast overcurrent detection outputs, which support the protection of the power circuitry. Galvanic isolation is also provided according to the magnetic sensing principle. Infineon's monolithic Hall technology enables accurate and highly linear measurement of currents with a full scale up to 25A. This Click board™ is suitable for AC/DC current measurement applications: electrical drives, general-purpose inverters, chargers, current monitoring, overload, over-current detection, and many more.
-
+
[click Product page](https://www.mikroe.com/hall-current-8-click-25a)
@@ -42,29 +42,24 @@ void hallcurrent825a_cfg_setup ( hallcurrent825a_cfg_t *cfg );
- `hallcurrent825a_init` Initialization function.
```c
-HALLCURRENT825A_RETVAL hallcurrent825a_init ( hallcurrent825a_t *ctx, hallcurrent825a_cfg_t *cfg );
-```
-
-- `hallcurrent825a_default_cfg` Click Default Configuration function.
-```c
-void hallcurrent825a_default_cfg ( hallcurrent825a_t *ctx );
+err_t hallcurrent825a_init ( hallcurrent825a_t *ctx, hallcurrent825a_cfg_t *cfg );
```
#### Example key functions :
-- `hallcurrent825a_calibration` This function sets the calibration value into the offset data structure of the TLI4971 high precision coreless current sensor on Hall Current 8 25A Click board.
+- `hallcurrent825a_calibration` This function sets the calibration value into the offset data from context object of the TLI4971 high precision coreless current sensor on Hall Current 8 25A Click board.
```c
-HALLCURRENT825A_RETVAL hallcurrent825a_calibration ( hallcurrent825a_t *ctx, hallcurrent825a_offset_t *offset_val );
+err_t hallcurrent825a_calibration ( hallcurrent825a_t *ctx );
```
- `hallcurrent825a_get_voltage` This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
```c
-HALLCURRENT825A_RETVAL hallcurrent825a_get_voltage ( hallcurrent825a_t *ctx, float *avr_voltage );
+err_t hallcurrent825a_get_voltage ( hallcurrent825a_t *ctx, float *avr_voltage );
```
- `hallcurrent825a_get_current` This function reads results of AD conversion of the AN pin and converts them to proportional current level.
```c
-HALLCURRENT825A_RETVAL hallcurrent825a_get_current ( hallcurrent825a_t *ctx, hallcurrent825a_offset_t *offset_val, float *current );
+err_t hallcurrent825a_get_current ( hallcurrent825a_t *ctx, float *current );
```
## Example Description
@@ -79,8 +74,9 @@ HALLCURRENT825A_RETVAL hallcurrent825a_get_current ( hallcurrent825a_t *ctx, hal
```c
-void application_init ( void ) {
- log_cfg_t log_cfg; /**< Logger config object. */
+void application_init ( void )
+{
+ log_cfg_t log_cfg; /**< Logger config object. */
hallcurrent825a_cfg_t hallcurrent825a_cfg; /**< Click config object. */
/**
@@ -98,66 +94,64 @@ void application_init ( void ) {
// Click initialization.
- hallcurrent825a_cfg_setup( &hallcurrent825a_cfg );
- HALLCURRENT825A_MAP_MIKROBUS( hallcurrent825a_cfg, MIKROBUS_1 );
- if ( hallcurrent825a_init( &hallcurrent825a, &hallcurrent825a_cfg ) == ADC_ERROR ) {
+ hallcurrent825a_cfg_setup( &hallcurrent825a_cfg );
+ HALLCURRENT825A_MAP_MIKROBUS( hallcurrent825a_cfg, MIKROBUS_1 );
+ if ( ADC_ERROR == hallcurrent825a_init( &hallcurrent825a, &hallcurrent825a_cfg ) )
+ {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
- Delay_ms( 1000 );
-
- log_printf( &logger, "---------------------------\r\n" );
- log_printf( &logger, " Turn OFF the power supply \r\n" );
- Delay_ms( 5000 );
-
- log_printf( &logger, "---------------------------\r\n" );
- log_printf( &logger, " Start Calibration \r\n" );
- hallcurrent825a_calibration ( &hallcurrent825a, &offset_val );
- Delay_ms( 1000 );
-
- log_printf( &logger, "---------------------------\r\n");
- log_printf( &logger, " Turn ON the power supply \r\n" );
- Delay_ms( 5000 );
-
- log_printf( &logger, "---------------------------\r\n");
- log_printf( &logger, " Start measurements : \r\n");
- log_printf( &logger, "---------------------------\r\n");
+ Delay_ms( 1000 );
+
+ log_printf( &logger, "---------------------------\r\n" );
+ log_printf( &logger, " Turn OFF the power supply \r\n" );
+ Delay_ms( 5000 );
+
+ log_printf( &logger, "---------------------------\r\n" );
+ log_printf( &logger, " Start Calibration \r\n" );
+ hallcurrent825a_calibration ( &hallcurrent825a );
+ Delay_ms( 1000 );
+
+ log_printf( &logger, "---------------------------\r\n");
+ log_printf( &logger, " Turn ON the power supply \r\n" );
+ Delay_ms( 5000 );
+
+ log_printf( &logger, "---------------------------\r\n");
+ log_printf( &logger, " Start measurements : \r\n");
+ log_printf( &logger, "---------------------------\r\n");
}
```
### Application Task
-> This is an example that demonstrates the use of the Hall Current 8 25A click board. In this example, we read and display current data [A], ADC value and AN pin voltage level [V]. Results are being sent to the Usart Terminal where you can track their changes.
+> This is an example that demonstrates the use of the Hall Current 8 25A click board.
+In this example, we read and display current data [A], AN pin voltage level [V].
+Results are being sent to the Usart Terminal where you can track their changes.
```c
-void application_task ( void ) {
- float hallcurrent825a_current = 0;
+void application_task ( void )
+{
+ float current = 0;
+ float avg_voltage = 0;
- if ( hallcurrent825a_get_current ( &hallcurrent825a, &offset_val, &hallcurrent825a_current ) != ADC_ERROR ) {
- log_printf( &logger, " Current : %.2f [A]\r\n", hallcurrent825a_current );
+ if ( HALLCURRENT825A_OK == hallcurrent825a_get_current ( &hallcurrent825a, ¤t ) )
+ {
+ log_printf( &logger, " Current : %.2f [A]\r\n", current );
}
- uint16_t hallcurrent825a_an_value = 0;
-
- if ( hallcurrent825a_read_an_pin_value ( &hallcurrent825a, &hallcurrent825a_an_value ) != ADC_ERROR ) {
- log_printf( &logger, " ADC Value : %u\r\n", hallcurrent825a_an_value );
- }
-
- float hallcurrent825a_an_voltage = 0;
-
- if ( hallcurrent825a_read_an_pin_voltage ( &hallcurrent825a, &hallcurrent825a_an_voltage ) != ADC_ERROR ) {
- log_printf( &logger, " AN Voltage : %.2f [V]\r\n", hallcurrent825a_an_voltage );
+ if ( HALLCURRENT825A_OK == hallcurrent825a_get_voltage ( &hallcurrent825a, &avg_voltage ) )
+ {
+ log_printf( &logger, " AN pin voltage : %.2f [V]\r\n", avg_voltage );
}
log_printf( &logger, "---------------------------\r\n");
Delay_ms( 1000 );
}
```
-
+
The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
diff --git a/clicks/hallcurrent825a/doc/doxy/Doxyfile.doxy b/clicks/hallcurrent825a/doc/doxy/Doxyfile.doxy
index 6b758eb3de..c44eb45bc3 100644
--- a/clicks/hallcurrent825a/doc/doxy/Doxyfile.doxy
+++ b/clicks/hallcurrent825a/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/hallcurrent825a/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/hallcurrent825a/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/hallcurrent825a/example \
- ../clicks/hallcurrent825a/lib/include \
- ../clicks/hallcurrent825a/README.md
+INPUT = ../cmake/hallcurrent825a/example \
+ ../cmake/hallcurrent825a/lib_hallcurrent825a/include \
+ ../cmake/hallcurrent825a/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/hallcurrent825a/example
+EXAMPLE_PATH = ../cmake/hallcurrent825a/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/hallcurrent825a/doc/package/manifest.json b/clicks/hallcurrent825a/doc/package/manifest.json
index 1d14c1c754..95469fab4e 100644
--- a/clicks/hallcurrent825a/doc/package/manifest.json
+++ b/clicks/hallcurrent825a/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Current sensor",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Current sensor",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Hall Current 8 25A click",
"example_list": [
@@ -26,11 +25,11 @@
"name": "mikroe.click.hallcurrent825a",
"product_link": "https://www.mikroe.com/hall-current-8-click-25a",
"short_description": "Hall Current 8 Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4971-A025T5, a high-precision coreless current sensor for industrial/consumer applications from Infineon Technologies. The TLI4971-A025T5 has an analog interface and two fast overcurrent detection outputs, which support the protection of the power circuitry. Galvanic isolation is also provided according to the magnetic sensing principle. Infineon's monolithic Hall technology enables accurate and highly linear measurement of currents with a full scale up to 25A. This Click board™ is suitable for AC/DC current measurement applications: electrical drives, general-purpose inverters, chargers, current monitoring, overload, over-current detection, and many more.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.3"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.3",
+ "cmake": true,
+ "alias": "Click.HallCurrent825A",
+ "subdir_name": "lib_hallcurrent825a"
}
-
-
-
diff --git a/clicks/hallcurrent825a/example/CMakeLists.txt b/clicks/hallcurrent825a/example/CMakeLists.txt
new file mode 100644
index 0000000000..224d2ffee2
--- /dev/null
+++ b/clicks/hallcurrent825a/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_hallcurrent825a LANGUAGES MikroC)
+else()
+ project(example_hallcurrent825a LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_hallcurrent825a
+ main.c
+
+)
+
+
+############################ example_hallcurrent825a GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_hallcurrent825a PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_hallcurrent825a PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_hallcurrent825a PUBLIC MikroSDK.Log)
+add_subdirectory(lib_hallcurrent825a)
+target_link_libraries(example_hallcurrent825a PUBLIC Click.HallCurrent825A)
+############################ example_hallcurrent825a GENERATED CODE END ###########################
diff --git a/clicks/hallcurrent825a/example/main.c b/clicks/hallcurrent825a/example/main.c
index ffeaae3a08..e11b4be56e 100644
--- a/clicks/hallcurrent825a/example/main.c
+++ b/clicks/hallcurrent825a/example/main.c
@@ -11,13 +11,11 @@
* The demo application is composed of two sections :
*
* ## Application Init
- * Initializes ADC driver, calibrate AD conversion
- * of the AN pin and start to write log.
+ * Initializes ADC driver, calibrate AD conversion of the AN pin and start to write log.
*
* ## Application Task
* This is an example that demonstrates the use of the Hall Current 8 25A click board.
- * In this example, we read and display current data [A],
- * ADC value and AN pin voltage level [V].
+ * In this example, we read and display current data [A], AN pin voltage level [V].
* Results are being sent to the Usart Terminal where you can track their changes.
*
* @author Stefan Ilic
@@ -31,9 +29,8 @@
static hallcurrent825a_t hallcurrent825a; /**< Hall Current 8 25A Click driver object. */
static log_t logger; /**< Logger object. */
-hallcurrent825a_offset_t offset_val;
-
-void application_init ( void ) {
+void application_init ( void )
+{
log_cfg_t log_cfg; /**< Logger config object. */
hallcurrent825a_cfg_t hallcurrent825a_cfg; /**< Click config object. */
@@ -54,10 +51,10 @@ void application_init ( void ) {
hallcurrent825a_cfg_setup( &hallcurrent825a_cfg );
HALLCURRENT825A_MAP_MIKROBUS( hallcurrent825a_cfg, MIKROBUS_1 );
- if ( hallcurrent825a_init( &hallcurrent825a, &hallcurrent825a_cfg ) == ADC_ERROR ) {
+ if ( ADC_ERROR == hallcurrent825a_init( &hallcurrent825a, &hallcurrent825a_cfg ) )
+ {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
Delay_ms( 1000 );
@@ -68,7 +65,7 @@ void application_init ( void ) {
log_printf( &logger, "---------------------------\r\n" );
log_printf( &logger, " Start Calibration \r\n" );
- hallcurrent825a_calibration ( &hallcurrent825a, &offset_val );
+ hallcurrent825a_calibration ( &hallcurrent825a );
Delay_ms( 1000 );
log_printf( &logger, "---------------------------\r\n");
@@ -80,23 +77,19 @@ void application_init ( void ) {
log_printf( &logger, "---------------------------\r\n");
}
-void application_task ( void ) {
- float hallcurrent825a_current = 0;
+void application_task ( void )
+{
+ float current = 0;
+ float avg_voltage = 0;
- if ( hallcurrent825a_get_current ( &hallcurrent825a, &offset_val, &hallcurrent825a_current ) != ADC_ERROR ) {
- log_printf( &logger, " Current : %.2f [A]\r\n", hallcurrent825a_current );
+ if ( HALLCURRENT825A_OK == hallcurrent825a_get_current ( &hallcurrent825a, ¤t ) )
+ {
+ log_printf( &logger, " Current : %.2f [A]\r\n", current );
}
- uint16_t hallcurrent825a_an_value = 0;
-
- if ( hallcurrent825a_read_an_pin_value ( &hallcurrent825a, &hallcurrent825a_an_value ) != ADC_ERROR ) {
- log_printf( &logger, " ADC Value : %u\r\n", hallcurrent825a_an_value );
- }
-
- float hallcurrent825a_an_voltage = 0;
-
- if ( hallcurrent825a_read_an_pin_voltage ( &hallcurrent825a, &hallcurrent825a_an_voltage ) != ADC_ERROR ) {
- log_printf( &logger, " AN Voltage : %.2f [V]\r\n", hallcurrent825a_an_voltage );
+ if ( HALLCURRENT825A_OK == hallcurrent825a_get_voltage ( &hallcurrent825a, &avg_voltage ) )
+ {
+ log_printf( &logger, " AN pin voltage : %.2f [V]\r\n", avg_voltage );
}
log_printf( &logger, "---------------------------\r\n");
Delay_ms( 1000 );
diff --git a/clicks/hallcurrent825a/example/manifest.exm b/clicks/hallcurrent825a/example/manifest.exm
index acb10dc761..b6cfbaa093 100644
--- a/clicks/hallcurrent825a/example/manifest.exm
+++ b/clicks/hallcurrent825a/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Hall Current 8 25A Click",
"description": "Hall Current 8 Click is a compact add-on board that contains a precise solution for AC/DC current sensing. This board features the TLI4971-A025T5, a high-precision coreless current sensor for industrial/consumer applications from Infineon Technologies. The TLI4971-A025T5 has an analog interface and two fast overcurrent detection outputs, which support the protection of the power circuitry. Galvanic isolation is also provided according to the magnetic sensing principle. Infineon's monolithic Hall technology enables accurate and highly linear measurement of currents with a full scale up to 25A. This Click board™ is suitable for AC/DC current measurement applications: electrical drives, general-purpose inverters, chargers, current monitoring, overload, over-current detection, and many more.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","TLI4971"],
"category" : ["Current sensor"]
}
diff --git a/clicks/hallcurrent825a/example/memake.txt b/clicks/hallcurrent825a/example/memake.txt
deleted file mode 100644
index 8ef8015dad..0000000000
--- a/clicks/hallcurrent825a/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_hallcurrent825a
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.HallCurrent825A
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/hallcurrent825a/lib/memake.txt b/clicks/hallcurrent825a/lib/memake.txt
deleted file mode 100644
index 01983103fc..0000000000
--- a/clicks/hallcurrent825a/lib/memake.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-type: library
-
-target: lib_hallcurrent825a
-
-sources: {
- src/hallcurrent825a.c
-}
-
-headers: {
- include/hallcurrent825a.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/hallcurrent825a.h) dst(include/hallcurrent825a.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.HallCurrent825A
diff --git a/clicks/hallcurrent825a/lib_hallcurrent825a/CMakeLists.txt b/clicks/hallcurrent825a/lib_hallcurrent825a/CMakeLists.txt
new file mode 100644
index 0000000000..3dcc1d5f64
--- /dev/null
+++ b/clicks/hallcurrent825a/lib_hallcurrent825a/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_hallcurrent825a LANGUAGES MikroC)
+else()
+ project(lib_hallcurrent825a LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_hallcurrent825a STATIC
+ src/hallcurrent825a.c
+ include/hallcurrent825a.h
+)
+add_library(Click.HallCurrent825A ALIAS lib_hallcurrent825a)
+
+
+
+target_include_directories(lib_hallcurrent825a PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_hallcurrent825a PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_hallcurrent825a PUBLIC MikroSDK.Driver)
diff --git a/clicks/hallcurrent825a/lib_hallcurrent825a/include/Click.HallCurrent825A b/clicks/hallcurrent825a/lib_hallcurrent825a/include/Click.HallCurrent825A
new file mode 100644
index 0000000000..2e84d2bf47
--- /dev/null
+++ b/clicks/hallcurrent825a/lib_hallcurrent825a/include/Click.HallCurrent825A
@@ -0,0 +1 @@
+#include "hallcurrent825a.h"
diff --git a/clicks/hallcurrent825a/lib/include/hallcurrent825a.h b/clicks/hallcurrent825a/lib_hallcurrent825a/include/hallcurrent825a.h
similarity index 88%
rename from clicks/hallcurrent825a/lib/include/hallcurrent825a.h
rename to clicks/hallcurrent825a/lib_hallcurrent825a/include/hallcurrent825a.h
index 3a175495bb..022624c04c 100644
--- a/clicks/hallcurrent825a/lib/include/hallcurrent825a.h
+++ b/clicks/hallcurrent825a/lib_hallcurrent825a/include/hallcurrent825a.h
@@ -42,11 +42,6 @@ extern "C"{
* @{
*/
-/**
- * @defgroup hallcurrent825a_set Hall Current 8 25A Registers Settings
- * @brief Settings for registers of Hall Current 8 25A Click driver.
- */
-
/**
* @defgroup hallcurrent825a_map Hall Current 8 25A MikroBUS Map
* @brief MikroBUS pin mapping of Hall Current 8 25A Click driver.
@@ -75,10 +70,12 @@ extern "C"{
*/
typedef struct
{
- digital_in_t oc1; /**< OCD threshold of channel 1. */
- digital_in_t oc2; /**< OCD threshold of channel 2. */
+ digital_in_t oc1; /**< OCD threshold of channel 1. */
+ digital_in_t oc2; /**< OCD threshold of channel 2. */
analog_in_t adc; /**< ADC module object. */
+
+ float offset; /**< Calibration offset voltage. */
} hallcurrent825a_t;
@@ -97,16 +94,6 @@ typedef struct
} hallcurrent825a_cfg_t;
-/**
- * @brief Hall Current 8 25A Click configuration object.
- * @details Configuration object definition of Hall Current 8 25A Click driver.
- */
-typedef struct
-{
- float offset;
-
-} hallcurrent825a_offset_t;
-
/**
* @brief Hall Current 8 25A Click return value data.
* @details Predefined enum values for driver return values.
@@ -163,7 +150,7 @@ err_t hallcurrent825a_init ( hallcurrent825a_t *ctx, hallcurrent825a_cfg_t *cfg
* See #err_t definition for detailed explanation.
* @note None.
*/
-err_t hallcurrent825a_read_an_pin_value ( hallcurrent825a_t *ctx, uint16_t *data_out );
+err_t hallcurrent825a_read_pin_value ( hallcurrent825a_t *ctx, uint16_t *data_out );
/**
* @brief Hall Current 8 25A read AN pin voltage level function.
@@ -179,16 +166,15 @@ err_t hallcurrent825a_read_an_pin_value ( hallcurrent825a_t *ctx, uint16_t *data
* @note The conversion to voltage depends on the entered configuration of the
* ADC (resolution, reference voltage).
*/
-err_t hallcurrent825a_read_an_pin_voltage ( hallcurrent825a_t *ctx, float *data_out );
+err_t hallcurrent825a_read_pin_volt ( hallcurrent825a_t *ctx, float *data_out );
/**
* @brief Hall Current 8 25A calibration function.
- * @details This function sets the calibration value into the offset data structure of
+ * @details This function sets the calibration value into the offset data from context object of
* the TLI4971 high precision coreless current sensor
* on Hall Current 8 25A Click board.
* @param[in] ctx : Click context object.
* See #hallcurrent825a_t object definition for detailed explanation.
- * @param[out] offset_val : Pointer to the memory location of the structure where data be stored.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
*
@@ -196,7 +182,7 @@ err_t hallcurrent825a_read_an_pin_voltage ( hallcurrent825a_t *ctx, float *data_
*
* @note Function delay is approximately 500 ms.
*/
-err_t hallcurrent825a_calibration ( hallcurrent825a_t *ctx, hallcurrent825a_offset_t *offset_val );
+err_t hallcurrent825a_calibration ( hallcurrent825a_t *ctx );
/**
* @brief Hall Current 8 25A read voltage level function.
@@ -220,7 +206,6 @@ err_t hallcurrent825a_get_voltage ( hallcurrent825a_t *ctx, float *avr_voltage )
* converts them to proportional current level.
* @param[in] ctx : Click context object.
* See #hallcurrent825a_t object definition for detailed explanation.
- * @param[out] offset_val : Pointer to the memory location of the structure where data be stored.
* @param[out] current : Average current level of the analog pin [A].
* @return @li @c 0 - Success,
* @li @c -1 - Error.
@@ -229,7 +214,7 @@ err_t hallcurrent825a_get_voltage ( hallcurrent825a_t *ctx, float *avr_voltage )
*
* @note Function delay is approximately 500 ms.
*/
-err_t hallcurrent825a_get_current ( hallcurrent825a_t *ctx, hallcurrent825a_offset_t *offset_val, float *current );
+err_t hallcurrent825a_get_current ( hallcurrent825a_t *ctx, float *current );
/**
* @brief Hall Current 8 25A get state of OC1 function.
diff --git a/clicks/hallcurrent825a/lib/src/hallcurrent825a.c b/clicks/hallcurrent825a/lib_hallcurrent825a/src/hallcurrent825a.c
similarity index 53%
rename from clicks/hallcurrent825a/lib/src/hallcurrent825a.c
rename to clicks/hallcurrent825a/lib_hallcurrent825a/src/hallcurrent825a.c
index 3fedf84976..acda5ca074 100644
--- a/clicks/hallcurrent825a/lib/src/hallcurrent825a.c
+++ b/clicks/hallcurrent825a/lib_hallcurrent825a/src/hallcurrent825a.c
@@ -29,10 +29,8 @@
// ------------------------------------------------------------- PRIVATE MACROS
-#define HALLCURRENT825A_QUIESCENT_VOLTAGE 1.65
-#define HALLCURRENT825A_CONVERT_V_TO_mV 1000
-#define HALLCURRENT825A_FACTOR_SENSITIVITY_OF_10mV_A 10
-#define HALLCURRENT825A_FACTOR_PRECISION_SENSITIVITY 1.1
+#define HALLCURRENT825A_QUIESCENT_VOLTAGE 1.65f
+#define HALLCURRENT825A_SENSITIVITY_OF_10_V_A 0.048f
// ---------------------------------------------- PRIVATE FUNCTION DECLARATIONS
@@ -50,127 +48,108 @@ void hallcurrent825a_cfg_setup ( hallcurrent825a_cfg_t *cfg )
cfg->oc1 = HAL_PIN_NC;
cfg->oc2 = HAL_PIN_NC;
- cfg->resolution = ANALOG_IN_RESOLUTION_10_BIT;
+ cfg->resolution = ANALOG_IN_RESOLUTION_DEFAULT;
cfg->vref = 3.3;
}
-err_t hallcurrent825a_init ( hallcurrent825a_t *ctx, hallcurrent825a_cfg_t *cfg ) {
+err_t hallcurrent825a_init ( hallcurrent825a_t *ctx, hallcurrent825a_cfg_t *cfg )
+{
analog_in_config_t adc_cfg;
analog_in_configure_default( &adc_cfg );
adc_cfg.input_pin = cfg->an;
- if ( analog_in_open( &ctx->adc, &adc_cfg ) == ADC_ERROR ) {
+ if ( ADC_ERROR == analog_in_open( &ctx->adc, &adc_cfg ) )
+ {
return ADC_ERROR;
}
- if ( analog_in_set_vref_value( &ctx->adc, cfg->vref ) == ADC_ERROR ) {
+ if ( ADC_ERROR == analog_in_set_vref_value( &ctx->adc, cfg->vref ) )
+ {
return ADC_ERROR;
}
- if ( analog_in_set_resolution( &ctx->adc, cfg->resolution ) == ADC_ERROR ) {
+ if ( ADC_ERROR == analog_in_set_resolution( &ctx->adc, cfg->resolution ) )
+ {
return ADC_ERROR;
}
- // It should contain the error status checking for every pin init.
-
digital_in_init( &ctx->oc1, cfg->oc1 );
digital_in_init( &ctx->oc2, cfg->oc2 );
return ADC_SUCCESS;
}
-err_t hallcurrent825a_read_an_pin_value ( hallcurrent825a_t *ctx, uint16_t *data_out ) {
+err_t hallcurrent825a_read_pin_value ( hallcurrent825a_t *ctx, uint16_t *data_out )
+{
return analog_in_read( &ctx->adc, data_out );
}
-err_t hallcurrent825a_read_an_pin_voltage ( hallcurrent825a_t *ctx, float *data_out ) {
+err_t hallcurrent825a_read_pin_volt ( hallcurrent825a_t *ctx, float *data_out )
+{
return analog_in_read_voltage( &ctx->adc, data_out );
}
-err_t hallcurrent825a_calibration ( hallcurrent825a_t *ctx, hallcurrent825a_offset_t *offset_val ) {
- err_t status;
- float voltage;
- float temp;
-
- status = HALLCURRENT825A_OK;
- temp = 0;
-
- for ( uint16_t n_cnt = 0; n_cnt < 500; n_cnt++ ) {
- status |= analog_in_read_voltage( &ctx->adc, &voltage );
- temp += voltage;
- dev_measure_delay( );
- }
+err_t hallcurrent825a_calibration ( hallcurrent825a_t *ctx )
+{
+ err_t status = HALLCURRENT825A_OK;
+ float voltage = 0;
- temp /= 500;
- temp = HALLCURRENT825A_QUIESCENT_VOLTAGE - temp;
+ status |= hallcurrent825a_get_voltage( ctx, &voltage );
- offset_val->offset = temp;
+ ctx->offset = HALLCURRENT825A_QUIESCENT_VOLTAGE - voltage;
return status;
}
-err_t hallcurrent825a_get_voltage ( hallcurrent825a_t *ctx, float *avr_voltage ) {
- err_t status;
- float voltage;
- float temp;
-
- status = HALLCURRENT825A_OK;
- temp = 0;
+err_t hallcurrent825a_get_voltage ( hallcurrent825a_t *ctx, float *avr_voltage )
+{
+ err_t status = HALLCURRENT825A_OK;
+ float voltage = 0;
+ float sum_voltage = 0;
+ uint16_t n_cnt = 0;
- for ( uint16_t n_cnt = 0; n_cnt < 500; n_cnt++ ) {
- status |= analog_in_read_voltage( &ctx->adc, &voltage );
- temp += voltage;
+ for ( n_cnt = 0; n_cnt < 500; n_cnt++ )
+ {
+ status |= hallcurrent825a_read_pin_volt( ctx, &voltage );
+ sum_voltage += voltage;
dev_measure_delay( );
}
- *avr_voltage = temp / 500;
+ *avr_voltage = sum_voltage / 500;
return status;
}
-err_t hallcurrent825a_get_current( hallcurrent825a_t *ctx, hallcurrent825a_offset_t *offset_val, float *current ) {
- err_t status;
- float curr_val;
- float voltage;
- float sum;
- float sensor_offset;
+err_t hallcurrent825a_get_current( hallcurrent825a_t *ctx, float *current )
+{
+ err_t status = HALLCURRENT825A_OK;
+ float voltage = 0;
- sensor_offset = offset_val->offset;
+ status |= hallcurrent825a_get_voltage( ctx, &voltage );
- status = HALLCURRENT825A_OK;
- sum = 0;
+ voltage -= ( HALLCURRENT825A_QUIESCENT_VOLTAGE - ctx->offset );
- for ( uint16_t n_cnt = 0; n_cnt < 500; n_cnt++ ) {
- status |= analog_in_read_voltage( &ctx->adc, &voltage );
- sum += voltage;
- dev_measure_delay( );
- }
-
- curr_val = sum / 500;
- curr_val -= HALLCURRENT825A_QUIESCENT_VOLTAGE;
- curr_val += sensor_offset;
- curr_val *= HALLCURRENT825A_CONVERT_V_TO_mV;
- curr_val /= HALLCURRENT825A_FACTOR_SENSITIVITY_OF_10mV_A;
- curr_val /= HALLCURRENT825A_FACTOR_PRECISION_SENSITIVITY;
-
- *current = curr_val;
+ *current = voltage / HALLCURRENT825A_SENSITIVITY_OF_10_V_A;
return status;
}
-uint8_t hallcurrent825a_get_odc1 ( hallcurrent825a_t *ctx ) {
+uint8_t hallcurrent825a_get_odc1 ( hallcurrent825a_t *ctx )
+{
return digital_in_read( &ctx->oc1 );
}
-uint8_t hallcurrent825a_get_odc2 ( hallcurrent825a_t *ctx ) {
+uint8_t hallcurrent825a_get_odc2 ( hallcurrent825a_t *ctx )
+{
return digital_in_read( &ctx->oc2 );
}
// ----------------------------------------------- PRIVATE FUNCTION DEFINITIONS
-static void dev_measure_delay ( void ) {
+static void dev_measure_delay ( void )
+{
Delay_1ms( );
}
diff --git a/clicks/hallcurrent825a/memake.txt b/clicks/hallcurrent825a/memake.txt
deleted file mode 100644
index b76eaaf8f4..0000000000
--- a/clicks/hallcurrent825a/memake.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-type: subdirs
-
-project: HallCurrent825A
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/hbridgedriver2/CMakeLists.txt b/clicks/hbridgedriver2/CMakeLists.txt
new file mode 100644
index 0000000000..1244a562e7
--- /dev/null
+++ b/clicks/hbridgedriver2/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_hbridgedriver2 LANGUAGES MikroC)
+else()
+ project(example_hbridgedriver2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_hbridgedriver2
+ example/main.c
+
+)
+
+
+############################ example_hbridgedriver2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_hbridgedriver2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_hbridgedriver2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_hbridgedriver2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_hbridgedriver2)
+target_link_libraries(example_hbridgedriver2 PUBLIC Click.HBridgeDriver2)
+############################ example_hbridgedriver2 GENERATED CODE END ###########################
diff --git a/clicks/hbridgedriver2/changelog.md b/clicks/hbridgedriver2/changelog.md
index fb1dd95ea8..1e0893fa34 100644
--- a/clicks/hbridgedriver2/changelog.md
+++ b/clicks/hbridgedriver2/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.1
+### Version 2.1.0.2
- Initial release
diff --git a/clicks/hbridgedriver2/doc/doxy/Doxyfile.doxy b/clicks/hbridgedriver2/doc/doxy/Doxyfile.doxy
index 06c8e04662..d0262fb209 100644
--- a/clicks/hbridgedriver2/doc/doxy/Doxyfile.doxy
+++ b/clicks/hbridgedriver2/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/hbridgedriver2/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/hbridgedriver2/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/hbridgedriver2/example \
- ../clicks/hbridgedriver2/lib/include \
- ../clicks/hbridgedriver2/README.md
+INPUT = ../cmake/hbridgedriver2/example \
+ ../cmake/hbridgedriver2/lib_hbridgedriver2/include \
+ ../cmake/hbridgedriver2/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/hbridgedriver2/example
+EXAMPLE_PATH = ../cmake/hbridgedriver2/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/hbridgedriver2/doc/package/manifest.json b/clicks/hbridgedriver2/doc/package/manifest.json
index 444523f427..fee92dc9f1 100644
--- a/clicks/hbridgedriver2/doc/package/manifest.json
+++ b/clicks/hbridgedriver2/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Motor control",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Motor control > Brushed",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "H-Bridge Driver 2 click",
"example_list": [
@@ -26,8 +25,11 @@
"name": "mikroe.click.hbridgedriver2",
"product_link": "https://www.mikroe.com/h-bridge-driver-2-click",
"short_description": "H-Bridge Driver 2 Click is a compact add-on board that contains an H-bridge gate driver, also known as a full-bridge pre-driver. This board features the NCV7535, a monolithic H−bridge pre-driver for a DC motor with an enhanced feature set, useful in automotive systems from ON Semiconductor. The gate driver channels are independently controlled by a 24-bit SPI interface, allowing this Click board™ to be optionally configured in a single or dual H-bridge mode. It has a wide operating voltage range from 6V to 18V with built-in protection features against short-circuit, under/over voltage, overcurrent, and overtemperature conditions. This Click board™ is suitable to drive external MOSFETs, thus providing control of a DC-motor.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.1"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.2",
+ "cmake": true,
+ "alias": "Click.HBridgeDriver2",
+ "subdir_name": "lib_hbridgedriver2"
}
diff --git a/clicks/hbridgedriver2/example/CMakeLists.txt b/clicks/hbridgedriver2/example/CMakeLists.txt
new file mode 100644
index 0000000000..26be2ccb10
--- /dev/null
+++ b/clicks/hbridgedriver2/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_hbridgedriver2 LANGUAGES MikroC)
+else()
+ project(example_hbridgedriver2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_hbridgedriver2
+ main.c
+
+)
+
+
+############################ example_hbridgedriver2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_hbridgedriver2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_hbridgedriver2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_hbridgedriver2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_hbridgedriver2)
+target_link_libraries(example_hbridgedriver2 PUBLIC Click.HBridgeDriver2)
+############################ example_hbridgedriver2 GENERATED CODE END ###########################
diff --git a/clicks/hbridgedriver2/example/manifest.exm b/clicks/hbridgedriver2/example/manifest.exm
index 11a40df6d3..74f97c902d 100644
--- a/clicks/hbridgedriver2/example/manifest.exm
+++ b/clicks/hbridgedriver2/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "H-Bridge Driver 2 Click",
"description": "H-Bridge Driver 2 Click is a compact add-on board that contains an H-bridge gate driver, also known as a full-bridge pre-driver. This board features the NCV7535, a monolithic H−bridge pre-driver for a DC motor with an enhanced feature set, useful in automotive systems from ON Semiconductor. The gate driver channels are independently controlled by a 24-bit SPI interface, allowing this Click board™ to be optionally configured in a single or dual H-bridge mode. It has a wide operating voltage range from 6V to 18V with built-in protection features against short-circuit, under/over voltage, overcurrent, and overtemperature conditions. This Click board™ is suitable to drive external MOSFETs, thus providing control of a DC-motor.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","NCV7535"],
"category" : ["Motor control"]
}
diff --git a/clicks/hbridgedriver2/example/memake.txt b/clicks/hbridgedriver2/example/memake.txt
deleted file mode 100644
index b6f8447ba6..0000000000
--- a/clicks/hbridgedriver2/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_hbridgedriver2
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.HBridgeDriver2
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/hbridgedriver2/lib/memake.txt b/clicks/hbridgedriver2/lib/memake.txt
deleted file mode 100644
index b2cbc74976..0000000000
--- a/clicks/hbridgedriver2/lib/memake.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-type: library
-target: lib_hbridgedriver2
-
-#begin python
-import re
-
-if ( re.match("(^PIC18F(.+)[KQ]4[23]$)|(^PIC32(.+)$)",MEMAKE_MCU_NAME) ):
- sample_mode_reg_case = "SAMPLE_REG_CASE_1"
-else:
- sample_mode_reg_case = "SAMPLE_REG_CASE_2"
-#end python
-
-defines: {
- <[sample_mode_reg_case]>
-}
-
-sources: {
- src/hbridgedriver2.c
-}
-
-headers: {
- include/hbridgedriver2.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/hbridgedriver2.h) dst(include/hbridgedriver2.h)
- src(include/spi_specifics.h) dst(include/spi_specifics.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.HBridgeDriver2
diff --git a/clicks/hbridgedriver2/lib_hbridgedriver2/CMakeLists.txt b/clicks/hbridgedriver2/lib_hbridgedriver2/CMakeLists.txt
new file mode 100644
index 0000000000..edfcf7f1d1
--- /dev/null
+++ b/clicks/hbridgedriver2/lib_hbridgedriver2/CMakeLists.txt
@@ -0,0 +1,34 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_hbridgedriver2 LANGUAGES MikroC)
+else()
+ project(lib_hbridgedriver2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_hbridgedriver2 STATIC
+ src/hbridgedriver2.c
+ include/hbridgedriver2.h
+)
+add_library(Click.HBridgeDriver2 ALIAS lib_hbridgedriver2)
+
+if (${MCU_NAME} MATCHES "(^PIC18F(.+)[KQ]4[23]$)|(^PIC32(.+)$)")
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_1")
+else()
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_2")
+endif()
+
+target_compile_definitions(lib_hbridgedriver2 PUBLIC ${sample_mode_reg_case})
+
+
+target_include_directories(lib_hbridgedriver2 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_hbridgedriver2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_hbridgedriver2 PUBLIC MikroSDK.Driver)
diff --git a/clicks/hbridgedriver2/lib_hbridgedriver2/include/Click.HBridgeDriver2 b/clicks/hbridgedriver2/lib_hbridgedriver2/include/Click.HBridgeDriver2
new file mode 100644
index 0000000000..5d09341d7d
--- /dev/null
+++ b/clicks/hbridgedriver2/lib_hbridgedriver2/include/Click.HBridgeDriver2
@@ -0,0 +1 @@
+#include "hbridgedriver2.h"
diff --git a/clicks/hbridgedriver2/lib/include/hbridgedriver2.h b/clicks/hbridgedriver2/lib_hbridgedriver2/include/hbridgedriver2.h
similarity index 100%
rename from clicks/hbridgedriver2/lib/include/hbridgedriver2.h
rename to clicks/hbridgedriver2/lib_hbridgedriver2/include/hbridgedriver2.h
diff --git a/clicks/spiextend/lib/include/spi_specifics.h b/clicks/hbridgedriver2/lib_hbridgedriver2/include/spi_specifics.h
similarity index 100%
rename from clicks/spiextend/lib/include/spi_specifics.h
rename to clicks/hbridgedriver2/lib_hbridgedriver2/include/spi_specifics.h
diff --git a/clicks/hbridgedriver2/lib/src/hbridgedriver2.c b/clicks/hbridgedriver2/lib_hbridgedriver2/src/hbridgedriver2.c
similarity index 100%
rename from clicks/hbridgedriver2/lib/src/hbridgedriver2.c
rename to clicks/hbridgedriver2/lib_hbridgedriver2/src/hbridgedriver2.c
diff --git a/clicks/hbridgedriver2/memake.txt b/clicks/hbridgedriver2/memake.txt
deleted file mode 100644
index 9940314377..0000000000
--- a/clicks/hbridgedriver2/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: HBridgeDriver2
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/heartrate3/CHANGELOG.md b/clicks/heartrate3/CHANGELOG.md
index fcfecd1843..dae6081f37 100644
--- a/clicks/heartrate3/CHANGELOG.md
+++ b/clicks/heartrate3/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.6
+### Version 2.1.0.6
- Initial release
diff --git a/clicks/heartrate3/CMakeLists.txt b/clicks/heartrate3/CMakeLists.txt
new file mode 100644
index 0000000000..3700fd40e9
--- /dev/null
+++ b/clicks/heartrate3/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_heartrate3 LANGUAGES MikroC)
+else()
+ project(example_heartrate3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_heartrate3
+ example/main.c
+
+)
+
+
+############################ example_heartrate3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_heartrate3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_heartrate3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_heartrate3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_heartrate3)
+target_link_libraries(example_heartrate3 PUBLIC Click.HeartRate3)
+############################ example_heartrate3 GENERATED CODE END ###########################
diff --git a/clicks/heartrate3/README.md b/clicks/heartrate3/README.md
index 4c77630aca..7652b9743a 100644
--- a/clicks/heartrate3/README.md
+++ b/clicks/heartrate3/README.md
@@ -1,6 +1,5 @@
\mainpage Main Page
-
---
# Heart rate 3 click
@@ -38,47 +37,54 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void heartrate3_cfg_setup ( heartrate3_cfg_t *cfg );
-
-- Initialization function.
-> HEARTRATE3_RETVAL heartrate3_init ( heartrate3_t *ctx, heartrate3_cfg_t *cfg );
+- `heartrate3_cfg_setup` Config Object Initialization function.
+```c
+void heartrate3_cfg_setup ( heartrate3_cfg_t *cfg );
+```
-- Click Default Configuration function.
-> void heartrate3_default_cfg ( heartrate3_t *ctx );
+- `heartrate3_init` Initialization function.
+```c
+err_t heartrate3_init ( heartrate3_t *ctx, heartrate3_cfg_t *cfg );
+```
+- `heartrate3_default_cfg` Click Default Configuration function.
+```c
+err_t heartrate3_default_cfg ( heartrate3_t *ctx );
+```
#### Example key functions :
-- Function is used to read 32-bit value from register.
-> uint32_t heartrate3_read_u32 ( heartrate3_t *ctx, uint8_t reg_adr );
-
-- Function is used to set or clear rst pin.
-> void heartrate3_rst_state ( heartrate3_t *ctx, uint8_t state );
+- `heartrate3_check_data_ready` Function is used to check data ready flag.
+```c
+uint8_t heartrate3_check_data_ready ( heartrate3_t *ctx );
+```
+
+- `heartrate3_write_data` Function is used to write 32-bit data into register.
+```c
+err_t heartrate3_write_data ( heartrate3_t *ctx, uint8_t reg_adr, uint32_t wr_data );
+```
-- Function is used to write 32-bit data into register.
-> void heartrate3_write_data ( heartrate3_t *ctx, uint8_t reg_adr, uint32_t wr_data );
+- `heartrate3_read_24bit` Function is used to read 24-bit value from register.
+```c
+err_t heartrate3_read_24bit ( heartrate3_t *ctx, uint8_t reg_adr, uint32_t *data_out );
+```
## Examples Description
->
> The demo application shows reflected red, green and ir values.
->
**The demo application is composed of two sections :**
### Application Init
->
> Initalizes click driver, resets the device, applies default settings and makes an initial log.
->
```c
void application_init ( void )
{
log_cfg_t log_cfg;
- heartrate3_cfg_t cfg;
+ heartrate3_cfg_t heartrate3_cfg;
/**
* Logger initialization.
@@ -91,67 +97,66 @@ void application_init ( void )
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_printf( &logger, "---- Application Init ----\r\n" );
+ log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
- heartrate3_cfg_setup( &cfg );
- HEARTRATE3_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- heartrate3_init( &heartrate3, &cfg );
+ heartrate3_cfg_setup( &heartrate3_cfg );
+ HEARTRATE3_MAP_MIKROBUS( heartrate3_cfg, MIKROBUS_1 );
+ if ( I2C_MASTER_ERROR == heartrate3_init( &heartrate3, &heartrate3_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
log_printf( &logger, "----------------------\r\n" );
log_printf( &logger, " Heart rate 3 Click \r\n" );
log_printf( &logger, "----------------------\r\n" );
- heartrate3_rst_state ( &heartrate3, HEARTRATE3_PIN_STATE_LOW );
- Delay_us( 50 );
-
- heartrate3_rst_state ( &heartrate3, HEARTRATE3_PIN_STATE_HIGH );
- Delay_ms( 100 );
-
- heartrate3_default_cfg ( &heartrate3 );
- Delay_ms( 100 );
+ if ( HEARTRATE3_ERROR == heartrate3_default_cfg ( &heartrate3 ) )
+ {
+ log_error( &logger, " Default configuration." );
+ for ( ; ; );
+ }
log_printf( &logger, " Initialised! \r\n" );
- log_printf( &logger, "----------------------\r\n" );
+ log_printf( &logger, "----------------------\r\n" );
+ log_info( &logger, " Application Task " );
+ Delay_ms( 100 );
}
```
### Application Task
->
> This example demonstrates the use of Heart rate 3 board. It is set in default mode,
- and reads reflected red, green and ir values and displays the results on USART terminal.
->
+and reads reflected red, green and ir values and displays the results on USART terminal.
```c
void application_task ( void )
{
- led_2 = heartrate3_read_u32( &heartrate3, HEARTRATE3_LED2VAL );
- log_printf( &logger, "LED2: %d \r\n", led_2 );
-
- aled_2 = heartrate3_read_u32( &heartrate3, HEARTRATE3_ALED2VAL );
- log_printf( &logger, "ALED2: %d \r\n", aled_2 );
-
- led_1 = heartrate3_read_u32( &heartrate3, HEARTRATE3_LED1VAL );
- log_printf( &logger, "LED1: %d \r\n", led_1 );
-
- aled_1 = heartrate3_read_u32( &heartrate3, HEARTRATE3_ALED1VAL );
- log_printf( &logger, "ALED1: %d \r\n", aled_1 );
-
- led_2_aled_2 = heartrate3_read_u32( &heartrate3, HEARTRATE3_LED2_ALED2VAL );
- log_printf( &logger, "LED2ALED2: %d \r\n", led_2_aled_2 );
-
- led_1_aled_1 = heartrate3_read_u32( &heartrate3, HEARTRATE3_LED1_ALED1VAL );
- log_printf( &logger, "LED1ALED1: %d \r\n", led_1_aled_1 );
-
- log_printf( &logger, "----------------------\r\n" );
- Delay_ms( 1000 );
+ err_t error_flag = HEARTRATE3_OK;
+ if ( heartrate3_check_data_ready ( &heartrate3 ) )
+ {
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_LED2VAL, &led_2 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_ALED2VAL, &aled_2 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_LED1VAL, &led_1 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_ALED1VAL, &aled_1 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_LED2_ALED2VAL, &led_2_aled_2 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_LED1_ALED1VAL, &led_1_aled_1 );
+ if ( HEARTRATE3_OK == error_flag )
+ {
+ log_printf( &logger, "%lu;%lu;%lu;%lu;%lu;%lu;\r\n",
+ led_2, aled_2, led_1, aled_1, led_2_aled_2, led_1_aled_1 );
+ }
+ }
}
```
+## Note
+
+> We recommend using the SerialPlot tool for data visualizing.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
diff --git a/clicks/heartrate3/details.md b/clicks/heartrate3/details.md
index fa58fcb041..6d5408cc35 100644
--- a/clicks/heartrate3/details.md
+++ b/clicks/heartrate3/details.md
@@ -36,47 +36,54 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void heartrate3_cfg_setup ( heartrate3_cfg_t *cfg );
-
-- Initialization function.
-> HEARTRATE3_RETVAL heartrate3_init ( heartrate3_t *ctx, heartrate3_cfg_t *cfg );
+- `heartrate3_cfg_setup` Config Object Initialization function.
+```c
+void heartrate3_cfg_setup ( heartrate3_cfg_t *cfg );
+```
-- Click Default Configuration function.
-> void heartrate3_default_cfg ( heartrate3_t *ctx );
+- `heartrate3_init` Initialization function.
+```c
+err_t heartrate3_init ( heartrate3_t *ctx, heartrate3_cfg_t *cfg );
+```
+- `heartrate3_default_cfg` Click Default Configuration function.
+```c
+err_t heartrate3_default_cfg ( heartrate3_t *ctx );
+```
#### Example key functions :
-- Function is used to read 32-bit value from register.
-> uint32_t heartrate3_read_u32 ( heartrate3_t *ctx, uint8_t reg_adr );
-
-- Function is used to set or clear rst pin.
-> void heartrate3_rst_state ( heartrate3_t *ctx, uint8_t state );
+- `heartrate3_check_data_ready` Function is used to check data ready flag.
+```c
+uint8_t heartrate3_check_data_ready ( heartrate3_t *ctx );
+```
-- Function is used to write 32-bit data into register.
-> void heartrate3_write_data ( heartrate3_t *ctx, uint8_t reg_adr, uint32_t wr_data );
+- `heartrate3_write_data` Function is used to write 32-bit data into register.
+```c
+err_t heartrate3_write_data ( heartrate3_t *ctx, uint8_t reg_adr, uint32_t wr_data );
+```
+
+- `heartrate3_read_24bit` Function is used to read 24-bit value from register.
+```c
+err_t heartrate3_read_24bit ( heartrate3_t *ctx, uint8_t reg_adr, uint32_t *data_out );
+```
## Examples Description
->
> The demo application shows reflected red, green and ir values.
->
**The demo application is composed of two sections :**
### Application Init
->
> Initalizes click driver, resets the device, applies default settings and makes an initial log.
->
```c
void application_init ( void )
{
log_cfg_t log_cfg;
- heartrate3_cfg_t cfg;
+ heartrate3_cfg_t heartrate3_cfg;
/**
* Logger initialization.
@@ -89,67 +96,66 @@ void application_init ( void )
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_printf( &logger, "---- Application Init ----\r\n" );
+ log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
- heartrate3_cfg_setup( &cfg );
- HEARTRATE3_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- heartrate3_init( &heartrate3, &cfg );
+ heartrate3_cfg_setup( &heartrate3_cfg );
+ HEARTRATE3_MAP_MIKROBUS( heartrate3_cfg, MIKROBUS_1 );
+ if ( I2C_MASTER_ERROR == heartrate3_init( &heartrate3, &heartrate3_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
log_printf( &logger, "----------------------\r\n" );
log_printf( &logger, " Heart rate 3 Click \r\n" );
log_printf( &logger, "----------------------\r\n" );
- heartrate3_rst_state ( &heartrate3, HEARTRATE3_PIN_STATE_LOW );
- Delay_us( 50 );
-
- heartrate3_rst_state ( &heartrate3, HEARTRATE3_PIN_STATE_HIGH );
- Delay_ms( 100 );
-
- heartrate3_default_cfg ( &heartrate3 );
- Delay_ms( 100 );
+ if ( HEARTRATE3_ERROR == heartrate3_default_cfg ( &heartrate3 ) )
+ {
+ log_error( &logger, " Default configuration." );
+ for ( ; ; );
+ }
log_printf( &logger, " Initialised! \r\n" );
- log_printf( &logger, "----------------------\r\n" );
+ log_printf( &logger, "----------------------\r\n" );
+ log_info( &logger, " Application Task " );
+ Delay_ms( 100 );
}
```
### Application Task
->
> This example demonstrates the use of Heart rate 3 board. It is set in default mode,
- and reads reflected red, green and ir values and displays the results on USART terminal.
->
+and reads reflected red, green and ir values and displays the results on USART terminal.
```c
void application_task ( void )
{
- led_2 = heartrate3_read_u32( &heartrate3, HEARTRATE3_LED2VAL );
- log_printf( &logger, "LED2: %d \r\n", led_2 );
-
- aled_2 = heartrate3_read_u32( &heartrate3, HEARTRATE3_ALED2VAL );
- log_printf( &logger, "ALED2: %d \r\n", aled_2 );
-
- led_1 = heartrate3_read_u32( &heartrate3, HEARTRATE3_LED1VAL );
- log_printf( &logger, "LED1: %d \r\n", led_1 );
-
- aled_1 = heartrate3_read_u32( &heartrate3, HEARTRATE3_ALED1VAL );
- log_printf( &logger, "ALED1: %d \r\n", aled_1 );
-
- led_2_aled_2 = heartrate3_read_u32( &heartrate3, HEARTRATE3_LED2_ALED2VAL );
- log_printf( &logger, "LED2ALED2: %d \r\n", led_2_aled_2 );
-
- led_1_aled_1 = heartrate3_read_u32( &heartrate3, HEARTRATE3_LED1_ALED1VAL );
- log_printf( &logger, "LED1ALED1: %d \r\n", led_1_aled_1 );
-
- log_printf( &logger, "----------------------\r\n" );
- Delay_ms( 1000 );
+ err_t error_flag = HEARTRATE3_OK;
+ if ( heartrate3_check_data_ready ( &heartrate3 ) )
+ {
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_LED2VAL, &led_2 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_ALED2VAL, &aled_2 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_LED1VAL, &led_1 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_ALED1VAL, &aled_1 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_LED2_ALED2VAL, &led_2_aled_2 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_LED1_ALED1VAL, &led_1_aled_1 );
+ if ( HEARTRATE3_OK == error_flag )
+ {
+ log_printf( &logger, "%lu;%lu;%lu;%lu;%lu;%lu;\r\n",
+ led_2, aled_2, led_1, aled_1, led_2_aled_2, led_1_aled_1 );
+ }
+ }
}
```
+## Note
+
+> We recommend using the SerialPlot tool for data visualizing.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
diff --git a/clicks/heartrate3/doc/doxy/Doxyfile.doxy b/clicks/heartrate3/doc/doxy/Doxyfile.doxy
index 08ae724bda..574ac2f37c 100644
--- a/clicks/heartrate3/doc/doxy/Doxyfile.doxy
+++ b/clicks/heartrate3/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/heartrate3/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/heartrate3/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/heartrate3/example \
- ../clicks/heartrate3/lib/include \
- ../clicks/heartrate3/README.md
+INPUT = ../cmake/heartrate3/example \
+ ../cmake/heartrate3/lib_heartrate3/include \
+ ../cmake/heartrate3/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/heartrate3/example
+EXAMPLE_PATH = ../cmake/heartrate3/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/heartrate3/doc/package/manifest.json b/clicks/heartrate3/doc/package/manifest.json
index 9e15008188..856d7ff868 100644
--- a/clicks/heartrate3/doc/package/manifest.json
+++ b/clicks/heartrate3/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Biometrics",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Biometrics",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Heart rate 3 click",
"example_list": [
@@ -26,18 +25,14 @@
"name": "mikroe.click.heartrate3",
"product_link": "https://www.mikroe.com/heart-rate-3-click",
"short_description": "Heart rate 3 click is a mikroBUS add-on board whose functionality is determined by two components: an OSRAM’s SFH7050 pulse oximetry and heart rate monitoring module, and a TI AFE4404 (analong-front-end) IC specialized for bio-sensing.",
- "supported_compiler": "mikroC AI",
- "type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
- 1908
- ],
+ "supported_compiler": "mikroC AI|GCC",
+ "type": "Library",
"_type": "mikroSDK Library",
- "version": "2.0.0.6"
+ "related_projects": [
+ 1908
+ ],
+ "version": "2.1.0.6",
+ "cmake": true,
+ "alias": "Click.HeartRate3",
+ "subdir_name": "lib_heartrate3"
}
-
-
-
-
-
-
diff --git a/clicks/heartrate3/example/CMakeLists.txt b/clicks/heartrate3/example/CMakeLists.txt
new file mode 100644
index 0000000000..a5127164c8
--- /dev/null
+++ b/clicks/heartrate3/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_heartrate3 LANGUAGES MikroC)
+else()
+ project(example_heartrate3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_heartrate3
+ main.c
+
+)
+
+
+############################ example_heartrate3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_heartrate3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_heartrate3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_heartrate3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_heartrate3)
+target_link_libraries(example_heartrate3 PUBLIC Click.HeartRate3)
+############################ example_heartrate3 GENERATED CODE END ###########################
diff --git a/clicks/heartrate3/example/main.c b/clicks/heartrate3/example/main.c
index 53a208b081..a9c2553e7e 100644
--- a/clicks/heartrate3/example/main.c
+++ b/clicks/heartrate3/example/main.c
@@ -16,6 +16,9 @@
* mode, and reads reflected red, green and ir values and displays the results
* on USART terminal.
*
+ * @note
+ * We recommend using the SerialPlot tool for data visualizing.
+ *
* \author Jovan Stajkovic
*
*/
@@ -42,7 +45,7 @@ static uint32_t led_1_aled_1;
void application_init ( void )
{
log_cfg_t log_cfg;
- heartrate3_cfg_t cfg;
+ heartrate3_cfg_t heartrate3_cfg;
/**
* Logger initialization.
@@ -58,40 +61,47 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
- heartrate3_cfg_setup( &cfg );
- HEARTRATE3_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- heartrate3_init( &heartrate3, &cfg );
+ heartrate3_cfg_setup( &heartrate3_cfg );
+ HEARTRATE3_MAP_MIKROBUS( heartrate3_cfg, MIKROBUS_1 );
+ if ( I2C_MASTER_ERROR == heartrate3_init( &heartrate3, &heartrate3_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
log_printf( &logger, "----------------------\r\n" );
log_printf( &logger, " Heart rate 3 Click \r\n" );
log_printf( &logger, "----------------------\r\n" );
- heartrate3_rst_state ( &heartrate3, HEARTRATE3_PIN_STATE_LOW );
- Delay_us( 100 );
-
- heartrate3_rst_state ( &heartrate3, HEARTRATE3_PIN_STATE_HIGH );
- Delay_ms( 1000 );
-
- heartrate3_default_cfg ( &heartrate3 );
- Delay_ms( 100 );
+ if ( HEARTRATE3_ERROR == heartrate3_default_cfg ( &heartrate3 ) )
+ {
+ log_error( &logger, " Default configuration." );
+ for ( ; ; );
+ }
log_printf( &logger, " Initialised! \r\n" );
- log_printf( &logger, "----------------------\r\n" );
- Delay_ms(100);
+ log_printf( &logger, "----------------------\r\n" );
+ log_info( &logger, " Application Task " );
+ Delay_ms( 100 );
}
void application_task ( void )
{
- led_2 = heartrate3_read_u32( &heartrate3, HEARTRATE3_LED2VAL );
- aled_2 = heartrate3_read_u32( &heartrate3, HEARTRATE3_ALED2VAL );
- led_1 = heartrate3_read_u32( &heartrate3, HEARTRATE3_LED1VAL );
- aled_1 = heartrate3_read_u32( &heartrate3, HEARTRATE3_ALED1VAL );
- led_2_aled_2 = heartrate3_read_u32( &heartrate3, HEARTRATE3_LED2_ALED2VAL );
- led_1_aled_1 = heartrate3_read_u32( &heartrate3, HEARTRATE3_LED1_ALED1VAL );
-
- log_printf( &logger, "%.0f,%.0f,%.0f,%.0f,%.0f,%.0f \r\n", (float)led_2, (float)aled_2,
- (float)led_1, (float)aled_1, (float)led_2_aled_2, (float)led_1_aled_1 );
- Delay_ms(3);
+ err_t error_flag = HEARTRATE3_OK;
+ if ( heartrate3_check_data_ready ( &heartrate3 ) )
+ {
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_LED2VAL, &led_2 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_ALED2VAL, &aled_2 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_LED1VAL, &led_1 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_ALED1VAL, &aled_1 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_LED2_ALED2VAL, &led_2_aled_2 );
+ error_flag |= heartrate3_read_24bit( &heartrate3, HEARTRATE3_REG_LED1_ALED1VAL, &led_1_aled_1 );
+ if ( HEARTRATE3_OK == error_flag )
+ {
+ log_printf( &logger, "%lu;%lu;%lu;%lu;%lu;%lu;\r\n",
+ led_2, aled_2, led_1, aled_1, led_2_aled_2, led_1_aled_1 );
+ }
+ }
}
void main ( void )
diff --git a/clicks/heartrate3/example/manifest.exm b/clicks/heartrate3/example/manifest.exm
index a0a02ba4fb..57c21ef644 100644
--- a/clicks/heartrate3/example/manifest.exm
+++ b/clicks/heartrate3/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Heart rate 3 Click",
"description": "Heart rate 3 click is a mikroBUS add-on board whose functionality is determined by two components: an OSRAM’s SFH7050 pulse oximetry and heart rate monitoring module, and a TI AFE4404 (analong-front-end) IC specialized for bio-sensing.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","SFH7050"],
"category" : ["Heart Rate","Biometrics"]
}
diff --git a/clicks/heartrate3/example/memake.txt b/clicks/heartrate3/example/memake.txt
deleted file mode 100644
index f9e33c0a54..0000000000
--- a/clicks/heartrate3/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_heartrate3
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.HeartRate3
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/heartrate3/lib/include/heartrate3.h b/clicks/heartrate3/lib/include/heartrate3.h
deleted file mode 100644
index e8ffd480b0..0000000000
--- a/clicks/heartrate3/lib/include/heartrate3.h
+++ /dev/null
@@ -1,666 +0,0 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- * \brief This file contains API for Heart rate 3 Click driver.
- *
- * \addtogroup heartrate3 Heart rate 3 Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef HEARTRATE3_H
-#define HEARTRATE3_H
-
-#include "drv_digital_out.h"
-#include "drv_digital_in.h"
-#include "drv_i2c_master.h"
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-#define HEARTRATE3_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
- cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
- cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
- cfg.clk = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
- cfg.rdy = MIKROBUS( mikrobus, MIKROBUS_INT )
-/** \} */
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define HEARTRATE3_RETVAL uint8_t
-
-#define HEARTRATE3_OK 0x00
-#define HEARTRATE3_INIT_ERROR 0xFF
-/** \} */
-
-/**
- * \defgroup dev_slave_adr Device slave address
- * \{
- */
-#define HEARTRATE3_SLAVE_ADDR 0x58
-/** \} */
-
-/**
- * \defgroup register_map Register map
- * \{
- */
-#define HEARTRATE3_CONTROL0 0x00
-#define HEARTRATE3_LED2STC 0x01
-#define HEARTRATE3_LED2ENDC 0x02
-#define HEARTRATE3_LED1LEDSTC 0x03
-#define HEARTRATE3_LED1LEDENDC 0x04
-#define HEARTRATE3_ALED2STC 0x05
-#define HEARTRATE3_ALED2ENDC 0x06
-#define HEARTRATE3_LED1STC 0x07
-#define HEARTRATE3_LED1ENDC 0x08
-#define HEARTRATE3_LED2LEDSTC 0x09
-#define HEARTRATE3_LED2LEDENDC 0x0A
-#define HEARTRATE3_ALED1STC 0x0B
-#define HEARTRATE3_ALED1ENDC 0x0C
-#define HEARTRATE3_LED2CONVST 0x0D
-#define HEARTRATE3_LED2CONVEND 0x0E
-#define HEARTRATE3_ALED2CONVST 0x0F
-#define HEARTRATE3_ALED2CONVEND 0x10
-#define HEARTRATE3_LED1CONVST 0x11
-#define HEARTRATE3_LED1CONVEND 0x12
-#define HEARTRATE3_ALED1CONVST 0x13
-#define HEARTRATE3_ALED1CONVEND 0x14
-#define HEARTRATE3_ADCRSTSTCT0 0x15
-#define HEARTRATE3_ADCRSTENDCT0 0x16
-#define HEARTRATE3_ADCRSTSTCT1 0x17
-#define HEARTRATE3_ADCRSTENDCT1 0x18
-#define HEARTRATE3_ADCRSTSTCT2 0x19
-#define HEARTRATE3_ADCRSTENDCT2 0x1A
-#define HEARTRATE3_ADCRSTSTCT3 0x1B
-#define HEARTRATE3_ADCRSTENDCT3 0x1C
-#define HEARTRATE3_PRPCOUNT 0x1D
-#define HEARTRATE3_CONTROL1 0x1E
-#define HEARTRATE3_TIA_GAIN_SEP 0x20
-#define HEARTRATE3_TIA_GAIN 0x21
-#define HEARTRATE3_LEDCNTRL 0x22
-#define HEARTRATE3_CONTROL2 0x23
-#define HEARTRATE3_ALARM 0x29
-#define HEARTRATE3_LED2VAL 0x2A
-#define HEARTRATE3_ALED2VAL 0x2B
-#define HEARTRATE3_LED1VAL 0x2C
-#define HEARTRATE3_ALED1VAL 0x2D
-#define HEARTRATE3_LED2_ALED2VAL 0x2E
-#define HEARTRATE3_LED1_ALED1VAL 0x2F
-#define HEARTRATE3_CONTROL3 0x31
-#define HEARTRATE3_PDNCYCLESTC 0x32
-#define HEARTRATE3_PDNCYCLEENDC 0x33
-#define HEARTRATE3_PROG_TG_STC 0x34
-#define HEARTRATE3_PROG_TG_ENDC 0x35
-#define HEARTRATE3_LED3LEDSTC 0x36
-#define HEARTRATE3_LED3LEDENDC 0x37
-#define HEARTRATE3_CLKDIV_PRF 0x39
-#define HEARTRATE3_OFFDAC 0x3A
-#define HEARTRATE3_DEC 0x3D
-#define HEARTRATE3_AVG_LED2_ALED2VAL 0x3F
-#define HEARTRATE3_AVG_LED1_ALED1VAL 0x40
-/** \} */
-
-/**
- * \defgroup cmd_list Configuration commands list
- * \{
- */
-#define HEARTRATE3_CONTROL0_CMD 0x000000
-#define HEARTRATE3_LED2STC_CMD 0x000050
-#define HEARTRATE3_LED2ENDC_CMD 0x00018F
-#define HEARTRATE3_LED1LEDSTC_CMD 0x000320
-#define HEARTRATE3_LED1LEDENDC_CMD 0x0004AF
-#define HEARTRATE3_ALED2STC_CMD 0x0001E0
-#define HEARTRATE3_ALED2ENDC_CMD 0x00031F
-#define HEARTRATE3_LED1STC_CMD 0x000370
-#define HEARTRATE3_LED1ENDC_CMD 0x0004AF
-#define HEARTRATE3_LED2LEDSTC_CMD 0x000000
-#define HEARTRATE3_LED2LEDENDC_CMD 0x00018F
-#define HEARTRATE3_ALED1STC_CMD 0x0004FF
-#define HEARTRATE3_ALED1ENDC_CMD 0x00063E
-#define HEARTRATE3_LED2CONVST_CMD 0x000198
-#define HEARTRATE3_LED2CONVEND_CMD 0x0005BB
-#define HEARTRATE3_ALED2CONVST_CMD 0x0005C4
-#define HEARTRATE3_ALED2CONVEND_CMD 0x0009E7
-#define HEARTRATE3_LED1CONVST_CMD 0x0009F0
-#define HEARTRATE3_LED1CONVEND_CMD 0x000E13
-#define HEARTRATE3_ALED1CONVST_CMD 0x000E1C
-#define HEARTRATE3_ALED1CONVEND_CMD 0x00123F
-#define HEARTRATE3_ADCRSTSTCT0_CMD 0x000191
-#define HEARTRATE3_ADCRSTENDCT0_CMD 0x000197
-#define HEARTRATE3_ADCRSTSTCT1_CMD 0x0005BD
-#define HEARTRATE3_ADCRSTENDCT1_CMD 0x0005C3
-#define HEARTRATE3_ADCRSTSTCT2_CMD 0x0009E9
-#define HEARTRATE3_ADCRSTENDCT2_CMD 0x0009EF
-#define HEARTRATE3_ADCRSTSTCT3_CMD 0x000E15
-#define HEARTRATE3_ADCRSTENDCT3_CMD 0x000E1B
-#define HEARTRATE3_PRPCOUNT_CMD 0x009C3E
-#define HEARTRATE3_CONTROL1_CMD 0x000103
-#define HEARTRATE3_TIA_GAIN_SEP_CMD 0x008003
-#define HEARTRATE3_TIA_GAIN_CMD 0x000003
-#define HEARTRATE3_LEDCNTRL_CMD 0x01B6D9
-#define HEARTRATE3_CONTROL2_CMD 0x104218
-#define HEARTRATE3_ALARM_CMD 0x000000
-#define HEARTRATE3_CONTROL3_CMD 0x000000
-#define HEARTRATE3_PDNCYCLESTC_CMD 0x00155F
-#define HEARTRATE3_PDNCYCLEENDC_CMD 0x00991E
-#define HEARTRATE3_PROG_TG_STC_CMD 0x000000
-#define HEARTRATE3_PROG_TG_ENDC_CMD 0x000000
-#define HEARTRATE3_LED3LEDSTC_CMD 0x000190
-#define HEARTRATE3_LED3LEDENDC_CMD 0x00031F
-#define HEARTRATE3_CLKDIV_PRF_CMD 0x000000
-#define HEARTRATE3_OFFDAC_CMD 0x000000
-/** \} */
-
-/**
- * \defgroup pin_state Pin state
- * \{
- */
-#define HEARTRATE3_PIN_STATE_LOW 0x00
-#define HEARTRATE3_PIN_STATE_HIGH 0x01
-/** \} */
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
- // Output pins
-
- digital_out_t rst;
- digital_out_t clk;
-
- // Input pins
-
- digital_in_t rdy;
-
- // Modules
-
- i2c_master_t i2c;
-
- // ctx variable
-
- uint8_t slave_address;
-
-} heartrate3_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Communication gpio pins
-
- pin_name_t scl;
- pin_name_t sda;
-
- // Additional gpio pins
-
- pin_name_t rst;
- pin_name_t clk;
- pin_name_t rdy;
-
- // static variable
-
- uint32_t i2c_speed;
- uint8_t i2c_address;
-
-} heartrate3_cfg_t;
-
-/** \} */ // End types group
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to
- * init state.
- * @note All used pins will be set to unconnected state.
- */
-void heartrate3_cfg_setup ( heartrate3_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- *
- * @param ctx Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals
- * used for this click.
- */
-HEARTRATE3_RETVAL heartrate3_init ( heartrate3_t *ctx, heartrate3_cfg_t *cfg );
-
-/**
- * @brief Click Default Configuration function.
- *
- * @param ctx Click object.
- *
- * @description This function executes default configuration for
- * HeartRate3 click.
- *
- * HEARTRATE3_CONTROL0
- * -------------------------------------------
- * HEARTRATE3_CONTROL0_CMD
- *
- *
- *
- * HEARTRATE3_LED2STC
- * -------------------------------------------
- * HEARTRATE3_LED2STC_CMD
- *
- *
- *
- * HEARTRATE3_LED2ENDC
- * -------------------------------------------
- * HEARTRATE3_LED2ENDC_CMD
- *
- *
- *
- * HEARTRATE3_LED1LEDSTC
- * -------------------------------------------
- * HEARTRATE3_LED1LEDSTC_CMD
- *
- *
- *
- * HEARTRATE3_LED1LEDENDC
- * -------------------------------------------
- * HEARTRATE3_LED1LEDENDC_CMD
- *
- *
- *
- * HEARTRATE3_ALED2STC
- * -------------------------------------------
- * HEARTRATE3_ALED2STC_CMD
- *
- *
- *
- * HEARTRATE3_ALED2ENDC
- * -------------------------------------------
- * HEARTRATE3_ALED2ENDC_CMD
- *
- *
- *
- * HEARTRATE3_LED1STC
- * -------------------------------------------
- * HEARTRATE3_LED1STC_CMD
- *
- *
- *
- * HEARTRATE3_LED1ENDC
- * -------------------------------------------
- * HEARTRATE3_LED1ENDC_CMD
- *
- *
- *
- * HEARTRATE3_LED2LEDSTC
- * -------------------------------------------
- * HEARTRATE3_LED2LEDSTC_CMD
- *
- *
- *
- * HEARTRATE3_LED2LEDENDC
- * -------------------------------------------
- * HEARTRATE3_LED2LEDENDC_CMD
- *
- *
- *
- * HEARTRATE3_ALED1STC
- * -------------------------------------------
- * HEARTRATE3_ALED1STC_CMD
- *
- *
- *
- * HEARTRATE3_ALED1ENDC
- * -------------------------------------------
- * HEARTRATE3_ALED1ENDC_CMD
- *
- *
- *
- * HEARTRATE3_LED2CONVST
- * -------------------------------------------
- * HEARTRATE3_LED2CONVST_CMD
- *
- *
- *
- * HEARTRATE3_LED2CONVEND
- * -------------------------------------------
- * HEARTRATE3_LED2CONVEND_CMD
- *
- *
- *
- * HEARTRATE3_ALED2CONVST
- * -------------------------------------------
- * HEARTRATE3_ALED2CONVST_CMD
- *
- *
- *
- * HEARTRATE3_ALED2CONVEND
- * -------------------------------------------
- * HEARTRATE3_ALED2CONVEND_CMD
- *
- *
- *
- * HEARTRATE3_LED1CONVST
- * -------------------------------------------
- * HEARTRATE3_LED1CONVST_CMD
- *
- *
- *
- * HEARTRATE3_LED1CONVEND
- * -------------------------------------------
- * HEARTRATE3_LED1CONVEND_CMD
- *
- *
- *
- * HEARTRATE3_ALED1CONVST
- * -------------------------------------------
- * HEARTRATE3_ALED1CONVST_CMD
- *
- *
- *
- * HEARTRATE3_ALED1CONVEND
- * -------------------------------------------
- * HEARTRATE3_ALED1CONVEND_CMD
- *
- *
- *
- * HEARTRATE3_ADCRSTSTCT0
- * -------------------------------------------
- * HEARTRATE3_ADCRSTSTCT0_CMD
- *
- *
- *
- * HEARTRATE3_ADCRSTENDCT0
- * -------------------------------------------
- * HEARTRATE3_ADCRSTENDCT0_CMD
- *
- *
- *
- * HEARTRATE3_ADCRSTSTCT1
- * -------------------------------------------
- * HEARTRATE3_ADCRSTSTCT1_CMD
- *
- *
- *
- * HEARTRATE3_ADCRSTENDCT1
- * -------------------------------------------
- * HEARTRATE3_ADCRSTENDCT1_CMD
- *
- *
- *
- * HEARTRATE3_ADCRSTSTCT2
- * -------------------------------------------
- * HEARTRATE3_ADCRSTSTCT2_CMD
- *
- *
- *
- * HEARTRATE3_ADCRSTENDCT2
- * -------------------------------------------
- * HEARTRATE3_ADCRSTENDCT2_CMD
- *
- *
- *
- * HEARTRATE3_ADCRSTSTCT3
- * -------------------------------------------
- * HEARTRATE3_ADCRSTSTCT3_CMD
- *
- *
- *
- * HEARTRATE3_ADCRSTENDCT3
- * -------------------------------------------
- * HEARTRATE3_ADCRSTENDCT3_CMD
- *
- *
- *
- * HEARTRATE3_PRPCOUNT
- * -------------------------------------------
- * HEARTRATE3_PRPCOUNT_CMD
- *
- *
- *
- * HEARTRATE3_CONTROL1
- * -------------------------------------------
- * HEARTRATE3_CONTROL1_CMD
- *
- *
- *
- * HEARTRATE3_TIA_GAIN_SEP
- * -------------------------------------------
- * HEARTRATE3_TIA_GAIN_SEP_CMD
- *
- *
- *
- * HEARTRATE3_TIA_GAIN
- * -------------------------------------------
- * HEARTRATE3_TIA_GAIN_CMD
- *
- *
- *
- * HEARTRATE3_LEDCNTRL
- * -------------------------------------------
- * HEARTRATE3_LEDCNTRL_CMD
- *
- *
- *
- * HEARTRATE3_CONTROL2
- * -------------------------------------------
- * HEARTRATE3_CONTROL2_CMD
- *
- *
- *
- * HEARTRATE3_ALARM
- * -------------------------------------------
- * HEARTRATE3_ALARM_CMD
- *
- *
- *
- * HEARTRATE3_CONTROL3
- * -------------------------------------------
- * HEARTRATE3_CONTROL3_CMD
- *
- *
- *
- * HEARTRATE3_PDNCYCLESTC
- * -------------------------------------------
- * HEARTRATE3_PDNCYCLESTC_CMD
- *
- *
- *
- * HEARTRATE3_PDNCYCLEENDC
- * -------------------------------------------
- * HEARTRATE3_PDNCYCLEENDC_CMD
- *
- *
- *
- * HEARTRATE3_PROG_TG_STC_CMD
- * -------------------------------------------
- * HEARTRATE3_PROG_TG_STC
- *
- *
- *
- * HEARTRATE3_PROG_TG_ENDC
- * -------------------------------------------
- * HEARTRATE3_PROG_TG_ENDC_CMD
- *
- *
- *
- * HEARTRATE3_LED3LEDSTC
- * -------------------------------------------
- * HEARTRATE3_LED3LEDSTC_CMD
- *
- *
- *
- * HEARTRATE3_LED3LEDENDC
- * -------------------------------------------
- * HEARTRATE3_LED3LEDENDC_CMD
- *
- *
- *
- * HEARTRATE3_CLKDIV_PRF
- * -------------------------------------------
- * HEARTRATE3_CLKDIV_PRF_CMD
- *
- *
- *
- * HEARTRATE3_OFFDAC
- * -------------------------------------------
- * HEARTRATE3_OFFDAC_CMD
- *
- *
- */
-void heartrate3_default_cfg ( heartrate3_t *ctx );
-
-/**
- * @brief Generic write function.
- *
- * @param ctx Click object.
- * @param reg Register address.
- * @param data_buf Data buf to be written.
- * @param len Number of the bytes in data buf.
- *
- * @description This function writes data to the desired register.
- */
-void heartrate3_generic_write ( heartrate3_t *ctx, uint8_t reg,
- uint8_t *data_buf, uint8_t len );
-
-/**
- * @brief Generic read function.
- *
- * @param ctx Click object.
- * @param reg Register address.
- * @param data_buf Output data buf
- * @param len Number of the bytes to be read
- *
- * @description This function reads data from the desired register.
- */
-void heartrate3_generic_read ( heartrate3_t *ctx, uint8_t reg,
- uint8_t *data_buf, uint8_t len );
-
-/**
- * @brief Write data function
- *
- * @param ctx Click object.
- * @param reg_adr 8-bit data that defines register's address
- * @param wr_data 32-bit used defined data to be written into register
- *
- * @description Function is used to write 32-bit data into register.
-**/
-void heartrate3_write_data ( heartrate3_t *ctx, uint8_t reg_adr,
- uint32_t wr_data );
-
-/**
- * @brief Read 32-bit data function
- *
- * @param ctx Click object.
- * @param reg_adr 8-bit data that defines register's address
- *
- * @returns result 32-bit value read from chosen register
- *
- * @description Function is used to read 32-bit value from register.
-**/
-uint32_t heartrate3_read_u32 ( heartrate3_t *ctx, uint8_t reg_adr );
-
-/**
- * @brief Read 16-bit data function
- *
- * @param ctx Click object.
- * @param reg_adr 8-bit data that defines register's address
- *
- * @returns result 16-bit value read from chosen register
- *
- * @description Function is used to read 16-bit value from register.
-**/
-uint16_t heartrate3_read_u16 ( heartrate3_t *ctx, uint8_t reg_adr );
-
-/**
- * @brief Set Reset pin state
- *
- * @param ctx Click object.
- * @param state 0 - rst pin cleared / 1 - rst pin set
- *
- * @description Function is used to set or clear rst pin.
- */
-void heartrate3_rst_state ( heartrate3_t *ctx, uint8_t state );
-
-/**
- * @brief Set Clock pin state
- *
- * @param ctx Click object.
- * @param state 0 - clk pin cleared / 1 - clk pin set
- *
- * @description Function is used to set or clear clk pin.
- */
-void heartrate3_clk_state ( heartrate3_t *ctx, uint8_t state );
-
-/**
- * @brief Check data ready function
- *
- * @param ctx Click object.
- *
- * @return 1 : data ready / 0 : data not ready
- *
- * @description Function is used to check data ready flag.
-**/
-uint8_t heartrate3_check_data_ready ( heartrate3_t *ctx );
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _HEARTRATE3_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
diff --git a/clicks/heartrate3/lib/memake.txt b/clicks/heartrate3/lib/memake.txt
deleted file mode 100644
index ab576d61bf..0000000000
--- a/clicks/heartrate3/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_heartrate3
-
-alias: Click.HeartRate3
-
-sources: {
- src/heartrate3.c
-}
-
-headers: {
- include/heartrate3.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/heartrate3.h) dst(include/heartrate3.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/heartrate3/lib/src/heartrate3.c b/clicks/heartrate3/lib/src/heartrate3.c
deleted file mode 100644
index a15b3ead54..0000000000
--- a/clicks/heartrate3/lib/src/heartrate3.c
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- */
-
-#include "heartrate3.h"
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void heartrate3_cfg_setup ( heartrate3_cfg_t *cfg )
-{
- // Communication gpio pins
-
- cfg->scl = HAL_PIN_NC;
- cfg->sda = HAL_PIN_NC;
-
- // Additional gpio pins
-
- cfg->rst = HAL_PIN_NC;
- cfg->clk = HAL_PIN_NC;
- cfg->rdy = HAL_PIN_NC;
-
- cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD;
- cfg->i2c_address = HEARTRATE3_SLAVE_ADDR;
-}
-
-HEARTRATE3_RETVAL heartrate3_init ( heartrate3_t *ctx, heartrate3_cfg_t *cfg )
-{
- i2c_master_config_t i2c_cfg;
-
- i2c_master_configure_default( &i2c_cfg );
- i2c_cfg.speed = cfg->i2c_speed;
- i2c_cfg.scl = cfg->scl;
- i2c_cfg.sda = cfg->sda;
-
- ctx->slave_address = cfg->i2c_address;
-
- if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR )
- {
- return HEARTRATE3_INIT_ERROR;
- }
-
- i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address );
- i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed );
-
- // Output pins
-
- digital_out_init( &ctx->rst, cfg->rst );
- digital_out_init( &ctx->clk, cfg->clk );
-
- // Input pins
-
- digital_in_init( &ctx->rdy, cfg->rdy );
-
- return HEARTRATE3_OK;
-}
-
-void heartrate3_default_cfg ( heartrate3_t *ctx )
-{
- // Click default configuration
- heartrate3_write_data( ctx, HEARTRATE3_CONTROL0,
- HEARTRATE3_CONTROL0_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED2STC,
- HEARTRATE3_LED2STC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED2ENDC,
- HEARTRATE3_LED2ENDC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED1LEDSTC,
- HEARTRATE3_LED1LEDSTC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED1LEDENDC,
- HEARTRATE3_LED1LEDENDC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ALED2STC,
- HEARTRATE3_ALED2STC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ALED2ENDC,
- HEARTRATE3_ALED2ENDC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED1STC,
- HEARTRATE3_LED1STC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED1ENDC,
- HEARTRATE3_LED1ENDC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED2LEDSTC,
- HEARTRATE3_LED2LEDSTC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED2LEDENDC,
- HEARTRATE3_LED2LEDENDC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ALED1STC,
- HEARTRATE3_ALED1STC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ALED1ENDC,
- HEARTRATE3_ALED1ENDC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED2CONVST,
- HEARTRATE3_LED2CONVST_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED2CONVEND,
- HEARTRATE3_LED2CONVEND_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ALED2CONVST,
- HEARTRATE3_ALED2CONVST_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ALED2CONVEND,
- HEARTRATE3_ALED2CONVEND_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED1CONVST,
- HEARTRATE3_LED1CONVST_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED1CONVEND,
- HEARTRATE3_LED1CONVEND_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ALED1CONVST,
- HEARTRATE3_ALED1CONVST_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ALED1CONVEND,
- HEARTRATE3_ALED1CONVEND_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ADCRSTSTCT0,
- HEARTRATE3_ADCRSTSTCT0_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ADCRSTENDCT0,
- HEARTRATE3_ADCRSTENDCT0_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ADCRSTSTCT1,
- HEARTRATE3_ADCRSTSTCT1_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ADCRSTENDCT1,
- HEARTRATE3_ADCRSTENDCT1_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ADCRSTSTCT2,
- HEARTRATE3_ADCRSTSTCT2_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ADCRSTENDCT2,
- HEARTRATE3_ADCRSTENDCT2_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ADCRSTSTCT3,
- HEARTRATE3_ADCRSTSTCT3_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ADCRSTENDCT3,
- HEARTRATE3_ADCRSTENDCT3_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_PRPCOUNT,
- HEARTRATE3_PRPCOUNT_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_CONTROL1,
- HEARTRATE3_CONTROL1_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_TIA_GAIN_SEP,
- HEARTRATE3_TIA_GAIN_SEP_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_TIA_GAIN,
- HEARTRATE3_TIA_GAIN_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LEDCNTRL,
- HEARTRATE3_LEDCNTRL_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_CONTROL2,
- HEARTRATE3_CONTROL2_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_ALARM,
- HEARTRATE3_ALARM_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_CONTROL3,
- HEARTRATE3_CONTROL3_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_PDNCYCLESTC,
- HEARTRATE3_PDNCYCLESTC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_PDNCYCLEENDC,
- HEARTRATE3_PDNCYCLEENDC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_PROG_TG_STC,
- HEARTRATE3_PROG_TG_STC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_PROG_TG_ENDC,
- HEARTRATE3_PROG_TG_ENDC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED3LEDSTC,
- HEARTRATE3_LED3LEDSTC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_LED3LEDENDC,
- HEARTRATE3_LED3LEDENDC_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_CLKDIV_PRF,
- HEARTRATE3_CLKDIV_PRF_CMD );
- heartrate3_write_data( ctx, HEARTRATE3_OFFDAC,
- HEARTRATE3_OFFDAC_CMD );
-}
-
-void heartrate3_generic_write ( heartrate3_t *ctx, uint8_t reg,
- uint8_t *data_buf, uint8_t len )
-{
- uint8_t tx_buf[ 256 ];
- uint8_t cnt;
-
- tx_buf[ 0 ] = reg;
-
- for ( cnt = 1; cnt <= len; cnt++ )
- {
- tx_buf[ cnt ] = data_buf[ cnt - 1 ];
- }
-
- i2c_master_write( &ctx->i2c, tx_buf, len + 1 );
-}
-
-void heartrate3_generic_read ( heartrate3_t *ctx, uint8_t reg,
- uint8_t *data_buf, uint8_t len )
-{
- i2c_master_write_then_read( &ctx->i2c, ®, 1, data_buf, len );
-}
-
-void heartrate3_write_data ( heartrate3_t *ctx, uint8_t reg_adr,
- uint32_t wr_data )
-{
- uint8_t tx_buf[ 3 ];
- tx_buf[ 0 ] = wr_data >> 16;
- tx_buf[ 1 ] = wr_data >> 8;
- tx_buf[ 2 ] = wr_data;
-
- heartrate3_generic_write( ctx, reg_adr, tx_buf, 3 );
-}
-
-uint32_t heartrate3_read_u32 ( heartrate3_t *ctx, uint8_t reg_adr )
-{
- uint32_t result;
- uint8_t rx_buf[ 3 ];
-
- heartrate3_generic_read( ctx, reg_adr, rx_buf, 3 );
-
- result = rx_buf[ 0 ];
- result <<= 8;
- result |= rx_buf[ 1 ];
- result <<= 8;
- result |= rx_buf[ 2 ];
-
- return result;
-}
-
-uint16_t heartrate3_read_u16 ( heartrate3_t *ctx, uint8_t reg_adr )
-{
- uint8_t rx_buf[ 2 ];
- uint16_t result;
-
- heartrate3_generic_read( ctx, reg_adr, rx_buf, 2 );
-
- result = rx_buf[ 0 ];
- result <<= 8;
- result |= rx_buf[ 1 ];
-
- return result;
-}
-
-void heartrate3_rst_state ( heartrate3_t *ctx, uint8_t state )
-{
- if ( state == HEARTRATE3_PIN_STATE_HIGH )
- {
- digital_out_high( &ctx->rst );
- }
- else
- {
- digital_out_low( &ctx->rst );
- }
-}
-
-void heartrate3_clk_state ( heartrate3_t *ctx, uint8_t state )
-{
- if ( state == HEARTRATE3_PIN_STATE_HIGH )
- {
- digital_out_high( &ctx->clk );
- }
- else
- {
- digital_out_low( &ctx->clk );
- }
-}
-
-uint8_t heartrate3_check_data_ready ( heartrate3_t *ctx )
-{
- return digital_in_read( &ctx->rdy );
-}
-
-// ------------------------------------------------------------------------- END
-
diff --git a/clicks/heartrate3/lib_heartrate3/CMakeLists.txt b/clicks/heartrate3/lib_heartrate3/CMakeLists.txt
new file mode 100644
index 0000000000..5980b151de
--- /dev/null
+++ b/clicks/heartrate3/lib_heartrate3/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_heartrate3 LANGUAGES MikroC)
+else()
+ project(lib_heartrate3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_heartrate3 STATIC
+ src/heartrate3.c
+ include/heartrate3.h
+)
+add_library(Click.HeartRate3 ALIAS lib_heartrate3)
+
+
+
+target_include_directories(lib_heartrate3 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_heartrate3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_heartrate3 PUBLIC MikroSDK.Driver)
diff --git a/clicks/heartrate3/lib_heartrate3/include/Click.HeartRate3 b/clicks/heartrate3/lib_heartrate3/include/Click.HeartRate3
new file mode 100644
index 0000000000..98527aa252
--- /dev/null
+++ b/clicks/heartrate3/lib_heartrate3/include/Click.HeartRate3
@@ -0,0 +1 @@
+#include "heartrate3.h"
diff --git a/clicks/heartrate3/lib_heartrate3/include/heartrate3.h b/clicks/heartrate3/lib_heartrate3/include/heartrate3.h
new file mode 100644
index 0000000000..b4b640c166
--- /dev/null
+++ b/clicks/heartrate3/lib_heartrate3/include/heartrate3.h
@@ -0,0 +1,381 @@
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ * \brief This file contains API for Heart rate 3 Click driver.
+ *
+ * \addtogroup heartrate3 Heart rate 3 Click Driver
+ * @{
+ */
+// ----------------------------------------------------------------------------
+
+#ifndef HEARTRATE3_H
+#define HEARTRATE3_H
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_i2c_master.h"
+
+// -------------------------------------------------------------- PUBLIC MACROS
+/**
+ * \defgroup macros Macros
+ * \{
+ */
+
+/**
+ * \defgroup map_mikrobus MikroBUS
+ * \{
+ */
+#define HEARTRATE3_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
+ cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
+ cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
+ cfg.clk = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
+ cfg.rdy = MIKROBUS( mikrobus, MIKROBUS_INT )
+/** \} */
+
+/**
+ * \defgroup error_code Error Code
+ * \{
+ */
+#define HEARTRATE3_OK 0
+#define HEARTRATE3_ERROR -1
+/** \} */
+
+/**
+ * \defgroup dev_slave_adr Device slave address
+ * \{
+ */
+#define HEARTRATE3_SLAVE_ADDR 0x58
+/** \} */
+
+/**
+ * \defgroup register_map Register map
+ * \{
+ */
+#define HEARTRATE3_REG_CONTROL0 0x00
+#define HEARTRATE3_REG_LED2STC 0x01
+#define HEARTRATE3_REG_LED2ENDC 0x02
+#define HEARTRATE3_REG_LED1LEDSTC 0x03
+#define HEARTRATE3_REG_LED1LEDENDC 0x04
+#define HEARTRATE3_REG_ALED2STC 0x05
+#define HEARTRATE3_REG_ALED2ENDC 0x06
+#define HEARTRATE3_REG_LED1STC 0x07
+#define HEARTRATE3_REG_LED1ENDC 0x08
+#define HEARTRATE3_REG_LED2LEDSTC 0x09
+#define HEARTRATE3_REG_LED2LEDENDC 0x0A
+#define HEARTRATE3_REG_ALED1STC 0x0B
+#define HEARTRATE3_REG_ALED1ENDC 0x0C
+#define HEARTRATE3_REG_LED2CONVST 0x0D
+#define HEARTRATE3_REG_LED2CONVEND 0x0E
+#define HEARTRATE3_REG_ALED2CONVST 0x0F
+#define HEARTRATE3_REG_ALED2CONVEND 0x10
+#define HEARTRATE3_REG_LED1CONVST 0x11
+#define HEARTRATE3_REG_LED1CONVEND 0x12
+#define HEARTRATE3_REG_ALED1CONVST 0x13
+#define HEARTRATE3_REG_ALED1CONVEND 0x14
+#define HEARTRATE3_REG_ADCRSTSTCT0 0x15
+#define HEARTRATE3_REG_ADCRSTENDCT0 0x16
+#define HEARTRATE3_REG_ADCRSTSTCT1 0x17
+#define HEARTRATE3_REG_ADCRSTENDCT1 0x18
+#define HEARTRATE3_REG_ADCRSTSTCT2 0x19
+#define HEARTRATE3_REG_ADCRSTENDCT2 0x1A
+#define HEARTRATE3_REG_ADCRSTSTCT3 0x1B
+#define HEARTRATE3_REG_ADCRSTENDCT3 0x1C
+#define HEARTRATE3_REG_PRPCOUNT 0x1D
+#define HEARTRATE3_REG_CONTROL1 0x1E
+#define HEARTRATE3_REG_TIA_GAIN_SEP 0x20
+#define HEARTRATE3_REG_TIA_GAIN 0x21
+#define HEARTRATE3_REG_LEDCNTRL 0x22
+#define HEARTRATE3_REG_CONTROL2 0x23
+#define HEARTRATE3_REG_ALARM 0x29
+#define HEARTRATE3_REG_LED2VAL 0x2A
+#define HEARTRATE3_REG_ALED2VAL 0x2B
+#define HEARTRATE3_REG_LED1VAL 0x2C
+#define HEARTRATE3_REG_ALED1VAL 0x2D
+#define HEARTRATE3_REG_LED2_ALED2VAL 0x2E
+#define HEARTRATE3_REG_LED1_ALED1VAL 0x2F
+#define HEARTRATE3_REG_CONTROL3 0x31
+#define HEARTRATE3_REG_PDNCYCLESTC 0x32
+#define HEARTRATE3_REG_PDNCYCLEENDC 0x33
+#define HEARTRATE3_REG_PROG_TG_STC 0x34
+#define HEARTRATE3_REG_PROG_TG_ENDC 0x35
+#define HEARTRATE3_REG_LED3LEDSTC 0x36
+#define HEARTRATE3_REG_LED3LEDENDC 0x37
+#define HEARTRATE3_REG_CLKDIV_PRF 0x39
+#define HEARTRATE3_REG_OFFDAC 0x3A
+#define HEARTRATE3_REG_DEC 0x3D
+#define HEARTRATE3_REG_AVG_LED2_ALED2VAL 0x3F
+#define HEARTRATE3_REG_AVG_LED1_ALED1VAL 0x40
+/** \} */
+
+/**
+ * \defgroup cmd_list Configuration commands list
+ * \{
+ */
+#define HEARTRATE3_CONTROL0_CMD 0x000000ul
+#define HEARTRATE3_LED2STC_CMD 0x000050ul
+#define HEARTRATE3_LED2ENDC_CMD 0x00018Ful
+#define HEARTRATE3_LED1LEDSTC_CMD 0x000320ul
+#define HEARTRATE3_LED1LEDENDC_CMD 0x0004AFul
+#define HEARTRATE3_ALED2STC_CMD 0x0001E0ul
+#define HEARTRATE3_ALED2ENDC_CMD 0x00031Ful
+#define HEARTRATE3_LED1STC_CMD 0x000370ul
+#define HEARTRATE3_LED1ENDC_CMD 0x0004AFul
+#define HEARTRATE3_LED2LEDSTC_CMD 0x000000ul
+#define HEARTRATE3_LED2LEDENDC_CMD 0x00018Ful
+#define HEARTRATE3_ALED1STC_CMD 0x0004FFul
+#define HEARTRATE3_ALED1ENDC_CMD 0x00063Eul
+#define HEARTRATE3_LED2CONVST_CMD 0x000198ul
+#define HEARTRATE3_LED2CONVEND_CMD 0x0005BBul
+#define HEARTRATE3_ALED2CONVST_CMD 0x0005C4ul
+#define HEARTRATE3_ALED2CONVEND_CMD 0x0009E7ul
+#define HEARTRATE3_LED1CONVST_CMD 0x0009F0ul
+#define HEARTRATE3_LED1CONVEND_CMD 0x000E13ul
+#define HEARTRATE3_ALED1CONVST_CMD 0x000E1Cul
+#define HEARTRATE3_ALED1CONVEND_CMD 0x00123Ful
+#define HEARTRATE3_ADCRSTSTCT0_CMD 0x000191ul
+#define HEARTRATE3_ADCRSTENDCT0_CMD 0x000197ul
+#define HEARTRATE3_ADCRSTSTCT1_CMD 0x0005BDul
+#define HEARTRATE3_ADCRSTENDCT1_CMD 0x0005C3ul
+#define HEARTRATE3_ADCRSTSTCT2_CMD 0x0009E9ul
+#define HEARTRATE3_ADCRSTENDCT2_CMD 0x0009EFul
+#define HEARTRATE3_ADCRSTSTCT3_CMD 0x000E15ul
+#define HEARTRATE3_ADCRSTENDCT3_CMD 0x000E1Bul
+#define HEARTRATE3_PRPCOUNT_CMD 0x009C3Eul
+#define HEARTRATE3_CONTROL1_CMD 0x000103ul
+#define HEARTRATE3_TIA_GAIN_SEP_CMD 0x008003ul
+#define HEARTRATE3_TIA_GAIN_CMD 0x000003ul
+#define HEARTRATE3_LEDCNTRL_CMD 0x01B6D9ul
+#define HEARTRATE3_CONTROL2_CMD 0x104218ul
+#define HEARTRATE3_ALARM_CMD 0x000000ul
+#define HEARTRATE3_CONTROL3_CMD 0x000000ul
+#define HEARTRATE3_PDNCYCLESTC_CMD 0x00155Ful
+#define HEARTRATE3_PDNCYCLEENDC_CMD 0x00991Eul
+#define HEARTRATE3_PROG_TG_STC_CMD 0x000000ul
+#define HEARTRATE3_PROG_TG_ENDC_CMD 0x000000ul
+#define HEARTRATE3_LED3LEDSTC_CMD 0x000190ul
+#define HEARTRATE3_LED3LEDENDC_CMD 0x00031Ful
+#define HEARTRATE3_CLKDIV_PRF_CMD 0x000000ul
+#define HEARTRATE3_OFFDAC_CMD 0x000000ul
+/** \} */
+
+/**
+ * \defgroup pin_state Pin state
+ * \{
+ */
+#define HEARTRATE3_PIN_STATE_LOW 0x00
+#define HEARTRATE3_PIN_STATE_HIGH 0x01
+/** \} */
+
+/** \} */ // End group macro
+// --------------------------------------------------------------- PUBLIC TYPES
+/**
+ * \defgroup type Types
+ * \{
+ */
+
+/**
+ * @brief Click ctx object definition.
+ */
+typedef struct
+{
+ // Output pins
+ digital_out_t rst;
+ digital_out_t clk;
+
+ // Input pins
+ digital_in_t rdy;
+
+ // Modules
+ i2c_master_t i2c;
+
+ // ctx variable
+ uint8_t slave_address;
+
+} heartrate3_t;
+
+/**
+ * @brief Click configuration structure definition.
+ */
+typedef struct
+{
+ // Communication gpio pins
+ pin_name_t scl;
+ pin_name_t sda;
+
+ // Additional gpio pins
+ pin_name_t rst;
+ pin_name_t clk;
+ pin_name_t rdy;
+
+ // static variable
+ uint32_t i2c_speed;
+ uint8_t i2c_address;
+
+} heartrate3_cfg_t;
+
+/** \} */ // End types group
+// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
+
+/**
+ * \defgroup public_function Public function
+ * \{
+ */
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+/**
+ * @brief Config Object Initialization function.
+ *
+ * @param cfg Click configuration structure.
+ *
+ * @details This function initializes click configuration structure to
+ * init state.
+ * @note All used pins will be set to unconnected state.
+ */
+void heartrate3_cfg_setup ( heartrate3_cfg_t *cfg );
+
+/**
+ * @brief Initialization function.
+ *
+ * @param ctx Click object.
+ * @param cfg Click configuration structure.
+ *
+ * @details This function initializes all necessary pins and peripherals
+ * used for this click.
+ */
+err_t heartrate3_init ( heartrate3_t *ctx, heartrate3_cfg_t *cfg );
+
+/**
+ * @brief Click Default Configuration function.
+ *
+ * @param ctx Click object.
+ *
+ * @details This function executes default configuration for
+ * HeartRate3 click.
+ */
+err_t heartrate3_default_cfg ( heartrate3_t *ctx );
+
+/**
+ * @brief Generic write function.
+ *
+ * @param ctx Click object.
+ * @param reg Register address.
+ * @param data_in Data buf to be written.
+ * @param len Number of the bytes in data buf.
+ *
+ * @details This function writes data to the desired register.
+ */
+err_t heartrate3_generic_write ( heartrate3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len );
+
+/**
+ * @brief Generic read function.
+ *
+ * @param ctx Click object.
+ * @param reg Register address.
+ * @param data_out Output data buf
+ * @param len Number of the bytes to be read
+ *
+ * @details This function reads data from the desired register.
+ */
+err_t heartrate3_generic_read ( heartrate3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len );
+
+/**
+ * @brief Write data function
+ *
+ * @param ctx Click object.
+ * @param reg_adr 8-bit data that defines register's address
+ * @param wr_data 32-bit used defined data to be written into register
+ *
+ * @details Function is used to write 32-bit data into register.
+**/
+err_t heartrate3_write_data ( heartrate3_t *ctx, uint8_t reg_adr, uint32_t wr_data );
+
+/**
+ * @brief Read 24-bit data function
+ *
+ * @param ctx Click object.
+ * @param reg_adr 8-bit data that defines register's address
+ * @param data_out 24-bit value read from chosen register
+ *
+ * @details Function is used to read 24-bit value from register.
+**/
+err_t heartrate3_read_24bit ( heartrate3_t *ctx, uint8_t reg_adr, uint32_t *data_out );
+
+/**
+ * @brief Read 16-bit data function
+ *
+ * @param ctx Click object.
+ * @param reg_adr 8-bit data that defines register's address
+ * @param data_out 16-bit value read from chosen register
+ *
+ * @details Function is used to read 16-bit value from register.
+**/
+err_t heartrate3_read_16bit ( heartrate3_t *ctx, uint8_t reg_adr, uint16_t *data_out );
+
+/**
+ * @brief Set Reset pin state
+ *
+ * @param ctx Click object.
+ * @param state 0 - rst pin cleared / 1 - rst pin set
+ *
+ * @details Function is used to set or clear rst pin.
+ */
+void heartrate3_rst_state ( heartrate3_t *ctx, uint8_t state );
+
+/**
+ * @brief Set Clock pin state
+ *
+ * @param ctx Click object.
+ * @param state 0 - clk pin cleared / 1 - clk pin set
+ *
+ * @details Function is used to set or clear clk pin.
+ */
+void heartrate3_clk_state ( heartrate3_t *ctx, uint8_t state );
+
+/**
+ * @brief Check data ready function
+ *
+ * @param ctx Click object.
+ *
+ * @return 1 : data ready / 0 : data not ready
+ *
+ * @details Function is used to check data ready flag.
+**/
+uint8_t heartrate3_check_data_ready ( heartrate3_t *ctx );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _HEARTRATE3_H_
+
+/** \} */ // End public_function group
+/// \} // End click Driver group
+/*! @} */
+// ------------------------------------------------------------------------- END
diff --git a/clicks/heartrate3/lib_heartrate3/src/heartrate3.c b/clicks/heartrate3/lib_heartrate3/src/heartrate3.c
new file mode 100644
index 0000000000..95b8d6b030
--- /dev/null
+++ b/clicks/heartrate3/lib_heartrate3/src/heartrate3.c
@@ -0,0 +1,219 @@
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ */
+
+#include "heartrate3.h"
+
+// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
+
+void heartrate3_cfg_setup ( heartrate3_cfg_t *cfg )
+{
+ // Communication gpio pins
+ cfg->scl = HAL_PIN_NC;
+ cfg->sda = HAL_PIN_NC;
+
+ // Additional gpio pins
+ cfg->rst = HAL_PIN_NC;
+ cfg->clk = HAL_PIN_NC;
+ cfg->rdy = HAL_PIN_NC;
+
+ cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD;
+ cfg->i2c_address = HEARTRATE3_SLAVE_ADDR;
+}
+
+err_t heartrate3_init ( heartrate3_t *ctx, heartrate3_cfg_t *cfg )
+{
+ i2c_master_config_t i2c_cfg;
+
+ i2c_master_configure_default( &i2c_cfg );
+
+ i2c_cfg.scl = cfg->scl;
+ i2c_cfg.sda = cfg->sda;
+
+ ctx->slave_address = cfg->i2c_address;
+
+ if ( I2C_MASTER_ERROR == i2c_master_open( &ctx->i2c, &i2c_cfg ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ if ( I2C_MASTER_ERROR == i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ if ( I2C_MASTER_ERROR == i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ // Output pins
+ digital_out_init ( &ctx->rst, cfg->rst );
+ digital_out_init ( &ctx->clk, cfg->clk );
+
+ // Input pins
+ digital_in_init ( &ctx->rdy, cfg->rdy );
+
+ digital_out_low ( &ctx->rst );
+ Delay_100ms ( );
+ digital_out_high ( &ctx->rst );
+ Delay_1sec ( );
+
+ return HEARTRATE3_OK;
+}
+
+err_t heartrate3_default_cfg ( heartrate3_t *ctx )
+{
+ err_t error_flag = HEARTRATE3_OK;
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_CONTROL0, HEARTRATE3_CONTROL0_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED2STC, HEARTRATE3_LED2STC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED2ENDC, HEARTRATE3_LED2ENDC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED1LEDSTC, HEARTRATE3_LED1LEDSTC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED1LEDENDC, HEARTRATE3_LED1LEDENDC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ALED2STC, HEARTRATE3_ALED2STC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ALED2ENDC, HEARTRATE3_ALED2ENDC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED1STC, HEARTRATE3_LED1STC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED1ENDC, HEARTRATE3_LED1ENDC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED2LEDSTC, HEARTRATE3_LED2LEDSTC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED2LEDENDC, HEARTRATE3_LED2LEDENDC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ALED1STC, HEARTRATE3_ALED1STC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ALED1ENDC, HEARTRATE3_ALED1ENDC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED2CONVST, HEARTRATE3_LED2CONVST_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED2CONVEND, HEARTRATE3_LED2CONVEND_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ALED2CONVST, HEARTRATE3_ALED2CONVST_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ALED2CONVEND, HEARTRATE3_ALED2CONVEND_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED1CONVST, HEARTRATE3_LED1CONVST_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED1CONVEND, HEARTRATE3_LED1CONVEND_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ALED1CONVST, HEARTRATE3_ALED1CONVST_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ALED1CONVEND, HEARTRATE3_ALED1CONVEND_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ADCRSTSTCT0, HEARTRATE3_ADCRSTSTCT0_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ADCRSTENDCT0, HEARTRATE3_ADCRSTENDCT0_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ADCRSTSTCT1, HEARTRATE3_ADCRSTSTCT1_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ADCRSTENDCT1, HEARTRATE3_ADCRSTENDCT1_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ADCRSTSTCT2, HEARTRATE3_ADCRSTSTCT2_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ADCRSTENDCT2, HEARTRATE3_ADCRSTENDCT2_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ADCRSTSTCT3, HEARTRATE3_ADCRSTSTCT3_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ADCRSTENDCT3, HEARTRATE3_ADCRSTENDCT3_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_PRPCOUNT, HEARTRATE3_PRPCOUNT_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_CONTROL1, HEARTRATE3_CONTROL1_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_TIA_GAIN_SEP, HEARTRATE3_TIA_GAIN_SEP_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_TIA_GAIN, HEARTRATE3_TIA_GAIN_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LEDCNTRL, HEARTRATE3_LEDCNTRL_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_CONTROL2, HEARTRATE3_CONTROL2_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_ALARM, HEARTRATE3_ALARM_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_CONTROL3, HEARTRATE3_CONTROL3_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_PDNCYCLESTC, HEARTRATE3_PDNCYCLESTC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_PDNCYCLEENDC, HEARTRATE3_PDNCYCLEENDC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_PROG_TG_STC, HEARTRATE3_PROG_TG_STC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_PROG_TG_ENDC, HEARTRATE3_PROG_TG_ENDC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED3LEDSTC, HEARTRATE3_LED3LEDSTC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_LED3LEDENDC, HEARTRATE3_LED3LEDENDC_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_CLKDIV_PRF, HEARTRATE3_CLKDIV_PRF_CMD );
+ error_flag |= heartrate3_write_data( ctx, HEARTRATE3_REG_OFFDAC, HEARTRATE3_OFFDAC_CMD );
+ return error_flag;
+}
+
+err_t heartrate3_generic_write ( heartrate3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len )
+{
+ uint8_t data_buf[ 256 ] = { 0 };
+ data_buf[ 0 ] = reg;
+ for ( uint8_t cnt = 0; cnt < len; cnt++ )
+ {
+ data_buf[ cnt + 1 ] = data_in[ cnt ];
+ }
+ return i2c_master_write( &ctx->i2c, data_buf, len + 1 );
+}
+
+err_t heartrate3_generic_read ( heartrate3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len )
+{
+ return i2c_master_write_then_read( &ctx->i2c, ®, 1, data_out, len );
+}
+
+err_t heartrate3_write_data ( heartrate3_t *ctx, uint8_t reg_adr, uint32_t wr_data )
+{
+ uint8_t tx_buf[ 3 ] = { 0 };
+ tx_buf[ 0 ] = wr_data >> 16;
+ tx_buf[ 1 ] = wr_data >> 8;
+ tx_buf[ 2 ] = wr_data;
+
+ return heartrate3_generic_write( ctx, reg_adr, tx_buf, 3 );
+}
+
+err_t heartrate3_read_24bit ( heartrate3_t *ctx, uint8_t reg_adr, uint32_t *data_out )
+{
+ uint8_t rx_buf[ 3 ] = { 0 };
+
+ err_t error_flag = heartrate3_generic_read( ctx, reg_adr, rx_buf, 3 );
+
+ *data_out = ( ( uint32_t ) rx_buf[ 0 ] << 16 ) | ( ( uint16_t ) rx_buf[ 1 ] << 8 ) | rx_buf[ 2 ];
+
+ return error_flag;
+}
+
+err_t heartrate3_read_16bit ( heartrate3_t *ctx, uint8_t reg_adr, uint16_t *data_out )
+{
+ uint8_t rx_buf[ 2 ] = { 0 };
+
+ err_t error_flag = heartrate3_generic_read( ctx, reg_adr, rx_buf, 2 );
+
+ *data_out = ( ( uint16_t ) rx_buf[ 1 ] << 8 ) | rx_buf[ 2 ];
+
+ return error_flag;
+}
+
+void heartrate3_rst_state ( heartrate3_t *ctx, uint8_t state )
+{
+ if ( HEARTRATE3_PIN_STATE_HIGH == state )
+ {
+ digital_out_high( &ctx->rst );
+ }
+ else
+ {
+ digital_out_low( &ctx->rst );
+ }
+}
+
+void heartrate3_clk_state ( heartrate3_t *ctx, uint8_t state )
+{
+ if ( HEARTRATE3_PIN_STATE_HIGH == state )
+ {
+ digital_out_high( &ctx->clk );
+ }
+ else
+ {
+ digital_out_low( &ctx->clk );
+ }
+}
+
+uint8_t heartrate3_check_data_ready ( heartrate3_t *ctx )
+{
+ return digital_in_read( &ctx->rdy );
+}
+
+// ------------------------------------------------------------------------- END
+
diff --git a/clicks/heartrate3/memake.txt b/clicks/heartrate3/memake.txt
deleted file mode 100644
index 63404c7f44..0000000000
--- a/clicks/heartrate3/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: HeartRate3
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/i2c1wire/CHANGELOG.md b/clicks/i2c1wire/CHANGELOG.md
index 97df45d2c4..249474c644 100644
--- a/clicks/i2c1wire/CHANGELOG.md
+++ b/clicks/i2c1wire/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.7
+### Version 2.1.0.8
- Initial release
diff --git a/clicks/i2c1wire/CMakeLists.txt b/clicks/i2c1wire/CMakeLists.txt
new file mode 100644
index 0000000000..340f8ac093
--- /dev/null
+++ b/clicks/i2c1wire/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_i2c1wire LANGUAGES MikroC)
+else()
+ project(example_i2c1wire LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_i2c1wire
+ example/main.c
+
+)
+
+
+############################ example_i2c1wire GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_i2c1wire PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_i2c1wire PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_i2c1wire PUBLIC MikroSDK.Log)
+add_subdirectory(lib_i2c1wire)
+target_link_libraries(example_i2c1wire PUBLIC Click.I2C1Wire)
+############################ example_i2c1wire GENERATED CODE END ###########################
diff --git a/clicks/i2c1wire/README.md b/clicks/i2c1wire/README.md
index 777cd12e47..12e86ef145 100644
--- a/clicks/i2c1wire/README.md
+++ b/clicks/i2c1wire/README.md
@@ -3,7 +3,7 @@
---
# I2C 1 Wire click
-I2C 1-Wire click carries DS2482-800, a “bridge device” that performs bidirectional conversions between I2C masters and 1-Wire slave devices. These can be EEPROM chips, temperature sensors and similar devices that have momentary high source current modes.
+> I2C 1-Wire click carries DS2482-800, a bridge device that performs bidirectional conversions between I2C masters and 1-Wire slave devices. These can be EEPROM chips, temperature sensors and similar devices that have momentary high source current modes.
@@ -37,26 +37,32 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void i2c1wire_cfg_setup ( i2c1wire_cfg_t *cfg );
-
-- Initialization function.
-> I2C1WIRE_RETVAL i2c1wire_init ( i2c1wire_t *ctx, i2c1wire_cfg_t *cfg );
-
-- Click Default Configuration function.
-> void i2c1wire_default_cfg ( i2c1wire_t *ctx );
+- `i2c1wire_cfg_setup` Config Object Initialization function.
+```c
+void i2c1wire_cfg_setup ( i2c1wire_cfg_t *cfg );
+```
+- `i2c1wire_init` Initialization function.
+```c
+err_t i2c1wire_init ( i2c1wire_t *ctx, i2c1wire_cfg_t *cfg );
+```
#### Example key functions :
-- This function writes one byte to the click module.
-> void i2c1wire_write_byte_one_wire ( i2c1wire_t *ctx, uint8_t input );
-
-- This function reads one byte from the click module.
-> i2c1wire_read_byte_one_wire ( i2c1wire_t *ctx );
+- `i2c1wire_write_byte_one_wire` This function writes one byte to the click module.
+```c
+void i2c1wire_write_byte_one_wire ( i2c1wire_t *ctx, uint8_t input );
+```
+
+- `i2c1wire_read_byte_one_wire` This function reads one byte from the click module.
+```c
+uint8_t i2c1wire_read_byte_one_wire ( i2c1wire_t *ctx );
+```
-- This function does a hardware reset of the click module.
-> void i2c1wire_one_wire_reset ( i2c1wire_t *ctx );
+- `i2c1wire_one_wire_reset` This function does a hardware reset of the click module.
+```c
+void i2c1wire_one_wire_reset ( i2c1wire_t *ctx );
+```
## Examples Description
@@ -92,7 +98,6 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
i2c1wire_cfg_setup( &cfg );
I2C1WIRE_MAP_MIKROBUS( cfg, MIKROBUS_1 );
i2c1wire_init( &i2c1wire, &cfg );
@@ -110,47 +115,47 @@ void application_init ( void )
void application_task ( void )
{
- uint8_t chan_state;
- uint8_t cnt_chan;
- uint8_t cnt_val;
- uint8_t id_code[ 9 ];
+ uint8_t chan_state = 0;
+ uint8_t cnt_chan = 0;
+ uint8_t cnt_val = 0;
+ uint8_t id_code[ 9 ] = { 0 };
chan_state = 1;
i2c1wire_soft_reset( &i2c1wire );
Delay_10ms( );
- i2c1wire_set_config( &i2c1wire, I2CONEWIRE_CONFIG_1WS_HIGH |
- I2CONEWIRE_CONFIG_SPU_HIGH |
- I2CONEWIRE_CONFIG_APU_LOW );
+ i2c1wire_set_config( &i2c1wire, I2C1WIRE_CONFIG_1WS_HIGH |
+ I2C1WIRE_CONFIG_SPU_HIGH |
+ I2C1WIRE_CONFIG_APU_LOW );
Delay_10ms( );
- for( cnt_chan = 0; cnt_chan < 8; cnt_chan++ )
+ for ( cnt_chan = 0; cnt_chan < 8; cnt_chan++ )
{
i2c1wire_set_channel( &i2c1wire, cnt_chan );
i2c1wire_one_wire_reset( &i2c1wire );
Delay_10ms( );
- i2c1wire_write_byte_one_wire( &i2c1wire, I2CONEWIRE_WIRE_COMMAND_READ_ROM );
+ i2c1wire_write_byte_one_wire( &i2c1wire, I2C1WIRE_WIRE_COMMAND_READ_ROM );
Delay_10ms();
- for( cnt_val = 8; cnt_val > 0; cnt_val-- )
+ for ( cnt_val = 8; cnt_val > 0; cnt_val-- )
{
id_code[ cnt_val ] = i2c1wire_read_byte_one_wire( &i2c1wire );
- if ( id_code[ cnt_val ] == I2CONEWIRE_WIRE_RESULT_OK )
+ if ( id_code[ cnt_val ] == I2C1WIRE_WIRE_RESULT_OK )
{
- log_printf( &logger, "\r\n Channel %d : No device on the channel\r\n", cnt_chan );
+ log_printf( &logger, "\r\n Channel %d : No device on the channel\r\n", ( uint16_t ) cnt_chan );
Delay_100ms( );
break;
}
else if ( chan_state )
{
- log_printf( &logger, " Channel %d : ID = 0x", cnt_chan );
+ log_printf( &logger, " Channel %d : ID = 0x", ( uint16_t ) cnt_chan );
chan_state = 0;
}
- log_printf( &logger, "%d", id_code[ cnt_val ] );
- Delay_100ms( );
+ log_printf( &logger, "%d", ( uint16_t ) id_code[ cnt_val ] );
+ Delay_10ms( );
}
log_printf( &logger, "\r\n---------------------------------------\r\n" );
@@ -161,8 +166,6 @@ void application_task ( void )
```
-## Note
-
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
**Other mikroE Libraries used in the example:**
diff --git a/clicks/i2c1wire/details.md b/clicks/i2c1wire/details.md
index b800ab8ed3..9d7adccb6a 100644
--- a/clicks/i2c1wire/details.md
+++ b/clicks/i2c1wire/details.md
@@ -2,7 +2,7 @@
---
# I2C 1 Wire click
-I2C 1-Wire click carries DS2482-800, a “bridge device” that performs bidirectional conversions between I2C masters and 1-Wire slave devices. These can be EEPROM chips, temperature sensors and similar devices that have momentary high source current modes.
+> I2C 1-Wire click carries DS2482-800, a bridge device that performs bidirectional conversions between I2C masters and 1-Wire slave devices. These can be EEPROM chips, temperature sensors and similar devices that have momentary high source current modes.
@@ -36,26 +36,32 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void i2c1wire_cfg_setup ( i2c1wire_cfg_t *cfg );
-
-- Initialization function.
-> I2C1WIRE_RETVAL i2c1wire_init ( i2c1wire_t *ctx, i2c1wire_cfg_t *cfg );
-
-- Click Default Configuration function.
-> void i2c1wire_default_cfg ( i2c1wire_t *ctx );
+- `i2c1wire_cfg_setup` Config Object Initialization function.
+```c
+void i2c1wire_cfg_setup ( i2c1wire_cfg_t *cfg );
+```
+- `i2c1wire_init` Initialization function.
+```c
+err_t i2c1wire_init ( i2c1wire_t *ctx, i2c1wire_cfg_t *cfg );
+```
#### Example key functions :
-- This function writes one byte to the click module.
-> void i2c1wire_write_byte_one_wire ( i2c1wire_t *ctx, uint8_t input );
-
-- This function reads one byte from the click module.
-> i2c1wire_read_byte_one_wire ( i2c1wire_t *ctx );
+- `i2c1wire_write_byte_one_wire` This function writes one byte to the click module.
+```c
+void i2c1wire_write_byte_one_wire ( i2c1wire_t *ctx, uint8_t input );
+```
+
+- `i2c1wire_read_byte_one_wire` This function reads one byte from the click module.
+```c
+uint8_t i2c1wire_read_byte_one_wire ( i2c1wire_t *ctx );
+```
-- This function does a hardware reset of the click module.
-> void i2c1wire_one_wire_reset ( i2c1wire_t *ctx );
+- `i2c1wire_one_wire_reset` This function does a hardware reset of the click module.
+```c
+void i2c1wire_one_wire_reset ( i2c1wire_t *ctx );
+```
## Examples Description
@@ -91,7 +97,6 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
i2c1wire_cfg_setup( &cfg );
I2C1WIRE_MAP_MIKROBUS( cfg, MIKROBUS_1 );
i2c1wire_init( &i2c1wire, &cfg );
@@ -109,47 +114,47 @@ void application_init ( void )
void application_task ( void )
{
- uint8_t chan_state;
- uint8_t cnt_chan;
- uint8_t cnt_val;
- uint8_t id_code[ 9 ];
+ uint8_t chan_state = 0;
+ uint8_t cnt_chan = 0;
+ uint8_t cnt_val = 0;
+ uint8_t id_code[ 9 ] = { 0 };
chan_state = 1;
i2c1wire_soft_reset( &i2c1wire );
Delay_10ms( );
- i2c1wire_set_config( &i2c1wire, I2CONEWIRE_CONFIG_1WS_HIGH |
- I2CONEWIRE_CONFIG_SPU_HIGH |
- I2CONEWIRE_CONFIG_APU_LOW );
+ i2c1wire_set_config( &i2c1wire, I2C1WIRE_CONFIG_1WS_HIGH |
+ I2C1WIRE_CONFIG_SPU_HIGH |
+ I2C1WIRE_CONFIG_APU_LOW );
Delay_10ms( );
- for( cnt_chan = 0; cnt_chan < 8; cnt_chan++ )
+ for ( cnt_chan = 0; cnt_chan < 8; cnt_chan++ )
{
i2c1wire_set_channel( &i2c1wire, cnt_chan );
i2c1wire_one_wire_reset( &i2c1wire );
Delay_10ms( );
- i2c1wire_write_byte_one_wire( &i2c1wire, I2CONEWIRE_WIRE_COMMAND_READ_ROM );
+ i2c1wire_write_byte_one_wire( &i2c1wire, I2C1WIRE_WIRE_COMMAND_READ_ROM );
Delay_10ms();
- for( cnt_val = 8; cnt_val > 0; cnt_val-- )
+ for ( cnt_val = 8; cnt_val > 0; cnt_val-- )
{
id_code[ cnt_val ] = i2c1wire_read_byte_one_wire( &i2c1wire );
- if ( id_code[ cnt_val ] == I2CONEWIRE_WIRE_RESULT_OK )
+ if ( id_code[ cnt_val ] == I2C1WIRE_WIRE_RESULT_OK )
{
- log_printf( &logger, "\r\n Channel %d : No device on the channel\r\n", cnt_chan );
+ log_printf( &logger, "\r\n Channel %d : No device on the channel\r\n", ( uint16_t ) cnt_chan );
Delay_100ms( );
break;
}
else if ( chan_state )
{
- log_printf( &logger, " Channel %d : ID = 0x", cnt_chan );
+ log_printf( &logger, " Channel %d : ID = 0x", ( uint16_t ) cnt_chan );
chan_state = 0;
}
- log_printf( &logger, "%d", id_code[ cnt_val ] );
- Delay_100ms( );
+ log_printf( &logger, "%d", ( uint16_t ) id_code[ cnt_val ] );
+ Delay_10ms( );
}
log_printf( &logger, "\r\n---------------------------------------\r\n" );
@@ -160,8 +165,6 @@ void application_task ( void )
```
-## Note
-
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
**Other mikroE Libraries used in the example:**
diff --git a/clicks/i2c1wire/doc/doxy/Doxyfile.doxy b/clicks/i2c1wire/doc/doxy/Doxyfile.doxy
index a4b9b0e776..5c46b8223d 100644
--- a/clicks/i2c1wire/doc/doxy/Doxyfile.doxy
+++ b/clicks/i2c1wire/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/i2c1wire/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/i2c1wire/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/i2c1wire/example \
- ../clicks/i2c1wire/lib/include \
- ../clicks/i2c1wire/README.md
+INPUT = ../cmake/i2c1wire/example \
+ ../cmake/i2c1wire/lib_i2c1wire/include \
+ ../cmake/i2c1wire/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/i2c1wire/example
+EXAMPLE_PATH = ../cmake/i2c1wire/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/i2c1wire/doc/package/manifest.json b/clicks/i2c1wire/doc/package/manifest.json
index ce37363417..f3b20d5a3b 100644
--- a/clicks/i2c1wire/doc/package/manifest.json
+++ b/clicks/i2c1wire/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "1-Wire",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Interface > 1-Wire",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+ "dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "I2C 1-Wire click",
"example_list": [
@@ -25,19 +24,15 @@
},
"name": "mikroe.click.i2c1wire",
"product_link": "https://www.mikroe.com/i2c-1-wire-click",
- "short_description": "I2C 1-Wire click carries DS2482-800, a “bridge device” that performs bidirectional conversions between I2C masters and 1-Wire slave devices. These can be EEPROM chips, temperature sensors and similar devices that have momentary high source current modes.",
- "supported_compiler": "mikroC AI",
+ "short_description": "I2C 1-Wire click carries DS2482-800, a bridge device that performs bidirectional conversions between I2C masters and 1-Wire slave devices. These can be EEPROM chips, temperature sensors and similar devices that have momentary high source current modes.",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
"_type": "mikroSDK Library",
- "related_projects": [
+ "related_projects": [
1439
],
- "version": "2.0.0.7"
+ "version": "2.1.0.8",
+ "cmake": true,
+ "alias": "Click.I2C1Wire",
+ "subdir_name": "lib_i2c1wire"
}
-
-
-
-
-
-
-
diff --git a/clicks/i2c1wire/example/CMakeLists.txt b/clicks/i2c1wire/example/CMakeLists.txt
new file mode 100644
index 0000000000..95f464eb57
--- /dev/null
+++ b/clicks/i2c1wire/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_i2c1wire LANGUAGES MikroC)
+else()
+ project(example_i2c1wire LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_i2c1wire
+ main.c
+
+)
+
+
+############################ example_i2c1wire GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_i2c1wire PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_i2c1wire PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_i2c1wire PUBLIC MikroSDK.Log)
+add_subdirectory(lib_i2c1wire)
+target_link_libraries(example_i2c1wire PUBLIC Click.I2C1Wire)
+############################ example_i2c1wire GENERATED CODE END ###########################
diff --git a/clicks/i2c1wire/example/main.c b/clicks/i2c1wire/example/main.c
index 014a15b607..b6c6a946c9 100644
--- a/clicks/i2c1wire/example/main.c
+++ b/clicks/i2c1wire/example/main.c
@@ -53,7 +53,6 @@ void application_init ( )
log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
i2c1wire_cfg_setup( &cfg );
I2C1WIRE_MAP_MIKROBUS( cfg, MIKROBUS_1 );
i2c1wire_init( &i2c1wire, &cfg );
@@ -62,47 +61,47 @@ void application_init ( )
void application_task ( )
{
- uint8_t chan_state;
- uint8_t cnt_chan;
- uint8_t cnt_val;
- uint8_t id_code[ 9 ];
+ uint8_t chan_state = 0;
+ uint8_t cnt_chan = 0;
+ uint8_t cnt_val = 0;
+ uint8_t id_code[ 9 ] = { 0 };
chan_state = 1;
i2c1wire_soft_reset( &i2c1wire );
Delay_10ms( );
- i2c1wire_set_config( &i2c1wire, I2CONEWIRE_CONFIG_1WS_HIGH |
- I2CONEWIRE_CONFIG_SPU_HIGH |
- I2CONEWIRE_CONFIG_APU_LOW );
+ i2c1wire_set_config( &i2c1wire, I2C1WIRE_CONFIG_1WS_HIGH |
+ I2C1WIRE_CONFIG_SPU_HIGH |
+ I2C1WIRE_CONFIG_APU_LOW );
Delay_10ms( );
- for( cnt_chan = 0; cnt_chan < 8; cnt_chan++ )
+ for ( cnt_chan = 0; cnt_chan < 8; cnt_chan++ )
{
i2c1wire_set_channel( &i2c1wire, cnt_chan );
i2c1wire_one_wire_reset( &i2c1wire );
Delay_10ms( );
- i2c1wire_write_byte_one_wire( &i2c1wire, I2CONEWIRE_WIRE_COMMAND_READ_ROM );
+ i2c1wire_write_byte_one_wire( &i2c1wire, I2C1WIRE_WIRE_COMMAND_READ_ROM );
Delay_10ms();
- for( cnt_val = 8; cnt_val > 0; cnt_val-- )
+ for ( cnt_val = 8; cnt_val > 0; cnt_val-- )
{
id_code[ cnt_val ] = i2c1wire_read_byte_one_wire( &i2c1wire );
- if ( id_code[ cnt_val ] == I2CONEWIRE_WIRE_RESULT_OK )
+ if ( id_code[ cnt_val ] == I2C1WIRE_WIRE_RESULT_OK )
{
- log_printf( &logger, "\r\n Channel %d : No device on the channel\r\n", ( uint16_t )cnt_chan );
+ log_printf( &logger, "\r\n Channel %d : No device on the channel\r\n", ( uint16_t ) cnt_chan );
Delay_100ms( );
break;
}
else if ( chan_state )
{
- log_printf( &logger, " Channel %d : ID = 0x", ( uint16_t )cnt_chan );
+ log_printf( &logger, " Channel %d : ID = 0x", ( uint16_t ) cnt_chan );
chan_state = 0;
}
- log_printf( &logger, "%d", ( uint16_t )id_code[ cnt_val ] );
- Delay_100ms( );
+ log_printf( &logger, "%d", ( uint16_t ) id_code[ cnt_val ] );
+ Delay_10ms( );
}
log_printf( &logger, "\r\n---------------------------------------\r\n" );
diff --git a/clicks/i2c1wire/example/manifest.exm b/clicks/i2c1wire/example/manifest.exm
index 9a7130d12b..a1ed9a62d2 100644
--- a/clicks/i2c1wire/example/manifest.exm
+++ b/clicks/i2c1wire/example/manifest.exm
@@ -1,8 +1,8 @@
{
"name": "I2C 1 Wire Click",
- "description": "I2C 1-Wire click carries DS2482-800, a “bridge device” that performs bidirectional conversions between I2C masters and 1-Wire slave devices. These can be EEPROM chips, temperature sensors and similar devices that have momentary high source current modes.",
+ "description": "I2C 1-Wire click carries DS2482-800, a bridge device that performs bidirectional conversions between I2C masters and 1-Wire slave devices. These can be EEPROM chips, temperature sensors and similar devices that have momentary high source current modes.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","DS2482-800"],
"category" : ["1-Wire"]
}
diff --git a/clicks/i2c1wire/example/memake.txt b/clicks/i2c1wire/example/memake.txt
deleted file mode 100644
index 76b571954d..0000000000
--- a/clicks/i2c1wire/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_i2c1wire
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.I2C1Wire
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/i2c1wire/lib/memake.txt b/clicks/i2c1wire/lib/memake.txt
deleted file mode 100644
index 86043eacd5..0000000000
--- a/clicks/i2c1wire/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_i2c1wire
-
-alias: Click.I2C1Wire
-
-sources: {
- src/i2c1wire.c
-}
-
-headers: {
- include/i2c1wire.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/i2c1wire.h) dst(include/i2c1wire.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/i2c1wire/lib_i2c1wire/CMakeLists.txt b/clicks/i2c1wire/lib_i2c1wire/CMakeLists.txt
new file mode 100644
index 0000000000..13de7c524b
--- /dev/null
+++ b/clicks/i2c1wire/lib_i2c1wire/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_i2c1wire LANGUAGES MikroC)
+else()
+ project(lib_i2c1wire LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_i2c1wire STATIC
+ src/i2c1wire.c
+ include/i2c1wire.h
+)
+add_library(Click.I2C1Wire ALIAS lib_i2c1wire)
+
+
+
+target_include_directories(lib_i2c1wire PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_i2c1wire PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_i2c1wire PUBLIC MikroSDK.Driver)
diff --git a/clicks/i2c1wire/lib_i2c1wire/include/Click.I2C1Wire b/clicks/i2c1wire/lib_i2c1wire/include/Click.I2C1Wire
new file mode 100644
index 0000000000..924fcdb5d8
--- /dev/null
+++ b/clicks/i2c1wire/lib_i2c1wire/include/Click.I2C1Wire
@@ -0,0 +1 @@
+#include "i2c1wire.h"
diff --git a/clicks/i2c1wire/lib/include/i2c1wire.h b/clicks/i2c1wire/lib_i2c1wire/include/i2c1wire.h
similarity index 51%
rename from clicks/i2c1wire/lib/include/i2c1wire.h
rename to clicks/i2c1wire/lib_i2c1wire/include/i2c1wire.h
index cad30a0032..b31b10a2f3 100644
--- a/clicks/i2c1wire/lib/include/i2c1wire.h
+++ b/clicks/i2c1wire/lib_i2c1wire/include/i2c1wire.h
@@ -1,305 +1,299 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- * \brief This file contains API for I2C 1 Wire Click driver.
- *
- * \addtogroup i2c1wire I2C 1 Wire Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef I2C1WIRE_H
-#define I2C1WIRE_H
-
-#include "drv_digital_out.h"
-#include "drv_digital_in.h"
-#include "drv_i2c_master.h"
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-#define I2C1WIRE_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
- cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
-/** \} */
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define I2C1WIRE_RETVAL uint8_t
-
-#define I2C1WIRE_OK 0x00
-#define I2C1WIRE_INIT_ERROR 0xFF
-/** \} */
-
-/**
- * \defgroup settings_config Settings & Config
- * \{
- */
-#define I2CONEWIRE_RESULT_ERROR 0x00
-#define I2CONEWIRE_RESULT_OK 0x01
-#define I2CONEWIRE_WIRE_RESULT_OK 0xFF
-
-#define I2CONEWIRE_I2C_ADDRESS_0 0x18
-#define I2CONEWIRE_I2C_ADDRESS_1 0x19
-#define I2CONEWIRE_I2C_ADDRESS_2 0x1A
-#define I2CONEWIRE_I2C_ADDRESS_3 0x1B
-#define I2CONEWIRE_I2C_ADDRESS_4 0x1C
-#define I2CONEWIRE_I2C_ADDRESS_5 0x1D
-#define I2CONEWIRE_I2C_ADDRESS_6 0x1E
-#define I2CONEWIRE_I2C_ADDRESS_7 0x1F
-
-#define I2CONEWIRE_COMMAND_RESET 0xF0
-#define I2CONEWIRE_COMMAND_SRP 0xE1
-#define I2CONEWIRE_POINTER_STATUS 0xF0
-#define I2CONEWIRE_STATUS_BUSY 0x01
-#define I2CONEWIRE_STATUS_PPD 0x02
-#define I2CONEWIRE_STATUS_SD 0x04
-#define I2CONEWIRE_STATUS_LL 0x08
-#define I2CONEWIRE_STATUS_RST 0x10
-#define I2CONEWIRE_STATUS_SBR 0x20
-#define I2CONEWIRE_STATUS_TSB 0x40
-#define I2CONEWIRE_STATUS_DIR 0x80
-#define I2CONEWIRE_POINTER_DATA 0xE1
-#define I2CONEWIRE_POINTER_CONFIG 0xC3
-#define I2CONEWIRE_CONFIG_APU_HIGH 0x30
-#define I2CONEWIRE_CONFIG_APU_LOW 0x01
-#define I2CONEWIRE_CONFIG_SPU_HIGH 0x60
-#define I2CONEWIRE_CONFIG_SPU_LOW 0x04
-#define I2CONEWIRE_CONFIG_1WS_HIGH 0xA0
-#define I2CONEWIRE_CONFIG_1WS_LOW 0x08
-#define I2CONEWIRE_COMMAND_WRITECONFIG 0xD2
-#define I2CONEWIRE_COMMAND_RESETWIRE 0xB4
-#define I2CONEWIRE_COMMAND_WRITEBYTE 0xA5
-#define I2CONEWIRE_COMMAND_READBYTE 0x96
-#define I2CONEWIRE_COMMAND_SINGLEBIT 0x87
-#define I2CONEWIRE_COMMAND_TRIPLET 0x78
-#define I2CONEWIRE_WIRE_COMMAND_SKIP 0xCC
-#define I2CONEWIRE_WIRE_COMMAND_SELECT 0x55
-#define I2CONEWIRE_WIRE_COMMAND_READ_ROM 0x33
-#define I2CONEWIRE_WIRE_COMMAND_SEARCH 0xF0
-#define I2CONEWIRE_ERROR_TIMEOUT 0x01
-#define I2CONEWIRE_ERROR_SHORT 0x02
-#define I2CONEWIRE_ERROR_CONFIG 0x04
-#define I2CONEWIRE_CMD_CHSL 0xC3
-#define I2CONEWIRE_CH_IO0 0xF0
-#define I2CONEWIRE_CH_IO1 0xE1
-#define I2CONEWIRE_CH_IO2 0xD2
-#define I2CONEWIRE_CH_IO3 0xC3
-#define I2CONEWIRE_CH_IO4 0xB4
-#define I2CONEWIRE_CH_IO5 0xA5
-#define I2CONEWIRE_CH_IO6 0x96
-#define I2CONEWIRE_CH_IO7 0x87
-#define I2CONEWIRE_RCH_IO0 0xB8
-#define I2CONEWIRE_RCH_IO1 0xB1
-#define I2CONEWIRE_RCH_IO2 0xAA
-#define I2CONEWIRE_RCH_IO3 0xA3
-#define I2CONEWIRE_RCH_IO4 0x9C
-#define I2CONEWIRE_RCH_IO5 0x95
-#define I2CONEWIRE_RCH_IO6 0x8E
-#define I2CONEWIRE_RCH_IO7 0x87
-/** \} */
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
- // Modules
-
- i2c_master_t i2c;
-
- // ctx variable
-
- uint8_t slave_address;
-
-} i2c1wire_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Communication gpio pins
-
- pin_name_t scl;
- pin_name_t sda;
-
- // static variable
-
- uint32_t i2c_speed;
- uint8_t i2c_address;
-
-} i2c1wire_cfg_t;
-
-/** \} */ // End types group
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
- */
-void i2c1wire_cfg_setup ( i2c1wire_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- *
- * @param ctx Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
- */
-I2C1WIRE_RETVAL i2c1wire_init ( i2c1wire_t *ctx, i2c1wire_cfg_t *cfg );
-
-/**
- * @brief Generic write function.
- *
- * @param ctx Click object.
- * @param reg Register address.
- * @param data_buf Data buf to be written.
- * @param len Number of the bytes in data buf.
- *
- * @description This function writes data to the desired register.
- */
-void i2c1wire_generic_write ( i2c1wire_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
-
-/**
- * @brief Generic read function.
- *
- * @param ctx Click object.
- * @param reg Register address.
- * @param data_buf Output data buf
- * @param len Number of the bytes to be read
- *
- * @description This function reads data from the desired register.
- */
-void i2c1wire_generic_read ( i2c1wire_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
-
-/**
- * @brief Software reset function.
- *
- * @param ctx Click object.
- *
- * @description This function does a software reset of the click module.
- */
-void i2c1wire_soft_reset ( i2c1wire_t *ctx );
-
-/**
- * @brief Set configuration function.
- *
- * @param ctx Click object.
- * @param cfg Configuration.
- *
- * @description This function configures the click module using the specified settings.
- */
-uint8_t i2c1wire_set_config ( i2c1wire_t *ctx, uint8_t cfg );
-
-/**
- * @brief Set channel function.
- *
- * @param ctx Click object.
- * @param chan Channel.
- *
- * @description This function configures the click module using the specified settings.
- */
-uint8_t i2c1wire_set_channel ( i2c1wire_t *ctx, uint8_t chan );
-
-/**
- * @brief Set read pointer function.
- *
- * @param ctx Click object.
- * @param ptr Pointer.
- *
- * @description This function sets the read pointer for the click module.
- */
-void i2c1wire_set_read_pointer ( i2c1wire_t *ctx, uint8_t ptr );
-
-/**
- * @brief Reset function.
- *
- * @param ctx Click object.
- *
- * @description This function does a hardware reset of the click module.
- */
-void i2c1wire_one_wire_reset ( i2c1wire_t *ctx );
-
-/**
- * @brief Write byte function.
- *
- * @param ctx Click object.
- * @param input Write data.
- *
- * @description This function writes one byte to the click module.
- */
-void i2c1wire_write_byte_one_wire ( i2c1wire_t *ctx, uint8_t input );
-
-/**
- * @brief Read byte function.
- *
- * @param ctx Click object.
- *
- * @description This function reads one byte from the click module.
- */
-uint8_t i2c1wire_read_byte_one_wire ( i2c1wire_t *ctx );
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _I2C1WIRE_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ * \brief This file contains API for I2C 1 Wire Click driver.
+ *
+ * \addtogroup i2c1wire I2C 1 Wire Click Driver
+ * @{
+ */
+// ----------------------------------------------------------------------------
+
+#ifndef I2C1WIRE_H
+#define I2C1WIRE_H
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_i2c_master.h"
+
+// -------------------------------------------------------------- PUBLIC MACROS
+/**
+ * \defgroup macros Macros
+ * \{
+ */
+
+/**
+ * \defgroup map_mikrobus MikroBUS
+ * \{
+ */
+#define I2C1WIRE_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
+ cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
+/** \} */
+
+/**
+ * \defgroup error_code Error Code
+ * \{
+ */
+#define I2C1WIRE_OK 0
+#define I2C1WIRE_ERROR -1
+/** \} */
+
+/**
+ * \defgroup settings_config Settings & Config
+ * \{
+ */
+#define I2C1WIRE_RESULT_ERROR 0x00
+#define I2C1WIRE_RESULT_OK 0x01
+#define I2C1WIRE_WIRE_RESULT_OK 0xFF
+
+#define I2C1WIRE_I2C_ADDRESS_0 0x18
+#define I2C1WIRE_I2C_ADDRESS_1 0x19
+#define I2C1WIRE_I2C_ADDRESS_2 0x1A
+#define I2C1WIRE_I2C_ADDRESS_3 0x1B
+#define I2C1WIRE_I2C_ADDRESS_4 0x1C
+#define I2C1WIRE_I2C_ADDRESS_5 0x1D
+#define I2C1WIRE_I2C_ADDRESS_6 0x1E
+#define I2C1WIRE_I2C_ADDRESS_7 0x1F
+
+#define I2C1WIRE_COMMAND_RESET 0xF0
+#define I2C1WIRE_COMMAND_SRP 0xE1
+#define I2C1WIRE_POINTER_STATUS 0xF0
+#define I2C1WIRE_STATUS_BUSY 0x01
+#define I2C1WIRE_STATUS_PPD 0x02
+#define I2C1WIRE_STATUS_SD 0x04
+#define I2C1WIRE_STATUS_LL 0x08
+#define I2C1WIRE_STATUS_RST 0x10
+#define I2C1WIRE_STATUS_SBR 0x20
+#define I2C1WIRE_STATUS_TSB 0x40
+#define I2C1WIRE_STATUS_DIR 0x80
+#define I2C1WIRE_POINTER_DATA 0xE1
+#define I2C1WIRE_POINTER_CONFIG 0xC3
+#define I2C1WIRE_CONFIG_APU_HIGH 0x30
+#define I2C1WIRE_CONFIG_APU_LOW 0x01
+#define I2C1WIRE_CONFIG_SPU_HIGH 0x60
+#define I2C1WIRE_CONFIG_SPU_LOW 0x04
+#define I2C1WIRE_CONFIG_1WS_HIGH 0xA0
+#define I2C1WIRE_CONFIG_1WS_LOW 0x08
+#define I2C1WIRE_COMMAND_WRITECONFIG 0xD2
+#define I2C1WIRE_COMMAND_RESETWIRE 0xB4
+#define I2C1WIRE_COMMAND_WRITEBYTE 0xA5
+#define I2C1WIRE_COMMAND_READBYTE 0x96
+#define I2C1WIRE_COMMAND_SINGLEBIT 0x87
+#define I2C1WIRE_COMMAND_TRIPLET 0x78
+#define I2C1WIRE_WIRE_COMMAND_SKIP 0xCC
+#define I2C1WIRE_WIRE_COMMAND_SELECT 0x55
+#define I2C1WIRE_WIRE_COMMAND_READ_ROM 0x33
+#define I2C1WIRE_WIRE_COMMAND_SEARCH 0xF0
+#define I2C1WIRE_ERROR_TIMEOUT 0x01
+#define I2C1WIRE_ERROR_SHORT 0x02
+#define I2C1WIRE_ERROR_CONFIG 0x04
+#define I2C1WIRE_CMD_CHSL 0xC3
+#define I2C1WIRE_CH_IO0 0xF0
+#define I2C1WIRE_CH_IO1 0xE1
+#define I2C1WIRE_CH_IO2 0xD2
+#define I2C1WIRE_CH_IO3 0xC3
+#define I2C1WIRE_CH_IO4 0xB4
+#define I2C1WIRE_CH_IO5 0xA5
+#define I2C1WIRE_CH_IO6 0x96
+#define I2C1WIRE_CH_IO7 0x87
+#define I2C1WIRE_RCH_IO0 0xB8
+#define I2C1WIRE_RCH_IO1 0xB1
+#define I2C1WIRE_RCH_IO2 0xAA
+#define I2C1WIRE_RCH_IO3 0xA3
+#define I2C1WIRE_RCH_IO4 0x9C
+#define I2C1WIRE_RCH_IO5 0x95
+#define I2C1WIRE_RCH_IO6 0x8E
+#define I2C1WIRE_RCH_IO7 0x87
+/** \} */
+
+/** \} */ // End group macro
+// --------------------------------------------------------------- PUBLIC TYPES
+/**
+ * \defgroup type Types
+ * \{
+ */
+
+/**
+ * @brief Click ctx object definition.
+ */
+typedef struct
+{
+ // Modules
+ i2c_master_t i2c;
+
+ // ctx variable
+ uint8_t slave_address;
+
+} i2c1wire_t;
+
+/**
+ * @brief Click configuration structure definition.
+ */
+typedef struct
+{
+ // Communication gpio pins
+ pin_name_t scl;
+ pin_name_t sda;
+
+ // static variable
+ uint32_t i2c_speed;
+ uint8_t i2c_address;
+
+} i2c1wire_cfg_t;
+
+/** \} */ // End types group
+// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
+
+/**
+ * \defgroup public_function Public function
+ * \{
+ */
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+/**
+ * @brief Config Object Initialization function.
+ *
+ * @param cfg Click configuration structure.
+ *
+ * @details This function initializes click configuration structure to init state.
+ * @note All used pins will be set to unconnected state.
+ */
+void i2c1wire_cfg_setup ( i2c1wire_cfg_t *cfg );
+
+/**
+ * @brief Initialization function.
+ *
+ * @param ctx Click object.
+ * @param cfg Click configuration structure.
+ *
+ * @details This function initializes all necessary pins and peripherals used for this click.
+ */
+err_t i2c1wire_init ( i2c1wire_t *ctx, i2c1wire_cfg_t *cfg );
+
+/**
+ * @brief Generic write function.
+ *
+ * @param ctx Click object.
+ * @param reg Register address.
+ * @param data_in Data buf to be written.
+ * @param len Number of the bytes in data buf.
+ *
+ * @details This function writes data to the desired register.
+ */
+err_t i2c1wire_generic_write ( i2c1wire_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len );
+
+/**
+ * @brief Generic read function.
+ *
+ * @param ctx Click object.
+ * @param reg Register address.
+ * @param data_out Output data buf
+ * @param len Number of the bytes to be read
+ *
+ * @details This function reads data from the desired register.
+ */
+err_t i2c1wire_generic_read ( i2c1wire_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len );
+
+/**
+ * @brief Software reset function.
+ *
+ * @param ctx Click object.
+ *
+ * @details This function does a software reset of the click module.
+ */
+void i2c1wire_soft_reset ( i2c1wire_t *ctx );
+
+/**
+ * @brief Set configuration function.
+ *
+ * @param ctx Click object.
+ * @param cfg Configuration.
+ *
+ * @details This function configures the click module using the specified settings.
+ */
+uint8_t i2c1wire_set_config ( i2c1wire_t *ctx, uint8_t cfg );
+
+/**
+ * @brief Set channel function.
+ *
+ * @param ctx Click object.
+ * @param chan Channel.
+ *
+ * @details This function configures the click module using the specified settings.
+ */
+uint8_t i2c1wire_set_channel ( i2c1wire_t *ctx, uint8_t chan );
+
+/**
+ * @brief Set read pointer function.
+ *
+ * @param ctx Click object.
+ * @param ptr Pointer.
+ *
+ * @details This function sets the read pointer for the click module.
+ */
+void i2c1wire_set_read_pointer ( i2c1wire_t *ctx, uint8_t ptr );
+
+/**
+ * @brief Reset function.
+ *
+ * @param ctx Click object.
+ *
+ * @details This function does a hardware reset of the click module.
+ */
+void i2c1wire_one_wire_reset ( i2c1wire_t *ctx );
+
+/**
+ * @brief Write byte function.
+ *
+ * @param ctx Click object.
+ * @param input Write data.
+ *
+ * @details This function writes one byte to the click module.
+ */
+void i2c1wire_write_byte_one_wire ( i2c1wire_t *ctx, uint8_t input );
+
+/**
+ * @brief Read byte function.
+ *
+ * @param ctx Click object.
+ *
+ * @details This function reads one byte from the click module.
+ */
+uint8_t i2c1wire_read_byte_one_wire ( i2c1wire_t *ctx );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _I2C1WIRE_H_
+
+/** \} */ // End public_function group
+/// \} // End click Driver group
+/*! @} */
+// ------------------------------------------------------------------------- END
diff --git a/clicks/i2c1wire/lib/src/i2c1wire.c b/clicks/i2c1wire/lib_i2c1wire/src/i2c1wire.c
similarity index 52%
rename from clicks/i2c1wire/lib/src/i2c1wire.c
rename to clicks/i2c1wire/lib_i2c1wire/src/i2c1wire.c
index adb44ac419..85aa3ac74e 100644
--- a/clicks/i2c1wire/lib/src/i2c1wire.c
+++ b/clicks/i2c1wire/lib_i2c1wire/src/i2c1wire.c
@@ -1,238 +1,240 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- */
-
-#include "i2c1wire.h"
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void i2c1wire_cfg_setup ( i2c1wire_cfg_t *cfg )
-{
- // Communication gpio pins
-
- cfg->scl = HAL_PIN_NC;
- cfg->sda = HAL_PIN_NC;
-
- // Additional gpio pins
-
- cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD;
- cfg->i2c_address = I2CONEWIRE_I2C_ADDRESS_0;
-}
-
-I2C1WIRE_RETVAL i2c1wire_init ( i2c1wire_t *ctx, i2c1wire_cfg_t *cfg )
-{
- i2c_master_config_t i2c_cfg;
-
- i2c_master_configure_default( &i2c_cfg );
- i2c_cfg.speed = cfg->i2c_speed;
- i2c_cfg.scl = cfg->scl;
- i2c_cfg.sda = cfg->sda;
-
- ctx->slave_address = cfg->i2c_address;
-
- if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR )
- {
- return I2C1WIRE_INIT_ERROR;
- }
-
- i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address );
- i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed );
-
- return I2C1WIRE_OK;
-}
-
-void i2c1wire_generic_write ( i2c1wire_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len )
-{
- uint8_t tx_buf[ 256 ];
- uint8_t cnt;
-
- tx_buf[ 0 ] = reg;
-
- for ( cnt = 1; cnt <= len; cnt++ )
- {
- tx_buf[ cnt ] = data_buf[ cnt - 1 ];
- }
-
- i2c_master_write( &ctx->i2c, tx_buf, len + 1 );
-}
-
-void i2c1wire_generic_read ( i2c1wire_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len )
-{
- i2c_master_write_then_read( &ctx->i2c, ®, 1, data_buf, len );
-}
-
-void i2c1wire_soft_reset ( i2c1wire_t *ctx )
-{
- i2c1wire_generic_read( ctx, I2CONEWIRE_COMMAND_RESET, 0, 1 );
-}
-
-uint8_t i2c1wire_set_config ( i2c1wire_t *ctx, uint8_t cfg )
-{
- uint8_t r_val;
-
- i2c1wire_generic_write( ctx, I2CONEWIRE_COMMAND_WRITECONFIG, &cfg, 1 );
-
- i2c1wire_generic_read( ctx, I2CONEWIRE_POINTER_DATA, &r_val, 1 );
-
- cfg = ( ( ~cfg ) >> 4 );
-
- if ( cfg != r_val )
- {
- i2c1wire_soft_reset( ctx );
-
- return I2CONEWIRE_RESULT_ERROR;
- }
- else
- {
- return I2CONEWIRE_RESULT_OK;
- }
-}
-
-uint8_t i2c1wire_set_channel ( i2c1wire_t *ctx, uint8_t chan )
-{
- uint8_t w_chan;
- uint8_t r_chan;
- uint8_t check;
-
- chan %= 8;
-
- i2c1wire_generic_write( ctx, I2CONEWIRE_CMD_CHSL, 0, 0 );
-
- switch ( chan )
- {
- case 0:
- {
- w_chan = I2CONEWIRE_CH_IO0;
- r_chan = I2CONEWIRE_RCH_IO0;
- break;
- }
- case 1:
- {
- w_chan = I2CONEWIRE_CH_IO1;
- r_chan = I2CONEWIRE_RCH_IO1;
- break;
- }
- case 2:
- {
- w_chan = I2CONEWIRE_CH_IO2;
- r_chan = I2CONEWIRE_RCH_IO2;
- break;
- }
- case 3:
- {
- w_chan = I2CONEWIRE_CH_IO3;
- r_chan = I2CONEWIRE_RCH_IO3;
- break;
- }
- case 4:
- {
- w_chan = I2CONEWIRE_CH_IO4;
- r_chan = I2CONEWIRE_RCH_IO4;
- break;
- }
- case 5:
- {
- w_chan = I2CONEWIRE_CH_IO5;
- r_chan = I2CONEWIRE_RCH_IO5;
- break;
- }
- case 6:
- {
- w_chan = I2CONEWIRE_CH_IO6;
- r_chan = I2CONEWIRE_RCH_IO6;
- break;
- }
- case 7:
- {
- w_chan = I2CONEWIRE_CH_IO7;
- r_chan = I2CONEWIRE_RCH_IO7;
- break;
- }
- };
-
- i2c1wire_generic_write( ctx, I2CONEWIRE_CMD_CHSL, &w_chan, 1 );
-
- i2c1wire_generic_read( ctx, I2CONEWIRE_COMMAND_SRP, &check, 1 );
-
- if ( check != r_chan )
- {
- return I2CONEWIRE_RESULT_ERROR;
- }
- else
- {
- return I2CONEWIRE_RESULT_OK;
- }
-}
-
-void i2c1wire_set_read_pointer ( i2c1wire_t *ctx, uint8_t ptr )
-{
- i2c1wire_generic_write( ctx, I2CONEWIRE_POINTER_DATA, &ptr, 1 );
-}
-
-void i2c1wire_one_wire_reset ( i2c1wire_t *ctx )
-{
- uint8_t temp;
-
- i2c1wire_generic_read( ctx, I2CONEWIRE_COMMAND_RESETWIRE, &temp, 1 );
-}
-
-void i2c1wire_write_byte_one_wire ( i2c1wire_t *ctx, uint8_t input )
-{
- uint8_t t_buf[ 2 ];
- uint8_t r_buf[ 2 ];
-
- t_buf[ 0 ] = I2CONEWIRE_COMMAND_WRITEBYTE;
- t_buf[ 1 ] = input;
-
- i2c_master_write_then_read( &ctx->i2c, t_buf, 2, r_buf, 2 );
- Delay_100ms( );
- Delay_100ms( );
-}
-
-uint8_t i2c1wire_read_byte_one_wire ( i2c1wire_t *ctx )
-{
- uint8_t t_buf[ 2 ];
- uint8_t r_buf[ 1 ];
-
- t_buf[ 0 ] = I2CONEWIRE_COMMAND_READBYTE;
-
- i2c_master_write( &ctx->i2c, t_buf, 1 );
- Delay_100ms( );
-
- t_buf[ 0 ] = I2CONEWIRE_COMMAND_SRP;
- t_buf[ 1 ] = I2CONEWIRE_COMMAND_SRP;
-
- i2c_master_write( &ctx->i2c, t_buf, 2 );
-
- i2c_master_write_then_read( &ctx->i2c, t_buf, 1, r_buf, 1 );
-
- return r_buf[ 0 ];
-}
-
-// ------------------------------------------------------------------------- END
-
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ */
+
+#include "i2c1wire.h"
+
+// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
+
+void i2c1wire_cfg_setup ( i2c1wire_cfg_t *cfg )
+{
+ // Communication gpio pins
+ cfg->scl = HAL_PIN_NC;
+ cfg->sda = HAL_PIN_NC;
+
+ // Additional gpio pins
+ cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD;
+ cfg->i2c_address = I2C1WIRE_I2C_ADDRESS_0;
+}
+
+err_t i2c1wire_init ( i2c1wire_t *ctx, i2c1wire_cfg_t *cfg )
+{
+ i2c_master_config_t i2c_cfg;
+
+ i2c_master_configure_default( &i2c_cfg );
+
+ i2c_cfg.scl = cfg->scl;
+ i2c_cfg.sda = cfg->sda;
+
+ ctx->slave_address = cfg->i2c_address;
+
+ if ( I2C_MASTER_ERROR == i2c_master_open( &ctx->i2c, &i2c_cfg ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ if ( I2C_MASTER_ERROR == i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ if ( I2C_MASTER_ERROR == i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ return I2C1WIRE_OK;
+}
+
+err_t i2c1wire_generic_write ( i2c1wire_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len )
+{
+ uint8_t data_buf[ 256 ] = { 0 };
+ data_buf[ 0 ] = reg;
+ for ( uint8_t cnt = 0; cnt < len; cnt++ )
+ {
+ data_buf[ cnt + 1 ] = data_in[ cnt ];
+ }
+ return i2c_master_write( &ctx->i2c, data_buf, len + 1 );
+}
+
+err_t i2c1wire_generic_read ( i2c1wire_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len )
+{
+ return i2c_master_write_then_read( &ctx->i2c, ®, 1, data_out, len );
+}
+
+void i2c1wire_soft_reset ( i2c1wire_t *ctx )
+{
+ i2c1wire_generic_read( ctx, I2C1WIRE_COMMAND_RESET, 0, 0 );
+}
+
+uint8_t i2c1wire_set_config ( i2c1wire_t *ctx, uint8_t cfg )
+{
+ uint8_t r_val = 0;
+
+ i2c1wire_generic_write( ctx, I2C1WIRE_COMMAND_WRITECONFIG, &cfg, 1 );
+
+ i2c1wire_generic_read( ctx, I2C1WIRE_POINTER_DATA, &r_val, 1 );
+
+ cfg = ( ( ~cfg ) >> 4 );
+
+ if ( cfg != r_val )
+ {
+ i2c1wire_soft_reset( ctx );
+
+ return I2C1WIRE_RESULT_ERROR;
+ }
+ else
+ {
+ return I2C1WIRE_RESULT_OK;
+ }
+}
+
+uint8_t i2c1wire_set_channel ( i2c1wire_t *ctx, uint8_t chan )
+{
+ uint8_t w_chan = 0;
+ uint8_t r_chan = 0;
+ uint8_t check = 0;
+
+ chan %= 8;
+
+ i2c1wire_generic_write( ctx, I2C1WIRE_CMD_CHSL, 0, 0 );
+
+ switch ( chan )
+ {
+ case 0:
+ {
+ w_chan = I2C1WIRE_CH_IO0;
+ r_chan = I2C1WIRE_RCH_IO0;
+ break;
+ }
+ case 1:
+ {
+ w_chan = I2C1WIRE_CH_IO1;
+ r_chan = I2C1WIRE_RCH_IO1;
+ break;
+ }
+ case 2:
+ {
+ w_chan = I2C1WIRE_CH_IO2;
+ r_chan = I2C1WIRE_RCH_IO2;
+ break;
+ }
+ case 3:
+ {
+ w_chan = I2C1WIRE_CH_IO3;
+ r_chan = I2C1WIRE_RCH_IO3;
+ break;
+ }
+ case 4:
+ {
+ w_chan = I2C1WIRE_CH_IO4;
+ r_chan = I2C1WIRE_RCH_IO4;
+ break;
+ }
+ case 5:
+ {
+ w_chan = I2C1WIRE_CH_IO5;
+ r_chan = I2C1WIRE_RCH_IO5;
+ break;
+ }
+ case 6:
+ {
+ w_chan = I2C1WIRE_CH_IO6;
+ r_chan = I2C1WIRE_RCH_IO6;
+ break;
+ }
+ case 7:
+ {
+ w_chan = I2C1WIRE_CH_IO7;
+ r_chan = I2C1WIRE_RCH_IO7;
+ break;
+ }
+ };
+
+ i2c1wire_generic_write( ctx, I2C1WIRE_CMD_CHSL, &w_chan, 1 );
+
+ i2c1wire_generic_read( ctx, I2C1WIRE_COMMAND_SRP, &check, 1 );
+
+ if ( check != r_chan )
+ {
+ return I2C1WIRE_RESULT_ERROR;
+ }
+ else
+ {
+ return I2C1WIRE_RESULT_OK;
+ }
+}
+
+void i2c1wire_set_read_pointer ( i2c1wire_t *ctx, uint8_t ptr )
+{
+ i2c1wire_generic_write( ctx, I2C1WIRE_POINTER_DATA, &ptr, 1 );
+}
+
+void i2c1wire_one_wire_reset ( i2c1wire_t *ctx )
+{
+ uint8_t temp = 0;
+
+ i2c1wire_generic_read( ctx, I2C1WIRE_COMMAND_RESETWIRE, &temp, 1 );
+}
+
+void i2c1wire_write_byte_one_wire ( i2c1wire_t *ctx, uint8_t input )
+{
+ uint8_t t_buf[ 2 ] = { 0 };
+ uint8_t r_buf[ 2 ] = { 0 };
+
+ t_buf[ 0 ] = I2C1WIRE_COMMAND_WRITEBYTE;
+ t_buf[ 1 ] = input;
+
+ i2c_master_write( &ctx->i2c, t_buf, 2 );
+ i2c_master_read( &ctx->i2c, r_buf, 2 );
+ Delay_100ms( );
+ Delay_100ms( );
+}
+
+uint8_t i2c1wire_read_byte_one_wire ( i2c1wire_t *ctx )
+{
+ uint8_t t_buf[ 2 ] = { 0 };
+ uint8_t r_buf[ 1 ] = { 0 };
+
+ t_buf[ 0 ] = I2C1WIRE_COMMAND_READBYTE;
+
+ i2c_master_write( &ctx->i2c, t_buf, 1 );
+ Delay_100ms( );
+
+ t_buf[ 0 ] = I2C1WIRE_COMMAND_SRP;
+ t_buf[ 1 ] = I2C1WIRE_COMMAND_SRP;
+
+ i2c_master_write( &ctx->i2c, t_buf, 2 );
+
+ i2c_master_write_then_read( &ctx->i2c, t_buf, 1, r_buf, 1 );
+
+ return r_buf[ 0 ];
+}
+
+// ------------------------------------------------------------------------- END
+
diff --git a/clicks/i2c1wire/memake.txt b/clicks/i2c1wire/memake.txt
deleted file mode 100644
index 3c703ed6fb..0000000000
--- a/clicks/i2c1wire/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: I2C1Wire
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/i2cextend2/CMakeLists.txt b/clicks/i2cextend2/CMakeLists.txt
new file mode 100644
index 0000000000..732a911d98
--- /dev/null
+++ b/clicks/i2cextend2/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_i2cextend2 LANGUAGES MikroC)
+else()
+ project(example_i2cextend2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_i2cextend2
+ example/main.c
+
+)
+
+
+############################ example_i2cextend2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_i2cextend2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_i2cextend2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_i2cextend2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_i2cextend2)
+target_link_libraries(example_i2cextend2 PUBLIC Click.I2CExtend2)
+############################ example_i2cextend2 GENERATED CODE END ###########################
diff --git a/clicks/i2cextend2/README.md b/clicks/i2cextend2/README.md
index 0a5c78d4a9..8f8fa15cda 100644
--- a/clicks/i2cextend2/README.md
+++ b/clicks/i2cextend2/README.md
@@ -75,7 +75,8 @@ void i2cextend2_enable ( i2cextend2_t *ctx, uint8_t en_extend );
```c
-void application_init ( void ) {
+void application_init ( void )
+{
log_cfg_t log_cfg; /**< Logger config object. */
i2cextend2_cfg_t i2cextend2_cfg; /**< Click config object. */
@@ -95,36 +96,39 @@ void application_init ( void ) {
// Click initialization.
i2cextend2_cfg_setup( &i2cextend2_cfg );
I2CEXTEND2_MAP_MIKROBUS( i2cextend2_cfg, MIKROBUS_1 );
- err_t init_flag = i2cextend2_init( &i2cextend2, &i2cextend2_cfg );
- if ( I2C_MASTER_ERROR == init_flag ) {
+ if ( I2C_MASTER_ERROR == i2cextend2_init( &i2cextend2, &i2cextend2_cfg ) )
+ {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
-
+
i2cextend2_enable( &i2cextend2, I2CEXTEND2_EXTEND_ENABLE );
- if ( i2cextend2_rmt_read( &i2cextend2, C6DOFIMU11_REG_WHO_AM_I ) == C6DOFIMU11_WHO_AM_I_WIA_ID ) {
+ if ( C6DOFIMU11_WHO_AM_I_WIA_ID == i2cextend2_rmt_read( &i2cextend2, C6DOFIMU11_REG_WHO_AM_I ) )
+ {
log_printf( &logger, " SUCCESS \r\n" );
log_printf( &logger, "------------------------\r\n" );
- } else {
+ }
+ else
+ {
log_printf( &logger, " ERROR \r\n" );
log_printf( &logger, " Reset the device \r\n" );
log_printf( &logger, "------------------------\r\n" );
for ( ; ; );
}
- i2cextend2_rmt_write( &i2cextend2, C6DOFIMU11_REG_CNTL2, C6DOFIMU11_CNTL2_TEMP_EN_STANDBY_MODE |
- C6DOFIMU11_CNTL2_MAG_EN_STANDBY_MODE |
- C6DOFIMU11_CNTL2_ACCEL_EN_STANDBY_MODE );
+ i2cextend2_rmt_write ( &i2cextend2, C6DOFIMU11_REG_CNTL2, C6DOFIMU11_CNTL2_TEMP_EN_STANDBY_MODE |
+ C6DOFIMU11_CNTL2_MAG_EN_STANDBY_MODE |
+ C6DOFIMU11_CNTL2_ACCEL_EN_STANDBY_MODE );
- i2cextend2_rmt_write ( &i2cextend2, C6DOFIMU11_REG_INC3, C6DOFIMU11_INC3_IEL2_FIFO_TRIG |
+ i2cextend2_rmt_write ( &i2cextend2, C6DOFIMU11_REG_INC3, C6DOFIMU11_INC3_IEL2_FIFO_TRIG |
C6DOFIMU11_INC3_IEL1_FIFO_TRIG );
- i2cextend2_rmt_write ( &i2cextend2, C6DOFIMU11_REG_CNTL2, C6DOFIMU11_CNTL2_GSEL_8G |
- C6DOFIMU11_CNTL2_RES_MAX2 |
- C6DOFIMU11_CNTL2_MAG_EN_OPERATING_MODE |
+ i2cextend2_rmt_write ( &i2cextend2, C6DOFIMU11_REG_CNTL2, C6DOFIMU11_CNTL2_GSEL_8G |
+ C6DOFIMU11_CNTL2_RES_MAX2 |
+ C6DOFIMU11_CNTL2_MAG_EN_OPERATING_MODE |
C6DOFIMU11_CNTL2_ACCEL_EN_OPERATING_MODE );
+ Delay_ms ( 100 );
log_info( &logger, " Application Task " );
log_printf( &logger, "------------------------\r\n" );
}
@@ -137,25 +141,26 @@ void application_init ( void ) {
```c
-void application_task ( void ) {
+void application_task ( void )
+{
log_printf( &logger, "\t Accel \t|\t Mag \r\n" );
log_printf( &logger, "------------------------------------------------\r\n" );
-
+
i2cextend2_6dofimu11_get_axis( &i2cextend2, C6DOFIMU11_REG_ACCEL_XOUT_L );
log_printf( &logger, "\t Accel X: %d\t|", axis );
i2cextend2_6dofimu11_get_axis( &i2cextend2, C6DOFIMU11_REG_MAG_XOUT_L );
log_printf( &logger, "\t Mag X: %d\r\n", axis );
-
+
i2cextend2_6dofimu11_get_axis( &i2cextend2, C6DOFIMU11_REG_ACCEL_YOUT_L );
log_printf( &logger, "\t Accel Y: %d\t|", axis );
i2cextend2_6dofimu11_get_axis( &i2cextend2, C6DOFIMU11_REG_MAG_YOUT_L );
log_printf( &logger, "\t Mag Y: %d\r\n", axis );
-
+
i2cextend2_6dofimu11_get_axis( &i2cextend2, C6DOFIMU11_REG_ACCEL_ZOUT_L );
log_printf( &logger, "\t Accel Z: %d\t|", axis );
i2cextend2_6dofimu11_get_axis( &i2cextend2, C6DOFIMU11_REG_MAG_ZOUT_L );
log_printf( &logger, "\t Mag Z: %d\r\n", axis );
-
+
log_printf( &logger, "------------------------------------------------\r\n" );
Delay_ms( 1000 );
}
diff --git a/clicks/i2cextend2/changelog.md b/clicks/i2cextend2/changelog.md
index 8a902bbfaf..ca09ef759f 100644
--- a/clicks/i2cextend2/changelog.md
+++ b/clicks/i2cextend2/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.4
+### Version 2.1.0.4
- Initial release
diff --git a/clicks/i2cextend2/details.md b/clicks/i2cextend2/details.md
index 17d3c66083..1b2102b4c7 100644
--- a/clicks/i2cextend2/details.md
+++ b/clicks/i2cextend2/details.md
@@ -74,7 +74,8 @@ void i2cextend2_enable ( i2cextend2_t *ctx, uint8_t en_extend );
```c
-void application_init ( void ) {
+void application_init ( void )
+{
log_cfg_t log_cfg; /**< Logger config object. */
i2cextend2_cfg_t i2cextend2_cfg; /**< Click config object. */
@@ -94,36 +95,39 @@ void application_init ( void ) {
// Click initialization.
i2cextend2_cfg_setup( &i2cextend2_cfg );
I2CEXTEND2_MAP_MIKROBUS( i2cextend2_cfg, MIKROBUS_1 );
- err_t init_flag = i2cextend2_init( &i2cextend2, &i2cextend2_cfg );
- if ( I2C_MASTER_ERROR == init_flag ) {
+ if ( I2C_MASTER_ERROR == i2cextend2_init( &i2cextend2, &i2cextend2_cfg ) )
+ {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
-
+
i2cextend2_enable( &i2cextend2, I2CEXTEND2_EXTEND_ENABLE );
- if ( i2cextend2_rmt_read( &i2cextend2, C6DOFIMU11_REG_WHO_AM_I ) == C6DOFIMU11_WHO_AM_I_WIA_ID ) {
+ if ( C6DOFIMU11_WHO_AM_I_WIA_ID == i2cextend2_rmt_read( &i2cextend2, C6DOFIMU11_REG_WHO_AM_I ) )
+ {
log_printf( &logger, " SUCCESS \r\n" );
log_printf( &logger, "------------------------\r\n" );
- } else {
+ }
+ else
+ {
log_printf( &logger, " ERROR \r\n" );
log_printf( &logger, " Reset the device \r\n" );
log_printf( &logger, "------------------------\r\n" );
for ( ; ; );
}
- i2cextend2_rmt_write( &i2cextend2, C6DOFIMU11_REG_CNTL2, C6DOFIMU11_CNTL2_TEMP_EN_STANDBY_MODE |
- C6DOFIMU11_CNTL2_MAG_EN_STANDBY_MODE |
- C6DOFIMU11_CNTL2_ACCEL_EN_STANDBY_MODE );
+ i2cextend2_rmt_write ( &i2cextend2, C6DOFIMU11_REG_CNTL2, C6DOFIMU11_CNTL2_TEMP_EN_STANDBY_MODE |
+ C6DOFIMU11_CNTL2_MAG_EN_STANDBY_MODE |
+ C6DOFIMU11_CNTL2_ACCEL_EN_STANDBY_MODE );
- i2cextend2_rmt_write ( &i2cextend2, C6DOFIMU11_REG_INC3, C6DOFIMU11_INC3_IEL2_FIFO_TRIG |
+ i2cextend2_rmt_write ( &i2cextend2, C6DOFIMU11_REG_INC3, C6DOFIMU11_INC3_IEL2_FIFO_TRIG |
C6DOFIMU11_INC3_IEL1_FIFO_TRIG );
- i2cextend2_rmt_write ( &i2cextend2, C6DOFIMU11_REG_CNTL2, C6DOFIMU11_CNTL2_GSEL_8G |
- C6DOFIMU11_CNTL2_RES_MAX2 |
- C6DOFIMU11_CNTL2_MAG_EN_OPERATING_MODE |
+ i2cextend2_rmt_write ( &i2cextend2, C6DOFIMU11_REG_CNTL2, C6DOFIMU11_CNTL2_GSEL_8G |
+ C6DOFIMU11_CNTL2_RES_MAX2 |
+ C6DOFIMU11_CNTL2_MAG_EN_OPERATING_MODE |
C6DOFIMU11_CNTL2_ACCEL_EN_OPERATING_MODE );
+ Delay_ms ( 100 );
log_info( &logger, " Application Task " );
log_printf( &logger, "------------------------\r\n" );
}
@@ -136,25 +140,26 @@ void application_init ( void ) {
```c
-void application_task ( void ) {
+void application_task ( void )
+{
log_printf( &logger, "\t Accel \t|\t Mag \r\n" );
log_printf( &logger, "------------------------------------------------\r\n" );
-
+
i2cextend2_6dofimu11_get_axis( &i2cextend2, C6DOFIMU11_REG_ACCEL_XOUT_L );
log_printf( &logger, "\t Accel X: %d\t|", axis );
i2cextend2_6dofimu11_get_axis( &i2cextend2, C6DOFIMU11_REG_MAG_XOUT_L );
log_printf( &logger, "\t Mag X: %d\r\n", axis );
-
+
i2cextend2_6dofimu11_get_axis( &i2cextend2, C6DOFIMU11_REG_ACCEL_YOUT_L );
log_printf( &logger, "\t Accel Y: %d\t|", axis );
i2cextend2_6dofimu11_get_axis( &i2cextend2, C6DOFIMU11_REG_MAG_YOUT_L );
log_printf( &logger, "\t Mag Y: %d\r\n", axis );
-
+
i2cextend2_6dofimu11_get_axis( &i2cextend2, C6DOFIMU11_REG_ACCEL_ZOUT_L );
log_printf( &logger, "\t Accel Z: %d\t|", axis );
i2cextend2_6dofimu11_get_axis( &i2cextend2, C6DOFIMU11_REG_MAG_ZOUT_L );
log_printf( &logger, "\t Mag Z: %d\r\n", axis );
-
+
log_printf( &logger, "------------------------------------------------\r\n" );
Delay_ms( 1000 );
}
diff --git a/clicks/i2cextend2/doc/doxy/Doxyfile.doxy b/clicks/i2cextend2/doc/doxy/Doxyfile.doxy
index 9abf984d48..fa47771d0a 100644
--- a/clicks/i2cextend2/doc/doxy/Doxyfile.doxy
+++ b/clicks/i2cextend2/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/i2cextend2/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/i2cextend2/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/i2cextend2/example \
- ../clicks/i2cextend2/lib/include \
- ../clicks/i2cextend2/README.md
+INPUT = ../cmake/i2cextend2/example \
+ ../cmake/i2cextend2/lib_i2cextend2/include \
+ ../cmake/i2cextend2/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/i2cextend2/example
+EXAMPLE_PATH = ../cmake/i2cextend2/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/i2cextend2/doc/package/manifest.json b/clicks/i2cextend2/doc/package/manifest.json
index 8c2982ef93..3577995dda 100644
--- a/clicks/i2cextend2/doc/package/manifest.json
+++ b/clicks/i2cextend2/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "I2C",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Interface > I2C",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "I2C Extend 2 click",
"example_list": [
@@ -26,14 +25,14 @@
"name": "mikroe.click.i2cextend2",
"product_link": "https://www.mikroe.com/i2c-extend-2-click",
"short_description": "I2C Extend 2 Click is a compact add-on board suitable for I2C communication bus extension. This board features the PCA9615, a 2-channel multipoint differential I2C bus buffer with hot-swap logic from NXP Semiconductors. The PCA9615 converts the two default I2C signals into four differential signals, two for SCL and two for SDA.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "related_projects":[
+ "related_projects": [
4070
],
- "_type":"mikroSDK Library",
- "version": "2.0.0.4"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.4",
+ "cmake": true,
+ "alias": "Click.I2CExtend2",
+ "subdir_name": "lib_i2cextend2"
}
-
-
-
diff --git a/clicks/i2cextend2/example/CMakeLists.txt b/clicks/i2cextend2/example/CMakeLists.txt
new file mode 100644
index 0000000000..319e5caca0
--- /dev/null
+++ b/clicks/i2cextend2/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_i2cextend2 LANGUAGES MikroC)
+else()
+ project(example_i2cextend2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_i2cextend2
+ main.c
+
+)
+
+
+############################ example_i2cextend2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_i2cextend2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_i2cextend2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_i2cextend2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_i2cextend2)
+target_link_libraries(example_i2cextend2 PUBLIC Click.I2CExtend2)
+############################ example_i2cextend2 GENERATED CODE END ###########################
diff --git a/clicks/i2cextend2/example/main.c b/clicks/i2cextend2/example/main.c
index 972be2c247..be6b900267 100644
--- a/clicks/i2cextend2/example/main.c
+++ b/clicks/i2cextend2/example/main.c
@@ -32,20 +32,19 @@ static i2cextend2_t i2cextend2;
static log_t logger;
int16_t axis;
-void i2cextend2_6dofimu11_get_axis ( i2cextend2_t *ctx, uint8_t axis_out_reg ) {
- uint16_t rx_val;
- uint8_t rx_buf[ 2 ];
+void i2cextend2_6dofimu11_get_axis ( i2cextend2_t *ctx, uint8_t axis_out_reg )
+{
+ uint16_t rx_val = 0;
- i2cextend2_rmt_multi_read( ctx, axis_out_reg, &rx_buf[ 0 ], 2 );
-
- rx_val = rx_buf[ 1 ];
+ rx_val = i2cextend2_rmt_read( ctx, axis_out_reg + 1 );
rx_val <<= 8;
- rx_val |= rx_buf[ 0 ];
+ rx_val |= i2cextend2_rmt_read( ctx, axis_out_reg );
axis = ( int16_t ) rx_val;
}
-void application_init ( void ) {
+void application_init ( void )
+{
log_cfg_t log_cfg; /**< Logger config object. */
i2cextend2_cfg_t i2cextend2_cfg; /**< Click config object. */
@@ -65,41 +64,45 @@ void application_init ( void ) {
// Click initialization.
i2cextend2_cfg_setup( &i2cextend2_cfg );
I2CEXTEND2_MAP_MIKROBUS( i2cextend2_cfg, MIKROBUS_1 );
- err_t init_flag = i2cextend2_init( &i2cextend2, &i2cextend2_cfg );
- if ( I2C_MASTER_ERROR == init_flag ) {
+ if ( I2C_MASTER_ERROR == i2cextend2_init( &i2cextend2, &i2cextend2_cfg ) )
+ {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
i2cextend2_enable( &i2cextend2, I2CEXTEND2_EXTEND_ENABLE );
- if ( i2cextend2_rmt_read( &i2cextend2, C6DOFIMU11_REG_WHO_AM_I ) == C6DOFIMU11_WHO_AM_I_WIA_ID ) {
+ if ( C6DOFIMU11_WHO_AM_I_WIA_ID == i2cextend2_rmt_read( &i2cextend2, C6DOFIMU11_REG_WHO_AM_I ) )
+ {
log_printf( &logger, " SUCCESS \r\n" );
log_printf( &logger, "------------------------\r\n" );
- } else {
+ }
+ else
+ {
log_printf( &logger, " ERROR \r\n" );
log_printf( &logger, " Reset the device \r\n" );
log_printf( &logger, "------------------------\r\n" );
for ( ; ; );
}
- i2cextend2_rmt_write( &i2cextend2, C6DOFIMU11_REG_CNTL2, C6DOFIMU11_CNTL2_TEMP_EN_STANDBY_MODE |
- C6DOFIMU11_CNTL2_MAG_EN_STANDBY_MODE |
- C6DOFIMU11_CNTL2_ACCEL_EN_STANDBY_MODE );
+ i2cextend2_rmt_write ( &i2cextend2, C6DOFIMU11_REG_CNTL2, C6DOFIMU11_CNTL2_TEMP_EN_STANDBY_MODE |
+ C6DOFIMU11_CNTL2_MAG_EN_STANDBY_MODE |
+ C6DOFIMU11_CNTL2_ACCEL_EN_STANDBY_MODE );
i2cextend2_rmt_write ( &i2cextend2, C6DOFIMU11_REG_INC3, C6DOFIMU11_INC3_IEL2_FIFO_TRIG |
C6DOFIMU11_INC3_IEL1_FIFO_TRIG );
i2cextend2_rmt_write ( &i2cextend2, C6DOFIMU11_REG_CNTL2, C6DOFIMU11_CNTL2_GSEL_8G |
- C6DOFIMU11_CNTL2_RES_MAX2 |
- C6DOFIMU11_CNTL2_MAG_EN_OPERATING_MODE |
- C6DOFIMU11_CNTL2_ACCEL_EN_OPERATING_MODE );
+ C6DOFIMU11_CNTL2_RES_MAX2 |
+ C6DOFIMU11_CNTL2_MAG_EN_OPERATING_MODE |
+ C6DOFIMU11_CNTL2_ACCEL_EN_OPERATING_MODE );
+ Delay_ms ( 100 );
log_info( &logger, " Application Task " );
log_printf( &logger, "------------------------\r\n" );
}
-void application_task ( void ) {
+void application_task ( void )
+{
log_printf( &logger, "\t Accel \t|\t Mag \r\n" );
log_printf( &logger, "------------------------------------------------\r\n" );
@@ -122,10 +125,12 @@ void application_task ( void ) {
Delay_ms( 1000 );
}
-void main ( void ) {
+void main ( void )
+{
application_init( );
- for ( ; ; ) {
+ for ( ; ; )
+ {
application_task( );
}
}
diff --git a/clicks/i2cextend2/example/manifest.exm b/clicks/i2cextend2/example/manifest.exm
index 006c0f2ed9..b3faa5db63 100644
--- a/clicks/i2cextend2/example/manifest.exm
+++ b/clicks/i2cextend2/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "I2C Extend 2 Click",
"description": "I2C Extend 2 Click is a compact add-on board suitable for I2C communication bus extension. This board features the PCA9615, a 2-channel multipoint differential I2C bus buffer with hot-swap logic from NXP Semiconductors. The PCA9615 converts the two default I2C signals into four differential signals, two for SCL and two for SDA.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","PCA9615"],
"category" : ["I2C"]
}
diff --git a/clicks/i2cextend2/example/memake.txt b/clicks/i2cextend2/example/memake.txt
deleted file mode 100644
index e3fe4f88d3..0000000000
--- a/clicks/i2cextend2/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_i2cextend2
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.I2CExtend2
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/i2cextend2/lib/memake.txt b/clicks/i2cextend2/lib/memake.txt
deleted file mode 100644
index 8eb5a71eef..0000000000
--- a/clicks/i2cextend2/lib/memake.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-type: library
-
-target: lib_i2cextend2
-
-sources: {
- src/i2cextend2.c
-}
-
-headers: {
- include/i2cextend2.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/i2cextend2.h) dst(include/i2cextend2.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.I2CExtend2
diff --git a/clicks/i2cextend2/lib_i2cextend2/CMakeLists.txt b/clicks/i2cextend2/lib_i2cextend2/CMakeLists.txt
new file mode 100644
index 0000000000..1adccdaf34
--- /dev/null
+++ b/clicks/i2cextend2/lib_i2cextend2/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_i2cextend2 LANGUAGES MikroC)
+else()
+ project(lib_i2cextend2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_i2cextend2 STATIC
+ src/i2cextend2.c
+ include/i2cextend2.h
+)
+add_library(Click.I2CExtend2 ALIAS lib_i2cextend2)
+
+
+
+target_include_directories(lib_i2cextend2 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_i2cextend2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_i2cextend2 PUBLIC MikroSDK.Driver)
diff --git a/clicks/i2cextend2/lib_i2cextend2/include/Click.I2CExtend2 b/clicks/i2cextend2/lib_i2cextend2/include/Click.I2CExtend2
new file mode 100644
index 0000000000..3616b3e302
--- /dev/null
+++ b/clicks/i2cextend2/lib_i2cextend2/include/Click.I2CExtend2
@@ -0,0 +1 @@
+#include "i2cextend2.h"
diff --git a/clicks/i2cextend2/lib/include/i2cextend2.h b/clicks/i2cextend2/lib_i2cextend2/include/i2cextend2.h
similarity index 94%
rename from clicks/i2cextend2/lib/include/i2cextend2.h
rename to clicks/i2cextend2/lib_i2cextend2/include/i2cextend2.h
index 5df17b0dbd..2eeedd85dd 100644
--- a/clicks/i2cextend2/lib/include/i2cextend2.h
+++ b/clicks/i2cextend2/lib_i2cextend2/include/i2cextend2.h
@@ -151,13 +151,13 @@ extern "C"{
typedef struct
{
// Output pins
- digital_out_t en; /**< Enable. */
+ digital_out_t en; /**< Enable. */
// Modules
- i2c_master_t i2c; /**< I2C driver object. */
+ i2c_master_t i2c; /**< I2C driver object. */
// I2C slave address
- uint8_t slave_address; /**< Device slave address (used for I2C driver). */
+ uint8_t slave_address; /**< Device slave address (used for I2C driver). */
} i2cextend2_t;
@@ -167,13 +167,13 @@ typedef struct
*/
typedef struct
{
- pin_name_t scl; /**< Clock pin descriptor for I2C driver. */
- pin_name_t sda; /**< Bidirectional data pin descriptor for I2C driver. */
+ pin_name_t scl; /**< Clock pin descriptor for I2C driver. */
+ pin_name_t sda; /**< Bidirectional data pin descriptor for I2C driver. */
- pin_name_t en; /**< Enable. */
+ pin_name_t en; /**< Enable. */
- uint32_t i2c_speed; /**< I2C serial speed. */
- uint8_t i2c_address; /**< I2C slave address. */
+ uint32_t i2c_speed; /**< I2C serial speed. */
+ uint8_t i2c_address; /**< I2C slave address. */
} i2cextend2_cfg_t;
@@ -215,7 +215,6 @@ void i2cextend2_cfg_setup ( i2cextend2_cfg_t *cfg );
* See #i2cextend2_cfg_t object definition for detailed explanation.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
*/
diff --git a/clicks/i2cextend2/lib/src/i2cextend2.c b/clicks/i2cextend2/lib_i2cextend2/src/i2cextend2.c
similarity index 85%
rename from clicks/i2cextend2/lib/src/i2cextend2.c
rename to clicks/i2cextend2/lib_i2cextend2/src/i2cextend2.c
index ba097b7559..c8904f78d0 100644
--- a/clicks/i2cextend2/lib/src/i2cextend2.c
+++ b/clicks/i2cextend2/lib_i2cextend2/src/i2cextend2.c
@@ -27,7 +27,8 @@
#include "i2cextend2.h"
-void i2cextend2_cfg_setup ( i2cextend2_cfg_t *cfg ) {
+void i2cextend2_cfg_setup ( i2cextend2_cfg_t *cfg )
+{
// Communication gpio pins
cfg->scl = HAL_PIN_NC;
cfg->sda = HAL_PIN_NC;
@@ -39,7 +40,8 @@ void i2cextend2_cfg_setup ( i2cextend2_cfg_t *cfg ) {
cfg->i2c_address = C6DOFIMU11_I2C_SLAVE_ADDRESS_GND;
}
-err_t i2cextend2_init ( i2cextend2_t *ctx, i2cextend2_cfg_t *cfg ) {
+err_t i2cextend2_init ( i2cextend2_t *ctx, i2cextend2_cfg_t *cfg )
+{
i2c_master_config_t i2c_cfg;
i2c_master_configure_default( &i2c_cfg );
@@ -49,23 +51,27 @@ err_t i2cextend2_init ( i2cextend2_t *ctx, i2cextend2_cfg_t *cfg ) {
ctx->slave_address = cfg->i2c_address;
- if ( I2C_MASTER_ERROR == i2c_master_open( &ctx->i2c, &i2c_cfg ) ) {
+ if ( I2C_MASTER_ERROR == i2c_master_open( &ctx->i2c, &i2c_cfg ) )
+ {
return I2C_MASTER_ERROR;
}
- if ( I2C_MASTER_ERROR == i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address ) ) {
+ if ( I2C_MASTER_ERROR == i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address ) )
+ {
return I2C_MASTER_ERROR;
}
- if ( I2C_MASTER_ERROR == i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) ) {
+ if ( I2C_MASTER_ERROR == i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) )
+ {
return I2C_MASTER_ERROR;
}
return I2C_MASTER_SUCCESS;
}
-void i2cextend2_rmt_write ( i2cextend2_t *ctx, uint8_t reg, uint8_t tx_data ) {
- uint8_t tx_buf[ 2 ];
+void i2cextend2_rmt_write ( i2cextend2_t *ctx, uint8_t reg, uint8_t tx_data )
+{
+ uint8_t tx_buf[ 2 ] = { 0 };
tx_buf[ 0 ] = reg;
tx_buf[ 1 ] = tx_data;
@@ -73,37 +79,42 @@ void i2cextend2_rmt_write ( i2cextend2_t *ctx, uint8_t reg, uint8_t tx_data ) {
i2c_master_write( &ctx->i2c, tx_buf, 2 );
}
-uint8_t i2cextend2_rmt_read ( i2cextend2_t *ctx, uint8_t reg ) {
- uint8_t rx_buf;
+uint8_t i2cextend2_rmt_read ( i2cextend2_t *ctx, uint8_t reg )
+{
+ uint8_t rx_buf = 0;
i2c_master_write_then_read( &ctx->i2c, ®, 1, &rx_buf, 1 );
return rx_buf;
}
-void i2cextend2_rmt_multi_write ( i2cextend2_t *ctx, uint8_t reg, uint8_t *p_tx_data, uint8_t n_bytes ) {
- uint8_t n_cnt;
- uint8_t tx_buf[ 255 ];
+void i2cextend2_rmt_multi_write ( i2cextend2_t *ctx, uint8_t reg, uint8_t *p_tx_data, uint8_t n_bytes )
+{
+ uint8_t tx_buf[ 256 ] = { 0 };
tx_buf[ 0 ] = reg;
- for ( n_cnt = 0; n_cnt < n_bytes; n_cnt++ ) {
+ for ( uint8_t n_cnt = 0; n_cnt < n_bytes; n_cnt++ )
+ {
tx_buf[ n_cnt + 1 ] = p_tx_data[ n_cnt ];
}
i2c_master_write( &ctx->i2c, tx_buf, n_bytes + 1 );
}
-void i2cextend2_rmt_multi_read ( i2cextend2_t *ctx, uint8_t reg, uint8_t *p_rx_data, uint8_t n_bytes ) {
- uint8_t reg;
-
+void i2cextend2_rmt_multi_read ( i2cextend2_t *ctx, uint8_t reg, uint8_t *p_rx_data, uint8_t n_bytes )
+{
i2c_master_write_then_read( &ctx->i2c, ®, 1, p_rx_data, n_bytes );
}
-void i2cextend2_enable ( i2cextend2_t *ctx, uint8_t en_extend ) {
- if ( en_extend == I2CEXTEND2_EXTEND_DISABLE ) {
+void i2cextend2_enable ( i2cextend2_t *ctx, uint8_t en_extend )
+{
+ if ( I2CEXTEND2_EXTEND_DISABLE == en_extend )
+ {
digital_out_low( &ctx->en );
- } else {
+ }
+ else
+ {
digital_out_high( &ctx->en );
}
}
diff --git a/clicks/i2cextend2/memake.txt b/clicks/i2cextend2/memake.txt
deleted file mode 100644
index 4d794086f3..0000000000
--- a/clicks/i2cextend2/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: I2CExtend2
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/i2cmux2/CHANGELOG.md b/clicks/i2cmux2/CHANGELOG.md
index 8a902bbfaf..b2ebfc1acd 100644
--- a/clicks/i2cmux2/CHANGELOG.md
+++ b/clicks/i2cmux2/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.4
+### Version 2.1.0.5
- Initial release
diff --git a/clicks/i2cmux2/CMakeLists.txt b/clicks/i2cmux2/CMakeLists.txt
new file mode 100644
index 0000000000..7df93f9dc3
--- /dev/null
+++ b/clicks/i2cmux2/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_i2cmux2 LANGUAGES MikroC)
+else()
+ project(example_i2cmux2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_i2cmux2
+ example/main.c
+
+)
+
+
+############################ example_i2cmux2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_i2cmux2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_i2cmux2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_i2cmux2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_i2cmux2)
+target_link_libraries(example_i2cmux2 PUBLIC Click.I2cMux2)
+############################ example_i2cmux2 GENERATED CODE END ###########################
diff --git a/clicks/i2cmux2/DETAILS.md b/clicks/i2cmux2/DETAILS.md
index c7aef06276..38a6321070 100644
--- a/clicks/i2cmux2/DETAILS.md
+++ b/clicks/i2cmux2/DETAILS.md
@@ -2,7 +2,7 @@
---
# I2C MUX 2 click
-I2C MUX 2 Click is a quad bidirectional translating I2C and SMBus switch with reset and interrupt functions, intended for applications with I2C slave address conflicts. It features a quad bidirectional translating switch controlled via the I2C bus, labeled as TCA9545A from Texas Instruments. Four interrupt inputs (INT3–INT0), one for each of the downstream pairs, are provided on click board. One interrupt (INT) output acts as an AND of the four interrupt inputs.
+> I2C MUX 2 Click is a quad bidirectional translating I2C and SMBus switch with reset and interrupt functions, intended for applications with I2C slave address conflicts. It features a quad bidirectional translating switch controlled via the I2C bus, labeled as TCA9545A from Texas Instruments. Four interrupt inputs (INT3–INT0), one for each of the downstream pairs, are provided on click board. One interrupt (INT) output acts as an AND of the four interrupt inputs.
@@ -35,22 +35,32 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void i2cmux2_cfg_setup ( i2cmux2_cfg_t *cfg );
-
-- Initialization function.
-> I2CMUX2_RETVAL i2cmux2_init ( i2cmux2_t *ctx, i2cmux2_cfg_t *cfg );
+- `i2cmux2_cfg_setup` Config Object Initialization function.
+```c
+void i2cmux2_cfg_setup ( i2cmux2_cfg_t *cfg );
+```
+
+- `i2cmux2_init` Initialization function.
+```c
+err_t i2cmux2_init ( i2cmux2_t *ctx, i2cmux2_cfg_t *cfg );
+```
#### Example key functions :
-- This function resets I2C MUX 2 click board by clearing the RST pin for 100ms.
-> void i2cmux2_hw_reset ( i2cmux2_t *ctx );
-
-- Function sets channel of the I2C MUX 2 click board.
-> void i2cmux2_set_channel ( i2cmux2_t *ctx, uint8_t channel, uint8_t ch_slave_address );
+- `i2cmux2_hw_reset` This function resets I2C MUX 2 click board by clearing the RST pin for 100ms.
+```c
+void i2cmux2_hw_reset ( i2cmux2_t *ctx );
+```
-- This function reads data from the desired register.
-> void i2cmux2_generic_read ( i2cmux2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
+- `i2cmux2_set_channel` Function sets channel of the I2C MUX 2 click board.
+```c
+void i2cmux2_set_channel ( i2cmux2_t *ctx, uint8_t channel, uint8_t ch_slave_address );
+```
+
+- `i2cmux2_generic_read` This function reads data from the desired register.
+```c
+void i2cmux2_generic_read ( i2cmux2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
+```
## Examples Description
@@ -83,7 +93,6 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
i2cmux2_cfg_setup( &cfg );
I2CMUX2_MAP_MIKROBUS( cfg, MIKROBUS_1 );
i2cmux2_init( &i2cmux2, &cfg );
@@ -117,29 +126,37 @@ void application_task ( void )
log_printf( &logger, " CH | ID | INT \r\n" );
log_printf( &logger, "----------------------\r\n" );
+#ifdef ENABLE_CHANNEL_0
// SET CHANNEL 0: 6DOF IMU 11 click
i2cmux2_set_channel( &i2cmux2, I2CMUX2_CMD_SET_CH_0, 0x0E );
Delay_ms( 100 );
i2cmux2_generic_read( &i2cmux2, 0x00, &rx_data, 1 );
display_log( I2CMUX2_CMD_SET_CH_0 );
+#endif
+#ifdef ENABLE_CHANNEL_1
// SET CHANNEL 1: Altitude click
i2cmux2_set_channel( &i2cmux2, I2CMUX2_CMD_SET_CH_1, 0x60 );
Delay_ms( 100 );
i2cmux2_generic_read( &i2cmux2, 0x0C, &rx_data, 1 );
display_log( I2CMUX2_CMD_SET_CH_1 );
+#endif
+#ifdef ENABLE_CHANNEL_2
// SET CHANNEL 2: 6DOF IMU 9 click
i2cmux2_set_channel( &i2cmux2, I2CMUX2_CMD_SET_CH_2, 0x69 );
Delay_ms( 100 );
i2cmux2_generic_read( &i2cmux2, 0x75, &rx_data, 1 );
display_log( I2CMUX2_CMD_SET_CH_2 );
+#endif
+#ifdef ENABLE_CHANNEL_3
// SET CHANNEL 3: Compass 3 click
i2cmux2_set_channel( &i2cmux2, I2CMUX2_CMD_SET_CH_3, 0x30 );
Delay_ms( 100 );
i2cmux2_generic_read( &i2cmux2, 0x2F, &rx_data, 1 );
display_log( I2CMUX2_CMD_SET_CH_3 );
+#endif
log_printf( &logger, "----------------------\r\n" );
Delay_ms( 2000 );
@@ -147,6 +164,10 @@ void application_task ( void )
```
+## Note
+
+> Disable all unconnected channels from the example using ENABLE_CHANNEL_x macros below to prevent the I2C bus from blocking waiting for a device response.
+
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
**Other mikroE Libraries used in the example:**
diff --git a/clicks/i2cmux2/README.md b/clicks/i2cmux2/README.md
index e9aadfb6ff..795d8b10b7 100644
--- a/clicks/i2cmux2/README.md
+++ b/clicks/i2cmux2/README.md
@@ -3,7 +3,7 @@
---
# I2C MUX 2 click
-I2C MUX 2 Click is a quad bidirectional translating I2C and SMBus switch with reset and interrupt functions, intended for applications with I2C slave address conflicts. It features a quad bidirectional translating switch controlled via the I2C bus, labeled as TCA9545A from Texas Instruments. Four interrupt inputs (INT3–INT0), one for each of the downstream pairs, are provided on click board. One interrupt (INT) output acts as an AND of the four interrupt inputs.
+> I2C MUX 2 Click is a quad bidirectional translating I2C and SMBus switch with reset and interrupt functions, intended for applications with I2C slave address conflicts. It features a quad bidirectional translating switch controlled via the I2C bus, labeled as TCA9545A from Texas Instruments. Four interrupt inputs (INT3–INT0), one for each of the downstream pairs, are provided on click board. One interrupt (INT) output acts as an AND of the four interrupt inputs.
@@ -36,22 +36,32 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void i2cmux2_cfg_setup ( i2cmux2_cfg_t *cfg );
-
-- Initialization function.
-> I2CMUX2_RETVAL i2cmux2_init ( i2cmux2_t *ctx, i2cmux2_cfg_t *cfg );
+- `i2cmux2_cfg_setup` Config Object Initialization function.
+```c
+void i2cmux2_cfg_setup ( i2cmux2_cfg_t *cfg );
+```
+
+- `i2cmux2_init` Initialization function.
+```c
+err_t i2cmux2_init ( i2cmux2_t *ctx, i2cmux2_cfg_t *cfg );
+```
#### Example key functions :
-- This function resets I2C MUX 2 click board by clearing the RST pin for 100ms.
-> void i2cmux2_hw_reset ( i2cmux2_t *ctx );
-
-- Function sets channel of the I2C MUX 2 click board.
-> void i2cmux2_set_channel ( i2cmux2_t *ctx, uint8_t channel, uint8_t ch_slave_address );
+- `i2cmux2_hw_reset` This function resets I2C MUX 2 click board by clearing the RST pin for 100ms.
+```c
+void i2cmux2_hw_reset ( i2cmux2_t *ctx );
+```
-- This function reads data from the desired register.
-> void i2cmux2_generic_read ( i2cmux2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
+- `i2cmux2_set_channel` Function sets channel of the I2C MUX 2 click board.
+```c
+void i2cmux2_set_channel ( i2cmux2_t *ctx, uint8_t channel, uint8_t ch_slave_address );
+```
+
+- `i2cmux2_generic_read` This function reads data from the desired register.
+```c
+void i2cmux2_generic_read ( i2cmux2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
+```
## Examples Description
@@ -84,7 +94,6 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
i2cmux2_cfg_setup( &cfg );
I2CMUX2_MAP_MIKROBUS( cfg, MIKROBUS_1 );
i2cmux2_init( &i2cmux2, &cfg );
@@ -118,29 +127,37 @@ void application_task ( void )
log_printf( &logger, " CH | ID | INT \r\n" );
log_printf( &logger, "----------------------\r\n" );
+#ifdef ENABLE_CHANNEL_0
// SET CHANNEL 0: 6DOF IMU 11 click
i2cmux2_set_channel( &i2cmux2, I2CMUX2_CMD_SET_CH_0, 0x0E );
Delay_ms( 100 );
i2cmux2_generic_read( &i2cmux2, 0x00, &rx_data, 1 );
display_log( I2CMUX2_CMD_SET_CH_0 );
+#endif
+#ifdef ENABLE_CHANNEL_1
// SET CHANNEL 1: Altitude click
i2cmux2_set_channel( &i2cmux2, I2CMUX2_CMD_SET_CH_1, 0x60 );
Delay_ms( 100 );
i2cmux2_generic_read( &i2cmux2, 0x0C, &rx_data, 1 );
display_log( I2CMUX2_CMD_SET_CH_1 );
+#endif
+#ifdef ENABLE_CHANNEL_2
// SET CHANNEL 2: 6DOF IMU 9 click
i2cmux2_set_channel( &i2cmux2, I2CMUX2_CMD_SET_CH_2, 0x69 );
Delay_ms( 100 );
i2cmux2_generic_read( &i2cmux2, 0x75, &rx_data, 1 );
display_log( I2CMUX2_CMD_SET_CH_2 );
+#endif
+#ifdef ENABLE_CHANNEL_3
// SET CHANNEL 3: Compass 3 click
i2cmux2_set_channel( &i2cmux2, I2CMUX2_CMD_SET_CH_3, 0x30 );
Delay_ms( 100 );
i2cmux2_generic_read( &i2cmux2, 0x2F, &rx_data, 1 );
display_log( I2CMUX2_CMD_SET_CH_3 );
+#endif
log_printf( &logger, "----------------------\r\n" );
Delay_ms( 2000 );
@@ -148,6 +165,10 @@ void application_task ( void )
```
+## Note
+
+> Disable all unconnected channels from the example using ENABLE_CHANNEL_x macros below to prevent the I2C bus from blocking waiting for a device response.
+
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
**Other mikroE Libraries used in the example:**
diff --git a/clicks/i2cmux2/doc/doxy/Doxyfile.doxy b/clicks/i2cmux2/doc/doxy/Doxyfile.doxy
index 4fcd00229e..0be82251f4 100644
--- a/clicks/i2cmux2/doc/doxy/Doxyfile.doxy
+++ b/clicks/i2cmux2/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/i2cmux2/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/i2cmux2/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/i2cmux2/example \
- ../clicks/i2cmux2/lib/include \
- ../clicks/i2cmux2/README.md
+INPUT = ../cmake/i2cmux2/example \
+ ../cmake/i2cmux2/lib_i2cmux2/include \
+ ../cmake/i2cmux2/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/i2cmux2/example
+EXAMPLE_PATH = ../cmake/i2cmux2/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/i2cmux2/doc/package/manifest.json b/clicks/i2cmux2/doc/package/manifest.json
index 96e7f964d3..2a6b67060a 100644
--- a/clicks/i2cmux2/doc/package/manifest.json
+++ b/clicks/i2cmux2/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "I2C",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Interface > I2C",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+ "dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "I2C MUX 2 click",
"example_list": [
@@ -26,15 +25,14 @@
"name": "mikroe.click.i2cmux2",
"product_link": "https://www.mikroe.com/i2c-mux-2-click",
"short_description": "I2C MUX 2 Click is a quad bidirectional translating I2C and SMBus switch with reset and interrupt functions, intended for applications with I2C slave address conflicts. It features a quad bidirectional translating switch controlled via the I2C bus, labeled as TCA9545A from Texas Instruments. Four interrupt inputs (INT3–INT0), one for each of the downstream pairs, are provided on click board. One interrupt (INT) output acts as an AND of the four interrupt inputs.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
"_type": "mikroSDK Library",
- "related_projects":[
+ "related_projects": [
3253
],
- "version": "2.0.0.4"
+ "version": "2.1.0.5",
+ "cmake": true,
+ "alias": "Click.I2cMux2",
+ "subdir_name": "lib_i2cmux2"
}
-
-
-
-
diff --git a/clicks/i2cmux2/example/CMakeLists.txt b/clicks/i2cmux2/example/CMakeLists.txt
new file mode 100644
index 0000000000..66d5b8cc25
--- /dev/null
+++ b/clicks/i2cmux2/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_i2cmux2 LANGUAGES MikroC)
+else()
+ project(example_i2cmux2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_i2cmux2
+ main.c
+
+)
+
+
+############################ example_i2cmux2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_i2cmux2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_i2cmux2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_i2cmux2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_i2cmux2)
+target_link_libraries(example_i2cmux2 PUBLIC Click.I2cMux2)
+############################ example_i2cmux2 GENERATED CODE END ###########################
diff --git a/clicks/i2cmux2/example/main.c b/clicks/i2cmux2/example/main.c
index e64fe61189..c70bce3834 100644
--- a/clicks/i2cmux2/example/main.c
+++ b/clicks/i2cmux2/example/main.c
@@ -18,6 +18,10 @@
* Channel 3 : Compass 3 click [slave address: 0x30; reg: 0x2F; id val.: 0x0C].
* All data logs write on USB UART changes every 2 sec.
*
+ * @note
+ * Disable all unconnected channels from the example using ENABLE_CHANNEL_x macros
+ * below to prevent the I2C bus from blocking waiting for a device response.
+ *
* \author MikroE Team
*
*/
@@ -29,6 +33,12 @@
// ------------------------------------------------------------------ VARIABLES
+// Comment out the following lines to exclude unconnected channels from the example
+#define ENABLE_CHANNEL_0
+#define ENABLE_CHANNEL_1
+#define ENABLE_CHANNEL_2
+#define ENABLE_CHANNEL_3
+
static i2cmux2_t i2cmux2;
static log_t logger;
static uint8_t rx_data;
@@ -102,7 +112,6 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
i2cmux2_cfg_setup( &cfg );
I2CMUX2_MAP_MIKROBUS( cfg, MIKROBUS_1 );
i2cmux2_init( &i2cmux2, &cfg );
@@ -123,29 +132,37 @@ void application_task ( void )
log_printf( &logger, " CH | ID | INT \r\n" );
log_printf( &logger, "----------------------\r\n" );
+#ifdef ENABLE_CHANNEL_0
// SET CHANNEL 0: 6DOF IMU 11 click
i2cmux2_set_channel( &i2cmux2, I2CMUX2_CMD_SET_CH_0, 0x0E );
Delay_ms( 100 );
i2cmux2_generic_read( &i2cmux2, 0x00, &rx_data, 1 );
display_log( I2CMUX2_CMD_SET_CH_0 );
+#endif
+#ifdef ENABLE_CHANNEL_1
// SET CHANNEL 1: Altitude click
i2cmux2_set_channel( &i2cmux2, I2CMUX2_CMD_SET_CH_1, 0x60 );
Delay_ms( 100 );
i2cmux2_generic_read( &i2cmux2, 0x0C, &rx_data, 1 );
display_log( I2CMUX2_CMD_SET_CH_1 );
+#endif
+#ifdef ENABLE_CHANNEL_2
// SET CHANNEL 2: 6DOF IMU 9 click
i2cmux2_set_channel( &i2cmux2, I2CMUX2_CMD_SET_CH_2, 0x69 );
Delay_ms( 100 );
i2cmux2_generic_read( &i2cmux2, 0x75, &rx_data, 1 );
display_log( I2CMUX2_CMD_SET_CH_2 );
+#endif
+#ifdef ENABLE_CHANNEL_3
// SET CHANNEL 3: Compass 3 click
i2cmux2_set_channel( &i2cmux2, I2CMUX2_CMD_SET_CH_3, 0x30 );
Delay_ms( 100 );
i2cmux2_generic_read( &i2cmux2, 0x2F, &rx_data, 1 );
display_log( I2CMUX2_CMD_SET_CH_3 );
+#endif
log_printf( &logger, "----------------------\r\n" );
Delay_ms( 2000 );
diff --git a/clicks/i2cmux2/example/manifest.exm b/clicks/i2cmux2/example/manifest.exm
index 318d114c27..a447c896f0 100644
--- a/clicks/i2cmux2/example/manifest.exm
+++ b/clicks/i2cmux2/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "I2C MUX 2 Click",
"description": "I2C MUX 2 Click is a quad bidirectional translating I2C and SMBus switch with reset and interrupt functions, intended for applications with I2C slave address conflicts. It features a quad bidirectional translating switch controlled via the I2C bus, labeled as TCA9545A from Texas Instruments. Four interrupt inputs (INT3–INT0), one for each of the downstream pairs, are provided on click board. One interrupt (INT) output acts as an AND of the four interrupt inputs.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","TCA9545A"],
"category" : ["I2C"]
}
diff --git a/clicks/i2cmux2/example/memake.txt b/clicks/i2cmux2/example/memake.txt
deleted file mode 100644
index c9f91a426b..0000000000
--- a/clicks/i2cmux2/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_i2cmux2
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.I2cMux2
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/i2cmux2/lib/memake.txt b/clicks/i2cmux2/lib/memake.txt
deleted file mode 100644
index ae2a53f102..0000000000
--- a/clicks/i2cmux2/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_i2cmux2
-
-alias: Click.I2cMux2
-
-sources: {
- src/i2cmux2.c
-}
-
-headers: {
- include/i2cmux2.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/i2cmux2.h) dst(include/i2cmux2.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/i2cmux2/lib_i2cmux2/CMakeLists.txt b/clicks/i2cmux2/lib_i2cmux2/CMakeLists.txt
new file mode 100644
index 0000000000..22adbf9495
--- /dev/null
+++ b/clicks/i2cmux2/lib_i2cmux2/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_i2cmux2 LANGUAGES MikroC)
+else()
+ project(lib_i2cmux2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_i2cmux2 STATIC
+ src/i2cmux2.c
+ include/i2cmux2.h
+)
+add_library(Click.I2cMux2 ALIAS lib_i2cmux2)
+
+
+
+target_include_directories(lib_i2cmux2 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_i2cmux2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_i2cmux2 PUBLIC MikroSDK.Driver)
diff --git a/clicks/i2cmux2/lib_i2cmux2/include/Click.I2cMux2 b/clicks/i2cmux2/lib_i2cmux2/include/Click.I2cMux2
new file mode 100644
index 0000000000..9f88a8c664
--- /dev/null
+++ b/clicks/i2cmux2/lib_i2cmux2/include/Click.I2cMux2
@@ -0,0 +1 @@
+#include "i2cmux2.h"
diff --git a/clicks/i2cmux2/lib/include/i2cmux2.h b/clicks/i2cmux2/lib_i2cmux2/include/i2cmux2.h
similarity index 69%
rename from clicks/i2cmux2/lib/include/i2cmux2.h
rename to clicks/i2cmux2/lib_i2cmux2/include/i2cmux2.h
index a3849d46e9..8e08db2e22 100644
--- a/clicks/i2cmux2/lib/include/i2cmux2.h
+++ b/clicks/i2cmux2/lib_i2cmux2/include/i2cmux2.h
@@ -61,42 +61,40 @@
* \defgroup error_code Error Code
* \{
*/
-#define I2CMUX2_RETVAL uint8_t
-
-#define I2CMUX2_OK 0x00
-#define I2CMUX2_INIT_ERROR 0xFF
+#define I2CMUX2_OK 0
+#define I2CMUX2_ERROR -1
/** \} */
// Device address
-#define I2CMUX2_I2C_SLAVE_ADDRESS_0 0x70
-#define I2CMUX2_I2C_SLAVE_ADDRESS_1 0x71
-#define I2CMUX2_I2C_SLAVE_ADDRESS_2 0x72
-#define I2CMUX2_I2C_SLAVE_ADDRESS_3 0x73
-#define I2CMUX2_I2C_SLAVE_ADDRESS_4 0x74
-#define I2CMUX2_I2C_SLAVE_ADDRESS_5 0x75
-#define I2CMUX2_I2C_SLAVE_ADDRESS_6 0x76
-#define I2CMUX2_I2C_SLAVE_ADDRESS_7 0x77
+#define I2CMUX2_I2C_SLAVE_ADDRESS_0 0x70
+#define I2CMUX2_I2C_SLAVE_ADDRESS_1 0x71
+#define I2CMUX2_I2C_SLAVE_ADDRESS_2 0x72
+#define I2CMUX2_I2C_SLAVE_ADDRESS_3 0x73
+#define I2CMUX2_I2C_SLAVE_ADDRESS_4 0x74
+#define I2CMUX2_I2C_SLAVE_ADDRESS_5 0x75
+#define I2CMUX2_I2C_SLAVE_ADDRESS_6 0x76
+#define I2CMUX2_I2C_SLAVE_ADDRESS_7 0x77
// Set channel
-#define I2CMUX2_CMD_NO_CH 0x00
-#define I2CMUX2_CMD_SET_CH_0 0x01
-#define I2CMUX2_CMD_SET_CH_1 0x02
-#define I2CMUX2_CMD_SET_CH_2 0x04
-#define I2CMUX2_CMD_SET_CH_3 0x08
+#define I2CMUX2_CMD_NO_CH 0x00
+#define I2CMUX2_CMD_SET_CH_0 0x01
+#define I2CMUX2_CMD_SET_CH_1 0x02
+#define I2CMUX2_CMD_SET_CH_2 0x04
+#define I2CMUX2_CMD_SET_CH_3 0x08
// Interrupt bit mask
-#define I2CMUX2_INT_BITS 0xF0
+#define I2CMUX2_INT_BITS 0xF0
// Interrupt of channel
-#define I2CMUX2_INT_NO_CH 0x00
-#define I2CMUX2_INT_CH_0 0x01
-#define I2CMUX2_INT_CH_1 0x02
-#define I2CMUX2_INT_CH_2 0x04
-#define I2CMUX2_INT_CH_3 0x08
+#define I2CMUX2_INT_NO_CH 0x00
+#define I2CMUX2_INT_CH_0 0x01
+#define I2CMUX2_INT_CH_1 0x02
+#define I2CMUX2_INT_CH_2 0x04
+#define I2CMUX2_INT_CH_3 0x08
// Interrupt pin state
-#define I2CMUX2_INT_PIN_STATE_ACTIVE 0x00
-#define I2CMUX2_INT_PIN_STATE_NOT_ACTIVE 0x01
+#define I2CMUX2_INT_PIN_STATE_ACTIVE 0x00
+#define I2CMUX2_INT_PIN_STATE_NOT_ACTIVE 0x01
/** \} */ // End group macro
// --------------------------------------------------------------- PUBLIC TYPES
@@ -111,19 +109,15 @@
typedef struct
{
// Output pins
-
digital_out_t rst;
// Input pins
-
digital_in_t int_pin;
// Modules
-
i2c_master_t i2c;
// ctx variable
-
uint8_t slave_address;
} i2cmux2_t;
@@ -134,17 +128,14 @@ typedef struct
typedef struct
{
// Communication gpio pins
-
pin_name_t scl;
pin_name_t sda;
// Additional gpio pins
-
pin_name_t rst;
pin_name_t int_pin;
// static variable
-
uint32_t i2c_speed;
uint8_t i2c_address;
@@ -167,7 +158,7 @@ extern "C"{
*
* @param cfg Click configuration structure.
*
- * @description This function initializes click configuration structure to init state.
+ * @details This function initializes click configuration structure to init state.
* @note All used pins will be set to unconnected state.
*/
void i2cmux2_cfg_setup ( i2cmux2_cfg_t *cfg );
@@ -178,9 +169,9 @@ void i2cmux2_cfg_setup ( i2cmux2_cfg_t *cfg );
* @param ctx Click object.
* @param cfg Click configuration structure.
*
- * @description This function initializes all necessary pins and peripherals used for this click.
+ * @details This function initializes all necessary pins and peripherals used for this click.
*/
-I2CMUX2_RETVAL i2cmux2_init ( i2cmux2_t *ctx, i2cmux2_cfg_t *cfg );
+err_t i2cmux2_init ( i2cmux2_t *ctx, i2cmux2_cfg_t *cfg );
/**
* @brief Generic write function.
@@ -190,7 +181,7 @@ I2CMUX2_RETVAL i2cmux2_init ( i2cmux2_t *ctx, i2cmux2_cfg_t *cfg );
* @param data_buf Data buf to be written.
* @param len Number of the bytes in data buf.
*
- * @description This function writes data to the desired register.
+ * @details This function writes data to the desired register.
*/
void i2cmux2_generic_write ( i2cmux2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
@@ -203,7 +194,7 @@ void i2cmux2_generic_write ( i2cmux2_t *ctx, uint8_t reg, uint8_t *data_buf, uin
* @param data_buf Output data buf
* @param len Number of the bytes to be read
*
- * @description This function reads data from the desired register.
+ * @details This function reads data from the desired register.
*/
void i2cmux2_generic_read ( i2cmux2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
@@ -212,7 +203,7 @@ void i2cmux2_generic_read ( i2cmux2_t *ctx, uint8_t reg, uint8_t *data_buf, uint
*
* @param ctx Click object.
*
- * @description This function resets I2C MUX 2 click board
+ * @details This function resets I2C MUX 2 click board
* by clearing the RST pin for 100ms.
*/
void i2cmux2_hw_reset ( i2cmux2_t *ctx );
@@ -223,7 +214,7 @@ void i2cmux2_hw_reset ( i2cmux2_t *ctx );
* @param ctx Click object.
* @param tx_data 8-bit data to be transmitted.
*
- * @description Function executes writes command to the TCA9545A
+ * @details Function executes writes command to the TCA9545A
* Low Voltage 4-Channel I2C on the I2C MUX 2 click board.
*/
void i2cmux2_write_cmd ( i2cmux2_t *ctx, uint8_t tx_data );
@@ -236,7 +227,7 @@ void i2cmux2_write_cmd ( i2cmux2_t *ctx, uint8_t tx_data );
* @return
* 8-bit read data.
*
- * @description Function executes read command from the TCA9545A
+ * @details Function executes read command from the TCA9545A
* Low Voltage 4-Channel I2C on the I2C MUX 2 click board.
*/
uint8_t i2cmux2_read_cmd ( i2cmux2_t *ctx );
@@ -249,7 +240,7 @@ uint8_t i2cmux2_read_cmd ( i2cmux2_t *ctx );
*
* @param ch_slave_address pointer to the data to be written.
*
- * @description Function sets channel of the I2C MUX 2 click board.
+ * @details Function sets channel of the I2C MUX 2 click board.
*/
void i2cmux2_set_channel ( i2cmux2_t *ctx, uint8_t channel, uint8_t ch_slave_address );
@@ -265,7 +256,7 @@ void i2cmux2_set_channel ( i2cmux2_t *ctx, uint8_t channel, uint8_t ch_slave_add
* - [ bit 2 ] : Interrupt on channel 2;
* - [ bit 3 ] : Interrupt on channel 3;
*
- * @description Function get interrupt status by reading from the TCA9545A
+ * @details Function get interrupt status by reading from the TCA9545A
* Low Voltage 4-Channel I2C on the I2C MUX 2 click board.
*/
uint8_t i2cmux2_read_interrupt ( i2cmux2_t *ctx );
@@ -280,7 +271,7 @@ uint8_t i2cmux2_read_interrupt ( i2cmux2_t *ctx );
* - 0 : Active;
* - 1 : Not active;
*
- * @description Function check interrupt state by returning the state
+ * @details Function check interrupt state by returning the state
* of the INT pin of I2C MUX 2 click board.
*/
uint8_t i2cmux2_check_int ( i2cmux2_t *ctx );
diff --git a/clicks/i2cmux2/lib/src/i2cmux2.c b/clicks/i2cmux2/lib_i2cmux2/src/i2cmux2.c
similarity index 87%
rename from clicks/i2cmux2/lib/src/i2cmux2.c
rename to clicks/i2cmux2/lib_i2cmux2/src/i2cmux2.c
index 2516962d97..7c3d98fdc8 100644
--- a/clicks/i2cmux2/lib/src/i2cmux2.c
+++ b/clicks/i2cmux2/lib_i2cmux2/src/i2cmux2.c
@@ -42,12 +42,10 @@ void dev_reset_delay ( void );
void i2cmux2_cfg_setup ( i2cmux2_cfg_t *cfg )
{
// Communication gpio pins
-
cfg->scl = HAL_PIN_NC;
cfg->sda = HAL_PIN_NC;
// Additional gpio pins
-
cfg->rst = HAL_PIN_NC;
cfg->int_pin = HAL_PIN_NC;
@@ -55,7 +53,7 @@ void i2cmux2_cfg_setup ( i2cmux2_cfg_t *cfg )
cfg->i2c_address = I2CMUX2_I2C_SLAVE_ADDRESS_0;
}
-I2CMUX2_RETVAL i2cmux2_init ( i2cmux2_t *ctx, i2cmux2_cfg_t *cfg )
+err_t i2cmux2_init ( i2cmux2_t *ctx, i2cmux2_cfg_t *cfg )
{
i2c_master_config_t i2c_cfg;
@@ -66,9 +64,9 @@ I2CMUX2_RETVAL i2cmux2_init ( i2cmux2_t *ctx, i2cmux2_cfg_t *cfg )
ctx->slave_address = cfg->i2c_address;
- if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR )
+ if ( I2C_MASTER_ERROR == i2c_master_open( &ctx->i2c, &i2c_cfg ) )
{
- return I2CMUX2_INIT_ERROR;
+ return I2CMUX2_ERROR;
}
i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address );
@@ -76,11 +74,9 @@ I2CMUX2_RETVAL i2cmux2_init ( i2cmux2_t *ctx, i2cmux2_cfg_t *cfg )
i2c_master_set_timeout( &ctx->i2c, 0 );
// Output pins
-
digital_out_init( &ctx->rst, cfg->rst );
// Input pins
-
digital_in_init( &ctx->int_pin, cfg->int_pin );
digital_out_high( &ctx->rst );
@@ -90,14 +86,13 @@ I2CMUX2_RETVAL i2cmux2_init ( i2cmux2_t *ctx, i2cmux2_cfg_t *cfg )
void i2cmux2_generic_write ( i2cmux2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len )
{
- uint8_t tx_buf[ 256 ];
- uint8_t cnt;
+ uint8_t tx_buf[ 256 ] = { 0 };
tx_buf[ 0 ] = reg;
- for ( cnt = 1; cnt <= len; cnt++ )
+ for ( uint8_t cnt = 0; cnt < len; cnt++ )
{
- tx_buf[ cnt ] = data_buf[ cnt - 1 ];
+ tx_buf[ cnt + 1 ] = data_buf[ cnt ];
}
i2c_master_set_slave_address( &ctx->i2c, ch_slave_addr );
@@ -115,31 +110,27 @@ void i2cmux2_generic_read ( i2cmux2_t *ctx, uint8_t reg, uint8_t *data_buf, uint
void i2cmux2_hw_reset ( i2cmux2_t *ctx )
{
digital_out_low( &ctx->rst );
- dev_reset_delay( void );
+ dev_reset_delay( );
digital_out_high( &ctx->rst );
- dev_reset_delay( void );
+ dev_reset_delay( );
}
void i2cmux2_write_cmd ( i2cmux2_t *ctx, uint8_t tx_data )
{
- uint8_t tx_buf[ 1 ];
-
- tx_buf[ 0 ] = tx_data;
-
i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address );
- i2c_master_write( &ctx->i2c, tx_buf, 1 );
+ i2c_master_write( &ctx->i2c, &tx_data, 1 );
}
uint8_t i2cmux2_read_cmd ( i2cmux2_t *ctx )
{
- uint8_t rx_buf[ 1 ];
+ uint8_t rx_data = 0;
i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address );
- i2c_master_read( &ctx->i2c, rx_buf, 1 );
+ i2c_master_read( &ctx->i2c, &rx_data, 1 );
- return rx_buf[ 0 ];
+ return rx_data;
}
void i2cmux2_set_channel ( i2cmux2_t *ctx, uint8_t channel, uint8_t ch_slave_address )
@@ -151,7 +142,7 @@ void i2cmux2_set_channel ( i2cmux2_t *ctx, uint8_t channel, uint8_t ch_slave_add
uint8_t i2cmux2_read_interrupt ( i2cmux2_t *ctx )
{
- uint8_t ch_int;
+ uint8_t ch_int = 0;
ch_int = i2cmux2_read_cmd( ctx );
diff --git a/clicks/i2cmux2/memake.txt b/clicks/i2cmux2/memake.txt
deleted file mode 100644
index 4891c63e49..0000000000
--- a/clicks/i2cmux2/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: I2cMux2
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/i2cmux6/CMakeLists.txt b/clicks/i2cmux6/CMakeLists.txt
new file mode 100644
index 0000000000..79eb41693d
--- /dev/null
+++ b/clicks/i2cmux6/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_i2cmux6 LANGUAGES MikroC)
+else()
+ project(example_i2cmux6 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_i2cmux6
+ example/main.c
+
+)
+
+
+############################ example_i2cmux6 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_i2cmux6 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_i2cmux6 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_i2cmux6 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_i2cmux6)
+target_link_libraries(example_i2cmux6 PUBLIC Click.I2CMUX6)
+############################ example_i2cmux6 GENERATED CODE END ###########################
diff --git a/clicks/i2cmux6/changelog.md b/clicks/i2cmux6/changelog.md
index fb1dd95ea8..086189320b 100644
--- a/clicks/i2cmux6/changelog.md
+++ b/clicks/i2cmux6/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.1
+### Version 2.1.0.1
- Initial release
diff --git a/clicks/i2cmux6/doc/doxy/Doxyfile.doxy b/clicks/i2cmux6/doc/doxy/Doxyfile.doxy
index db46319a19..d226a6d6bf 100644
--- a/clicks/i2cmux6/doc/doxy/Doxyfile.doxy
+++ b/clicks/i2cmux6/doc/doxy/Doxyfile.doxy
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY = ../clicks/i2cmux6/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/i2cmux6/temp/Help/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
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/i2cmux6/example \
- ../clicks/i2cmux6/lib/include \
- ../clicks/i2cmux6/README.md
+INPUT = ../cmake/i2cmux6/example \
+ ../cmake/i2cmux6/lib_i2cmux6/include \
+ ../cmake/i2cmux6/README.md
# 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
@@ -910,7 +910,7 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include
# command).
-EXAMPLE_PATH = ../clicks/i2cmux6/example
+EXAMPLE_PATH = ../cmake/i2cmux6/example
# 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
diff --git a/clicks/i2cmux6/doc/package/manifest.json b/clicks/i2cmux6/doc/package/manifest.json
index ba2763443c..ecfff89d02 100644
--- a/clicks/i2cmux6/doc/package/manifest.json
+++ b/clicks/i2cmux6/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "I2C",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Interface > I2C",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "I2C MUX 6 click",
"example_list": [
@@ -26,9 +25,11 @@
"name": "mikroe.click.i2cmux6",
"product_link": "https://www.mikroe.com/i2c-mux-6-click",
"short_description": "I2C MUX 6 Click is a compact add-on board representing a bidirectional selector dedicated to I2C slave address conflicts applications. This board features the PCA9518, an expandable five-channel bidirectional buffer controlled by the I2C-bus from Texas Instruments. The PCA9518 overcomes the restriction of maximum bus capacitance by separating and buffering the I2C data (SDA) and clock (SCL) lines into multiple groups of 400pF I2C channels. It provides activation of the desired channel via a given Enable pin and permits extension of the I2C-bus, through an onboard expansion header, by buffering both the data (SDA) and the clock (SCL) lines enabling virtually an unlimited number of buses of 400pF.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.1"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.1",
+ "cmake": true,
+ "alias": "Click.I2CMUX6",
+ "subdir_name": "lib_i2cmux6"
}
-
diff --git a/clicks/i2cmux6/example/CMakeLists.txt b/clicks/i2cmux6/example/CMakeLists.txt
new file mode 100644
index 0000000000..dd47732bb7
--- /dev/null
+++ b/clicks/i2cmux6/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_i2cmux6 LANGUAGES MikroC)
+else()
+ project(example_i2cmux6 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_i2cmux6
+ main.c
+
+)
+
+
+############################ example_i2cmux6 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_i2cmux6 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_i2cmux6 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_i2cmux6 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_i2cmux6)
+target_link_libraries(example_i2cmux6 PUBLIC Click.I2CMUX6)
+############################ example_i2cmux6 GENERATED CODE END ###########################
diff --git a/clicks/i2cmux6/example/manifest.exm b/clicks/i2cmux6/example/manifest.exm
index 1956d5fd72..c703c7a2b7 100644
--- a/clicks/i2cmux6/example/manifest.exm
+++ b/clicks/i2cmux6/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "I2C MUX 6 Click",
"description": "I2C MUX 6 Click is a compact add-on board representing a bidirectional selector dedicated to I2C slave address conflicts applications. This board features the PCA9518, an expandable five-channel bidirectional buffer controlled by the I2C-bus from Texas Instruments. The PCA9518 overcomes the restriction of maximum bus capacitance by separating and buffering the I2C data (SDA) and clock (SCL) lines into multiple groups of 400pF I2C channels. It provides activation of the desired channel via a given Enable pin and permits extension of the I2C-bus, through an onboard expansion header, by buffering both the data (SDA) and the clock (SCL) lines enabling virtually an unlimited number of buses of 400pF.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","PCA9518PWR"],
"category" : ["I2C"]
}
diff --git a/clicks/i2cmux6/example/memake.txt b/clicks/i2cmux6/example/memake.txt
deleted file mode 100644
index 668563903a..0000000000
--- a/clicks/i2cmux6/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_i2cmux6
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.I2CMUX6
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/i2cmux6/lib/memake.txt b/clicks/i2cmux6/lib/memake.txt
deleted file mode 100644
index 2ea0e66626..0000000000
--- a/clicks/i2cmux6/lib/memake.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-type: library
-
-target: lib_i2cmux6
-
-sources: {
- src/i2cmux6.c
-}
-
-headers: {
- include/i2cmux6.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/i2cmux6.h) dst(include/i2cmux6.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.I2CMUX6
diff --git a/clicks/i2cmux6/lib_i2cmux6/CMakeLists.txt b/clicks/i2cmux6/lib_i2cmux6/CMakeLists.txt
new file mode 100644
index 0000000000..73d362d90c
--- /dev/null
+++ b/clicks/i2cmux6/lib_i2cmux6/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_i2cmux6 LANGUAGES MikroC)
+else()
+ project(lib_i2cmux6 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_i2cmux6 STATIC
+ src/i2cmux6.c
+ include/i2cmux6.h
+)
+add_library(Click.I2CMUX6 ALIAS lib_i2cmux6)
+
+
+
+target_include_directories(lib_i2cmux6 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_i2cmux6 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_i2cmux6 PUBLIC MikroSDK.Driver)
diff --git a/clicks/i2cmux6/lib_i2cmux6/include/Click.I2CMUX6 b/clicks/i2cmux6/lib_i2cmux6/include/Click.I2CMUX6
new file mode 100644
index 0000000000..17eff27650
--- /dev/null
+++ b/clicks/i2cmux6/lib_i2cmux6/include/Click.I2CMUX6
@@ -0,0 +1 @@
+#include "i2cmux6.h"
diff --git a/clicks/i2cmux6/lib/include/i2cmux6.h b/clicks/i2cmux6/lib_i2cmux6/include/i2cmux6.h
similarity index 100%
rename from clicks/i2cmux6/lib/include/i2cmux6.h
rename to clicks/i2cmux6/lib_i2cmux6/include/i2cmux6.h
diff --git a/clicks/i2cmux6/lib/src/i2cmux6.c b/clicks/i2cmux6/lib_i2cmux6/src/i2cmux6.c
similarity index 100%
rename from clicks/i2cmux6/lib/src/i2cmux6.c
rename to clicks/i2cmux6/lib_i2cmux6/src/i2cmux6.c
diff --git a/clicks/i2cmux6/memake.txt b/clicks/i2cmux6/memake.txt
deleted file mode 100644
index 5dd6702c97..0000000000
--- a/clicks/i2cmux6/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: I2CMUX6
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/illuminance/CHANGELOG.md b/clicks/illuminance/CHANGELOG.md
index 4edeeb3aab..283ee8b874 100644
--- a/clicks/illuminance/CHANGELOG.md
+++ b/clicks/illuminance/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.6
+### Version 2.1.0.0
- Initial release
diff --git a/clicks/illuminance/CMakeLists.txt b/clicks/illuminance/CMakeLists.txt
new file mode 100644
index 0000000000..1a00191ed9
--- /dev/null
+++ b/clicks/illuminance/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_illuminance LANGUAGES MikroC)
+else()
+ project(example_illuminance LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_illuminance
+ example/main.c
+
+)
+
+
+############################ example_illuminance GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_illuminance PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_illuminance PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_illuminance PUBLIC MikroSDK.Log)
+add_subdirectory(lib_illuminance)
+target_link_libraries(example_illuminance PUBLIC Click.Illuminance)
+############################ example_illuminance GENERATED CODE END ###########################
diff --git a/clicks/illuminance/DETAILS.md b/clicks/illuminance/DETAILS.md
index 71740992a6..0324a10635 100644
--- a/clicks/illuminance/DETAILS.md
+++ b/clicks/illuminance/DETAILS.md
@@ -1,35 +1,33 @@
-
---
# Illuminance click
-Illuminance click carries a TSL2561 light-to-digital converter with a sensor that’s designed to mimic the way humans perceive light.
+> Illuminance Click is a compact add-on board that mimics how humans perceive light. This board features ams AG’s TSL2583, a very-high sensitivity light-to-digital converter that transforms light intensity to a digital signal output capable of the direct I2C interface. It combines one broadband photodiode (visible plus infrared) and one infrared-responding photodiode on a single CMOS integrated circuit capable of providing a near-photopic response over an effective 16-bit dynamic range (16-bit resolution).
-
[click Product page](https://www.mikroe.com/illuminance-click)
---
-#### Click library
+#### Click library
-- **Author** : MikroE Team
-- **Date** : Dec 2019.
+- **Author** : Stefan Filipovic
+- **Date** : Jun 2023.
- **Type** : I2C type
# Software Support
-We provide a library for the Illuminance Click
-as well as a demo application (example), developed using MikroElektronika
-[compilers](https://shop.mikroe.com/compilers).
-The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
+We provide a library for the Illuminance Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
-Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
## Library Description
@@ -37,44 +35,54 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void illuminance_cfg_setup ( illuminance_cfg_t *cfg );
-
-- Initialization function.
-> ILLUMINANCE_RETVAL illuminance_init ( illuminance_t *ctx, illuminance_cfg_t *cfg );
+- `illuminance_cfg_setup` Config Object Initialization function.
+```c
+void illuminance_cfg_setup ( illuminance_cfg_t *cfg );
+```
-- Click Default Configuration function.
-> void illuminance_default_cfg ( illuminance_t *ctx );
+- `illuminance_init` Initialization function.
+```c
+err_t illuminance_init ( illuminance_t *ctx, illuminance_cfg_t *cfg );
+```
+- `illuminance_default_cfg` Click Default Configuration function.
+```c
+err_t illuminance_default_cfg ( illuminance_t *ctx );
+```
#### Example key functions :
-- This function gets Visible & Infrared value.
-> void illuminance_get_result( illuminance_t *ctx, uint16_t *value_ch0, uint16_t *value_ch1 );
+- `illuminance_set_atime` This function sets the timing register for the selected integration time.
+```c
+err_t illuminance_set_atime ( illuminance_t *ctx, float atime_ms );
+```
-
-- This function calculates lux value from the TSL2561 sensor.
-> uint16_t illuminance_calculate_lux( uint16_t value_gain, uint16_t value_int,
-> uint16_t ch0, uint16_t ch1 );
+- `illuminance_set_gain` This function sets the gain level.
+```c
+err_t illuminance_set_gain ( illuminance_t *ctx, uint8_t gain );
+```
+- `illuminance_read_raw_data` This function checks if the data is ready and then reads the raw ADC data from two channels.
+```c
+err_t illuminance_read_raw_data ( illuminance_t *ctx, uint16_t *ch_0, uint16_t *ch_1 );
+```
-## Examples Description
+## Example Description
-This example demonstrates basic Illuminance Click functionality - calculates
-illuminance measured by sensor and logs results to UART Terminal.
+> This example demonstrates the use of Illuminance click board by reading and displaying the RAW channels data measurements.
**The demo application is composed of two sections :**
-### Application Init
+### Application Init
-Device and driver initialization.
+> Initializes the driver and performs the click default configuration.
```c
void application_init ( void )
{
- log_cfg_t log_cfg;
- illuminance_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ illuminance_cfg_t illuminance_cfg; /**< Click config object. */
/**
* Logger initialization.
@@ -87,57 +95,55 @@ void application_init ( void )
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- // Click initialization.
+ log_info( &logger, " Application Init " );
- illuminance_cfg_setup( &cfg );
- ILLUMINANCE_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- illuminance_init( &illuminance, &cfg );
- illuminance_default_cfg ( &illuminance );
-
- // Variable Initialization for this example.
+ // Click initialization.
+ illuminance_cfg_setup( &illuminance_cfg );
+ ILLUMINANCE_MAP_MIKROBUS( illuminance_cfg, MIKROBUS_1 );
+ if ( I2C_MASTER_ERROR == illuminance_init( &illuminance, &illuminance_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
+ if ( ILLUMINANCE_ERROR == illuminance_default_cfg ( &illuminance ) )
+ {
+ log_error( &logger, " Default configuration." );
+ for ( ; ; );
+ }
- lux_value_old = 0;
- sensitivity = 50;
+ log_info( &logger, " Application Task " );
}
-
+
```
### Application Task
-> Every second calculate illuminance and logs result to the terminal.
+> Waits for the data ready interrupt, then reads the RAW channels data measurements
+and displays the results on the USB UART. By default, the data ready interrupt triggers
+upon every ADC cycle which will be performed every 200ms.
```c
void application_task ( void )
{
- illuminance_get_result( &illuminance, &value_ch0, &value_ch1 );
-
- lux_value = illuminance_calculate_lux( ILLUMINANCE_TSL2561_GAIN_0X, ILLUMINANCE_TSL2561_INTEGRATIONTIME_402MS , value_ch0, value_ch1 );
- Delay_ms( 1000 );
-
- if ( ( ( lux_value - lux_value_old ) > sensitivity ) && ( ( lux_value_old - lux_value ) > sensitivity ) )
+ if ( !illuminance_get_int_pin ( &illuminance ) )
{
- log_printf( &logger, "\r\n--------------------------------" );
- log_printf( &logger, "\r\nFull Spectrum: %u [ lux ]", lux_value );
- log_printf( &logger, "\r\nVisible Value: %u [ lux ]", value_ch0 - value_ch1 );
- log_printf( &logger, "\r\nInfrared Value: %u [ lux ]", value_ch1 );
- log_printf( &logger, "\r\n--------------------------------\r\n" );
-
- lux_value_old = lux_value;
+ uint16_t ch0 = 0;
+ uint16_t ch1 = 0;
+ if ( ILLUMINANCE_OK == illuminance_read_raw_data ( &illuminance, &ch0, &ch1 ) )
+ {
+ log_printf ( &logger, " CH0: %u\r\n", ch0 );
+ log_printf ( &logger, " CH1: %u\r\n\n", ch1 );
+ }
}
}
-```
-
-## Note
-By default, integration time is set to 402ms but it may be modified
-by user using illuminance_write_data() function and provided macros.
+```
-The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
-**Other mikroE Libraries used in the example:**
+**Other Mikroe Libraries used in the example:**
- MikroSDK.Board
- MikroSDK.Log
@@ -145,15 +151,12 @@ The full application code, and ready to use projects can be installed directly
**Additional notes and informations**
-Depending on the development board you are using, you may need
-[USB UART click](https://shop.mikroe.com/usb-uart-click),
-[USB UART 2 Click](https://shop.mikroe.com/usb-uart-2-click) or
-[RS232 Click](https://shop.mikroe.com/rs232-click) to connect to your PC, for
-development systems with no UART to USB interface available on the board. The
-terminal available in all Mikroelektronika
-[compilers](https://shop.mikroe.com/compilers), or any other terminal application
-of your choice, can be used to read the message.
-
-
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
---
diff --git a/clicks/illuminance/README.md b/clicks/illuminance/README.md
index 92b6b35411..6993b29c42 100644
--- a/clicks/illuminance/README.md
+++ b/clicks/illuminance/README.md
@@ -1,37 +1,34 @@
\mainpage Main Page
-
-
---
# Illuminance click
-Illuminance click carries a TSL2561 light-to-digital converter with a sensor that’s designed to mimic the way humans perceive light.
+> Illuminance Click is a compact add-on board that mimics how humans perceive light. This board features ams AG’s TSL2583, a very-high sensitivity light-to-digital converter that transforms light intensity to a digital signal output capable of the direct I2C interface. It combines one broadband photodiode (visible plus infrared) and one infrared-responding photodiode on a single CMOS integrated circuit capable of providing a near-photopic response over an effective 16-bit dynamic range (16-bit resolution).
-
[click Product page](https://www.mikroe.com/illuminance-click)
---
-#### Click library
+#### Click library
-- **Author** : MikroE Team
-- **Date** : Dec 2019.
+- **Author** : Stefan Filipovic
+- **Date** : Jun 2023.
- **Type** : I2C type
# Software Support
-We provide a library for the Illuminance Click
-as well as a demo application (example), developed using MikroElektronika
-[compilers](https://shop.mikroe.com/compilers).
-The demo can run on all the main MikroElektronika [development boards](https://shop.mikroe.com/development-boards).
+We provide a library for the Illuminance Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
-Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
## Library Description
@@ -39,44 +36,54 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void illuminance_cfg_setup ( illuminance_cfg_t *cfg );
-
-- Initialization function.
-> ILLUMINANCE_RETVAL illuminance_init ( illuminance_t *ctx, illuminance_cfg_t *cfg );
+- `illuminance_cfg_setup` Config Object Initialization function.
+```c
+void illuminance_cfg_setup ( illuminance_cfg_t *cfg );
+```
-- Click Default Configuration function.
-> void illuminance_default_cfg ( illuminance_t *ctx );
+- `illuminance_init` Initialization function.
+```c
+err_t illuminance_init ( illuminance_t *ctx, illuminance_cfg_t *cfg );
+```
+- `illuminance_default_cfg` Click Default Configuration function.
+```c
+err_t illuminance_default_cfg ( illuminance_t *ctx );
+```
#### Example key functions :
-- This function gets Visible & Infrared value.
-> void illuminance_get_result( illuminance_t *ctx, uint16_t *value_ch0, uint16_t *value_ch1 );
+- `illuminance_set_atime` This function sets the timing register for the selected integration time.
+```c
+err_t illuminance_set_atime ( illuminance_t *ctx, float atime_ms );
+```
-
-- This function calculates lux value from the TSL2561 sensor.
-> uint16_t illuminance_calculate_lux( uint16_t value_gain, uint16_t value_int,
-> uint16_t ch0, uint16_t ch1 );
+- `illuminance_set_gain` This function sets the gain level.
+```c
+err_t illuminance_set_gain ( illuminance_t *ctx, uint8_t gain );
+```
+- `illuminance_read_raw_data` This function checks if the data is ready and then reads the raw ADC data from two channels.
+```c
+err_t illuminance_read_raw_data ( illuminance_t *ctx, uint16_t *ch_0, uint16_t *ch_1 );
+```
-## Examples Description
+## Example Description
-This example demonstrates basic Illuminance Click functionality - calculates
-illuminance measured by sensor and logs results to UART Terminal.
+> This example demonstrates the use of Illuminance click board by reading and displaying the RAW channels data measurements.
**The demo application is composed of two sections :**
-### Application Init
+### Application Init
-Device and driver initialization.
+> Initializes the driver and performs the click default configuration.
```c
void application_init ( void )
{
- log_cfg_t log_cfg;
- illuminance_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ illuminance_cfg_t illuminance_cfg; /**< Click config object. */
/**
* Logger initialization.
@@ -89,57 +96,55 @@ void application_init ( void )
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- // Click initialization.
-
- illuminance_cfg_setup( &cfg );
- ILLUMINANCE_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- illuminance_init( &illuminance, &cfg );
- illuminance_default_cfg ( &illuminance );
+ log_info( &logger, " Application Init " );
- // Variable Initialization for this example.
+ // Click initialization.
+ illuminance_cfg_setup( &illuminance_cfg );
+ ILLUMINANCE_MAP_MIKROBUS( illuminance_cfg, MIKROBUS_1 );
+ if ( I2C_MASTER_ERROR == illuminance_init( &illuminance, &illuminance_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
- lux_value_old = 0;
- sensitivity = 50;
+ if ( ILLUMINANCE_ERROR == illuminance_default_cfg ( &illuminance ) )
+ {
+ log_error( &logger, " Default configuration." );
+ for ( ; ; );
+ }
+
+ log_info( &logger, " Application Task " );
}
-
+
```
### Application Task
-> Every second calculate illuminance and logs result to the terminal.
+> Waits for the data ready interrupt, then reads the RAW channels data measurements
+and displays the results on the USB UART. By default, the data ready interrupt triggers
+upon every ADC cycle which will be performed every 200ms.
```c
void application_task ( void )
{
- illuminance_get_result( &illuminance, &value_ch0, &value_ch1 );
-
- lux_value = illuminance_calculate_lux( ILLUMINANCE_TSL2561_GAIN_0X, ILLUMINANCE_TSL2561_INTEGRATIONTIME_402MS , value_ch0, value_ch1 );
- Delay_ms( 1000 );
-
- if ( ( ( lux_value - lux_value_old ) > sensitivity ) && ( ( lux_value_old - lux_value ) > sensitivity ) )
+ if ( !illuminance_get_int_pin ( &illuminance ) )
{
- log_printf( &logger, "\r\n--------------------------------" );
- log_printf( &logger, "\r\nFull Spectrum: %u [ lux ]", lux_value );
- log_printf( &logger, "\r\nVisible Value: %u [ lux ]", value_ch0 - value_ch1 );
- log_printf( &logger, "\r\nInfrared Value: %u [ lux ]", value_ch1 );
- log_printf( &logger, "\r\n--------------------------------\r\n" );
-
- lux_value_old = lux_value;
+ uint16_t ch0 = 0;
+ uint16_t ch1 = 0;
+ if ( ILLUMINANCE_OK == illuminance_read_raw_data ( &illuminance, &ch0, &ch1 ) )
+ {
+ log_printf ( &logger, " CH0: %u\r\n", ch0 );
+ log_printf ( &logger, " CH1: %u\r\n\n", ch1 );
+ }
}
}
-```
-
-## Note
-By default, integration time is set to 402ms but it may be modified
-by user using illuminance_write_data() function and provided macros.
+```
-The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
-**Other mikroE Libraries used in the example:**
+**Other Mikroe Libraries used in the example:**
- MikroSDK.Board
- MikroSDK.Log
@@ -147,15 +152,12 @@ The full application code, and ready to use projects can be installed directly
**Additional notes and informations**
-Depending on the development board you are using, you may need
-[USB UART click](https://shop.mikroe.com/usb-uart-click),
-[USB UART 2 Click](https://shop.mikroe.com/usb-uart-2-click) or
-[RS232 Click](https://shop.mikroe.com/rs232-click) to connect to your PC, for
-development systems with no UART to USB interface available on the board. The
-terminal available in all Mikroelektronika
-[compilers](https://shop.mikroe.com/compilers), or any other terminal application
-of your choice, can be used to read the message.
-
-
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
---
diff --git a/clicks/illuminance/doc/doxy/Doxyfile.doxy b/clicks/illuminance/doc/doxy/Doxyfile.doxy
index c1ea5eafa1..bb666c6444 100644
--- a/clicks/illuminance/doc/doxy/Doxyfile.doxy
+++ b/clicks/illuminance/doc/doxy/Doxyfile.doxy
@@ -20,7 +20,7 @@
# This tag specifies the encoding used for all characters in the config 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
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
# for the list of possible encodings.
# The default value is: UTF-8.
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/illuminance/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/illuminance/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,11 +291,11 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# 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.
+# documentation. See http://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.
@@ -337,7 +337,7 @@ BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# https://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# http://www.riverbankcomputing.co.uk/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.
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,17 +703,17 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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.
+# to be installed. See also http://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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,14 +790,14 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/illuminance/example \
- ../clicks/illuminance/lib/include \
- ../clicks/illuminance/README.md
+INPUT = ../cmake/illuminance/example \
+ ../cmake/illuminance/lib_illuminance/include \
+ ../cmake/illuminance/README.md
# 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
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
# possible encodings.
# The default value is: UTF-8.
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/illuminance/example
+EXAMPLE_PATH = ../cmake/illuminance/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1047,7 +1047,7 @@ 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
+# (see http://www.gnu.org/software/global/global.html). You will need version
# 4.8.6 or higher.
#
# To use it do the following:
@@ -1075,7 +1075,7 @@ USE_HTAGS = NO
VERBATIM_HEADERS = YES
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
-# clang parser (see: https://clang.llvm.org/) for more accurate parsing at 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.
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,12 +1206,12 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
+# http://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.
@@ -1270,12 +1270,12 @@ 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_NAME.apple.com/tools/xcode/), introduced with
+# environment (see: http://DEVELOPER_NAME.apple.com/tools/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_NAME/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See https://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.html
+# startup. See http://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.html
# for more information.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
@@ -1288,7 +1288,7 @@ GENERATE_DOCSET = NO
# The default value is: Doxygen generated docs.
# This tag requires that the tag GENERATE_DOCSET is set to YES.
-DOCSET_FEEDNAME = "MikroE Click boards"
+DOCSET_FEEDNAME = "Mikroe Click boards"
# This tag specifies a string that should uniquely identify the documentation
# set bundle. This should be a reverse domain-name style string, e.g.
@@ -1315,7 +1315,7 @@ DOCSET_PUBLISHER_NAME = MikroElektronika
# 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
+# (see: http://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
@@ -1328,14 +1328,14 @@ DOCSET_PUBLISHER_NAME = MikroElektronika
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
-GENERATE_HTMLHELP = 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 =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,11 +1387,11 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# (see: http://qt-project.org/doc/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.
@@ -1399,7 +1399,7 @@ QHP_NAMESPACE = org.doxygen.Project
# 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://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
# folders).
# The default value is: doc.
# This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1408,33 +1408,33 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/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://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1529,7 +1529,7 @@ FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# https://www.mathjax.org) which uses client side Javascript for the rendering
+# http://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
@@ -1541,7 +1541,7 @@ 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:
-# https://docs.mathjax.org/en/latest/output.html) for more details.
+# http://docs.mathjax.org/en/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.
@@ -1556,26 +1556,26 @@ MATHJAX_FORMAT = HTML-CSS
# 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.mathjax.org/mathjax/latest.
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
+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 =
+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: https://docs.mathjax.org/en/latest/output.html) for more details. For an
+# (see: http://docs.mathjax.org/en/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 =
+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
@@ -1618,7 +1618,7 @@ SERVER_BASED_SEARCH = NO
#
# 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/).
+# Xapian (see: http://xapian.org/).
#
# See the section "External Indexing and Searching" for details.
# The default value is: NO.
@@ -1631,11 +1631,11 @@ EXTERNAL_SEARCH = NO
#
# 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
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1818,7 +1818,7 @@ 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.
+# http://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.
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2001,7 +2001,7 @@ DOCBOOK_PROGRAMLISTING = NO
#---------------------------------------------------------------------------
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
-# AutoGen Definitions (see https://autogen.sf.net) file that captures the
+# AutoGen Definitions (see http://autogen.sf.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.
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2170,12 +2170,6 @@ EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH = /usr/bin/perl
-
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
@@ -2189,21 +2183,12 @@ PERL_PATH = /usr/bin/perl
CLASS_DIAGRAMS = YES
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# https://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
# 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 =
+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.
@@ -2213,7 +2198,7 @@ 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:
-# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# 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: NO.
@@ -2252,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2368,7 +2353,7 @@ 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:
-# https://www.graphviz.org/)).
+# 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).
@@ -2396,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2479,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/illuminance/doc/package/manifest.json b/clicks/illuminance/doc/package/manifest.json
index cc55971e27..b28a66a54c 100644
--- a/clicks/illuminance/doc/package/manifest.json
+++ b/clicks/illuminance/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Optical",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Optical",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+ "dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Illuminance click",
"example_list": [
@@ -25,19 +24,19 @@
},
"name": "mikroe.click.illuminance",
"product_link": "https://www.mikroe.com/illuminance-click",
- "short_description": "Illuminance click carries a TSL2561 light-to-digital converter with a sensor that’s designed to mimic the way humans perceive light.",
- "supported_compiler": "mikroC AI",
+ "short_description": "Illuminance Click is a compact add-on board that mimics how humans perceive light. This board features ams AG’s TSL2583, a very-high sensitivity light-to-digital converter that transforms light intensity to a digital signal output capable of the direct I2C interface. It combines one broadband photodiode (visible plus infrared) and one infrared-responding photodiode on a single CMOS integrated circuit capable of providing a near-photopic response over an effective 16-bit dynamic range (16-bit resolution).",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "_type": "mikroSDK Library",
+ "related_projects": [
1135
],
- "_type": "mikroSDK Library",
- "version": "2.0.0.6"
+ "version": "2.1.0.0",
+ "cmake": true,
+ "alias": "Click.Illuminance",
+ "subdir_name": "lib_illuminance"
}
-
-
diff --git a/clicks/illuminance/example/CMakeLists.txt b/clicks/illuminance/example/CMakeLists.txt
new file mode 100644
index 0000000000..36aa3fff7c
--- /dev/null
+++ b/clicks/illuminance/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_illuminance LANGUAGES MikroC)
+else()
+ project(example_illuminance LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_illuminance
+ main.c
+
+)
+
+
+############################ example_illuminance GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_illuminance PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_illuminance PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_illuminance PUBLIC MikroSDK.Log)
+add_subdirectory(lib_illuminance)
+target_link_libraries(example_illuminance PUBLIC Click.Illuminance)
+############################ example_illuminance GENERATED CODE END ###########################
diff --git a/clicks/illuminance/example/main.c b/clicks/illuminance/example/main.c
index 1cb512b521..c9668af4e5 100644
--- a/clicks/illuminance/example/main.c
+++ b/clicks/illuminance/example/main.c
@@ -1,49 +1,36 @@
/*!
- * \file
- * \brief Illuminance Click example
- *
+ * @file main.c
+ * @brief Illuminance Click example
+ *
* # Description
- * This example demonstrates basic Illuminance Click functionality.
+ * This example demonstrates the use of Illuminance click board by reading
+ * and displaying the RAW channels data measurements.
*
* The demo application is composed of two sections :
- *
- * ## Application Init
- * Initialize device and driver.
- *
- * ## Application Task
- * Every second calculate illuminance measured by sensor and log
- * results to UART Terminal.
- *
- * *note:*
- * By default, integration time is set to 402ms but it may be modified
- * by user using illuminance_write_data() function and provided macros.
- *
- * \author MikroE Team
+ *
+ * ## Application Init
+ * Initializes the driver and performs the click default configuration.
+ *
+ * ## Application Task
+ * Waits for the data ready interrupt, then reads the RAW channels data measurements
+ * and displays the results on the USB UART. By default, the data ready interrupt triggers
+ * upon every ADC cycle which will be performed every 200ms.
+ *
+ * @author Stefan Filipovic
*
*/
-// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "illuminance.h"
-// ------------------------------------------------------------------ VARIABLES
-
static illuminance_t illuminance;
static log_t logger;
-static uint16_t value_ch0;
-static uint16_t value_ch1;
-static uint16_t lux_value;
-static uint16_t lux_value_old;
-static uint8_t sensitivity;
-
-// ------------------------------------------------------ APPLICATION FUNCTIONS
-
-void application_init ( void )
+void application_init ( void )
{
- log_cfg_t log_cfg;
- illuminance_cfg_t cfg;
+ log_cfg_t log_cfg; /**< Logger config object. */
+ illuminance_cfg_t illuminance_cfg; /**< Click config object. */
/**
* Logger initialization.
@@ -56,45 +43,45 @@ void application_init ( void )
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
- log_info( &logger, "---- Application Init ----" );
-
- // Click initialization.
+ log_info( &logger, " Application Init " );
- illuminance_cfg_setup( &cfg );
- ILLUMINANCE_MAP_MIKROBUS( cfg, MIKROBUS_1 );
- illuminance_init( &illuminance, &cfg );
- illuminance_default_cfg ( &illuminance );
-
- // Variable Initializations for this example.
+ // Click initialization.
+ illuminance_cfg_setup( &illuminance_cfg );
+ ILLUMINANCE_MAP_MIKROBUS( illuminance_cfg, MIKROBUS_1 );
+ if ( I2C_MASTER_ERROR == illuminance_init( &illuminance, &illuminance_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
+ if ( ILLUMINANCE_ERROR == illuminance_default_cfg ( &illuminance ) )
+ {
+ log_error( &logger, " Default configuration." );
+ for ( ; ; );
+ }
- lux_value_old = 0;
- sensitivity = 50;
+ log_info( &logger, " Application Task " );
}
-void application_task ( void )
+void application_task ( void )
{
- illuminance_get_result( &illuminance, &value_ch0, &value_ch1 );
-
- lux_value = illuminance_calculate_lux( ILLUMINANCE_TSL2561_GAIN_0X, ILLUMINANCE_TSL2561_INTEGRATIONTIME_402MS , value_ch0, value_ch1 );
- Delay_ms( 1000 );
-
- if ( ( ( lux_value - lux_value_old ) > sensitivity ) && ( ( lux_value_old - lux_value ) > sensitivity ) )
+ if ( !illuminance_get_int_pin ( &illuminance ) )
{
- log_printf( &logger, "\r\n--------------------------------" );
- log_printf( &logger, "\r\nFull Spectrum: %u [ lux ]", lux_value );
- log_printf( &logger, "\r\nVisible Value: %u [ lux ]", value_ch0 - value_ch1 );
- log_printf( &logger, "\r\nInfrared Value: %u [ lux ]", value_ch1 );
- log_printf( &logger, "\r\n--------------------------------\r\n" );
-
- lux_value_old = lux_value;
+ uint16_t ch0 = 0;
+ uint16_t ch1 = 0;
+ if ( ILLUMINANCE_OK == illuminance_read_raw_data ( &illuminance, &ch0, &ch1 ) )
+ {
+ log_printf ( &logger, " CH0: %u\r\n", ch0 );
+ log_printf ( &logger, " CH1: %u\r\n\n", ch1 );
+ }
}
}
-void main ( void )
+void main ( void )
{
application_init( );
- for ( ; ; )
+ for ( ; ; )
{
application_task( );
}
diff --git a/clicks/illuminance/example/manifest.exm b/clicks/illuminance/example/manifest.exm
index 6ec86043b6..fcff662c04 100644
--- a/clicks/illuminance/example/manifest.exm
+++ b/clicks/illuminance/example/manifest.exm
@@ -1,8 +1,8 @@
{
"name": "Illuminance Click",
- "description": "Illuminance click carries a TSL2561 light-to-digital converter with a sensor that’s designed to mimic the way humans perceive light.",
+ "description": "Illuminance Click is a compact add-on board that mimics how humans perceive light. This board features ams AG’s TSL2583, a very-high sensitivity light-to-digital converter that transforms light intensity to a digital signal output capable of the direct I2C interface. It combines one broadband photodiode (visible plus infrared) and one infrared-responding photodiode on a single CMOS integrated circuit capable of providing a near-photopic response over an effective 16-bit dynamic range (16-bit resolution).",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
- "hw" : ["click","TSL2561"],
- "category" : ["Optical"]
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
+ "hw" : ["click","TSL2583"],
+ "category" : ["Optical"]
}
diff --git a/clicks/illuminance/example/memake.txt b/clicks/illuminance/example/memake.txt
deleted file mode 100644
index 27f116243b..0000000000
--- a/clicks/illuminance/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_illuminance
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Illuminance
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/illuminance/lib/include/illuminance.h b/clicks/illuminance/lib/include/illuminance.h
deleted file mode 100644
index f9b78eeb79..0000000000
--- a/clicks/illuminance/lib/include/illuminance.h
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- * \brief This file contains API for Illuminance Click driver.
- *
- * \addtogroup illuminance Illuminance Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef ILLUMINANCE_H
-#define ILLUMINANCE_H
-
-#include "drv_digital_out.h"
-#include "drv_digital_in.h"
-#include "drv_i2c_master.h"
-
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-#define ILLUMINANCE_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
- cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
- cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
-/** \} */
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define ILLUMINANCE_RETVAL uint8_t
-
-#define ILLUMINANCE_OK 0x00
-#define ILLUMINANCE_INIT_ERROR 0xFF
-/** \} */
-
-/**
- * \defgroup i2c_address I2C Address
- * \{
- */
-#define ILLUMINANCE_TSL2561_I2C_ADDR_LOW 0x29
-#define ILLUMINANCE_TSL2561_I2C_ADDR_FLOAT 0x39
-#define ILLUMINANCE_TSL2561_I2C_ADDR_HIGH 0x49
-/** \} */
-
-/**
- * \defgroup register_addr Register Address
- * \{
- */
-#define ILLUMINANCE_TSL2561_REGISTER_CONTROL 0x00
-#define ILLUMINANCE_TSL2561_REGISTER_TIMING 0x01
-#define ILLUMINANCE_TSL2561_REGISTER_THRESHHOLDL_LOW 0x02
-#define ILLUMINANCE_TSL2561_REGISTER_THRESHHOLDL_HIGH 0x03
-#define ILLUMINANCE_TSL2561_REGISTER_THRESHHOLDH_LOW 0x04
-#define ILLUMINANCE_TSL2561_REGISTER_THRESHHOLDH_HIGH 0x05
-#define ILLUMINANCE_TSL2561_REGISTER_INTERRUPT 0x06
-#define ILLUMINANCE_TSL2561_REGISTER_CRC 0x08
-#define ILLUMINANCE_TSL2561_REGISTER_ID 0x0A
-#define ILLUMINANCE_TSL2561_REGISTER_CHAN0_LOW 0x0C
-#define ILLUMINANCE_TSL2561_REGISTER_CHAN0_HIGH 0x0D
-#define ILLUMINANCE_TSL2561_REGISTER_CHAN1_LOW 0x0E
-#define ILLUMINANCE_TSL2561_REGISTER_CHAN1_HIGH 0x0F
-/** \} */
-
-/**
- * \defgroup config_bits Configuration Bits
- * \{
- */
-#define ILLUMINANCE_TSL2561_INTEGRATIONTIME_13MS 0x00
-#define ILLUMINANCE_TSL2561_INTEGRATIONTIME_101MS 0x01
-#define ILLUMINANCE_TSL2561_INTEGRATIONTIME_402MS 0x02
-#define ILLUMINANCE_TSL2561_GAIN_0X 0x00
-#define ILLUMINANCE_TSL2561_GAIN_16X 0x10
-#define ILLUMINANCE_TSL2561_COMMAND_BIT 0x80
-#define ILLUMINANCE_TSL2561_CLEAR_BIT 0x40
-#define ILLUMINANCE_TSL2561_WORD_BIT 0x20
-#define ILLUMINANCE_TSL2561_BLOCK_BIT 0x10
-#define ILLUMINANCE_TSL2561_CONTROL_POWERON 0x03
-#define ILLUMINANCE_TSL2561_CONTROL_POWEROFF 0x00
-#define ILLUMINANCE_TSL2561_CHSCALE_TINT0 0x7517
-#define ILLUMINANCE_TSL2561_CHSCALE_TINT1 0x0FE7
-#define ILLUMINANCE_TSL2561_LUX_SCALE 14
-#define ILLUMINANCE_TSL2561_RATIO_SCALE 9
-#define ILLUMINANCE_TSL2561_CH_SCALE 10
-/** \} */
-
-/**
- * \defgroup t_fn_and_cl_package_coeff T, FN and CL package coefficients
- * \{
- */
-#define ILLUMINANCE_TSL2561_K1T 0x0040
-#define ILLUMINANCE_TSL2561_B1T 0x01f2
-#define ILLUMINANCE_TSL2561_M1T 0x01be
-#define ILLUMINANCE_TSL2561_K2T 0x0080
-#define ILLUMINANCE_TSL2561_B2T 0x0214
-#define ILLUMINANCE_TSL2561_M2T 0x02d1
-#define ILLUMINANCE_TSL2561_K3T 0x00c0
-#define ILLUMINANCE_TSL2561_B3T 0x023f
-#define ILLUMINANCE_TSL2561_M3T 0x037b
-#define ILLUMINANCE_TSL2561_K4T 0x0100
-#define ILLUMINANCE_TSL2561_B4T 0x0270
-#define ILLUMINANCE_TSL2561_M4T 0x03fe
-#define ILLUMINANCE_TSL2561_K5T 0x0138
-#define ILLUMINANCE_TSL2561_B5T 0x016f
-#define ILLUMINANCE_TSL2561_M5T 0x01fc
-#define ILLUMINANCE_TSL2561_K6T 0x019a
-#define ILLUMINANCE_TSL2561_B6T 0x00d2
-#define ILLUMINANCE_TSL2561_M6T 0x00fb
-#define ILLUMINANCE_TSL2561_K7T 0x029a
-#define ILLUMINANCE_TSL2561_B7T 0x0018
-#define ILLUMINANCE_TSL2561_M7T 0x0012
-#define ILLUMINANCE_TSL2561_K8T 0x029a
-#define ILLUMINANCE_TSL2561_B8T 0x0000
-#define ILLUMINANCE_TSL2561_M8T 0x0000
-/** \} */
-
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
-
- // Input pins
-
- digital_in_t int_pin;
-
- // Modules
-
- i2c_master_t i2c;
-
- // ctx variable
-
- uint8_t slave_address;
-
-} illuminance_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Communication gpio pins
-
- pin_name_t scl;
- pin_name_t sda;
-
- // Additional gpio pins
-
- pin_name_t int_pin;
-
- // static variable
-
- uint32_t i2c_speed;
- uint8_t i2c_address;
-
-} illuminance_cfg_t;
-
-/** \} */ // End types group
-
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
- */
-void illuminance_cfg_setup ( illuminance_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- * @param illuminance Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
- */
-ILLUMINANCE_RETVAL illuminance_init ( illuminance_t *ctx, illuminance_cfg_t *cfg );
-
-/**
- * @brief Click Default Configuration function.
- *
- * @param ctx Click object.
- *
- * @description This function executes default configuration ( typically power on device and
- * set timing value ) for Illuminance click.
- */
-void illuminance_default_cfg ( illuminance_t *ctx );
-
-/**
- * @brief Generic write function.
- *
- * @param ctx Click object.
- * @param reg Register address.
- * @param data_buf Data buf to be written.
- * @param len Number of the bytes in data buf.
- *
- * @description This function writes data to the desired register.
- */
-void illuminance_generic_write ( illuminance_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
-
-/**
- * @brief Generic read function.
- *
- *
- * @param ctx Click object.
- * @param reg Register address.
- * @param data_buf Output data buf
- * @param len Number of the bytes to be read
- *
- * @description This function reads data from the desired register.
- */
-void illuminance_generic_read ( illuminance_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
-
-/**
- * @brief Generic write data function
- *
- * @param ctx Click object.
- * @param address Register address.
- * @param write_command Command to write.
- *
- * @description This function writes byte of data to TSL2561.
- */
-void illuminance_write_data( illuminance_t *ctx, uint8_t address, uint8_t write_command );
-
-/**
- * @brief Generic read data function
- *
- * @param ctx Click object.
- * @param addr Register address.
- *
- * @returns 8-bit data from addressed register from TSL2561
- *
- * @description This function reads byte of data from register address addr of TSL2561.
- */
-uint8_t illuminance_read_data( illuminance_t *ctx, uint8_t addr );
-
-
-/**
- * @brief Get Visible & Infrared value
- *
- * @param ctx Click object.
- * @param value_ch0 Pointer to read Visible & Infrared value.
- * @param value_ch1 Pointer to read Infrared value.
- *
- * @description This function gets Visible & Infrared value.
- */
-void illuminance_get_result( illuminance_t *ctx, uint16_t *value_ch0, uint16_t *value_ch1 );
-
-/**
- * @brief Calculate lux value
- *
- * @param ctx Click object.
- * @param value_gain 0x00 - No gain, 0x01 - 16x gain
- * @param value_int 0x00 - 13.7ms, 0x01 - 101ms, 0x02 - 402ms
- * @param channel0 Visible & Infrared data
- * @param channel1 Infrared data
- *
- * @returns 16-bit resulting lux calculation
- *
- * @descruotion This function calculates lux value from the TSL2561 sensor.
- */
-uint16_t illuminance_calculate_lux( uint16_t value_gain, uint16_t value_int, uint16_t ch0, uint16_t ch1 );
-
-/**
- * @brief Get interrupt pin status
- *
- * @param ctx Click object.
- *
- * @returns Interrupt pin state.
- *
- * @description This functions gets interrupt pin state.
- */
-uint8_t illuminance_get_interrupt( illuminance_t *ctx );
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _ILLUMINANCE_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
diff --git a/clicks/illuminance/lib/memake.txt b/clicks/illuminance/lib/memake.txt
deleted file mode 100644
index 2ed7bccdcd..0000000000
--- a/clicks/illuminance/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_illuminance
-
-alias: Click.Illuminance
-
-sources: {
- src/illuminance.c
-}
-
-headers: {
- include/illuminance.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/illuminance.h) dst(include/illuminance.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/illuminance/lib/src/illuminance.c b/clicks/illuminance/lib/src/illuminance.c
deleted file mode 100644
index 8ac61fa308..0000000000
--- a/clicks/illuminance/lib/src/illuminance.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- */
-
-#include "illuminance.h"
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void illuminance_cfg_setup ( illuminance_cfg_t *cfg )
-{
- // Communication gpio pins
-
- cfg->scl = HAL_PIN_NC;
- cfg->sda = HAL_PIN_NC;
-
- // Additional gpio pins
-
- cfg->int_pin = HAL_PIN_NC;
-
- cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD;
- cfg->i2c_address = ILLUMINANCE_TSL2561_I2C_ADDR_HIGH;
-}
-
-ILLUMINANCE_RETVAL illuminance_init ( illuminance_t *ctx, illuminance_cfg_t *cfg )
-{
- i2c_master_config_t i2c_cfg;
-
- i2c_master_configure_default( &i2c_cfg );
- i2c_cfg.speed = cfg->i2c_speed;
- i2c_cfg.scl = cfg->scl;
- i2c_cfg.sda = cfg->sda;
-
- ctx->slave_address = cfg->i2c_address;
-
- if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR )
- {
- return ILLUMINANCE_INIT_ERROR;
- }
-
- i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address );
- i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed );
-
- // Input pins
-
- digital_in_init( &ctx->int_pin, cfg->int_pin );
-
- return ILLUMINANCE_OK;
-}
-
-void illuminance_default_cfg ( illuminance_t *ctx )
-{
- // Power On
- illuminance_write_data( ctx, ILLUMINANCE_TSL2561_COMMAND_BIT |
- ILLUMINANCE_TSL2561_REGISTER_CONTROL,
- ILLUMINANCE_TSL2561_CONTROL_POWERON );
-
- illuminance_write_data( ctx, ILLUMINANCE_TSL2561_COMMAND_BIT |
- ILLUMINANCE_TSL2561_REGISTER_TIMING,
- ILLUMINANCE_TSL2561_INTEGRATIONTIME_402MS );
-}
-
-void illuminance_generic_write ( illuminance_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len )
-{
- uint8_t tx_buf[ 256 ];
- uint8_t cnt;
-
- tx_buf[ 0 ] = reg;
-
- for ( cnt = 1; cnt <= len; cnt++ )
- {
- tx_buf[ cnt ] = data_buf[ cnt - 1 ];
- }
-
- i2c_master_write( &ctx->i2c, tx_buf, len + 1 );
-}
-
-void illuminance_generic_read ( illuminance_t *ctx, uint8_t reg, uint8_t *data_buf,
- uint8_t len )
-{
- i2c_master_write_then_read( &ctx->i2c, ®, 1, data_buf, len );
-}
-
-void illuminance_write_data ( illuminance_t *ctx, uint8_t address, uint8_t write_command )
-{
- uint8_t write_data;
-
- write_data = write_command;
- illuminance_generic_write( ctx, address, &write_data, 1 );
-}
-
-uint8_t illuminance_read_data ( illuminance_t *ctx, uint8_t address )
-{
- uint8_t read_data[ 1 ];
-
- illuminance_generic_read( ctx, address, read_data, 1 );
-
- return read_data[ 0 ];
-}
-
-void illuminance_get_result ( illuminance_t *ctx, uint16_t *value_ch0, uint16_t *value_ch1 )
-{
- uint16_t result;
- uint8_t buffer0[ 2 ];
- uint8_t buffer1[ 2 ];
-
- buffer0[ 0 ] = illuminance_read_data( ctx, ILLUMINANCE_TSL2561_COMMAND_BIT |
- ILLUMINANCE_TSL2561_REGISTER_CHAN0_LOW );
- buffer0[ 1 ] = illuminance_read_data( ctx, ILLUMINANCE_TSL2561_COMMAND_BIT |
- ILLUMINANCE_TSL2561_REGISTER_CHAN0_HIGH );
-
- buffer1[ 0 ] = illuminance_read_data( ctx, ILLUMINANCE_TSL2561_COMMAND_BIT |
- ILLUMINANCE_TSL2561_REGISTER_CHAN1_LOW );
- buffer1[ 1 ] = illuminance_read_data( ctx, ILLUMINANCE_TSL2561_COMMAND_BIT |
- ILLUMINANCE_TSL2561_REGISTER_CHAN1_HIGH );
-
- result = 0x00;
- result = buffer0[ 1 ];
- result <<= 8;
- result |= buffer0[ 0 ];
-
- *value_ch0 = result;
-
- result = 0x00;
- result = buffer1[ 1 ];
- result <<= 8;
- result |= buffer1[ 0 ];
-
- *value_ch1 = result;
-}
-
-uint16_t illuminance_calculate_lux( uint16_t value_gain, uint16_t value_int, uint16_t ch0,
- uint16_t ch1 )
-{
- uint32_t ch_scale;
- uint32_t channel0;
- uint32_t channel1;
- uint32_t temp;
- uint32_t lux;
- uint32_t ratio;
- uint32_t ratio1;
- uint16_t b;
- uint16_t m;
-
- ratio1 = 0;
-
- switch ( value_int )
- {
- case 0:
- {
- ch_scale = ILLUMINANCE_TSL2561_CHSCALE_TINT0;
- break;
- }
- case 1:
- {
- ch_scale = ILLUMINANCE_TSL2561_CHSCALE_TINT1;
- break;
- }
- default:
- {
- ch_scale = ( 1 << ILLUMINANCE_TSL2561_CH_SCALE );
- break;
- }
- }
-
- if ( !value_gain )
- {
- ch_scale = ch_scale << 4;
- }
-
- channel0 = ( ch0 * ch_scale ) >> ILLUMINANCE_TSL2561_CH_SCALE;
- channel1 = ( ch1 * ch_scale ) >> ILLUMINANCE_TSL2561_CH_SCALE;
-
- if ( channel0 != 0 )
- {
- ratio1 = (channel1 << ( ILLUMINANCE_TSL2561_RATIO_SCALE +1 )) / channel0;
- }
-
- ratio = (ratio1 + 1) >> 1;
-
- if ( ( ratio >= 0 ) && ( ratio <= ILLUMINANCE_TSL2561_K1T ) )
- {
- b = ILLUMINANCE_TSL2561_B1T;
- m = ILLUMINANCE_TSL2561_M1T;
- }
- else if ( ratio <= ILLUMINANCE_TSL2561_K2T )
- {
- b = ILLUMINANCE_TSL2561_B2T;
- m = ILLUMINANCE_TSL2561_M2T;
- }
- else if ( ratio <= ILLUMINANCE_TSL2561_K3T )
- {
- b = ILLUMINANCE_TSL2561_B3T;
- m = ILLUMINANCE_TSL2561_M3T;
- }
- else if ( ratio <= ILLUMINANCE_TSL2561_K4T )
- {
- b = ILLUMINANCE_TSL2561_B4T;
- m = ILLUMINANCE_TSL2561_M4T;
- }
- else if ( ratio <= ILLUMINANCE_TSL2561_K5T )
- {
- b = ILLUMINANCE_TSL2561_B5T;
- m = ILLUMINANCE_TSL2561_M5T;
- }
- else if ( ratio <= ILLUMINANCE_TSL2561_K6T )
- {
- b = ILLUMINANCE_TSL2561_B6T;
- m = ILLUMINANCE_TSL2561_M6T;
- }
- else if ( ratio <= ILLUMINANCE_TSL2561_K7T )
- {
- b = ILLUMINANCE_TSL2561_B7T;
- m = ILLUMINANCE_TSL2561_M7T;
- }
- else if ( ratio > ILLUMINANCE_TSL2561_K8T )
- {
- b = ILLUMINANCE_TSL2561_B8T;
- m = ILLUMINANCE_TSL2561_M8T;
- }
-
- temp = ( ( channel0 * b ) - ( channel1 * m ) );
-
- if ( temp < 0 )
- {
- temp = 0;
- }
-
- temp = temp + ( 1 << ( ILLUMINANCE_TSL2561_LUX_SCALE - 1 ) );
- lux = temp >> ILLUMINANCE_TSL2561_LUX_SCALE;
-
- return lux ;
-}
-
-uint8_t illuminance_get_interrupt( illuminance_t *ctx )
-{
- return digital_in_read( &ctx->int_pin );
-}
-
-// ------------------------------------------------------------------------- END
-
diff --git a/clicks/illuminance/lib_illuminance/CMakeLists.txt b/clicks/illuminance/lib_illuminance/CMakeLists.txt
new file mode 100644
index 0000000000..4044cd2713
--- /dev/null
+++ b/clicks/illuminance/lib_illuminance/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_illuminance LANGUAGES MikroC)
+else()
+ project(lib_illuminance LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_illuminance STATIC
+ src/illuminance.c
+ include/illuminance.h
+)
+add_library(Click.Illuminance ALIAS lib_illuminance)
+
+
+
+target_include_directories(lib_illuminance PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_illuminance PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_illuminance PUBLIC MikroSDK.Driver)
diff --git a/clicks/illuminance/lib_illuminance/include/Click.Illuminance b/clicks/illuminance/lib_illuminance/include/Click.Illuminance
new file mode 100644
index 0000000000..c7024468d6
--- /dev/null
+++ b/clicks/illuminance/lib_illuminance/include/Click.Illuminance
@@ -0,0 +1 @@
+#include "illuminance.h"
diff --git a/clicks/illuminance/lib_illuminance/include/illuminance.h b/clicks/illuminance/lib_illuminance/include/illuminance.h
new file mode 100644
index 0000000000..c8b051f3d7
--- /dev/null
+++ b/clicks/illuminance/lib_illuminance/include/illuminance.h
@@ -0,0 +1,397 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file illuminance.h
+ * @brief This file contains API for Illuminance Click Driver.
+ */
+
+#ifndef ILLUMINANCE_H
+#define ILLUMINANCE_H
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_i2c_master.h"
+
+/*!
+ * @addtogroup illuminance Illuminance Click Driver
+ * @brief API for configuring and manipulating Illuminance Click driver.
+ * @{
+ */
+
+/**
+ * @defgroup illuminance_reg Illuminance Registers List
+ * @brief List of registers of Illuminance Click driver.
+ */
+
+/**
+ * @addtogroup illuminance_reg
+ * @{
+ */
+
+/**
+ * @brief Illuminance registers list.
+ * @details Specified registers list of Illuminance Click driver.
+ */
+#define ILLUMINANCE_REG_CONTROL 0x00
+#define ILLUMINANCE_REG_TIMING 0x01
+#define ILLUMINANCE_REG_INTERRUPT 0x02
+#define ILLUMINANCE_REG_THL_LOW 0x03
+#define ILLUMINANCE_REG_THL_HIGH 0x04
+#define ILLUMINANCE_REG_THH_LOW 0x05
+#define ILLUMINANCE_REG_THH_HIGH 0x06
+#define ILLUMINANCE_REG_ANALOG 0x07
+#define ILLUMINANCE_REG_ID 0x12
+#define ILLUMINANCE_REG_DATA0_LOW 0x14
+#define ILLUMINANCE_REG_DATA0_HIGH 0x15
+#define ILLUMINANCE_REG_DATA1_LOW 0x16
+#define ILLUMINANCE_REG_DATA1_HIGH 0x17
+#define ILLUMINANCE_REG_TIMER_LOW 0x18
+#define ILLUMINANCE_REG_TIMER_HIGH 0x19
+#define ILLUMINANCE_REG_ID2 0x1E
+
+/*! @} */ // illuminance_reg
+
+/**
+ * @defgroup illuminance_set Illuminance Registers Settings
+ * @brief Settings for registers of Illuminance Click driver.
+ */
+
+/**
+ * @addtogroup illuminance_set
+ * @{
+ */
+
+/**
+ * @brief Illuminance Command register setting.
+ * @details Specified setting for Command register of Illuminance Click driver.
+ */
+#define ILLUMINANCE_CMD_BIT 0x80
+#define ILLUMINANCE_TRANSACTION_REPEATED 0x00
+#define ILLUMINANCE_TRANSACTION_AUTO_INC 0x20
+#define ILLUMINANCE_TRANSACTION_SPEC_FUNC 0x60
+#define ILLUMINANCE_SPEC_FUNC_INT_CLEAR 0x01
+#define ILLUMINANCE_SPEC_FUNC_STOP_MAN_INT 0x02
+#define ILLUMINANCE_SPEC_FUNC_START_MAN_INT 0x03
+
+/**
+ * @brief Illuminance control register setting.
+ * @details Specified setting for control register of Illuminance Click driver.
+ */
+#define ILLUMINANCE_CONTROL_ADC_INTR 0x20
+#define ILLUMINANCE_CONTROL_ADC_VALID 0x10
+#define ILLUMINANCE_CONTROL_ADC_ENABLE 0x02
+#define ILLUMINANCE_CONTROL_POWER_ON 0x01
+
+/**
+ * @brief Illuminance timing register setting.
+ * @details Specified setting for timing register of Illuminance Click driver.
+ */
+#define ILLUMINANCE_ATIME_MAX 688.5
+#define ILLUMINANCE_ATIME_MIN 2.7
+#define ILLUMINANCE_ATIME_STEP 2.7
+#define ILLUMINANCE_DEFAULT_ATIME 200.0
+
+/**
+ * @brief Illuminance interrupt register setting.
+ * @details Specified setting for interrupt register of Illuminance Click driver.
+ */
+#define ILLUMINANCE_ENABLE_INTERRUPT 0x10
+
+/**
+ * @brief Illuminance analog register setting.
+ * @details Specified setting for analog register of Illuminance Click driver.
+ */
+#define ILLUMINANCE_GAIN_1X 0x00
+#define ILLUMINANCE_GAIN_8X 0x01
+#define ILLUMINANCE_GAIN_16X 0x02
+#define ILLUMINANCE_GAIN_111X 0x03
+
+/**
+ * @brief Illuminance ID values.
+ * @details Specified ID values of Illuminance Click driver.
+ */
+#define ILLUMINANCE_ID_PARTNO 0x90
+#define ILLUMINANCE_ID2 0x30
+
+/**
+ * @brief Illuminance device address setting.
+ * @details Specified setting for device slave address selection of
+ * Illuminance Click driver.
+ */
+#define ILLUMINANCE_SET_DEV_ADDR_GND 0x29
+#define ILLUMINANCE_SET_DEV_ADDR_FLOAT 0x39
+#define ILLUMINANCE_SET_DEV_ADDR_VCC 0x49
+
+/*! @} */ // illuminance_set
+
+/**
+ * @defgroup illuminance_map Illuminance MikroBUS Map
+ * @brief MikroBUS pin mapping of Illuminance Click driver.
+ */
+
+/**
+ * @addtogroup illuminance_map
+ * @{
+ */
+
+/**
+ * @brief MikroBUS pin mapping.
+ * @details Mapping pins of Illuminance Click to the selected MikroBUS.
+ */
+#define ILLUMINANCE_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
+ cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
+ cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
+
+/*! @} */ // illuminance_map
+/*! @} */ // illuminance
+
+/**
+ * @brief Illuminance Click context object.
+ * @details Context object definition of Illuminance Click driver.
+ */
+typedef struct
+{
+ // Input pins
+ digital_in_t int_pin; /**< Interrupt pin (Active low). */
+
+ // Modules
+ i2c_master_t i2c; /**< I2C driver object. */
+
+ // I2C slave address
+ uint8_t slave_address; /**< Device slave address (used for I2C driver). */
+
+ float atime_ms; /**< ALS time in milliseconds. */
+ uint8_t gain; /**< Gain level. */
+
+} illuminance_t;
+
+/**
+ * @brief Illuminance Click configuration object.
+ * @details Configuration object definition of Illuminance Click driver.
+ */
+typedef struct
+{
+ pin_name_t scl; /**< Clock pin descriptor for I2C driver. */
+ pin_name_t sda; /**< Bidirectional data pin descriptor for I2C driver. */
+
+ pin_name_t int_pin; /**< Interrupt pin. */
+
+ uint32_t i2c_speed; /**< I2C serial speed. */
+ uint8_t i2c_address; /**< I2C slave address. */
+
+} illuminance_cfg_t;
+
+/**
+ * @brief Illuminance Click return value data.
+ * @details Predefined enum values for driver return values.
+ */
+typedef enum
+{
+ ILLUMINANCE_OK = 0,
+ ILLUMINANCE_ERROR = -1
+
+} illuminance_return_value_t;
+
+/*!
+ * @addtogroup illuminance Illuminance Click Driver
+ * @brief API for configuring and manipulating Illuminance Click driver.
+ * @{
+ */
+
+/**
+ * @brief Illuminance configuration object setup function.
+ * @details This function initializes click configuration structure to initial
+ * values.
+ * @param[out] cfg : Click configuration structure.
+ * See #illuminance_cfg_t object definition for detailed explanation.
+ * @return Nothing.
+ * @note The all used pins will be set to unconnected state.
+ */
+void illuminance_cfg_setup ( illuminance_cfg_t *cfg );
+
+/**
+ * @brief Illuminance initialization function.
+ * @details This function initializes all necessary pins and peripherals used
+ * for this click board.
+ * @param[out] ctx : Click context object.
+ * See #illuminance_t object definition for detailed explanation.
+ * @param[in] cfg : Click configuration structure.
+ * See #illuminance_cfg_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ *
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t illuminance_init ( illuminance_t *ctx, illuminance_cfg_t *cfg );
+
+/**
+ * @brief Illuminance default configuration function.
+ * @details This function executes a default configuration of Illuminance
+ * click board.
+ * @param[in] ctx : Click context object.
+ * See #illuminance_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ *
+ * See #err_t definition for detailed explanation.
+ * @note This function can consist any necessary configuration or setting to put
+ * device into operating mode.
+ */
+err_t illuminance_default_cfg ( illuminance_t *ctx );
+
+/**
+ * @brief Illuminance I2C writing function.
+ * @details This function writes a desired number of data bytes starting from
+ * the selected register by using I2C serial interface.
+ * @param[in] ctx : Click context object.
+ * See #illuminance_t object definition for detailed explanation.
+ * @param[in] reg : Start register address.
+ * @param[in] tx_buf : Data to be written.
+ * @param[in] tx_len : Number of bytes to be written.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t illuminance_generic_write ( illuminance_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len );
+
+/**
+ * @brief Illuminance I2C reading function.
+ * @details This function reads a desired number of data bytes starting from
+ * the selected register by using I2C serial interface.
+ * @param[in] ctx : Click context object.
+ * See #illuminance_t object definition for detailed explanation.
+ * @param[in] reg : Start register address.
+ * @param[out] rx_buf : Output read data.
+ * @param[in] rx_len : Number of bytes to be read.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t illuminance_generic_read ( illuminance_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len );
+
+/**
+ * @brief Illuminance write register function.
+ * @details This function writes a desired data to the selected register by using I2C serial interface.
+ * @param[in] ctx : Click context object.
+ * See #illuminance_t object definition for detailed explanation.
+ * @param[in] reg : Register address.
+ * @param[in] data_in : Data to be written.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t illuminance_write_register ( illuminance_t *ctx, uint8_t reg, uint8_t data_in );
+
+/**
+ * @brief Illuminance read register function.
+ * @details This function reads a desired data from the selected register by using I2C serial interface.
+ * @param[in] ctx : Click context object.
+ * See #illuminance_t object definition for detailed explanation.
+ * @param[in] reg : Start register address.
+ * @param[out] data_out : Output read data.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t illuminance_read_register ( illuminance_t *ctx, uint8_t reg, uint8_t *data_out );
+
+/**
+ * @brief Illuminance get int pin function.
+ * @details This function returns the INT pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #illuminance_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
+ */
+uint8_t illuminance_get_int_pin ( illuminance_t *ctx );
+
+/**
+ * @brief Illuminance check communication function.
+ * @details This function checks the communication by reading and verifying the chip ID values.
+ * @param[in] ctx : Click context object.
+ * See #illuminance_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t illuminance_check_communication ( illuminance_t *ctx );
+
+/**
+ * @brief Illuminance set atime function.
+ * @details This function sets the timing register for the selected integration time.
+ * @param[in] ctx : Click context object.
+ * See #illuminance_t object definition for detailed explanation.
+ * @param[in] atime_ms : Als integration time. Valid values from 2.7 to 688.5 milliseconds.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t illuminance_set_atime ( illuminance_t *ctx, float atime_ms );
+
+/**
+ * @brief Illuminance set gain function.
+ * @details This function sets the gain level.
+ * @param[in] ctx : Click context object.
+ * See #illuminance_t object definition for detailed explanation.
+ * @param[in] gain : Gain level value [0-3].
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t illuminance_set_gain ( illuminance_t *ctx, uint8_t gain );
+
+/**
+ * @brief Illuminance read raw data function.
+ * @details This function checks if the data is ready and then reads the raw ADC data from two channels.
+ * @param[in] ctx : Click context object.
+ * See #illuminance_t object definition for detailed explanation.
+ * @param[out] ch_0 : Raw data from channel 0.
+ * @param[out] ch_1 : Raw data from channel 1.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t illuminance_read_raw_data ( illuminance_t *ctx, uint16_t *ch_0, uint16_t *ch_1 );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // ILLUMINANCE_H
+
+/*! @} */ // illuminance
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/illuminance/lib_illuminance/src/illuminance.c b/clicks/illuminance/lib_illuminance/src/illuminance.c
new file mode 100644
index 0000000000..7c0ffb8331
--- /dev/null
+++ b/clicks/illuminance/lib_illuminance/src/illuminance.c
@@ -0,0 +1,232 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file illuminance.c
+ * @brief Illuminance Click Driver.
+ */
+
+#include "illuminance.h"
+
+void illuminance_cfg_setup ( illuminance_cfg_t *cfg )
+{
+ // Communication gpio pins
+ cfg->scl = HAL_PIN_NC;
+ cfg->sda = HAL_PIN_NC;
+
+ // Additional gpio pins
+ cfg->int_pin = HAL_PIN_NC;
+
+ cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD;
+ cfg->i2c_address = ILLUMINANCE_SET_DEV_ADDR_VCC;
+}
+
+err_t illuminance_init ( illuminance_t *ctx, illuminance_cfg_t *cfg )
+{
+ i2c_master_config_t i2c_cfg;
+
+ i2c_master_configure_default( &i2c_cfg );
+
+ i2c_cfg.scl = cfg->scl;
+ i2c_cfg.sda = cfg->sda;
+
+ ctx->slave_address = cfg->i2c_address;
+
+ if ( I2C_MASTER_ERROR == i2c_master_open( &ctx->i2c, &i2c_cfg ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ if ( I2C_MASTER_ERROR == i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ if ( I2C_MASTER_ERROR == i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ digital_in_init( &ctx->int_pin, cfg->int_pin );
+
+ return I2C_MASTER_SUCCESS;
+}
+
+err_t illuminance_default_cfg ( illuminance_t *ctx )
+{
+ err_t error_flag = ILLUMINANCE_OK;
+
+ if ( ILLUMINANCE_ERROR == illuminance_check_communication ( ctx ) )
+ {
+ return ILLUMINANCE_ERROR;
+ }
+ // enable adc, enable power
+ error_flag |= illuminance_write_register ( ctx, ILLUMINANCE_REG_CONTROL, ILLUMINANCE_CONTROL_POWER_ON |
+ ILLUMINANCE_CONTROL_ADC_ENABLE );
+ // set default atime - 200ms
+ error_flag |= illuminance_set_atime ( ctx, ILLUMINANCE_DEFAULT_ATIME );
+
+ // set gain to 16x
+ error_flag |= illuminance_set_gain ( ctx, ILLUMINANCE_GAIN_16X );
+
+ // enable interrupts
+ error_flag |= illuminance_write_register ( ctx, ILLUMINANCE_REG_INTERRUPT, ILLUMINANCE_ENABLE_INTERRUPT );
+
+ return error_flag;
+}
+
+err_t illuminance_generic_write ( illuminance_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len )
+{
+ uint8_t data_buf[ 32 ] = { 0 };
+
+ data_buf[ 0 ] = reg;
+
+ for ( uint8_t cnt = 1; cnt <= tx_len; cnt++ )
+ {
+ data_buf[ cnt ] = tx_buf[ cnt - 1 ];
+ }
+
+ return i2c_master_write( &ctx->i2c, data_buf, tx_len + 1 );
+}
+
+err_t illuminance_generic_read ( illuminance_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len )
+{
+ return i2c_master_write_then_read( &ctx->i2c, ®, 1, rx_buf, rx_len );
+}
+
+err_t illuminance_write_register ( illuminance_t *ctx, uint8_t reg, uint8_t data_in )
+{
+ uint8_t data_buf[ 2 ] = { 0 };
+
+ data_buf[ 0 ] = reg | ILLUMINANCE_CMD_BIT;
+ data_buf[ 1 ] = data_in;
+
+ return i2c_master_write( &ctx->i2c, data_buf, 2 );
+}
+
+err_t illuminance_read_register ( illuminance_t *ctx, uint8_t reg, uint8_t *data_out )
+{
+ reg |= ILLUMINANCE_CMD_BIT;
+ return i2c_master_write_then_read( &ctx->i2c, ®, 1, data_out, 1 );
+}
+
+uint8_t illuminance_get_int_pin ( illuminance_t *ctx )
+{
+ return digital_in_read ( &ctx->int_pin );
+}
+
+err_t illuminance_check_communication ( illuminance_t *ctx )
+{
+ uint8_t id_partno = 0;
+ uint8_t id2 = 0;
+ err_t error_flag = illuminance_read_register ( ctx, ILLUMINANCE_REG_ID, &id_partno );
+ error_flag |= illuminance_read_register ( ctx, ILLUMINANCE_REG_ID2, &id2 );
+ if ( ( ILLUMINANCE_OK == error_flag ) &&
+ ( ILLUMINANCE_ID_PARTNO == ( id_partno & 0xF0 ) ) &&
+ ( ILLUMINANCE_ID2 & id2 ) )
+ {
+ return ILLUMINANCE_OK;
+ }
+ return ILLUMINANCE_ERROR;
+}
+
+err_t illuminance_set_atime ( illuminance_t *ctx, float atime_ms )
+{
+ uint8_t atime = 0;
+ if ( atime_ms >= ILLUMINANCE_ATIME_MAX )
+ {
+ atime = 1;
+ ctx->atime_ms = ILLUMINANCE_ATIME_MAX;
+ }
+ else if ( atime_ms <= ILLUMINANCE_ATIME_MIN )
+ {
+ atime = 0xFF;
+ ctx->atime_ms = ILLUMINANCE_ATIME_MIN;
+ }
+ else
+ {
+ atime = 0xFF - ( uint8_t ) ( atime_ms / ILLUMINANCE_ATIME_STEP );
+ ctx->atime_ms = atime_ms;
+ }
+ return illuminance_write_register( ctx, ILLUMINANCE_REG_TIMING, atime );
+}
+
+err_t illuminance_set_gain ( illuminance_t *ctx, uint8_t gain )
+{
+ switch ( gain )
+ {
+ case ILLUMINANCE_GAIN_1X:
+ {
+ ctx->gain = 1;
+ break;
+ }
+ case ILLUMINANCE_GAIN_8X:
+ {
+ ctx->gain = 8;
+ break;
+ }
+ case ILLUMINANCE_GAIN_16X:
+ {
+ ctx->gain = 16;
+ break;
+ }
+ case ILLUMINANCE_GAIN_111X:
+ {
+ ctx->gain = 111;
+ break;
+ }
+ default:
+ {
+ return ILLUMINANCE_ERROR;
+ }
+ }
+ return illuminance_write_register( ctx, ILLUMINANCE_REG_ANALOG, gain );
+}
+
+err_t illuminance_read_raw_data ( illuminance_t *ctx, uint16_t *ch_0, uint16_t *ch_1 )
+{
+ uint8_t rx_data = 0;
+ err_t error_flag = illuminance_read_register( ctx, ILLUMINANCE_REG_CONTROL, &rx_data );
+ if ( ( rx_data & ILLUMINANCE_CONTROL_ADC_VALID ) &&
+ ( rx_data & ILLUMINANCE_CONTROL_ADC_INTR ) &&
+ ( ILLUMINANCE_OK == error_flag ) )
+ {
+ error_flag |= illuminance_read_register( ctx, ILLUMINANCE_REG_DATA0_LOW, &rx_data );
+ *ch_0 = rx_data;
+ error_flag |= illuminance_read_register( ctx, ILLUMINANCE_REG_DATA0_HIGH, &rx_data );
+ *ch_0 |= ( ( uint16_t ) rx_data << 8 );
+
+ error_flag |= illuminance_read_register( ctx, ILLUMINANCE_REG_DATA1_LOW, &rx_data );
+ *ch_1 = rx_data;
+ error_flag |= illuminance_read_register( ctx, ILLUMINANCE_REG_DATA1_HIGH, &rx_data );
+ *ch_1 |= ( ( uint16_t ) rx_data << 8 );
+
+ // clear interrupts
+ illuminance_generic_write ( ctx, ILLUMINANCE_CMD_BIT |
+ ILLUMINANCE_TRANSACTION_SPEC_FUNC |
+ ILLUMINANCE_SPEC_FUNC_INT_CLEAR, 0, 0 );
+ return error_flag;
+ }
+ return ILLUMINANCE_ERROR;
+}
+
+// ------------------------------------------------------------------------- END
diff --git a/clicks/illuminance/memake.txt b/clicks/illuminance/memake.txt
deleted file mode 100644
index 79eac1e51a..0000000000
--- a/clicks/illuminance/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Illuminance
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/inclinometer2/CMakeLists.txt b/clicks/inclinometer2/CMakeLists.txt
new file mode 100644
index 0000000000..2fb737920d
--- /dev/null
+++ b/clicks/inclinometer2/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_inclinometer2 LANGUAGES MikroC)
+else()
+ project(example_inclinometer2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_inclinometer2
+ example/main.c
+
+)
+
+
+############################ example_inclinometer2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_inclinometer2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_inclinometer2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_inclinometer2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_inclinometer2)
+target_link_libraries(example_inclinometer2 PUBLIC Click.Inclinometer2)
+############################ example_inclinometer2 GENERATED CODE END ###########################
diff --git a/clicks/inclinometer2/changelog.md b/clicks/inclinometer2/changelog.md
index 34c1de4c45..ca09ef759f 100644
--- a/clicks/inclinometer2/changelog.md
+++ b/clicks/inclinometer2/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.2
+### Version 2.1.0.4
- Initial release
diff --git a/clicks/inclinometer2/doc/doxy/Doxyfile.doxy b/clicks/inclinometer2/doc/doxy/Doxyfile.doxy
index 22353b6007..716ace4c4b 100644
--- a/clicks/inclinometer2/doc/doxy/Doxyfile.doxy
+++ b/clicks/inclinometer2/doc/doxy/Doxyfile.doxy
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY = ../clicks/inclinometer2/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/inclinometer2/temp/Help/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
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/inclinometer2/example \
- ../clicks/inclinometer2/lib/include \
- ../clicks/inclinometer2/README.md
+INPUT = ../cmake/inclinometer2/example \
+ ../cmake/inclinometer2/lib_inclinometer2/include \
+ ../cmake/inclinometer2/README.md
# 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
@@ -910,7 +910,7 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include
# command).
-EXAMPLE_PATH = ../clicks/inclinometer2/example
+EXAMPLE_PATH = ../cmake/inclinometer2/example
# 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
diff --git a/clicks/inclinometer2/doc/package/manifest.json b/clicks/inclinometer2/doc/package/manifest.json
index 04ea38ac5f..e45b513503 100644
--- a/clicks/inclinometer2/doc/package/manifest.json
+++ b/clicks/inclinometer2/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Motion",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Motion",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Inclinometer 2 click",
"example_list": [
@@ -26,10 +25,13 @@
"name": "mikroe.click.inclinometer2",
"product_link": "https://www.mikroe.com/inclinometer-2-click",
"short_description": "Inclinometer 2 Click is a compact add-on board that measures the orientation angle of an object with respect to the force of gravity. This board features the IIS2ICLX, high accuracy, and resolution two-axis inclinometer from STMicroelectronics. It allows selectable full-scale measurements in ranges of ±0.5/±1/±2/±3g in two axes with a configurable host interface that supports both SPI and I2C serial communication. The sensing element is manufactured using a dedicated micromachining process developed by STMicroelectronics to produce inertial sensors and actuators on silicon wafers.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.2"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.4",
+ "cmake": true,
+ "alias": "Click.Inclinometer2",
+ "subdir_name": "lib_inclinometer2"
}
diff --git a/clicks/inclinometer2/example/CMakeLists.txt b/clicks/inclinometer2/example/CMakeLists.txt
new file mode 100644
index 0000000000..5bfc80c06c
--- /dev/null
+++ b/clicks/inclinometer2/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_inclinometer2 LANGUAGES MikroC)
+else()
+ project(example_inclinometer2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_inclinometer2
+ main.c
+
+)
+
+
+############################ example_inclinometer2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_inclinometer2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_inclinometer2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_inclinometer2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_inclinometer2)
+target_link_libraries(example_inclinometer2 PUBLIC Click.Inclinometer2)
+############################ example_inclinometer2 GENERATED CODE END ###########################
diff --git a/clicks/inclinometer2/example/manifest.exm b/clicks/inclinometer2/example/manifest.exm
index f3ee0ed1b0..16ea5d835e 100644
--- a/clicks/inclinometer2/example/manifest.exm
+++ b/clicks/inclinometer2/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Inclinometer 2 Click",
"description": "Inclinometer 2 Click is a compact add-on board that measures the orientation angle of an object with respect to the force of gravity. This board features the IIS2ICLX, high accuracy, and resolution two-axis inclinometer from STMicroelectronics. It allows selectable full-scale measurements in ranges of ±0.5/±1/±2/±3g in two axes with a configurable host interface that supports both SPI and I2C serial communication. The sensing element is manufactured using a dedicated micromachining process developed by STMicroelectronics to produce inertial sensors and actuators on silicon wafers.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","IIS2ICLXTR"],
"category" : ["Motion"]
}
diff --git a/clicks/inclinometer2/example/memake.txt b/clicks/inclinometer2/example/memake.txt
deleted file mode 100644
index c4177bb328..0000000000
--- a/clicks/inclinometer2/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_inclinometer2
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Inclinometer2
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/inclinometer2/lib/memake.txt b/clicks/inclinometer2/lib/memake.txt
deleted file mode 100644
index 06f07522a3..0000000000
--- a/clicks/inclinometer2/lib/memake.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-type: library
-target: lib_inclinometer2
-
-#begin python
-import re
-
-if ( re.match("(^PIC18F(.+)[KQ]4[23]$)|(^PIC32(.+)$)",MEMAKE_MCU_NAME) ):
- sample_mode_reg_case = "SAMPLE_REG_CASE_1"
-else:
- sample_mode_reg_case = "SAMPLE_REG_CASE_2"
-#end python
-
-defines: {
- <[sample_mode_reg_case]>
-}
-
-sources: {
- src/inclinometer2.c
-}
-
-headers: {
- include/inclinometer2.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/inclinometer2.h) dst(include/inclinometer2.h)
- src(include/spi_specifics.h) dst(include/spi_specifics.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.Inclinometer2
diff --git a/clicks/inclinometer2/lib_inclinometer2/CMakeLists.txt b/clicks/inclinometer2/lib_inclinometer2/CMakeLists.txt
new file mode 100644
index 0000000000..5110b943f8
--- /dev/null
+++ b/clicks/inclinometer2/lib_inclinometer2/CMakeLists.txt
@@ -0,0 +1,34 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_inclinometer2 LANGUAGES MikroC)
+else()
+ project(lib_inclinometer2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_inclinometer2 STATIC
+ src/inclinometer2.c
+ include/inclinometer2.h
+)
+add_library(Click.Inclinometer2 ALIAS lib_inclinometer2)
+
+if (${MCU_NAME} MATCHES "(^PIC18F(.+)[KQ]4[23]$)|(^PIC32(.+)$)")
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_1")
+else()
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_2")
+endif()
+
+target_compile_definitions(lib_inclinometer2 PUBLIC ${sample_mode_reg_case})
+
+
+target_include_directories(lib_inclinometer2 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_inclinometer2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_inclinometer2 PUBLIC MikroSDK.Driver)
diff --git a/clicks/inclinometer2/lib_inclinometer2/include/Click.Inclinometer2 b/clicks/inclinometer2/lib_inclinometer2/include/Click.Inclinometer2
new file mode 100644
index 0000000000..2e74a92d03
--- /dev/null
+++ b/clicks/inclinometer2/lib_inclinometer2/include/Click.Inclinometer2
@@ -0,0 +1 @@
+#include "inclinometer2.h"
diff --git a/clicks/inclinometer2/lib/include/inclinometer2.h b/clicks/inclinometer2/lib_inclinometer2/include/inclinometer2.h
similarity index 98%
rename from clicks/inclinometer2/lib/include/inclinometer2.h
rename to clicks/inclinometer2/lib_inclinometer2/include/inclinometer2.h
index 262cef2878..bab26d9833 100644
--- a/clicks/inclinometer2/lib/include/inclinometer2.h
+++ b/clicks/inclinometer2/lib_inclinometer2/include/inclinometer2.h
@@ -246,12 +246,12 @@ extern "C"{
* @brief Inclinometer 2 calculation values.
* @details Specified calculation values of Inclinometer 2 Click driver.
*/
-#define INCLINOMETER2_ACCEL_FSR_0p5G_RES 0.015
-#define INCLINOMETER2_ACCEL_FSR_1G_RES 0.031
-#define INCLINOMETER2_ACCEL_FSR_2G_RES 0.061
-#define INCLINOMETER2_ACCEL_FSR_3G_RES 0.122
-#define INCLINOMETER2_ROOM_TEMP 25.0
-#define INCLINOMETER2_TEMP_SENS 256.0
+#define INCLINOMETER2_ACCEL_FSR_0p5G_RES 0.015f
+#define INCLINOMETER2_ACCEL_FSR_1G_RES 0.031f
+#define INCLINOMETER2_ACCEL_FSR_2G_RES 0.061f
+#define INCLINOMETER2_ACCEL_FSR_3G_RES 0.122f
+#define INCLINOMETER2_ROOM_TEMP 25.0f
+#define INCLINOMETER2_TEMP_SENS 256.0f
/**
* @brief Inclinometer 2 WHO_AM_I register value.
@@ -321,6 +321,7 @@ typedef enum
* @brief Inclinometer 2 Click driver interface.
* @details Definition of driver interface of Inclinometer 2 Click driver.
*/
+struct inclinometer2_s;
typedef err_t ( *inclinometer2_master_io_t )( struct inclinometer2_s*, uint8_t, uint8_t*, uint8_t ); /**< Driver serial interface. */
/**
diff --git a/clicks/inclinometer2/lib_inclinometer2/include/spi_specifics.h b/clicks/inclinometer2/lib_inclinometer2/include/spi_specifics.h
new file mode 100644
index 0000000000..0bba508c77
--- /dev/null
+++ b/clicks/inclinometer2/lib_inclinometer2/include/spi_specifics.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+** Copyright (C) 2021 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+/*!
+ * @file spi_specifics.h
+ * @brief This file contains SPI specific macros, functions, etc.
+ */
+
+#ifndef _SPI_SPECIFICS_
+#define _SPI_SPECIFICS_
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+#include "mcu_definitions.h"
+
+// mikroE toolchain specific
+#if defined(__MIKROC_AI_FOR_PIC__) || defined (__MIKROC_AI_FOR_DSPIC__) || \
+ defined(__MIKROC_AI_FOR_PIC32__)
+
+#ifdef __MIKROC_AI_FOR_PIC__
+ #define BIT_INDEX 7
+#elif defined(__MIKROC_AI_FOR_PIC32__)
+ #define BIT_INDEX 9
+#endif
+
+#ifdef SAMPLE_REG_CASE_1
+ #ifdef __MIKROC_AI_FOR_PIC32__
+ #define SAMPLE_REG_ADDRESS(index) HAL_LL_SPI ## index ## CON_ADDRESS
+ #else
+ #define SAMPLE_REG_ADDRESS(index) HAL_LL_SPI ## index ## CON1_ADDRESS
+ #endif
+#else
+ #define SAMPLE_REG_ADDRESS(index) HAL_LL_SSP ## index ## STAT_ADDRESS
+#endif
+
+#if defined(SPI_MODULE) || defined(SPI_MODULE_1)
+ #define SET_SPI_DATA_SAMPLE_MIDDLE1 clear_reg_bit(SAMPLE_REG_ADDRESS(1), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE1 set_reg_bit(SAMPLE_REG_ADDRESS(1), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE1
+ #define SET_SPI_DATA_SAMPLE_EDGE1
+#endif
+
+#ifdef SPI_MODULE_2
+ #define SET_SPI_DATA_SAMPLE_MIDDLE2 clear_reg_bit(SAMPLE_REG_ADDRESS(2), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE2 set_reg_bit(SAMPLE_REG_ADDRESS(2), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE2
+ #define SET_SPI_DATA_SAMPLE_EDGE2
+#endif
+
+#ifdef SPI_MODULE_3
+ #define SET_SPI_DATA_SAMPLE_MIDDLE3 clear_reg_bit(SAMPLE_REG_ADDRESS(3), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE3 set_reg_bit(SAMPLE_REG_ADDRESS(3), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE3
+ #define SET_SPI_DATA_SAMPLE_EDGE3
+#endif
+
+#ifdef SPI_MODULE_4
+ #define SET_SPI_DATA_SAMPLE_MIDDLE4 clear_reg_bit(SAMPLE_REG_ADDRESS(4), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE4 set_reg_bit(SAMPLE_REG_ADDRESS(4), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE4
+ #define SET_SPI_DATA_SAMPLE_EDGE4
+#endif
+
+#ifdef SPI_MODULE_5
+ #define SET_SPI_DATA_SAMPLE_MIDDLE5 clear_reg_bit(SAMPLE_REG_ADDRESS(5), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE5 set_reg_bit(SAMPLE_REG_ADDRESS(5), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE5
+ #define SET_SPI_DATA_SAMPLE_EDGE5
+#endif
+
+#ifdef SPI_MODULE_6
+ #define SET_SPI_DATA_SAMPLE_MIDDLE6 clear_reg_bit(SAMPLE_REG_ADDRESS(6), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE6 set_reg_bit(SAMPLE_REG_ADDRESS(6), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE6
+ #define SET_SPI_DATA_SAMPLE_EDGE6
+#endif
+
+
+#define SET_SPI_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE1 SET_SPI_DATA_SAMPLE_MIDDLE2 \
+ SET_SPI_DATA_SAMPLE_MIDDLE3 SET_SPI_DATA_SAMPLE_MIDDLE4 \
+ SET_SPI_DATA_SAMPLE_MIDDLE5 SET_SPI_DATA_SAMPLE_MIDDLE6
+#define SET_SPI_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE1 SET_SPI_DATA_SAMPLE_EDGE2 \
+ SET_SPI_DATA_SAMPLE_EDGE3 SET_SPI_DATA_SAMPLE_EDGE4 \
+ SET_SPI_DATA_SAMPLE_EDGE5 SET_SPI_DATA_SAMPLE_EDGE6
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE
+ #define SET_SPI_DATA_SAMPLE_EDGE
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _SPI_SPECIFICS_
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/inclinometer2/lib/src/inclinometer2.c b/clicks/inclinometer2/lib_inclinometer2/src/inclinometer2.c
similarity index 96%
rename from clicks/inclinometer2/lib/src/inclinometer2.c
rename to clicks/inclinometer2/lib_inclinometer2/src/inclinometer2.c
index 99b644b6b2..0ee4f70224 100644
--- a/clicks/inclinometer2/lib/src/inclinometer2.c
+++ b/clicks/inclinometer2/lib_inclinometer2/src/inclinometer2.c
@@ -222,7 +222,7 @@ err_t inclinometer2_read_register ( inclinometer2_t *ctx, uint8_t reg, uint8_t *
err_t inclinometer2_check_communication ( inclinometer2_t *ctx )
{
- uint8_t who_am_i;
+ uint8_t who_am_i = 0;
if ( INCLINOMETER2_OK == inclinometer2_read_register ( ctx, INCLINOMETER2_REG_WHO_AM_I, &who_am_i ) )
{
if ( INCLINOMETER2_WHO_AM_I == who_am_i )
@@ -256,7 +256,7 @@ err_t inclinometer2_set_fsr_and_odr ( inclinometer2_t *ctx, inclinometer2_fsr_t
{
ctx->resolution = INCLINOMETER2_ACCEL_FSR_3G_RES;
}
- uint8_t reg_data;
+ uint8_t reg_data = 0;
err_t error_flag = inclinometer2_read_register ( ctx, INCLINOMETER2_REG_CTRL1_XL, ®_data );
reg_data &= ~INCLINOMETER2_FSR_BIT_MASK;
reg_data |= ( fsr << 2 );
@@ -274,8 +274,8 @@ err_t inclinometer2_get_accel ( inclinometer2_t *ctx, float *x_axis, float *y_ax
{
if ( INCLINOMETER2_OK == inclinometer2_generic_read ( ctx, INCLINOMETER2_REG_OUTX_L_A, data_buf, 4 ) )
{
- *x_axis = ( ( ( int16_t ) data_buf[ 1 ] << 8 ) | data_buf[ 0 ] ) * ctx->resolution;
- *y_axis = ( ( ( int16_t ) data_buf[ 3 ] << 8 ) | data_buf[ 2 ] ) * ctx->resolution;
+ *x_axis = ( ( int16_t ) ( ( ( int16_t ) data_buf[ 1 ] << 8 ) | data_buf[ 0 ] ) ) * ctx->resolution;
+ *y_axis = ( ( int16_t ) ( ( ( int16_t ) data_buf[ 3 ] << 8 ) | data_buf[ 2 ] ) ) * ctx->resolution;
return INCLINOMETER2_OK;
}
}
@@ -291,7 +291,7 @@ err_t inclinometer2_get_temperature ( inclinometer2_t *ctx, float *temperature )
if ( INCLINOMETER2_OK == inclinometer2_generic_read ( ctx, INCLINOMETER2_REG_OUT_TEMP_L, data_buf, 2 ) )
{
*temperature = INCLINOMETER2_ROOM_TEMP +
- ( ( ( int16_t ) data_buf[ 1 ] << 8 ) | data_buf[ 0 ] ) / INCLINOMETER2_TEMP_SENS;
+ ( ( int16_t ) ( ( ( int16_t ) data_buf[ 1 ] << 8 ) | data_buf[ 0 ] ) ) / INCLINOMETER2_TEMP_SENS;
return INCLINOMETER2_OK;
}
}
diff --git a/clicks/inclinometer2/memake.txt b/clicks/inclinometer2/memake.txt
deleted file mode 100644
index 4470750676..0000000000
--- a/clicks/inclinometer2/memake.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-type: subdirs
-
-project: Inclinometer2
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/irda2/CMakeLists.txt b/clicks/irda2/CMakeLists.txt
new file mode 100644
index 0000000000..8decb474db
--- /dev/null
+++ b/clicks/irda2/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_irda2 LANGUAGES MikroC)
+else()
+ project(example_irda2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_irda2
+ example/main.c
+
+)
+
+
+############################ example_irda2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_irda2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_irda2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_irda2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_irda2)
+target_link_libraries(example_irda2 PUBLIC Click.IrDA2)
+############################ example_irda2 GENERATED CODE END ###########################
diff --git a/clicks/irda2/README.md b/clicks/irda2/README.md
index b8350bfe5e..ede6b39fb4 100644
--- a/clicks/irda2/README.md
+++ b/clicks/irda2/README.md
@@ -3,7 +3,7 @@
---
# IrDA 2 click
-IrDA2 click features the TFDU4101 infrared transceiver module as well as MCP2120 infrared encoder/decoder from Microchip connected with the 7.3728 MHz external crystal. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target board via UART interface and the following mikroBUS™ pins: AN, RST, CS.
+> IrDA2 click features the TFDU4101 infrared transceiver module as well as MCP2120 infrared encoder/decoder from Microchip connected with the 7.3728 MHz external crystal. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target board via UART interface and the following mikroBUS™ pins: AN, RST, CS.
@@ -16,8 +16,8 @@ IrDA2 click features the TFDU4101 infrared transceiver module as well as MCP2120
#### Click library
-- **Author** : Jelena Milosavljevic
-- **Date** : Jun 2021.
+- **Author** : MikroE Team
+- **Date** : Jun 2023.
- **Type** : UART type
@@ -53,14 +53,14 @@ void irda2_default_cfg ( irda2_t *ctx );
#### Example key functions :
-- `irda2_mode_setup` This function allows IrDA 2 click mode to be set.
+- `irda2_generic_write` This function writes a desired number of data bytes by using UART serial interface.
```c
-void irda2_mode_setup( irda2_t *ctx, irda2_mode_t state );
+err_t irda2_generic_write ( irda2_t *ctx, uint8_t *data_in, uint16_t len )
```
-- `irda2_pwr_setup` This function allows IrDA 2 click power mode to be set.
+- `irda2_generic_read` This function reads a desired number of data bytes by using UART serial interface.
```c
-void irda2_pwr_setup( irda2_t *ctx, irda2_pwr_t state );
+err_t irda2_generic_read ( irda2_t *ctx, uint8_t *data_out, uint16_t len );
```
- `irda2_reset` This function executes a device reset operation.
@@ -70,17 +70,18 @@ void irda2_reset( irda2_t *ctx );
## Example Description
-> This example demonstrates the use of IrDA 2 click boards. The example can perform both roles, transmitter and receiver.
+> This example demonstrates the use of an IrDA 2 click board by showing the communication between the two click boards.
**The demo application is composed of two sections :**
### Application Init
-> Initializes UART driver and all used control pins. Also clears the response buffer.
+> Initalizes device and makes an initial log.
```c
-void application_init( void ) {
+void application_init( void )
+{
irda2_cfg_t irda2_cfg;
log_cfg_t logger_cfg;
@@ -95,75 +96,48 @@ void application_init( void ) {
*/
LOG_MAP_USB_UART( logger_cfg );
log_init( &logger, &logger_cfg );
- log_printf( &logger, "*** IrDA initialization done ***\r\n" );
- log_printf( &logger, "**********************************\r\n" );
+ log_info( &logger, " Application Init " );
// Click initialization.
-
irda2_cfg_setup( &irda2_cfg );
IRDA2_MAP_MIKROBUS( irda2_cfg, MIKROBUS_1 );
- irda2_init( &irda2, &irda2_cfg );
+ if ( UART_ERROR == irda2_init( &irda2, &irda2_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
irda2_default_cfg( &irda2 );
irda2_reset( &irda2 );
- // Clear response.
-
- memset( rx_message, 0, sizeof( rx_message ) );
+#ifdef DEMO_APP_TRANSMITTER
+ log_printf( &logger, " Application Mode: Transmitter\r\n" );
+#else
+ log_printf( &logger, " Application Mode: Receiver\r\n" );
+#endif
+ log_info( &logger, " Application Task " );
}
```
### Application Task
-> Demonstrates the use of IrDA clicks which can be used as transmitter or receiver. There are four different examples in this project.
-Uncomment one of the below macros to select which example will be executed. By default the DEMO_APP_TRANSMITTER_1 example is selected.
+> Depending on the selected application mode, it reads all the received data or sends the desired text message once per second.
```c
-void application_task( void ) {
-
-#ifdef DEMO_APP_RECEIVER_1
- rx_message[ 0 ] = irda2_generic_single_receive( &irda2 );
-
- if ( rx_message[ 0 ] != 0 ) {
- log_printf( &logger, "%c", ( char ) rx_message[ 0 ] );
+void application_task( void )
+{
+#ifdef DEMO_APP_TRANSMITTER
+ irda2_generic_write( &irda2, DEMO_TEXT_MESSAGE, strlen( DEMO_TEXT_MESSAGE ) );
+ log_printf( &logger, "%s", ( char * ) DEMO_TEXT_MESSAGE );
+ Delay_ms( 1000 );
+#else
+ uint8_t rx_byte = 0;
+ if ( 1 == irda2_generic_read( &irda2, &rx_byte, 1 ) )
+ {
+ log_printf( &logger, "%c", rx_byte );
}
- Delay_ms( 100 );
-
#endif
-
-#ifdef DEMO_APP_RECEIVER_2
-
- irda2_generic_multiple_receive( &irda2, rx_message, '\n' );
-
- log_printf( &logger, "RECEIVED MESSAGE : " );
- log_printf( &logger, "%s\r\n", rx_message );
- Delay_ms( 100 );
-
-#endif
-
-#ifdef DEMO_APP_TRANSMITTER_1
-
- irda2_generic_multiple_send( &irda2, tx_message );
-
- log_printf( &logger, "MESSAGE SENT\r\n" );
- Delay_ms( 2000 );
-
-#endif
-
-#ifdef DEMO_APP_TRANSMITTER_2
-
- idx = 0;
-
- while ( tx_message[ idx ] != '\0' ) {
- irda2_generic_single_send( &irda2, tx_message[ idx++ ] );
- }
-
- log_printf( &logger, "MESSAGE SENT\r\n" );
- Delay_ms( 2000 );
-
-#endif
-
}
```
diff --git a/clicks/irda2/changelog.md b/clicks/irda2/changelog.md
index b96039c092..0426704bc7 100644
--- a/clicks/irda2/changelog.md
+++ b/clicks/irda2/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.3
+### Version 2.1.0.3
- Initial release
diff --git a/clicks/irda2/details.md b/clicks/irda2/details.md
index bc27ac8bf2..b4f8f38afa 100644
--- a/clicks/irda2/details.md
+++ b/clicks/irda2/details.md
@@ -2,7 +2,7 @@
---
# IrDA 2 click
-IrDA2 click features the TFDU4101 infrared transceiver module as well as MCP2120 infrared encoder/decoder from Microchip connected with the 7.3728 MHz external crystal. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target board via UART interface and the following mikroBUS™ pins: AN, RST, CS.
+> IrDA2 click features the TFDU4101 infrared transceiver module as well as MCP2120 infrared encoder/decoder from Microchip connected with the 7.3728 MHz external crystal. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target board via UART interface and the following mikroBUS™ pins: AN, RST, CS.
@@ -15,8 +15,8 @@ IrDA2 click features the TFDU4101 infrared transceiver module as well as MCP2120
#### Click library
-- **Author** : Jelena Milosavljevic
-- **Date** : Jun 2021.
+- **Author** : MikroE Team
+- **Date** : Jun 2023.
- **Type** : UART type
@@ -52,14 +52,14 @@ void irda2_default_cfg ( irda2_t *ctx );
#### Example key functions :
-- `irda2_mode_setup` This function allows IrDA 2 click mode to be set.
+- `irda2_generic_write` This function writes a desired number of data bytes by using UART serial interface.
```c
-void irda2_mode_setup( irda2_t *ctx, irda2_mode_t state );
+err_t irda2_generic_write ( irda2_t *ctx, uint8_t *data_in, uint16_t len )
```
-- `irda2_pwr_setup` This function allows IrDA 2 click power mode to be set.
+- `irda2_generic_read` This function reads a desired number of data bytes by using UART serial interface.
```c
-void irda2_pwr_setup( irda2_t *ctx, irda2_pwr_t state );
+err_t irda2_generic_read ( irda2_t *ctx, uint8_t *data_out, uint16_t len );
```
- `irda2_reset` This function executes a device reset operation.
@@ -69,17 +69,18 @@ void irda2_reset( irda2_t *ctx );
## Example Description
-> This example demonstrates the use of IrDA 2 click boards. The example can perform both roles, transmitter and receiver.
+> This example demonstrates the use of an IrDA 2 click board by showing the communication between the two click boards.
**The demo application is composed of two sections :**
### Application Init
-> Initializes UART driver and all used control pins. Also clears the response buffer.
+> Initalizes device and makes an initial log.
```c
-void application_init( void ) {
+void application_init( void )
+{
irda2_cfg_t irda2_cfg;
log_cfg_t logger_cfg;
@@ -94,75 +95,48 @@ void application_init( void ) {
*/
LOG_MAP_USB_UART( logger_cfg );
log_init( &logger, &logger_cfg );
- log_printf( &logger, "*** IrDA initialization done ***\r\n" );
- log_printf( &logger, "**********************************\r\n" );
+ log_info( &logger, " Application Init " );
// Click initialization.
-
irda2_cfg_setup( &irda2_cfg );
IRDA2_MAP_MIKROBUS( irda2_cfg, MIKROBUS_1 );
- irda2_init( &irda2, &irda2_cfg );
+ if ( UART_ERROR == irda2_init( &irda2, &irda2_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
irda2_default_cfg( &irda2 );
irda2_reset( &irda2 );
- // Clear response.
-
- memset( rx_message, 0, sizeof( rx_message ) );
+#ifdef DEMO_APP_TRANSMITTER
+ log_printf( &logger, " Application Mode: Transmitter\r\n" );
+#else
+ log_printf( &logger, " Application Mode: Receiver\r\n" );
+#endif
+ log_info( &logger, " Application Task " );
}
```
### Application Task
-> Demonstrates the use of IrDA clicks which can be used as transmitter or receiver. There are four different examples in this project.
-Uncomment one of the below macros to select which example will be executed. By default the DEMO_APP_TRANSMITTER_1 example is selected.
+> Depending on the selected application mode, it reads all the received data or sends the desired text message once per second.
```c
-void application_task( void ) {
-
-#ifdef DEMO_APP_RECEIVER_1
- rx_message[ 0 ] = irda2_generic_single_receive( &irda2 );
-
- if ( rx_message[ 0 ] != 0 ) {
- log_printf( &logger, "%c", ( char ) rx_message[ 0 ] );
+void application_task( void )
+{
+#ifdef DEMO_APP_TRANSMITTER
+ irda2_generic_write( &irda2, DEMO_TEXT_MESSAGE, strlen( DEMO_TEXT_MESSAGE ) );
+ log_printf( &logger, "%s", ( char * ) DEMO_TEXT_MESSAGE );
+ Delay_ms( 1000 );
+#else
+ uint8_t rx_byte = 0;
+ if ( 1 == irda2_generic_read( &irda2, &rx_byte, 1 ) )
+ {
+ log_printf( &logger, "%c", rx_byte );
}
- Delay_ms( 100 );
-
#endif
-
-#ifdef DEMO_APP_RECEIVER_2
-
- irda2_generic_multiple_receive( &irda2, rx_message, '\n' );
-
- log_printf( &logger, "RECEIVED MESSAGE : " );
- log_printf( &logger, "%s\r\n", rx_message );
- Delay_ms( 100 );
-
-#endif
-
-#ifdef DEMO_APP_TRANSMITTER_1
-
- irda2_generic_multiple_send( &irda2, tx_message );
-
- log_printf( &logger, "MESSAGE SENT\r\n" );
- Delay_ms( 2000 );
-
-#endif
-
-#ifdef DEMO_APP_TRANSMITTER_2
-
- idx = 0;
-
- while ( tx_message[ idx ] != '\0' ) {
- irda2_generic_single_send( &irda2, tx_message[ idx++ ] );
- }
-
- log_printf( &logger, "MESSAGE SENT\r\n" );
- Delay_ms( 2000 );
-
-#endif
-
}
```
diff --git a/clicks/irda2/doc/doxy/Doxyfile.doxy b/clicks/irda2/doc/doxy/Doxyfile.doxy
index ddddf98fb3..b8a749b992 100644
--- a/clicks/irda2/doc/doxy/Doxyfile.doxy
+++ b/clicks/irda2/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/irda2/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/irda2/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/irda2/example \
- ../clicks/irda2/lib/include \
- ../clicks/irda2/README.md
+INPUT = ../cmake/irda2/example \
+ ../cmake/irda2/lib_irda2/include \
+ ../cmake/irda2/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/irda2/example
+EXAMPLE_PATH = ../cmake/irda2/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/irda2/doc/package/manifest.json b/clicks/irda2/doc/package/manifest.json
index 7ad22666df..e3bd3a1af8 100644
--- a/clicks/irda2/doc/package/manifest.json
+++ b/clicks/irda2/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Optical",
+ "architecture": "ARM|PIC|PIC32|RISC-V",
+ "category": "Click Boards > Sensors > Optical",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "IrDA 2 click",
"example_list": [
@@ -26,14 +25,14 @@
"name": "mikroe.click.irda2",
"product_link": "https://www.mikroe.com/irda2-click",
"short_description": "IrDA2 click features the TFDU4101 infrared transceiver module as well as MCP2120 infrared encoder/decoder from Microchip connected with the 7.3728 MHz external crystal. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target board via UART interface and the following mikroBUS™ pins: AN, RST, CS.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "_type": "mikroSDK Library",
+ "related_projects": [
372
],
- "version": "2.0.0.3"
+ "version": "2.1.0.3",
+ "cmake": true,
+ "alias": "Click.IrDA2",
+ "subdir_name": "lib_irda2"
}
-
-
-
diff --git a/clicks/irda2/example/CMakeLists.txt b/clicks/irda2/example/CMakeLists.txt
new file mode 100644
index 0000000000..7c37a11659
--- /dev/null
+++ b/clicks/irda2/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_irda2 LANGUAGES MikroC)
+else()
+ project(example_irda2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_irda2
+ main.c
+
+)
+
+
+############################ example_irda2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_irda2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_irda2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_irda2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_irda2)
+target_link_libraries(example_irda2 PUBLIC Click.IrDA2)
+############################ example_irda2 GENERATED CODE END ###########################
diff --git a/clicks/irda2/example/main.c b/clicks/irda2/example/main.c
index c6b4fb945a..97d4108c27 100644
--- a/clicks/irda2/example/main.c
+++ b/clicks/irda2/example/main.c
@@ -3,49 +3,36 @@
* @brief IrDA 2 Click Example.
*
* # Description
- * This example demonstrates the use of IrDA 2 click boards.
- * The example can perform both roles, transmitter and receiver.
+ * This example demonstrates the use of an IrDA 2 click board by showing
+ * the communication between the two click boards.
*
* The demo application is composed of two sections :
- *
- * ## Application Init
- * Initializes UART driver and all used control pins.
- * Also clears the response buffer.
- *
+ *
+ * ## Application Init
+ * Initalizes device and makes an initial log.
+ *
* ## Application Task
- * Demonstrates the use of IrDA clicks which can be used as transmitter or
- * receiver. There are four different examples in this project.
- * Uncomment one of the below macros to select which example will be executed.
- * By default the DEMO_APP_TRANSMITTER_1 example is selected.
+ * Depending on the selected application mode, it reads all the received data or
+ * sends the desired text message once per second.
*
- * @author Jelena Milosavljevic
+ * @author MikroE Team
*
*/
-
-// ------------------------------------------------------------------- INCLUDES
-
#include "board.h"
#include "log.h"
#include "irda2.h"
-// ------------------------------------------------------------------ VARIABLES
+// Comment out the line below in order to switch the application mode to receiver
+#define DEMO_APP_TRANSMITTER
-#define PROCESS_BUFFER_SIZE 200
-// #define DEMO_APP_RECEIVER_1
-// #define DEMO_APP_RECEIVER_2
-#define DEMO_APP_TRANSMITTER_1
-// #define DEMO_APP_TRANSMITTER_2
+// Text message to send in the transmitter application mode
+#define DEMO_TEXT_MESSAGE "MIKROE - IrDA 2 click board\r\n\0"
static irda2_t irda2;
static log_t logger;
-static char tx_message[ ] = { 'M', 'i', 'k', 'r', 'o', 'E', '\r', '\n', '\0' };
-static char rx_message[ 10 ];
-static uint8_t idx;
-
-// ------------------------------------------------------ APPLICATION FUNCTIONS
-
-void application_init( void ) {
+void application_init ( void )
+{
irda2_cfg_t irda2_cfg;
log_cfg_t logger_cfg;
@@ -60,72 +47,48 @@ void application_init( void ) {
*/
LOG_MAP_USB_UART( logger_cfg );
log_init( &logger, &logger_cfg );
- log_printf( &logger, "*** IrDA initialization done ***\r\n" );
- log_printf( &logger, "**********************************\r\n" );
+ log_info( &logger, " Application Init " );
// Click initialization.
-
irda2_cfg_setup( &irda2_cfg );
IRDA2_MAP_MIKROBUS( irda2_cfg, MIKROBUS_1 );
- irda2_init( &irda2, &irda2_cfg );
+ if ( UART_ERROR == irda2_init( &irda2, &irda2_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
irda2_default_cfg( &irda2 );
irda2_reset( &irda2 );
- // Clear response.
-
- memset( rx_message, 0, sizeof( rx_message ) );
-}
-
-void application_task( void ) {
-
-#ifdef DEMO_APP_RECEIVER_1
- rx_message[ 0 ] = irda2_generic_single_receive( &irda2 );
-
- if ( rx_message[ 0 ] != 0 ) {
- log_printf( &logger, "%c", ( char ) rx_message[ 0 ] );
- }
- Delay_ms( 100 );
-
+#ifdef DEMO_APP_TRANSMITTER
+ log_printf( &logger, " Application Mode: Transmitter\r\n" );
+#else
+ log_printf( &logger, " Application Mode: Receiver\r\n" );
#endif
+ log_info( &logger, " Application Task " );
+}
-#ifdef DEMO_APP_RECEIVER_2
-
- irda2_generic_multiple_receive( &irda2, rx_message, '\n' );
-
- log_printf( &logger, "RECEIVED MESSAGE : " );
- log_printf( &logger, "%s\r\n", rx_message );
- Delay_ms( 100 );
-
-#endif
-
-#ifdef DEMO_APP_TRANSMITTER_1
-
- irda2_generic_multiple_send( &irda2, tx_message );
-
- log_printf( &logger, "MESSAGE SENT\r\n" );
- Delay_ms( 2000 );
-
-#endif
-
-#ifdef DEMO_APP_TRANSMITTER_2
-
- idx = 0;
-
- while ( tx_message[ idx ] != '\0' ) {
- irda2_generic_single_send( &irda2, tx_message[ idx++ ] );
+void application_task ( void )
+{
+#ifdef DEMO_APP_TRANSMITTER
+ irda2_generic_write( &irda2, DEMO_TEXT_MESSAGE, strlen( DEMO_TEXT_MESSAGE ) );
+ log_printf( &logger, "%s", ( char * ) DEMO_TEXT_MESSAGE );
+ Delay_ms( 1000 );
+#else
+ uint8_t rx_byte = 0;
+ if ( 1 == irda2_generic_read( &irda2, &rx_byte, 1 ) )
+ {
+ log_printf( &logger, "%c", rx_byte );
}
-
- log_printf( &logger, "MESSAGE SENT\r\n" );
- Delay_ms( 2000 );
-
#endif
-
}
-void main( void ) {
+void main ( void )
+{
application_init( );
- for ( ; ; ) {
+ for ( ; ; )
+ {
application_task( );
}
}
diff --git a/clicks/irda2/example/manifest.exm b/clicks/irda2/example/manifest.exm
index 15c36fafb5..af14b9669c 100644
--- a/clicks/irda2/example/manifest.exm
+++ b/clicks/irda2/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "IrDA 2 Click",
"description": "IrDA2 click features the TFDU4101 infrared transceiver module as well as MCP2120 infrared encoder/decoder from Microchip connected with the 7.3728 MHz external crystal. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target board via UART interface and the following mikroBUS™ pins: AN, RST, CS.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv"],
"hw" : ["click","TFDU4101"],
"category" : ["Optical"]
}
diff --git a/clicks/irda2/example/memake.txt b/clicks/irda2/example/memake.txt
deleted file mode 100644
index 7266c699fd..0000000000
--- a/clicks/irda2/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_irda2
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.IrDA2
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/irda2/lib/memake.txt b/clicks/irda2/lib/memake.txt
deleted file mode 100644
index 3e7a131170..0000000000
--- a/clicks/irda2/lib/memake.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-type: library
-
-target: lib_irda2
-
-sources: {
- src/irda2.c
-}
-
-headers: {
- include/irda2.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/irda2.h) dst(include/irda2.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.IrDA2
diff --git a/clicks/irda2/lib_irda2/CMakeLists.txt b/clicks/irda2/lib_irda2/CMakeLists.txt
new file mode 100644
index 0000000000..3dd6867fe2
--- /dev/null
+++ b/clicks/irda2/lib_irda2/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_irda2 LANGUAGES MikroC)
+else()
+ project(lib_irda2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_irda2 STATIC
+ src/irda2.c
+ include/irda2.h
+)
+add_library(Click.IrDA2 ALIAS lib_irda2)
+
+
+
+target_include_directories(lib_irda2 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_irda2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_irda2 PUBLIC MikroSDK.Driver)
diff --git a/clicks/irda2/lib_irda2/include/Click.IrDA2 b/clicks/irda2/lib_irda2/include/Click.IrDA2
new file mode 100644
index 0000000000..182703cff5
--- /dev/null
+++ b/clicks/irda2/lib_irda2/include/Click.IrDA2
@@ -0,0 +1 @@
+#include "irda2.h"
diff --git a/clicks/irda2/lib/include/irda2.h b/clicks/irda2/lib_irda2/include/irda2.h
similarity index 69%
rename from clicks/irda2/lib/include/irda2.h
rename to clicks/irda2/lib_irda2/include/irda2.h
index 986ca3c788..c28d212971 100644
--- a/clicks/irda2/lib/include/irda2.h
+++ b/clicks/irda2/lib_irda2/include/irda2.h
@@ -57,7 +57,8 @@ extern "C"{
* @details Specified size of driver ring buffer.
* @note Increase buffer size if needed.
*/
-#define DRV_BUFFER_SIZE 500
+#define IRDA2_TX_DRV_BUFFER_SIZE 100
+#define IRDA2_RX_DRV_BUFFER_SIZE 300
/*! @} */ // irda2_set
@@ -92,19 +93,16 @@ extern "C"{
typedef struct
{
// Output pins
-
- digital_out_t mod; /**< Description. */
- digital_out_t rst; /**< Description. */
- digital_out_t en; /**< Description. */
+ digital_out_t mod; /**< Mode selection pin. */
+ digital_out_t rst; /**< Reset pin. */
+ digital_out_t en; /**< Enable pin. */
// Modules
-
- uart_t uart; /**< UART driver object. */
+ uart_t uart; /**< UART driver object. */
// Buffers
-
- char uart_rx_buffer[ DRV_BUFFER_SIZE ]; /**< Buffer size. */
- char uart_tx_buffer[ DRV_BUFFER_SIZE ]; /**< Buffer size. */
+ uint8_t uart_rx_buffer[ IRDA2_RX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
+ uint8_t uart_tx_buffer[ IRDA2_TX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
} irda2_t;
@@ -115,23 +113,20 @@ typedef struct
typedef struct
{
// Communication gpio pins
-
- pin_name_t rx_pin; /**< RX pin. */
- pin_name_t tx_pin; /**< TX pin. */
+ pin_name_t rx_pin; /**< RX pin. */
+ pin_name_t tx_pin; /**< TX pin. */
// Additional gpio pins
-
- pin_name_t mod; /**< Description. */
- pin_name_t rst; /**< Description. */
- pin_name_t en; /**< Description. */
+ pin_name_t mod; /**< Mode selection pin. */
+ pin_name_t rst; /**< Reset pin. */
+ pin_name_t en; /**< Enable pin. */
// Static variable
-
- uint32_t baud_rate; /**< Clock speed. */
- bool uart_blocking; /**< Wait for interrupt or not. */
- uart_data_bits_t data_bit; /**< Data bits. */
- uart_parity_t parity_bit; /**< Parity bit. */
- uart_stop_bits_t stop_bit; /**< Stop bits. */
+ uint32_t baud_rate; /**< Clock speed. */
+ bool uart_blocking; /**< Wait for interrupt or not. */
+ uart_data_bits_t data_bit; /**< Data bits. */
+ uart_parity_t parity_bit; /**< Parity bit. */
+ uart_stop_bits_t stop_bit; /**< Stop bits. */
} irda2_cfg_t;
@@ -193,7 +188,6 @@ void irda2_cfg_setup ( irda2_cfg_t *cfg );
* See #irda2_cfg_t object definition for detailed explanation.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
*/
@@ -207,7 +201,6 @@ err_t irda2_init ( irda2_t *ctx, irda2_cfg_t *cfg );
* See #irda2_t object definition for detailed explanation.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note This function can consist any necessary configuration or setting to put
* device into operating mode.
@@ -240,59 +233,40 @@ void irda2_pwr_setup( irda2_t *ctx, irda2_pwr_t state );
* @brief Reset function.
* @details This function executes a device reset operation.
* @param ctx Click object.
- *
* @return Nothing
* @note After the reset operation was done, the device will be returned back
- * to normal mode.
+ * to normal mode.
*/
void irda2_reset( irda2_t *ctx );
/**
- * @brief Generic Multiple Send function.
- * @details This function allows data sending operation of multiple data
- * bytes to be performed.
- * @param ctx Click object.
- * @param tx_data Data to be sent.
- * @return Nothing
+ * @brief IrDA 2 data writing function.
+ * @details This function writes a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #irda2_t object definition for detailed explanation.
+ * @param[in] data_in : Data buffer for sending.
+ * @param[in] len : Number of bytes for sending.
+ * @return @li @c >=0 - Success,
+ * @li @c <0 - Error.
+ * See #err_t definition for detailed explanation.
* @note None.
*/
-void irda2_generic_multiple_send( irda2_t *ctx, char *tx_data );
-
-/**
- * @brief Generic Multiple Receive function.
- * @details This function allows data receiving operation of multiple data
- * bytes to be performed.
- * @param ctx Click object.
- * @param rx_data Memory where read data be stored.
- * @param termination_char Termination character.
- * @return Nothing
- * @note The function will receive data bytes from the device until termination
- * character was received. At the end of the received data buffer, this
- * function will add '\0' character.
- */
-void irda2_generic_multiple_receive( irda2_t *ctx, char *rx_data, char termination_char );
+err_t irda2_generic_write ( irda2_t *ctx, uint8_t *data_in, uint16_t len );
/**
- * @brief Generic Single Send function.
- * @details This function allows data sending operation of single data byte
- * to be performed.
- * @param ctx Click object.
- * @param tx_data Data to be sent.
- * @return Nothing
+ * @brief IrDA 2 data reading function.
+ * @details This function reads a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #irda2_t object definition for detailed explanation.
+ * @param[out] data_out : Output read data.
+ * @param[in] len : Number of bytes to be read.
+ * @return @li @c >0 - Number of data bytes read,
+ * @li @c <=0 - Error/Empty Ring buffer.
+ * See #err_t definition for detailed explanation.
* @note None.
*/
-void irda2_generic_single_send( irda2_t *ctx, char tx_data );
+err_t irda2_generic_read ( irda2_t *ctx, uint8_t *data_out, uint16_t len );
-/**
- * @brief Generic Single Receive function.
- * @details This function allows data receiving operation of single data
- * byte to be performed.
- * @param ctx Click object.
- *
- * @returns Received data byte.
- * @note None.
- */
-char irda2_generic_single_receive( irda2_t *ctx );
#ifdef __cplusplus
}
#endif
diff --git a/clicks/irda2/lib/src/irda2.c b/clicks/irda2/lib_irda2/src/irda2.c
similarity index 68%
rename from clicks/irda2/lib/src/irda2.c
rename to clicks/irda2/lib_irda2/src/irda2.c
index 3f8995bcf8..784ec3ac52 100644
--- a/clicks/irda2/lib/src/irda2.c
+++ b/clicks/irda2/lib_irda2/src/irda2.c
@@ -27,18 +27,16 @@
#include "irda2.h"
-void irda2_cfg_setup ( irda2_cfg_t *cfg ) {
-
+void irda2_cfg_setup ( irda2_cfg_t *cfg )
+{
// Communication gpio pins
-
cfg->rx_pin = HAL_PIN_NC;
cfg->tx_pin = HAL_PIN_NC;
// Additional gpio pins
-
- cfg->mod = HAL_PIN_NC;
+ cfg->mod = HAL_PIN_NC;
cfg->rst = HAL_PIN_NC;
- cfg->en = HAL_PIN_NC;
+ cfg->en = HAL_PIN_NC;
cfg->baud_rate = 9600;
cfg->data_bit = UART_DATA_BITS_DEFAULT;
@@ -47,26 +45,25 @@ void irda2_cfg_setup ( irda2_cfg_t *cfg ) {
cfg->uart_blocking = false;
}
-err_t irda2_init ( irda2_t *ctx, irda2_cfg_t *cfg ) {
+err_t irda2_init ( irda2_t *ctx, irda2_cfg_t *cfg )
+{
uart_config_t uart_cfg;
// Default config
-
uart_configure_default( &uart_cfg );
// Ring buffer mapping
-
ctx->uart.tx_ring_buffer = ctx->uart_tx_buffer;
ctx->uart.rx_ring_buffer = ctx->uart_rx_buffer;
// UART module config
-
- uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
- uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
+ uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
+ uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
uart_cfg.rx_ring_size = sizeof( ctx->uart_rx_buffer );
- if ( uart_open( &ctx->uart, &uart_cfg ) == UART_ERROR ) {
+ if ( UART_ERROR == uart_open( &ctx->uart, &uart_cfg ) )
+ {
return UART_ERROR;
}
uart_set_baud( &ctx->uart, cfg->baud_rate );
@@ -84,59 +81,39 @@ err_t irda2_init ( irda2_t *ctx, irda2_cfg_t *cfg ) {
return UART_SUCCESS;
}
-void irda2_default_cfg( irda2_t *ctx ) {
+void irda2_default_cfg( irda2_t *ctx )
+{
digital_out_high( &ctx->rst );
irda2_pwr_setup( ctx, IRDA2_PWR_ON );
irda2_mode_setup( ctx, IRDA2_MODE_DATA );
}
-void irda2_mode_setup( irda2_t *ctx, irda2_mode_t state ) {
+void irda2_mode_setup( irda2_t *ctx, irda2_mode_t state )
+{
digital_out_write( &ctx->mod, state );
}
-void irda2_pwr_setup( irda2_t *ctx, irda2_pwr_t state ) {
+void irda2_pwr_setup( irda2_t *ctx, irda2_pwr_t state )
+{
digital_out_write( &ctx->en, state );
}
-void irda2_reset( irda2_t *ctx ) {
+void irda2_reset( irda2_t *ctx )
+{
digital_out_low( &ctx->rst );
Delay_100ms( );
digital_out_high( &ctx->rst );
Delay_1sec( );
}
-void irda2_generic_multiple_send( irda2_t *ctx, char *tx_data ) {
- while ( *tx_data ) {
- uart_write( &ctx->uart, tx_data, 1 );
- *tx_data++;
- }
+err_t irda2_generic_write ( irda2_t *ctx, uint8_t *data_in, uint16_t len )
+{
+ return uart_write( &ctx->uart, data_in, len );
}
-void irda2_generic_multiple_receive( irda2_t *ctx, char *rx_data, char termination_char ) {
- char rx_dat;
- int32_t rsp_size;
-
- rx_dat = termination_char + 1;
-
- while ( rx_dat != termination_char ) {
- rsp_size = uart_read( &ctx->uart, &rx_dat, 1 );
- if ( rsp_size != -1 ) {
- *rx_data++ = rx_dat;
- }
- }
-
- *rx_data = '\0';
+err_t irda2_generic_read ( irda2_t *ctx, uint8_t *data_out, uint16_t len )
+{
+ return uart_read( &ctx->uart, data_out, len );
}
-void irda2_generic_single_send( irda2_t *ctx, char tx_data ) {
- uart_write( &ctx->uart, &tx_data, 1 );
-}
-
-char irda2_generic_single_receive( irda2_t *ctx ) {
- char rx_data;
- while ( uart_read( &ctx->uart, &rx_data, 1 ) <= 0 ) {
- Delay_1ms( );
- }
- return rx_data;
-}
// ------------------------------------------------------------------------- END
diff --git a/clicks/irda2/memake.txt b/clicks/irda2/memake.txt
deleted file mode 100644
index f9ef122819..0000000000
--- a/clicks/irda2/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: IrDA2
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/irthermo3/CHANGELOG.md b/clicks/irthermo3/CHANGELOG.md
index 77e79113ac..d53b42a3af 100644
--- a/clicks/irthermo3/CHANGELOG.md
+++ b/clicks/irthermo3/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.9
+### Version 2.1.0.9
- Initial release
diff --git a/clicks/irthermo3/CMakeLists.txt b/clicks/irthermo3/CMakeLists.txt
new file mode 100644
index 0000000000..fcc4298ad3
--- /dev/null
+++ b/clicks/irthermo3/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_irthermo3 LANGUAGES MikroC)
+else()
+ project(example_irthermo3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_irthermo3
+ example/main.c
+
+)
+
+
+############################ example_irthermo3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_irthermo3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_irthermo3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_irthermo3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_irthermo3)
+target_link_libraries(example_irthermo3 PUBLIC Click.IrThermo3)
+############################ example_irthermo3 GENERATED CODE END ###########################
diff --git a/clicks/irthermo3/DETAILS.md b/clicks/irthermo3/DETAILS.md
index 24c7ec1904..9559148d36 100644
--- a/clicks/irthermo3/DETAILS.md
+++ b/clicks/irthermo3/DETAILS.md
@@ -1,6 +1,4 @@
-
-
---
# IrThermo 3 click
@@ -17,7 +15,7 @@ IrThermo 3 click is a device which allows contactless measurement of the object
#### Click library
-- **Author** : Jovan Stajokovic
+- **Author** : MikroE Team
- **Date** : nov 2019.
- **Type** : I2C type
@@ -37,37 +35,42 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void irthermo3_cfg_setup ( irthermo3_cfg_t *cfg );
-
-- Initialization function.
-> IRTHERMO3_RETVAL irthermo3_init ( irthermo3_t *ctx, irthermo3_cfg_t *cfg );
-
-- Click Default Configuration function.
-> void irthermo3_default_cfg ( irthermo3_t *ctx );
+- `irthermo3_cfg_setup` Config Object Initialization function.
+```c
+void irthermo3_cfg_setup ( irthermo3_cfg_t *cfg );
+```
+- `irthermo3_init` Initialization function.
+```c
+err_t irthermo3_init ( irthermo3_t *ctx, irthermo3_cfg_t *cfg );
+```
#### Example key functions :
-- Read Object Temperature function
-> float irthermo3_get_object_temperature ( irthermo3_t *ctx );
+- `irthermo3_cal` Calibration function
+```c
+void irthermo3_cal ( irthermo3_t *ctx );
+```
-- Read Ambient Temperature function
-> float irthermo3_get_ambient_temperature ( irthermo3_t *ctx );
+- `irthermo3_get_ambient_temp` Read Ambient Temperature function
+```c
+float irthermo3_get_ambient_temp ( irthermo3_t *ctx );
+```
-- Set device mode function
-> void irthermo3_set_mode( irthermo3_t *ctx, uint8_t mode );
+- `irthermo3_get_object_temp` Read Object Temperature function
+```c
+float irthermo3_get_object_temp ( irthermo3_t *ctx );
+```
## Examples Description
-> The demo application displays ambient and object temperature measurementss
-> using IrThermo 3 click.
+> The demo application displays ambient and object temperature measurements using IrThermo 3 click.
**The demo application is composed of two sections :**
### Application Init
-> Initializes Driver ,resets the devic and performs calibration.
+> Initializes the driver, resets the device and performs calibration.
```c
void application_init ( void )
@@ -89,12 +92,10 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
irthermo3_cfg_setup( &cfg );
IRTHERMO3_MAP_MIKROBUS( cfg, MIKROBUS_1 );
irthermo3_init( &irthermo3, &cfg );
- irthermo3_global_write ( &irthermo3, adr_rst, 4 );
irthermo3_cal ( &irthermo3 );
Delay_ms( 500 );
}
@@ -102,17 +103,16 @@ void application_init ( void )
### Application Task
-> The device measures ambient and object temperatures and displays data in
-> degree centigrade every second.
+> The device measures ambient and object temperature in degrees Celsius and displays them on the USB UART once per second.
```c
void application_task ( void )
{
- amb_temp = irthermo3_get_ambient_temperature( &irthermo3 );
- log_printf( &logger, "Ambient temperature: %.2f °C \r\n", amb_temp );
+ amb_temp = irthermo3_get_ambient_temp( &irthermo3 );
+ log_printf( &logger, "Ambient temperature: %.2f degC \r\n", amb_temp );
- obj_temp = irthermo3_get_object_temperature( &irthermo3 );
- log_printf( &logger, "Object temperature: %.2f °C \r\n", obj_temp );
+ obj_temp = irthermo3_get_object_temp( &irthermo3 );
+ log_printf( &logger, "Object temperature: %.2f degC \r\n", obj_temp );
log_printf( &logger, "----------------------------\r\n" );
Delay_ms( 1000 );
diff --git a/clicks/irthermo3/README.md b/clicks/irthermo3/README.md
index 50fd6de8f1..8e04c8fe64 100644
--- a/clicks/irthermo3/README.md
+++ b/clicks/irthermo3/README.md
@@ -1,6 +1,4 @@
\mainpage Main Page
-
-
---
# IrThermo 3 click
@@ -18,7 +16,7 @@ IrThermo 3 click is a device which allows contactless measurement of the object
#### Click library
-- **Author** : Jovan Stajokovic
+- **Author** : MikroE Team
- **Date** : nov 2019.
- **Type** : I2C type
@@ -38,37 +36,42 @@ Package can be downloaded/installed directly form compilers IDE(recommended way)
#### Standard key functions :
-- Config Object Initialization function.
-> void irthermo3_cfg_setup ( irthermo3_cfg_t *cfg );
-
-- Initialization function.
-> IRTHERMO3_RETVAL irthermo3_init ( irthermo3_t *ctx, irthermo3_cfg_t *cfg );
-
-- Click Default Configuration function.
-> void irthermo3_default_cfg ( irthermo3_t *ctx );
+- `irthermo3_cfg_setup` Config Object Initialization function.
+```c
+void irthermo3_cfg_setup ( irthermo3_cfg_t *cfg );
+```
+- `irthermo3_init` Initialization function.
+```c
+err_t irthermo3_init ( irthermo3_t *ctx, irthermo3_cfg_t *cfg );
+```
#### Example key functions :
-- Read Object Temperature function
-> float irthermo3_get_object_temperature ( irthermo3_t *ctx );
+- `irthermo3_cal` Calibration function
+```c
+void irthermo3_cal ( irthermo3_t *ctx );
+```
-- Read Ambient Temperature function
-> float irthermo3_get_ambient_temperature ( irthermo3_t *ctx );
+- `irthermo3_get_ambient_temp` Read Ambient Temperature function
+```c
+float irthermo3_get_ambient_temp ( irthermo3_t *ctx );
+```
-- Set device mode function
-> void irthermo3_set_mode( irthermo3_t *ctx, uint8_t mode );
+- `irthermo3_get_object_temp` Read Object Temperature function
+```c
+float irthermo3_get_object_temp ( irthermo3_t *ctx );
+```
## Examples Description
-> The demo application displays ambient and object temperature measurementss
-> using IrThermo 3 click.
+> The demo application displays ambient and object temperature measurements using IrThermo 3 click.
**The demo application is composed of two sections :**
### Application Init
-> Initializes Driver ,resets the devic and performs calibration.
+> Initializes the driver, resets the device and performs calibration.
```c
void application_init ( void )
@@ -90,12 +93,10 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
irthermo3_cfg_setup( &cfg );
IRTHERMO3_MAP_MIKROBUS( cfg, MIKROBUS_1 );
irthermo3_init( &irthermo3, &cfg );
- irthermo3_global_write ( &irthermo3, adr_rst, 4 );
irthermo3_cal ( &irthermo3 );
Delay_ms( 500 );
}
@@ -103,17 +104,16 @@ void application_init ( void )
### Application Task
-> The device measures ambient and object temperatures and displays data in
-> degree centigrade every second.
+> The device measures ambient and object temperature in degrees Celsius and displays them on the USB UART once per second.
```c
void application_task ( void )
{
- amb_temp = irthermo3_get_ambient_temperature( &irthermo3 );
- log_printf( &logger, "Ambient temperature: %.2f °C \r\n", amb_temp );
+ amb_temp = irthermo3_get_ambient_temp( &irthermo3 );
+ log_printf( &logger, "Ambient temperature: %.2f degC \r\n", amb_temp );
- obj_temp = irthermo3_get_object_temperature( &irthermo3 );
- log_printf( &logger, "Object temperature: %.2f °C \r\n", obj_temp );
+ obj_temp = irthermo3_get_object_temp( &irthermo3 );
+ log_printf( &logger, "Object temperature: %.2f degC \r\n", obj_temp );
log_printf( &logger, "----------------------------\r\n" );
Delay_ms( 1000 );
diff --git a/clicks/irthermo3/doc/doxy/Doxyfile.doxy b/clicks/irthermo3/doc/doxy/Doxyfile.doxy
index 9cf64799cf..cafff8197c 100644
--- a/clicks/irthermo3/doc/doxy/Doxyfile.doxy
+++ b/clicks/irthermo3/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/irthermo3/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/irthermo3/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/irthermo3/example \
- ../clicks/irthermo3/lib/include \
- ../clicks/irthermo3/README.md
+INPUT = ../cmake/irthermo3/example \
+ ../cmake/irthermo3/lib_irthermo3/include \
+ ../cmake/irthermo3/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/irthermo3/example
+EXAMPLE_PATH = ../cmake/irthermo3/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/irthermo3/doc/package/manifest.json b/clicks/irthermo3/doc/package/manifest.json
index e5209238a1..08de845611 100644
--- a/clicks/irthermo3/doc/package/manifest.json
+++ b/clicks/irthermo3/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Temperature & humidity",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Temperature & humidity",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "IrThermo 3 click",
"example_list": [
@@ -26,17 +25,14 @@
"name": "mikroe.click.irthermo3",
"product_link": "https://www.mikroe.com/ir-thermo-3-click",
"short_description": "IrThermo 3 click is a device which allows contactless measurement of the object temperature.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "_type": "mikroSDK Library",
+ "related_projects": [
2504
],
- "version": "2.0.0.9"
+ "version": "2.1.0.9",
+ "cmake": true,
+ "alias": "Click.IrThermo3",
+ "subdir_name": "lib_irthermo3"
}
-
-
-
-
-
-
diff --git a/clicks/irthermo3/example/CMakeLists.txt b/clicks/irthermo3/example/CMakeLists.txt
new file mode 100644
index 0000000000..104752b94b
--- /dev/null
+++ b/clicks/irthermo3/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_irthermo3 LANGUAGES MikroC)
+else()
+ project(example_irthermo3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_irthermo3
+ main.c
+
+)
+
+
+############################ example_irthermo3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_irthermo3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_irthermo3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_irthermo3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_irthermo3)
+target_link_libraries(example_irthermo3 PUBLIC Click.IrThermo3)
+############################ example_irthermo3 GENERATED CODE END ###########################
diff --git a/clicks/irthermo3/example/main.c b/clicks/irthermo3/example/main.c
index 3ac0bdb055..3b7c9fcf57 100644
--- a/clicks/irthermo3/example/main.c
+++ b/clicks/irthermo3/example/main.c
@@ -3,19 +3,19 @@
* \brief IrThermo3 Click example
*
* # Description
- * The demo application displays ambient and object temperature measurementss
+ * The demo application displays ambient and object temperature measurements
* using IrThermo 3 click.
*
* The demo application is composed of two sections :
*
* ## Application Init
- * Initializes Driver ,resets the devic and performs calibration.
+ * Initializes the driver, resets the device and performs calibration.
*
* ## Application Task
- * The device measures ambient and object temperatures and displays data in
- * degree centigrade every second.
+ * The device measures ambient and object temperature in degrees Celsius and
+ * displays them on the USB UART once per second.
*
- * \author Jovan Stajkovic
+ * \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
@@ -31,8 +31,6 @@ static log_t logger;
static float amb_temp;
static float obj_temp;
-uint8_t adr_rst[ 4 ] = { 0x30, 0x05, 0x00, 0x06 };
-uint8_t eeprom_unlock[ 4 ] = { 0x30, 0x05, 0x55, 0x4C };
// ------------------------------------------------------ APPLICATION FUNCTIONS
@@ -55,23 +53,21 @@ void application_init ( void )
log_info( &logger, "---- Application Init ----" );
// Click initialization.
-
irthermo3_cfg_setup( &cfg );
IRTHERMO3_MAP_MIKROBUS( cfg, MIKROBUS_1 );
irthermo3_init( &irthermo3, &cfg );
- irthermo3_global_write ( &irthermo3, adr_rst, 4 );
irthermo3_cal ( &irthermo3 );
Delay_ms( 500 );
}
void application_task ( void )
{
- amb_temp = irthermo3_get_ambient_temperature( &irthermo3 );
- log_printf( &logger, "Ambient temperature: %.2f °C \r\n", amb_temp );
+ amb_temp = irthermo3_get_ambient_temp( &irthermo3 );
+ log_printf( &logger, "Ambient temperature: %.2f degC \r\n", amb_temp );
- obj_temp = irthermo3_get_object_temperature( &irthermo3 );
- log_printf( &logger, "Object temperature: %.2f °C \r\n", obj_temp );
+ obj_temp = irthermo3_get_object_temp( &irthermo3 );
+ log_printf( &logger, "Object temperature: %.2f degC \r\n", obj_temp );
log_printf( &logger, "----------------------------\r\n" );
Delay_ms( 1000 );
diff --git a/clicks/irthermo3/example/manifest.exm b/clicks/irthermo3/example/manifest.exm
index 1fe2bde6a5..9307704666 100644
--- a/clicks/irthermo3/example/manifest.exm
+++ b/clicks/irthermo3/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "IrThermo 3 Click",
"description": "IrThermo 3 click is a device which allows contactless measurement of the object temperature.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","MLX90632","PCA9306"],
"category" : ["Temperature & humidity"]
}
diff --git a/clicks/irthermo3/example/memake.txt b/clicks/irthermo3/example/memake.txt
deleted file mode 100644
index f0deaac6af..0000000000
--- a/clicks/irthermo3/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_irthermo3
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.IrThermo3
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/irthermo3/lib/memake.txt b/clicks/irthermo3/lib/memake.txt
deleted file mode 100644
index 60753a02f7..0000000000
--- a/clicks/irthermo3/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_irthermo3
-
-alias: Click.IrThermo3
-
-sources: {
- src/irthermo3.c
-}
-
-headers: {
- include/irthermo3.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/irthermo3.h) dst(include/irthermo3.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/irthermo3/lib_irthermo3/CMakeLists.txt b/clicks/irthermo3/lib_irthermo3/CMakeLists.txt
new file mode 100644
index 0000000000..6ed1b19b57
--- /dev/null
+++ b/clicks/irthermo3/lib_irthermo3/CMakeLists.txt
@@ -0,0 +1,30 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_irthermo3 LANGUAGES MikroC)
+else()
+ project(lib_irthermo3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_irthermo3 STATIC
+ src/irthermo3.c
+ include/irthermo3.h
+)
+add_library(Click.IrThermo3 ALIAS lib_irthermo3)
+
+
+
+target_include_directories(lib_irthermo3 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_irthermo3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_irthermo3 PUBLIC MikroSDK.Driver)
+
+include(mikroeUtils)
+math_check_target(${PROJECT_NAME})
diff --git a/clicks/irthermo3/lib_irthermo3/include/Click.IrThermo3 b/clicks/irthermo3/lib_irthermo3/include/Click.IrThermo3
new file mode 100644
index 0000000000..0ffdcaec46
--- /dev/null
+++ b/clicks/irthermo3/lib_irthermo3/include/Click.IrThermo3
@@ -0,0 +1 @@
+#include "irthermo3.h"
diff --git a/clicks/irthermo3/lib/include/irthermo3.h b/clicks/irthermo3/lib_irthermo3/include/irthermo3.h
similarity index 83%
rename from clicks/irthermo3/lib/include/irthermo3.h
rename to clicks/irthermo3/lib_irthermo3/include/irthermo3.h
index 64acfef807..83543a4366 100644
--- a/clicks/irthermo3/lib/include/irthermo3.h
+++ b/clicks/irthermo3/lib_irthermo3/include/irthermo3.h
@@ -58,10 +58,8 @@
* \defgroup error_code Error Code
* \{
*/
-#define IRTHERMO3_RETVAL uint8_t
-
-#define IRTHERMO3_OK 0x00
-#define IRTHERMO3_INIT_ERROR 0xFF
+#define IRTHERMO3_OK 0x00
+#define IRTHERMO3_ERROR 0xFF
/** \} */
/**
@@ -132,6 +130,7 @@
#define IRTHERMO3_EEPROM_I2C_ADDRESS 0x24D5
#define IRTHERMO3_REG_I2C_ADDRESS 0x3000
#define IRTHERMO3_REG_CONTROL 0x3001
+#define IRTHERMO3_REG_RESET 0x3005
#define IRTHERMO3_REG_STATUS 0x3FFF
/** \} */
@@ -193,15 +192,12 @@ typedef struct
typedef struct
{
// Modules
-
i2c_master_t i2c;
// ctx variable
-
uint8_t slave_address;
// Calculation coefficients
-
irthermo3_cal_coef_t cal_coef;
} irthermo3_t;
@@ -212,12 +208,10 @@ typedef struct
typedef struct
{
// Communication gpio pins
-
pin_name_t scl;
pin_name_t sda;
// static variable
-
uint32_t i2c_speed;
uint8_t i2c_address;
@@ -240,7 +234,7 @@ extern "C"{
*
* @param cfg Click configuration structure.
*
- * @description This function initializes click configuration structure to init state.
+ * @details This function initializes click configuration structure to init state.
* @note All used pins will be set to unconnected state.
*/
void irthermo3_cfg_setup ( irthermo3_cfg_t *cfg );
@@ -251,18 +245,9 @@ void irthermo3_cfg_setup ( irthermo3_cfg_t *cfg );
* @param ctx Click object.
* @param cfg Click configuration structure.
*
- * @description This function initializes all necessary pins and peripherals used for this click.
+ * @details This function initializes all necessary pins and peripherals used for this click.
*/
-IRTHERMO3_RETVAL irthermo3_init ( irthermo3_t *ctx, irthermo3_cfg_t *cfg );
-
-/**
- * @brief Click Default Configuration function.
- *
- * @param ctx Click object.
- *
- * @description This function executes default configuration for IrThermo3 click.
- */
-void irthermo3_default_cfg ( irthermo3_t *ctx );
+err_t irthermo3_init ( irthermo3_t *ctx, irthermo3_cfg_t *cfg );
/**
* @brief Generic write function.
@@ -272,7 +257,7 @@ void irthermo3_default_cfg ( irthermo3_t *ctx );
* @param data_buf Data buf to be written.
* @param len Number of the bytes in data buf.
*
- * @description This function writes data to the desired register.
+ * @details This function writes data to the desired register.
*/
void irthermo3_generic_write ( irthermo3_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len );
@@ -284,7 +269,7 @@ void irthermo3_generic_write ( irthermo3_t *ctx, uint16_t reg, uint8_t *data_buf
* @param data_buf Output data buf
* @param len Number of the bytes to be read
*
- * @description This function reads data from the desired register.
+ * @details This function reads data from the desired register.
*/
void irthermo3_generic_read ( irthermo3_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len );
@@ -295,7 +280,7 @@ void irthermo3_generic_read ( irthermo3_t *ctx, uint16_t reg, uint8_t *data_buf,
* @param reg Register address.
* @param wr_data Data to be written.
*
- * @description This function writes data to the desired register.
+ * @details This function writes data to the desired register.
*/
void irthermo3_write_u16 ( irthermo3_t *ctx, uint16_t reg, uint16_t wr_data );
@@ -307,7 +292,7 @@ void irthermo3_write_u16 ( irthermo3_t *ctx, uint16_t reg, uint16_t wr_data );
*
* @retval ret_val two bytes signed data which is read from the address.
*
- * @description This function reads signed data from the desired register.
+ * @details This function reads signed data from the desired register.
*/
int16_t irthermo3_read_i16( irthermo3_t *ctx, uint16_t reg );
@@ -319,32 +304,17 @@ int16_t irthermo3_read_i16( irthermo3_t *ctx, uint16_t reg );
*
* @retval ret_val four bytes signed data which is read from the address.
*
- * @description This function reads signed data from the desired register.
+ * @details This function reads signed data from the desired register.
*/
int32_t irthermo3_read_i32 ( irthermo3_t *ctx, uint16_t reg );
-/**
- * @brief Global write function.
- *
- * @param ctx Click object.
- * @param data_buf Data buf to be written.
- * @param len Number of the bytes in data buf.
- *
- * @description This function writes data to the addressed device.
- * @note This function is used exclusively to perform Addressed reset
- * ( which resets the device ) or EEPROM unlock (for customer access)
- * on slave address defined device
- */
-void irthermo3_global_write ( irthermo3_t *ctx, uint8_t *data_buf, uint8_t len );
-
/**
* @brief Set device mode function
*
* @param ctx Click object.
* @param mode Mode to be set.
*
- * @description This function is used to set the devices mode to sleep,
- * step mode or continuous mode.
+ * @details This function is used to set the devices mode to sleep, step mode or continuous mode.
*/
void irthermo3_set_mode( irthermo3_t *ctx, uint8_t mode );
@@ -353,7 +323,7 @@ void irthermo3_set_mode( irthermo3_t *ctx, uint8_t mode );
*
* @param ctx Click object.
*
- * @description Function is used to calibrate the device.
+ * @details Function is used to calibrate the device.
* @note This function must be used at least once in order to get correct readings!
*/
void irthermo3_cal ( irthermo3_t *ctx );
@@ -363,18 +333,18 @@ void irthermo3_cal ( irthermo3_t *ctx );
*
* @retval - Ambient temperature.
*
- * @description Function is used to read ambient temperature.
+ * @details Function is used to read ambient temperature.
*/
-float irthermo3_get_ambient_temperature ( irthermo3_t *ctx );
+float irthermo3_get_ambient_temp ( irthermo3_t *ctx );
/**
* @brief Read Object Temperature function
*
* @retval - Object temperature.
*
- * @description Function is used to read object temperature.
+ * @details Function is used to read object temperature.
*/
-float irthermo3_get_object_temperature ( irthermo3_t *ctx );
+float irthermo3_get_object_temp ( irthermo3_t *ctx );
#ifdef __cplusplus
}
diff --git a/clicks/irthermo3/lib/src/irthermo3.c b/clicks/irthermo3/lib_irthermo3/src/irthermo3.c
similarity index 66%
rename from clicks/irthermo3/lib/src/irthermo3.c
rename to clicks/irthermo3/lib_irthermo3/src/irthermo3.c
index d9311195dd..d346d7a890 100644
--- a/clicks/irthermo3/lib/src/irthermo3.c
+++ b/clicks/irthermo3/lib_irthermo3/src/irthermo3.c
@@ -33,24 +33,22 @@
// ------------------------------------------------------------- PRIVATE MACROS
// Calculation constants
-
-#define EMISSIVITY_FACTOR 1.0
-#define TO_DUT 25.0
-#define TO_0 25.0
-#define TA_0 25.0
-
-// Bit manipuolation constants
-
-#define IRTHERMO3_SAVE_LOWER_BYTE 0x00FF
-#define IRTHERMO3_SAVE_UPPER_BYTE 0xFF00
-#define IRTHERMO3_CTRL_REG_MODE_BITS 0x0003
-#define IRTHERMO3_CTRL_REG_SOC_BIT 0x0008
-#define IRTHERMO3_EEPROM_BUSY_BIT 0x0200
-#define IRTHERMO3_CYCLE_POS_BITS 0x007C
-
-#define IRTHERMO3_APSOLUTE_ZERO_DIF 273.15
-#define IRTHERMO3_MESUREMENT_ODD 1
-#define IRTHERMO3_MESUREMENT_EVEN 2
+#define EMISSIVITY_FACTOR 1.0
+#define TO_DUT 25.0
+#define TO_0 25.0
+#define TA_0 25.0
+
+// Bit manipulation constants
+#define IRTHERMO3_SAVE_LOWER_BYTE 0x00FF
+#define IRTHERMO3_SAVE_UPPER_BYTE 0xFF00
+#define IRTHERMO3_CTRL_REG_MODE_BITS 0x0003
+#define IRTHERMO3_CTRL_REG_SOC_BIT 0x0008
+#define IRTHERMO3_EEPROM_BUSY_BIT 0x0200
+#define IRTHERMO3_CYCLE_POS_BITS 0x007C
+
+#define IRTHERMO3_APSOLUTE_ZERO_DIF 273.15
+#define IRTHERMO3_MESUREMENT_ODD 1
+#define IRTHERMO3_MESUREMENT_EVEN 2
// ---------------------------------------------- PRIVATE FUNCTION DECLARATIONS
@@ -64,14 +62,13 @@ static void irthermo3_set_soc_bit ( irthermo3_t *ctx );
static uint8_t irthermo3_eeprom_busy ( irthermo3_t *ctx );
-static void irthermo3_wait_for_eeprom( irthermo3_t *ctx , uint16_t t_out_ms );
+static void irthermo3_wait_for_eeprom( irthermo3_t *ctx, uint16_t t_out_ms );
// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
void irthermo3_cfg_setup ( irthermo3_cfg_t *cfg )
{
// Communication gpio pins
-
cfg->scl = HAL_PIN_NC;
cfg->sda = HAL_PIN_NC;
@@ -79,7 +76,7 @@ void irthermo3_cfg_setup ( irthermo3_cfg_t *cfg )
cfg->i2c_address = IRTHERMO3_DEV_ADR_GND;
}
-IRTHERMO3_RETVAL irthermo3_init ( irthermo3_t *ctx, irthermo3_cfg_t *cfg )
+err_t irthermo3_init ( irthermo3_t *ctx, irthermo3_cfg_t *cfg )
{
i2c_master_config_t i2c_cfg;
@@ -90,9 +87,9 @@ IRTHERMO3_RETVAL irthermo3_init ( irthermo3_t *ctx, irthermo3_cfg_t *cfg )
ctx->slave_address = cfg->i2c_address;
- if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR )
+ if ( I2C_MASTER_ERROR == i2c_master_open( &ctx->i2c, &i2c_cfg ) )
{
- return IRTHERMO3_INIT_ERROR;
+ return IRTHERMO3_ERROR;
}
i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address );
@@ -102,28 +99,24 @@ IRTHERMO3_RETVAL irthermo3_init ( irthermo3_t *ctx, irthermo3_cfg_t *cfg )
return IRTHERMO3_OK;
}
-void irthermo3_generic_write ( irthermo3_t *ctx, uint16_t reg,
- uint8_t *data_buf, uint8_t len )
+void irthermo3_generic_write ( irthermo3_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len )
{
- uint8_t tx_buf[ 256 ];
- uint8_t cnt;
+ uint8_t tx_buf[ 257 ] = { 0 };
tx_buf[ 0 ] = ( reg & IRTHERMO3_SAVE_UPPER_BYTE ) >> 8;
tx_buf[ 1 ] = ( reg & IRTHERMO3_SAVE_LOWER_BYTE );
- for ( cnt = 2; cnt <= len+1; cnt++ )
+ for ( uint8_t cnt = 0; cnt < len; cnt++ )
{
- tx_buf[ cnt ] = *data_buf;
- data_buf++;
+ tx_buf[ cnt + 2 ] = data_buf[ cnt ];
}
i2c_master_write( &ctx->i2c, tx_buf, len + 2 );
}
-void irthermo3_generic_read ( irthermo3_t *ctx, uint16_t reg,
- uint8_t *data_buf, uint8_t len )
+void irthermo3_generic_read ( irthermo3_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len )
{
- uint8_t tx_buf[ 2 ];
+ uint8_t tx_buf[ 2 ] = { 0 };
tx_buf[ 0 ] = ( reg & IRTHERMO3_SAVE_UPPER_BYTE ) >> 8;
tx_buf[ 1 ] = ( reg & IRTHERMO3_SAVE_LOWER_BYTE );
@@ -133,25 +126,20 @@ void irthermo3_generic_read ( irthermo3_t *ctx, uint16_t reg,
void irthermo3_write_u16 ( irthermo3_t *ctx, uint16_t reg, uint16_t wr_data )
{
- uint8_t tx_buf[ 4 ];
- tx_buf[ 3 ] = ( wr_data & IRTHERMO3_SAVE_UPPER_BYTE ) >> 8;
- tx_buf[ 2 ] = ( wr_data & IRTHERMO3_SAVE_LOWER_BYTE );
- tx_buf[ 0 ] = ( reg & IRTHERMO3_SAVE_UPPER_BYTE ) >> 8;
- tx_buf[ 1 ] = ( reg & IRTHERMO3_SAVE_LOWER_BYTE );
+ uint8_t tx_buf[ 2 ] = { 0 };
+
+ tx_buf[ 1 ] = ( wr_data & IRTHERMO3_SAVE_UPPER_BYTE ) >> 8;
+ tx_buf[ 0 ] = ( wr_data & IRTHERMO3_SAVE_LOWER_BYTE );
- i2c_master_write( &ctx->i2c, tx_buf, 4 );
+ irthermo3_generic_read( ctx, reg, tx_buf, 2 );
}
int16_t irthermo3_read_i16 ( irthermo3_t *ctx, uint16_t reg )
{
- uint8_t reg_buf[ 2 ];
- uint8_t rx_buff[ 2 ];
+ uint8_t rx_buff[ 2 ] = { 0 };
int16_t ret_val = 0;
-
- reg_buf[ 0 ] = ( reg & IRTHERMO3_SAVE_UPPER_BYTE ) >> 8;
- reg_buf[ 1 ] = ( reg & IRTHERMO3_SAVE_LOWER_BYTE );
- i2c_master_write_then_read( &ctx->i2c, reg_buf, 2, rx_buff, 2 );
+ irthermo3_generic_read ( ctx, reg, rx_buff, 2 );
ret_val = rx_buff[ 0 ];
ret_val <<= 8;
@@ -162,14 +150,10 @@ int16_t irthermo3_read_i16 ( irthermo3_t *ctx, uint16_t reg )
int32_t irthermo3_read_i32 ( irthermo3_t *ctx, uint16_t reg )
{
- uint8_t reg_buf[ 2 ];
- uint8_t rx_buff[ 4 ];
+ uint8_t rx_buff[ 4 ] = { 0 };
int32_t ret_val = 0;
- reg_buf[ 0 ] = ( reg & IRTHERMO3_SAVE_UPPER_BYTE ) >> 8;
- reg_buf[ 1 ] = ( reg & IRTHERMO3_SAVE_LOWER_BYTE );
-
- i2c_master_write_then_read( &ctx->i2c, reg_buf, 2, rx_buff, 4 );
+ irthermo3_generic_read ( ctx, reg, rx_buff, 4 );
ret_val = rx_buff[ 2 ];
ret_val <<= 8;
@@ -182,33 +166,21 @@ int32_t irthermo3_read_i32 ( irthermo3_t *ctx, uint16_t reg )
return ret_val;
}
-void irthermo3_global_write ( irthermo3_t *ctx, uint8_t *data_buf, uint8_t len )
-{
- uint8_t tx_buf[ 256 ];
- uint8_t cnt;
-
- for ( cnt = 0; cnt <= len; cnt++ )
- {
- tx_buf[ cnt ] = *data_buf;
- data_buf++;
- }
-
- i2c_master_write( &ctx->i2c, tx_buf, len );
-}
-
void irthermo3_set_mode( irthermo3_t *ctx, uint8_t mode )
{
- uint16_t reg = irthermo3_read_i16( ctx, IRTHERMO3_REG_CONTROL );
- reg &= ~(0x0003 << 1); //Clear the mode bits
- reg |= (mode << 1);
- irthermo3_write_u16( ctx, IRTHERMO3_REG_CONTROL, reg );
+ uint16_t reg_data = irthermo3_read_i16 ( ctx, IRTHERMO3_REG_CONTROL );
+ reg_data &= ~( 0x0003 << 1 ); //Clear the mode bits
+ reg_data |= ( mode << 1 );
+ irthermo3_write_u16( ctx, IRTHERMO3_REG_CONTROL, reg_data );
}
void irthermo3_cal ( irthermo3_t *ctx )
{
- int32_t i32_data;
- int16_t i16_data;
+ uint8_t reset_cmd[ 2 ] = { 0x00, 0x06 };
+ int32_t i32_data = 0;
+ int16_t i16_data = 0;
+ irthermo3_generic_write ( ctx, IRTHERMO3_REG_RESET, reset_cmd, 2 );
irthermo3_wait_for_eeprom( ctx, 750 );
irthermo3_set_mode( ctx, 0x02 );
@@ -242,18 +214,15 @@ void irthermo3_cal ( irthermo3_t *ctx )
irthermo3_set_mode( ctx, 0x06 );
}
-float irthermo3_get_ambient_temperature ( irthermo3_t *ctx )
+float irthermo3_get_ambient_temp ( irthermo3_t *ctx )
{
- uint8_t mode;
- int16_t ram6;
- int16_t ram9;
- float vr_ta;
- float amb;
- float ambient_temp;
-
- mode = irthermo3_get_mode( ctx );
-
- if ( mode != IRTHERMO3_MODE_CONTINOUS )
+ int16_t ram6 = 0;
+ int16_t ram9 = 0;
+ float vr_ta = 0;
+ float amb = 0;
+ float ambient_temp = 0;
+
+ if ( IRTHERMO3_MODE_CONTINOUS != irthermo3_get_mode( ctx ) )
{
irthermo3_set_soc_bit( ctx );
}
@@ -270,34 +239,29 @@ float irthermo3_get_ambient_temperature ( irthermo3_t *ctx )
ambient_temp = ctx->cal_coef.p_o;
ambient_temp += ( amb - ctx->cal_coef.p_r ) / ctx->cal_coef.p_g;
- ambient_temp += ctx->cal_coef.p_t * ( amb - ctx->cal_coef.p_r )
- * ( amb - ctx->cal_coef.p_r );
+ ambient_temp += ctx->cal_coef.p_t * ( amb - ctx->cal_coef.p_r ) * ( amb - ctx->cal_coef.p_r );
return ambient_temp;
}
-float irthermo3_get_object_temperature ( irthermo3_t *ctx )
+float irthermo3_get_object_temp ( irthermo3_t *ctx )
{
- uint8_t mode;
- uint8_t cyc_pos;
- int16_t sc_1;
- int16_t sc_2;
- int16_t ram6;
- int16_t ram9;
- float vr_ta;
- float amb;
- float to;
- float to_clc1;
- float to_clc;
- float ta;
- float vr_to;
- float s_to;
- float ta_dut;
- float ta_dut_k;
-
- mode = irthermo3_get_mode( ctx );
-
- if ( mode != IRTHERMO3_MODE_CONTINOUS )
+ int16_t sc_1 = 0;
+ int16_t sc_2 = 0;
+ int16_t ram6 = 0;
+ int16_t ram9 = 0;
+ float vr_ta = 0;
+ float amb = 0;
+ float to_value = 0;
+ float to_clc1 = 0;
+ float to_clc = 0;
+ float ta_value = 0;
+ float vr_to = 0;
+ float s_to = 0;
+ float ta_dut = 0;
+ float ta_dut_k = 0;
+
+ if ( IRTHERMO3_MODE_CONTINOUS != irthermo3_get_mode( ctx ) )
{
irthermo3_set_soc_bit( ctx );
}
@@ -319,14 +283,12 @@ float irthermo3_get_object_temperature ( irthermo3_t *ctx )
amb /= vr_ta;
amb *= 524288;
- ta = irthermo3_get_ambient_temperature( ctx );
+ ta_value = irthermo3_get_ambient_temp( ctx );
vr_to = ram9;
vr_to += ctx->cal_coef.ka * ( ram6 / 12 );
- cyc_pos = irthermo3_get_cycle( ctx );
-
- if( cyc_pos == IRTHERMO3_MESUREMENT_EVEN )
+ if ( IRTHERMO3_MESUREMENT_EVEN == irthermo3_get_cycle( ctx ) )
{
s_to = sc_2 / 12;
s_to /= vr_to;
@@ -349,46 +311,44 @@ float irthermo3_get_object_temperature ( irthermo3_t *ctx )
to_clc *= ctx->cal_coef.fa;
to_clc1 = EMISSIVITY_FACTOR;
- to_clc1 += ctx->cal_coef.ga * ( ta - TO_0 );
+ to_clc1 += ctx->cal_coef.ga * ( ta_value - TO_0 );
to_clc1 += ctx->cal_coef.fb * ( ta_dut - TA_0 );
- to = s_to / ( to_clc * to_clc1 );
- to = to + ( ta_dut_k * ta_dut_k * ta_dut_k * ta_dut_k );
- to = pow( to, 0.25 );
- to = to - IRTHERMO3_APSOLUTE_ZERO_DIF - ctx->cal_coef.hb;
+ to_value = s_to / ( to_clc * to_clc1 );
+ to_value = to_value + ( ta_dut_k * ta_dut_k * ta_dut_k * ta_dut_k );
+ to_value = pow( to_value, 0.25 );
+ to_value = to_value - IRTHERMO3_APSOLUTE_ZERO_DIF - ctx->cal_coef.hb;
- return to;
+ return to_value;
}
// ----------------------------------------------- PRIVATE FUNCTION DEFINITIONS
static uint16_t irthermo3_get_status ( irthermo3_t *ctx )
{
- uint16_t ret_val;
- ret_val = irthermo3_read_i16( ctx, IRTHERMO3_REG_STATUS );
- return ret_val;
+ return irthermo3_read_i16( ctx, IRTHERMO3_REG_STATUS );
}
static uint8_t irthermo3_get_cycle ( irthermo3_t *ctx )
{
- uint16_t ret_val;
+ uint16_t ret_val = 0;
ret_val = irthermo3_get_status( ctx );
ret_val &= IRTHERMO3_CYCLE_POS_BITS;
ret_val >>= 2;
- return ( uint8_t )ret_val;
+ return ( uint8_t ) ret_val;
}
static uint8_t irthermo3_get_mode ( irthermo3_t *ctx )
{
- uint16_t mode;
+ uint16_t mode = 0;
mode = irthermo3_read_i16( ctx, IRTHERMO3_REG_CONTROL );
mode >>= 1;
mode &= IRTHERMO3_CTRL_REG_MODE_BITS;
- return ( uint8_t )mode;
+ return ( uint8_t ) mode;
}
static void irthermo3_set_soc_bit ( irthermo3_t *ctx )
@@ -400,17 +360,16 @@ static void irthermo3_set_soc_bit ( irthermo3_t *ctx )
static uint8_t irthermo3_eeprom_busy ( irthermo3_t *ctx )
{
- return ( ( uint16_t )( irthermo3_get_status( ctx ) >>
- IRTHERMO3_EEPROM_BUSY_BIT ) & 1 );
+ return ( ( uint16_t )( irthermo3_get_status( ctx ) >> IRTHERMO3_EEPROM_BUSY_BIT ) & 1 );
}
-static void irthermo3_wait_for_eeprom( irthermo3_t *ctx , uint16_t t_out_ms )
+static void irthermo3_wait_for_eeprom( irthermo3_t *ctx, uint16_t t_out_ms )
{
uint16_t n_cnt = 0;
while ( irthermo3_eeprom_busy( ctx ) )
{
- Delay_1ms();
+ Delay_1ms( );
n_cnt++;
if ( n_cnt > t_out_ms )
{
diff --git a/clicks/irthermo3/memake.txt b/clicks/irthermo3/memake.txt
deleted file mode 100644
index 402e8d01e9..0000000000
--- a/clicks/irthermo3/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: IrThermo3
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/ism/CMakeLists.txt b/clicks/ism/CMakeLists.txt
new file mode 100644
index 0000000000..fcd93b6727
--- /dev/null
+++ b/clicks/ism/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_ism LANGUAGES MikroC)
+else()
+ project(example_ism LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_ism
+ example/main.c
+
+)
+
+
+############################ example_ism GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_ism PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_ism PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_ism PUBLIC MikroSDK.Log)
+add_subdirectory(lib_ism)
+target_link_libraries(example_ism PUBLIC Click.Ism)
+############################ example_ism GENERATED CODE END ###########################
diff --git a/clicks/ism/README.md b/clicks/ism/README.md
index 50f1fc5e5e..4470922899 100644
--- a/clicks/ism/README.md
+++ b/clicks/ism/README.md
@@ -3,7 +3,7 @@
---
# ISM click
-ISM Click is a compact add-on board that contains a complete wireless RF digital data transceiver. This board features the RFM75, a low-power, high-performance 2.4GHz GFSK transceiver from RF Solutions. The RFM75 transceiver is configurable through SPI serial interface and operates with only 3.3V in the worldwide ISM frequency band from 2400MHz up to 2527MHz. The embedded packet processing engines enable their entire operation with a simple MCU as a radio system. Burst mode transmission and up to 2Mbps air data rate make it suitable for applications requiring ultra-low power consumption.
+> ISM Click is a compact add-on board that contains a complete wireless RF digital data transceiver. This board features the RFM75, a low-power, high-performance 2.4GHz GFSK transceiver from RF Solutions. The RFM75 transceiver is configurable through SPI serial interface and operates with only 3.3V in the worldwide ISM frequency band from 2400MHz up to 2527MHz. The embedded packet processing engines enable their entire operation with a simple MCU as a radio system. Burst mode transmission and up to 2Mbps air data rate make it suitable for applications requiring ultra-low power consumption.
@@ -43,7 +43,7 @@ void ism_cfg_setup ( ism_cfg_t *cfg );
- `ism_init` Initialization function.
```c
-ISM_RETVAL ism_init ( ism_t *ctx, ism_cfg_t *cfg );
+err_t ism_init ( ism_t *ctx, ism_cfg_t *cfg );
```
- `ism_default_cfg` Click Default Configuration function.
@@ -72,90 +72,86 @@ err_t ism_transmit_packet ( ism_t *ctx, uint8_t type, uint8_t *tx_data, uint8_t
> This library contains API for the ISM Click driver.
> This example transmits/receives and processes data from ISM clicks.
-> The library initializes and defines the UART bus drivers
-> to transmit or receive data.
**The demo application is composed of two sections :**
### Application Init
-> Initializes driver and set performs the default configuration.
+> Initializes driver and performs the default configuration.
```c
-void application_init ( void ) {
+void application_init ( void )
+{
log_cfg_t log_cfg; /**< Logger config object. */
ism_cfg_t ism_cfg; /**< Click config object. */
- // Logger initialization.
-
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
LOG_MAP_USB_UART( log_cfg );
- log_cfg.level = LOG_LEVEL_DEBUG;
- log_cfg.baud = 115200;
log_init( &logger, &log_cfg );
- log_printf( &logger, "------------------\r\n" );
log_info( &logger, " Application Init " );
// Click initialization.
-
ism_cfg_setup( &ism_cfg );
ISM_MAP_MIKROBUS( ism_cfg, MIKROBUS_1 );
- err_t init_flag = ism_init( &ism, &ism_cfg );
- if ( init_flag == SPI_MASTER_ERROR ) {
+ if ( SPI_MASTER_ERROR == ism_init( &ism, &ism_cfg ) )
+ {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
ism_default_cfg ( &ism );
- log_info( &logger, " Application Task " );
- log_printf( &logger, "------------------\r\n" );
Delay_ms( 100 );
-
- #ifdef RECEIVER
- ism_switch_rx_mode( &ism );
- log_printf( &logger, " Receive data \r\n" );
- #endif
-
- #ifdef TRANSMITTER
- ism_switch_tx_mode( &ism );
- log_printf( &logger, " Transmit data \r\n" );
- #endif
-
- log_printf( &logger, "------------------\r\n" );
+
+#ifdef DEMO_APP_TRANSMITTER
+ ism_switch_tx_mode( &ism );
+ log_printf( &logger, " Application Mode: Transmitter\r\n" );
+#else
+ ism_switch_rx_mode( &ism );
+ log_printf( &logger, " Application Mode: Receiver\r\n" );
+#endif
+ log_info( &logger, " Application Task " );
}
```
### Application Task
-> Transmitter/Receiver task depends on uncommented code.
+> Transmitter/Receiver task depends on uncommented code.
> Receiver logging each received byte to the UART for data logging,
-> while transmitted send messages every 1 second.
+> while transmitter send messages every 1 second.
```c
-void application_task ( void ) {
- #ifdef RECEIVER
- uint8_t rx_buf[ ISM_MAX_PACKET_LEN ] = { 0 };
+void application_task ( void )
+{
+#ifdef DEMO_APP_TRANSMITTER
+ ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, demo_message_1, 9 );
+ log_printf( &logger, " Tx : %s", demo_message_1 );
+ Delay_ms( 1000 );
- ism_receive_packet( &ism, &rx_buf[ 0 ] );
-
- if ( rx_buf[ 0 ] != 0 ) {
- log_printf( &logger, " Rx : %s", rx_buf );
- }
- #endif
-
- #ifdef TRANSMITTER
- ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, &demo_message_1[ 0 ], 9 );
- log_printf( &logger, " Tx : %s", demo_message_1 );
- Delay_ms( 1000 );
-
- ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, &demo_message_2[ 0 ], 12 );
- log_printf( &logger, " Tx : %s", demo_message_2 );
- Delay_ms( 1000 );
- #endif
+ ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, demo_message_2, 12 );
+ log_printf( &logger, " Tx : %s", demo_message_2 );
+ Delay_ms( 1000 );
+#else
+ uint8_t rx_buf[ ISM_MAX_PACKET_LEN ] = { 0 };
+
+ ism_receive_packet( &ism, &rx_buf[ 0 ] );
+
+ if ( rx_buf[ 0 ] )
+ {
+ log_printf( &logger, " Rx : %s", rx_buf );
+ }
+#endif
}
```
diff --git a/clicks/ism/changelog.md b/clicks/ism/changelog.md
index 045bcb30cf..dae6081f37 100644
--- a/clicks/ism/changelog.md
+++ b/clicks/ism/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.5
+### Version 2.1.0.6
- Initial release
diff --git a/clicks/ism/details.md b/clicks/ism/details.md
index 395fe09e74..2595acb569 100644
--- a/clicks/ism/details.md
+++ b/clicks/ism/details.md
@@ -2,7 +2,7 @@
---
# ISM click
-ISM Click is a compact add-on board that contains a complete wireless RF digital data transceiver. This board features the RFM75, a low-power, high-performance 2.4GHz GFSK transceiver from RF Solutions. The RFM75 transceiver is configurable through SPI serial interface and operates with only 3.3V in the worldwide ISM frequency band from 2400MHz up to 2527MHz. The embedded packet processing engines enable their entire operation with a simple MCU as a radio system. Burst mode transmission and up to 2Mbps air data rate make it suitable for applications requiring ultra-low power consumption.
+> ISM Click is a compact add-on board that contains a complete wireless RF digital data transceiver. This board features the RFM75, a low-power, high-performance 2.4GHz GFSK transceiver from RF Solutions. The RFM75 transceiver is configurable through SPI serial interface and operates with only 3.3V in the worldwide ISM frequency band from 2400MHz up to 2527MHz. The embedded packet processing engines enable their entire operation with a simple MCU as a radio system. Burst mode transmission and up to 2Mbps air data rate make it suitable for applications requiring ultra-low power consumption.
@@ -42,7 +42,7 @@ void ism_cfg_setup ( ism_cfg_t *cfg );
- `ism_init` Initialization function.
```c
-ISM_RETVAL ism_init ( ism_t *ctx, ism_cfg_t *cfg );
+err_t ism_init ( ism_t *ctx, ism_cfg_t *cfg );
```
- `ism_default_cfg` Click Default Configuration function.
@@ -71,90 +71,86 @@ err_t ism_transmit_packet ( ism_t *ctx, uint8_t type, uint8_t *tx_data, uint8_t
> This library contains API for the ISM Click driver.
> This example transmits/receives and processes data from ISM clicks.
-> The library initializes and defines the UART bus drivers
-> to transmit or receive data.
**The demo application is composed of two sections :**
### Application Init
-> Initializes driver and set performs the default configuration.
+> Initializes driver and performs the default configuration.
```c
-void application_init ( void ) {
+void application_init ( void )
+{
log_cfg_t log_cfg; /**< Logger config object. */
ism_cfg_t ism_cfg; /**< Click config object. */
- // Logger initialization.
-
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
LOG_MAP_USB_UART( log_cfg );
- log_cfg.level = LOG_LEVEL_DEBUG;
- log_cfg.baud = 115200;
log_init( &logger, &log_cfg );
- log_printf( &logger, "------------------\r\n" );
log_info( &logger, " Application Init " );
// Click initialization.
-
ism_cfg_setup( &ism_cfg );
ISM_MAP_MIKROBUS( ism_cfg, MIKROBUS_1 );
- err_t init_flag = ism_init( &ism, &ism_cfg );
- if ( init_flag == SPI_MASTER_ERROR ) {
+ if ( SPI_MASTER_ERROR == ism_init( &ism, &ism_cfg ) )
+ {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
ism_default_cfg ( &ism );
- log_info( &logger, " Application Task " );
- log_printf( &logger, "------------------\r\n" );
Delay_ms( 100 );
-
- #ifdef RECEIVER
- ism_switch_rx_mode( &ism );
- log_printf( &logger, " Receive data \r\n" );
- #endif
-
- #ifdef TRANSMITTER
- ism_switch_tx_mode( &ism );
- log_printf( &logger, " Transmit data \r\n" );
- #endif
-
- log_printf( &logger, "------------------\r\n" );
+
+#ifdef DEMO_APP_TRANSMITTER
+ ism_switch_tx_mode( &ism );
+ log_printf( &logger, " Application Mode: Transmitter\r\n" );
+#else
+ ism_switch_rx_mode( &ism );
+ log_printf( &logger, " Application Mode: Receiver\r\n" );
+#endif
+ log_info( &logger, " Application Task " );
}
```
### Application Task
-> Transmitter/Receiver task depends on uncommented code.
+> Transmitter/Receiver task depends on uncommented code.
> Receiver logging each received byte to the UART for data logging,
-> while transmitted send messages every 1 second.
+> while transmitter send messages every 1 second.
```c
-void application_task ( void ) {
- #ifdef RECEIVER
- uint8_t rx_buf[ ISM_MAX_PACKET_LEN ] = { 0 };
+void application_task ( void )
+{
+#ifdef DEMO_APP_TRANSMITTER
+ ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, demo_message_1, 9 );
+ log_printf( &logger, " Tx : %s", demo_message_1 );
+ Delay_ms( 1000 );
- ism_receive_packet( &ism, &rx_buf[ 0 ] );
-
- if ( rx_buf[ 0 ] != 0 ) {
- log_printf( &logger, " Rx : %s", rx_buf );
- }
- #endif
-
- #ifdef TRANSMITTER
- ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, &demo_message_1[ 0 ], 9 );
- log_printf( &logger, " Tx : %s", demo_message_1 );
- Delay_ms( 1000 );
-
- ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, &demo_message_2[ 0 ], 12 );
- log_printf( &logger, " Tx : %s", demo_message_2 );
- Delay_ms( 1000 );
- #endif
+ ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, demo_message_2, 12 );
+ log_printf( &logger, " Tx : %s", demo_message_2 );
+ Delay_ms( 1000 );
+#else
+ uint8_t rx_buf[ ISM_MAX_PACKET_LEN ] = { 0 };
+
+ ism_receive_packet( &ism, &rx_buf[ 0 ] );
+
+ if ( rx_buf[ 0 ] )
+ {
+ log_printf( &logger, " Rx : %s", rx_buf );
+ }
+#endif
}
```
diff --git a/clicks/ism/doc/doxy/Doxyfile.doxy b/clicks/ism/doc/doxy/Doxyfile.doxy
index 1ab9b62f54..a13ca2a181 100644
--- a/clicks/ism/doc/doxy/Doxyfile.doxy
+++ b/clicks/ism/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/ism/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/ism/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/ism/example \
- ../clicks/ism/lib/include \
- ../clicks/ism/README.md
+INPUT = ../cmake/ism/example \
+ ../cmake/ism/lib_ism/include \
+ ../cmake/ism/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/ism/example
+EXAMPLE_PATH = ../cmake/ism/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/ism/doc/package/manifest.json b/clicks/ism/doc/package/manifest.json
index 4669ccd1a9..1c8abfbc1e 100644
--- a/clicks/ism/doc/package/manifest.json
+++ b/clicks/ism/doc/package/manifest.json
@@ -1,14 +1,13 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "2.4 GHz Transceivers",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Wireless connectivity > 2.4 GHz Transceivers",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
"hex_files",
"examples"
],
- "dependency_list": [
- ],
+ "dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "ISM click",
"example_list": [
@@ -25,12 +24,11 @@
"name": "mikroe.click.ism",
"product_link": "https://www.mikroe.com/ism-click",
"short_description": "ISM Click is a compact add-on board that contains a complete wireless RF digital data transceiver. This board features the RFM75, a low-power, high-performance 2.4GHz GFSK transceiver from RF Solutions. The RFM75 transceiver is configurable through SPI serial interface and operates with only 3.3V in the worldwide ISM frequency band from 2400MHz up to 2527MHz. The embedded packet processing engines enable their entire operation with a simple MCU as a radio system. Burst mode transmission and up to 2Mbps air data rate make it suitable for applications requiring ultra-low power consumption.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.5"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.6",
+ "cmake": true,
+ "alias": "Click.Ism",
+ "subdir_name": "lib_ism"
}
-
-
-
-
diff --git a/clicks/ism/example/CMakeLists.txt b/clicks/ism/example/CMakeLists.txt
new file mode 100644
index 0000000000..4528e29842
--- /dev/null
+++ b/clicks/ism/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_ism LANGUAGES MikroC)
+else()
+ project(example_ism LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_ism
+ main.c
+
+)
+
+
+############################ example_ism GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_ism PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_ism PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_ism PUBLIC MikroSDK.Log)
+add_subdirectory(lib_ism)
+target_link_libraries(example_ism PUBLIC Click.Ism)
+############################ example_ism GENERATED CODE END ###########################
diff --git a/clicks/ism/example/main.c b/clicks/ism/example/main.c
index 5478eee76f..f1366520e6 100644
--- a/clicks/ism/example/main.c
+++ b/clicks/ism/example/main.c
@@ -5,18 +5,16 @@
* # Description
* This library contains API for the ISM Click driver.
* This example transmits/receives and processes data from ISM clicks.
- * The library initializes and defines the UART bus drivers
- * to transmit or receive data.
*
* The demo application is composed of two sections :
*
* ## Application Init
- * Initializes driver and set performs the default configuration.
+ * Initializes driver and performs the default configuration.
*
* ## Application Task
- * Transmitter/Receiver task depends on uncommented code.
+ * Transmitter/Receiver task depends on uncommented code.
* Receiver logging each received byte to the UART for data logging,
- * while transmitted send messages every 1 second.
+ * while transmitter send messages every 1 second.
*
* @author Nenad Filipovic
*
@@ -26,90 +24,84 @@
#include "log.h"
#include "ism.h"
-#define RECEIVER
-// #define TRANSMITTER
+// Comment out the line below in order to switch the application mode to receiver
+#define DEMO_APP_TRANSMITTER
static ism_t ism;
static log_t logger;
-static uint8_t demo_message_1[ 9 ] = {
- 'M', 'i', 'k', 'r', 'o', 'E', 13, 10, 0
-
-};
-static uint8_t demo_message_2[ 12 ] = {
- 'I', 'S', 'M', ' ', 'C', 'l', 'i', 'c', 'k', 13, 10, 0
-
-};
+static uint8_t demo_message_1[ 9 ] = { 'M', 'i', 'k', 'r', 'o', 'E', 13, 10, 0 };
+static uint8_t demo_message_2[ 12 ] = { 'I', 'S', 'M', ' ', 'C', 'l', 'i', 'c', 'k', 13, 10, 0 };
-void application_init ( void ) {
+void application_init ( void )
+{
log_cfg_t log_cfg; /**< Logger config object. */
ism_cfg_t ism_cfg; /**< Click config object. */
- // Logger initialization.
-
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
LOG_MAP_USB_UART( log_cfg );
- log_cfg.level = LOG_LEVEL_DEBUG;
- log_cfg.baud = 115200;
log_init( &logger, &log_cfg );
- log_printf( &logger, "------------------\r\n" );
log_info( &logger, " Application Init " );
// Click initialization.
-
ism_cfg_setup( &ism_cfg );
ISM_MAP_MIKROBUS( ism_cfg, MIKROBUS_1 );
- err_t init_flag = ism_init( &ism, &ism_cfg );
- if ( init_flag == SPI_MASTER_ERROR ) {
+ if ( SPI_MASTER_ERROR == ism_init( &ism, &ism_cfg ) )
+ {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
-
for ( ; ; );
}
ism_default_cfg ( &ism );
- log_info( &logger, " Application Task " );
- log_printf( &logger, "------------------\r\n" );
Delay_ms( 100 );
-
- #ifdef RECEIVER
- ism_switch_rx_mode( &ism );
- log_printf( &logger, " Receive data \r\n" );
- #endif
-
- #ifdef TRANSMITTER
- ism_switch_tx_mode( &ism );
- log_printf( &logger, " Transmit data \r\n" );
- #endif
-
- log_printf( &logger, "------------------\r\n" );
+
+#ifdef DEMO_APP_TRANSMITTER
+ ism_switch_tx_mode( &ism );
+ log_printf( &logger, " Application Mode: Transmitter\r\n" );
+#else
+ ism_switch_rx_mode( &ism );
+ log_printf( &logger, " Application Mode: Receiver\r\n" );
+#endif
+ log_info( &logger, " Application Task " );
}
-void application_task ( void ) {
- #ifdef RECEIVER
- uint8_t rx_buf[ ISM_MAX_PACKET_LEN ] = { 0 };
+void application_task ( void )
+{
+#ifdef DEMO_APP_TRANSMITTER
+ ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, demo_message_1, 9 );
+ log_printf( &logger, " Tx : %s", demo_message_1 );
+ Delay_ms( 1000 );
- ism_receive_packet( &ism, &rx_buf[ 0 ] );
-
- if ( rx_buf[ 0 ] != 0 ) {
- log_printf( &logger, " Rx : %s", rx_buf );
- }
- #endif
+ ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, demo_message_2, 12 );
+ log_printf( &logger, " Tx : %s", demo_message_2 );
+ Delay_ms( 1000 );
+#else
+ uint8_t rx_buf[ ISM_MAX_PACKET_LEN ] = { 0 };
- #ifdef TRANSMITTER
- ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, &demo_message_1[ 0 ], 9 );
- log_printf( &logger, " Tx : %s", demo_message_1 );
- Delay_ms( 1000 );
-
- ism_transmit_packet( &ism, ISM_CMD_W_TX_PAYLOAD_NOACK, &demo_message_2[ 0 ], 12 );
- log_printf( &logger, " Tx : %s", demo_message_2 );
- Delay_ms( 1000 );
- #endif
+ ism_receive_packet( &ism, &rx_buf[ 0 ] );
+
+ if ( rx_buf[ 0 ] )
+ {
+ log_printf( &logger, " Rx : %s", rx_buf );
+ }
+#endif
}
-void main ( void ) {
+void main ( void )
+{
application_init( );
- for ( ; ; ) {
+ for ( ; ; )
+ {
application_task( );
}
}
diff --git a/clicks/ism/example/manifest.exm b/clicks/ism/example/manifest.exm
index 755f592209..3dce4b83bc 100644
--- a/clicks/ism/example/manifest.exm
+++ b/clicks/ism/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "ISM Click",
"description": "ISM Click is a compact add-on board that contains a complete wireless RF digital data transceiver. This board features the RFM75, a low-power, high-performance 2.4GHz GFSK transceiver from RF Solutions. The RFM75 transceiver is configurable through SPI serial interface and operates with only 3.3V in the worldwide ISM frequency band from 2400MHz up to 2527MHz. The embedded packet processing engines enable their entire operation with a simple MCU as a radio system. Burst mode transmission and up to 2Mbps air data rate make it suitable for applications requiring ultra-low power consumption.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","RFM75"],
"category" : ["2.4 GHz Trancevers"]
}
diff --git a/clicks/ism/example/memake.txt b/clicks/ism/example/memake.txt
deleted file mode 100644
index 3f4de73396..0000000000
--- a/clicks/ism/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_ism
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Ism
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/ism/lib/memake.txt b/clicks/ism/lib/memake.txt
deleted file mode 100644
index ba8984057d..0000000000
--- a/clicks/ism/lib/memake.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-type: library
-
-target: lib_ism
-
-sources: {
- src/ism.c
-}
-
-headers: {
- include/ism.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/ism.h) dst(include/ism.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.Ism
diff --git a/clicks/ism/lib_ism/CMakeLists.txt b/clicks/ism/lib_ism/CMakeLists.txt
new file mode 100644
index 0000000000..f230a8b33c
--- /dev/null
+++ b/clicks/ism/lib_ism/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_ism LANGUAGES MikroC)
+else()
+ project(lib_ism LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_ism STATIC
+ src/ism.c
+ include/ism.h
+)
+add_library(Click.Ism ALIAS lib_ism)
+
+
+
+target_include_directories(lib_ism PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_ism PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_ism PUBLIC MikroSDK.Driver)
diff --git a/clicks/ism/lib_ism/include/Click.Ism b/clicks/ism/lib_ism/include/Click.Ism
new file mode 100644
index 0000000000..0d0738b472
--- /dev/null
+++ b/clicks/ism/lib_ism/include/Click.Ism
@@ -0,0 +1 @@
+#include "ism.h"
diff --git a/clicks/ism/lib/include/ism.h b/clicks/ism/lib_ism/include/ism.h
similarity index 98%
rename from clicks/ism/lib/include/ism.h
rename to clicks/ism/lib_ism/include/ism.h
index 5c1936c72d..2b5750f600 100644
--- a/clicks/ism/lib/include/ism.h
+++ b/clicks/ism/lib_ism/include/ism.h
@@ -213,17 +213,14 @@ extern "C"{
typedef struct
{
// Output pins
-
digital_out_t tl; /**< TX LED pin. */
digital_out_t ce; /**< Chip Enable pin. */
digital_out_t rl; /**< RX LED pin. */
// Input pins
-
digital_in_t irq; /**< Interrupt Request pin. */
// Modules
-
spi_master_t spi; /**< SPI driver object. */
pin_name_t chip_select; /**< Chip select pin descriptor (used for SPI driver). */
@@ -237,21 +234,18 @@ typedef struct
typedef struct
{
// Communication gpio pins
-
pin_name_t miso; /**< Master input - slave output pin descriptor for SPI driver. */
pin_name_t mosi; /**< Master output - slave input pin descriptor for SPI driver. */
pin_name_t sck; /**< Clock pin descriptor for SPI driver. */
pin_name_t cs; /**< Chip select pin descriptor for SPI driver. */
// Additional gpio pins
-
pin_name_t tl; /**< TX LED pin. */
pin_name_t ce; /**< Chip Enable pin. */
pin_name_t rl; /**< RX LED pin. */
pin_name_t irq; /**< Interrupt Request pin. */
// static variable
-
uint32_t spi_speed; /**< SPI serial speed. */
spi_master_mode_t spi_mode; /**< SPI master mode. */
spi_master_chip_select_polarity_t cs_polarity; /**< Chip select pin polarity. */
@@ -296,7 +290,6 @@ void ism_cfg_setup ( ism_cfg_t *cfg );
* See #ism_cfg_t object definition for detailed explanation.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
*/
@@ -307,14 +300,11 @@ err_t ism_init ( ism_t *ctx, ism_cfg_t *cfg );
* @details This function executes a default configuration of ISM click board™.
* @param[in] ctx : Click context object.
* See #ism_t object definition for detailed explanation.
- * @return @li @c 0 - Success,
- * @li @c -1 - Error.
- *
- * See #err_t definition for detailed explanation.
+ * @return None.
* @note This function can consist any necessary configuration or setting to put
* device into operating mode.
*/
-err_t ism_default_cfg ( ism_t *ctx );
+void ism_default_cfg ( ism_t *ctx );
/**
* @brief ISM data writing function.
@@ -327,7 +317,6 @@ err_t ism_default_cfg ( ism_t *ctx );
* @param[in] len : Number of bytes to be written.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
*/
@@ -344,7 +333,6 @@ err_t ism_generic_write ( ism_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len
* @param[in] len : Number of bytes to be read.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
*/
@@ -359,7 +347,6 @@ err_t ism_generic_read ( ism_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len
* @param[in] cmd_data : Command data to be written.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
*/
@@ -385,7 +372,6 @@ void ism_chip_enable ( ism_t *ctx );
* @param[in] ctx : Click context object.
* See #ism_t object definition for detailed explanation.
* @return Nothing.
- *
* @note None.
*/
void ism_chip_disable ( ism_t *ctx );
@@ -401,7 +387,6 @@ void ism_chip_disable ( ism_t *ctx );
* @li @c 0 ( ISM_RT_PIN_STATE_LOW ) - Set pin state on the low level,
* @li @c 1 ( ISM_RT_PIN_STATE_HIGH ) - Set pin state on the high level.
* @return Nothing.
- *
* @note None.
*/
void ism_set_rl_pin_state ( ism_t *ctx, uint8_t rt_pin_state );
@@ -417,7 +402,6 @@ void ism_set_rl_pin_state ( ism_t *ctx, uint8_t rt_pin_state );
* @li @c 0 ( ISM_RT_PIN_STATE_LOW ) - Set pin state on the low level,
* @li @c 1 ( ISM_RT_PIN_STATE_HIGH ) - Set pin state on the high level.
* @return Nothing.
- *
* @note None.
*/
void ism_set_tl_pin_state ( ism_t *ctx, uint8_t tl_pin_state );
@@ -431,7 +415,6 @@ void ism_set_tl_pin_state ( ism_t *ctx, uint8_t tl_pin_state );
* See #ism_t object definition for detailed explanation.
* @return @li @c 0 - Low pin state,
* @li @c 1 - High pin state.
- *
* @note None.
*/
uint8_t ism_check_interrupt_request ( ism_t *ctx );
@@ -448,7 +431,6 @@ uint8_t ism_check_interrupt_request ( ism_t *ctx );
* @li @c 1 - Register Bank 1.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
*/
@@ -463,7 +445,6 @@ err_t ism_switch_bank ( ism_t *ctx, uint8_t bank_sel );
* See #ism_t object definition for detailed explanation.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
*/
@@ -478,7 +459,6 @@ err_t ism_switch_rx_mode ( ism_t *ctx );
* See #ism_t object definition for detailed explanation.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
*/
@@ -493,7 +473,6 @@ err_t ism_switch_tx_mode ( ism_t *ctx );
* See #ism_t object definition for detailed explanation.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
*/
@@ -509,7 +488,6 @@ err_t ism_device_config ( ism_t *ctx );
* @param[out] rx_data : Pointer to the memory location where receive data be stored.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
*/
@@ -527,7 +505,6 @@ err_t ism_receive_packet ( ism_t *ctx, uint8_t *rx_data );
* @param[in] len : The number of bytes to be transmitted.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
- *
* See #err_t definition for detailed explanation.
* @note None.
*/
diff --git a/clicks/ism/lib/src/ism.c b/clicks/ism/lib_ism/src/ism.c
similarity index 67%
rename from clicks/ism/lib/src/ism.c
rename to clicks/ism/lib_ism/src/ism.c
index 76eaa05f65..7b9bc2186b 100644
--- a/clicks/ism/lib/src/ism.c
+++ b/clicks/ism/lib_ism/src/ism.c
@@ -59,9 +59,10 @@
/**
* @brief Bank1 register initialization value.
- * @details In the array Bank1_Reg0_13, all the register value is the byte reversed.
+ * @details In the array bank1_reg0_13, all the register value is the byte reversed.
*/
-const uint32_t Bank1_Reg0_13[ 14 ] = {
+const uint32_t bank1_reg0_13[ 14 ] =
+{
0xE2014B40,
0x00004BC0,
0x028CFCD0,
@@ -76,36 +77,36 @@ const uint32_t Bank1_Reg0_13[ 14 ] = {
0x00000000,
0x00127300,
0x36B48000
-
};
/**
* @brief Bank1 register initialization value.
- * @details In the array Bank1_Reg0_4, all the register value is the byte reversed.
+ * @details In the array bank1_reg0_4, all the register value is the byte reversed.
*/
-const unsigned long Bank1_Reg0_4[ 3 ] = {
+const unsigned long bank1_reg0_4[ 3 ] =
+{
0xDB8A96F9,
0x1B8296F9,
0xDB8296F9
-
};
/**
* @brief Bank1 register initialization value.
- * @details In the array Bank1_Reg0_5, all the register value is the byte reversed.
+ * @details In the array bank1_reg0_5, all the register value is the byte reversed.
*/
-const unsigned long Bank1_Reg0_5[ 3 ] = {
+const unsigned long bank1_reg0_5[ 3 ] =
+{
0xB60F0624,
0xA60F0624,
0xB60F0624
-
};
/**
* @brief Bank1 register initialization value.
- * @details The array Bank1_Reg14 contains the initialization values.
+ * @details The array bank1_reg14 contains the initialization values.
*/
-const uint8_t Bank1_Reg14[ 11 ] = {
+const uint8_t bank1_reg14[ 11 ] =
+{
0x41,
0x20,
0x08,
@@ -117,14 +118,14 @@ const uint8_t Bank1_Reg14[ 11 ] = {
0xFE,
0xFF,
0xFF
-
};
/**
* @brief Bank0 register initialization value.
- * @details The array Bank0_Reg contains the initialization values.
+ * @details The array bank0_reg contains the initialization values.
*/
-const uint8_t Bank0_Reg[ 30 ][ 2 ] = {
+const uint8_t bank0_reg[ 30 ][ 2 ] =
+{
{ 0, 0x0F },
{ 1, 0x3F },
{ 2, 0x3F },
@@ -148,35 +149,34 @@ const uint8_t Bank0_Reg[ 30 ][ 2 ] = {
{ 23, 0x00 },
{ 28, 0x3F },
{ 29, 0x07 }
-
};
/**
* @brief RX0 register address.
- * @details The array RX0_Address contains the initialization values,
+ * @details The array rx0_address contains the initialization values,
* receive address data pipe 0.
*/
-const uint8_t RX0_Address[ 5 ] = {
+const uint8_t rx0_address[ 5 ] =
+{
0x34,
0x43,
0x10,
0x10,
0x01
-
}; // Receive address data pipe 0
/**
* @brief RX1 register address.
- * @details The array RX1_Address contains the initialization values,
+ * @details The array rx1_address contains the initialization values,
* receive address data pipe 1.
*/
-const uint8_t RX1_Address[ 5 ] = {
+const uint8_t rx1_address[ 5 ] =
+{
0x39,
0x38,
0x37,
0x36,
0xC2
-
};
// ---------------------------------------------- PRIVATE FUNCTION DECLARATIONS
@@ -187,10 +187,7 @@ const uint8_t RX1_Address[ 5 ] = {
* @param[in] ctx : Click context object.
* See #ism_t object definition for detailed explanation.
* @return Nothing.
- *
* @note None.
- *
- * @endcode
*/
static void dev_event_startup ( ism_t *ctx );
@@ -200,10 +197,7 @@ static void dev_event_startup ( ism_t *ctx );
* @param[in] ctx : Click context object.
* See #ism_t object definition for detailed explanation.
* @return Nothing.
- *
* @note None.
- *
- * @endcode
*/
static void dev_event_trig_init ( ism_t *ctx );
@@ -213,10 +207,7 @@ static void dev_event_trig_init ( ism_t *ctx );
* @param[in] ctx : Click context object.
* See #ism_t object definition for detailed explanation.
* @return Nothing.
- *
* @note None.
- *
- * @endcode
*/
static void dev_event_trig_rec ( ism_t *ctx );
@@ -226,10 +217,7 @@ static void dev_event_trig_rec ( ism_t *ctx );
* @param[in] ctx : Click context object.
* See #ism_t object definition for detailed explanation.
* @return Nothing.
- *
* @note None.
- *
- * @endcode
*/
static void dev_event_trig_trs ( ism_t *ctx );
@@ -237,10 +225,7 @@ static void dev_event_trig_trs ( ism_t *ctx );
* @brief Delay 50ms delay.
* @details Delay for 50 milliseconds.
* @return Nothing.
- *
* @note None.
- *
- * @endcode
*/
static void dev_delay_50ms( void );
@@ -248,31 +233,30 @@ static void dev_delay_50ms( void );
* @brief Delay 100ms delay.
* @details Delay for 100 milliseconds.
* @return Nothing.
- *
* @note None.
- *
- * @endcode
*/
static void dev_delay_100ms ( void );
// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-void ism_cfg_setup ( ism_cfg_t *cfg ) {
+void ism_cfg_setup ( ism_cfg_t *cfg )
+{
cfg->sck = HAL_PIN_NC;
cfg->miso = HAL_PIN_NC;
cfg->mosi = HAL_PIN_NC;
cfg->cs = HAL_PIN_NC;
cfg->tl = HAL_PIN_NC;
- cfg->ce = HAL_PIN_NC;
- cfg->rl = HAL_PIN_NC;
- cfg->irq = HAL_PIN_NC;
+ cfg->ce = HAL_PIN_NC;
+ cfg->rl = HAL_PIN_NC;
+ cfg->irq = HAL_PIN_NC;
- cfg->spi_speed = 100000;
+ cfg->spi_speed = 1000000;
cfg->spi_mode = SPI_MASTER_MODE_0;
cfg->cs_polarity = SPI_MASTER_CHIP_SELECT_POLARITY_ACTIVE_LOW;
}
-err_t ism_init ( ism_t *ctx, ism_cfg_t *cfg ) {
+err_t ism_init ( ism_t *ctx, ism_cfg_t *cfg )
+{
spi_master_config_t spi_cfg;
spi_master_configure_default( &spi_cfg );
@@ -283,27 +267,29 @@ err_t ism_init ( ism_t *ctx, ism_cfg_t *cfg ) {
ctx->chip_select = cfg->cs;
- if ( spi_master_open( &ctx->spi, &spi_cfg ) == SPI_MASTER_ERROR ) {
+ if ( SPI_MASTER_ERROR == spi_master_open( &ctx->spi, &spi_cfg ) )
+ {
return SPI_MASTER_ERROR;
}
- if ( spi_master_set_default_write_data( &ctx->spi, DUMMY ) == SPI_MASTER_ERROR ) {
+ if ( SPI_MASTER_ERROR == spi_master_set_default_write_data( &ctx->spi, DUMMY ) )
+ {
return SPI_MASTER_ERROR;
}
- if ( spi_master_set_mode( &ctx->spi, cfg->spi_mode ) == SPI_MASTER_ERROR ) {
+ if ( SPI_MASTER_ERROR == spi_master_set_mode( &ctx->spi, cfg->spi_mode ) )
+ {
return SPI_MASTER_ERROR;
}
- if ( spi_master_set_speed( &ctx->spi, cfg->spi_speed ) == SPI_MASTER_ERROR ) {
+ if ( SPI_MASTER_ERROR == spi_master_set_speed( &ctx->spi, cfg->spi_speed ) )
+ {
return SPI_MASTER_ERROR;
}
spi_master_set_chip_select_polarity( cfg->cs_polarity );
spi_master_deselect_device( ctx->chip_select );
- // It should contain the error status checking for every pin init.
-
digital_out_init( &ctx->tl, cfg->tl );
digital_out_init( &ctx->ce, cfg->ce );
digital_out_init( &ctx->rl, cfg->rl );
@@ -313,44 +299,36 @@ err_t ism_init ( ism_t *ctx, ism_cfg_t *cfg ) {
return SPI_MASTER_SUCCESS;
}
-err_t ism_default_cfg ( ism_t *ctx ) {
- // Click default configuration.
-
+void ism_default_cfg ( ism_t *ctx )
+{
dev_event_startup( ctx );
ism_device_config( ctx );
-
- return ISM_OK;
}
-err_t ism_generic_write ( ism_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len ) {
- uint8_t tx_buf[ 257 ];
- uint8_t cnt;
-
- tx_buf[ 0 ] = reg;
- tx_buf[ 0 ] |= ISM_WRITE_BIT_MASK;
- for ( cnt = 1; cnt <= len; cnt++ ) {
- tx_buf[ cnt ] = data_in[ cnt - 1 ];
- }
+err_t ism_generic_write ( ism_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len )
+{
+ uint8_t reg_addr = ISM_WRITE_BIT_MASK | reg;
spi_master_select_device( ctx->chip_select );
- err_t error_flag = spi_master_write( &ctx->spi, tx_buf, len + 1 );
+ err_t error_flag = spi_master_write( &ctx->spi, ®_addr, 1 );
+ error_flag |= spi_master_write( &ctx->spi, data_in, len );
spi_master_deselect_device( ctx->chip_select );
return error_flag;
}
-err_t ism_generic_read ( ism_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len ) {
-
+err_t ism_generic_read ( ism_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len )
+{
spi_master_select_device( ctx->chip_select );
err_t error_flag = spi_master_write_then_read( &ctx->spi, ®, 1, data_out, len );
spi_master_deselect_device( ctx->chip_select );
-
return error_flag;
}
-err_t ism_set_cmd ( ism_t *ctx, uint8_t cmd, uint8_t cmd_data ) {
- uint8_t tx_buf[ 2 ];
+err_t ism_set_cmd ( ism_t *ctx, uint8_t cmd, uint8_t cmd_data )
+{
+ uint8_t tx_buf[ 2 ] = { 0 };
tx_buf[ 0 ] = cmd;
tx_buf[ 1 ] = cmd_data;
@@ -362,42 +340,51 @@ err_t ism_set_cmd ( ism_t *ctx, uint8_t cmd, uint8_t cmd_data ) {
return error_flag;
}
-void ism_chip_enable ( ism_t *ctx ) {
+void ism_chip_enable ( ism_t *ctx )
+{
digital_out_low( &ctx->ce );
}
-void ism_chip_disable ( ism_t *ctx ) {
+void ism_chip_disable ( ism_t *ctx )
+{
digital_out_high( &ctx->ce );
}
-void ism_set_rl_pin_state ( ism_t *ctx, uint8_t rt_pin_state ) {
+void ism_set_rl_pin_state ( ism_t *ctx, uint8_t rt_pin_state )
+{
digital_out_write( &ctx->rl, rt_pin_state );
}
-void ism_set_tl_pin_state ( ism_t *ctx, uint8_t tl_pin_state ) {
+void ism_set_tl_pin_state ( ism_t *ctx, uint8_t tl_pin_state )
+{
digital_out_write( &ctx->tl, tl_pin_state );
}
-uint8_t ism_check_interrupt_request ( ism_t *ctx ) {
+uint8_t ism_check_interrupt_request ( ism_t *ctx )
+{
return digital_in_read( &ctx->irq );
}
-err_t ism_switch_bank ( ism_t *ctx, uint8_t bank_sel ) {
- uint8_t temp;
+err_t ism_switch_bank ( ism_t *ctx, uint8_t bank_sel )
+{
+ uint8_t temp = 0;
err_t error_flag = ism_generic_read( ctx, 7, &temp, 1 );
temp &= SWITCH_BANK_BIT_MASK;
- if ( ( ( temp ) && ( bank_sel == ISM_SEL_BANK_0 ) ) || ( ( ( temp ) == 0 ) && ( bank_sel == ISM_SEL_BANK_1 ) ) ) {
+ if ( ( temp && ( ISM_SEL_BANK_0 == bank_sel ) ) ||
+ ( ( 0 == temp ) && ( ISM_SEL_BANK_1 == bank_sel ) ) )
+ {
error_flag |= ism_set_cmd( ctx, ISM_CMD_ACTIVATE, CMD_SWITCH_BANK );
}
return error_flag;
}
-err_t ism_switch_rx_mode ( ism_t *ctx ) {
- uint8_t value;
+err_t ism_switch_rx_mode ( ism_t *ctx )
+{
+ uint8_t value = 0;
err_t error_flag = ism_set_cmd( ctx, ISM_CMD_FLUSH_RX, 0 );
@@ -416,8 +403,9 @@ err_t ism_switch_rx_mode ( ism_t *ctx ) {
return error_flag;
}
-err_t ism_switch_tx_mode ( ism_t *ctx ) {
- uint8_t value;
+err_t ism_switch_tx_mode ( ism_t *ctx )
+{
+ uint8_t value = 0;
err_t error_flag = ism_set_cmd( ctx, ISM_CMD_FLUSH_TX, 0 );
@@ -433,13 +421,13 @@ err_t ism_switch_tx_mode ( ism_t *ctx ) {
return error_flag;
}
-err_t ism_device_config ( ism_t *ctx ) {
- uint8_t n_cnt_i;
- uint8_t n_cnt_j;
- uint8_t tx_buf[ 12 ];
- uint8_t tmp;
- uint8_t data_rate;
- uint8_t tx_data;
+err_t ism_device_config ( ism_t *ctx )
+{
+ uint8_t n_cnt_i = 0;
+ uint8_t n_cnt_j = 0;
+ uint8_t tx_buf[ 12 ] = { 0 };
+ uint8_t data_rate = 0;
+ uint8_t tx_data = 0;
data_rate = DATA_RATE_1M;
@@ -447,88 +435,105 @@ err_t ism_device_config ( ism_t *ctx ) {
err_t error_flag = ism_switch_bank( ctx, ISM_SEL_BANK_0 );
- for ( n_cnt_i = 0 ; n_cnt_i < 5; n_cnt_i++ ) {
- tx_data = Bank0_Reg[ n_cnt_i ][ 1 ];
- ism_generic_write( ctx, Bank0_Reg[ n_cnt_i ][ 0 ], &tx_data, 1 );
+ for ( n_cnt_i = 0 ; n_cnt_i < 5; n_cnt_i++ )
+ {
+ tx_data = bank0_reg[ n_cnt_i ][ 1 ];
+ ism_generic_write( ctx, bank0_reg[ n_cnt_i ][ 0 ], &tx_data, 1 );
}
- tmp = CHANNEL_2_410G;
- error_flag |= ism_generic_write( ctx, 5, &tmp, 1 );
+ tx_data = CHANNEL_2_410G;
+ error_flag |= ism_generic_write( ctx, 5, &tx_data, 1 );
data_rate |= POWER_DATA_7dBm;
error_flag |= ism_generic_write( ctx, 6, &data_rate, 1 );
- for ( n_cnt_i = 7; n_cnt_i < 21; n_cnt_i++ ) {
- tx_data = Bank0_Reg[ n_cnt_i ][ 1 ];
- error_flag |= ism_generic_write( ctx, Bank0_Reg[ n_cnt_i ][ 0 ], &tx_data, 1 );
+ for ( n_cnt_i = 7; n_cnt_i < 21; n_cnt_i++ )
+ {
+ tx_data = bank0_reg[ n_cnt_i ][ 1 ];
+ error_flag |= ism_generic_write( ctx, bank0_reg[ n_cnt_i ][ 0 ], &tx_data, 1 );
}
- for ( n_cnt_j = 0; n_cnt_j < 5; n_cnt_j++ ) {
- tx_buf[ n_cnt_j ]= RX0_Address[ n_cnt_j ];
+ for ( n_cnt_j = 0; n_cnt_j < 5; n_cnt_j++ )
+ {
+ tx_buf[ n_cnt_j ] = rx0_address[ n_cnt_j ];
}
- ism_generic_write( ctx, 10, &( tx_buf[ 0 ] ), 5 );
+ ism_generic_write( ctx, 10, tx_buf, 5 );
- for ( n_cnt_j = 0; n_cnt_j < 5; n_cnt_j++ ) {
- tx_buf[ n_cnt_j ] = RX1_Address[ n_cnt_j ];
+ for ( n_cnt_j = 0; n_cnt_j < 5; n_cnt_j++ )
+ {
+ tx_buf[ n_cnt_j ] = rx1_address[ n_cnt_j ];
}
- ism_generic_write( ctx, 11, &( tx_buf[ 0 ] ), 5 );
+ ism_generic_write( ctx, 11, tx_buf, 5 );
- for ( n_cnt_j = 0; n_cnt_j < 5; n_cnt_j++ ) {
- tx_buf[ n_cnt_j ] = RX0_Address[ n_cnt_j ];
+ for ( n_cnt_j = 0; n_cnt_j < 5; n_cnt_j++ )
+ {
+ tx_buf[ n_cnt_j ] = rx0_address[ n_cnt_j ];
}
error_flag |= ism_generic_write( ctx, 16, tx_buf, 5 );
error_flag |= ism_generic_read( ctx, 29, &n_cnt_i, 1 );
- if ( n_cnt_i == 0 ) {
- ism_set_cmd( ctx, ISM_CMD_ACTIVATE, DATA_ACTIVE_CMD );
+ if ( 0 == n_cnt_i )
+ {
+ ism_set_cmd( ctx, ISM_CMD_ACTIVATE, DATA_ACTIVE_CMD );
}
- for ( n_cnt_i = 22; n_cnt_i >= 21; n_cnt_i-- ) {
- tx_data = Bank0_Reg[ n_cnt_i ][ 1 ];
- error_flag |= ism_generic_write( ctx, Bank0_Reg[ n_cnt_i ][ 0 ], &tx_data, 1 );
+ for ( n_cnt_i = 22; n_cnt_i >= 21; n_cnt_i-- )
+ {
+ tx_data = bank0_reg[ n_cnt_i ][ 1 ];
+ error_flag |= ism_generic_write( ctx, bank0_reg[ n_cnt_i ][ 0 ], &tx_data, 1 );
}
error_flag |= ism_switch_bank( ctx, ISM_SEL_BANK_1 );
- for ( n_cnt_i = 0; n_cnt_i <= 3; n_cnt_i++ ) {
- for ( n_cnt_j = 0; n_cnt_j < 4; n_cnt_j++ ) {
- tx_buf[ n_cnt_j ] = ( Bank1_Reg0_13[ n_cnt_i ] >> ( 8 * ( n_cnt_j ) ) ) & 0xFF;
+ for ( n_cnt_i = 0; n_cnt_i <= 3; n_cnt_i++ )
+ {
+ for ( n_cnt_j = 0; n_cnt_j < 4; n_cnt_j++ )
+ {
+ tx_buf[ n_cnt_j ] = ( bank1_reg0_13[ n_cnt_i ] >> ( 8 * ( n_cnt_j ) ) ) & 0xFF;
}
- error_flag |= ism_generic_write( ctx, n_cnt_i, &( tx_buf[ 0 ] ), 4 );
+ error_flag |= ism_generic_write( ctx, n_cnt_i, tx_buf, 4 );
}
- for ( n_cnt_j = 0; n_cnt_j < 4; n_cnt_j++ ) {
- tx_buf[ n_cnt_j ] = ( Bank1_Reg0_4[ data_rate + 1 ] >> ( 8 * ( n_cnt_j ) ) ) & 0xFF;
+ for ( n_cnt_j = 0; n_cnt_j < 4; n_cnt_j++ )
+ {
+ tx_buf[ n_cnt_j ] = ( bank1_reg0_4[ data_rate + 1 ] >> ( 8 * ( n_cnt_j ) ) ) & 0xFF;
}
- ism_generic_write( ctx, n_cnt_i, &( tx_buf[ 0 ] ), 4 );
- for ( n_cnt_j = 0; n_cnt_j < 4; n_cnt_j++ ) {
- tx_buf[ n_cnt_j ]=( Bank1_Reg0_5[ data_rate + 1 ] >> ( 8 * ( n_cnt_j ) ) ) & 0xFF;
+ ism_generic_write( ctx, n_cnt_i, tx_buf, 4 );
+ for ( n_cnt_j = 0; n_cnt_j < 4; n_cnt_j++ )
+ {
+ tx_buf[ n_cnt_j ] = ( bank1_reg0_5[ data_rate + 1 ] >> ( 8 * ( n_cnt_j ) ) ) & 0xFF;
}
error_flag |= ism_generic_write( ctx, n_cnt_i, tx_buf, 4 );
- for ( n_cnt_i = 6; n_cnt_i <= 8; n_cnt_i++ ) {
- for ( n_cnt_j = 0; n_cnt_j < 4; n_cnt_j++ ) {
- tx_buf[ n_cnt_j ] = ( Bank1_Reg0_13[ n_cnt_i ] >> ( 8 * ( n_cnt_j ) ) ) & 0xFF;
+ for ( n_cnt_i = 6; n_cnt_i <= 8; n_cnt_i++ )
+ {
+ for ( n_cnt_j = 0; n_cnt_j < 4; n_cnt_j++ )
+ {
+ tx_buf[ n_cnt_j ] = ( bank1_reg0_13[ n_cnt_i ] >> ( 8 * ( n_cnt_j ) ) ) & 0xFF;
}
error_flag |= ism_generic_write( ctx, n_cnt_i, tx_buf, 4 );
}
- for ( n_cnt_i = 9; n_cnt_i <= 13; n_cnt_i++ ) {
- for ( n_cnt_j = 0; n_cnt_j < 4; n_cnt_j++ ) {
- tx_buf[ n_cnt_j ] = ( Bank1_Reg0_13[ n_cnt_i ] >> ( 8 * ( 3 - n_cnt_j ) ) ) & 0xFF;
+ for ( n_cnt_i = 9; n_cnt_i <= 13; n_cnt_i++ )
+ {
+ for ( n_cnt_j = 0; n_cnt_j < 4; n_cnt_j++ )
+ {
+ tx_buf[ n_cnt_j ] = ( bank1_reg0_13[ n_cnt_i ] >> ( 8 * ( 3 - n_cnt_j ) ) ) & 0xFF;
}
error_flag |= ism_generic_write( ctx, n_cnt_i, tx_buf, 4 );
}
- for ( n_cnt_j = 0; n_cnt_j < 11; n_cnt_j++ ) {
- tx_buf[ n_cnt_j ] = Bank1_Reg14[ n_cnt_j ];
+ for ( n_cnt_j = 0; n_cnt_j < 11; n_cnt_j++ )
+ {
+ tx_buf[ n_cnt_j ] = bank1_reg14[ n_cnt_j ];
}
error_flag |= ism_generic_write( ctx, 14, tx_buf, 11 );
- for ( n_cnt_j = 0; n_cnt_j < 4; n_cnt_j++ ) {
- tx_buf[ n_cnt_j ] = ( Bank1_Reg0_13[ 4 ] >> ( 8 * ( n_cnt_j ) ) ) & 0xFF;
+ for ( n_cnt_j = 0; n_cnt_j < 4; n_cnt_j++ )
+ {
+ tx_buf[ n_cnt_j ] = ( bank1_reg0_13[ 4 ] >> ( 8 * ( n_cnt_j ) ) ) & 0xFF;
}
tx_buf[ 0 ] |= 0x06;
- error_flag |= ism_generic_write( ctx, 4 , tx_buf, 4 );
+ error_flag |= ism_generic_write( ctx, 4, tx_buf, 4 );
tx_buf[ 0 ] &= 0xF9;
error_flag |= ism_generic_write( ctx, 4, tx_buf, 4 );
@@ -539,45 +544,58 @@ err_t ism_device_config ( ism_t *ctx ) {
return error_flag;
}
-err_t ism_receive_packet ( ism_t *ctx, uint8_t *rx_data ) {
- uint8_t len, cnt, status, fifo_status;
+err_t ism_receive_packet ( ism_t *ctx, uint8_t *rx_data )
+{
+ uint8_t len = 0;
+ uint8_t cnt = 0;
+ uint8_t status = 0;
+ uint8_t fifo_status = 0;
uint8_t rx_buf[ ISM_MAX_PACKET_LEN ] = { 0 };
err_t error_flag = ism_generic_read( ctx, ISM_REG_BANK_0_STATUS, &status, 1 );
- if ( ( ISM_STATUS_RX_DR & status ) == ISM_STATUS_RX_DR ) {
+ if ( ISM_STATUS_RX_DR == ( ISM_STATUS_RX_DR & status ) )
+ {
dev_event_trig_rec( ctx );
- do {
+ do
+ {
error_flag |= ism_generic_read( ctx, ISM_CMD_R_RX_PL_WID, &len, 1 );
- if ( len <= ISM_MAX_PACKET_LEN ) {
+ if ( len <= ISM_MAX_PACKET_LEN )
+ {
error_flag |= ism_generic_read( ctx, ISM_RD_RX_PLOAD, &rx_buf, len );
- } else {
+ }
+ else
+ {
error_flag |= ism_set_cmd( ctx, ISM_CMD_FLUSH_RX, 0 );
}
error_flag |= ism_generic_read( ctx, ISM_REG_BANK_0_FIFO_STATUS, &fifo_status, 1 );
- } while ( ( fifo_status & ISM_FIFO_STATUS_RX_EMPTY ) == 0 );
+ }
+ while ( 0 == ( fifo_status & ISM_FIFO_STATUS_RX_EMPTY ) );
}
error_flag |= ism_generic_write( ctx, ISM_REG_BANK_0_STATUS, &status, 1 );
- for ( cnt = 0 ; cnt < ISM_MAX_PACKET_LEN ; cnt++ ) {
+ for ( cnt = 0; cnt < ISM_MAX_PACKET_LEN; cnt++ )
+ {
rx_data[ cnt ] = rx_buf[ cnt ];
}
return error_flag;
}
-err_t ism_transmit_packet ( ism_t *ctx, uint8_t type, uint8_t *tx_data, uint8_t len ) {
- uint8_t fifo_status;
+err_t ism_transmit_packet ( ism_t *ctx, uint8_t type, uint8_t *tx_data, uint8_t len )
+{
+ uint8_t fifo_status = 0;
err_t error_flag = ism_switch_tx_mode( ctx );
error_flag |= ism_generic_read( ctx, ISM_REG_BANK_0_FIFO_STATUS, &fifo_status, 1 );
- if ( ( fifo_status & ISM_FIFO_STATUS_TX_FULL ) == 0 ) {
+ if ( 0 == ( fifo_status & ISM_FIFO_STATUS_TX_FULL ) )
+ {
error_flag |= ism_generic_write( ctx, type, tx_data, len);
}
@@ -588,8 +606,10 @@ err_t ism_transmit_packet ( ism_t *ctx, uint8_t type, uint8_t *tx_data, uint8_t
// ----------------------------------------------- PRIVATE FUNCTION DEFINITIONS
-static void dev_event_startup ( ism_t *ctx ) {
- for ( uint8_t cnt = 0 ; cnt < 5 ; cnt++ ) {
+static void dev_event_startup ( ism_t *ctx )
+{
+ for ( uint8_t cnt = 0 ; cnt < 5 ; cnt++ )
+ {
ism_set_tl_pin_state( ctx, ISM_RT_PIN_STATE_HIGH );
ism_set_rl_pin_state( ctx, ISM_RT_PIN_STATE_HIGH );
dev_delay_100ms( );
@@ -602,8 +622,10 @@ static void dev_event_startup ( ism_t *ctx ) {
ism_set_rl_pin_state( ctx, ISM_RT_PIN_STATE_LOW );;
}
-static void dev_event_trig_init ( ism_t *ctx ) {
- for ( uint8_t cnt = 0 ; cnt < 3 ; cnt++ ) {
+static void dev_event_trig_init ( ism_t *ctx )
+{
+ for ( uint8_t cnt = 0 ; cnt < 3 ; cnt++ )
+ {
ism_set_tl_pin_state( ctx, ISM_RT_PIN_STATE_HIGH );
ism_set_rl_pin_state( ctx, ISM_RT_PIN_STATE_LOW );
dev_delay_100ms( );
@@ -616,8 +638,10 @@ static void dev_event_trig_init ( ism_t *ctx ) {
ism_set_rl_pin_state( ctx, ISM_RT_PIN_STATE_LOW );
}
-static void dev_event_trig_rec ( ism_t *ctx ) {
- for ( uint8_t cnt = 0 ; cnt < 3 ; cnt++ ) {
+static void dev_event_trig_rec ( ism_t *ctx )
+{
+ for ( uint8_t cnt = 0 ; cnt < 3 ; cnt++ )
+ {
ism_set_rl_pin_state( ctx, ISM_RT_PIN_STATE_HIGH );
dev_delay_50ms( );
@@ -627,8 +651,10 @@ static void dev_event_trig_rec ( ism_t *ctx ) {
digital_out_low( &ctx->rl );
}
-static void dev_event_trig_trs ( ism_t *ctx ) {
- for ( uint8_t cnt = 0 ; cnt < 6 ; cnt++ ) {
+static void dev_event_trig_trs ( ism_t *ctx )
+{
+ for ( uint8_t cnt = 0 ; cnt < 6 ; cnt++ )
+ {
ism_set_tl_pin_state( ctx, ISM_RT_PIN_STATE_HIGH );
dev_delay_50ms( );
@@ -638,7 +664,8 @@ static void dev_event_trig_trs ( ism_t *ctx ) {
digital_out_low( &ctx->tl );
}
-static void dev_delay_50ms ( void ) {
+static void dev_delay_50ms ( void )
+{
Delay_10ms( );
Delay_10ms( );
Delay_10ms( );
@@ -646,7 +673,8 @@ static void dev_delay_50ms ( void ) {
Delay_10ms( );
}
-static void dev_delay_100ms ( void ) {
+static void dev_delay_100ms ( void )
+{
Delay_100ms( );
}
diff --git a/clicks/ism/memake.txt b/clicks/ism/memake.txt
deleted file mode 100644
index 1fb02ea84c..0000000000
--- a/clicks/ism/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Ism
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/lpwifi/CMakeLists.txt b/clicks/lpwifi/CMakeLists.txt
new file mode 100644
index 0000000000..ada0c71220
--- /dev/null
+++ b/clicks/lpwifi/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_lpwifi LANGUAGES MikroC)
+else()
+ project(example_lpwifi LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_lpwifi
+ example/main.c
+
+)
+
+
+############################ example_lpwifi GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_lpwifi PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_lpwifi PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_lpwifi PUBLIC MikroSDK.Log)
+add_subdirectory(lib_lpwifi)
+target_link_libraries(example_lpwifi PUBLIC Click.LPWiFi)
+############################ example_lpwifi GENERATED CODE END ###########################
diff --git a/clicks/lpwifi/changelog.md b/clicks/lpwifi/changelog.md
index fcfecd1843..8ce49e7776 100644
--- a/clicks/lpwifi/changelog.md
+++ b/clicks/lpwifi/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.6
+### Version 2.1.0.7
- Initial release
diff --git a/clicks/lpwifi/doc/doxy/Doxyfile.doxy b/clicks/lpwifi/doc/doxy/Doxyfile.doxy
index 3896eb919f..ec16ea279c 100644
--- a/clicks/lpwifi/doc/doxy/Doxyfile.doxy
+++ b/clicks/lpwifi/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/lpwifi/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/lpwifi/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/lpwifi/example \
- ../clicks/lpwifi/lib/include \
- ../clicks/lpwifi/README.md
+INPUT = ../cmake/lpwifi/example \
+ ../cmake/lpwifi/lib_lpwifi/include \
+ ../cmake/lpwifi/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/lpwifi/example
+EXAMPLE_PATH = ../cmake/lpwifi/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/lpwifi/doc/package/manifest.json b/clicks/lpwifi/doc/package/manifest.json
index 9618a9b749..4ec5511e5d 100644
--- a/clicks/lpwifi/doc/package/manifest.json
+++ b/clicks/lpwifi/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "WiFi",
+ "architecture": "ARM|PIC|PIC32|RISC-V",
+ "category": "Click Boards > Wireless connectivity > WIFI",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "LP WiFi click",
"example_list": [
@@ -26,11 +25,12 @@
"name": "mikroe.click.lpwifi",
"product_link": "https://www.mikroe.com/lp-wifi-click",
"short_description": "LP WiFi Click is a compact add-on board that represents an ultra-low-power Wi-Fi solution. This board features the DA16200, a fully integrated Wi-Fi module with ultra-low power consumption, best RF performance, and a comfortable development environment from Dialog Semiconductor.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.6"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.7",
+ "cmake": true,
+ "alias": "Click.LPWiFi",
+ "subdir_name": "lib_lpwifi"
}
-
-
diff --git a/clicks/lpwifi/example/CMakeLists.txt b/clicks/lpwifi/example/CMakeLists.txt
new file mode 100644
index 0000000000..d011d2e57b
--- /dev/null
+++ b/clicks/lpwifi/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_lpwifi LANGUAGES MikroC)
+else()
+ project(example_lpwifi LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_lpwifi
+ main.c
+
+)
+
+
+############################ example_lpwifi GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_lpwifi PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_lpwifi PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_lpwifi PUBLIC MikroSDK.Log)
+add_subdirectory(lib_lpwifi)
+target_link_libraries(example_lpwifi PUBLIC Click.LPWiFi)
+############################ example_lpwifi GENERATED CODE END ###########################
diff --git a/clicks/lpwifi/example/main.c b/clicks/lpwifi/example/main.c
index 56de444b4e..11b00d7c65 100644
--- a/clicks/lpwifi/example/main.c
+++ b/clicks/lpwifi/example/main.c
@@ -38,13 +38,13 @@
#include "generic_pointer.h"
// Set AP SSID
-#define AP_SSID ""
+#define AP_SSID ""
// Set AP password - if the AP is OPEN remain this NULL
-#define AP_PASSWORD ""
+#define AP_PASSWORD ""
// Set Local port on which the TCP server and UDP socket will be created.
-#define LOCAL_PORT 1
+#define LOCAL_PORT 1
#define APP_OK 0
#define APP_ERROR_DRIVER -1
@@ -109,7 +109,7 @@ static void lpwifi_log_app_buf ( void );
/**
* @brief LP WiFi response check.
* @details This function checks for response and returns the status of response.
- *
+ *
* @return application status.
* See #err_t definition for detailed explanation.
* @note None.
@@ -118,25 +118,34 @@ static err_t lpwifi_rsp_check ( void );
/**
* @brief LP WiFi check connection.
- * @details This function checks connection to the AP, and fills the assigned_ip_address buffer and
+ * @details This function checks connection to the AP, and fills the assigned_ip_address buffer and
* logs the response on the USB UART if it is connected successfully.
- *
+ *
* @note None.
*/
static void lpwifi_check_connection( void );
-void application_init ( void )
+/**
+ * @brief LP WiFi str cut chr function.
+ * @details This function removes all selected characters from string str,
+ * and returns it to the same str without those characters.
+ * @param str Address of string.
+ * @param chr Character to cut.
+ */
+static void lpwifi_str_cut_chr ( uint8_t *str, uint8_t chr );
+
+void application_init ( void )
{
log_cfg_t log_cfg; /**< Logger config object. */
lpwifi_cfg_t lpwifi_cfg; /**< Click config object. */
- /**
+ /**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
- * @note If USB_UART_RX and USB_UART_TX
- * are defined as HAL_PIN_NC, you will
- * need to define them manually for log to work.
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
@@ -149,7 +158,7 @@ void application_init ( void )
lpwifi_cfg_setup( &lpwifi_cfg );
LPWIFI_MAP_MIKROBUS( lpwifi_cfg, MIKROBUS_1 );
err_t init_flag = lpwifi_init( &lpwifi, &lpwifi_cfg );
- if ( UART_ERROR == init_flag )
+ if ( UART_ERROR == init_flag )
{
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
@@ -159,15 +168,15 @@ void application_init ( void )
lpwifi_default_cfg( &lpwifi );
Delay_ms( 500 );
-
+
// Initiate the communication
lpwifi_send_cmd( &lpwifi, LPWIFI_CMD_AT );
Delay_ms( 1000 );
-
+
// Dummy read
lpwifi_process( );
lpwifi_clear_app_buf( );
-
+
log_printf( &logger, "\r\n --- Factory reset --- \r\n" );
lpwifi_factory_reset_device ( &lpwifi );
Delay_ms( 500 );
@@ -177,7 +186,7 @@ void application_init ( void )
lpwifi_error_check( app_error_flag );
Delay_ms( 500 );
log_printf( &logger, " ----------------------------------------------- \r\n" );
-
+
log_printf( &logger, "\r\n --- Connecting to the access point --- \r\n" );
// Connect to AP
lpwifi_connect_to_ap( &lpwifi, AP_SSID, AP_PASSWORD );
@@ -205,7 +214,7 @@ void application_init ( void )
app_error_flag = lpwifi_rsp_check( );
lpwifi_error_check( app_error_flag );
Delay_ms( 500 );
-
+
log_printf( &logger, " ----------------------------------------------- \r\n" );
log_printf( &logger, "\r\n --- Creating a UDP socket --- \r\n" );
// Create UDP socket
@@ -213,69 +222,69 @@ void application_init ( void )
app_error_flag = lpwifi_rsp_check( );
lpwifi_error_check( app_error_flag );
Delay_ms( 500 );
-
+
log_printf( &logger, " ----------------------------------------------- \r\n" );
log_printf( &logger, " TCP server and UDP socket are available at: \r\n" );
- log_printf( &logger, " SSID: \"%s\"\r\n IP: %s\r\n Port: %u", ( char * ) AP_SSID,
- ( char * ) assigned_ip_address,
+ log_printf( &logger, " SSID: \"%s\"\r\n IP: %s\r\n Port: %u", ( char * ) AP_SSID,
+ ( char * ) assigned_ip_address,
( uint16_t ) LOCAL_PORT );
log_printf( &logger, "\r\n ----------------------------------------------- \r\n" );
log_printf( &logger, " You can connect to it via a TCP/UDP client." );
log_printf( &logger, "\r\n ----------------------------------------------- \r\n" );
}
-void application_task ( void )
+void application_task ( void )
{
lpwifi_process( );
lpwifi_log_app_buf( );
}
-void main ( void )
+void main ( void )
{
application_init( );
- for ( ; ; )
+ for ( ; ; )
{
application_task( );
}
}
-static void lpwifi_clear_app_buf ( void )
+static void lpwifi_clear_app_buf ( void )
{
memset( app_buf, 0, app_buf_len );
app_buf_len = 0;
app_buf_cnt = 0;
}
-static err_t lpwifi_process ( void )
+static err_t lpwifi_process ( void )
{
int32_t rx_size;
char rx_buff[ PROCESS_BUFFER_SIZE ] = { 0 };
rx_size = lpwifi_generic_read( &lpwifi, rx_buff, PROCESS_BUFFER_SIZE );
- if ( rx_size > 0 )
+ if ( rx_size > 0 )
{
int32_t buf_cnt = 0;
- if ( app_buf_len + rx_size >= PROCESS_BUFFER_SIZE )
+ if ( app_buf_len + rx_size >= PROCESS_BUFFER_SIZE )
{
lpwifi_clear_app_buf( );
return LPWIFI_ERROR;
- }
- else
+ }
+ else
{
buf_cnt = app_buf_len;
app_buf_len += rx_size;
}
- for ( int32_t rx_cnt = 0; rx_cnt < rx_size; rx_cnt++ )
+ for ( int32_t rx_cnt = 0; rx_cnt < rx_size; rx_cnt++ )
{
- if ( rx_buff[ rx_cnt ] != 0 )
+ if ( rx_buff[ rx_cnt ] != 0 )
{
app_buf[ ( buf_cnt + rx_cnt ) ] = rx_buff[ rx_cnt ];
- }
- else
+ }
+ else
{
app_buf_len--;
buf_cnt--;
@@ -291,14 +300,14 @@ static err_t lpwifi_rsp_check ( void )
{
uint16_t timeout_cnt = 0;
uint16_t timeout = 10000;
-
+
err_t error_flag = lpwifi_process( );
-
+
if ( ( error_flag != 0 ) && ( error_flag != -1 ) )
{
return error_flag;
}
-
+
while ( ( strstr( app_buf, RSP_OK ) == 0 ) && ( strstr( app_buf, RSP_ERROR ) == 0 ) )
{
error_flag = lpwifi_process( );
@@ -306,7 +315,7 @@ static err_t lpwifi_rsp_check ( void )
{
return error_flag;
}
-
+
timeout_cnt++;
if ( timeout_cnt > timeout )
{
@@ -328,12 +337,12 @@ static err_t lpwifi_rsp_check ( void )
lpwifi_clear_app_buf( );
return APP_ERROR_TIMEOUT;
}
-
+
Delay_ms( 1 );
}
-
+
lpwifi_log_app_buf();
-
+
return APP_OK;
}
@@ -361,7 +370,7 @@ static void lpwifi_log_app_buf ( void )
{
log_printf( &logger, "%c", app_buf[ buf_cnt ] );
}
-
+
lpwifi_clear_app_buf( );
}
@@ -369,20 +378,20 @@ static void lpwifi_check_connection( void )
{
#define CONNECTED "+WFJAP:1"
#define NOT_CONNECTED "+WFJAP:0"
-
+
lpwifi_process( );
if ( 0 != strstr( app_buf, CONNECTED ) )
{
#define IP_DELIMITER "',"
- char * __generic app_buf_ptr;
+ char * __generic_ptr app_buf_ptr;
Delay_ms( 200 );
lpwifi_process( );
app_buf_ptr = strstr( app_buf, IP_DELIMITER );
strcpy( assigned_ip_address, app_buf_ptr );
- str_cut_chr( assigned_ip_address, '\'' );
- str_cut_chr( assigned_ip_address, ',' );
- str_cut_chr( assigned_ip_address, '\r' );
- str_cut_chr( assigned_ip_address, '\n' );
+ lpwifi_str_cut_chr( assigned_ip_address, '\'' );
+ lpwifi_str_cut_chr( assigned_ip_address, ',' );
+ lpwifi_str_cut_chr( assigned_ip_address, '\r' );
+ lpwifi_str_cut_chr( assigned_ip_address, '\n' );
lpwifi_log_app_buf( );
app_connection_status = CONNECTED_TO_AP;
}
@@ -392,4 +401,19 @@ static void lpwifi_check_connection( void )
}
}
+static void lpwifi_str_cut_chr ( uint8_t *str, uint8_t chr )
+{
+ uint16_t cnt_0, cnt_1;
+ for ( cnt_0 = 0; cnt_0 < strlen( str ); cnt_0++ )
+ {
+ if ( str[ cnt_0 ] == chr )
+ {
+ for ( cnt_1 = cnt_0; cnt_1 < strlen( str ); cnt_1++ )
+ {
+ str[ cnt_1 ] = str[ cnt_1 + 1 ];
+ }
+ }
+ }
+}
+
// ------------------------------------------------------------------------ END
diff --git a/clicks/lpwifi/example/manifest.exm b/clicks/lpwifi/example/manifest.exm
index 902201d255..75ca0df594 100644
--- a/clicks/lpwifi/example/manifest.exm
+++ b/clicks/lpwifi/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "LP WiFi Click",
"description": "LP WiFi Click is a compact add-on board that represents an ultra-low-power Wi-Fi solution. This board features the DA16200, a fully integrated Wi-Fi module with ultra-low power consumption, best RF performance, and a comfortable development environment from Dialog Semiconductor.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv"],
"hw" : ["click","DA16200"],
"category" : ["WiFi"]
}
diff --git a/clicks/lpwifi/example/memake.txt b/clicks/lpwifi/example/memake.txt
deleted file mode 100644
index abff1e7d61..0000000000
--- a/clicks/lpwifi/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_lpwifi
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.LPWiFi
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/lpwifi/lib/memake.txt b/clicks/lpwifi/lib/memake.txt
deleted file mode 100644
index ae31630e2a..0000000000
--- a/clicks/lpwifi/lib/memake.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-type: library
-
-target: lib_lpwifi
-
-sources: {
- src/lpwifi.c
-}
-
-headers: {
- include/lpwifi.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/lpwifi.h) dst(include/lpwifi.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
- MikroSDK.Conversions
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.LPWiFi
diff --git a/clicks/lpwifi/lib_lpwifi/CMakeLists.txt b/clicks/lpwifi/lib_lpwifi/CMakeLists.txt
new file mode 100644
index 0000000000..93cb3c3e10
--- /dev/null
+++ b/clicks/lpwifi/lib_lpwifi/CMakeLists.txt
@@ -0,0 +1,29 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_lpwifi LANGUAGES MikroC)
+else()
+ project(lib_lpwifi LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_lpwifi STATIC
+ src/lpwifi.c
+ include/lpwifi.h
+)
+add_library(Click.LPWiFi ALIAS lib_lpwifi)
+
+
+
+target_include_directories(lib_lpwifi PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_lpwifi PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_lpwifi PUBLIC MikroSDK.Driver)
+find_package(MikroSDK.Conversions REQUIRED)
+target_link_libraries(lib_lpwifi PUBLIC MikroSDK.Conversions)
diff --git a/clicks/lpwifi/lib_lpwifi/include/Click.LPWiFi b/clicks/lpwifi/lib_lpwifi/include/Click.LPWiFi
new file mode 100644
index 0000000000..fb839b28ea
--- /dev/null
+++ b/clicks/lpwifi/lib_lpwifi/include/Click.LPWiFi
@@ -0,0 +1 @@
+#include "lpwifi.h"
diff --git a/clicks/lpwifi/lib/include/lpwifi.h b/clicks/lpwifi/lib_lpwifi/include/lpwifi.h
similarity index 100%
rename from clicks/lpwifi/lib/include/lpwifi.h
rename to clicks/lpwifi/lib_lpwifi/include/lpwifi.h
diff --git a/clicks/lpwifi/lib/src/lpwifi.c b/clicks/lpwifi/lib_lpwifi/src/lpwifi.c
similarity index 100%
rename from clicks/lpwifi/lib/src/lpwifi.c
rename to clicks/lpwifi/lib_lpwifi/src/lpwifi.c
diff --git a/clicks/lpwifi/memake.txt b/clicks/lpwifi/memake.txt
deleted file mode 100644
index bb0ef72b6a..0000000000
--- a/clicks/lpwifi/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: LPWiFi
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/peltier/CHANGELOG.md b/clicks/peltier/CHANGELOG.md
index 4edeeb3aab..ac23ae3dc2 100644
--- a/clicks/peltier/CHANGELOG.md
+++ b/clicks/peltier/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.6
+### Version 2.1.0.6
- Initial release
diff --git a/clicks/peltier/CMakeLists.txt b/clicks/peltier/CMakeLists.txt
new file mode 100644
index 0000000000..03d76eb38c
--- /dev/null
+++ b/clicks/peltier/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_peltier LANGUAGES MikroC)
+else()
+ project(example_peltier LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_peltier
+ example/main.c
+
+)
+
+
+############################ example_peltier GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_peltier PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_peltier PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_peltier PUBLIC MikroSDK.Log)
+add_subdirectory(lib_peltier)
+target_link_libraries(example_peltier PUBLIC Click.Peltier)
+############################ example_peltier GENERATED CODE END ###########################
diff --git a/clicks/peltier/doc/doxy/Doxyfile.doxy b/clicks/peltier/doc/doxy/Doxyfile.doxy
index d69d02ee96..5059ab9d13 100644
--- a/clicks/peltier/doc/doxy/Doxyfile.doxy
+++ b/clicks/peltier/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/peltier/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/peltier/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/peltier/example \
- ../clicks/peltier/lib/include \
- ../clicks/peltier/README.md
+INPUT = ../cmake/peltier/example \
+ ../cmake/peltier/lib_peltier/include \
+ ../cmake/peltier/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/peltier/example
+EXAMPLE_PATH = ../cmake/peltier/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/peltier/doc/package/manifest.json b/clicks/peltier/doc/package/manifest.json
index 7d45914919..c74cb9b3f1 100644
--- a/clicks/peltier/doc/package/manifest.json
+++ b/clicks/peltier/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Battery charger",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Power management > Battery Charger",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Peltier click",
"example_list": [
@@ -26,18 +25,14 @@
"name": "mikroe.click.peltier",
"product_link": "https://www.mikroe.com/peltier-click",
"short_description": "The Peltier Click is a Click board™ which utilizes the SPV1050, an ultralow power energy harvester and battery charger from STMicroelectronics. The Peltier click can charge lithium battery using thermoelectric energy harvesting device (TEG).",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "_type": "mikroSDK Library",
+ "related_projects": [
2946
],
- "_type": "mikroSDK Library",
- "version": "2.0.0.6"
+ "version": "2.1.0.6",
+ "cmake": true,
+ "alias": "Click.Peltier",
+ "subdir_name": "lib_peltier"
}
-
-
-
-
-
-
diff --git a/clicks/peltier/example/CMakeLists.txt b/clicks/peltier/example/CMakeLists.txt
new file mode 100644
index 0000000000..4c74c2a2d1
--- /dev/null
+++ b/clicks/peltier/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_peltier LANGUAGES MikroC)
+else()
+ project(example_peltier LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_peltier
+ main.c
+
+)
+
+
+############################ example_peltier GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_peltier PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_peltier PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_peltier PUBLIC MikroSDK.Log)
+add_subdirectory(lib_peltier)
+target_link_libraries(example_peltier PUBLIC Click.Peltier)
+############################ example_peltier GENERATED CODE END ###########################
diff --git a/clicks/peltier/example/manifest.exm b/clicks/peltier/example/manifest.exm
index b6d55c406f..f5530c1133 100644
--- a/clicks/peltier/example/manifest.exm
+++ b/clicks/peltier/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Peltier Click",
"description": "The Peltier Click is a Click board™ which utilizes the SPV1050, an ultralow power energy harvester and battery charger from STMicroelectronics. The Peltier click can charge lithium battery using thermoelectric energy harvesting device (TEG).",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","SPV1050"],
"category" : ["Battery charger"]
}
diff --git a/clicks/peltier/example/memake.txt b/clicks/peltier/example/memake.txt
deleted file mode 100644
index eaeffefaf2..0000000000
--- a/clicks/peltier/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_peltier
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Peltier
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/peltier/lib/memake.txt b/clicks/peltier/lib/memake.txt
deleted file mode 100644
index 61e224576c..0000000000
--- a/clicks/peltier/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_peltier
-
-alias: Click.Peltier
-
-sources: {
- src/peltier.c
-}
-
-headers: {
- include/peltier.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/peltier.h) dst(include/peltier.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/peltier/lib_peltier/CMakeLists.txt b/clicks/peltier/lib_peltier/CMakeLists.txt
new file mode 100644
index 0000000000..e21f17a165
--- /dev/null
+++ b/clicks/peltier/lib_peltier/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_peltier LANGUAGES MikroC)
+else()
+ project(lib_peltier LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_peltier STATIC
+ src/peltier.c
+ include/peltier.h
+)
+add_library(Click.Peltier ALIAS lib_peltier)
+
+
+
+target_include_directories(lib_peltier PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_peltier PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_peltier PUBLIC MikroSDK.Driver)
diff --git a/clicks/peltier/lib_peltier/include/Click.Peltier b/clicks/peltier/lib_peltier/include/Click.Peltier
new file mode 100644
index 0000000000..cc698f7447
--- /dev/null
+++ b/clicks/peltier/lib_peltier/include/Click.Peltier
@@ -0,0 +1 @@
+#include "peltier.h"
diff --git a/clicks/peltier/lib/include/peltier.h b/clicks/peltier/lib_peltier/include/peltier.h
similarity index 96%
rename from clicks/peltier/lib/include/peltier.h
rename to clicks/peltier/lib_peltier/include/peltier.h
index e81bab2d38..0403552231 100644
--- a/clicks/peltier/lib/include/peltier.h
+++ b/clicks/peltier/lib_peltier/include/peltier.h
@@ -1,199 +1,199 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-/*!
- * \file
- *
- * \brief This file contains API for Peltier Click driver.
- *
- * \addtogroup peltier Peltier Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef PELTIER_H
-#define PELTIER_H
-
-#include "drv_digital_out.h"
-#include "drv_digital_in.h"
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-#define PELTIER_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.en2= MIKROBUS( mikrobus, MIKROBUS_RST ); \
- cfg.en1= MIKROBUS( mikrobus, MIKROBUS_CS ); \
- cfg.chg= MIKROBUS( mikrobus, MIKROBUS_PWM ); \
- cfg.con= MIKROBUS( mikrobus, MIKROBUS_INT )
-/** \} */
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define PELTIER_RETVAL uint8_t
-
-#define PELTIER_OK 0x00
-#define PELTIER_INIT_ERROR 0xFF
-/** \} */
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
- // Output pins
-
- digital_out_t en2;
- digital_out_t en1;
-
- // Input pins
-
- digital_in_t chg;
- digital_in_t con;
-
-} peltier_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Additional gpio pins
-
- pin_name_t en2;
- pin_name_t en1;
- pin_name_t chg;
- pin_name_t con;
-
-} peltier_cfg_t;
-
-/** \} */ // End types group
-
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
- */
-void peltier_cfg_setup ( peltier_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- * @param peltier Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
- */
-PELTIER_RETVAL peltier_init ( peltier_t *ctx, peltier_cfg_t *cfg );
-
-/**
- * @brief Enables LDO2 function.
- *
- * @param ctx Click object.
- *
- * @description This function is used to enable 3.3V output.
- */
-void peltier_enable_ldo2 ( peltier_t *ctx );
-
-/**
- * @brief Disables LDO2 function.
- *
- * @param ctx Click object.
- *
- * @description This function is used to disable 3.3V output..
- */
-void peltier_disable_ldo2 ( peltier_t *ctx );
-
-/**
- * @brief Enables LDO1 function.
- *
- * @param ctx Click object.
- *
- * @description This function is used to enable 1.8V output.
- */
-void peltier_enable_ldo1 ( peltier_t *ctx );
-
-/**
- * @brief Disables LDO1 function.
- *
- * @param ctx Click object.
- *
- * @description This function is used to disable 1.8V output.
- */
-void peltier_disable_ldo1 ( peltier_t *ctx );
-
-/**
- * @brief Check ongoing battery charge flag pin function.
- *
- * @param ctx Click object.
- *
- * @description This function is used to check ongoing battery charge flag pin.
- */
-uint8_t peltier_battery_charge ( peltier_t *ctx );
-
-/**
- * @brief Check input voltage good flag pin function.
- *
- * @param ctx Click object.
- *
- * @description This function is used to check input voltage flag pin.
- */
-uint8_t peltier_vin_good_flag ( peltier_t *ctx );
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _PELTIER_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+/*!
+ * \file
+ *
+ * \brief This file contains API for Peltier Click driver.
+ *
+ * \addtogroup peltier Peltier Click Driver
+ * @{
+ */
+// ----------------------------------------------------------------------------
+
+#ifndef PELTIER_H
+#define PELTIER_H
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+
+// -------------------------------------------------------------- PUBLIC MACROS
+/**
+ * \defgroup macros Macros
+ * \{
+ */
+
+/**
+ * \defgroup map_mikrobus MikroBUS
+ * \{
+ */
+#define PELTIER_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.en2= MIKROBUS( mikrobus, MIKROBUS_RST ); \
+ cfg.en1= MIKROBUS( mikrobus, MIKROBUS_CS ); \
+ cfg.chg= MIKROBUS( mikrobus, MIKROBUS_PWM ); \
+ cfg.con= MIKROBUS( mikrobus, MIKROBUS_INT )
+/** \} */
+
+/**
+ * \defgroup error_code Error Code
+ * \{
+ */
+#define PELTIER_RETVAL uint8_t
+
+#define PELTIER_OK 0x00
+#define PELTIER_INIT_ERROR 0xFF
+/** \} */
+
+/** \} */ // End group macro
+// --------------------------------------------------------------- PUBLIC TYPES
+/**
+ * \defgroup type Types
+ * \{
+ */
+
+/**
+ * @brief Click ctx object definition.
+ */
+typedef struct
+{
+ // Output pins
+
+ digital_out_t en2;
+ digital_out_t en1;
+
+ // Input pins
+
+ digital_in_t chg;
+ digital_in_t con;
+
+} peltier_t;
+
+/**
+ * @brief Click configuration structure definition.
+ */
+typedef struct
+{
+ // Additional gpio pins
+
+ pin_name_t en2;
+ pin_name_t en1;
+ pin_name_t chg;
+ pin_name_t con;
+
+} peltier_cfg_t;
+
+/** \} */ // End types group
+
+// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
+
+/**
+ * \defgroup public_function Public function
+ * \{
+ */
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+/**
+ * @brief Config Object Initialization function.
+ *
+ * @param cfg Click configuration structure.
+ *
+ * @description This function initializes click configuration structure to init state.
+ * @note All used pins will be set to unconnected state.
+ */
+void peltier_cfg_setup ( peltier_cfg_t *cfg );
+
+/**
+ * @brief Initialization function.
+ * @param peltier Click object.
+ * @param cfg Click configuration structure.
+ *
+ * @description This function initializes all necessary pins and peripherals used for this click.
+ */
+PELTIER_RETVAL peltier_init ( peltier_t *ctx, peltier_cfg_t *cfg );
+
+/**
+ * @brief Enables LDO2 function.
+ *
+ * @param ctx Click object.
+ *
+ * @description This function is used to enable 3.3V output.
+ */
+void peltier_enable_ldo2 ( peltier_t *ctx );
+
+/**
+ * @brief Disables LDO2 function.
+ *
+ * @param ctx Click object.
+ *
+ * @description This function is used to disable 3.3V output..
+ */
+void peltier_disable_ldo2 ( peltier_t *ctx );
+
+/**
+ * @brief Enables LDO1 function.
+ *
+ * @param ctx Click object.
+ *
+ * @description This function is used to enable 1.8V output.
+ */
+void peltier_enable_ldo1 ( peltier_t *ctx );
+
+/**
+ * @brief Disables LDO1 function.
+ *
+ * @param ctx Click object.
+ *
+ * @description This function is used to disable 1.8V output.
+ */
+void peltier_disable_ldo1 ( peltier_t *ctx );
+
+/**
+ * @brief Check ongoing battery charge flag pin function.
+ *
+ * @param ctx Click object.
+ *
+ * @description This function is used to check ongoing battery charge flag pin.
+ */
+uint8_t peltier_battery_charge ( peltier_t *ctx );
+
+/**
+ * @brief Check input voltage good flag pin function.
+ *
+ * @param ctx Click object.
+ *
+ * @description This function is used to check input voltage flag pin.
+ */
+uint8_t peltier_vin_good_flag ( peltier_t *ctx );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _PELTIER_H_
+
+/** \} */ // End public_function group
+/// \} // End click Driver group
+/*! @} */
+// ------------------------------------------------------------------------- END
diff --git a/clicks/peltier/lib/src/peltier.c b/clicks/peltier/lib_peltier/src/peltier.c
similarity index 96%
rename from clicks/peltier/lib/src/peltier.c
rename to clicks/peltier/lib_peltier/src/peltier.c
index cbe23167f8..c88ece721e 100644
--- a/clicks/peltier/lib/src/peltier.c
+++ b/clicks/peltier/lib_peltier/src/peltier.c
@@ -1,89 +1,89 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-/*!
- * \file
- *
- */
-
-#include "peltier.h"
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void peltier_cfg_setup ( peltier_cfg_t *cfg )
-{
- // Additional gpio pins
-
- cfg->en2 = HAL_PIN_NC;
- cfg->en1 = HAL_PIN_NC;
- cfg->chg = HAL_PIN_NC;
- cfg->con = HAL_PIN_NC;
-}
-
-PELTIER_RETVAL peltier_init ( peltier_t *ctx, peltier_cfg_t *cfg )
-{
- // Output pins
-
- digital_out_init( &ctx->en2, cfg->en2 );
- digital_out_init( &ctx->en1, cfg->en1 );
-
- // Input pins
-
- digital_in_init( &ctx->chg, cfg->chg );
- digital_in_init( &ctx->con, cfg->con );
-
- return PELTIER_OK;
-}
-
-void peltier_enable_ldo2 ( peltier_t *ctx )
-{
- digital_out_high( &ctx->en2 );
-}
-
-void peltier_disable_ldo2 ( peltier_t *ctx )
-{
- digital_out_low( &ctx->en2 );
-}
-
-void peltier_enable_ldo1 ( peltier_t *ctx )
-{
- digital_out_high( &ctx->en1 );
-}
-
-void peltier_disable_ldo1 ( peltier_t *ctx )
-{
- digital_out_low( &ctx->en1 );
-}
-
-uint8_t peltier_battery_charge ( peltier_t *ctx )
-{
- return digital_in_read( &ctx->chg );
-}
-
-uint8_t peltier_vin_good_flag ( peltier_t *ctx )
-{
- return digital_in_read( &ctx->con );
-}
-
-// ------------------------------------------------------------------------- END
-
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+/*!
+ * \file
+ *
+ */
+
+#include "peltier.h"
+
+// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
+
+void peltier_cfg_setup ( peltier_cfg_t *cfg )
+{
+ // Additional gpio pins
+
+ cfg->en2 = HAL_PIN_NC;
+ cfg->en1 = HAL_PIN_NC;
+ cfg->chg = HAL_PIN_NC;
+ cfg->con = HAL_PIN_NC;
+}
+
+PELTIER_RETVAL peltier_init ( peltier_t *ctx, peltier_cfg_t *cfg )
+{
+ // Output pins
+
+ digital_out_init( &ctx->en2, cfg->en2 );
+ digital_out_init( &ctx->en1, cfg->en1 );
+
+ // Input pins
+
+ digital_in_init( &ctx->chg, cfg->chg );
+ digital_in_init( &ctx->con, cfg->con );
+
+ return PELTIER_OK;
+}
+
+void peltier_enable_ldo2 ( peltier_t *ctx )
+{
+ digital_out_high( &ctx->en2 );
+}
+
+void peltier_disable_ldo2 ( peltier_t *ctx )
+{
+ digital_out_low( &ctx->en2 );
+}
+
+void peltier_enable_ldo1 ( peltier_t *ctx )
+{
+ digital_out_high( &ctx->en1 );
+}
+
+void peltier_disable_ldo1 ( peltier_t *ctx )
+{
+ digital_out_low( &ctx->en1 );
+}
+
+uint8_t peltier_battery_charge ( peltier_t *ctx )
+{
+ return digital_in_read( &ctx->chg );
+}
+
+uint8_t peltier_vin_good_flag ( peltier_t *ctx )
+{
+ return digital_in_read( &ctx->con );
+}
+
+// ------------------------------------------------------------------------- END
+
diff --git a/clicks/peltier/memake.txt b/clicks/peltier/memake.txt
deleted file mode 100644
index ee2506dbd6..0000000000
--- a/clicks/peltier/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Peltier
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/ph/CMakeLists.txt b/clicks/ph/CMakeLists.txt
new file mode 100644
index 0000000000..b9eb351d52
--- /dev/null
+++ b/clicks/ph/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_ph LANGUAGES MikroC)
+else()
+ project(example_ph LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_ph
+ example/main.c
+
+)
+
+
+############################ example_ph GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_ph PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_ph PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_ph PUBLIC MikroSDK.Log)
+add_subdirectory(lib_ph)
+target_link_libraries(example_ph PUBLIC Click.pH)
+############################ example_ph GENERATED CODE END ###########################
diff --git a/clicks/ph/changelog.md b/clicks/ph/changelog.md
index c3d239906c..1e0893fa34 100644
--- a/clicks/ph/changelog.md
+++ b/clicks/ph/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.0
+### Version 2.1.0.2
- Initial release
diff --git a/clicks/ph/doc/doxy/Doxyfile.doxy b/clicks/ph/doc/doxy/Doxyfile.doxy
index 07ea0575e1..d99735eee2 100644
--- a/clicks/ph/doc/doxy/Doxyfile.doxy
+++ b/clicks/ph/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/ph/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/ph/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/ph/example \
- ../clicks/ph/lib/include \
- ../clicks/ph/README.md
+INPUT = ../cmake/ph/example \
+ ../cmake/ph/lib_ph/include \
+ ../cmake/ph/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/ph/example
+EXAMPLE_PATH = ../cmake/ph/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/ph/doc/package/manifest.json b/clicks/ph/doc/package/manifest.json
index 153921167f..4232fdaed7 100644
--- a/clicks/ph/doc/package/manifest.json
+++ b/clicks/ph/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Environmental",
+ "architecture": "ARM|PIC|PIC32|RISC-V",
+ "category": "Click Boards > Sensors > Environmental",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "pH click",
"example_list": [
@@ -26,11 +25,15 @@
"name": "mikroe.click.ph",
"product_link": "https://www.mikroe.com/ph-click",
"short_description": "pH Click is a compact add-on board that provides an opportunity for the user to read pH with the same accuracy and capabilities as with some other expensive solutions. This board features the pH EZO™, a 6th generation embedded pH circuit that offers the highest level of stability and accuracy from AtlasScientific.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "related_projects":[
+ "related_projects": [
3869
],
- "_type":"mikroSDK Library",
- "version": "2.0.0.0"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.2",
+ "cmake": true,
+ "alias": "Click.pH",
+ "subdir_name": "lib_ph"
}
+
diff --git a/clicks/ph/example/CMakeLists.txt b/clicks/ph/example/CMakeLists.txt
new file mode 100644
index 0000000000..006af48efa
--- /dev/null
+++ b/clicks/ph/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_ph LANGUAGES MikroC)
+else()
+ project(example_ph LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_ph
+ main.c
+
+)
+
+
+############################ example_ph GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_ph PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_ph PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_ph PUBLIC MikroSDK.Log)
+add_subdirectory(lib_ph)
+target_link_libraries(example_ph PUBLIC Click.pH)
+############################ example_ph GENERATED CODE END ###########################
diff --git a/clicks/ph/example/manifest.exm b/clicks/ph/example/manifest.exm
index a9383dc57c..79e4a3f2d3 100644
--- a/clicks/ph/example/manifest.exm
+++ b/clicks/ph/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "pH Click",
"description": "pH Click is a compact add-on board that provides an opportunity for the user to read pH with the same accuracy and capabilities as with some other expensive solutions. This board features the pH EZO™, a 6th generation embedded pH circuit that offers the highest level of stability and accuracy from AtlasScientific.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv"],
"hw" : ["click","pH EZO"],
"category" : ["Environmental"]
}
diff --git a/clicks/ph/example/memake.txt b/clicks/ph/example/memake.txt
deleted file mode 100644
index 2623fd7ed6..0000000000
--- a/clicks/ph/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_ph
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.pH
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/ph/lib/memake.txt b/clicks/ph/lib/memake.txt
deleted file mode 100644
index d15d763143..0000000000
--- a/clicks/ph/lib/memake.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-type: library
-
-target: lib_ph
-
-sources: {
- src/ph.c
-}
-
-headers: {
- include/ph.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/ph.h) dst(include/ph.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.pH
diff --git a/clicks/ph/lib_ph/CMakeLists.txt b/clicks/ph/lib_ph/CMakeLists.txt
new file mode 100644
index 0000000000..dec9af6ad8
--- /dev/null
+++ b/clicks/ph/lib_ph/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_ph LANGUAGES MikroC)
+else()
+ project(lib_ph LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_ph STATIC
+ src/ph.c
+ include/ph.h
+)
+add_library(Click.pH ALIAS lib_ph)
+
+
+
+target_include_directories(lib_ph PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_ph PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_ph PUBLIC MikroSDK.Driver)
diff --git a/clicks/ph/lib_ph/include/Click.pH b/clicks/ph/lib_ph/include/Click.pH
new file mode 100644
index 0000000000..8917584371
--- /dev/null
+++ b/clicks/ph/lib_ph/include/Click.pH
@@ -0,0 +1 @@
+#include "ph.h"
diff --git a/clicks/ph/lib/include/ph.h b/clicks/ph/lib_ph/include/ph.h
similarity index 98%
rename from clicks/ph/lib/include/ph.h
rename to clicks/ph/lib_ph/include/ph.h
index a81a3ddeb0..147f15a323 100644
--- a/clicks/ph/lib/include/ph.h
+++ b/clicks/ph/lib_ph/include/ph.h
@@ -260,7 +260,7 @@ err_t ph_default_cfg ( ph_t *ctx );
*
* See #err_t definition for detailed explanation.
*/
-err_t ph_generic_write ( ph_t *ctx, char *data_buf, uint16_t len );
+err_t ph_generic_write ( ph_t *ctx, uint8_t *data_buf, uint16_t len );
/**
* @brief pH data reading function.
@@ -274,7 +274,7 @@ err_t ph_generic_write ( ph_t *ctx, char *data_buf, uint16_t len );
*
* See #err_t definition for detailed explanation.
*/
-err_t ph_generic_read ( ph_t *ctx, char *data_buf, uint16_t max_len );
+err_t ph_generic_read ( ph_t *ctx, uint8_t *data_buf, uint16_t max_len );
/**
* @brief UART Write Single Byte function.
@@ -295,7 +295,7 @@ void ph_uart_write ( ph_t *ctx, uint8_t input );
* @param[in] delim : Delimiter.
* @return Nothing.
**/
-void ph_uart_read_until ( ph_t *ctx, char *p_rx_data, char delim );
+void ph_uart_read_until ( ph_t *ctx, char *p_rx_data, char *delim );
/**
* @brief Send command function
@@ -329,7 +329,7 @@ void ph_send_cmd_resp ( ph_t *ctx, char *p_cmd, char *p_resp );
* @param[out] p_resp : Pointer to response.
* @return Nothing.
**/
-void ph_send_cmd_w_num ( ph_t *ctx, char *p_cmd, float flt_val, char *p_resp );
+void ph_send_cmd_w_num ( ph_t *ctx, char *p_cmd, char *flt_val, char *p_resp );
/**
* @brief Send get response function.
diff --git a/clicks/ph/lib/src/ph.c b/clicks/ph/lib_ph/src/ph.c
similarity index 93%
rename from clicks/ph/lib/src/ph.c
rename to clicks/ph/lib_ph/src/ph.c
index 9e67e0fefd..4f594303ab 100644
--- a/clicks/ph/lib/src/ph.c
+++ b/clicks/ph/lib_ph/src/ph.c
@@ -34,6 +34,15 @@
*/
static void dev_com_delay ();
+/**
+ * @brief pH str cut chr function.
+ * @details This function removes all selected characters from string str,
+ * and returns it to the same str without those characters.
+ * @param str Address of string.
+ * @param chr Character to cut.
+ */
+static void ph_str_cut_chr ( uint8_t *str, uint8_t chr );
+
// --------------------------------------------------------- PUBLIC FUNCTIONS
void ph_cfg_setup ( ph_cfg_t *cfg )
@@ -80,9 +89,9 @@ err_t ph_init ( ph_t *ctx, ph_cfg_t *cfg )
return UART_SUCCESS;
}
-err_t ph_generic_write ( ph_t *ctx, uint8_t *data_buf )
+err_t ph_generic_write ( ph_t *ctx, uint8_t *data_buf, uint16_t len )
{
- return uart_write( &ctx->uart, data_buf, 1 );
+ return uart_write( &ctx->uart, data_buf, len );
}
err_t ph_generic_read ( ph_t *ctx, uint8_t *data_buf, uint16_t max_len )
@@ -95,18 +104,6 @@ void ph_uart_write ( ph_t *ctx, uint8_t input )
uart_write( &ctx->uart, &input, 1 );
}
-void ph_uart_write_until ( ph_t *ctx, char *p_tx_data, char delim )
-{
- uint16_t n_cnt = 0;
-
- do
- {
- uart_write( &ctx->uart, &p_tx_data[ n_cnt++ ], 1 );
-
- }
- while( p_tx_data[ n_cnt ] == delim );
-}
-
void ph_uart_read_until ( ph_t *ctx, char *p_rx_data, char *delim )
{
char rx_data[ 40 ];
@@ -118,7 +115,7 @@ void ph_uart_read_until ( ph_t *ctx, char *p_rx_data, char *delim )
if ( strrchr( rx_data, 13 ) )
{
- str_cut_chr( rx_data, 13 );
+ ph_str_cut_chr( rx_data, 13 );
if ( strstr( rx_data, delim ) == 0 )
{
p_rx_data = rx_data;
@@ -164,7 +161,7 @@ void ph_send_cmd_resp ( ph_t *ctx, char *p_cmd, char *p_resp )
ph_uart_read_until( ctx, p_resp, PH_RSP_CODE_ALL_GOOD );
}
-void ph_send_cmd_w_num ( ph_t *ctx, char *p_cmd, char *flt_val, char *p_resp )
+void ph_send_cmd_w_num ( ph_t *ctx, char *p_cmd, char *flt_val, char *p_resp )
{
uint8_t n_cnt = 0;
uint8_t n_len = 0;
@@ -488,4 +485,19 @@ static void dev_com_delay ()
Delay_100ms( );
}
+static void ph_str_cut_chr ( uint8_t *str, uint8_t chr )
+{
+ uint16_t cnt_0, cnt_1;
+ for ( cnt_0 = 0; cnt_0 < strlen( str ); cnt_0++ )
+ {
+ if ( str[ cnt_0 ] == chr )
+ {
+ for ( cnt_1 = cnt_0; cnt_1 < strlen( str ); cnt_1++ )
+ {
+ str[ cnt_1 ] = str[ cnt_1 + 1 ];
+ }
+ }
+ }
+}
+
// ------------------------------------------------------------------------- END
diff --git a/clicks/ph/memake.txt b/clicks/ph/memake.txt
deleted file mode 100644
index e43fc23166..0000000000
--- a/clicks/ph/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: pH
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/pollution/CHANGELOG.md b/clicks/pollution/CHANGELOG.md
index 3b544c4916..5d4bb42ec0 100644
--- a/clicks/pollution/CHANGELOG.md
+++ b/clicks/pollution/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.8
+### Version 2.1.0.8
- Initial release
diff --git a/clicks/pollution/CMakeLists.txt b/clicks/pollution/CMakeLists.txt
new file mode 100644
index 0000000000..658dd43e5e
--- /dev/null
+++ b/clicks/pollution/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_pollution LANGUAGES MikroC)
+else()
+ project(example_pollution LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_pollution
+ example/main.c
+
+)
+
+
+############################ example_pollution GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_pollution PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_pollution PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_pollution PUBLIC MikroSDK.Log)
+add_subdirectory(lib_pollution)
+target_link_libraries(example_pollution PUBLIC Click.Pollution)
+############################ example_pollution GENERATED CODE END ###########################
diff --git a/clicks/pollution/doc/doxy/Doxyfile.doxy b/clicks/pollution/doc/doxy/Doxyfile.doxy
index 3ae065720c..e8c382482b 100644
--- a/clicks/pollution/doc/doxy/Doxyfile.doxy
+++ b/clicks/pollution/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/pollution/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/pollution/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/pollution/example \
- ../clicks/pollution/lib/include \
- ../clicks/pollution/README.md
+INPUT = ../cmake/pollution/example \
+ ../cmake/pollution/lib_pollution/include \
+ ../cmake/pollution/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/pollution/example
+EXAMPLE_PATH = ../cmake/pollution/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/pollution/doc/package/manifest.json b/clicks/pollution/doc/package/manifest.json
index bb4f832461..439c7ae84e 100644
--- a/clicks/pollution/doc/package/manifest.json
+++ b/clicks/pollution/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Gas",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Gas",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Pollution click",
"example_list": [
@@ -26,20 +25,14 @@
"name": "mikroe.click.pollution",
"product_link": "https://www.mikroe.com/pollution-click",
"short_description": "Pollution click carries the VOC gas sensor and has high sensitivity to organic gases such as methanal (also known as formaldehyde), benzene, alcohol, toluene, etc.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "_type": "mikroSDK Library",
+ "related_projects": [
1995
],
- "_type": "mikroSDK Library",
- "version": "2.0.0.8"
+ "version": "2.1.0.8",
+ "cmake": true,
+ "alias": "Click.Pollution",
+ "subdir_name": "lib_pollution"
}
-
-
-
-
-
-
-
-
diff --git a/clicks/pollution/example/CMakeLists.txt b/clicks/pollution/example/CMakeLists.txt
new file mode 100644
index 0000000000..f0ad0eb7b6
--- /dev/null
+++ b/clicks/pollution/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_pollution LANGUAGES MikroC)
+else()
+ project(example_pollution LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_pollution
+ main.c
+
+)
+
+
+############################ example_pollution GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_pollution PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_pollution PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_pollution PUBLIC MikroSDK.Log)
+add_subdirectory(lib_pollution)
+target_link_libraries(example_pollution PUBLIC Click.Pollution)
+############################ example_pollution GENERATED CODE END ###########################
diff --git a/clicks/pollution/example/manifest.exm b/clicks/pollution/example/manifest.exm
index 4d0e836a9d..c471776b79 100644
--- a/clicks/pollution/example/manifest.exm
+++ b/clicks/pollution/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Pollution Click",
"description": "Pollution click carries the VOC gas sensor and has high sensitivity to organic gases such as methanal (also known as formaldehyde), benzene, alcohol, toluene, etc.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","WSP2110"],
"category" : ["Gas"]
}
diff --git a/clicks/pollution/example/memake.txt b/clicks/pollution/example/memake.txt
deleted file mode 100644
index f13f08728a..0000000000
--- a/clicks/pollution/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_pollution
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Pollution
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/pollution/lib/memake.txt b/clicks/pollution/lib/memake.txt
deleted file mode 100644
index c1a36efe7e..0000000000
--- a/clicks/pollution/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_pollution
-
-alias: Click.Pollution
-
-sources: {
- src/pollution.c
-}
-
-headers: {
- include/pollution.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/pollution.h) dst(include/pollution.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/pollution/lib_pollution/CMakeLists.txt b/clicks/pollution/lib_pollution/CMakeLists.txt
new file mode 100644
index 0000000000..8f6fa7378d
--- /dev/null
+++ b/clicks/pollution/lib_pollution/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_pollution LANGUAGES MikroC)
+else()
+ project(lib_pollution LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_pollution STATIC
+ src/pollution.c
+ include/pollution.h
+)
+add_library(Click.Pollution ALIAS lib_pollution)
+
+
+
+target_include_directories(lib_pollution PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_pollution PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_pollution PUBLIC MikroSDK.Driver)
diff --git a/clicks/pollution/lib_pollution/include/Click.Pollution b/clicks/pollution/lib_pollution/include/Click.Pollution
new file mode 100644
index 0000000000..985b550159
--- /dev/null
+++ b/clicks/pollution/lib_pollution/include/Click.Pollution
@@ -0,0 +1 @@
+#include "pollution.h"
diff --git a/clicks/pollution/lib/include/pollution.h b/clicks/pollution/lib_pollution/include/pollution.h
similarity index 100%
rename from clicks/pollution/lib/include/pollution.h
rename to clicks/pollution/lib_pollution/include/pollution.h
diff --git a/clicks/pollution/lib/src/pollution.c b/clicks/pollution/lib_pollution/src/pollution.c
similarity index 100%
rename from clicks/pollution/lib/src/pollution.c
rename to clicks/pollution/lib_pollution/src/pollution.c
diff --git a/clicks/pollution/memake.txt b/clicks/pollution/memake.txt
deleted file mode 100644
index 0c287117ef..0000000000
--- a/clicks/pollution/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Pollution
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/recnplay/CHANGELOG.md b/clicks/recnplay/CHANGELOG.md
index b586d72846..8ce49e7776 100644
--- a/clicks/recnplay/CHANGELOG.md
+++ b/clicks/recnplay/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.7
+### Version 2.1.0.7
- Initial release
diff --git a/clicks/recnplay/CMakeLists.txt b/clicks/recnplay/CMakeLists.txt
new file mode 100644
index 0000000000..10d72a7f9b
--- /dev/null
+++ b/clicks/recnplay/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_recnplay LANGUAGES MikroC)
+else()
+ project(example_recnplay LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_recnplay
+ example/main.c
+
+)
+
+
+############################ example_recnplay GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_recnplay PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_recnplay PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_recnplay PUBLIC MikroSDK.Log)
+add_subdirectory(lib_recnplay)
+target_link_libraries(example_recnplay PUBLIC Click.RecNPlay)
+############################ example_recnplay GENERATED CODE END ###########################
diff --git a/clicks/recnplay/doc/doxy/Doxyfile.doxy b/clicks/recnplay/doc/doxy/Doxyfile.doxy
index 29526c2c34..7ee4cb1e43 100644
--- a/clicks/recnplay/doc/doxy/Doxyfile.doxy
+++ b/clicks/recnplay/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/recnplay/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/recnplay/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/recnplay/example \
- ../clicks/recnplay/lib/include \
- ../clicks/recnplay/README.md
+INPUT = ../cmake/recnplay/example \
+ ../cmake/recnplay/lib_recnplay/include \
+ ../cmake/recnplay/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/recnplay/example
+EXAMPLE_PATH = ../cmake/recnplay/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/recnplay/doc/package/manifest.json b/clicks/recnplay/doc/package/manifest.json
index 8211152ad7..872ef2bd6a 100644
--- a/clicks/recnplay/doc/package/manifest.json
+++ b/clicks/recnplay/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Signal processing",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Audio & voice > Signal processing",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Rec N Play click",
"example_list": [
@@ -26,16 +25,14 @@
"name": "mikroe.click.recnplay",
"product_link": "https://www.mikroe.com/recplay-click",
"short_description": "Rec&Play Click is a digital voice recorder on a Click board™. It is based on the ISD3900, a multi-message record and playback device. It features the ChipCorder® technology, offering digital sound compression, smart message management, digitally configurable signal path, and more.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "_type": "mikroSDK Library",
+ "related_projects": [
2574
],
- "version": "2.0.0.7"
+ "version": "2.1.0.7",
+ "cmake": true,
+ "alias": "Click.RecNPlay",
+ "subdir_name": "lib_recnplay"
}
-
-
-
-
-
diff --git a/clicks/recnplay/example/CMakeLists.txt b/clicks/recnplay/example/CMakeLists.txt
new file mode 100644
index 0000000000..0aa278af57
--- /dev/null
+++ b/clicks/recnplay/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_recnplay LANGUAGES MikroC)
+else()
+ project(example_recnplay LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_recnplay
+ main.c
+
+)
+
+
+############################ example_recnplay GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_recnplay PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_recnplay PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_recnplay PUBLIC MikroSDK.Log)
+add_subdirectory(lib_recnplay)
+target_link_libraries(example_recnplay PUBLIC Click.RecNPlay)
+############################ example_recnplay GENERATED CODE END ###########################
diff --git a/clicks/recnplay/example/manifest.exm b/clicks/recnplay/example/manifest.exm
index 99da7de5aa..7781502687 100644
--- a/clicks/recnplay/example/manifest.exm
+++ b/clicks/recnplay/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Rec & Play Click",
"description": "Rec&Play Click is a digital voice recorder on a Click board™. It is based on the ISD3900, a multi-message record and playback device. It features the ChipCorder® technology, offering digital sound compression, smart message management, digitally configurable signal path, and more.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","ISD3900"],
"category" : ["Signal processing"]
}
diff --git a/clicks/recnplay/example/memake.txt b/clicks/recnplay/example/memake.txt
deleted file mode 100644
index 0ebdf4b605..0000000000
--- a/clicks/recnplay/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_recnplay
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.RecNPlay
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/recnplay/lib/memake.txt b/clicks/recnplay/lib/memake.txt
deleted file mode 100644
index 1ac8691646..0000000000
--- a/clicks/recnplay/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_recnplay
-
-alias: Click.RecNPlay
-
-sources: {
- src/recnplay.c
-}
-
-headers: {
- include/recnplay.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/recnplay.h) dst(include/recnplay.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/recnplay/lib_recnplay/CMakeLists.txt b/clicks/recnplay/lib_recnplay/CMakeLists.txt
new file mode 100644
index 0000000000..97b97a98da
--- /dev/null
+++ b/clicks/recnplay/lib_recnplay/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_recnplay LANGUAGES MikroC)
+else()
+ project(lib_recnplay LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_recnplay STATIC
+ src/recnplay.c
+ include/recnplay.h
+)
+add_library(Click.RecNPlay ALIAS lib_recnplay)
+
+
+
+target_include_directories(lib_recnplay PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_recnplay PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_recnplay PUBLIC MikroSDK.Driver)
diff --git a/clicks/recnplay/lib_recnplay/include/Click.RecNPlay b/clicks/recnplay/lib_recnplay/include/Click.RecNPlay
new file mode 100644
index 0000000000..91727640bb
--- /dev/null
+++ b/clicks/recnplay/lib_recnplay/include/Click.RecNPlay
@@ -0,0 +1 @@
+#include "recnplay.h"
diff --git a/clicks/recnplay/lib/include/recnplay.h b/clicks/recnplay/lib_recnplay/include/recnplay.h
similarity index 100%
rename from clicks/recnplay/lib/include/recnplay.h
rename to clicks/recnplay/lib_recnplay/include/recnplay.h
diff --git a/clicks/recnplay/lib/src/recnplay.c b/clicks/recnplay/lib_recnplay/src/recnplay.c
similarity index 100%
rename from clicks/recnplay/lib/src/recnplay.c
rename to clicks/recnplay/lib_recnplay/src/recnplay.c
diff --git a/clicks/recnplay/memake.txt b/clicks/recnplay/memake.txt
deleted file mode 100644
index b97a00fd05..0000000000
--- a/clicks/recnplay/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: RecNPlay
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/relay2/CHANGELOG.md b/clicks/relay2/CHANGELOG.md
index 97df45d2c4..3a59131d28 100644
--- a/clicks/relay2/CHANGELOG.md
+++ b/clicks/relay2/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.7
+### Version 2.1.0.7
- Initial release
diff --git a/clicks/relay2/CMakeLists.txt b/clicks/relay2/CMakeLists.txt
new file mode 100644
index 0000000000..631d6414ac
--- /dev/null
+++ b/clicks/relay2/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_relay2 LANGUAGES MikroC)
+else()
+ project(example_relay2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_relay2
+ example/main.c
+
+)
+
+
+############################ example_relay2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_relay2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_relay2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_relay2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_relay2)
+target_link_libraries(example_relay2 PUBLIC Click.Relay2)
+############################ example_relay2 GENERATED CODE END ###########################
diff --git a/clicks/relay2/doc/doxy/Doxyfile.doxy b/clicks/relay2/doc/doxy/Doxyfile.doxy
index bb9f183522..0be77c1c4e 100644
--- a/clicks/relay2/doc/doxy/Doxyfile.doxy
+++ b/clicks/relay2/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/relay2/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/relay2/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/relay2/example \
- ../clicks/relay2/lib/include \
- ../clicks/relay2/README.md
+INPUT = ../cmake/relay2/example \
+ ../cmake/relay2/lib_relay2/include \
+ ../cmake/relay2/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/relay2/example
+EXAMPLE_PATH = ../cmake/relay2/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/relay2/doc/package/manifest.json b/clicks/relay2/doc/package/manifest.json
index cdc55cce2b..7b771319f3 100644
--- a/clicks/relay2/doc/package/manifest.json
+++ b/clicks/relay2/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Relay",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Miscellaneous > Relay",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Relay 2 click",
"example_list": [
@@ -26,19 +25,14 @@
"name": "mikroe.click.relay2",
"product_link": "https://www.mikroe.com/relay-2-click",
"short_description": "Relay 2 click is a dual relay click board™, equipped with two single-pole solid state relays (SSR), built with the patented OptoMOS® technology.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "_type": "mikroSDK Library",
+ "related_projects": [
1488
],
- "_type": "mikroSDK Library",
- "version": "2.0.0.7"
+ "version": "2.1.0.7",
+ "cmake": true,
+ "alias": "Click.Relay2",
+ "subdir_name": "lib_relay2"
}
-
-
-
-
-
-
-
diff --git a/clicks/relay2/example/CMakeLists.txt b/clicks/relay2/example/CMakeLists.txt
new file mode 100644
index 0000000000..cdbba224ab
--- /dev/null
+++ b/clicks/relay2/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_relay2 LANGUAGES MikroC)
+else()
+ project(example_relay2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_relay2
+ main.c
+
+)
+
+
+############################ example_relay2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_relay2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_relay2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_relay2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_relay2)
+target_link_libraries(example_relay2 PUBLIC Click.Relay2)
+############################ example_relay2 GENERATED CODE END ###########################
diff --git a/clicks/relay2/example/manifest.exm b/clicks/relay2/example/manifest.exm
index 5b1e99eb72..ff1c8e04df 100644
--- a/clicks/relay2/example/manifest.exm
+++ b/clicks/relay2/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Relay 2 Click",
"description": "Relay 2 click is a dual relay click board™, equipped with two single-pole solid state relays (SSR), built with the patented OptoMOS® technology.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","LCA717"],
"category" : ["Relay"]
}
diff --git a/clicks/relay2/example/memake.txt b/clicks/relay2/example/memake.txt
deleted file mode 100644
index 49bdaaaabe..0000000000
--- a/clicks/relay2/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_relay2
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Relay2
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/relay2/lib/memake.txt b/clicks/relay2/lib/memake.txt
deleted file mode 100644
index 23f2114a4e..0000000000
--- a/clicks/relay2/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_relay2
-
-alias: Click.Relay2
-
-sources: {
- src/relay2.c
-}
-
-headers: {
- include/relay2.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/relay2.h) dst(include/relay2.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/relay2/lib_relay2/CMakeLists.txt b/clicks/relay2/lib_relay2/CMakeLists.txt
new file mode 100644
index 0000000000..2c3f5b2deb
--- /dev/null
+++ b/clicks/relay2/lib_relay2/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_relay2 LANGUAGES MikroC)
+else()
+ project(lib_relay2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_relay2 STATIC
+ src/relay2.c
+ include/relay2.h
+)
+add_library(Click.Relay2 ALIAS lib_relay2)
+
+
+
+target_include_directories(lib_relay2 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_relay2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_relay2 PUBLIC MikroSDK.Driver)
diff --git a/clicks/relay2/lib_relay2/include/Click.Relay2 b/clicks/relay2/lib_relay2/include/Click.Relay2
new file mode 100644
index 0000000000..72dd6cbf47
--- /dev/null
+++ b/clicks/relay2/lib_relay2/include/Click.Relay2
@@ -0,0 +1 @@
+#include "relay2.h"
diff --git a/clicks/relay2/lib/include/relay2.h b/clicks/relay2/lib_relay2/include/relay2.h
similarity index 96%
rename from clicks/relay2/lib/include/relay2.h
rename to clicks/relay2/lib_relay2/include/relay2.h
index 055b68218d..cd62df0499 100644
--- a/clicks/relay2/lib/include/relay2.h
+++ b/clicks/relay2/lib_relay2/include/relay2.h
@@ -1,157 +1,157 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- * \brief This file contains API for Relay 2 Click driver.
- *
- * \addtogroup relay2 Relay 2 Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef RELAY2_H
-#define RELAY2_H
-
-#include "drv_digital_out.h"
-#include "drv_digital_in.h"
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-#define RELAY2_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
- cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM );
-/** \} */
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define RELAY2_RETVAL uint8_t
-
-#define RELAY2_OK 0x70
-#define RELAY2_INIT_ERROR 0xFF
-/** \} */
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
- // Output pins
-
- digital_out_t an;
- digital_out_t pwm;
-
-} relay2_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Additional gpio pins
-
- pin_name_t an;
- pin_name_t pwm;
-
-} relay2_cfg_t;
-
-/** \} */ // End types group
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
- */
-void relay2_cfg_setup ( relay2_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- * @param relay2 Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
- */
-RELAY2_RETVAL relay2_init ( relay2_t *ctx, relay2_cfg_t *cfg );
-
-/**
- * @brief relay2_relay2Control
- *
- *
- * @param pin_state 1 = On, 0 = off
- *
- * @description Controls the Relay 2 pin
- */
-void relay2_relay2_control (relay2_t *ctx, uint8_t pin_state );
-
-/**
- * @brief relay2_relay2Control
- *
- * @param pin_state 1 = On, 0 = off
- *
- *
- * @description Controls the Relay 1 pin
- *
- */
-void relay2_relay1_control (relay2_t *ctx, uint8_t pin_state );
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _RELAY2_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ * \brief This file contains API for Relay 2 Click driver.
+ *
+ * \addtogroup relay2 Relay 2 Click Driver
+ * @{
+ */
+// ----------------------------------------------------------------------------
+
+#ifndef RELAY2_H
+#define RELAY2_H
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+
+// -------------------------------------------------------------- PUBLIC MACROS
+/**
+ * \defgroup macros Macros
+ * \{
+ */
+
+/**
+ * \defgroup map_mikrobus MikroBUS
+ * \{
+ */
+#define RELAY2_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
+ cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM );
+/** \} */
+
+/**
+ * \defgroup error_code Error Code
+ * \{
+ */
+#define RELAY2_RETVAL uint8_t
+
+#define RELAY2_OK 0x70
+#define RELAY2_INIT_ERROR 0xFF
+/** \} */
+
+/** \} */ // End group macro
+// --------------------------------------------------------------- PUBLIC TYPES
+/**
+ * \defgroup type Types
+ * \{
+ */
+
+/**
+ * @brief Click ctx object definition.
+ */
+typedef struct
+{
+ // Output pins
+
+ digital_out_t an;
+ digital_out_t pwm;
+
+} relay2_t;
+
+/**
+ * @brief Click configuration structure definition.
+ */
+typedef struct
+{
+ // Additional gpio pins
+
+ pin_name_t an;
+ pin_name_t pwm;
+
+} relay2_cfg_t;
+
+/** \} */ // End types group
+// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
+
+/**
+ * \defgroup public_function Public function
+ * \{
+ */
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+/**
+ * @brief Config Object Initialization function.
+ *
+ * @param cfg Click configuration structure.
+ *
+ * @description This function initializes click configuration structure to init state.
+ * @note All used pins will be set to unconnected state.
+ */
+void relay2_cfg_setup ( relay2_cfg_t *cfg );
+
+/**
+ * @brief Initialization function.
+ * @param relay2 Click object.
+ * @param cfg Click configuration structure.
+ *
+ * @description This function initializes all necessary pins and peripherals used for this click.
+ */
+RELAY2_RETVAL relay2_init ( relay2_t *ctx, relay2_cfg_t *cfg );
+
+/**
+ * @brief relay2_relay2Control
+ *
+ *
+ * @param pin_state 1 = On, 0 = off
+ *
+ * @description Controls the Relay 2 pin
+ */
+void relay2_relay2_control (relay2_t *ctx, uint8_t pin_state );
+
+/**
+ * @brief relay2_relay2Control
+ *
+ * @param pin_state 1 = On, 0 = off
+ *
+ *
+ * @description Controls the Relay 1 pin
+ *
+ */
+void relay2_relay1_control (relay2_t *ctx, uint8_t pin_state );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _RELAY2_H_
+
+/** \} */ // End public_function group
+/// \} // End click Driver group
+/*! @} */
+// ------------------------------------------------------------------------- END
diff --git a/clicks/relay2/lib/src/relay2.c b/clicks/relay2/lib_relay2/src/relay2.c
similarity index 96%
rename from clicks/relay2/lib/src/relay2.c
rename to clicks/relay2/lib_relay2/src/relay2.c
index a27614d6df..9337c30461 100644
--- a/clicks/relay2/lib/src/relay2.c
+++ b/clicks/relay2/lib_relay2/src/relay2.c
@@ -1,77 +1,77 @@
- /*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- */
-
-#include "relay2.h"
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void relay2_cfg_setup ( relay2_cfg_t *cfg )
-{
- // Additional gpio pins
-
- cfg->an = HAL_PIN_NC;
- cfg->pwm = HAL_PIN_NC;
-}
-
-RELAY2_RETVAL relay2_init ( relay2_t *ctx, relay2_cfg_t *cfg )
-{
- // Output pins
-
- digital_out_init( &ctx->an, cfg->an );
- digital_out_init( &ctx->pwm, cfg->pwm );
-
- return RELAY2_OK;
-}
-
-
-void relay2_relay2_control( relay2_t *ctx, uint8_t pin_state )
-{
- if ( pin_state == 0 )
- {
- digital_out_low( &ctx->an );
- }
- else
- {
- digital_out_high( &ctx->an );
- }
-}
-
-void relay2_relay1_control( relay2_t *ctx, uint8_t pin_state)
-{
- if ( pin_state == 0 )
- {
- digital_out_low( &ctx->pwm );
- }
- else
- {
- digital_out_high( &ctx->pwm );
- }
-}
-
-// ------------------------------------------------------------------------- END
+ /*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ */
+
+#include "relay2.h"
+
+// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
+
+void relay2_cfg_setup ( relay2_cfg_t *cfg )
+{
+ // Additional gpio pins
+
+ cfg->an = HAL_PIN_NC;
+ cfg->pwm = HAL_PIN_NC;
+}
+
+RELAY2_RETVAL relay2_init ( relay2_t *ctx, relay2_cfg_t *cfg )
+{
+ // Output pins
+
+ digital_out_init( &ctx->an, cfg->an );
+ digital_out_init( &ctx->pwm, cfg->pwm );
+
+ return RELAY2_OK;
+}
+
+
+void relay2_relay2_control( relay2_t *ctx, uint8_t pin_state )
+{
+ if ( pin_state == 0 )
+ {
+ digital_out_low( &ctx->an );
+ }
+ else
+ {
+ digital_out_high( &ctx->an );
+ }
+}
+
+void relay2_relay1_control( relay2_t *ctx, uint8_t pin_state)
+{
+ if ( pin_state == 0 )
+ {
+ digital_out_low( &ctx->pwm );
+ }
+ else
+ {
+ digital_out_high( &ctx->pwm );
+ }
+}
+
+// ------------------------------------------------------------------------- END
diff --git a/clicks/relay2/memake.txt b/clicks/relay2/memake.txt
deleted file mode 100644
index 2e69bd0be7..0000000000
--- a/clicks/relay2/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Relay2
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/rgbdriver/CHANGELOG.md b/clicks/rgbdriver/CHANGELOG.md
index 4edeeb3aab..ac23ae3dc2 100644
--- a/clicks/rgbdriver/CHANGELOG.md
+++ b/clicks/rgbdriver/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.6
+### Version 2.1.0.6
- Initial release
diff --git a/clicks/rgbdriver/CMakeLists.txt b/clicks/rgbdriver/CMakeLists.txt
new file mode 100644
index 0000000000..65b8b894f9
--- /dev/null
+++ b/clicks/rgbdriver/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_rgbdriver LANGUAGES MikroC)
+else()
+ project(example_rgbdriver LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_rgbdriver
+ example/main.c
+
+)
+
+
+############################ example_rgbdriver GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_rgbdriver PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_rgbdriver PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_rgbdriver PUBLIC MikroSDK.Log)
+add_subdirectory(lib_rgbdriver)
+target_link_libraries(example_rgbdriver PUBLIC Click.RgbDriver)
+############################ example_rgbdriver GENERATED CODE END ###########################
diff --git a/clicks/rgbdriver/doc/doxy/Doxyfile.doxy b/clicks/rgbdriver/doc/doxy/Doxyfile.doxy
index d25141cde4..b2fc913fbc 100644
--- a/clicks/rgbdriver/doc/doxy/Doxyfile.doxy
+++ b/clicks/rgbdriver/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/rgbdriver/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/rgbdriver/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/rgbdriver/example \
- ../clicks/rgbdriver/lib/include \
- ../clicks/rgbdriver/README.md
+INPUT = ../cmake/rgbdriver/example \
+ ../cmake/rgbdriver/lib_rgbdriver/include \
+ ../cmake/rgbdriver/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/rgbdriver/example
+EXAMPLE_PATH = ../cmake/rgbdriver/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/rgbdriver/doc/package/manifest.json b/clicks/rgbdriver/doc/package/manifest.json
index bac7fdda00..d11c1485a2 100644
--- a/clicks/rgbdriver/doc/package/manifest.json
+++ b/clicks/rgbdriver/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "LED Segment",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Display & LED > LED segment",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "RGB Driver click",
"example_list": [
@@ -26,16 +25,14 @@
"name": "mikroe.click.rgbdriver",
"product_link": "https://www.mikroe.com/rgb-driver-click",
"short_description": "RGB Driver click is an RGB LED driver, capable of driving RGB LED stripes, LED fixtures and other RGB LED applications that demand an increased amount of current and voltage.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
"_type": "mikroSDK Library",
- "related_projects":[
+ "related_projects": [
2329
],
- "version": "2.0.0.6"
+ "version": "2.1.0.6",
+ "cmake": true,
+ "alias": "Click.RgbDriver",
+ "subdir_name": "lib_rgbdriver"
}
-
-
-
-
-
diff --git a/clicks/rgbdriver/example/CMakeLists.txt b/clicks/rgbdriver/example/CMakeLists.txt
new file mode 100644
index 0000000000..43b032e4d1
--- /dev/null
+++ b/clicks/rgbdriver/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_rgbdriver LANGUAGES MikroC)
+else()
+ project(example_rgbdriver LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_rgbdriver
+ main.c
+
+)
+
+
+############################ example_rgbdriver GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_rgbdriver PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_rgbdriver PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_rgbdriver PUBLIC MikroSDK.Log)
+add_subdirectory(lib_rgbdriver)
+target_link_libraries(example_rgbdriver PUBLIC Click.RgbDriver)
+############################ example_rgbdriver GENERATED CODE END ###########################
diff --git a/clicks/rgbdriver/example/manifest.exm b/clicks/rgbdriver/example/manifest.exm
index c39f1d89e0..08a6cb7926 100644
--- a/clicks/rgbdriver/example/manifest.exm
+++ b/clicks/rgbdriver/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "RGB Driver Click",
"description": "RGB Driver click is an RGB LED driver, capable of driving RGB LED stripes, LED fixtures and other RGB LED applications that demand an increased amount of current and voltage.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","NCP5623B"],
"category" : ["LED Segment"]
}
diff --git a/clicks/rgbdriver/example/memake.txt b/clicks/rgbdriver/example/memake.txt
deleted file mode 100644
index 56ca449a6b..0000000000
--- a/clicks/rgbdriver/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_rgbdriver
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.RgbDriver
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/rgbdriver/lib/memake.txt b/clicks/rgbdriver/lib/memake.txt
deleted file mode 100644
index 0e442ad4df..0000000000
--- a/clicks/rgbdriver/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_rgbdriver
-
-alias: Click.RgbDriver
-
-sources: {
- src/rgbdriver.c
-}
-
-headers: {
- include/rgbdriver.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/rgbdriver.h) dst(include/rgbdriver.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/rgbdriver/lib_rgbdriver/CMakeLists.txt b/clicks/rgbdriver/lib_rgbdriver/CMakeLists.txt
new file mode 100644
index 0000000000..ac41f197be
--- /dev/null
+++ b/clicks/rgbdriver/lib_rgbdriver/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_rgbdriver LANGUAGES MikroC)
+else()
+ project(lib_rgbdriver LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_rgbdriver STATIC
+ src/rgbdriver.c
+ include/rgbdriver.h
+)
+add_library(Click.RgbDriver ALIAS lib_rgbdriver)
+
+
+
+target_include_directories(lib_rgbdriver PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_rgbdriver PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_rgbdriver PUBLIC MikroSDK.Driver)
diff --git a/clicks/rgbdriver/lib_rgbdriver/include/Click.RgbDriver b/clicks/rgbdriver/lib_rgbdriver/include/Click.RgbDriver
new file mode 100644
index 0000000000..f7cac05464
--- /dev/null
+++ b/clicks/rgbdriver/lib_rgbdriver/include/Click.RgbDriver
@@ -0,0 +1 @@
+#include "rgbdriver.h"
diff --git a/clicks/rgbdriver/lib/include/rgbdriver.h b/clicks/rgbdriver/lib_rgbdriver/include/rgbdriver.h
similarity index 96%
rename from clicks/rgbdriver/lib/include/rgbdriver.h
rename to clicks/rgbdriver/lib_rgbdriver/include/rgbdriver.h
index 1ad198af9f..2fa8c445bb 100644
--- a/clicks/rgbdriver/lib/include/rgbdriver.h
+++ b/clicks/rgbdriver/lib_rgbdriver/include/rgbdriver.h
@@ -1,231 +1,231 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- * \brief This file contains API for RGB Driver Click driver.
- *
- * \addtogroup rgbdriver RGB Driver Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef RGBDRIVER_H
-#define RGBDRIVER_H
-
-#include "drv_digital_out.h"
-#include "drv_digital_in.h"
-#include "drv_i2c_master.h"
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-#define RGBDRIVER_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
- cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA );
-/** \} */
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define RGBDRIVER_RETVAL uint8_t
-
-#define RGBDRIVER_OK 0x00
-#define RGBDRIVER_INIT_ERROR 0xFF
-/** \} */
-
-/**
- * \defgroup color_set Color Set
- * \{
- */
-
-#define RGBDRIVER_COLOR_RED_HIGH_INTENSITY 0x7F8040
-#define RGBDRIVER_COLOR_ORANGE_HIGH_INTENSITY 0x7F8240
-#define RGBDRIVER_COLOR_YELLOW_HIGH_INTENSITY 0x7F9440
-#define RGBDRIVER_COLOR_GREEN_HIGH_INTENSITY 0x609F40
-#define RGBDRIVER_COLOR_BLUE_HIGH_INTENSITY 0x60805F
-#define RGBDRIVER_COLOR_WHITE_HIGH_INTENSITY 0x7F9F5F
-#define RGBDRIVER_COLOR_PURPLE_HIGH_INTENSITY 0x78805C
-
-#define RGBDRIVER_COLOR_RED_LOW_INTENSITY 0x618040
-#define RGBDRIVER_COLOR_ORANGE_LOW_INTENSITY 0x6A8140
-#define RGBDRIVER_COLOR_YELLOW_LOW_INTENSITY 0x6A8540
-#define RGBDRIVER_COLOR_GREEN_LOW_INTENSITY 0x608140
-#define RGBDRIVER_COLOR_BLUE_LOW_INTENSITY 0x608041
-#define RGBDRIVER_COLOR_WHITE_LOW_INTENSITY 0x618141
-#define RGBDRIVER_COLOR_PURPLE_LOW_INTENSITY 0x658044
-
-#define RGBDRIVER_COLOR_OFF 0x000000
-/** \} */
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
- // Modules
-
- i2c_master_t i2c;
-
- // ctx variable
-
- uint8_t slave_address;
-
-} rgbdriver_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Communication gpio pins
-
- pin_name_t scl;
- pin_name_t sda;
-
- // static variable
-
- uint32_t i2c_speed;
- uint8_t i2c_address;
-
-} rgbdriver_cfg_t;
-
-/** \} */ // End types group
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
- */
-void rgbdriver_cfg_setup ( rgbdriver_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- *
- * @param ctx Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
- */
-RGBDRIVER_RETVAL rgbdriver_init ( rgbdriver_t *ctx, rgbdriver_cfg_t *cfg );
-
-/**
- * @brief Click Default Configuration function.
- *
- * @param ctx Click object.
- *
- * @description This function executes default configuration for RGB Driver click.
- */
-RGBDRIVER_RETVAL rgbdriver_default_cfg ( rgbdriver_t *ctx );
-
-/**
- * @brief Generic write function.
- *
- * @param ctx Click object.
- * @param data_buf Data buf to be written.
- * @param len Number of the bytes in data buf.
- *
- * @description This function writes data to the desired register.
- */
-void rgbdriver_generic_write ( rgbdriver_t *ctx, uint8_t *data_buf, uint8_t len );
-
-/**
- * @brief Function set RGB color.
- *
- * @param ctx Click object.
- * @param red Red led.
- * @param green Green led.
- * @param blue Blue led.
- *
- * @description This function sets the color of the rgb LEDs through the parameters for red, green and blue.
- */
-void rgbdriver_set_rgb_color ( rgbdriver_t *ctx, uint8_t red, uint8_t green, uint8_t blue );
-
-/**
- * @brief Function set color.
- *
- * @param ctx Click object.
- * @param color Red led.
- *
- * @description This function sets the color.
- *
- * @note
- * Set color:
- * RED,
- * GREEN,
- * BLUE,
- * YELLOW,
- * WHITE,
- * PURPLE,
- * ORANGE and OFF.
- */
-void rgbdriver_set_color ( rgbdriver_t *ctx, uint32_t color );
-
-/**
- * @brief Shut down function.
- *
- * @param ctx Click object.
- *
- * @description This function shut down device.
- */
-void rgbdriver_shut_down ( rgbdriver_t *ctx );
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _RGBDRIVER_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ * \brief This file contains API for RGB Driver Click driver.
+ *
+ * \addtogroup rgbdriver RGB Driver Click Driver
+ * @{
+ */
+// ----------------------------------------------------------------------------
+
+#ifndef RGBDRIVER_H
+#define RGBDRIVER_H
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_i2c_master.h"
+
+// -------------------------------------------------------------- PUBLIC MACROS
+/**
+ * \defgroup macros Macros
+ * \{
+ */
+
+/**
+ * \defgroup map_mikrobus MikroBUS
+ * \{
+ */
+#define RGBDRIVER_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
+ cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA );
+/** \} */
+
+/**
+ * \defgroup error_code Error Code
+ * \{
+ */
+#define RGBDRIVER_RETVAL uint8_t
+
+#define RGBDRIVER_OK 0x00
+#define RGBDRIVER_INIT_ERROR 0xFF
+/** \} */
+
+/**
+ * \defgroup color_set Color Set
+ * \{
+ */
+
+#define RGBDRIVER_COLOR_RED_HIGH_INTENSITY 0x7F8040
+#define RGBDRIVER_COLOR_ORANGE_HIGH_INTENSITY 0x7F8240
+#define RGBDRIVER_COLOR_YELLOW_HIGH_INTENSITY 0x7F9440
+#define RGBDRIVER_COLOR_GREEN_HIGH_INTENSITY 0x609F40
+#define RGBDRIVER_COLOR_BLUE_HIGH_INTENSITY 0x60805F
+#define RGBDRIVER_COLOR_WHITE_HIGH_INTENSITY 0x7F9F5F
+#define RGBDRIVER_COLOR_PURPLE_HIGH_INTENSITY 0x78805C
+
+#define RGBDRIVER_COLOR_RED_LOW_INTENSITY 0x618040
+#define RGBDRIVER_COLOR_ORANGE_LOW_INTENSITY 0x6A8140
+#define RGBDRIVER_COLOR_YELLOW_LOW_INTENSITY 0x6A8540
+#define RGBDRIVER_COLOR_GREEN_LOW_INTENSITY 0x608140
+#define RGBDRIVER_COLOR_BLUE_LOW_INTENSITY 0x608041
+#define RGBDRIVER_COLOR_WHITE_LOW_INTENSITY 0x618141
+#define RGBDRIVER_COLOR_PURPLE_LOW_INTENSITY 0x658044
+
+#define RGBDRIVER_COLOR_OFF 0x000000
+/** \} */
+
+/** \} */ // End group macro
+// --------------------------------------------------------------- PUBLIC TYPES
+/**
+ * \defgroup type Types
+ * \{
+ */
+
+/**
+ * @brief Click ctx object definition.
+ */
+typedef struct
+{
+ // Modules
+
+ i2c_master_t i2c;
+
+ // ctx variable
+
+ uint8_t slave_address;
+
+} rgbdriver_t;
+
+/**
+ * @brief Click configuration structure definition.
+ */
+typedef struct
+{
+ // Communication gpio pins
+
+ pin_name_t scl;
+ pin_name_t sda;
+
+ // static variable
+
+ uint32_t i2c_speed;
+ uint8_t i2c_address;
+
+} rgbdriver_cfg_t;
+
+/** \} */ // End types group
+// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
+
+/**
+ * \defgroup public_function Public function
+ * \{
+ */
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+/**
+ * @brief Config Object Initialization function.
+ *
+ * @param cfg Click configuration structure.
+ *
+ * @description This function initializes click configuration structure to init state.
+ * @note All used pins will be set to unconnected state.
+ */
+void rgbdriver_cfg_setup ( rgbdriver_cfg_t *cfg );
+
+/**
+ * @brief Initialization function.
+ *
+ * @param ctx Click object.
+ * @param cfg Click configuration structure.
+ *
+ * @description This function initializes all necessary pins and peripherals used for this click.
+ */
+RGBDRIVER_RETVAL rgbdriver_init ( rgbdriver_t *ctx, rgbdriver_cfg_t *cfg );
+
+/**
+ * @brief Click Default Configuration function.
+ *
+ * @param ctx Click object.
+ *
+ * @description This function executes default configuration for RGB Driver click.
+ */
+RGBDRIVER_RETVAL rgbdriver_default_cfg ( rgbdriver_t *ctx );
+
+/**
+ * @brief Generic write function.
+ *
+ * @param ctx Click object.
+ * @param data_buf Data buf to be written.
+ * @param len Number of the bytes in data buf.
+ *
+ * @description This function writes data to the desired register.
+ */
+void rgbdriver_generic_write ( rgbdriver_t *ctx, uint8_t *data_buf, uint8_t len );
+
+/**
+ * @brief Function set RGB color.
+ *
+ * @param ctx Click object.
+ * @param red Red led.
+ * @param green Green led.
+ * @param blue Blue led.
+ *
+ * @description This function sets the color of the rgb LEDs through the parameters for red, green and blue.
+ */
+void rgbdriver_set_rgb_color ( rgbdriver_t *ctx, uint8_t red, uint8_t green, uint8_t blue );
+
+/**
+ * @brief Function set color.
+ *
+ * @param ctx Click object.
+ * @param color Red led.
+ *
+ * @description This function sets the color.
+ *
+ * @note
+ * Set color:
+ * RED,
+ * GREEN,
+ * BLUE,
+ * YELLOW,
+ * WHITE,
+ * PURPLE,
+ * ORANGE and OFF.
+ */
+void rgbdriver_set_color ( rgbdriver_t *ctx, uint32_t color );
+
+/**
+ * @brief Shut down function.
+ *
+ * @param ctx Click object.
+ *
+ * @description This function shut down device.
+ */
+void rgbdriver_shut_down ( rgbdriver_t *ctx );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _RGBDRIVER_H_
+
+/** \} */ // End public_function group
+/// \} // End click Driver group
+/*! @} */
+// ------------------------------------------------------------------------- END
diff --git a/clicks/rgbdriver/lib/src/rgbdriver.c b/clicks/rgbdriver/lib_rgbdriver/src/rgbdriver.c
similarity index 96%
rename from clicks/rgbdriver/lib/src/rgbdriver.c
rename to clicks/rgbdriver/lib_rgbdriver/src/rgbdriver.c
index 1cda0a50d1..89b56d24a7 100644
--- a/clicks/rgbdriver/lib/src/rgbdriver.c
+++ b/clicks/rgbdriver/lib_rgbdriver/src/rgbdriver.c
@@ -1,141 +1,141 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- */
-
-#include "rgbdriver.h"
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void rgbdriver_cfg_setup ( rgbdriver_cfg_t *cfg )
-{
- // Communication gpio pins
-
- cfg->scl = HAL_PIN_NC;
- cfg->sda = HAL_PIN_NC;
-
- cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD;
- cfg->i2c_address = 0x38;
-}
-
-RGBDRIVER_RETVAL rgbdriver_init ( rgbdriver_t *ctx, rgbdriver_cfg_t *cfg )
-{
- i2c_master_config_t i2c_cfg;
-
- i2c_cfg.speed = cfg->i2c_speed;
- i2c_cfg.scl = cfg->scl;
- i2c_cfg.sda = cfg->sda;
-
- ctx->slave_address = cfg->i2c_address;
-
- if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR )
- {
- return RGBDRIVER_INIT_ERROR;
- }
-
- i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address );
- i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed );
- i2c_master_set_timeout( &ctx->i2c, 0 );
-
- return RGBDRIVER_OK;
-}
-
-RGBDRIVER_RETVAL rgbdriver_default_cfg ( rgbdriver_t *ctx )
-{
- uint8_t write_reg[ 3 ];
-
- write_reg[ 0 ] = 0x3F;
-
- rgbdriver_shut_down( ctx );
- rgbdriver_generic_write( ctx, write_reg, 1 );
-
- return RGBDRIVER_OK;
-}
-
-void rgbdriver_generic_write ( rgbdriver_t *ctx, uint8_t *data_buf, uint8_t len )
-{
- for ( uint8_t cnt = 0; cnt < len; cnt++ )
- {
- i2c_master_write( &ctx->i2c, &data_buf[ cnt ], 1 );
- Delay_50us( );
- }
-}
-
-void rgbdriver_set_rgb_color ( rgbdriver_t *ctx, uint8_t red, uint8_t green, uint8_t blue )
-{
- uint8_t write_reg[ 3 ];
-
- if ( blue < 0x40 || blue > 0x5F )
- {
- write_reg[ 0 ] = 0x40;
- }
- else
- {
- write_reg[ 0 ] = blue;
- }
-
- if ( red < 0x60 || red > 0x7F )
- {
- write_reg[ 1 ] = 0x60;
- }
- else
- {
- write_reg[ 1 ] = red;
- }
-
- if ( green < 0x80 || green > 0x9F )
- {
- write_reg[ 2 ] = 0x80;
- }
- else
- {
- write_reg[ 2 ] = green;
- }
-
- rgbdriver_generic_write( ctx, write_reg, 3 );
-}
-
-void rgbdriver_set_color ( rgbdriver_t *ctx, uint32_t color )
-{
- uint8_t write_reg[ 3 ];
- write_reg[ 0 ] = ( uint8_t ) ( color & 0xFF );
- write_reg[ 1 ] = ( uint8_t ) ( ( color >> 8 ) & 0xFF );
- write_reg[ 2 ] = ( uint8_t ) ( ( color >> 16 ) & 0xFF );
-
- rgbdriver_generic_write( ctx, write_reg, 3 );
-}
-
-void rgbdriver_shut_down ( rgbdriver_t *ctx )
-{
- uint8_t write_reg[ 1 ];
- write_reg[ 0 ] = RGBDRIVER_COLOR_OFF;
-
- i2c_master_write( &ctx->i2c, write_reg, 1 );
-}
-
-// ------------------------------------------------------------------------- END
-
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ */
+
+#include "rgbdriver.h"
+
+// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
+
+void rgbdriver_cfg_setup ( rgbdriver_cfg_t *cfg )
+{
+ // Communication gpio pins
+
+ cfg->scl = HAL_PIN_NC;
+ cfg->sda = HAL_PIN_NC;
+
+ cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD;
+ cfg->i2c_address = 0x38;
+}
+
+RGBDRIVER_RETVAL rgbdriver_init ( rgbdriver_t *ctx, rgbdriver_cfg_t *cfg )
+{
+ i2c_master_config_t i2c_cfg;
+
+ i2c_cfg.speed = cfg->i2c_speed;
+ i2c_cfg.scl = cfg->scl;
+ i2c_cfg.sda = cfg->sda;
+
+ ctx->slave_address = cfg->i2c_address;
+
+ if ( i2c_master_open( &ctx->i2c, &i2c_cfg ) == I2C_MASTER_ERROR )
+ {
+ return RGBDRIVER_INIT_ERROR;
+ }
+
+ i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address );
+ i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed );
+ i2c_master_set_timeout( &ctx->i2c, 0 );
+
+ return RGBDRIVER_OK;
+}
+
+RGBDRIVER_RETVAL rgbdriver_default_cfg ( rgbdriver_t *ctx )
+{
+ uint8_t write_reg[ 3 ];
+
+ write_reg[ 0 ] = 0x3F;
+
+ rgbdriver_shut_down( ctx );
+ rgbdriver_generic_write( ctx, write_reg, 1 );
+
+ return RGBDRIVER_OK;
+}
+
+void rgbdriver_generic_write ( rgbdriver_t *ctx, uint8_t *data_buf, uint8_t len )
+{
+ for ( uint8_t cnt = 0; cnt < len; cnt++ )
+ {
+ i2c_master_write( &ctx->i2c, &data_buf[ cnt ], 1 );
+ Delay_50us( );
+ }
+}
+
+void rgbdriver_set_rgb_color ( rgbdriver_t *ctx, uint8_t red, uint8_t green, uint8_t blue )
+{
+ uint8_t write_reg[ 3 ];
+
+ if ( blue < 0x40 || blue > 0x5F )
+ {
+ write_reg[ 0 ] = 0x40;
+ }
+ else
+ {
+ write_reg[ 0 ] = blue;
+ }
+
+ if ( red < 0x60 || red > 0x7F )
+ {
+ write_reg[ 1 ] = 0x60;
+ }
+ else
+ {
+ write_reg[ 1 ] = red;
+ }
+
+ if ( green < 0x80 || green > 0x9F )
+ {
+ write_reg[ 2 ] = 0x80;
+ }
+ else
+ {
+ write_reg[ 2 ] = green;
+ }
+
+ rgbdriver_generic_write( ctx, write_reg, 3 );
+}
+
+void rgbdriver_set_color ( rgbdriver_t *ctx, uint32_t color )
+{
+ uint8_t write_reg[ 3 ];
+ write_reg[ 0 ] = ( uint8_t ) ( color & 0xFF );
+ write_reg[ 1 ] = ( uint8_t ) ( ( color >> 8 ) & 0xFF );
+ write_reg[ 2 ] = ( uint8_t ) ( ( color >> 16 ) & 0xFF );
+
+ rgbdriver_generic_write( ctx, write_reg, 3 );
+}
+
+void rgbdriver_shut_down ( rgbdriver_t *ctx )
+{
+ uint8_t write_reg[ 1 ];
+ write_reg[ 0 ] = RGBDRIVER_COLOR_OFF;
+
+ i2c_master_write( &ctx->i2c, write_reg, 1 );
+}
+
+// ------------------------------------------------------------------------- END
+
diff --git a/clicks/rgbdriver/memake.txt b/clicks/rgbdriver/memake.txt
deleted file mode 100644
index 08bda921f3..0000000000
--- a/clicks/rgbdriver/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: RgbDriver
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/rs2323/CMakeLists.txt b/clicks/rs2323/CMakeLists.txt
new file mode 100644
index 0000000000..194c91cff8
--- /dev/null
+++ b/clicks/rs2323/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_rs2323 LANGUAGES MikroC)
+else()
+ project(example_rs2323 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_rs2323
+ example/main.c
+
+)
+
+
+############################ example_rs2323 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_rs2323 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_rs2323 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_rs2323 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_rs2323)
+target_link_libraries(example_rs2323 PUBLIC Click.RS2323)
+############################ example_rs2323 GENERATED CODE END ###########################
diff --git a/clicks/rs2323/changelog.md b/clicks/rs2323/changelog.md
index fb1dd95ea8..086189320b 100644
--- a/clicks/rs2323/changelog.md
+++ b/clicks/rs2323/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.1
+### Version 2.1.0.1
- Initial release
diff --git a/clicks/rs2323/doc/doxy/Doxyfile.doxy b/clicks/rs2323/doc/doxy/Doxyfile.doxy
index dc50e02bb7..68b454432b 100644
--- a/clicks/rs2323/doc/doxy/Doxyfile.doxy
+++ b/clicks/rs2323/doc/doxy/Doxyfile.doxy
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY = ../clicks/rs2323/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/rs2323/temp/Help/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
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/rs2323/example \
- ../clicks/rs2323/lib/include \
- ../clicks/rs2323/README.md
+INPUT = ../cmake/rs2323/example \
+ ../cmake/rs2323/lib_rs2323/include \
+ ../cmake/rs2323/README.md
# 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
@@ -910,7 +910,7 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include
# command).
-EXAMPLE_PATH = ../clicks/rs2323/example
+EXAMPLE_PATH = ../cmake/rs2323/example
# 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
diff --git a/clicks/rs2323/doc/package/manifest.json b/clicks/rs2323/doc/package/manifest.json
index 0f73dc5286..d1db86ec4f 100644
--- a/clicks/rs2323/doc/package/manifest.json
+++ b/clicks/rs2323/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "RS232",
+ "architecture": "ARM|PIC|PIC32|RISC-V",
+ "category": "Click Boards > Interface > RS232",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "RS232 3 click",
"example_list": [
@@ -25,10 +24,12 @@
},
"name": "mikroe.click.rs2323",
"product_link": "https://www.mikroe.com/rs232-3-click",
- "short_description": "RS232 3 Click is a compact add-on board representing a universal usable RS232 transceiver. This board features the SP3221E, a low-power RS232 transceiver from MaxLinear. The SP3221E uses an internal high-efficiency, charge-pump power supply and is compliant with EIA/TIA-232-F standards when powered by any of the mikroBUS™ power rails. The AUTO ON-LINE® feature allows the SP3221E to automatically Wake-Up from a Shutdown state when an RS232 cable is connected and a peripheral device is turned on. When not connected or not in use, the SP3221E will automatically shut down, drawing less supply current.",
- "supported_compiler": "mikroC AI",
+ "short_description": "RS232 3 Click is a compact add-on board representing a universal usable RS232 transceiver. This board features the SP3221E, a low-power RS232 transceiver from MaxLinear. The SP3221E uses an internal high-efficiency, charge-pump power supply and is compliant with EIA/TIA-232-F standards when powered by any of the mikroBUS™ power rails. The AUTO ON-LINE® feature allows the SP3221E to automatically Wake-Up from a Shutdown state when an RS232 cable is connected and a peripheral device is turned on. When not connected or not in use, the SP3221E will automatically shut down, drawing less supply current.",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.1"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.1",
+ "alias": "Click.RS2323",
+ "cmake": true,
+ "subdir_name": "lib_rs2323"
}
-
diff --git a/clicks/rs2323/example/CMakeLists.txt b/clicks/rs2323/example/CMakeLists.txt
new file mode 100644
index 0000000000..59a2546915
--- /dev/null
+++ b/clicks/rs2323/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_rs2323 LANGUAGES MikroC)
+else()
+ project(example_rs2323 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_rs2323
+ main.c
+
+)
+
+
+############################ example_rs2323 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_rs2323 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_rs2323 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_rs2323 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_rs2323)
+target_link_libraries(example_rs2323 PUBLIC Click.RS2323)
+############################ example_rs2323 GENERATED CODE END ###########################
diff --git a/clicks/rs2323/example/manifest.exm b/clicks/rs2323/example/manifest.exm
index d36d6da043..6d8300bfae 100644
--- a/clicks/rs2323/example/manifest.exm
+++ b/clicks/rs2323/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "RS232 3 Click",
"description": "RS232 3 Click is a compact add-on board representing a universal usable RS232 transceiver. This board features the SP3221E, a low-power RS232 transceiver from MaxLinear. The SP3221E uses an internal high-efficiency, charge-pump power supply and is compliant with EIA/TIA-232-F standards when powered by any of the mikroBUS™ power rails. The AUTO ON-LINE® feature allows the SP3221E to automatically "Wake-Up" from a Shutdown state when an RS232 cable is connected and a peripheral device is turned on. When not connected or not in use, the SP3221E will automatically shut down, drawing less supply current.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv"],
"hw" : ["click","SP3221EEA"],
"category" : ["RS232"]
}
diff --git a/clicks/rs2323/example/memake.txt b/clicks/rs2323/example/memake.txt
deleted file mode 100644
index c62040fecb..0000000000
--- a/clicks/rs2323/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_rs2323
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.RS2323
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/rs2323/lib/memake.txt b/clicks/rs2323/lib/memake.txt
deleted file mode 100644
index 8d8a6d0292..0000000000
--- a/clicks/rs2323/lib/memake.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-type: library
-
-target: lib_rs2323
-
-sources: {
- src/rs2323.c
-}
-
-headers: {
- include/rs2323.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/rs2323.h) dst(include/rs2323.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.RS2323
diff --git a/clicks/rs2323/lib_rs2323/CMakeLists.txt b/clicks/rs2323/lib_rs2323/CMakeLists.txt
new file mode 100644
index 0000000000..6929e0cd02
--- /dev/null
+++ b/clicks/rs2323/lib_rs2323/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_rs2323 LANGUAGES MikroC)
+else()
+ project(lib_rs2323 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_rs2323 STATIC
+ src/rs2323.c
+ include/rs2323.h
+)
+add_library(Click.RS2323 ALIAS lib_rs2323)
+
+
+
+target_include_directories(lib_rs2323 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_rs2323 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_rs2323 PUBLIC MikroSDK.Driver)
diff --git a/clicks/rs2323/lib_rs2323/include/Click.RS2323 b/clicks/rs2323/lib_rs2323/include/Click.RS2323
new file mode 100644
index 0000000000..93110ddf97
--- /dev/null
+++ b/clicks/rs2323/lib_rs2323/include/Click.RS2323
@@ -0,0 +1 @@
+#include "rs2323.h"
diff --git a/clicks/rs2323/lib/include/rs2323.h b/clicks/rs2323/lib_rs2323/include/rs2323.h
similarity index 100%
rename from clicks/rs2323/lib/include/rs2323.h
rename to clicks/rs2323/lib_rs2323/include/rs2323.h
diff --git a/clicks/rs2323/lib/src/rs2323.c b/clicks/rs2323/lib_rs2323/src/rs2323.c
similarity index 100%
rename from clicks/rs2323/lib/src/rs2323.c
rename to clicks/rs2323/lib_rs2323/src/rs2323.c
diff --git a/clicks/rs2323/memake.txt b/clicks/rs2323/memake.txt
deleted file mode 100644
index aa26005fc5..0000000000
--- a/clicks/rs2323/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: RS2323
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/rs232isolator2/CMakeLists.txt b/clicks/rs232isolator2/CMakeLists.txt
new file mode 100644
index 0000000000..7aea45f448
--- /dev/null
+++ b/clicks/rs232isolator2/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_rs232isolator2 LANGUAGES MikroC)
+else()
+ project(example_rs232isolator2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_rs232isolator2
+ example/main.c
+
+)
+
+
+############################ example_rs232isolator2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_rs232isolator2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_rs232isolator2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_rs232isolator2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_rs232isolator2)
+target_link_libraries(example_rs232isolator2 PUBLIC Click.Rs232Isolator2)
+############################ example_rs232isolator2 GENERATED CODE END ###########################
diff --git a/clicks/rs232isolator2/changelog.md b/clicks/rs232isolator2/changelog.md
index fcfecd1843..dae6081f37 100644
--- a/clicks/rs232isolator2/changelog.md
+++ b/clicks/rs232isolator2/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.6
+### Version 2.1.0.6
- Initial release
diff --git a/clicks/rs232isolator2/doc/doxy/Doxyfile.doxy b/clicks/rs232isolator2/doc/doxy/Doxyfile.doxy
index d55e01fdad..b04823c3eb 100644
--- a/clicks/rs232isolator2/doc/doxy/Doxyfile.doxy
+++ b/clicks/rs232isolator2/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/rs232isolator2/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/rs232isolator2/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/rs232isolator2/example \
- ../clicks/rs232isolator2/lib/include \
- ../clicks/rs232isolator2/README.md
+INPUT = ../cmake/rs232isolator2/example \
+ ../cmake/rs232isolator2/lib_rs232isolator2/include \
+ ../cmake/rs232isolator2/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/rs232isolator2/example
+EXAMPLE_PATH = ../cmake/rs232isolator2/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/rs232isolator2/doc/package/manifest.json b/clicks/rs232isolator2/doc/package/manifest.json
index cd2f3ffcc8..e3e9471cbd 100644
--- a/clicks/rs232isolator2/doc/package/manifest.json
+++ b/clicks/rs232isolator2/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "RS232",
+ "architecture": "ARM|PIC|PIC32|RISC-V",
+ "category": "Click Boards > Interface > RS232",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "RS232 Isolator 2 click",
"example_list": [
@@ -26,12 +25,11 @@
"name": "mikroe.click.rs232isolator2",
"product_link": "https://www.mikroe.com/rs232-isolator-2-click",
"short_description": "RS232 Isolator 2 Click is a compact add-on board that contains a fully isolated transceiver used to provide secure and easy UART to RS232 conversion. This board features the ICL3221, a 3.3V powered RS232 transmitter/receiver that provides ±15kV ESD protection on its RS232 pins from Renesas. This Click board™ is characterized by an assured minimum data rate of 250kbps. It features an automatic power-down function and uses high-speed digital optocouplers to isolate the RS232 interface for 3.75kV isolation. It also possesses an LED indicator that indicates a valid RS232 signal at any of the receiver inputs. This Click board™ is suitable for isolation of RS232 signals, portable equipment, and where the low operational power consumption and even lower standby power consumption are critical.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.6"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.6",
+ "cmake": true,
+ "alias": "Click.Rs232Isolator2",
+ "subdir_name": "lib_rs232isolator2"
}
-
-
-
-
diff --git a/clicks/rs232isolator2/example/CMakeLists.txt b/clicks/rs232isolator2/example/CMakeLists.txt
new file mode 100644
index 0000000000..ab31de7750
--- /dev/null
+++ b/clicks/rs232isolator2/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_rs232isolator2 LANGUAGES MikroC)
+else()
+ project(example_rs232isolator2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_rs232isolator2
+ main.c
+
+)
+
+
+############################ example_rs232isolator2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_rs232isolator2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_rs232isolator2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_rs232isolator2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_rs232isolator2)
+target_link_libraries(example_rs232isolator2 PUBLIC Click.Rs232Isolator2)
+############################ example_rs232isolator2 GENERATED CODE END ###########################
diff --git a/clicks/rs232isolator2/example/manifest.exm b/clicks/rs232isolator2/example/manifest.exm
index 98f8caeec9..ad9b56d10f 100644
--- a/clicks/rs232isolator2/example/manifest.exm
+++ b/clicks/rs232isolator2/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "RS232 Isolator 2 Click",
"description": "RS232 Isolator 2 Click is a compact add-on board that contains a fully isolated transceiver used to provide secure and easy UART to RS232 conversion. This board features the ICL3221, a 3.3V powered RS232 transmitter/receiver that provides ±15kV ESD protection on its RS232 pins from Renesas. This Click board™ is characterized by an assured minimum data rate of 250kbps. It features an automatic power-down function and uses high-speed digital optocouplers to isolate the RS232 interface for 3.75kV isolation. It also possesses an LED indicator that indicates a valid RS232 signal at any of the receiver inputs. This Click board™ is suitable for isolation of RS232 signals, portable equipment, and where the low operational power consumption and even lower standby power consumption are critical.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv"],
"hw" : ["click","ICL3221"],
"category" : ["RS232"]
}
diff --git a/clicks/rs232isolator2/example/memake.txt b/clicks/rs232isolator2/example/memake.txt
deleted file mode 100644
index ff304300d8..0000000000
--- a/clicks/rs232isolator2/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_rs232isolator2
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Rs232Isolator2
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/rs232isolator2/lib/memake.txt b/clicks/rs232isolator2/lib/memake.txt
deleted file mode 100644
index e4f1e3c7c4..0000000000
--- a/clicks/rs232isolator2/lib/memake.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-type: library
-
-target: lib_rs232isolator2
-
-sources: {
- src/rs232isolator2.c
-}
-
-headers: {
- include/rs232isolator2.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/rs232isolator2.h) dst(include/rs232isolator2.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.Rs232Isolator2
diff --git a/clicks/rs232isolator2/lib_rs232isolator2/CMakeLists.txt b/clicks/rs232isolator2/lib_rs232isolator2/CMakeLists.txt
new file mode 100644
index 0000000000..fc366f90d8
--- /dev/null
+++ b/clicks/rs232isolator2/lib_rs232isolator2/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_rs232isolator2 LANGUAGES MikroC)
+else()
+ project(lib_rs232isolator2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_rs232isolator2 STATIC
+ src/rs232isolator2.c
+ include/rs232isolator2.h
+)
+add_library(Click.Rs232Isolator2 ALIAS lib_rs232isolator2)
+
+
+
+target_include_directories(lib_rs232isolator2 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_rs232isolator2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_rs232isolator2 PUBLIC MikroSDK.Driver)
diff --git a/clicks/rs232isolator2/lib_rs232isolator2/include/Click.Rs232Isolator2 b/clicks/rs232isolator2/lib_rs232isolator2/include/Click.Rs232Isolator2
new file mode 100644
index 0000000000..81bb7057d0
--- /dev/null
+++ b/clicks/rs232isolator2/lib_rs232isolator2/include/Click.Rs232Isolator2
@@ -0,0 +1 @@
+#include "rs232isolator2.h"
diff --git a/clicks/rs232isolator2/lib/include/rs232isolator2.h b/clicks/rs232isolator2/lib_rs232isolator2/include/rs232isolator2.h
similarity index 100%
rename from clicks/rs232isolator2/lib/include/rs232isolator2.h
rename to clicks/rs232isolator2/lib_rs232isolator2/include/rs232isolator2.h
diff --git a/clicks/rs232isolator2/lib/src/rs232isolator2.c b/clicks/rs232isolator2/lib_rs232isolator2/src/rs232isolator2.c
similarity index 100%
rename from clicks/rs232isolator2/lib/src/rs232isolator2.c
rename to clicks/rs232isolator2/lib_rs232isolator2/src/rs232isolator2.c
diff --git a/clicks/rs232isolator2/memake.txt b/clicks/rs232isolator2/memake.txt
deleted file mode 100644
index 7406d84eaa..0000000000
--- a/clicks/rs232isolator2/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Rs232Isolator2
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/rs4856/CHANGELOG.md b/clicks/rs4856/CHANGELOG.md
index b586d72846..8ce49e7776 100644
--- a/clicks/rs4856/CHANGELOG.md
+++ b/clicks/rs4856/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.7
+### Version 2.1.0.7
- Initial release
diff --git a/clicks/rs4856/CMakeLists.txt b/clicks/rs4856/CMakeLists.txt
new file mode 100644
index 0000000000..5a8a900e35
--- /dev/null
+++ b/clicks/rs4856/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_rs4856 LANGUAGES MikroC)
+else()
+ project(example_rs4856 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_rs4856
+ example/main.c
+
+)
+
+
+############################ example_rs4856 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_rs4856 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_rs4856 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_rs4856 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_rs4856)
+target_link_libraries(example_rs4856 PUBLIC Click.Rs4856)
+############################ example_rs4856 GENERATED CODE END ###########################
diff --git a/clicks/rs4856/doc/doxy/Doxyfile.doxy b/clicks/rs4856/doc/doxy/Doxyfile.doxy
index fd3e426274..49d76d0a46 100644
--- a/clicks/rs4856/doc/doxy/Doxyfile.doxy
+++ b/clicks/rs4856/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/rs4856/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/rs4856/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/rs4856/example \
- ../clicks/rs4856/lib/include \
- ../clicks/rs4856/README.md
+INPUT = ../cmake/rs4856/example \
+ ../cmake/rs4856/lib_rs4856/include \
+ ../cmake/rs4856/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/rs4856/example
+EXAMPLE_PATH = ../cmake/rs4856/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/rs4856/doc/package/manifest.json b/clicks/rs4856/doc/package/manifest.json
index c58316bc3d..8a1ade90fd 100644
--- a/clicks/rs4856/doc/package/manifest.json
+++ b/clicks/rs4856/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "RS485",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Interface > RS485",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "RS485 6 click",
"example_list": [
@@ -26,15 +25,14 @@
"name": "mikroe.click.rs4856",
"product_link": "https://www.mikroe.com/rs485-6-click",
"short_description": "RS485 6 Click offers a half-duplex RS-485 communication with integrated surge protection",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "_type": "mikroSDK Library",
+ "related_projects": [
3207
],
- "_type": "mikroSDK Library",
- "version": "2.0.0.7"
+ "version": "2.1.0.7",
+ "cmake": true,
+ "alias": "Click.Rs4856",
+ "subdir_name": "lib_rs4856"
}
-
-
-
diff --git a/clicks/rs4856/example/CMakeLists.txt b/clicks/rs4856/example/CMakeLists.txt
new file mode 100644
index 0000000000..2e5b1db81c
--- /dev/null
+++ b/clicks/rs4856/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_rs4856 LANGUAGES MikroC)
+else()
+ project(example_rs4856 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_rs4856
+ main.c
+
+)
+
+
+############################ example_rs4856 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_rs4856 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_rs4856 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_rs4856 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_rs4856)
+target_link_libraries(example_rs4856 PUBLIC Click.Rs4856)
+############################ example_rs4856 GENERATED CODE END ###########################
diff --git a/clicks/rs4856/example/manifest.exm b/clicks/rs4856/example/manifest.exm
index 1d3c5b64e4..dda0e74b83 100644
--- a/clicks/rs4856/example/manifest.exm
+++ b/clicks/rs4856/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "RS485 6 Click",
"description": "RS485 6 Click offers a half-duplex RS-485 communication with integrated surge protection",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","THVD1329DT"],
"category" : ["RS485"]
}
diff --git a/clicks/rs4856/example/memake.txt b/clicks/rs4856/example/memake.txt
deleted file mode 100644
index a66903d610..0000000000
--- a/clicks/rs4856/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_rs4856
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Rs4856
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/rs4856/lib/memake.txt b/clicks/rs4856/lib/memake.txt
deleted file mode 100644
index af31cc4e9e..0000000000
--- a/clicks/rs4856/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_rs4856
-
-alias: Click.Rs4856
-
-sources: {
- src/rs4856.c
-}
-
-headers: {
- include/rs4856.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/rs4856.h) dst(include/rs4856.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/rs4856/lib_rs4856/CMakeLists.txt b/clicks/rs4856/lib_rs4856/CMakeLists.txt
new file mode 100644
index 0000000000..e1e74688e7
--- /dev/null
+++ b/clicks/rs4856/lib_rs4856/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_rs4856 LANGUAGES MikroC)
+else()
+ project(lib_rs4856 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_rs4856 STATIC
+ src/rs4856.c
+ include/rs4856.h
+)
+add_library(Click.Rs4856 ALIAS lib_rs4856)
+
+
+
+target_include_directories(lib_rs4856 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_rs4856 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_rs4856 PUBLIC MikroSDK.Driver)
diff --git a/clicks/rs4856/lib_rs4856/include/Click.Rs4856 b/clicks/rs4856/lib_rs4856/include/Click.Rs4856
new file mode 100644
index 0000000000..3c085c70fb
--- /dev/null
+++ b/clicks/rs4856/lib_rs4856/include/Click.Rs4856
@@ -0,0 +1 @@
+#include "rs4856.h"
diff --git a/clicks/rs4856/lib/include/rs4856.h b/clicks/rs4856/lib_rs4856/include/rs4856.h
similarity index 100%
rename from clicks/rs4856/lib/include/rs4856.h
rename to clicks/rs4856/lib_rs4856/include/rs4856.h
diff --git a/clicks/rs4856/lib/src/rs4856.c b/clicks/rs4856/lib_rs4856/src/rs4856.c
similarity index 100%
rename from clicks/rs4856/lib/src/rs4856.c
rename to clicks/rs4856/lib_rs4856/src/rs4856.c
diff --git a/clicks/rs4856/memake.txt b/clicks/rs4856/memake.txt
deleted file mode 100644
index 29538fc24a..0000000000
--- a/clicks/rs4856/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Rs4856
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/servo/CHANGELOG.md b/clicks/servo/CHANGELOG.md
index b586d72846..8ce49e7776 100644
--- a/clicks/servo/CHANGELOG.md
+++ b/clicks/servo/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.7
+### Version 2.1.0.7
- Initial release
diff --git a/clicks/servo/CMakeLists.txt b/clicks/servo/CMakeLists.txt
new file mode 100644
index 0000000000..1c2a512efd
--- /dev/null
+++ b/clicks/servo/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_servo LANGUAGES MikroC)
+else()
+ project(example_servo LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_servo
+ example/main.c
+
+)
+
+
+############################ example_servo GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_servo PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_servo PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_servo PUBLIC MikroSDK.Log)
+add_subdirectory(lib_servo)
+target_link_libraries(example_servo PUBLIC Click.Servo)
+############################ example_servo GENERATED CODE END ###########################
diff --git a/clicks/servo/doc/doxy/Doxyfile.doxy b/clicks/servo/doc/doxy/Doxyfile.doxy
index 46e6d24244..bd050a3bc8 100644
--- a/clicks/servo/doc/doxy/Doxyfile.doxy
+++ b/clicks/servo/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/servo/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/servo/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/servo/example \
- ../clicks/servo/lib/include \
- ../clicks/servo/README.md
+INPUT = ../cmake/servo/example \
+ ../cmake/servo/lib_servo/include \
+ ../cmake/servo/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/servo/example
+EXAMPLE_PATH = ../cmake/servo/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/servo/doc/package/manifest.json b/clicks/servo/doc/package/manifest.json
index c8d8fe7f15..ead6d2fc9d 100644
--- a/clicks/servo/doc/package/manifest.json
+++ b/clicks/servo/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Servo",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Motor control > Servo",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Servo click",
"example_list": [
@@ -26,17 +25,14 @@
"name": "mikroe.click.servo",
"product_link": "https://www.mikroe.com/servo-click",
"short_description": "Servo click is a 16-channel PWM servo driver with the voltage sensing circuitry. It can be used to simultaneously control 16 servo motors, each with its own programmable PWM signal.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "_type": "mikroSDK Library",
+ "related_projects": [
2352
],
- "version": "2.0.0.7"
+ "version": "2.1.0.7",
+ "cmake": true,
+ "alias": "Click.Servo",
+ "subdir_name": "lib_servo"
}
-
-
-
-
-
-
diff --git a/clicks/servo/example/CMakeLists.txt b/clicks/servo/example/CMakeLists.txt
new file mode 100644
index 0000000000..c2c9d0de78
--- /dev/null
+++ b/clicks/servo/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_servo LANGUAGES MikroC)
+else()
+ project(example_servo LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_servo
+ main.c
+
+)
+
+
+############################ example_servo GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_servo PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_servo PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_servo PUBLIC MikroSDK.Log)
+add_subdirectory(lib_servo)
+target_link_libraries(example_servo PUBLIC Click.Servo)
+############################ example_servo GENERATED CODE END ###########################
diff --git a/clicks/servo/example/manifest.exm b/clicks/servo/example/manifest.exm
index 067fdec3a0..dd752d11d3 100644
--- a/clicks/servo/example/manifest.exm
+++ b/clicks/servo/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Servo Click",
"description": "Servo click is a 16-channel PWM servo driver with the voltage sensing circuitry. It can be used to simultaneously control 16 servo motors, each with its own programmable PWM signal.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","PCA9685"],
"category" : ["Servo"]
}
diff --git a/clicks/servo/example/memake.txt b/clicks/servo/example/memake.txt
deleted file mode 100644
index 6d23206830..0000000000
--- a/clicks/servo/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_servo
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Servo
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/servo/lib/memake.txt b/clicks/servo/lib/memake.txt
deleted file mode 100644
index 3b277fce31..0000000000
--- a/clicks/servo/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_servo
-
-alias: Click.Servo
-
-sources: {
- src/servo.c
-}
-
-headers: {
- include/servo.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/servo.h) dst(include/servo.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/servo/lib_servo/CMakeLists.txt b/clicks/servo/lib_servo/CMakeLists.txt
new file mode 100644
index 0000000000..98a4b6e016
--- /dev/null
+++ b/clicks/servo/lib_servo/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_servo LANGUAGES MikroC)
+else()
+ project(lib_servo LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_servo STATIC
+ src/servo.c
+ include/servo.h
+)
+add_library(Click.Servo ALIAS lib_servo)
+
+
+
+target_include_directories(lib_servo PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_servo PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_servo PUBLIC MikroSDK.Driver)
diff --git a/clicks/servo/lib_servo/include/Click.Servo b/clicks/servo/lib_servo/include/Click.Servo
new file mode 100644
index 0000000000..74a7b1fcf9
--- /dev/null
+++ b/clicks/servo/lib_servo/include/Click.Servo
@@ -0,0 +1 @@
+#include "servo.h"
diff --git a/clicks/servo/lib/include/servo.h b/clicks/servo/lib_servo/include/servo.h
similarity index 100%
rename from clicks/servo/lib/include/servo.h
rename to clicks/servo/lib_servo/include/servo.h
diff --git a/clicks/servo/lib/src/servo.c b/clicks/servo/lib_servo/src/servo.c
similarity index 100%
rename from clicks/servo/lib/src/servo.c
rename to clicks/servo/lib_servo/src/servo.c
diff --git a/clicks/servo/memake.txt b/clicks/servo/memake.txt
deleted file mode 100644
index 039eabb379..0000000000
--- a/clicks/servo/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Servo
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/smartdof2/CMakeLists.txt b/clicks/smartdof2/CMakeLists.txt
new file mode 100644
index 0000000000..be9910045c
--- /dev/null
+++ b/clicks/smartdof2/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_smartdof2 LANGUAGES MikroC)
+else()
+ project(example_smartdof2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_smartdof2
+ example/main.c
+
+)
+
+
+############################ example_smartdof2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_smartdof2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_smartdof2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_smartdof2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_smartdof2)
+target_link_libraries(example_smartdof2 PUBLIC Click.SmartDOF2)
+############################ example_smartdof2 GENERATED CODE END ###########################
+
diff --git a/clicks/smartdof2/README.md b/clicks/smartdof2/README.md
new file mode 100644
index 0000000000..1bfa253970
--- /dev/null
+++ b/clicks/smartdof2/README.md
@@ -0,0 +1,174 @@
+\mainpage Main Page
+
+---
+# Smart DOF 2 click
+
+> Smart DOF 2 Click is a compact add-on board with a highly advanced integrated 6-axis IMU measurement unit.
+> This board features the LSM6DSV16XTR, a high-performance 6-axis IMU with sensor fusion,
+> ASC, MLC, Qvar, and OIS/EIS paths from STMicroelectronics.
+> The IMU unit features an accelerometer and gyroscope that can be turned off independently of each other,
+> still allowed to have different ODRs and power modes. The unit can be configured as a finite state machine (FSM),
+> machine learning core (MLC), and Qvar sensing.
+
+
+
+
+
+[click Product page](https://www.mikroe.com/smart-dof-2-click)
+
+---
+
+
+#### Click library
+
+- **Author** : Nenad Filipovic
+- **Date** : Mar 2023.
+- **Type** : I2C/SPI type
+
+
+# Software Support
+
+We provide a library for the Smart DOF 2 Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
+
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+## Library Description
+
+> This library contains API for Smart DOF 2 Click driver.
+
+#### Standard key functions :
+
+- `smartdof2_cfg_setup` Config Object Initialization function.
+```c
+void smartdof2_cfg_setup ( smartdof2_cfg_t *cfg );
+```
+
+- `smartdof2_init` Initialization function.
+```c
+err_t smartdof2_init ( smartdof2_t *ctx, smartdof2_cfg_t *cfg );
+```
+
+- `smartdof2_default_cfg` Click Default Configuration function.
+```c
+err_t smartdof2_default_cfg ( smartdof2_t *ctx );
+```
+
+#### Example key functions :
+
+- `smartdof2_get_acc_axis` Smart DOF 2 get accel sensor axes function.
+```c
+err_t smartdof2_get_acc_axis ( smartdof2_t *ctx, smartdof2_axis_t *acc_axis );
+```
+
+- `smartdof2_get_gyro_axis` Smart DOF 2 get gyro sensor axes function.
+```c
+err_t smartdof2_get_gyro_axis ( smartdof2_t *ctx, smartdof2_axis_t *gyro_axis );
+```
+
+- `smartdof2_get_temperature` Smart DOF 2 get temperature function.
+```c
+err_t smartdof2_get_temperature ( smartdof2_t *ctx, float *temperature );
+```
+
+## Example Description
+
+> This library contains API for Smart DOF 2 Click driver.
+> The library initializes and defines the I2C or SPI bus drivers
+> to write and read data from registers.
+> The library also includes a function for reading
+> accelerometer and gyroscope X-axis, Y-axis, and Z-axis data
+> and the temperature in degrees Celsius.
+
+**The demo application is composed of two sections :**
+
+### Application Init
+
+> The initialization of I2C or SPI module, log UART, and additional pins.
+> After the driver init, the app executes a default configuration.
+
+```c
+void application_init ( void )
+{
+ log_cfg_t log_cfg; /**< Logger config object. */
+ smartdof2_cfg_t smartdof2_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ smartdof2_cfg_setup( &smartdof2_cfg );
+ SMARTDOF2_MAP_MIKROBUS( smartdof2_cfg, MIKROBUS_1 );
+ err_t init_flag = smartdof2_init( &smartdof2, &smartdof2_cfg );
+ if ( ( I2C_MASTER_ERROR == init_flag ) || ( SPI_MASTER_ERROR == init_flag ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
+ if ( SMARTDOF2_ERROR == smartdof2_default_cfg ( &smartdof2 ) )
+ {
+ log_error( &logger, " Default configuration." );
+ for ( ; ; );
+ }
+
+ log_info( &logger, " Application Task " );
+ log_printf( &logger, "--------------------------------------\r\n" );
+}
+```
+
+### Application Task
+
+> This example demonstrates the use of the Smart DOF 2 Click board™.
+> Measures and displays acceleration and gyroscope data for X-axis, Y-axis, and Z-axis.
+> Results are being sent to the UART Terminal, where you can track their changes.
+
+```c
+void application_task ( void )
+{
+ static smartdof2_axis_t acc_axis, gyro_axis;
+ if ( SMARTDOF2_OK == smartdof2_get_acc_axis( &smartdof2, &acc_axis ) )
+ {
+ if ( SMARTDOF2_OK == smartdof2_get_gyro_axis( &smartdof2, &gyro_axis ) )
+ {
+ log_printf( &logger, " Accel X: %.2f mg | Gyro X: %.2f mdps\r\n", acc_axis.x, gyro_axis.x );
+ log_printf( &logger, " Accel Y: %.2f mg | Gyro Y: %.2f mdps\r\n", acc_axis.y, gyro_axis.y );
+ log_printf( &logger, " Accel Z: %.2f mg | Gyro Z: %.2f mdps\r\n", acc_axis.z, gyro_axis.z );
+ log_printf( &logger, "--------------------------------------\r\n" );
+ }
+ }
+ Delay_ms( 1000 );
+}
+```
+
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
+
+- MikroSDK.Board
+- MikroSDK.Log
+- Click.SmartDOF2
+
+**Additional notes and informations**
+
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
+
+---
diff --git a/clicks/smartdof2/changelog.md b/clicks/smartdof2/changelog.md
new file mode 100644
index 0000000000..086189320b
--- /dev/null
+++ b/clicks/smartdof2/changelog.md
@@ -0,0 +1,4 @@
+## Changelog
+
+### Version 2.1.0.1
+ - Initial release
diff --git a/clicks/smartdof2/details.md b/clicks/smartdof2/details.md
new file mode 100644
index 0000000000..3657fb3775
--- /dev/null
+++ b/clicks/smartdof2/details.md
@@ -0,0 +1,173 @@
+
+---
+# Smart DOF 2 click
+
+> Smart DOF 2 Click is a compact add-on board with a highly advanced integrated 6-axis IMU measurement unit.
+> This board features the LSM6DSV16XTR, a high-performance 6-axis IMU with sensor fusion,
+> ASC, MLC, Qvar, and OIS/EIS paths from STMicroelectronics.
+> The IMU unit features an accelerometer and gyroscope that can be turned off independently of each other,
+> still allowed to have different ODRs and power modes. The unit can be configured as a finite state machine (FSM),
+> machine learning core (MLC), and Qvar sensing.
+
+
+
+
+
+[click Product page](https://www.mikroe.com/smart-dof-2-click)
+
+---
+
+
+#### Click library
+
+- **Author** : Nenad Filipovic
+- **Date** : Mar 2023.
+- **Type** : I2C/SPI type
+
+
+# Software Support
+
+We provide a library for the Smart DOF 2 Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
+
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+## Library Description
+
+> This library contains API for Smart DOF 2 Click driver.
+
+#### Standard key functions :
+
+- `smartdof2_cfg_setup` Config Object Initialization function.
+```c
+void smartdof2_cfg_setup ( smartdof2_cfg_t *cfg );
+```
+
+- `smartdof2_init` Initialization function.
+```c
+err_t smartdof2_init ( smartdof2_t *ctx, smartdof2_cfg_t *cfg );
+```
+
+- `smartdof2_default_cfg` Click Default Configuration function.
+```c
+err_t smartdof2_default_cfg ( smartdof2_t *ctx );
+```
+
+#### Example key functions :
+
+- `smartdof2_get_acc_axis` Smart DOF 2 get accel sensor axes function.
+```c
+err_t smartdof2_get_acc_axis ( smartdof2_t *ctx, smartdof2_axis_t *acc_axis );
+```
+
+- `smartdof2_get_gyro_axis` Smart DOF 2 get gyro sensor axes function.
+```c
+err_t smartdof2_get_gyro_axis ( smartdof2_t *ctx, smartdof2_axis_t *gyro_axis );
+```
+
+- `smartdof2_get_temperature` Smart DOF 2 get temperature function.
+```c
+err_t smartdof2_get_temperature ( smartdof2_t *ctx, float *temperature );
+```
+
+## Example Description
+
+> This library contains API for Smart DOF 2 Click driver.
+> The library initializes and defines the I2C or SPI bus drivers
+> to write and read data from registers.
+> The library also includes a function for reading
+> accelerometer and gyroscope X-axis, Y-axis, and Z-axis data
+> and the temperature in degrees Celsius.
+
+**The demo application is composed of two sections :**
+
+### Application Init
+
+> The initialization of I2C or SPI module, log UART, and additional pins.
+> After the driver init, the app executes a default configuration.
+
+```c
+void application_init ( void )
+{
+ log_cfg_t log_cfg; /**< Logger config object. */
+ smartdof2_cfg_t smartdof2_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ smartdof2_cfg_setup( &smartdof2_cfg );
+ SMARTDOF2_MAP_MIKROBUS( smartdof2_cfg, MIKROBUS_1 );
+ err_t init_flag = smartdof2_init( &smartdof2, &smartdof2_cfg );
+ if ( ( I2C_MASTER_ERROR == init_flag ) || ( SPI_MASTER_ERROR == init_flag ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
+ if ( SMARTDOF2_ERROR == smartdof2_default_cfg ( &smartdof2 ) )
+ {
+ log_error( &logger, " Default configuration." );
+ for ( ; ; );
+ }
+
+ log_info( &logger, " Application Task " );
+ log_printf( &logger, "--------------------------------------\r\n" );
+}
+```
+
+### Application Task
+
+> This example demonstrates the use of the Smart DOF 2 Click board™.
+> Measures and displays acceleration and gyroscope data for X-axis, Y-axis, and Z-axis.
+> Results are being sent to the UART Terminal, where you can track their changes.
+
+```c
+void application_task ( void )
+{
+ static smartdof2_axis_t acc_axis, gyro_axis;
+ if ( SMARTDOF2_OK == smartdof2_get_acc_axis( &smartdof2, &acc_axis ) )
+ {
+ if ( SMARTDOF2_OK == smartdof2_get_gyro_axis( &smartdof2, &gyro_axis ) )
+ {
+ log_printf( &logger, " Accel X: %.2f mg | Gyro X: %.2f mdps\r\n", acc_axis.x, gyro_axis.x );
+ log_printf( &logger, " Accel Y: %.2f mg | Gyro Y: %.2f mdps\r\n", acc_axis.y, gyro_axis.y );
+ log_printf( &logger, " Accel Z: %.2f mg | Gyro Z: %.2f mdps\r\n", acc_axis.z, gyro_axis.z );
+ log_printf( &logger, "--------------------------------------\r\n" );
+ }
+ }
+ Delay_ms( 1000 );
+}
+```
+
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
+
+- MikroSDK.Board
+- MikroSDK.Log
+- Click.SmartDOF2
+
+**Additional notes and informations**
+
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
+
+---
diff --git a/clicks/smartdof2/doc/doxy/Doxyfile.doxy b/clicks/smartdof2/doc/doxy/Doxyfile.doxy
new file mode 100644
index 0000000000..b8053eb0d7
--- /dev/null
+++ b/clicks/smartdof2/doc/doxy/Doxyfile.doxy
@@ -0,0 +1,2481 @@
+# Doxyfile 1.8.13
+
+# 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 config 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 http://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 = smartdof2
+
+# 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.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
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# 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 = ../cmake/smartdof2/temp/Help/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 = NO
+
+# 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 = 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, 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
+
+# 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 = 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
+
+# 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.
+
+ALIASES =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST =
+
+# 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 = YES
+
+# 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
+
+# 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,
+# C#, C, C++, D, PHP, Objective-C, Python, 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), VHDL. 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.
+
+EXTENSION_MAPPING =
+
+# 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 http://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: 0.
+# 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:
+# http://www.riverbankcomputing.co.uk/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
+
+#---------------------------------------------------------------------------
+# 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 = 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 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
+# (class|struct|union) 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
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES, upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# 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 = YES
+
+# 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 = NO
+
+# 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 http://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.
+# 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.
+# 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 =
+
+#---------------------------------------------------------------------------
+# 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 = ../cmake/smartdof2/example \
+ ../cmake/smartdof2/lib_smartdof2/include \
+ ../cmake/smartdof2/README.md
+
+# 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: http://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.
+#
+# 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, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
+# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
+
+FILE_PATTERNS = *.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 \
+ *.py \
+ *.pyw \
+ *.f90 \
+ *.f95 \
+ *.f03 \
+ *.f08 \
+ *.f \
+ *.for \
+ *.tcl \
+ *.vhd \
+ *.vhdl \
+ *.ucf \
+ *.qsf \
+ *.odl \
+ .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 =
+
+# 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 = ../cmake/smartdof2/example
+
+# 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 = *
+
+# 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 =
+
+# 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 = NO
+
+# 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
+# function 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 = NO
+
+# 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 http://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 config 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 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 =
+
+#---------------------------------------------------------------------------
+# 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
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX = 5
+
+# 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
+# http://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_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: http://DEVELOPER_NAME.apple.com/tools/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_NAME/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.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 = "Mikroe Click boards"
+
+# 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 = mikroe.com
+
+# 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 = mikroe.com
+
+# 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 = MikroElektronika
+
+# 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: http://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 master .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: http://qt-project.org/doc/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 = org.doxygen.Project
+
+# 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: http://qt-project.org/doc/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 = ./temp/Help/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: http://qt-project.org/doc/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: http://qt-project.org/doc/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:
+# http://qt-project.org/doc/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 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 = org.doxygen.Project
+
+# 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 = NO
+
+# 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
+
+# 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_TRANPARENT 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
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://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/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 http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# 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/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: http://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: http://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 = NO
+
+# 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 enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# 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.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = 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 pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
+# higher quality PDF documentation.
+# 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 = NO
+
+# 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
+# http://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
+
+#---------------------------------------------------------------------------
+# 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 config
+# 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 config 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 = NO
+
+# 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 = NO
+
+#---------------------------------------------------------------------------
+# 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
+
+#---------------------------------------------------------------------------
+# 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.sf.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: NO.
+
+HAVE_DOT = NO
+
+# 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 = NO
+
+# 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 HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# 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 = NO
+
+# 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, jpg, gif, 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 = 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
+# 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 dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP = YES
diff --git a/clicks/smartdof2/doc/image/click_icon.png b/clicks/smartdof2/doc/image/click_icon.png
new file mode 100644
index 0000000000..b947627a1e
Binary files /dev/null and b/clicks/smartdof2/doc/image/click_icon.png differ
diff --git a/clicks/smartdof2/doc/package/manifest.json b/clicks/smartdof2/doc/package/manifest.json
new file mode 100644
index 0000000000..ed77d25c9b
--- /dev/null
+++ b/clicks/smartdof2/doc/package/manifest.json
@@ -0,0 +1,35 @@
+{
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Motion",
+ "changelog": "Resources/CHANGELOG.md",
+ "contains": [
+ "libraries",
+ "hex_files",
+ "examples",
+ "source_files"
+ ],
+ "dependency_list": [],
+ "details": "Resources/DETAILS.md",
+ "display_name": "Smart DOF 2 click",
+ "example_list": [
+ {
+ "project_path": "Examples/example"
+ }
+ ],
+ "help": "Help/doc",
+ "icon": "Resources/click_icon.png",
+ "license": {
+ "file_path": "",
+ "id": "46"
+ },
+ "name": "mikroe.click.smartdof2",
+ "product_link": "https://www.mikroe.com/smart-dof-2-click",
+ "short_description": "Smart DOF 2 Click is a compact add-on board with a highly advanced integrated 6-axis IMU measurement unit. This board features the LSM6DSV16XTR, a high-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, and OIS/EIS paths from STMicroelectronics. The IMU unit features an accelerometer and gyroscope that can be turned off independently of each other, still allowed to have different ODRs and power modes. The unit can be configured as a finite state machine (FSM), machine learning core (MLC), and Qvar sensing.",
+ "supported_compiler": "mikroC AI|GCC",
+ "type": "Library",
+ "_type":"mikroSDK Library",
+ "version": "2.1.0.1",
+ "cmake": true,
+ "alias": "Click.SmartDOF2",
+ "subdir_name": "lib_smartdof2"
+}
diff --git a/clicks/smartdof2/example/CMakeLists.txt b/clicks/smartdof2/example/CMakeLists.txt
new file mode 100644
index 0000000000..6d5736c114
--- /dev/null
+++ b/clicks/smartdof2/example/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_smartdof2 LANGUAGES MikroC)
+else()
+ project(example_smartdof2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_smartdof2
+ main.c
+
+)
+
+
+############################ example_smartdof2 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_smartdof2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_smartdof2 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_smartdof2 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_smartdof2)
+target_link_libraries(example_smartdof2 PUBLIC Click.SmartDOF2)
+############################ example_smartdof2 GENERATED CODE END ###########################
+
diff --git a/clicks/smartdof2/example/main.c b/clicks/smartdof2/example/main.c
new file mode 100644
index 0000000000..38101878fa
--- /dev/null
+++ b/clicks/smartdof2/example/main.c
@@ -0,0 +1,99 @@
+/*!
+ * @file main.c
+ * @brief Smart DOF 2 Click example
+ *
+ * # Description
+ * This library contains API for Smart DOF 2 Click driver.
+ * The library initializes and defines the I2C or SPI bus drivers
+ * to write and read data from registers.
+ * The library also includes a function for reading
+ * accelerometer and gyroscope X-axis, Y-axis, and Z-axis data
+ * and the temperature in degrees Celsius.
+ *
+ * The demo application is composed of two sections :
+ *
+ * ## Application Init
+ * The initialization of I2C or SPI module, log UART, and additional pins.
+ * After the driver init, the app executes a default configuration.
+ *
+ * ## Application Task
+ * This example demonstrates the use of the Smart DOF 2 Click board™.
+ * Measures and displays acceleration and gyroscope data for X-axis, Y-axis, and Z-axis.
+ * Results are being sent to the UART Terminal, where you can track their changes.
+ *
+ * @author Nenad Filipovic
+ *
+ */
+
+#include "board.h"
+#include "log.h"
+#include "smartdof2.h"
+
+static smartdof2_t smartdof2;
+static log_t logger;
+
+void application_init ( void )
+{
+ log_cfg_t log_cfg; /**< Logger config object. */
+ smartdof2_cfg_t smartdof2_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ smartdof2_cfg_setup( &smartdof2_cfg );
+ SMARTDOF2_MAP_MIKROBUS( smartdof2_cfg, MIKROBUS_1 );
+ err_t init_flag = smartdof2_init( &smartdof2, &smartdof2_cfg );
+ if ( ( I2C_MASTER_ERROR == init_flag ) || ( SPI_MASTER_ERROR == init_flag ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
+ if ( SMARTDOF2_ERROR == smartdof2_default_cfg ( &smartdof2 ) )
+ {
+ log_error( &logger, " Default configuration." );
+ for ( ; ; );
+ }
+
+ log_info( &logger, " Application Task " );
+ log_printf( &logger, "--------------------------------------\r\n" );
+}
+
+void application_task ( void )
+{
+ static smartdof2_axis_t acc_axis, gyro_axis;
+ if ( SMARTDOF2_OK == smartdof2_get_acc_axis( &smartdof2, &acc_axis ) )
+ {
+ if ( SMARTDOF2_OK == smartdof2_get_gyro_axis( &smartdof2, &gyro_axis ) )
+ {
+ log_printf( &logger, " Accel X: %.2f mg | Gyro X: %.2f mdps\r\n", acc_axis.x, gyro_axis.x );
+ log_printf( &logger, " Accel Y: %.2f mg | Gyro Y: %.2f mdps\r\n", acc_axis.y, gyro_axis.y );
+ log_printf( &logger, " Accel Z: %.2f mg | Gyro Z: %.2f mdps\r\n", acc_axis.z, gyro_axis.z );
+ log_printf( &logger, "--------------------------------------\r\n" );
+ }
+ }
+ Delay_ms( 1000 );
+}
+
+void main ( void )
+{
+ application_init( );
+
+ for ( ; ; )
+ {
+ application_task( );
+ }
+}
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/smartdof2/example/manifest.exm b/clicks/smartdof2/example/manifest.exm
new file mode 100644
index 0000000000..86280a2cb1
--- /dev/null
+++ b/clicks/smartdof2/example/manifest.exm
@@ -0,0 +1,8 @@
+{
+ "name": "Smart DOF 2 Click",
+ "description": "Smart DOF 2 Click is a compact add-on board with a highly advanced integrated 6-axis IMU measurement unit. This board features the LSM6DSV16XTR, a high-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, and OIS/EIS paths from STMicroelectronics. The IMU unit features an accelerometer and gyroscope that can be turned off independently of each other, still allowed to have different ODRs and power modes. The unit can be configured as a finite state machine (FSM), machine learning core (MLC), and Qvar sensing.",
+ "image" : "../../Resources/click_icon.png",
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
+ "hw" : ["click","LSM6DSV16X"],
+ "category" : ["Click Boards > Sensors > Motion"]
+}
diff --git a/clicks/smartdof2/lib_smartdof2/CMakeLists.txt b/clicks/smartdof2/lib_smartdof2/CMakeLists.txt
new file mode 100644
index 0000000000..dd0ee07963
--- /dev/null
+++ b/clicks/smartdof2/lib_smartdof2/CMakeLists.txt
@@ -0,0 +1,35 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_smartdof2 LANGUAGES MikroC)
+else()
+ project(lib_smartdof2 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_smartdof2 STATIC
+ src/smartdof2.c
+ include/smartdof2.h
+)
+add_library(Click.SmartDOF2 ALIAS lib_smartdof2)
+
+if (${MCU_NAME} MATCHES "(^PIC18F(.+)[KQ]4[23]$)|(^PIC32(.+)$)")
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_1")
+else()
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_2")
+endif()
+
+target_compile_definitions(lib_smartdof2 PUBLIC ${sample_mode_reg_case})
+
+
+target_include_directories(lib_smartdof2 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_smartdof2 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_smartdof2 PUBLIC MikroSDK.Driver)
+
diff --git a/clicks/smartdof2/lib_smartdof2/include/Click.SmartDOF2 b/clicks/smartdof2/lib_smartdof2/include/Click.SmartDOF2
new file mode 100644
index 0000000000..a15e9795dc
--- /dev/null
+++ b/clicks/smartdof2/lib_smartdof2/include/Click.SmartDOF2
@@ -0,0 +1 @@
+#include "smartdof2.h"
diff --git a/clicks/smartdof2/lib_smartdof2/include/smartdof2.h b/clicks/smartdof2/lib_smartdof2/include/smartdof2.h
new file mode 100644
index 0000000000..63c1ec3867
--- /dev/null
+++ b/clicks/smartdof2/lib_smartdof2/include/smartdof2.h
@@ -0,0 +1,838 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file smartdof2.h
+ * @brief This file contains API for Smart DOF 2 Click Driver.
+ */
+
+#ifndef SMARTDOF2_H
+#define SMARTDOF2_H
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_i2c_master.h"
+#include "drv_spi_master.h"
+#include "spi_specifics.h"
+
+/*!
+ * @addtogroup smartdof2 Smart DOF 2 Click Driver
+ * @brief API for configuring and manipulating Smart DOF 2 Click driver.
+ * @{
+ */
+
+/**
+ * @defgroup smartdof2_reg Smart DOF 2 Registers List
+ * @brief List of registers of Smart DOF 2 Click driver.
+ */
+
+/**
+ * @addtogroup smartdof2_reg
+ * @{
+ */
+
+/**
+ * @brief Smart DOF 2 description register.
+ * @details Specified register for description of Smart DOF 2 Click driver.
+ */
+#define SMARTDOF2_REG_FUNC_CFG_ACCESS 0x01
+#define SMARTDOF2_REG_PIN_CTRL 0x02
+#define SMARTDOF2_REG_IF_CFG 0x03
+#define SMARTDOF2_REG_S4S_TPH_L 0x04
+#define SMARTDOF2_REG_S4S_TPH_H 0x05
+#define SMARTDOF2_REG_S4S_RR 0x06
+#define SMARTDOF2_REG_FIFO_CTRL1 0x07
+#define SMARTDOF2_REG_FIFO_CTRL2 0x08
+#define SMARTDOF2_REG_FIFO_CTRL3 0x09
+#define SMARTDOF2_REG_FIFO_CTRL4 0x0A
+#define SMARTDOF2_REG_COUNTER_BDR_REG1 0x0B
+#define SMARTDOF2_REG_COUNTER_BDR_REG2 0x0C
+#define SMARTDOF2_REG_INT1_CTRL 0x0D
+#define SMARTDOF2_REG_INT2_CTRL 0x0E
+#define SMARTDOF2_REG_WHO_AM_I 0x0F
+#define SMARTDOF2_REG_CTRL1 0x10
+#define SMARTDOF2_REG_CTRL2 0x11
+#define SMARTDOF2_REG_CTRL3 0x12
+#define SMARTDOF2_REG_CTRL4 0x13
+#define SMARTDOF2_REG_CTRL5 0x14
+#define SMARTDOF2_REG_CTRL6 0x15
+#define SMARTDOF2_REG_CTRL7 0x16
+#define SMARTDOF2_REG_CTRL8 0x17
+#define SMARTDOF2_REG_CTRL9 0x18
+#define SMARTDOF2_REG_CTRL10 0x19
+#define SMARTDOF2_REG_CTRL_STATUS 0x1A
+#define SMARTDOF2_REG_FIFO_STATUS1 0x1B
+#define SMARTDOF2_REG_FIFO_STATUS2 0x1C
+#define SMARTDOF2_REG_ALL_INT_SRC 0x1D
+#define SMARTDOF2_REG_STATUS_REG 0x1E
+#define SMARTDOF2_REG_OUT_TEMP_L 0x20
+#define SMARTDOF2_REG_OUT_TEMP_H 0x21
+#define SMARTDOF2_REG_OUTX_L_G 0x22
+#define SMARTDOF2_REG_OUTX_H_G 0x23
+#define SMARTDOF2_REG_OUTY_L_G 0x24
+#define SMARTDOF2_REG_OUTY_H_G 0x25
+#define SMARTDOF2_REG_OUTZ_L_G 0x26
+#define SMARTDOF2_REG_OUTZ_H_G 0x27
+#define SMARTDOF2_REG_OUTX_L_A 0x28
+#define SMARTDOF2_REG_OUTX_H_A 0x29
+#define SMARTDOF2_REG_OUTY_L_A 0x2A
+#define SMARTDOF2_REG_OUTY_H_A 0x2B
+#define SMARTDOF2_REG_OUTZ_L_A 0x2C
+#define SMARTDOF2_REG_OUTZ_H_A 0x2D
+#define SMARTDOF2_REG_UI_OUTX_L_G_OIS_EIS 0x2E
+#define SMARTDOF2_REG_UI_OUTX_H_G_OIS_EIS 0x2F
+#define SMARTDOF2_REG_UI_OUTY_L_G_OIS_EIS 0x30
+#define SMARTDOF2_REG_UI_OUTY_H_G_OIS_EIS 0x31
+#define SMARTDOF2_REG_UI_OUTZ_L_G_OIS_EIS 0x32
+#define SMARTDOF2_REG_UI_OUTZ_H_G_OIS_EIS 0x33
+#define SMARTDOF2_REG_UI_OUTX_L_A_OIS_DUALC 0x34
+#define SMARTDOF2_REG_UI_OUTX_H_A_OIS_DUALC 0x35
+#define SMARTDOF2_REG_UI_OUTY_L_A_OIS_DUALC 0x36
+#define SMARTDOF2_REG_UI_OUTY_H_A_OIS_DUALC 0x37
+#define SMARTDOF2_REG_UI_OUTZ_L_A_OIS_DUALC 0x38
+#define SMARTDOF2_REG_UI_OUTZ_H_A_OIS_DUALC 0x39
+#define SMARTDOF2_REG_AH_QVAR_OUT_L 0x3A
+#define SMARTDOF2_REG_AH_QVAR_OUT_H 0x3B
+#define SMARTDOF2_REG_TIMESTAMP0 0x40
+#define SMARTDOF2_REG_TIMESTAMP1 0x41
+#define SMARTDOF2_REG_TIMESTAMP2 0x42
+#define SMARTDOF2_REG_TIMESTAMP3 0x43
+#define SMARTDOF2_REG_UI_STATUS_REG_OIS 0x44
+#define SMARTDOF2_REG_WAKE_UP_SRC 0x45
+#define SMARTDOF2_REG_TAP_SRC 0x46
+#define SMARTDOF2_REG_D6D_SRC 0x47
+#define SMARTDOF2_REG_STATUS_MASTER_MAINPAGE 0x48
+#define SMARTDOF2_REG_EMB_FUNC_STATUS_MAINPAGE 0x49
+#define SMARTDOF2_REG_FSM_STATUS_MAINPAGE 0x4A
+#define SMARTDOF2_REG_MLC_STATUS_MAINPAGE 0x4B
+#define SMARTDOF2_REG_INTERNAL_FREQ 0x4F
+#define SMARTDOF2_REG_FUNCTIONS_ENABLE 0x50
+#define SMARTDOF2_REG_DEN 0x51
+#define SMARTDOF2_REG_INACTIVITY_DUR 0x54
+#define SMARTDOF2_REG_INACTIVITY_THS 0x55
+#define SMARTDOF2_REG_TAP_CFG0 0x56
+#define SMARTDOF2_REG_TAP_CFG1 0x57
+#define SMARTDOF2_REG_TAP_CFG2 0x58
+#define SMARTDOF2_REG_TAP_THS_6D 0x59
+#define SMARTDOF2_REG_INT_DUR2 0x5A
+#define SMARTDOF2_REG_WAKE_UP_THS 0x5B
+#define SMARTDOF2_REG_WAKE_UP_DUR 0x5C
+#define SMARTDOF2_REG_FREE_FALL 0x5D
+#define SMARTDOF2_REG_MD1_CFG 0x5E
+#define SMARTDOF2_REG_MD2_CFG 0x5F
+#define SMARTDOF2_REG_S4S_ST_CMD_CODE 0x60
+#define SMARTDOF2_REG_S4S_DT_REG 0x61
+#define SMARTDOF2_REG_EMB_FUNC_CFG 0x63
+#define SMARTDOF2_REG_UI_HANDSHAKE_CTRL 0x64
+#define SMARTDOF2_REG_UI_SPI2_SHARED_0 0x65
+#define SMARTDOF2_REG_UI_SPI2_SHARED_1 0x66
+#define SMARTDOF2_REG_UI_SPI2_SHARED_2 0x67
+#define SMARTDOF2_REG_UI_SPI2_SHARED_3 0x68
+#define SMARTDOF2_REG_UI_SPI2_SHARED_4 0x69
+#define SMARTDOF2_REG_UI_SPI2_SHARED_5 0x6A
+#define SMARTDOF2_REG_CTRL_EIS 0x6B
+#define SMARTDOF2_REG_UI_INT_OIS 0x6F
+#define SMARTDOF2_REG_UI_CTRL1_OIS 0x70
+#define SMARTDOF2_REG_UI_CTRL2_OIS 0x71
+#define SMARTDOF2_REG_UI_CTRL3_OIS 0x72
+#define SMARTDOF2_REG_X_OFS_USR 0x73
+#define SMARTDOF2_REG_Y_OFS_USR 0x74
+#define SMARTDOF2_REG_Z_OFS_USR 0x75
+#define SMARTDOF2_REG_FIFO_DATA_OUT_TAG 0x78
+#define SMARTDOF2_REG_FIFO_DATA_OUT_X_L 0x79
+#define SMARTDOF2_REG_FIFO_DATA_OUT_X_H 0x7A
+#define SMARTDOF2_REG_FIFO_DATA_OUT_Y_L 0x7B
+#define SMARTDOF2_REG_FIFO_DATA_OUT_Y_H 0x7C
+#define SMARTDOF2_REG_FIFO_DATA_OUT_Z_L 0x7D
+#define SMARTDOF2_REG_FIFO_DATA_OUT_Z_H 0x7E
+
+
+/*! @} */ // smartdof2_reg
+
+/**
+ * @defgroup smartdof2_set Smart DOF 2 Registers Settings
+ * @brief Settings for registers of Smart DOF 2 Click driver.
+ */
+
+/**
+ * @addtogroup smartdof2_set
+ * @{
+ */
+
+/**
+ * @brief Smart DOF 2 SMARTDOF2_REG_WHO_AM_I register value.
+ * @details Specified SMARTDOF2_REG_WHO_AM_I register value for description of Smart DOF 2 Click driver.
+ */
+#define SMARTDOF2_DEVICE_ID 0x70
+
+/**
+ * @brief Smart DOF 2 SMARTDOF2_REG_CTRL3 register value.
+ * @details Specified SMARTDOF2_REG_CTRL3 register value for description of Smart DOF 2 Click driver.
+ */
+#define SMARTDOF2_IF_INC_DISABLE 0x00
+#define SMARTDOF2_IF_INC_ENABLE 0x04
+#define SMARTDOF2_IF_INC_BIT_MASK 0xFB
+#define SMARTDOF2_BDU_DISABLE 0x00
+#define SMARTDOF2_BDU_ENABLE 0x40
+#define SMARTDOF2_BDU_BIT_MASK 0xBF
+
+/**
+ * @brief Smart DOF 2 SMARTDOF2_REG_FIFO_CTRL4 register value.
+ * @details Specified SMARTDOF2_REG_FIFO_CTRL4 register value for description of Smart DOF 2 Click driver.
+ */
+#define SMARTDOF2_FIFO_MODE_BYPASS 0x00
+#define SMARTDOF2_FIFO_MODE_FIFO 0x01
+#define SMARTDOF2_FIFO_MODE_STREAM_WTM_TO_FULL 0x02
+#define SMARTDOF2_FIFO_MODE_STREAM_TO_FIFO 0x03
+#define SMARTDOF2_FIFO_MODE_BYPASS_TO_STREAM 0x04
+#define SMARTDOF2_FIFO_MODE_STREAM 0x06
+#define SMARTDOF2_FIFO_MODE_BYPASS_TO_FIFO 0x07
+#define SMARTDOF2_FIFO_MODE_BIT_MASK 0xF8
+
+/**
+ * @brief Smart DOF 2 SMARTDOF2_REG_CTRL1 register value.
+ * @details Specified SMARTDOF2_REG_CTRL1 register value for description of Smart DOF 2 Click driver.
+ */
+#define SMARTDOF2_ODR_OFF 0x00
+#define SMARTDOF2_ODR_AT_1Hz875 0x01
+#define SMARTDOF2_ODR_AT_7Hz5 0x02
+#define SMARTDOF2_ODR_AT_15Hz 0x03
+#define SMARTDOF2_ODR_AT_30Hz 0x04
+#define SMARTDOF2_ODR_AT_60Hz 0x05
+#define SMARTDOF2_ODR_AT_120Hz 0x06
+#define SMARTDOF2_ODR_AT_240Hz 0x07
+#define SMARTDOF2_ODR_AT_480Hz 0x08
+#define SMARTDOF2_ODR_AT_960Hz 0x09
+#define SMARTDOF2_ODR_AT_1920Hz 0x0A
+#define SMARTDOF2_ODR_AT_3840Hz 0x0B
+#define SMARTDOF2_ODR_AT_7680Hz 0x0C
+#define SMARTDOF2_ODR_BIT_MASK 0xF0
+
+/**
+ * @brief Smart DOF 2 SMARTDOF2_REG_CTRL2/8 register value.
+ * @details Specified SMARTDOF2_REG_CTRL2/8 register value for description of Smart DOF 2 Click driver.
+ */
+#define SMARTDOF2_XL_FULL_SCALE_2g 0x00
+#define SMARTDOF2_XL_FULL_SCALE_4g 0x01
+#define SMARTDOF2_XL_FULL_SCALE_8g 0x02
+#define SMARTDOF2_XL_FULL_SCALE_16g 0x03
+#define SMARTDOF2_XL_FULL_SCALE_BIT_MASK 0xF8
+
+/**
+ * @brief Smart DOF 2 SMARTDOF2_REG_CTRL6 register value.
+ * @details Specified SMARTDOF2_REG_CTRL6 register value for description of Smart DOF 2 Click driver.
+ */
+#define SMARTDOF2_GY_FULL_SCALE_125dps 0x00
+#define SMARTDOF2_GY_FULL_SCALE_250dps 0x01
+#define SMARTDOF2_GY_FULL_SCALE_500dps 0x02
+#define SMARTDOF2_GY_FULL_SCALE_1000dps 0x03
+#define SMARTDOF2_GY_FULL_SCALE_2000dps 0x04
+#define SMARTDOF2_GY_FULL_SCALE_4000dps 0x0C
+#define SMARTDOF2_GY_FULL_SCALE_BIT_MASK 0xF0
+
+/**
+ * @brief Smart DOF 2 accel sensitivity data value.
+ * @details Specified accelerometer sensitivity value for description of Smart DOF 2 Click driver.
+ */
+#define SMARTDOF2_ACC_SENSITIVITY_FS_2g 0.061
+#define SMARTDOF2_ACC_SENSITIVITY_FS_4g 0.122
+#define SMARTDOF2_ACC_SENSITIVITY_FS_8g 0.244
+#define SMARTDOF2_ACC_SENSITIVITY_FS_16g 0.488
+
+/**
+ * @brief Smart DOF 2 gyro sensitivity data value.
+ * @details Specified gyroscope sensitivity value for description of Smart DOF 2 Click driver.
+ */
+#define SMARTDOF2_GYRO_SENSITIVITY_FS_125dps 4.375
+#define SMARTDOF2_GYRO_SENSITIVITY_FS_250dps 8.750
+#define SMARTDOF2_GYRO_SENSITIVITY_FS_500dps 17.500
+#define SMARTDOF2_GYRO_SENSITIVITY_FS_1000dps 35.000
+#define SMARTDOF2_GYRO_SENSITIVITY_FS_2000dps 70.000
+#define SMARTDOF2_GYRO_SENSITIVITY_FS_4000dps 140.000
+
+/**
+ * @brief Smart DOF 2 device address setting.
+ * @details Specified setting for device slave address selection of
+ * Smart DOF 2 Click driver.
+ */
+#define SMARTDOF2_DEVICE_ADDRESS_GND 0x6A
+#define SMARTDOF2_DEVICE_ADDRESS_VCC 0x6B
+
+/**
+ * @brief Data sample selection.
+ * @details This macro sets data samples for SPI modules.
+ * @note Available only on Microchip PIC family devices.
+ * This macro will set data sampling for all SPI modules on MCU.
+ * Can be overwritten with @b smartdof2_init which will set
+ * @b SET_SPI_DATA_SAMPLE_MIDDLE by default on the mapped mikrobus.
+ */
+#define SMARTDOF2_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
+#define SMARTDOF2_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
+
+/*! @} */ // smartdof2_set
+
+/**
+ * @defgroup smartdof2_map Smart DOF 2 MikroBUS Map
+ * @brief MikroBUS pin mapping of Smart DOF 2 Click driver.
+ */
+
+/**
+ * @addtogroup smartdof2_map
+ * @{
+ */
+
+/**
+ * @brief MikroBUS pin mapping.
+ * @details Mapping pins of Smart DOF 2 Click to the selected MikroBUS.
+ */
+#define SMARTDOF2_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
+ cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
+ cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
+ cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
+ cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
+ cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
+ cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
+
+/*! @} */ // smartdof2_map
+/*! @} */ // smartdof2
+
+/**
+ * @brief Smart DOF 2 Click driver selector.
+ * @details Selects target driver interface of Smart DOF 2 Click driver.
+ */
+typedef enum
+{
+ SMARTDOF2_DRV_SEL_SPI, /**< SPI driver descriptor. */
+ SMARTDOF2_DRV_SEL_I2C /**< I2C driver descriptor. */
+
+} smartdof2_drv_t;
+
+/**
+ * @brief Smart DOF 2 Click driver interface.
+ * @details Definition of driver interface of Smart DOF 2 Click driver.
+ */
+typedef err_t ( *smartdof2_master_io_t )( struct smartdof2_s*, uint8_t, uint8_t*, uint8_t ); /**< Driver serial interface. */
+
+/**
+ * @brief Smart DOF 2 Click context object.
+ * @details Context object definition of Smart DOF 2 Click driver.
+ */
+typedef struct smartdof2_s
+{
+ digital_in_t int_pin; /**< Interrupt pin. */
+
+ i2c_master_t i2c; /**< I2C driver object. */
+ spi_master_t spi; /**< SPI driver object. */
+
+ uint8_t slave_address; /**< Device slave address (used for I2C driver). */
+ pin_name_t chip_select; /**< Chip select pin descriptor (used for SPI driver). */
+ smartdof2_drv_t drv_sel; /**< Master driver interface selector. */
+
+ smartdof2_master_io_t write_f; /**< Master write function. */
+ smartdof2_master_io_t read_f; /**< Master read function. */
+
+} smartdof2_t;
+
+/**
+ * @brief Smart DOF 2 Click configuration object.
+ * @details Configuration object definition of Smart DOF 2 Click driver.
+ */
+typedef struct
+{
+ pin_name_t scl; /**< Clock pin descriptor for I2C driver. */
+ pin_name_t sda; /**< Bidirectional data pin descriptor for I2C driver. */
+ pin_name_t miso; /**< Master input - slave output pin descriptor for SPI driver. */
+ pin_name_t mosi; /**< Master output - slave input pin descriptor for SPI driver. */
+ pin_name_t sck; /**< Clock pin descriptor for SPI driver. */
+ pin_name_t cs; /**< Chip select pin descriptor for SPI driver. */
+ pin_name_t int_pin; /**< Interrupt pin. */
+
+ uint32_t i2c_speed; /**< I2C serial speed. */
+ uint8_t i2c_address; /**< I2C slave address. */
+
+ uint32_t spi_speed; /**< SPI serial speed. */
+ spi_master_mode_t spi_mode; /**< SPI master mode. */
+ spi_master_chip_select_polarity_t cs_polarity; /**< Chip select pin polarity. */
+
+ smartdof2_drv_t drv_sel; /**< Master driver interface selector. */
+
+} smartdof2_cfg_t;
+
+/**
+ * @brief Smart DOF 2 Click axis raw data structure object.
+ * @details Axis raw data object definition of Smart DOF 2 Click driver.
+ */
+typedef struct
+{
+ int16_t x;
+ int16_t y;
+ int16_t z;
+
+} smartdof2_axis_data_t;
+
+/**
+ * @brief Smart DOF 2 Click sensor axes structure object.
+ * @details Sensor axes object definition of Smart DOF 2 Click driver.
+ */
+typedef struct
+{
+ float x;
+ float y;
+ float z;
+
+} smartdof2_axis_t;
+
+/**
+ * @brief Smart DOF 2 Click return value data.
+ * @details Predefined enum values for driver return values.
+ */
+typedef enum
+{
+ SMARTDOF2_OK = 0,
+ SMARTDOF2_ERROR = -1
+
+} smartdof2_return_value_t;
+
+/*!
+ * @addtogroup smartdof2 Smart DOF 2 Click Driver
+ * @brief API for configuring and manipulating Smart DOF 2 Click driver.
+ * @{
+ */
+
+/**
+ * @brief Smart DOF 2 configuration object setup function.
+ * @details This function initializes click configuration structure to initial
+ * values.
+ * @param[out] cfg : Click configuration structure.
+ * See #smartdof2_cfg_t object definition for detailed explanation.
+ * @return Nothing.
+ * @note The all used pins will be set to unconnected state.
+ */
+void smartdof2_cfg_setup ( smartdof2_cfg_t *cfg );
+
+/**
+ * @brief Smart DOF 2 driver interface setup function.
+ * @details This function sets a serial driver interface which will be used
+ * further in the click driver.
+ * @param[out] cfg : Click configuration structure.
+ * See #smartdof2_cfg_t object definition for detailed explanation.
+ * @param[in] drv_sel : Driver interface selection.
+ * See #smartdof2_drv_t object definition for detailed explanation.
+ * @return Nothing.
+ * @note This driver selection should be call before init function to configure
+ * the driver to work with the serial interface which is consistent with the
+ * real state of the hardware. If this function is not called, the default
+ * driver interface will be set.
+ */
+void smartdof2_drv_interface_selection ( smartdof2_cfg_t *cfg, smartdof2_drv_t drv_sel );
+
+/**
+ * @brief Smart DOF 2 initialization function.
+ * @details This function initializes all necessary pins and peripherals used
+ * for this click board.
+ * @param[out] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[in] cfg : Click configuration structure.
+ * See #smartdof2_cfg_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_init ( smartdof2_t *ctx, smartdof2_cfg_t *cfg );
+
+/**
+ * @brief Smart DOF 2 default configuration function.
+ * @details This function executes a default configuration of Smart DOF 2
+ * click board.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note This function can consist any necessary configuration or setting to put
+ * device into operating mode.
+ */
+err_t smartdof2_default_cfg ( smartdof2_t *ctx );
+
+/**
+ * @brief Smart DOF 2 data writing function.
+ * @details This function writes a desired number of data bytes starting from
+ * the selected register.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[in] reg : Start register address.
+ * @param[in] data_in : Data to be written.
+ * @param[in] len : Number of bytes to be written.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_generic_write ( smartdof2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len );
+
+/**
+ * @brief Smart DOF 2 data reading function.
+ * @details This function reads a desired number of data bytes starting from
+ * the selected register.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[in] reg : Start register address.
+ * @param[out] data_out : Output read data.
+ * @param[in] len : Number of bytes to be read.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_generic_read ( smartdof2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len );
+
+/**
+ * @brief Smart DOF 2 get device ID function.
+ * @details This function reads a device ID value
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[out] device_id : Device ID.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_get_device_id ( smartdof2_t *ctx, uint8_t *device_id );
+
+/**
+ * @brief Smart DOF 2 enable auto increment function.
+ * @details This function enable automatically incremented during
+ * a multiple byte access with a serial interface
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_enable_auto_increment ( smartdof2_t *ctx );
+
+/**
+ * @brief Smart DOF 2 enable block data update function.
+ * @details This function enable block data,
+ * output registers are not updated until LSB and MSB have been read,
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_enable_block_data_update ( smartdof2_t *ctx );
+
+/**
+ * @brief Smart DOF 2 set FIFO mode function.
+ * @details This function selects the FIFO mode
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[in] fifo_mode : FIFO mode selection
+ * @li @c 0x00 (SMARTDOF2_FIFO_MODE_BYPASS) - Bypass mode, FIFO disabled,
+ * @li @c 0x01 (SMARTDOF2_FIFO_MODE_FIFO) - FIFO mode,
+ * @li @c 0x02 (SMARTDOF2_FIFO_MODE_STREAM_WTM_TO_FULL) - ContinuousWTM,
+ * @li @c 0x03 (SMARTDOF2_FIFO_MODE_STREAM_TO_FIFO) - Continuous-to-FIFO mode,
+ * @li @c 0x04 (SMARTDOF2_FIFO_MODE_BYPASS_TO_STREAM) - Bypass-to-continuous mode,
+ * @li @c 0x06 (SMARTDOF2_FIFO_MODE_STREAM) - Continuous mode,
+ * @li @c 0x07 (SMARTDOF2_FIFO_MODE_BYPASS_TO_FIFO) - Bypass-to-FIFO mode.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_set_fifo_mode ( smartdof2_t *ctx, uint8_t fifo_mode );
+
+/**
+ * @brief Smart DOF 2 set accel data rate function.
+ * @details This function selects the accelerometer data rate
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[in] data_rate : Accelerometer ODR selection
+ * @li @c 0x00 (SMARTDOF2_ODR_OFF) - Power-down,
+ * @li @c 0x01 (SMARTDOF2_ODR_AT_1Hz875) - 1.875 Hz (low-power mode),
+ * @li @c 0x02 (SMARTDOF2_ODR_AT_7Hz5) - 7.5Hz (high-performance, normal mode),
+ * @li @c 0x03 (SMARTDOF2_ODR_AT_15Hz) - 15Hz (low-power, high-performance, normal mode),
+ * @li @c 0x04 (SMARTDOF2_ODR_AT_30Hz) - 30Hz (low-power, high-performance, normal mode),
+ * @li @c 0x05 (SMARTDOF2_ODR_AT_60Hz) - 60Hz (low-power, high-performance, normal mode),
+ * @li @c 0x06 (SMARTDOF2_ODR_AT_120Hz) - 120Hz (low-power, high-performance, normal mode),
+ * @li @c 0x07 (SMARTDOF2_ODR_AT_120Hz) - 240Hz (low-power, high-performance, normal mode),
+ * @li @c 0x08 (SMARTDOF2_ODR_AT_120Hz) - 480Hz (high-performance, normal mode),
+ * @li @c 0x09 (SMARTDOF2_ODR_AT_120Hz) - 960Hz (high-performance, normal mode),
+ * @li @c 0x0A (SMARTDOF2_ODR_AT_120Hz) - 1.92kHz (high-performance, normal mode),
+ * @li @c 0x0B (SMARTDOF2_ODR_AT_120Hz) - 3.84kHz (high-performance mode),
+ * @li @c 0x0C (SMARTDOF2_ODR_AT_120Hz) - 7.68kHz (high-performance mode).
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_set_acc_data_rate ( smartdof2_t *ctx, uint8_t data_rate );
+
+/**
+ * @brief Smart DOF 2 get full-scale accel range function.
+ * @details This function reads selected the full-scale acceleration range
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[out] data_scale : Accelerometer full-scale selection.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_get_acc_full_scale ( smartdof2_t *ctx, uint8_t *data_scale );
+
+/**
+ * @brief Smart DOF 2 set full-scale accel range function.
+ * @details This function selects the full-scale acceleration range
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[in] data_scale : Accelerometer full-scale selection
+ * @li @c 0x00 (SMARTDOF2_XL_FULL_SCALE_2g) - ±2g,
+ * @li @c 0x01 (SMARTDOF2_XL_FULL_SCALE_4g) - ±4g,
+ * @li @c 0x02 (SMARTDOF2_XL_FULL_SCALE_8g) - ±8g,
+ * @li @c 0x03 (SMARTDOF2_XL_FULL_SCALE_16g) - ±16g.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_set_acc_full_scale ( smartdof2_t *ctx, uint8_t data_scale );
+
+/**
+ * @brief Smart DOF 2 set gyro data rate function.
+ * @details This function selects the gyroscope data rate
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[in] data_rate : Accelerometer full-scale selection
+ * @li @c 0x00 (SMARTDOF2_XL_FULL_SCALE_2g) - ±2g,
+ * @li @c 0x01 (SMARTDOF2_XL_FULL_SCALE_4g) - ±4g,
+ * @li @c 0x02 (SMARTDOF2_XL_FULL_SCALE_8g) - ±8g,
+ * @li @c 0x03 (SMARTDOF2_XL_FULL_SCALE_16g) - ±16g.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_set_gyro_data_rate ( smartdof2_t *ctx, uint8_t data_rate );
+
+/**
+ * @brief Smart DOF 2 get full-scale gyro range function.
+ * @details This function reads selected the full-scale gyroscope range
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[out] data_scale : Gyroscope full-scale selection.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_get_gyro_full_scale ( smartdof2_t *ctx, uint8_t *data_scale );
+
+/**
+ * @brief Smart DOF 2 set full-scale gyro range function.
+ * @details This function selects the full-scale gyroscope range
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[in] data_scale : Accelerometer full-scale selection
+ * @li @c 0x00 (SMARTDOF2_XL_FULL_SCALE_2g) - ±2g,
+ * @li @c 0x01 (SMARTDOF2_XL_FULL_SCALE_4g) - ±4g,
+ * @li @c 0x02 (SMARTDOF2_XL_FULL_SCALE_8g) - ±8g,
+ * @li @c 0x03 (SMARTDOF2_XL_FULL_SCALE_16g) - ±16g.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_set_gyro_full_scale ( smartdof2_t *ctx, uint8_t data_scale );
+
+/**
+ * @brief Smart DOF 2 get accel data function.
+ * @details This function reads the accelerometer raw data
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[out] acc_axis : Accelerometer raw data object.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_get_acc_axis_data ( smartdof2_t *ctx, smartdof2_axis_data_t *acc_axis );
+
+/**
+ * @brief Smart DOF 2 get gyro data function.
+ * @details This function reads the gyroscope raw data
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[out] gyro_axis : Gyroscope raw data object.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_get_gyro_axis_data ( smartdof2_t *ctx, smartdof2_axis_data_t *gyro_axis );
+
+/**
+ * @brief Smart DOF 2 get accel sensitivity function.
+ * @details This function reads the accelerometer sensitivity data
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[out] sensitivity : Accelerometer sensitivity data.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_get_acc_sensitivity ( smartdof2_t *ctx, float *sensitivity );
+
+/**
+ * @brief Smart DOF 2 get gyro sensitivity function.
+ * @details This function reads the gyroscope sensitivity data
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[out] sensitivity : Gyroscope sensitivity data.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_get_gyro_sensitivity ( smartdof2_t *ctx, float *sensitivity );
+
+/**
+ * @brief Smart DOF 2 get accel sensor axes function.
+ * @details This function reads the accelerometer sensor axes data
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[out] acc_axis : Linear acceleration output data object (mg).
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_get_acc_axis ( smartdof2_t *ctx, smartdof2_axis_t *acc_axis );
+
+/**
+ * @brief Smart DOF 2 get gyro sensor axes function.
+ * @details This function reads the gyroscope sensor axes data
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[out] gyro_axis : Angular rate output data object (dps).
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_get_gyro_axis ( smartdof2_t *ctx, smartdof2_axis_t *gyro_axis );
+
+/**
+ * @brief Smart DOF 2 get temperature data function.
+ * @details This function reads the temperature raw data
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[out] temp_raw : Temperature raw data (16-bit word in two’s complement).
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t smartdof2_get_temperature_raw ( smartdof2_t *ctx, int16_t *temp_raw );
+
+/**
+ * @brief Smart DOF 2 get temperature function.
+ * @details This function reads the temperature data
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[out] temperature : Temperature (degrees Celsius).
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note Typical specifications are not guaranteed.
+ * The output of the temperature sensor is 0 LSB (typ.) at 25 °C.
+ */
+err_t smartdof2_get_temperature ( smartdof2_t *ctx, float *temperature );
+
+/**
+ * @brief Smart DOF 2 get interrupt function.
+ * @details This function get states of the Interrupt ( INT ) pin
+ * of the LSM6DSV16X, High-performance 6-axis IMU with sensor fusion, ASC, MLC, Qvar, OIS/EIS paths
+ * on the Smart DOF 2 click board™.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @return @li @c 0 - Low pin state,
+ * @li @c 1 - High pin state.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+uint8_t smartdof2_get_int_pin ( smartdof2_t *ctx );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // SMARTDOF2_H
+
+/*! @} */ // smartdof2
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/smartdof2/lib_smartdof2/include/spi_specifics.h b/clicks/smartdof2/lib_smartdof2/include/spi_specifics.h
new file mode 100644
index 0000000000..0bba508c77
--- /dev/null
+++ b/clicks/smartdof2/lib_smartdof2/include/spi_specifics.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+** Copyright (C) 2021 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+/*!
+ * @file spi_specifics.h
+ * @brief This file contains SPI specific macros, functions, etc.
+ */
+
+#ifndef _SPI_SPECIFICS_
+#define _SPI_SPECIFICS_
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+#include "mcu_definitions.h"
+
+// mikroE toolchain specific
+#if defined(__MIKROC_AI_FOR_PIC__) || defined (__MIKROC_AI_FOR_DSPIC__) || \
+ defined(__MIKROC_AI_FOR_PIC32__)
+
+#ifdef __MIKROC_AI_FOR_PIC__
+ #define BIT_INDEX 7
+#elif defined(__MIKROC_AI_FOR_PIC32__)
+ #define BIT_INDEX 9
+#endif
+
+#ifdef SAMPLE_REG_CASE_1
+ #ifdef __MIKROC_AI_FOR_PIC32__
+ #define SAMPLE_REG_ADDRESS(index) HAL_LL_SPI ## index ## CON_ADDRESS
+ #else
+ #define SAMPLE_REG_ADDRESS(index) HAL_LL_SPI ## index ## CON1_ADDRESS
+ #endif
+#else
+ #define SAMPLE_REG_ADDRESS(index) HAL_LL_SSP ## index ## STAT_ADDRESS
+#endif
+
+#if defined(SPI_MODULE) || defined(SPI_MODULE_1)
+ #define SET_SPI_DATA_SAMPLE_MIDDLE1 clear_reg_bit(SAMPLE_REG_ADDRESS(1), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE1 set_reg_bit(SAMPLE_REG_ADDRESS(1), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE1
+ #define SET_SPI_DATA_SAMPLE_EDGE1
+#endif
+
+#ifdef SPI_MODULE_2
+ #define SET_SPI_DATA_SAMPLE_MIDDLE2 clear_reg_bit(SAMPLE_REG_ADDRESS(2), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE2 set_reg_bit(SAMPLE_REG_ADDRESS(2), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE2
+ #define SET_SPI_DATA_SAMPLE_EDGE2
+#endif
+
+#ifdef SPI_MODULE_3
+ #define SET_SPI_DATA_SAMPLE_MIDDLE3 clear_reg_bit(SAMPLE_REG_ADDRESS(3), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE3 set_reg_bit(SAMPLE_REG_ADDRESS(3), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE3
+ #define SET_SPI_DATA_SAMPLE_EDGE3
+#endif
+
+#ifdef SPI_MODULE_4
+ #define SET_SPI_DATA_SAMPLE_MIDDLE4 clear_reg_bit(SAMPLE_REG_ADDRESS(4), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE4 set_reg_bit(SAMPLE_REG_ADDRESS(4), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE4
+ #define SET_SPI_DATA_SAMPLE_EDGE4
+#endif
+
+#ifdef SPI_MODULE_5
+ #define SET_SPI_DATA_SAMPLE_MIDDLE5 clear_reg_bit(SAMPLE_REG_ADDRESS(5), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE5 set_reg_bit(SAMPLE_REG_ADDRESS(5), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE5
+ #define SET_SPI_DATA_SAMPLE_EDGE5
+#endif
+
+#ifdef SPI_MODULE_6
+ #define SET_SPI_DATA_SAMPLE_MIDDLE6 clear_reg_bit(SAMPLE_REG_ADDRESS(6), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE6 set_reg_bit(SAMPLE_REG_ADDRESS(6), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE6
+ #define SET_SPI_DATA_SAMPLE_EDGE6
+#endif
+
+
+#define SET_SPI_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE1 SET_SPI_DATA_SAMPLE_MIDDLE2 \
+ SET_SPI_DATA_SAMPLE_MIDDLE3 SET_SPI_DATA_SAMPLE_MIDDLE4 \
+ SET_SPI_DATA_SAMPLE_MIDDLE5 SET_SPI_DATA_SAMPLE_MIDDLE6
+#define SET_SPI_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE1 SET_SPI_DATA_SAMPLE_EDGE2 \
+ SET_SPI_DATA_SAMPLE_EDGE3 SET_SPI_DATA_SAMPLE_EDGE4 \
+ SET_SPI_DATA_SAMPLE_EDGE5 SET_SPI_DATA_SAMPLE_EDGE6
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE
+ #define SET_SPI_DATA_SAMPLE_EDGE
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _SPI_SPECIFICS_
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/smartdof2/lib_smartdof2/src/smartdof2.c b/clicks/smartdof2/lib_smartdof2/src/smartdof2.c
new file mode 100644
index 0000000000..41b451df9a
--- /dev/null
+++ b/clicks/smartdof2/lib_smartdof2/src/smartdof2.c
@@ -0,0 +1,578 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file smartdof2.c
+ * @brief Smart DOF 2 Click Driver.
+ */
+
+#include "smartdof2.h"
+
+/**
+ * @brief Dummy data.
+ * @details Definition of dummy data.
+ */
+#define DUMMY 0x00
+#define SPI_READ_MASK 0x80
+
+/**
+ * @brief Temperature sensor characteristics values.
+ * @details Definition of temperature sensor characteristics values.
+ */
+#define SMARTDOF2_TEMP_SEN_LSB_C 256
+#define SMARTDOF2_TEMP_LSB_0 25
+
+/**
+ * @brief Smart DOF 2 I2C writing function.
+ * @details This function writes a desired number of data bytes starting from
+ * the selected register by using I2C serial interface.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[in] reg : Start register address.
+ * @param[in] data_in : Data to be written.
+ * @param[in] len : Number of bytes to be written.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+static err_t smartdof2_i2c_write ( smartdof2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len );
+
+/**
+ * @brief Smart DOF 2 I2C reading function.
+ * @details This function reads a desired number of data bytes starting from
+ * the selected register by using I2C serial interface.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[in] reg : Start register address.
+ * @param[out] data_out : Output read data.
+ * @param[in] len : Number of bytes to be read.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+static err_t smartdof2_i2c_read ( smartdof2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len );
+
+/**
+ * @brief Smart DOF 2 SPI writing function.
+ * @details This function writes a desired number of data bytes starting from
+ * the selected register by using SPI serial interface.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[in] reg : Start register address.
+ * @param[in] data_in : Data to be written.
+ * @param[in] len : Number of bytes to be written.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+static err_t smartdof2_spi_write ( smartdof2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len );
+
+/**
+ * @brief Smart DOF 2 SPI reading function.
+ * @details This function reads a desired number of data bytes starting from
+ * the selected register by using SPI serial interface.
+ * @param[in] ctx : Click context object.
+ * See #smartdof2_t object definition for detailed explanation.
+ * @param[in] reg : Start register address.
+ * @param[out] data_out : Output read data.
+ * @param[in] len : Number of bytes to be read.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+static err_t smartdof2_spi_read ( smartdof2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len );
+
+void smartdof2_cfg_setup ( smartdof2_cfg_t *cfg )
+{
+ cfg->scl = HAL_PIN_NC;
+ cfg->sda = HAL_PIN_NC;
+ cfg->sck = HAL_PIN_NC;
+ cfg->miso = HAL_PIN_NC;
+ cfg->mosi = HAL_PIN_NC;
+ cfg->cs = HAL_PIN_NC;
+ cfg->int_pin = HAL_PIN_NC;
+
+ cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD;
+ cfg->i2c_address = SMARTDOF2_DEVICE_ADDRESS_GND;
+
+ cfg->spi_speed = 100000;
+ cfg->spi_mode = SPI_MASTER_MODE_0;
+ cfg->cs_polarity = SPI_MASTER_CHIP_SELECT_POLARITY_ACTIVE_LOW;
+
+ cfg->drv_sel = SMARTDOF2_DRV_SEL_I2C;
+}
+
+void smartdof2_drv_interface_selection ( smartdof2_cfg_t *cfg, smartdof2_drv_t drv_sel )
+{
+ cfg->drv_sel = drv_sel;
+}
+
+err_t smartdof2_init ( smartdof2_t *ctx, smartdof2_cfg_t *cfg )
+{
+ ctx->drv_sel = cfg->drv_sel;
+
+ if ( SMARTDOF2_DRV_SEL_I2C == ctx->drv_sel )
+ {
+ i2c_master_config_t i2c_cfg;
+
+ i2c_master_configure_default( &i2c_cfg );
+
+ i2c_cfg.scl = cfg->scl;
+ i2c_cfg.sda = cfg->sda;
+ ctx->chip_select = cfg->cs;
+
+ spi_master_deselect_device( ctx->chip_select );
+
+ ctx->slave_address = cfg->i2c_address;
+
+ if ( I2C_MASTER_ERROR == i2c_master_open( &ctx->i2c, &i2c_cfg ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ if ( I2C_MASTER_ERROR == i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ if ( I2C_MASTER_ERROR == i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ ctx->read_f = smartdof2_i2c_read;
+ ctx->write_f = smartdof2_i2c_write;
+ }
+ else
+ {
+ spi_master_config_t spi_cfg;
+
+ spi_master_configure_default( &spi_cfg );
+
+ spi_cfg.sck = cfg->sck;
+ spi_cfg.miso = cfg->miso;
+ spi_cfg.mosi = cfg->mosi;
+
+ ctx->chip_select = cfg->cs;
+
+ if ( SPI_MASTER_ERROR == spi_master_open( &ctx->spi, &spi_cfg ) )
+ {
+ return SPI_MASTER_ERROR;
+ }
+
+ if ( SPI_MASTER_ERROR == spi_master_set_default_write_data( &ctx->spi, DUMMY ) )
+ {
+ return SPI_MASTER_ERROR;
+ }
+
+ if ( SPI_MASTER_ERROR == spi_master_set_mode( &ctx->spi, cfg->spi_mode ) )
+ {
+ return SPI_MASTER_ERROR;
+ }
+
+ if ( SPI_MASTER_ERROR == spi_master_set_speed( &ctx->spi, cfg->spi_speed ) )
+ {
+ return SPI_MASTER_ERROR;
+ }
+
+ spi_master_set_chip_select_polarity( cfg->cs_polarity );
+ spi_master_deselect_device( ctx->chip_select );
+
+ ctx->read_f = smartdof2_spi_read;
+ ctx->write_f = smartdof2_spi_write;
+ }
+
+ digital_in_init( &ctx->int_pin, cfg->int_pin );
+ return SMARTDOF2_OK;
+}
+
+err_t smartdof2_default_cfg ( smartdof2_t *ctx )
+{
+ uint8_t device_id;
+ err_t err_flag = smartdof2_get_device_id( ctx, &device_id );
+
+ if ( device_id == SMARTDOF2_DEVICE_ID )
+ {
+ // Enable register address automatically incremented during a
+ // multiple byte access with a serial interface.
+ err_flag |= smartdof2_enable_auto_increment( ctx );
+
+ // Enable BDU.
+ err_flag |= smartdof2_enable_block_data_update( ctx );
+
+ // FIFO mode selection.
+ err_flag |= smartdof2_set_fifo_mode( ctx, SMARTDOF2_FIFO_MODE_BYPASS );
+
+ // Output data rate selection - 120Hz.
+ err_flag |= smartdof2_set_acc_data_rate( ctx, SMARTDOF2_ODR_AT_120Hz );
+
+ // Full scale selection.
+ err_flag |= smartdof2_set_acc_full_scale( ctx, SMARTDOF2_XL_FULL_SCALE_2g );
+
+ // Output data rate selection - 120Hz.
+ err_flag |= smartdof2_set_gyro_data_rate( ctx, SMARTDOF2_ODR_AT_120Hz );
+
+ // Full scale selection - 2000dps.
+ err_flag |= smartdof2_set_gyro_full_scale( ctx, SMARTDOF2_GY_FULL_SCALE_2000dps );
+ }
+ else
+ {
+ err_flag = SMARTDOF2_ERROR;
+ }
+
+ return err_flag;
+}
+
+err_t smartdof2_generic_write ( smartdof2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len )
+{
+ return ctx->write_f( ctx, reg, data_in, len );
+}
+
+err_t smartdof2_generic_read ( smartdof2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len )
+{
+ return ctx->read_f( ctx, reg, data_out, len );
+}
+
+err_t smartdof2_get_device_id ( smartdof2_t *ctx, uint8_t *device_id )
+{
+ return smartdof2_generic_read( ctx, SMARTDOF2_REG_WHO_AM_I, device_id, 1 );
+}
+
+err_t smartdof2_enable_auto_increment ( smartdof2_t *ctx )
+{
+ uint8_t data_buf = DUMMY;
+ err_t err_flag = smartdof2_generic_read( ctx, SMARTDOF2_REG_CTRL3, &data_buf, 1 );
+ data_buf &= SMARTDOF2_IF_INC_BIT_MASK;
+ data_buf |= SMARTDOF2_IF_INC_ENABLE;
+ err_flag |= smartdof2_generic_write( ctx, SMARTDOF2_REG_CTRL3, &data_buf, 1 );
+ return err_flag;
+}
+
+err_t smartdof2_enable_block_data_update ( smartdof2_t *ctx )
+{
+ uint8_t data_buf = DUMMY;
+ err_t err_flag = smartdof2_generic_read( ctx, SMARTDOF2_REG_CTRL3, &data_buf, 1 );
+ data_buf &= SMARTDOF2_BDU_BIT_MASK;
+ data_buf |= SMARTDOF2_BDU_ENABLE;
+ err_flag |= smartdof2_generic_write( ctx, SMARTDOF2_REG_CTRL3, &data_buf, 1 );
+ return err_flag;
+}
+
+err_t smartdof2_set_fifo_mode ( smartdof2_t *ctx, uint8_t fifo_mode )
+{
+ uint8_t data_buf = DUMMY;
+ err_t err_flag = smartdof2_generic_read( ctx, SMARTDOF2_REG_FIFO_CTRL4, &data_buf, 1 );
+ data_buf &= SMARTDOF2_FIFO_MODE_BIT_MASK;
+ fifo_mode &= SMARTDOF2_FIFO_MODE_BYPASS_TO_FIFO;
+ data_buf |= fifo_mode;
+ err_flag |= smartdof2_generic_write( ctx, SMARTDOF2_REG_FIFO_CTRL4, &data_buf, 1 );
+ return err_flag;
+}
+
+err_t smartdof2_set_acc_data_rate ( smartdof2_t *ctx, uint8_t data_rate )
+{
+ uint8_t data_buf = DUMMY;
+ err_t err_flag = SMARTDOF2_OK;
+ if ( data_rate > SMARTDOF2_ODR_AT_7680Hz )
+ {
+ err_flag = SMARTDOF2_ERROR;
+ }
+ else
+ {
+ err_t err_flag = smartdof2_generic_read( ctx, SMARTDOF2_REG_CTRL1, &data_buf, 1 );
+ data_buf &= SMARTDOF2_ODR_BIT_MASK;
+ data_buf |= data_rate;
+ err_flag |= smartdof2_generic_write( ctx, SMARTDOF2_REG_CTRL1, &data_buf, 1 );
+ }
+ return err_flag;
+}
+
+err_t smartdof2_get_acc_full_scale ( smartdof2_t *ctx, uint8_t *data_scale )
+{
+ err_t err_flag = smartdof2_generic_read( ctx, SMARTDOF2_REG_CTRL8, data_scale, 1 );
+ *data_scale &= SMARTDOF2_XL_FULL_SCALE_BIT_MASK;
+ return err_flag;
+}
+
+err_t smartdof2_set_acc_full_scale ( smartdof2_t *ctx, uint8_t data_scale )
+{
+ uint8_t data_buf = DUMMY;
+ err_t err_flag = SMARTDOF2_OK;
+ if ( data_scale > SMARTDOF2_XL_FULL_SCALE_16g )
+ {
+ err_flag = SMARTDOF2_ERROR;
+ }
+ else
+ {
+ err_t err_flag = smartdof2_generic_read( ctx, SMARTDOF2_REG_CTRL8, &data_buf, 1 );
+ data_buf &= SMARTDOF2_XL_FULL_SCALE_BIT_MASK;
+ data_buf |= data_scale;
+ err_flag |= smartdof2_generic_write( ctx, SMARTDOF2_REG_CTRL8, &data_buf, 1 );
+ }
+ return err_flag;
+}
+
+err_t smartdof2_set_gyro_data_rate ( smartdof2_t *ctx, uint8_t data_rate )
+{
+ uint8_t data_buf = DUMMY;
+ err_t err_flag = SMARTDOF2_OK;
+ if ( data_rate > SMARTDOF2_ODR_AT_7680Hz )
+ {
+ err_flag = SMARTDOF2_ERROR;
+ }
+ else
+ {
+ err_t err_flag = smartdof2_generic_read( ctx, SMARTDOF2_REG_CTRL2, &data_buf, 1 );
+ data_buf &= SMARTDOF2_ODR_BIT_MASK;
+ data_buf |= data_rate;
+ err_flag |= smartdof2_generic_write( ctx, SMARTDOF2_REG_CTRL2, &data_buf, 1 );
+ }
+ return err_flag;
+}
+
+err_t smartdof2_get_gyro_full_scale ( smartdof2_t *ctx, uint8_t *data_scale )
+{
+ err_t err_flag = smartdof2_generic_read( ctx, SMARTDOF2_REG_CTRL6, data_scale, 1 );
+ *data_scale &= SMARTDOF2_GY_FULL_SCALE_BIT_MASK;
+ return err_flag;
+}
+
+err_t smartdof2_set_gyro_full_scale ( smartdof2_t *ctx, uint8_t data_scale )
+{
+ uint8_t data_buf = DUMMY;
+ err_t err_flag = SMARTDOF2_OK;
+ if ( data_scale > SMARTDOF2_GY_FULL_SCALE_4000dps )
+ {
+ err_flag = SMARTDOF2_ERROR;
+ }
+ else
+ {
+ err_t err_flag = smartdof2_generic_read( ctx, SMARTDOF2_REG_CTRL6, &data_buf, 1 );
+ data_buf &= SMARTDOF2_GY_FULL_SCALE_BIT_MASK;
+ data_buf |= data_scale;
+ err_flag |= smartdof2_generic_write( ctx, SMARTDOF2_REG_CTRL6, &data_buf, 1 );
+ }
+ return err_flag;
+}
+
+err_t smartdof2_get_acc_axis_data ( smartdof2_t *ctx, smartdof2_axis_data_t *acc_axis )
+{
+ uint8_t data_buf[ 6 ] = { 0 };
+ err_t err_flag = smartdof2_generic_read( ctx, SMARTDOF2_REG_OUTX_L_A, data_buf, 6 );
+ acc_axis->x = data_buf[ 1 ];
+ acc_axis->x <<= 8;
+ acc_axis->x |= data_buf[ 0 ];
+ acc_axis->y = data_buf[ 3 ];
+ acc_axis->y <<= 8;
+ acc_axis->y |= data_buf[ 2 ];
+ acc_axis->z = data_buf[ 5 ];
+ acc_axis->z <<= 8;
+ acc_axis->z |= data_buf[ 4 ];
+ return err_flag;
+}
+
+err_t smartdof2_get_gyro_axis_data ( smartdof2_t *ctx, smartdof2_axis_data_t *gyro_axis )
+{
+ uint8_t data_buf[ 6 ] = { 0 };
+ err_t err_flag = smartdof2_generic_read( ctx, SMARTDOF2_REG_OUTX_L_G, data_buf, 6 );
+ gyro_axis->x = data_buf[ 1 ];
+ gyro_axis->x <<= 8;
+ gyro_axis->x |= data_buf[ 0 ];
+ gyro_axis->y = data_buf[ 3 ];
+ gyro_axis->y <<= 8;
+ gyro_axis->y |= data_buf[ 2 ];
+ gyro_axis->z = data_buf[ 5 ];
+ gyro_axis->z <<= 8;
+ gyro_axis->z |= data_buf[ 4 ];
+ return err_flag;
+}
+
+err_t smartdof2_get_acc_sensitivity ( smartdof2_t *ctx, float *sensitivity )
+{
+ uint8_t full_scale;
+ err_t err_flag = smartdof2_get_acc_full_scale ( ctx, &full_scale );
+ switch ( full_scale )
+ {
+ case SMARTDOF2_XL_FULL_SCALE_2g:
+ {
+ *sensitivity = SMARTDOF2_ACC_SENSITIVITY_FS_2g;
+ break;
+ }
+ case SMARTDOF2_XL_FULL_SCALE_4g:
+ {
+ *sensitivity = SMARTDOF2_ACC_SENSITIVITY_FS_4g;
+ break;
+ }
+ case SMARTDOF2_XL_FULL_SCALE_8g:
+ {
+ *sensitivity = SMARTDOF2_ACC_SENSITIVITY_FS_8g;
+ break;
+ }
+ case SMARTDOF2_XL_FULL_SCALE_16g:
+ {
+ *sensitivity = SMARTDOF2_ACC_SENSITIVITY_FS_16g;
+ break;
+ }
+ default:
+ {
+ *sensitivity = SMARTDOF2_ACC_SENSITIVITY_FS_2g;
+ err_flag = SMARTDOF2_ERROR;
+ break;
+ }
+ }
+ return err_flag;
+}
+
+err_t smartdof2_get_gyro_sensitivity ( smartdof2_t *ctx, float *sensitivity )
+{
+ uint8_t full_scale;
+ err_t err_flag = smartdof2_get_gyro_full_scale ( ctx, &full_scale );
+ switch ( full_scale )
+ {
+ case SMARTDOF2_GY_FULL_SCALE_125dps:
+ {
+ *sensitivity = SMARTDOF2_GYRO_SENSITIVITY_FS_125dps;
+ break;
+ }
+ case SMARTDOF2_GY_FULL_SCALE_250dps:
+ {
+ *sensitivity = SMARTDOF2_GYRO_SENSITIVITY_FS_250dps;
+ break;
+ }
+ case SMARTDOF2_GY_FULL_SCALE_500dps:
+ {
+ *sensitivity = SMARTDOF2_GYRO_SENSITIVITY_FS_500dps;
+ break;
+ }
+ case SMARTDOF2_GY_FULL_SCALE_1000dps:
+ {
+ *sensitivity = SMARTDOF2_GYRO_SENSITIVITY_FS_1000dps;
+ break;
+ }
+ case SMARTDOF2_GY_FULL_SCALE_2000dps:
+ {
+ *sensitivity = SMARTDOF2_GYRO_SENSITIVITY_FS_2000dps;
+ break;
+ }
+ case SMARTDOF2_GY_FULL_SCALE_4000dps:
+ {
+ *sensitivity = SMARTDOF2_GYRO_SENSITIVITY_FS_4000dps;
+ break;
+ }
+ default:
+ {
+ *sensitivity = SMARTDOF2_GYRO_SENSITIVITY_FS_2000dps;
+ err_flag = SMARTDOF2_ERROR;
+ break;
+ }
+ }
+ return err_flag;
+}
+
+err_t smartdof2_get_acc_axis ( smartdof2_t *ctx, smartdof2_axis_t *acc_axis )
+{
+ smartdof2_axis_data_t acc_axis_raw;
+ float acc_sensitivity;
+ err_t err_flag = smartdof2_get_acc_axis_data ( ctx, &acc_axis_raw );
+ err_flag |= smartdof2_get_acc_sensitivity ( ctx, &acc_sensitivity );
+ acc_axis->x = ( ( float ) acc_axis_raw.x ) * acc_sensitivity;
+ acc_axis->y = ( ( float ) acc_axis_raw.y ) * acc_sensitivity;
+ acc_axis->z = ( ( float ) acc_axis_raw.z ) * acc_sensitivity;
+ return err_flag;
+}
+
+err_t smartdof2_get_gyro_axis ( smartdof2_t *ctx, smartdof2_axis_t *gyro_axis )
+{
+ smartdof2_axis_data_t gyro_axis_raw;
+ float gyro_sensitivity;
+ err_t err_flag = smartdof2_get_gyro_axis_data ( ctx, &gyro_axis_raw );
+ err_flag |= smartdof2_get_gyro_sensitivity ( ctx, &gyro_sensitivity );
+ gyro_axis->x = ( ( float ) gyro_axis_raw.x ) * gyro_sensitivity;
+ gyro_axis->y = ( ( float ) gyro_axis_raw.y ) * gyro_sensitivity;
+ gyro_axis->z = ( ( float ) gyro_axis_raw.z ) * gyro_sensitivity;
+ return err_flag;
+}
+
+err_t smartdof2_get_temperature_raw ( smartdof2_t *ctx, int16_t *temp_raw )
+{
+ uint8_t data_buf[ 2 ] = { 0 };
+ err_t err_flag = smartdof2_generic_read( ctx, SMARTDOF2_REG_OUT_TEMP_L, data_buf, 2 );
+ *temp_raw = data_buf[ 1 ];
+ *temp_raw <<= 8;
+ *temp_raw |= data_buf[ 0 ];
+ return err_flag;
+}
+
+err_t smartdof2_get_temperature ( smartdof2_t *ctx, float *temperature )
+{
+ int16_t temp_raw;
+ err_t err_flag = smartdof2_get_temperature_raw( ctx, &temp_raw );
+ *temperature = ( float ) temp_raw;
+ *temperature /= SMARTDOF2_TEMP_SEN_LSB_C;
+ *temperature += SMARTDOF2_TEMP_LSB_0;
+ return err_flag;
+}
+
+uint8_t smartdof2_get_int_pin ( smartdof2_t *ctx )
+{
+ return digital_in_read ( &ctx->int_pin );
+}
+
+static err_t smartdof2_i2c_write ( smartdof2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len )
+{
+ uint8_t data_buf[ 256 ] = { 0 };
+ data_buf[ 0 ] = reg;
+ for ( uint8_t cnt = 0; cnt < len; cnt++ )
+ {
+ data_buf[ cnt + 1 ] = data_in[ cnt ];
+ }
+ return i2c_master_write( &ctx->i2c, data_buf, len + 1 );
+}
+
+static err_t smartdof2_i2c_read ( smartdof2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len )
+{
+ return i2c_master_write_then_read( &ctx->i2c, ®, 1, data_out, len );
+}
+
+static err_t smartdof2_spi_write ( smartdof2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len )
+{
+ spi_master_select_device( ctx->chip_select );
+ err_t error_flag = spi_master_write( &ctx->spi, ®, 1 );
+ error_flag |= spi_master_write( &ctx->spi, data_in, len );
+ spi_master_deselect_device( ctx->chip_select );
+ return error_flag;
+}
+
+static err_t smartdof2_spi_read ( smartdof2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len )
+{
+ uint8_t reg_adr = reg | SPI_READ_MASK;
+ spi_master_select_device( ctx->chip_select );
+ err_t error_flag = spi_master_write_then_read( &ctx->spi, ®_adr, 1, data_out, len );
+ spi_master_deselect_device( ctx->chip_select );
+ return error_flag;
+}
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/speaker/CMakeLists.txt b/clicks/speaker/CMakeLists.txt
new file mode 100644
index 0000000000..1333864d3c
--- /dev/null
+++ b/clicks/speaker/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_speaker LANGUAGES MikroC)
+else()
+ project(example_speaker LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_speaker
+ example/main.c
+
+)
+
+
+############################ example_speaker GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_speaker PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_speaker PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_speaker PUBLIC MikroSDK.Log)
+add_subdirectory(lib_speaker)
+target_link_libraries(example_speaker PUBLIC Click.Speaker)
+############################ example_speaker GENERATED CODE END ###########################
diff --git a/clicks/speaker/changelog.md b/clicks/speaker/changelog.md
index 045bcb30cf..b2ebfc1acd 100644
--- a/clicks/speaker/changelog.md
+++ b/clicks/speaker/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.5
+### Version 2.1.0.5
- Initial release
diff --git a/clicks/speaker/doc/doxy/Doxyfile.doxy b/clicks/speaker/doc/doxy/Doxyfile.doxy
index 08a2481f57..9826741037 100644
--- a/clicks/speaker/doc/doxy/Doxyfile.doxy
+++ b/clicks/speaker/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/speaker/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/speaker/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/speaker/example \
- ../clicks/speaker/lib/include \
- ../clicks/speaker/README.md
+INPUT = ../cmake/speaker/example \
+ ../cmake/speaker/lib_speaker/include \
+ ../cmake/speaker/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/speaker/example
+EXAMPLE_PATH = ../cmake/speaker/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/speaker/doc/package/manifest.json b/clicks/speaker/doc/package/manifest.json
index 1d376c5e0a..1b2c689bf1 100644
--- a/clicks/speaker/doc/package/manifest.json
+++ b/clicks/speaker/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Speakers",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Audio & voice > Speakers",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Speaker click",
"example_list": [
@@ -26,11 +25,11 @@
"name": "mikroe.click.speaker",
"product_link": "https://www.mikroe.com/speaker-click",
"short_description": "Speaker Click is a compact add-on board that contains an audio power amplifier with a high-quality audio reproduction. This board features the MAX9717, a 1.4W mono bridge-tied load (BTL) architecture audio power amplifier from Maxim Integrated.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.5"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.5",
+ "cmake": true,
+ "alias": "Click.Speaker",
+ "subdir_name": "lib_speaker"
}
-
-
-
diff --git a/clicks/speaker/example/CMakeLists.txt b/clicks/speaker/example/CMakeLists.txt
new file mode 100644
index 0000000000..0212a292b9
--- /dev/null
+++ b/clicks/speaker/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_speaker LANGUAGES MikroC)
+else()
+ project(example_speaker LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_speaker
+ main.c
+
+)
+
+
+############################ example_speaker GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_speaker PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_speaker PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_speaker PUBLIC MikroSDK.Log)
+add_subdirectory(lib_speaker)
+target_link_libraries(example_speaker PUBLIC Click.Speaker)
+############################ example_speaker GENERATED CODE END ###########################
diff --git a/clicks/speaker/example/manifest.exm b/clicks/speaker/example/manifest.exm
index d44cde1167..3b24c26689 100644
--- a/clicks/speaker/example/manifest.exm
+++ b/clicks/speaker/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Speaker Click",
"description": "Speaker Click is a compact add-on board that contains an audio power amplifier with a high-quality audio reproduction. This board features the MAX9717, a 1.4W mono bridge-tied load (BTL) architecture audio power amplifier from Maxim Integrated.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","MAX9717"],
"category" : ["Speakers"]
}
diff --git a/clicks/speaker/example/memake.txt b/clicks/speaker/example/memake.txt
deleted file mode 100644
index 4a3597dc41..0000000000
--- a/clicks/speaker/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_speaker
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Speaker
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/speaker/lib/memake.txt b/clicks/speaker/lib/memake.txt
deleted file mode 100644
index 31b8b5de07..0000000000
--- a/clicks/speaker/lib/memake.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-type: library
-
-target: lib_speaker
-
-sources: {
- src/speaker.c
-}
-
-headers: {
- include/speaker.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/speaker.h) dst(include/speaker.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.Speaker
diff --git a/clicks/speaker/lib_speaker/CMakeLists.txt b/clicks/speaker/lib_speaker/CMakeLists.txt
new file mode 100644
index 0000000000..d03747f9d1
--- /dev/null
+++ b/clicks/speaker/lib_speaker/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_speaker LANGUAGES MikroC)
+else()
+ project(lib_speaker LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_speaker STATIC
+ src/speaker.c
+ include/speaker.h
+)
+add_library(Click.Speaker ALIAS lib_speaker)
+
+
+
+target_include_directories(lib_speaker PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_speaker PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_speaker PUBLIC MikroSDK.Driver)
diff --git a/clicks/speaker/lib_speaker/include/Click.Speaker b/clicks/speaker/lib_speaker/include/Click.Speaker
new file mode 100644
index 0000000000..5196fb1e5b
--- /dev/null
+++ b/clicks/speaker/lib_speaker/include/Click.Speaker
@@ -0,0 +1 @@
+#include "speaker.h"
diff --git a/clicks/speaker/lib/include/speaker.h b/clicks/speaker/lib_speaker/include/speaker.h
similarity index 100%
rename from clicks/speaker/lib/include/speaker.h
rename to clicks/speaker/lib_speaker/include/speaker.h
diff --git a/clicks/speaker/lib/src/speaker.c b/clicks/speaker/lib_speaker/src/speaker.c
similarity index 100%
rename from clicks/speaker/lib/src/speaker.c
rename to clicks/speaker/lib_speaker/src/speaker.c
diff --git a/clicks/speaker/memake.txt b/clicks/speaker/memake.txt
deleted file mode 100644
index 5584c26b88..0000000000
--- a/clicks/speaker/memake.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-type: subdirs
-
-project: Speaker
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/spectral3/CHANGELOG.md b/clicks/spectral3/CHANGELOG.md
index 97df45d2c4..249474c644 100644
--- a/clicks/spectral3/CHANGELOG.md
+++ b/clicks/spectral3/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.7
+### Version 2.1.0.8
- Initial release
diff --git a/clicks/spectral3/CMakeLists.txt b/clicks/spectral3/CMakeLists.txt
new file mode 100644
index 0000000000..fbf074963f
--- /dev/null
+++ b/clicks/spectral3/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_spectral3 LANGUAGES MikroC)
+else()
+ project(example_spectral3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_spectral3
+ example/main.c
+
+)
+
+
+############################ example_spectral3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_spectral3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_spectral3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_spectral3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_spectral3)
+target_link_libraries(example_spectral3 PUBLIC Click.Spectral3)
+############################ example_spectral3 GENERATED CODE END ###########################
diff --git a/clicks/spectral3/doc/doxy/Doxyfile.doxy b/clicks/spectral3/doc/doxy/Doxyfile.doxy
index 1432d95327..78ceca7e99 100644
--- a/clicks/spectral3/doc/doxy/Doxyfile.doxy
+++ b/clicks/spectral3/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/spectral3/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/spectral3/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/spectral3/example \
- ../clicks/spectral3/lib/include \
- ../clicks/spectral3/README.md
+INPUT = ../cmake/spectral3/example \
+ ../cmake/spectral3/lib_spectral3/include \
+ ../cmake/spectral3/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/spectral3/example
+EXAMPLE_PATH = ../cmake/spectral3/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/spectral3/doc/package/manifest.json b/clicks/spectral3/doc/package/manifest.json
index 37f6be7da5..53d526bf65 100644
--- a/clicks/spectral3/doc/package/manifest.json
+++ b/clicks/spectral3/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Optical",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Optical",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Spectral 3 click",
"example_list": [
@@ -26,16 +25,15 @@
"name": "mikroe.click.spectral3",
"product_link": "https://www.mikroe.com/spectral-3-click",
"short_description": "Spectral 3 click is a multispectral sensing device, which uses the state-of-the-art sensor IC for a very accurate near-IR (NIR) sensing.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
"_type": "mikroSDK Library",
- "related_projects":[
+ "related_projects": [
2356
],
- "version": "2.0.0.7"
+ "version": "2.1.0.8",
+ "cmake": true,
+ "alias": "Click.Spectral3",
+ "subdir_name": "lib_spectral3"
}
-
-
-
-
diff --git a/clicks/spectral3/example/CMakeLists.txt b/clicks/spectral3/example/CMakeLists.txt
new file mode 100644
index 0000000000..acf4c723bf
--- /dev/null
+++ b/clicks/spectral3/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_spectral3 LANGUAGES MikroC)
+else()
+ project(example_spectral3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_spectral3
+ main.c
+
+)
+
+
+############################ example_spectral3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_spectral3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_spectral3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_spectral3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_spectral3)
+target_link_libraries(example_spectral3 PUBLIC Click.Spectral3)
+############################ example_spectral3 GENERATED CODE END ###########################
diff --git a/clicks/spectral3/example/manifest.exm b/clicks/spectral3/example/manifest.exm
index 4c2221f24f..062abb305d 100644
--- a/clicks/spectral3/example/manifest.exm
+++ b/clicks/spectral3/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Spectral 3 Click",
"description": "Spectral 3 click is a multispectral sensing device, which uses the state-of-the-art sensor IC for a very accurate near-IR (NIR) sensing.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","AT25SF041"],
"category" : ["Optical"]
}
\ No newline at end of file
diff --git a/clicks/spectral3/example/memake.txt b/clicks/spectral3/example/memake.txt
deleted file mode 100644
index f73c06e46f..0000000000
--- a/clicks/spectral3/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_spectral3
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Spectral3
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/spectral3/lib/memake.txt b/clicks/spectral3/lib/memake.txt
deleted file mode 100644
index c2b98bca3c..0000000000
--- a/clicks/spectral3/lib/memake.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-type: library
-
-target: lib_spectral3
-
-alias: Click.Spectral3
-
-sources: {
- src/spectral3.c
-}
-
-headers: {
- include/spectral3.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/spectral3.h) dst(include/spectral3.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
- MikroSDK.GenericPointer
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/spectral3/lib_spectral3/CMakeLists.txt b/clicks/spectral3/lib_spectral3/CMakeLists.txt
new file mode 100644
index 0000000000..d2b3000f77
--- /dev/null
+++ b/clicks/spectral3/lib_spectral3/CMakeLists.txt
@@ -0,0 +1,29 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_spectral3 LANGUAGES MikroC)
+else()
+ project(lib_spectral3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_spectral3 STATIC
+ src/spectral3.c
+ include/spectral3.h
+)
+add_library(Click.Spectral3 ALIAS lib_spectral3)
+
+
+
+target_include_directories(lib_spectral3 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_spectral3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_spectral3 PUBLIC MikroSDK.Driver)
+find_package(MikroSDK.GenericPointer REQUIRED)
+target_link_libraries(lib_spectral3 PUBLIC MikroSDK.GenericPointer)
diff --git a/clicks/spectral3/lib_spectral3/include/Click.Spectral3 b/clicks/spectral3/lib_spectral3/include/Click.Spectral3
new file mode 100644
index 0000000000..aeaacc809d
--- /dev/null
+++ b/clicks/spectral3/lib_spectral3/include/Click.Spectral3
@@ -0,0 +1 @@
+#include "spectral3.h"
diff --git a/clicks/spectral3/lib/include/spectral3.h b/clicks/spectral3/lib_spectral3/include/spectral3.h
similarity index 96%
rename from clicks/spectral3/lib/include/spectral3.h
rename to clicks/spectral3/lib_spectral3/include/spectral3.h
index ce6fa1abf1..bce86dd28f 100644
--- a/clicks/spectral3/lib/include/spectral3.h
+++ b/clicks/spectral3/lib_spectral3/include/spectral3.h
@@ -1,226 +1,226 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- * \brief This file contains API for Spectral 3 Click driver.
- *
- * \addtogroup spectral3 Spectral 3 Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef SPECTRAL3_H
-#define SPECTRAL3_H
-
-#include "drv_digital_out.h"
-#include "drv_digital_in.h"
-#include "drv_uart.h"
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-#define SPECTRAL3_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
- cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
- cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
- cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
-/** \} */
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define SPECTRAL3_RETVAL uint8_t
-
-#define SPECTRAL3_OK 0x00
-#define SPECTRAL3_INIT_ERROR 0xFF
-/** \} */
-
-/**
- * \defgroup driver Driver define
- * \{
- */
-#define DRV_RX_BUFFER_SIZE 200
-#define DRV_TX_BUFFER_SIZE 100
-/** \} */
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
- // Output pins
-
- digital_out_t rst;
-
- // Input pins
-
- digital_in_t int_pin;
-
- // Modules
-
- uart_t uart;
-
- char uart_rx_buffer[ DRV_RX_BUFFER_SIZE ];
- char uart_tx_buffer[ DRV_TX_BUFFER_SIZE ];
-
-} spectral3_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Communication gpio pins
-
- pin_name_t rx_pin;
- pin_name_t tx_pin;
-
- // Additional gpio pins
-
- pin_name_t rst;
- pin_name_t int_pin;
-
- // static variable
-
- uint32_t baud_rate; // Clock speed.
- bool uart_blocking;
- uart_data_bits_t data_bit; // Data bits.
- uart_parity_t parity_bit; // Parity bit.
- uart_stop_bits_t stop_bit; // Stop bits.
-
-} spectral3_cfg_t;
-
-/**
- * @brief Error type
- */
-typedef uint8_t spectral3_error_t;
-
-/** \} */ // End types group
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
- */
-void spectral3_cfg_setup ( spectral3_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- *
- * @param spectral3 Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
- */
-SPECTRAL3_RETVAL spectral3_init ( spectral3_t *ctx, spectral3_cfg_t *cfg );
-
-/**
- * @brief Reset module.
- *
- * @param spectral3 Click object.
- */
-void spectral3_module_reset ( spectral3_t *ctx );
-
-/**
- * @brief Set RST ( reset ) pin state.
- *
- * @param spectral3 Click object.
- * @param statte Pin state ( 1 or 0 ).
- */
-void spectral3_set_rst_pin ( spectral3_t *ctx, uint8_t state );
-
-/**
- * @brief Generic write function.
- *
- * @param spectral3 Click object.
- * @param data_buf Data buffer for sends.
- * @param len Number of bytes for sends.
- */
-void spectral3_generic_write ( spectral3_t *ctx, char *data_buf, uint16_t len );
-
-/**
- * @brief Generic read function.
- *
- * @param spectral3 Click object.
- * @param data_buf Data buffer for read data.
- * @param max_len The maximum length of data that can be read.
- *
- * @return Number of reads data.
- */
-int32_t spectral3_generic_read ( spectral3_t *ctx, char *data_buf, uint16_t max_len );
-
-/**
- * @brief Send command
- *
- * @param spectral3 Click object.
- * @param command pointer to command string
- */
-void spectral3_send_command ( spectral3_t *ctx, char *command );
-
-/**
- * @brief Read raw X, Y, Z and NIR data as well as two special internal registers D, & C.
- *
- * @param rsp pointer to buffer
- * @param c_data pointer to the buffer in which will be written
- */
-void spectral3_get_data ( char *rsp, uint16_t *c_data );
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _SPECTRAL3_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ * \brief This file contains API for Spectral 3 Click driver.
+ *
+ * \addtogroup spectral3 Spectral 3 Click Driver
+ * @{
+ */
+// ----------------------------------------------------------------------------
+
+#ifndef SPECTRAL3_H
+#define SPECTRAL3_H
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_uart.h"
+
+// -------------------------------------------------------------- PUBLIC MACROS
+/**
+ * \defgroup macros Macros
+ * \{
+ */
+
+/**
+ * \defgroup map_mikrobus MikroBUS
+ * \{
+ */
+#define SPECTRAL3_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
+ cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
+ cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
+ cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
+/** \} */
+
+/**
+ * \defgroup error_code Error Code
+ * \{
+ */
+#define SPECTRAL3_RETVAL uint8_t
+
+#define SPECTRAL3_OK 0x00
+#define SPECTRAL3_INIT_ERROR 0xFF
+/** \} */
+
+/**
+ * \defgroup driver Driver define
+ * \{
+ */
+#define DRV_RX_BUFFER_SIZE 200
+#define DRV_TX_BUFFER_SIZE 100
+/** \} */
+
+/** \} */ // End group macro
+// --------------------------------------------------------------- PUBLIC TYPES
+/**
+ * \defgroup type Types
+ * \{
+ */
+/**
+ * @brief Click ctx object definition.
+ */
+typedef struct
+{
+ // Output pins
+
+ digital_out_t rst;
+
+ // Input pins
+
+ digital_in_t int_pin;
+
+ // Modules
+
+ uart_t uart;
+
+ char uart_rx_buffer[ DRV_RX_BUFFER_SIZE ];
+ char uart_tx_buffer[ DRV_TX_BUFFER_SIZE ];
+
+} spectral3_t;
+
+/**
+ * @brief Click configuration structure definition.
+ */
+typedef struct
+{
+ // Communication gpio pins
+
+ pin_name_t rx_pin;
+ pin_name_t tx_pin;
+
+ // Additional gpio pins
+
+ pin_name_t rst;
+ pin_name_t int_pin;
+
+ // static variable
+
+ uint32_t baud_rate; // Clock speed.
+ bool uart_blocking;
+ uart_data_bits_t data_bit; // Data bits.
+ uart_parity_t parity_bit; // Parity bit.
+ uart_stop_bits_t stop_bit; // Stop bits.
+
+} spectral3_cfg_t;
+
+/**
+ * @brief Error type
+ */
+typedef uint8_t spectral3_error_t;
+
+/** \} */ // End types group
+// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
+
+/**
+ * \defgroup public_function Public function
+ * \{
+ */
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+/**
+ * @brief Config Object Initialization function.
+ *
+ * @param cfg Click configuration structure.
+ *
+ * @description This function initializes click configuration structure to init state.
+ * @note All used pins will be set to unconnected state.
+ */
+void spectral3_cfg_setup ( spectral3_cfg_t *cfg );
+
+/**
+ * @brief Initialization function.
+ *
+ * @param spectral3 Click object.
+ * @param cfg Click configuration structure.
+ *
+ * @description This function initializes all necessary pins and peripherals used for this click.
+ */
+SPECTRAL3_RETVAL spectral3_init ( spectral3_t *ctx, spectral3_cfg_t *cfg );
+
+/**
+ * @brief Reset module.
+ *
+ * @param spectral3 Click object.
+ */
+void spectral3_module_reset ( spectral3_t *ctx );
+
+/**
+ * @brief Set RST ( reset ) pin state.
+ *
+ * @param spectral3 Click object.
+ * @param statte Pin state ( 1 or 0 ).
+ */
+void spectral3_set_rst_pin ( spectral3_t *ctx, uint8_t state );
+
+/**
+ * @brief Generic write function.
+ *
+ * @param spectral3 Click object.
+ * @param data_buf Data buffer for sends.
+ * @param len Number of bytes for sends.
+ */
+void spectral3_generic_write ( spectral3_t *ctx, char *data_buf, uint16_t len );
+
+/**
+ * @brief Generic read function.
+ *
+ * @param spectral3 Click object.
+ * @param data_buf Data buffer for read data.
+ * @param max_len The maximum length of data that can be read.
+ *
+ * @return Number of reads data.
+ */
+int32_t spectral3_generic_read ( spectral3_t *ctx, char *data_buf, uint16_t max_len );
+
+/**
+ * @brief Send command
+ *
+ * @param spectral3 Click object.
+ * @param command pointer to command string
+ */
+void spectral3_send_command ( spectral3_t *ctx, char *command );
+
+/**
+ * @brief Read raw X, Y, Z and NIR data as well as two special internal registers D, & C.
+ *
+ * @param rsp pointer to buffer
+ * @param c_data pointer to the buffer in which will be written
+ */
+void spectral3_get_data ( char *rsp, uint16_t *c_data );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _SPECTRAL3_H_
+
+/** \} */ // End public_function group
+/// \} // End click Driver group
+/*! @} */
+// ------------------------------------------------------------------------- END
diff --git a/clicks/spectral3/lib/src/spectral3.c b/clicks/spectral3/lib_spectral3/src/spectral3.c
similarity index 84%
rename from clicks/spectral3/lib/src/spectral3.c
rename to clicks/spectral3/lib_spectral3/src/spectral3.c
index 0996979ede..f3050dd302 100644
--- a/clicks/spectral3/lib/src/spectral3.c
+++ b/clicks/spectral3/lib_spectral3/src/spectral3.c
@@ -1,174 +1,174 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- */
-
-#include "spectral3.h"
-#include "string.h"
-#include "stdlib.h"
-#include "generic_pointer.h"
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void spectral3_cfg_setup ( spectral3_cfg_t *cfg )
-{
- // Communication gpio pins
-
- cfg->rx_pin = HAL_PIN_NC;
- cfg->tx_pin = HAL_PIN_NC;
-
- // Additional gpio pins
-
- cfg->rst = HAL_PIN_NC;
- cfg->int_pin = HAL_PIN_NC;
-
- cfg->baud_rate = 115200;
- cfg->data_bit = UART_DATA_BITS_DEFAULT;
- cfg->parity_bit = UART_PARITY_DEFAULT;
- cfg->stop_bit = UART_STOP_BITS_DEFAULT;
- cfg->uart_blocking = false;
-}
-
-SPECTRAL3_RETVAL spectral3_init ( spectral3_t *ctx, spectral3_cfg_t *cfg )
-{
- uart_config_t uart_cfg;
-
- uart_configure_default( &uart_cfg );
-
- // Ring buffer mapping
- ctx->uart.tx_ring_buffer = ctx->uart_tx_buffer;
- ctx->uart.rx_ring_buffer = ctx->uart_rx_buffer;
-
- // UART module config
- uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
- uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
- uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
- uart_cfg.rx_ring_size = sizeof( ctx->uart_rx_buffer );
-
- uart_open( &ctx->uart, &uart_cfg );
- uart_set_baud( &ctx->uart, cfg->baud_rate );
- uart_set_parity( &ctx->uart, cfg->parity_bit );
- uart_set_stop_bits( &ctx->uart, cfg->stop_bit );
- uart_set_data_bits( &ctx->uart, cfg->data_bit );
-
- uart_set_blocking( &ctx->uart, cfg->uart_blocking );
-
- // Output pins
-
- digital_out_init( &ctx->rst, cfg->rst );
-
- // Input pins
-
- digital_in_init( &ctx->int_pin, cfg->int_pin );
-
- return SPECTRAL3_OK;
-}
-
-void spectral3_module_reset ( spectral3_t *ctx )
-{
- digital_out_high( &ctx->rst );
- Delay_100ms( );
- digital_out_low( &ctx->rst );
- Delay_100ms( );
- digital_out_high( &ctx->rst );
- Delay_1sec( );
- Delay_1sec( );
-}
-
-void spectral3_set_rst_pin ( spectral3_t *ctx, uint8_t state )
-{
- digital_out_write( &ctx->rst, state );
-}
-
-void spectral3_generic_write ( spectral3_t *ctx, char *data_buf, uint16_t len )
-{
- uart_write( &ctx->uart, data_buf, len );
-}
-
-int32_t spectral3_generic_read ( spectral3_t *ctx, char *data_buf, uint16_t max_len )
-{
- return uart_read( &ctx->uart, data_buf, max_len );
-}
-
-void spectral3_send_command ( spectral3_t *ctx, char *command )
-{
- char tmp_buf[ 100 ];
- uint8_t len;
-
- memset( tmp_buf, 0, 100 );
- len = strlen( command );
-
- strncpy( tmp_buf, command, len );
- strcat( tmp_buf, "\r\n" );
-
- spectral3_generic_write( ctx, tmp_buf, strlen( tmp_buf ) );
-}
-
-void spectral3_get_data ( char *rsp, uint16_t *c_data )
-{
- char * __generic tmp_start;
- char * __generic tmp_end;
- char buff[ 10 ] = { 0 };
-
- tmp_start = rsp;
- tmp_end = strstr( tmp_start + 1, "," );
- strncpy( buff, tmp_start, tmp_end - ( tmp_start ) );
- c_data[ 0 ] = atof( buff );
- memset( buff, 0, 10 );
-
- tmp_start = strstr( rsp, "," );
- tmp_end = strstr( tmp_start + 1, "," );
- strncpy( buff, tmp_start + 2, tmp_end - ( tmp_start + 2 ) );
- c_data[ 1 ] = atof( buff );
- memset( buff, 0, 10 );
-
- tmp_start = ( tmp_end );
- tmp_end = strstr( tmp_start + 1, "," );
- strncpy( buff, tmp_start + 2, tmp_end - ( tmp_start + 2 ) );
- c_data[ 2 ] = atof( buff );
- memset( buff, 0, 10 );
-
- tmp_start = ( tmp_end );
- tmp_end = strstr( tmp_start + 1, "," );
- strncpy( buff, tmp_start + 2, tmp_end - ( tmp_start + 2 ) );
- c_data[ 3 ] = atof( buff );
- memset( buff, 0, 10 );
-
- tmp_start = ( tmp_end );
- tmp_end = strstr( tmp_start + 1, "," );
- strncpy( buff, tmp_start + 2, tmp_end - ( tmp_start + 2 ) );
- c_data[ 4 ] = atof( buff );
- memset( buff, 0, 10 );
-
- tmp_start = ( tmp_end );
- tmp_end = strstr( tmp_start + 1, "O" );
- strncpy( buff, tmp_start + 2, tmp_end - ( tmp_start + 2 ) );
- c_data[ 5 ] = atof( buff );
-}
-
-// ------------------------------------------------------------------------- END
-
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ */
+
+#include "spectral3.h"
+#include "string.h"
+#include "stdlib.h"
+#include "generic_pointer.h"
+
+// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
+
+void spectral3_cfg_setup ( spectral3_cfg_t *cfg )
+{
+ // Communication gpio pins
+
+ cfg->rx_pin = HAL_PIN_NC;
+ cfg->tx_pin = HAL_PIN_NC;
+
+ // Additional gpio pins
+
+ cfg->rst = HAL_PIN_NC;
+ cfg->int_pin = HAL_PIN_NC;
+
+ cfg->baud_rate = 115200;
+ cfg->data_bit = UART_DATA_BITS_DEFAULT;
+ cfg->parity_bit = UART_PARITY_DEFAULT;
+ cfg->stop_bit = UART_STOP_BITS_DEFAULT;
+ cfg->uart_blocking = false;
+}
+
+SPECTRAL3_RETVAL spectral3_init ( spectral3_t *ctx, spectral3_cfg_t *cfg )
+{
+ uart_config_t uart_cfg;
+
+ uart_configure_default( &uart_cfg );
+
+ // Ring buffer mapping
+ ctx->uart.tx_ring_buffer = ctx->uart_tx_buffer;
+ ctx->uart.rx_ring_buffer = ctx->uart_rx_buffer;
+
+ // UART module config
+ uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
+ uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
+ uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
+ uart_cfg.rx_ring_size = sizeof( ctx->uart_rx_buffer );
+
+ uart_open( &ctx->uart, &uart_cfg );
+ uart_set_baud( &ctx->uart, cfg->baud_rate );
+ uart_set_parity( &ctx->uart, cfg->parity_bit );
+ uart_set_stop_bits( &ctx->uart, cfg->stop_bit );
+ uart_set_data_bits( &ctx->uart, cfg->data_bit );
+
+ uart_set_blocking( &ctx->uart, cfg->uart_blocking );
+
+ // Output pins
+
+ digital_out_init( &ctx->rst, cfg->rst );
+
+ // Input pins
+
+ digital_in_init( &ctx->int_pin, cfg->int_pin );
+
+ return SPECTRAL3_OK;
+}
+
+void spectral3_module_reset ( spectral3_t *ctx )
+{
+ digital_out_high( &ctx->rst );
+ Delay_100ms( );
+ digital_out_low( &ctx->rst );
+ Delay_100ms( );
+ digital_out_high( &ctx->rst );
+ Delay_1sec( );
+ Delay_1sec( );
+}
+
+void spectral3_set_rst_pin ( spectral3_t *ctx, uint8_t state )
+{
+ digital_out_write( &ctx->rst, state );
+}
+
+void spectral3_generic_write ( spectral3_t *ctx, char *data_buf, uint16_t len )
+{
+ uart_write( &ctx->uart, data_buf, len );
+}
+
+int32_t spectral3_generic_read ( spectral3_t *ctx, char *data_buf, uint16_t max_len )
+{
+ return uart_read( &ctx->uart, data_buf, max_len );
+}
+
+void spectral3_send_command ( spectral3_t *ctx, char *command )
+{
+ char tmp_buf[ 100 ];
+ uint8_t len;
+
+ memset( tmp_buf, 0, 100 );
+ len = strlen( command );
+
+ strncpy( tmp_buf, command, len );
+ strcat( tmp_buf, "\r\n" );
+
+ spectral3_generic_write( ctx, tmp_buf, strlen( tmp_buf ) );
+}
+
+void spectral3_get_data ( char *rsp, uint16_t *c_data )
+{
+ char * __generic_ptr tmp_start;
+ char * __generic_ptr tmp_end;
+ char buff[ 10 ] = { 0 };
+
+ tmp_start = rsp;
+ tmp_end = strstr( tmp_start + 1, "," );
+ strncpy( buff, tmp_start, tmp_end - ( tmp_start ) );
+ c_data[ 0 ] = atof( buff );
+ memset( buff, 0, 10 );
+
+ tmp_start = strstr( rsp, "," );
+ tmp_end = strstr( tmp_start + 1, "," );
+ strncpy( buff, tmp_start + 2, tmp_end - ( tmp_start + 2 ) );
+ c_data[ 1 ] = atof( buff );
+ memset( buff, 0, 10 );
+
+ tmp_start = ( tmp_end );
+ tmp_end = strstr( tmp_start + 1, "," );
+ strncpy( buff, tmp_start + 2, tmp_end - ( tmp_start + 2 ) );
+ c_data[ 2 ] = atof( buff );
+ memset( buff, 0, 10 );
+
+ tmp_start = ( tmp_end );
+ tmp_end = strstr( tmp_start + 1, "," );
+ strncpy( buff, tmp_start + 2, tmp_end - ( tmp_start + 2 ) );
+ c_data[ 3 ] = atof( buff );
+ memset( buff, 0, 10 );
+
+ tmp_start = ( tmp_end );
+ tmp_end = strstr( tmp_start + 1, "," );
+ strncpy( buff, tmp_start + 2, tmp_end - ( tmp_start + 2 ) );
+ c_data[ 4 ] = atof( buff );
+ memset( buff, 0, 10 );
+
+ tmp_start = ( tmp_end );
+ tmp_end = strstr( tmp_start + 1, "O" );
+ strncpy( buff, tmp_start + 2, tmp_end - ( tmp_start + 2 ) );
+ c_data[ 5 ] = atof( buff );
+}
+
+// ------------------------------------------------------------------------- END
+
diff --git a/clicks/spectral3/memake.txt b/clicks/spectral3/memake.txt
deleted file mode 100644
index 2e9e578549..0000000000
--- a/clicks/spectral3/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Spectral3
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/spiextend/CMakeLists.txt b/clicks/spiextend/CMakeLists.txt
new file mode 100644
index 0000000000..570414d122
--- /dev/null
+++ b/clicks/spiextend/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_spiextend LANGUAGES MikroC)
+else()
+ project(example_spiextend LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_spiextend
+ example/main.c
+
+)
+
+
+############################ example_spiextend GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_spiextend PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_spiextend PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_spiextend PUBLIC MikroSDK.Log)
+add_subdirectory(lib_spiextend)
+target_link_libraries(example_spiextend PUBLIC Click.SPIExtend)
+############################ example_spiextend GENERATED CODE END ###########################
diff --git a/clicks/spiextend/changelog.md b/clicks/spiextend/changelog.md
index 8a902bbfaf..b2ebfc1acd 100644
--- a/clicks/spiextend/changelog.md
+++ b/clicks/spiextend/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.4
+### Version 2.1.0.5
- Initial release
diff --git a/clicks/spiextend/doc/doxy/Doxyfile.doxy b/clicks/spiextend/doc/doxy/Doxyfile.doxy
index d00598a9b7..0fc6859a05 100644
--- a/clicks/spiextend/doc/doxy/Doxyfile.doxy
+++ b/clicks/spiextend/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/spiextend/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/spiextend/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/spiextend/example \
- ../clicks/spiextend/lib/include \
- ../clicks/spiextend/README.md
+INPUT = ../cmake/spiextend/example \
+ ../cmake/spiextend/lib_spiextend/include \
+ ../cmake/spiextend/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/spiextend/example
+EXAMPLE_PATH = ../cmake/spiextend/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/spiextend/doc/package/manifest.json b/clicks/spiextend/doc/package/manifest.json
index 67e86edcf9..77c9f40d45 100644
--- a/clicks/spiextend/doc/package/manifest.json
+++ b/clicks/spiextend/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "SPI",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Interface > SPI",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "SPI Extend click",
"example_list": [
@@ -26,15 +25,15 @@
"name": "mikroe.click.spiextend",
"product_link": "https://www.mikroe.com/spi-extend-click",
"short_description": "SPI Extend Click is a compact add-on board for applications that require extending the SPI communication bus over a long distance. This board features the LTC4332, an SPI slave extender device, from Analog Devices. Using a ±60V fault protected differential transceiver, the LTC4332 can transmit SPI data, including an interrupt signal, up to 2MHz over two twisted-pair cables.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "_type": "mikroSDK Library",
+ "related_projects": [
3808
- ],
- "version": "2.0.0.4"
+ ],
+ "version": "2.1.0.5",
+ "cmake": true,
+ "alias": "Click.SPIExtend",
+ "subdir_name": "lib_spiextend"
}
-
-
-
diff --git a/clicks/spiextend/example/CMakeLists.txt b/clicks/spiextend/example/CMakeLists.txt
new file mode 100644
index 0000000000..fecd4fce05
--- /dev/null
+++ b/clicks/spiextend/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_spiextend LANGUAGES MikroC)
+else()
+ project(example_spiextend LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_spiextend
+ main.c
+
+)
+
+
+############################ example_spiextend GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_spiextend PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_spiextend PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_spiextend PUBLIC MikroSDK.Log)
+add_subdirectory(lib_spiextend)
+target_link_libraries(example_spiextend PUBLIC Click.SPIExtend)
+############################ example_spiextend GENERATED CODE END ###########################
diff --git a/clicks/spiextend/example/manifest.exm b/clicks/spiextend/example/manifest.exm
index 4e6407872d..ac582cef04 100644
--- a/clicks/spiextend/example/manifest.exm
+++ b/clicks/spiextend/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "SPI Extend Click",
"description": "SPI Extend Click is a compact add-on board for applications that require extending the SPI communication bus over a long distance. This board features the LTC4332, an SPI slave extender device, from Analog Devices. Using a ±60V fault protected differential transceiver, the LTC4332 can transmit SPI data, including an interrupt signal, up to 2MHz over two twisted-pair cables.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","LTC4332"],
"category" : ["SPI"]
}
diff --git a/clicks/spiextend/example/memake.txt b/clicks/spiextend/example/memake.txt
deleted file mode 100644
index 8387b75cf2..0000000000
--- a/clicks/spiextend/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_spiextend
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.SPIExtend
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/spiextend/lib/memake.txt b/clicks/spiextend/lib/memake.txt
deleted file mode 100644
index 98649c713c..0000000000
--- a/clicks/spiextend/lib/memake.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-type: library
-target: lib_spiextend
-
-#begin python
-import re
-
-if ( re.match("(^PIC18F(.+)[KQ]4[23]$)|(^PIC32(.+)$)",MEMAKE_MCU_NAME) ):
- sample_mode_reg_case = "SAMPLE_REG_CASE_1"
-else:
- sample_mode_reg_case = "SAMPLE_REG_CASE_2"
-#end python
-
-defines: {
- <[sample_mode_reg_case]>
-}
-
-sources: {
- src/spiextend.c
-}
-
-headers: {
- include/spiextend.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/spiextend.h) dst(include/spiextend.h)
- src(include/spi_specifics.h) dst(include/spi_specifics.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.SPIExtend
diff --git a/clicks/spiextend/lib_spiextend/CMakeLists.txt b/clicks/spiextend/lib_spiextend/CMakeLists.txt
new file mode 100644
index 0000000000..04c073df58
--- /dev/null
+++ b/clicks/spiextend/lib_spiextend/CMakeLists.txt
@@ -0,0 +1,34 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_spiextend LANGUAGES MikroC)
+else()
+ project(lib_spiextend LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_spiextend STATIC
+ src/spiextend.c
+ include/spiextend.h
+)
+add_library(Click.SPIExtend ALIAS lib_spiextend)
+
+if (${MCU_NAME} MATCHES "(^PIC18F(.+)[KQ]4[23]$)|(^PIC32(.+)$)")
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_1")
+else()
+ set(sample_mode_reg_case "SAMPLE_REG_CASE_2")
+endif()
+
+target_compile_definitions(lib_spiextend PUBLIC ${sample_mode_reg_case})
+
+
+target_include_directories(lib_spiextend PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_spiextend PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_spiextend PUBLIC MikroSDK.Driver)
diff --git a/clicks/spiextend/lib_spiextend/include/Click.SPIExtend b/clicks/spiextend/lib_spiextend/include/Click.SPIExtend
new file mode 100644
index 0000000000..cab45e827d
--- /dev/null
+++ b/clicks/spiextend/lib_spiextend/include/Click.SPIExtend
@@ -0,0 +1 @@
+#include "spiextend.h"
diff --git a/clicks/spiextend/lib_spiextend/include/spi_specifics.h b/clicks/spiextend/lib_spiextend/include/spi_specifics.h
new file mode 100644
index 0000000000..0bba508c77
--- /dev/null
+++ b/clicks/spiextend/lib_spiextend/include/spi_specifics.h
@@ -0,0 +1,121 @@
+/****************************************************************************
+** Copyright (C) 2021 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+/*!
+ * @file spi_specifics.h
+ * @brief This file contains SPI specific macros, functions, etc.
+ */
+
+#ifndef _SPI_SPECIFICS_
+#define _SPI_SPECIFICS_
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+#include "mcu_definitions.h"
+
+// mikroE toolchain specific
+#if defined(__MIKROC_AI_FOR_PIC__) || defined (__MIKROC_AI_FOR_DSPIC__) || \
+ defined(__MIKROC_AI_FOR_PIC32__)
+
+#ifdef __MIKROC_AI_FOR_PIC__
+ #define BIT_INDEX 7
+#elif defined(__MIKROC_AI_FOR_PIC32__)
+ #define BIT_INDEX 9
+#endif
+
+#ifdef SAMPLE_REG_CASE_1
+ #ifdef __MIKROC_AI_FOR_PIC32__
+ #define SAMPLE_REG_ADDRESS(index) HAL_LL_SPI ## index ## CON_ADDRESS
+ #else
+ #define SAMPLE_REG_ADDRESS(index) HAL_LL_SPI ## index ## CON1_ADDRESS
+ #endif
+#else
+ #define SAMPLE_REG_ADDRESS(index) HAL_LL_SSP ## index ## STAT_ADDRESS
+#endif
+
+#if defined(SPI_MODULE) || defined(SPI_MODULE_1)
+ #define SET_SPI_DATA_SAMPLE_MIDDLE1 clear_reg_bit(SAMPLE_REG_ADDRESS(1), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE1 set_reg_bit(SAMPLE_REG_ADDRESS(1), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE1
+ #define SET_SPI_DATA_SAMPLE_EDGE1
+#endif
+
+#ifdef SPI_MODULE_2
+ #define SET_SPI_DATA_SAMPLE_MIDDLE2 clear_reg_bit(SAMPLE_REG_ADDRESS(2), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE2 set_reg_bit(SAMPLE_REG_ADDRESS(2), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE2
+ #define SET_SPI_DATA_SAMPLE_EDGE2
+#endif
+
+#ifdef SPI_MODULE_3
+ #define SET_SPI_DATA_SAMPLE_MIDDLE3 clear_reg_bit(SAMPLE_REG_ADDRESS(3), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE3 set_reg_bit(SAMPLE_REG_ADDRESS(3), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE3
+ #define SET_SPI_DATA_SAMPLE_EDGE3
+#endif
+
+#ifdef SPI_MODULE_4
+ #define SET_SPI_DATA_SAMPLE_MIDDLE4 clear_reg_bit(SAMPLE_REG_ADDRESS(4), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE4 set_reg_bit(SAMPLE_REG_ADDRESS(4), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE4
+ #define SET_SPI_DATA_SAMPLE_EDGE4
+#endif
+
+#ifdef SPI_MODULE_5
+ #define SET_SPI_DATA_SAMPLE_MIDDLE5 clear_reg_bit(SAMPLE_REG_ADDRESS(5), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE5 set_reg_bit(SAMPLE_REG_ADDRESS(5), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE5
+ #define SET_SPI_DATA_SAMPLE_EDGE5
+#endif
+
+#ifdef SPI_MODULE_6
+ #define SET_SPI_DATA_SAMPLE_MIDDLE6 clear_reg_bit(SAMPLE_REG_ADDRESS(6), BIT_INDEX);
+ #define SET_SPI_DATA_SAMPLE_EDGE6 set_reg_bit(SAMPLE_REG_ADDRESS(6), BIT_INDEX);
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE6
+ #define SET_SPI_DATA_SAMPLE_EDGE6
+#endif
+
+
+#define SET_SPI_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE1 SET_SPI_DATA_SAMPLE_MIDDLE2 \
+ SET_SPI_DATA_SAMPLE_MIDDLE3 SET_SPI_DATA_SAMPLE_MIDDLE4 \
+ SET_SPI_DATA_SAMPLE_MIDDLE5 SET_SPI_DATA_SAMPLE_MIDDLE6
+#define SET_SPI_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE1 SET_SPI_DATA_SAMPLE_EDGE2 \
+ SET_SPI_DATA_SAMPLE_EDGE3 SET_SPI_DATA_SAMPLE_EDGE4 \
+ SET_SPI_DATA_SAMPLE_EDGE5 SET_SPI_DATA_SAMPLE_EDGE6
+#else
+ #define SET_SPI_DATA_SAMPLE_MIDDLE
+ #define SET_SPI_DATA_SAMPLE_EDGE
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _SPI_SPECIFICS_
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/spiextend/lib/include/spiextend.h b/clicks/spiextend/lib_spiextend/include/spiextend.h
similarity index 99%
rename from clicks/spiextend/lib/include/spiextend.h
rename to clicks/spiextend/lib_spiextend/include/spiextend.h
index 994704e5eb..85ba074052 100644
--- a/clicks/spiextend/lib/include/spiextend.h
+++ b/clicks/spiextend/lib_spiextend/include/spiextend.h
@@ -356,13 +356,12 @@ err_t spiextend_default_cfg ( spiextend_t *ctx );
* See #spiextend_t object definition for detailed explanation.
* @param[in] reg : Start register address.
* @param[in] data_in : Data to be written.
- * @param[in] len : Number of bytes to be written.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
*
* See #err_t definition for detailed explanation.
*/
-err_t spiextend_generic_write ( spiextend_t *ctx, uint8_t reg, uint8_t *data_in );
+err_t spiextend_generic_write ( spiextend_t *ctx, uint8_t reg, uint8_t data_in );
/**
* @brief SPI Extend data reading function.
@@ -372,7 +371,6 @@ err_t spiextend_generic_write ( spiextend_t *ctx, uint8_t reg, uint8_t *data_in
* See #spiextend_t object definition for detailed explanation.
* @param[in] reg : Start register address.
* @param[out] data_out : Output read data.
- * @param[in] len : Number of bytes to be read.
* @return @li @c 0 - Success,
* @li @c -1 - Error.
*
diff --git a/clicks/spiextend/lib/src/spiextend.c b/clicks/spiextend/lib_spiextend/src/spiextend.c
similarity index 100%
rename from clicks/spiextend/lib/src/spiextend.c
rename to clicks/spiextend/lib_spiextend/src/spiextend.c
diff --git a/clicks/spiextend/memake.txt b/clicks/spiextend/memake.txt
deleted file mode 100644
index 1867379b70..0000000000
--- a/clicks/spiextend/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: SPIExtend
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/stepdown3/CMakeLists.txt b/clicks/stepdown3/CMakeLists.txt
new file mode 100644
index 0000000000..e6c3dd0041
--- /dev/null
+++ b/clicks/stepdown3/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_stepdown3 LANGUAGES MikroC)
+else()
+ project(example_stepdown3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_stepdown3
+ example/main.c
+
+)
+
+
+############################ example_stepdown3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_stepdown3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_stepdown3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_stepdown3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_stepdown3)
+target_link_libraries(example_stepdown3 PUBLIC Click.StepDown3)
+############################ example_stepdown3 GENERATED CODE END ###########################
diff --git a/clicks/stepdown3/changelog.md b/clicks/stepdown3/changelog.md
index 34c1de4c45..1e0893fa34 100644
--- a/clicks/stepdown3/changelog.md
+++ b/clicks/stepdown3/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.2
+### Version 2.1.0.2
- Initial release
diff --git a/clicks/stepdown3/doc/doxy/Doxyfile.doxy b/clicks/stepdown3/doc/doxy/Doxyfile.doxy
index 3e602cf0df..093aabe899 100644
--- a/clicks/stepdown3/doc/doxy/Doxyfile.doxy
+++ b/clicks/stepdown3/doc/doxy/Doxyfile.doxy
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY = ../clicks/stepdown3/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/stepdown3/temp/Help/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
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/stepdown3/example \
- ../clicks/stepdown3/lib/include \
- ../clicks/stepdown3/README.md
+INPUT = ../cmake/stepdown3/example \
+ ../cmake/stepdown3/lib_stepdown3/include \
+ ../cmake/stepdown3/README.md
# 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
@@ -910,7 +910,7 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include
# command).
-EXAMPLE_PATH = ../clicks/stepdown3/example
+EXAMPLE_PATH = ../cmake/stepdown3/example
# 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
diff --git a/clicks/stepdown3/doc/package/manifest.json b/clicks/stepdown3/doc/package/manifest.json
index ffc945f11e..8cb193b14c 100644
--- a/clicks/stepdown3/doc/package/manifest.json
+++ b/clicks/stepdown3/doc/package/manifest.json
@@ -1,5 +1,5 @@
{
- "architecture": "ARM|PIC|PIC32",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
"category": "Click Boards > Power management > Buck",
"changelog": "Resources/CHANGELOG.md",
"contains": [
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Step Down 3 click",
"example_list": [
@@ -26,10 +25,11 @@
"name": "mikroe.click.stepdown3",
"product_link": "https://www.mikroe.com/step-down-3-click",
"short_description": "Step Down 3 Click is a compact add-on board that steps down the voltage from its input to its output. This board features the ST1PS03, a nano-quiescent miniaturized synchronous step-down converter with a load switch from STMicroelectronics. The ST1PS03 can provide up to 400mA output current with an input voltage ranging from 1.8V to 5.5V, specifically designed for applications where high efficiency is crucial. It also embeds a controlled switch accessible from auxiliary channel input to supply a subsystem, output voltage from 1.6V to 3.3V set using three digital control inputs, and a Power Good signal to indicate stabilized output voltages.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.2"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.2",
+ "cmake": true,
+ "alias": "Click.StepDown3",
+ "subdir_name": "lib_stepdown3"
}
-
-
diff --git a/clicks/stepdown3/example/CMakeLists.txt b/clicks/stepdown3/example/CMakeLists.txt
new file mode 100644
index 0000000000..b5998395e1
--- /dev/null
+++ b/clicks/stepdown3/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_stepdown3 LANGUAGES MikroC)
+else()
+ project(example_stepdown3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_stepdown3
+ main.c
+
+)
+
+
+############################ example_stepdown3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_stepdown3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_stepdown3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_stepdown3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_stepdown3)
+target_link_libraries(example_stepdown3 PUBLIC Click.StepDown3)
+############################ example_stepdown3 GENERATED CODE END ###########################
diff --git a/clicks/stepdown3/example/manifest.exm b/clicks/stepdown3/example/manifest.exm
index 618ed71aa2..ff76a84d6f 100644
--- a/clicks/stepdown3/example/manifest.exm
+++ b/clicks/stepdown3/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Step Down 3 Click",
"description": "Step Down 3 Click is a compact add-on board that steps down the voltage from its input to its output. This board features the ST1PS03, a nano-quiescent miniaturized synchronous step-down converter with a load switch from STMicroelectronics. The ST1PS03 can provide up to 400mA output current with an input voltage ranging from 1.8V to 5.5V, specifically designed for applications where high efficiency is crucial. It also embeds a controlled switch accessible from auxiliary channel input to supply a subsystem, output voltage from 1.6V to 3.3V set using three digital control inputs, and a Power Good signal to indicate stabilized output voltages.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","ST1PS03AQTR"],
"category" : ["Buck"]
}
diff --git a/clicks/stepdown3/example/memake.txt b/clicks/stepdown3/example/memake.txt
deleted file mode 100644
index 1b219fa006..0000000000
--- a/clicks/stepdown3/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_stepdown3
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.StepDown3
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/stepdown3/lib/memake.txt b/clicks/stepdown3/lib/memake.txt
deleted file mode 100644
index 0133ccc251..0000000000
--- a/clicks/stepdown3/lib/memake.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-type: library
-
-target: lib_stepdown3
-
-sources: {
- src/stepdown3.c
-}
-
-headers: {
- include/stepdown3.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/stepdown3.h) dst(include/stepdown3.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.StepDown3
diff --git a/clicks/stepdown3/lib_stepdown3/CMakeLists.txt b/clicks/stepdown3/lib_stepdown3/CMakeLists.txt
new file mode 100644
index 0000000000..2713855d1a
--- /dev/null
+++ b/clicks/stepdown3/lib_stepdown3/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_stepdown3 LANGUAGES MikroC)
+else()
+ project(lib_stepdown3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_stepdown3 STATIC
+ src/stepdown3.c
+ include/stepdown3.h
+)
+add_library(Click.StepDown3 ALIAS lib_stepdown3)
+
+
+
+target_include_directories(lib_stepdown3 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_stepdown3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_stepdown3 PUBLIC MikroSDK.Driver)
diff --git a/clicks/stepdown3/lib_stepdown3/include/Click.StepDown3 b/clicks/stepdown3/lib_stepdown3/include/Click.StepDown3
new file mode 100644
index 0000000000..3a3d5a2570
--- /dev/null
+++ b/clicks/stepdown3/lib_stepdown3/include/Click.StepDown3
@@ -0,0 +1 @@
+#include "stepdown3.h"
diff --git a/clicks/stepdown3/lib/include/stepdown3.h b/clicks/stepdown3/lib_stepdown3/include/stepdown3.h
similarity index 100%
rename from clicks/stepdown3/lib/include/stepdown3.h
rename to clicks/stepdown3/lib_stepdown3/include/stepdown3.h
diff --git a/clicks/stepdown3/lib/src/stepdown3.c b/clicks/stepdown3/lib_stepdown3/src/stepdown3.c
similarity index 100%
rename from clicks/stepdown3/lib/src/stepdown3.c
rename to clicks/stepdown3/lib_stepdown3/src/stepdown3.c
diff --git a/clicks/stepdown3/memake.txt b/clicks/stepdown3/memake.txt
deleted file mode 100644
index a1df6648e3..0000000000
--- a/clicks/stepdown3/memake.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-type: subdirs
-
-project: StepDown3
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/stepper21/CMakeLists.txt b/clicks/stepper21/CMakeLists.txt
new file mode 100644
index 0000000000..37e895215e
--- /dev/null
+++ b/clicks/stepper21/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_stepper21 LANGUAGES MikroC)
+else()
+ project(example_stepper21 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_stepper21
+ example/main.c
+
+)
+
+
+############################ example_stepper21 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_stepper21 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_stepper21 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_stepper21 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_stepper21)
+target_link_libraries(example_stepper21 PUBLIC Click.Stepper21)
+############################ example_stepper21 GENERATED CODE END ###########################
+
diff --git a/clicks/stepper21/README.md b/clicks/stepper21/README.md
new file mode 100644
index 0000000000..0c674bade9
--- /dev/null
+++ b/clicks/stepper21/README.md
@@ -0,0 +1,161 @@
+\mainpage Main Page
+
+---
+# Stepper 21 click
+
+> Stepper 21 Click is a compact add-on board that contains a bipolar stepper motor driver. This board features the DRV8825, a stepper motor controller integral circuit from Texas Instruments. It is a PWM micro-stepping stepper motor driver with up to 1/32 micro-stepping resolution and a built-in micro-stepper indexer. The driver has two H-bridge drivers and is intended to drive a bipolar stepper motor in a voltage supply operating range of 8.2V up to 45V.
+
+
+
+
+
+[click Product page](https://www.mikroe.com/stepper-21-click)
+
+---
+
+
+#### Click library
+
+- **Author** : Stefan Filipovic
+- **Date** : Apr 2023.
+- **Type** : I2C type
+
+
+# Software Support
+
+We provide a library for the Stepper 21 Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
+
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+## Library Description
+
+> This library contains API for Stepper 21 Click driver.
+
+#### Standard key functions :
+
+- `stepper21_cfg_setup` Config Object Initialization function.
+```c
+void stepper21_cfg_setup ( stepper21_cfg_t *cfg );
+```
+
+- `stepper21_init` Initialization function.
+```c
+err_t stepper21_init ( stepper21_t *ctx, stepper21_cfg_t *cfg );
+```
+
+- `stepper21_default_cfg` Click Default Configuration function.
+```c
+err_t stepper21_default_cfg ( stepper21_t *ctx );
+```
+
+#### Example key functions :
+
+- `stepper21_set_step_mode` This function sets the step mode resolution settings.
+```c
+err_t stepper21_set_step_mode ( stepper21_t *ctx, uint8_t mode );
+```
+
+- `stepper21_set_direction` This function sets the motor direction by setting the DIR pin logic state.
+```c
+void stepper21_set_direction ( stepper21_t *ctx, uint8_t dir );
+```
+
+- `stepper21_drive_motor` This function drives the motor for the specific number of steps at the selected speed.
+```c
+void stepper21_drive_motor ( stepper21_t *ctx, uint32_t steps, uint8_t speed );
+```
+
+## Example Description
+
+> This example demonstrates the use of the Stepper 21 click board by driving the motor in both directions for a desired number of steps.
+
+**The demo application is composed of two sections :**
+
+### Application Init
+
+> Initializes the driver and performs the click default configuration.
+
+```c
+
+void application_init ( void )
+{
+ log_cfg_t log_cfg; /**< Logger config object. */
+ stepper21_cfg_t stepper21_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ stepper21_cfg_setup( &stepper21_cfg );
+ STEPPER21_MAP_MIKROBUS( stepper21_cfg, MIKROBUS_1 );
+ if ( I2C_MASTER_ERROR == stepper21_init( &stepper21, &stepper21_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
+ if ( STEPPER21_ERROR == stepper21_default_cfg ( &stepper21 ) )
+ {
+ log_error( &logger, " Default configuration." );
+ for ( ; ; );
+ }
+
+ log_info( &logger, " Application Task " );
+}
+
+```
+
+### Application Task
+
+> Drives the motor clockwise for 200 full steps and then counter-clockiwse for 400 quarter
+steps with 2 seconds delay before changing the direction. All data is being logged on the USB UART where you can track the program flow.
+
+```c
+void application_task ( void )
+{
+ log_printf ( &logger, " Move 200 full steps clockwise \r\n\n" );
+ stepper21_set_step_mode ( &stepper21, STEPPER21_MODE_FULL_STEP );
+ stepper21_set_direction ( &stepper21, STEPPER21_DIR_CW );
+ stepper21_drive_motor ( &stepper21, 200, STEPPER21_SPEED_FAST );
+ Delay_ms ( 2000 );
+
+ log_printf ( &logger, " Move 400 quarter steps counter-clockwise \r\n\n" );
+ stepper21_set_step_mode ( &stepper21, STEPPER21_MODE_QUARTER_STEP );
+ stepper21_set_direction ( &stepper21, STEPPER21_DIR_CCW );
+ stepper21_drive_motor ( &stepper21, 400, STEPPER21_SPEED_VERY_FAST );
+ Delay_ms ( 2000 );
+}
+```
+
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
+
+- MikroSDK.Board
+- MikroSDK.Log
+- Click.Stepper21
+
+**Additional notes and informations**
+
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
+
+---
diff --git a/clicks/stepper21/changelog.md b/clicks/stepper21/changelog.md
new file mode 100644
index 0000000000..086189320b
--- /dev/null
+++ b/clicks/stepper21/changelog.md
@@ -0,0 +1,4 @@
+## Changelog
+
+### Version 2.1.0.1
+ - Initial release
diff --git a/clicks/stepper21/details.md b/clicks/stepper21/details.md
new file mode 100644
index 0000000000..b9e0c8f2d0
--- /dev/null
+++ b/clicks/stepper21/details.md
@@ -0,0 +1,160 @@
+
+---
+# Stepper 21 click
+
+> Stepper 21 Click is a compact add-on board that contains a bipolar stepper motor driver. This board features the DRV8825, a stepper motor controller integral circuit from Texas Instruments. It is a PWM micro-stepping stepper motor driver with up to 1/32 micro-stepping resolution and a built-in micro-stepper indexer. The driver has two H-bridge drivers and is intended to drive a bipolar stepper motor in a voltage supply operating range of 8.2V up to 45V.
+
+
+
+
+
+[click Product page](https://www.mikroe.com/stepper-21-click)
+
+---
+
+
+#### Click library
+
+- **Author** : Stefan Filipovic
+- **Date** : Apr 2023.
+- **Type** : I2C type
+
+
+# Software Support
+
+We provide a library for the Stepper 21 Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
+
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+## Library Description
+
+> This library contains API for Stepper 21 Click driver.
+
+#### Standard key functions :
+
+- `stepper21_cfg_setup` Config Object Initialization function.
+```c
+void stepper21_cfg_setup ( stepper21_cfg_t *cfg );
+```
+
+- `stepper21_init` Initialization function.
+```c
+err_t stepper21_init ( stepper21_t *ctx, stepper21_cfg_t *cfg );
+```
+
+- `stepper21_default_cfg` Click Default Configuration function.
+```c
+err_t stepper21_default_cfg ( stepper21_t *ctx );
+```
+
+#### Example key functions :
+
+- `stepper21_set_step_mode` This function sets the step mode resolution settings.
+```c
+err_t stepper21_set_step_mode ( stepper21_t *ctx, uint8_t mode );
+```
+
+- `stepper21_set_direction` This function sets the motor direction by setting the DIR pin logic state.
+```c
+void stepper21_set_direction ( stepper21_t *ctx, uint8_t dir );
+```
+
+- `stepper21_drive_motor` This function drives the motor for the specific number of steps at the selected speed.
+```c
+void stepper21_drive_motor ( stepper21_t *ctx, uint32_t steps, uint8_t speed );
+```
+
+## Example Description
+
+> This example demonstrates the use of the Stepper 21 click board by driving the motor in both directions for a desired number of steps.
+
+**The demo application is composed of two sections :**
+
+### Application Init
+
+> Initializes the driver and performs the click default configuration.
+
+```c
+
+void application_init ( void )
+{
+ log_cfg_t log_cfg; /**< Logger config object. */
+ stepper21_cfg_t stepper21_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ stepper21_cfg_setup( &stepper21_cfg );
+ STEPPER21_MAP_MIKROBUS( stepper21_cfg, MIKROBUS_1 );
+ if ( I2C_MASTER_ERROR == stepper21_init( &stepper21, &stepper21_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
+ if ( STEPPER21_ERROR == stepper21_default_cfg ( &stepper21 ) )
+ {
+ log_error( &logger, " Default configuration." );
+ for ( ; ; );
+ }
+
+ log_info( &logger, " Application Task " );
+}
+
+```
+
+### Application Task
+
+> Drives the motor clockwise for 200 full steps and then counter-clockiwse for 400 quarter
+steps with 2 seconds delay before changing the direction. All data is being logged on the USB UART where you can track the program flow.
+
+```c
+void application_task ( void )
+{
+ log_printf ( &logger, " Move 200 full steps clockwise \r\n\n" );
+ stepper21_set_step_mode ( &stepper21, STEPPER21_MODE_FULL_STEP );
+ stepper21_set_direction ( &stepper21, STEPPER21_DIR_CW );
+ stepper21_drive_motor ( &stepper21, 200, STEPPER21_SPEED_FAST );
+ Delay_ms ( 2000 );
+
+ log_printf ( &logger, " Move 400 quarter steps counter-clockwise \r\n\n" );
+ stepper21_set_step_mode ( &stepper21, STEPPER21_MODE_QUARTER_STEP );
+ stepper21_set_direction ( &stepper21, STEPPER21_DIR_CCW );
+ stepper21_drive_motor ( &stepper21, 400, STEPPER21_SPEED_VERY_FAST );
+ Delay_ms ( 2000 );
+}
+```
+
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
+
+- MikroSDK.Board
+- MikroSDK.Log
+- Click.Stepper21
+
+**Additional notes and informations**
+
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
+
+---
diff --git a/clicks/stepper21/doc/doxy/Doxyfile.doxy b/clicks/stepper21/doc/doxy/Doxyfile.doxy
new file mode 100644
index 0000000000..8f91b661b3
--- /dev/null
+++ b/clicks/stepper21/doc/doxy/Doxyfile.doxy
@@ -0,0 +1,2481 @@
+# Doxyfile 1.8.13
+
+# 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 config 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 http://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 = stepper21
+
+# 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.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
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# 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 = ../cmake/stepper21/temp/Help/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 = NO
+
+# 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 = 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, 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
+
+# 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 = 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
+
+# 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.
+
+ALIASES =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST =
+
+# 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 = YES
+
+# 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
+
+# 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,
+# C#, C, C++, D, PHP, Objective-C, Python, 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), VHDL. 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.
+
+EXTENSION_MAPPING =
+
+# 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 http://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: 0.
+# 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:
+# http://www.riverbankcomputing.co.uk/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
+
+#---------------------------------------------------------------------------
+# 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 = 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 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
+# (class|struct|union) 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
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES, upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# 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 = YES
+
+# 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 = NO
+
+# 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 http://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.
+# 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.
+# 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 =
+
+#---------------------------------------------------------------------------
+# 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 = ../cmake/stepper21/example \
+ ../cmake/stepper21/lib_stepper21/include \
+ ../cmake/stepper21/README.md
+
+# 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: http://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.
+#
+# 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, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
+# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
+
+FILE_PATTERNS = *.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 \
+ *.py \
+ *.pyw \
+ *.f90 \
+ *.f95 \
+ *.f03 \
+ *.f08 \
+ *.f \
+ *.for \
+ *.tcl \
+ *.vhd \
+ *.vhdl \
+ *.ucf \
+ *.qsf \
+ *.odl \
+ .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 =
+
+# 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 = ../cmake/stepper21/example
+
+# 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 = *
+
+# 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 =
+
+# 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 = NO
+
+# 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
+# function 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 = NO
+
+# 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 http://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 config 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 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 =
+
+#---------------------------------------------------------------------------
+# 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
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX = 5
+
+# 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
+# http://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_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: http://DEVELOPER_NAME.apple.com/tools/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_NAME/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.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 = "Mikroe Click boards"
+
+# 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 = mikroe.com
+
+# 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 = mikroe.com
+
+# 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 = MikroElektronika
+
+# 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: http://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 master .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: http://qt-project.org/doc/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 = org.doxygen.Project
+
+# 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: http://qt-project.org/doc/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 = ./temp/Help/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: http://qt-project.org/doc/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: http://qt-project.org/doc/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:
+# http://qt-project.org/doc/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 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 = org.doxygen.Project
+
+# 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 = NO
+
+# 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
+
+# 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_TRANPARENT 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
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://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/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 http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# 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/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: http://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: http://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 = NO
+
+# 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 enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# 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.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = 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 pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
+# higher quality PDF documentation.
+# 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 = NO
+
+# 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
+# http://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
+
+#---------------------------------------------------------------------------
+# 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 config
+# 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 config 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 = NO
+
+# 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 = NO
+
+#---------------------------------------------------------------------------
+# 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
+
+#---------------------------------------------------------------------------
+# 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.sf.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: NO.
+
+HAVE_DOT = NO
+
+# 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 = NO
+
+# 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 HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# 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 = NO
+
+# 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, jpg, gif, 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 = 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
+# 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 dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP = YES
diff --git a/clicks/stepper21/doc/image/click_icon.png b/clicks/stepper21/doc/image/click_icon.png
new file mode 100644
index 0000000000..24205babf1
Binary files /dev/null and b/clicks/stepper21/doc/image/click_icon.png differ
diff --git a/clicks/stepper21/doc/package/manifest.json b/clicks/stepper21/doc/package/manifest.json
new file mode 100644
index 0000000000..3a5d869308
--- /dev/null
+++ b/clicks/stepper21/doc/package/manifest.json
@@ -0,0 +1,36 @@
+{
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Motor control > Stepper",
+ "changelog": "Resources/CHANGELOG.md",
+ "contains": [
+ "libraries",
+ "hex_files",
+ "examples",
+ "source_files"
+ ],
+ "dependency_list": [],
+ "details": "Resources/DETAILS.md",
+ "display_name": "Stepper 21 click",
+ "example_list": [
+ {
+ "project_path": "Examples/example"
+ }
+ ],
+ "help": "Help/doc",
+ "icon": "Resources/click_icon.png",
+ "license": {
+ "file_path": "",
+ "id": "46"
+ },
+ "name": "mikroe.click.stepper21",
+ "product_link": "https://www.mikroe.com/stepper-21-click",
+ "short_description": "Stepper 21 Click is a compact add-on board that contains a bipolar stepper motor driver. This board features the DRV8825, a stepper motor controller integral circuit from Texas Instruments. It is a PWM micro-stepping stepper motor driver with up to 1/32 micro-stepping resolution and a built-in micro-stepper indexer. The driver has two H-bridge drivers and is intended to drive a bipolar stepper motor in a voltage supply operating range of 8.2V up to 45V.",
+ "supported_compiler": "mikroC AI|GCC",
+ "type": "Library",
+ "_type":"mikroSDK Library",
+ "version": "2.1.0.1",
+ "cmake": true,
+ "alias": "Click.Stepper21",
+ "subdir_name": "lib_stepper21"
+}
+
diff --git a/clicks/stepper21/example/CMakeLists.txt b/clicks/stepper21/example/CMakeLists.txt
new file mode 100644
index 0000000000..24461a5bd1
--- /dev/null
+++ b/clicks/stepper21/example/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_stepper21 LANGUAGES MikroC)
+else()
+ project(example_stepper21 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_stepper21
+ main.c
+
+)
+
+
+############################ example_stepper21 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_stepper21 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_stepper21 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_stepper21 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_stepper21)
+target_link_libraries(example_stepper21 PUBLIC Click.Stepper21)
+############################ example_stepper21 GENERATED CODE END ###########################
+
diff --git a/clicks/stepper21/example/main.c b/clicks/stepper21/example/main.c
new file mode 100644
index 0000000000..2f92b5a350
--- /dev/null
+++ b/clicks/stepper21/example/main.c
@@ -0,0 +1,91 @@
+/*!
+ * @file main.c
+ * @brief Stepper 21 Click example
+ *
+ * # Description
+ * This example demonstrates the use of the Stepper 21 click board by driving the
+ * motor in both directions for a desired number of steps.
+ *
+ * The demo application is composed of two sections :
+ *
+ * ## Application Init
+ * Initializes the driver and performs the click default configuration.
+ *
+ * ## Application Task
+ * Drives the motor clockwise for 200 full steps and then counter-clockiwse for 400 quarter
+ * steps with 2 seconds delay before changing the direction. All data is being logged on
+ * the USB UART where you can track the program flow.
+ *
+ * @author Stefan Filipovic
+ *
+ */
+
+#include "board.h"
+#include "log.h"
+#include "stepper21.h"
+
+static stepper21_t stepper21;
+static log_t logger;
+
+void application_init ( void )
+{
+ log_cfg_t log_cfg; /**< Logger config object. */
+ stepper21_cfg_t stepper21_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ stepper21_cfg_setup( &stepper21_cfg );
+ STEPPER21_MAP_MIKROBUS( stepper21_cfg, MIKROBUS_1 );
+ if ( I2C_MASTER_ERROR == stepper21_init( &stepper21, &stepper21_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
+ if ( STEPPER21_ERROR == stepper21_default_cfg ( &stepper21 ) )
+ {
+ log_error( &logger, " Default configuration." );
+ for ( ; ; );
+ }
+
+ log_info( &logger, " Application Task " );
+}
+
+void application_task ( void )
+{
+ log_printf ( &logger, " Move 200 full steps clockwise \r\n\n" );
+ stepper21_set_step_mode ( &stepper21, STEPPER21_MODE_FULL_STEP );
+ stepper21_set_direction ( &stepper21, STEPPER21_DIR_CW );
+ stepper21_drive_motor ( &stepper21, 200, STEPPER21_SPEED_FAST );
+ Delay_ms ( 2000 );
+
+ log_printf ( &logger, " Move 400 quarter steps counter-clockwise \r\n\n" );
+ stepper21_set_step_mode ( &stepper21, STEPPER21_MODE_QUARTER_STEP );
+ stepper21_set_direction ( &stepper21, STEPPER21_DIR_CCW );
+ stepper21_drive_motor ( &stepper21, 400, STEPPER21_SPEED_VERY_FAST );
+ Delay_ms ( 2000 );
+}
+
+void main ( void )
+{
+ application_init( );
+
+ for ( ; ; )
+ {
+ application_task( );
+ }
+}
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/stepper21/example/manifest.exm b/clicks/stepper21/example/manifest.exm
new file mode 100644
index 0000000000..b890c344e8
--- /dev/null
+++ b/clicks/stepper21/example/manifest.exm
@@ -0,0 +1,8 @@
+{
+ "name": "Stepper 21 Click",
+ "description": "Stepper 21 Click is a compact add-on board that contains a bipolar stepper motor driver. This board features the DRV8825, a stepper motor controller integral circuit from Texas Instruments. It is a PWM micro-stepping stepper motor driver with up to 1/32 micro-stepping resolution and a built-in micro-stepper indexer. The driver has two H-bridge drivers and is intended to drive a bipolar stepper motor in a voltage supply operating range of 8.2V up to 45V.",
+ "image" : "../../Resources/click_icon.png",
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
+ "hw" : ["click","DRV8825PWPR","PCA9538A"],
+ "category" : ["Click Boards > Motor control > Stepper"]
+}
diff --git a/clicks/stepper21/lib_stepper21/CMakeLists.txt b/clicks/stepper21/lib_stepper21/CMakeLists.txt
new file mode 100644
index 0000000000..479faecb4b
--- /dev/null
+++ b/clicks/stepper21/lib_stepper21/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_stepper21 LANGUAGES MikroC)
+else()
+ project(lib_stepper21 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_stepper21 STATIC
+ src/stepper21.c
+ include/stepper21.h
+)
+add_library(Click.Stepper21 ALIAS lib_stepper21)
+
+
+
+target_include_directories(lib_stepper21 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_stepper21 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_stepper21 PUBLIC MikroSDK.Driver)
+
diff --git a/clicks/stepper21/lib_stepper21/include/Click.Stepper21 b/clicks/stepper21/lib_stepper21/include/Click.Stepper21
new file mode 100644
index 0000000000..a58c449d1a
--- /dev/null
+++ b/clicks/stepper21/lib_stepper21/include/Click.Stepper21
@@ -0,0 +1 @@
+#include "stepper21.h"
diff --git a/clicks/stepper21/lib_stepper21/include/stepper21.h b/clicks/stepper21/lib_stepper21/include/stepper21.h
new file mode 100644
index 0000000000..70aece5473
--- /dev/null
+++ b/clicks/stepper21/lib_stepper21/include/stepper21.h
@@ -0,0 +1,550 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file stepper21.h
+ * @brief This file contains API for Stepper 21 Click Driver.
+ */
+
+#ifndef STEPPER21_H
+#define STEPPER21_H
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_i2c_master.h"
+
+/*!
+ * @addtogroup stepper21 Stepper 21 Click Driver
+ * @brief API for configuring and manipulating Stepper 21 Click driver.
+ * @{
+ */
+
+/**
+ * @defgroup stepper21_reg Stepper 21 Registers List
+ * @brief List of registers of Stepper 21 Click driver.
+ */
+
+/**
+ * @addtogroup stepper21_reg
+ * @{
+ */
+
+/**
+ * @brief Stepper 21 PCA9538A registers.
+ * @details Specified PCA9538A registers of Stepper 21 Click driver.
+ */
+#define STEPPER21_REG_INPUT 0x00
+#define STEPPER21_REG_OUTPUT 0x01
+#define STEPPER21_REG_POLARITY 0x02
+#define STEPPER21_REG_CONFIG 0x03
+
+/*! @} */ // stepper21_reg
+
+/**
+ * @defgroup stepper21_set Stepper 21 Registers Settings
+ * @brief Settings for registers of Stepper 21 Click driver.
+ */
+
+/**
+ * @addtogroup stepper21_set
+ * @{
+ */
+
+/**
+ * @brief Stepper 21 PCA9538A pin mask.
+ * @details Specified PCA9538A pin mask of Stepper 21 Click driver.
+ */
+#define STEPPER21_PIN_SLEEP 0x01
+#define STEPPER21_PIN_FAULT 0x02
+#define STEPPER21_PIN_DECAY 0x04
+#define STEPPER21_PIN_ENABLE 0x08
+#define STEPPER21_PIN_HOME 0x10
+#define STEPPER21_PIN_MODE0 0x20
+#define STEPPER21_PIN_MODE1 0x40
+#define STEPPER21_PIN_MODE2 0x80
+
+/**
+ * @brief Stepper 21 PCA9538A pin direction config.
+ * @details Specified PCA9538A pin direction config of Stepper 21 Click driver.
+ */
+#define STEPPER21_DEFAULT_CONFIG 0x16
+
+/**
+ * @brief Stepper 21 direction setting.
+ * @details Specified setting for direction of Stepper 21 Click driver.
+ */
+#define STEPPER21_DIR_CCW 0
+#define STEPPER21_DIR_CW 1
+
+/**
+ * @brief Stepper 21 pin logic state setting.
+ * @details Specified setting for pin logic state of Stepper 21 Click driver.
+ */
+#define STEPPER21_PIN_STATE_LOW 0
+#define STEPPER21_PIN_STATE_HIGH 1
+#define STEPPER21_PIN_STATE_OPEN 2
+
+/**
+ * @brief Stepper 21 step resolution setting.
+ * @details Specified setting for step resolution of Stepper 21 Click driver.
+ */
+#define STEPPER21_MODE_FULL_STEP 0x00
+#define STEPPER21_MODE_HALF_STEP 0x01
+#define STEPPER21_MODE_QUARTER_STEP 0x02
+#define STEPPER21_MODE_1_OVER_8 0x03
+#define STEPPER21_MODE_1_OVER_16 0x04
+#define STEPPER21_MODE_1_OVER_32 0x05
+#define STEPPER21_MODE_MASK 0x07
+
+/**
+ * @brief Stepper 21 device speed settings.
+ * @details Specified setting for rotation speed.
+ */
+#define STEPPER21_SPEED_VERY_SLOW 0
+#define STEPPER21_SPEED_SLOW 1
+#define STEPPER21_SPEED_MEDIUM 2
+#define STEPPER21_SPEED_FAST 3
+#define STEPPER21_SPEED_VERY_FAST 4
+
+/**
+ * @brief Stepper 21 device address setting.
+ * @details Specified setting for device slave address selection of
+ * Stepper 21 Click driver.
+ */
+#define STEPPER21_DEVICE_ADDRESS_A1A0_00 0x70
+#define STEPPER21_DEVICE_ADDRESS_A1A0_01 0x71
+#define STEPPER21_DEVICE_ADDRESS_A1A0_10 0x72
+#define STEPPER21_DEVICE_ADDRESS_A1A0_11 0x73
+
+/*! @} */ // stepper21_set
+
+/**
+ * @defgroup stepper21_map Stepper 21 MikroBUS Map
+ * @brief MikroBUS pin mapping of Stepper 21 Click driver.
+ */
+
+/**
+ * @addtogroup stepper21_map
+ * @{
+ */
+
+/**
+ * @brief MikroBUS pin mapping.
+ * @details Mapping pins of Stepper 21 Click to the selected MikroBUS.
+ */
+#define STEPPER21_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
+ cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
+ cfg.dir = MIKROBUS( mikrobus, MIKROBUS_AN ); \
+ cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
+ cfg.step = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
+ cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
+
+/*! @} */ // stepper21_map
+/*! @} */ // stepper21
+
+/**
+ * @brief Stepper 21 Click context object.
+ * @details Context object definition of Stepper 21 Click driver.
+ */
+typedef struct
+{
+ // Output pins
+ digital_out_t dir; /**< Direction control pin. */
+ digital_out_t rst; /**< Electric angle reset and PCA9538A reset pin. */
+ digital_out_t step; /**< Step signal pin. */
+
+ // Input pins
+ digital_in_t int_pin; /**< PCA9538A interrupt pin. */
+
+ // Modules
+ i2c_master_t i2c; /**< I2C driver object. */
+
+ // I2C slave address
+ uint8_t slave_address; /**< Device slave address (used for I2C driver). */
+
+} stepper21_t;
+
+/**
+ * @brief Stepper 21 Click configuration object.
+ * @details Configuration object definition of Stepper 21 Click driver.
+ */
+typedef struct
+{
+ pin_name_t scl; /**< Clock pin descriptor for I2C driver. */
+ pin_name_t sda; /**< Bidirectional data pin descriptor for I2C driver. */
+
+ pin_name_t dir; /**< Direction control pin. */
+ pin_name_t rst; /**< Electric angle reset and PCA9538A reset pin. */
+ pin_name_t step; /**< Step signal pin. */
+ pin_name_t int_pin; /**< PCA9538A interrupt pin. */
+
+ uint32_t i2c_speed; /**< I2C serial speed. */
+ uint8_t i2c_address; /**< I2C slave address. */
+
+} stepper21_cfg_t;
+
+/**
+ * @brief Stepper 21 Click return value data.
+ * @details Predefined enum values for driver return values.
+ */
+typedef enum
+{
+ STEPPER21_OK = 0,
+ STEPPER21_ERROR = -1
+
+} stepper21_return_value_t;
+
+/*!
+ * @addtogroup stepper21 Stepper 21 Click Driver
+ * @brief API for configuring and manipulating Stepper 21 Click driver.
+ * @{
+ */
+
+/**
+ * @brief Stepper 21 configuration object setup function.
+ * @details This function initializes click configuration structure to initial
+ * values.
+ * @param[out] cfg : Click configuration structure.
+ * See #stepper21_cfg_t object definition for detailed explanation.
+ * @return Nothing.
+ * @note The all used pins will be set to unconnected state.
+ */
+void stepper21_cfg_setup ( stepper21_cfg_t *cfg );
+
+/**
+ * @brief Stepper 21 initialization function.
+ * @details This function initializes all necessary pins and peripherals used
+ * for this click board.
+ * @param[out] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[in] cfg : Click configuration structure.
+ * See #stepper21_cfg_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_init ( stepper21_t *ctx, stepper21_cfg_t *cfg );
+
+/**
+ * @brief Stepper 21 default configuration function.
+ * @details This function executes a default configuration of Stepper 21
+ * click board.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note This function can consist any necessary configuration or setting to put
+ * device into operating mode.
+ */
+err_t stepper21_default_cfg ( stepper21_t *ctx );
+
+/**
+ * @brief Stepper 21 write register function.
+ * @details This function writes a desired data byte to the selected PCA9538A register
+ * by using I2C serial interface.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[in] reg : Register address.
+ * @param[in] data_in : Data to be written.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_write_register ( stepper21_t *ctx, uint8_t reg, uint8_t data_in );
+
+/**
+ * @brief Stepper 21 read register function.
+ * @details This function reads data from the selected PCA9538A register by using I2C serial interface.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[in] reg : Register address.
+ * @param[out] data_out : Output read data.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_read_register ( stepper21_t *ctx, uint8_t reg, uint8_t *data_out );
+
+/**
+ * @brief Stepper 21 get step mode function.
+ * @details This function reads the step mode resolution settings.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[out] mode : Step mode resolution.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_get_step_mode ( stepper21_t *ctx, uint8_t *mode );
+
+/**
+ * @brief Stepper 21 set step mode function.
+ * @details This function sets the step mode resolution settings.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[in] mode : Step mode resolution.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_set_step_mode ( stepper21_t *ctx, uint8_t mode );
+
+/**
+ * @brief Stepper 21 get sleep pin function.
+ * @details This function reads the sleep pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[out] state : @li @c 0 - Low logic state,
+ * @li @c 1 - High logic state.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_get_sleep_pin ( stepper21_t *ctx, uint8_t *state );
+
+/**
+ * @brief Stepper 21 set sleep pin function.
+ * @details This function sets the sleep pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[in] state : @li @c 0 - Low logic state,
+ * @li @c 1 - High logic state.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_set_sleep_pin ( stepper21_t *ctx, uint8_t state );
+
+/**
+ * @brief Stepper 21 get fault pin function.
+ * @details This function reads the fault pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[out] state : @li @c 0 - Low logic state,
+ * @li @c 1 - High logic state.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_get_fault_pin ( stepper21_t *ctx, uint8_t *state );
+
+/**
+ * @brief Stepper 21 get decay pin function.
+ * @details This function reads the decay pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[out] state : @li @c 0 - Low logic state,
+ * @li @c 1 - High logic state,
+ * @li @c 2 - Open state.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_get_decay_pin ( stepper21_t *ctx, uint8_t *state );
+
+/**
+ * @brief Stepper 21 set decay pin function.
+ * @details This function sets the decay pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[in] state : @li @c 0 - Low logic state,
+ * @li @c 1 - High logic state,
+ * @li @c 2 - Open state.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_set_decay_pin ( stepper21_t *ctx, uint8_t state );
+
+/**
+ * @brief Stepper 21 get enable pin function.
+ * @details This function reads the enable pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[out] state : @li @c 0 - Low logic state,
+ * @li @c 1 - High logic state.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_get_enable_pin ( stepper21_t *ctx, uint8_t *state );
+
+/**
+ * @brief Stepper 21 set enable pin function.
+ * @details This function sets the enable pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[in] state : @li @c 0 - Low logic state,
+ * @li @c 1 - High logic state.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_set_enable_pin ( stepper21_t *ctx, uint8_t state );
+
+/**
+ * @brief Stepper 21 get home pin function.
+ * @details This function reads the home pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[out] state : @li @c 0 - Low logic state,
+ * @li @c 1 - High logic state.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_get_home_pin ( stepper21_t *ctx, uint8_t *state );
+
+/**
+ * @brief Stepper 21 driver motor function.
+ * @details This function drives the motor for the specific number of steps at the selected speed.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[in] steps : Number of steps to rotate motor.
+ * @param[in] speed : Motor rotation speed:
+ * @li @c 0 - Very slow,
+ * @li @c 1 - Slow,
+ * @li @c 2 - Medium,
+ * @li @c 3 - Fast,
+ * @li @c 4 - Very fast,
+ * @return None.
+ * @note None.
+ */
+void stepper21_drive_motor ( stepper21_t *ctx, uint32_t steps, uint8_t speed );
+
+/**
+ * @brief Stepper 21 enable device function.
+ * @details This function enables the device by setting the ENABLE pin to low logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_enable_device ( stepper21_t *ctx );
+
+/**
+ * @brief Stepper 21 disable device function.
+ * @details This function disables the device by setting the ENABLE pin to high logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t stepper21_disable_device ( stepper21_t *ctx );
+
+/**
+ * @brief Stepper 21 set direction function.
+ * @details This function sets the motor direction by setting the DIR pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[in] dir : @li @c 0 - Counter-Clockwise,
+ * @li @c 1 - Clockwise.
+ * @return None.
+ * @note None.
+ */
+void stepper21_set_direction ( stepper21_t *ctx, uint8_t dir );
+
+/**
+ * @brief Stepper 21 switch direction function.
+ * @details This function switches the motor direction by toggling the DIR pin.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @return None.
+ * @note None.
+ */
+void stepper21_switch_direction ( stepper21_t *ctx );
+
+/**
+ * @brief Stepper 21 set rst pin function.
+ * @details This function sets the RST pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[in] state : @li @c 0 - Low logic state,
+ * @li @c 1 - High logic state.
+ * @return None.
+ * @note None.
+ */
+void stepper21_set_rst_pin ( stepper21_t *ctx, uint8_t state );
+
+/**
+ * @brief Stepper 21 reset device function.
+ * @details This function resets the device by toggling the RST pin.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @return None.
+ * @note None.
+ */
+void stepper21_reset_device ( stepper21_t *ctx );
+
+/**
+ * @brief Stepper 21 get int pin function.
+ * @details This function returns the INT pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @return Pin logic state.
+ * @note None.
+ */
+uint8_t stepper21_get_int_pin ( stepper21_t *ctx );
+
+/**
+ * @brief Stepper 21 set step pin function.
+ * @details This function sets the STEP pin logic state.
+ * @param[in] ctx : Click context object.
+ * See #stepper21_t object definition for detailed explanation.
+ * @param[in] state : @li @c 0 - Low logic state,
+ * @li @c 1 - High logic state.
+ * @return None.
+ * @note None.
+ */
+void stepper21_set_step_pin ( stepper21_t *ctx, uint8_t state );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // STEPPER21_H
+
+/*! @} */ // stepper21
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/stepper21/lib_stepper21/src/stepper21.c b/clicks/stepper21/lib_stepper21/src/stepper21.c
new file mode 100644
index 0000000000..a209c1ae3b
--- /dev/null
+++ b/clicks/stepper21/lib_stepper21/src/stepper21.c
@@ -0,0 +1,400 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file stepper21.c
+ * @brief Stepper 21 Click Driver.
+ */
+
+#include "stepper21.h"
+
+/**
+ * @brief Set delay for controlling motor speed.
+ * @details This function sets a delay between toggling step pin.
+ * @param[in] speed_macro : Speed macro for selecting how long the delay will be.
+ * @return Nothing.
+ */
+static void stepper21_speed_delay ( uint8_t speed_macro );
+
+void stepper21_cfg_setup ( stepper21_cfg_t *cfg )
+{
+ // Communication gpio pins
+ cfg->scl = HAL_PIN_NC;
+ cfg->sda = HAL_PIN_NC;
+
+ // Additional gpio pins
+ cfg->dir = HAL_PIN_NC;
+ cfg->rst = HAL_PIN_NC;
+ cfg->step = HAL_PIN_NC;
+ cfg->int_pin = HAL_PIN_NC;
+
+ cfg->i2c_speed = I2C_MASTER_SPEED_STANDARD;
+ cfg->i2c_address = STEPPER21_DEVICE_ADDRESS_A1A0_00;
+}
+
+err_t stepper21_init ( stepper21_t *ctx, stepper21_cfg_t *cfg )
+{
+ i2c_master_config_t i2c_cfg;
+
+ i2c_master_configure_default( &i2c_cfg );
+
+ i2c_cfg.scl = cfg->scl;
+ i2c_cfg.sda = cfg->sda;
+
+ ctx->slave_address = cfg->i2c_address;
+
+ if ( I2C_MASTER_ERROR == i2c_master_open( &ctx->i2c, &i2c_cfg ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ if ( I2C_MASTER_ERROR == i2c_master_set_slave_address( &ctx->i2c, ctx->slave_address ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ if ( I2C_MASTER_ERROR == i2c_master_set_speed( &ctx->i2c, cfg->i2c_speed ) )
+ {
+ return I2C_MASTER_ERROR;
+ }
+
+ digital_out_init( &ctx->dir, cfg->dir );
+ digital_out_init( &ctx->rst, cfg->rst );
+ digital_out_init( &ctx->step, cfg->step );
+
+ digital_in_init( &ctx->int_pin, cfg->int_pin );
+
+ return I2C_MASTER_SUCCESS;
+}
+
+err_t stepper21_default_cfg ( stepper21_t *ctx )
+{
+ err_t error_flag = STEPPER21_OK;
+ stepper21_reset_device ( ctx );
+ error_flag |= stepper21_enable_device ( ctx );
+ stepper21_set_direction ( ctx, STEPPER21_DIR_CW );
+ // Configure FAULT, DECAY, and HOME pins as INPUT, others as OUTPUT
+ error_flag |= stepper21_write_register ( ctx, STEPPER21_REG_CONFIG, STEPPER21_DEFAULT_CONFIG );
+ error_flag |= stepper21_set_sleep_pin ( ctx, STEPPER21_PIN_STATE_HIGH );
+ error_flag |= stepper21_set_decay_pin ( ctx, STEPPER21_PIN_STATE_OPEN );
+ error_flag |= stepper21_set_step_mode ( ctx, STEPPER21_MODE_FULL_STEP );
+ return error_flag;
+}
+
+err_t stepper21_write_register ( stepper21_t *ctx, uint8_t reg, uint8_t data_in )
+{
+ uint8_t data_buf[ 2 ] = { 0 };
+ data_buf[ 0 ] = reg;
+ data_buf[ 1 ] = data_in;
+ return i2c_master_write( &ctx->i2c, data_buf, 2 );
+}
+
+err_t stepper21_read_register ( stepper21_t *ctx, uint8_t reg, uint8_t *data_out )
+{
+ return i2c_master_write_then_read( &ctx->i2c, ®, 1, data_out, 1 );
+}
+
+err_t stepper21_get_step_mode ( stepper21_t *ctx, uint8_t *mode )
+{
+ uint8_t reg_data = 0;
+ if ( STEPPER21_ERROR == stepper21_read_register ( ctx, STEPPER21_REG_OUTPUT, ®_data ) )
+ {
+ return STEPPER21_ERROR;
+ }
+ *mode = ( reg_data >> 5 ) & STEPPER21_MODE_MASK;
+ return STEPPER21_OK;
+}
+
+err_t stepper21_set_step_mode ( stepper21_t *ctx, uint8_t mode )
+{
+ uint8_t reg_data = 0;
+ if ( mode > STEPPER21_MODE_1_OVER_32 )
+ {
+ return STEPPER21_ERROR;
+ }
+ if ( STEPPER21_ERROR == stepper21_read_register ( ctx, STEPPER21_REG_OUTPUT, ®_data ) )
+ {
+ return STEPPER21_ERROR;
+ }
+ if ( mode == ( ( reg_data >> 5 ) & STEPPER21_MODE_MASK ) )
+ {
+ return STEPPER21_OK;
+ }
+ reg_data &= ~( STEPPER21_MODE_MASK << 5 );
+ reg_data |= ( mode << 5 );
+ return stepper21_write_register ( ctx, STEPPER21_REG_OUTPUT, reg_data );
+}
+
+err_t stepper21_get_sleep_pin ( stepper21_t *ctx, uint8_t *state )
+{
+ uint8_t reg_data = 0;
+ if ( STEPPER21_ERROR == stepper21_read_register ( ctx, STEPPER21_REG_OUTPUT, ®_data ) )
+ {
+ return STEPPER21_ERROR;
+ }
+ *state = ( reg_data & STEPPER21_PIN_SLEEP );
+ return STEPPER21_OK;
+}
+
+err_t stepper21_set_sleep_pin ( stepper21_t *ctx, uint8_t state )
+{
+ uint8_t reg_data = 0;
+ if ( state > STEPPER21_PIN_STATE_HIGH )
+ {
+ return STEPPER21_ERROR;
+ }
+ if ( STEPPER21_ERROR == stepper21_read_register ( ctx, STEPPER21_REG_OUTPUT, ®_data ) )
+ {
+ return STEPPER21_ERROR;
+ }
+ if ( state == ( reg_data & STEPPER21_PIN_SLEEP ) )
+ {
+ return STEPPER21_OK;
+ }
+ reg_data &= ~STEPPER21_PIN_SLEEP;
+ reg_data |= state;
+ return stepper21_write_register ( ctx, STEPPER21_REG_OUTPUT, reg_data );
+}
+
+err_t stepper21_get_fault_pin ( stepper21_t *ctx, uint8_t *state )
+{
+ uint8_t reg_data = 0;
+ if ( STEPPER21_ERROR == stepper21_read_register ( ctx, STEPPER21_REG_INPUT, ®_data ) )
+ {
+ return STEPPER21_ERROR;
+ }
+ *state = ( reg_data & STEPPER21_PIN_FAULT ) >> 1;
+ return STEPPER21_OK;
+}
+
+err_t stepper21_get_decay_pin ( stepper21_t *ctx, uint8_t *state )
+{
+ uint8_t reg_data = 0;
+ if ( STEPPER21_ERROR == stepper21_read_register ( ctx, STEPPER21_REG_CONFIG, ®_data ) )
+ {
+ return STEPPER21_ERROR;
+ }
+ if ( reg_data & STEPPER21_PIN_DECAY )
+ {
+ *state = STEPPER21_PIN_STATE_OPEN;
+ }
+ else
+ {
+ if ( STEPPER21_ERROR == stepper21_read_register ( ctx, STEPPER21_REG_OUTPUT, ®_data ) )
+ {
+ return STEPPER21_ERROR;
+ }
+ *state = ( reg_data & STEPPER21_PIN_DECAY ) >> 2;
+ }
+ return STEPPER21_OK;
+}
+
+err_t stepper21_set_decay_pin ( stepper21_t *ctx, uint8_t state )
+{
+ uint8_t reg_data = 0;
+ if ( state > STEPPER21_PIN_STATE_OPEN )
+ {
+ return STEPPER21_ERROR;
+ }
+
+ // Check if decay pin is configured as input (state open) or output (state low/high)
+ if ( STEPPER21_ERROR == stepper21_read_register ( ctx, STEPPER21_REG_CONFIG, ®_data ) )
+ {
+ return STEPPER21_ERROR;
+ }
+
+ // Check and configure the pin as input for open state
+ if ( STEPPER21_PIN_STATE_OPEN == state)
+ {
+ if ( STEPPER21_PIN_DECAY == ( reg_data & STEPPER21_PIN_DECAY ) )
+ {
+ return STEPPER21_OK;
+ }
+ else
+ {
+ reg_data |= STEPPER21_PIN_DECAY;
+ return stepper21_write_register ( ctx, STEPPER21_REG_CONFIG, reg_data );
+ }
+ }
+
+ // Check and configure the pin as output for low or high states
+ if ( STEPPER21_PIN_DECAY == ( reg_data & STEPPER21_PIN_DECAY ) )
+ {
+ reg_data &= ~STEPPER21_PIN_DECAY;
+ if ( STEPPER21_ERROR == stepper21_write_register ( ctx, STEPPER21_REG_CONFIG, reg_data ) )
+ {
+ return STEPPER21_ERROR;
+ }
+ }
+
+ // Check and configure the pin output state
+ if ( STEPPER21_ERROR == stepper21_read_register ( ctx, STEPPER21_REG_OUTPUT, ®_data ) )
+ {
+ return STEPPER21_ERROR;
+ }
+ if ( state == ( ( reg_data & STEPPER21_PIN_DECAY ) >> 2 ) )
+ {
+ return STEPPER21_OK;
+ }
+ reg_data &= ~STEPPER21_PIN_DECAY;
+ reg_data |= ( state << 2 );
+ return stepper21_write_register ( ctx, STEPPER21_REG_OUTPUT, reg_data );
+}
+
+err_t stepper21_get_enable_pin ( stepper21_t *ctx, uint8_t *state )
+{
+ uint8_t reg_data = 0;
+ if ( STEPPER21_ERROR == stepper21_read_register ( ctx, STEPPER21_REG_OUTPUT, ®_data ) )
+ {
+ return STEPPER21_ERROR;
+ }
+ *state = ( reg_data & STEPPER21_PIN_ENABLE ) >> 3;
+ return STEPPER21_OK;
+}
+
+err_t stepper21_set_enable_pin ( stepper21_t *ctx, uint8_t state )
+{
+ uint8_t reg_data = 0;
+ if ( state > STEPPER21_PIN_STATE_HIGH )
+ {
+ return STEPPER21_ERROR;
+ }
+ if ( STEPPER21_ERROR == stepper21_read_register ( ctx, STEPPER21_REG_OUTPUT, ®_data ) )
+ {
+ return STEPPER21_ERROR;
+ }
+ if ( state == ( reg_data & STEPPER21_PIN_ENABLE ) )
+ {
+ return STEPPER21_OK;
+ }
+ reg_data &= ~STEPPER21_PIN_ENABLE;
+ reg_data |= ( state << 3 );
+ return stepper21_write_register ( ctx, STEPPER21_REG_OUTPUT, reg_data );
+}
+
+err_t stepper21_get_home_pin ( stepper21_t *ctx, uint8_t *state )
+{
+ uint8_t reg_data = 0;
+ if ( STEPPER21_ERROR == stepper21_read_register ( ctx, STEPPER21_REG_INPUT, ®_data ) )
+ {
+ return STEPPER21_ERROR;
+ }
+ *state = ( reg_data & STEPPER21_PIN_HOME ) >> 4;
+ return STEPPER21_OK;
+}
+
+void stepper21_drive_motor ( stepper21_t *ctx, uint32_t steps, uint8_t speed )
+{
+ stepper21_enable_device ( ctx );
+ for ( uint32_t cnt = 0; cnt < steps; cnt++ )
+ {
+ stepper21_set_step_pin ( ctx, STEPPER21_PIN_STATE_HIGH );
+ stepper21_speed_delay ( speed );
+ stepper21_set_step_pin ( ctx, STEPPER21_PIN_STATE_LOW );
+ stepper21_speed_delay ( speed );
+ }
+ stepper21_disable_device ( ctx );
+}
+
+err_t stepper21_enable_device ( stepper21_t *ctx )
+{
+ return stepper21_set_enable_pin ( ctx, STEPPER21_PIN_STATE_LOW );
+}
+
+err_t stepper21_disable_device ( stepper21_t *ctx )
+{
+ return stepper21_set_enable_pin ( ctx, STEPPER21_PIN_STATE_HIGH );
+}
+
+void stepper21_set_direction ( stepper21_t *ctx, uint8_t dir )
+{
+ digital_out_write ( &ctx->dir, dir );
+}
+
+void stepper21_switch_direction ( stepper21_t *ctx )
+{
+ digital_out_toggle ( &ctx->dir );
+}
+
+void stepper21_reset_device ( stepper21_t *ctx )
+{
+ digital_out_low ( &ctx->rst );
+ Delay_100ms ( );
+ digital_out_high ( &ctx->rst );
+ Delay_100ms ( );
+}
+
+void stepper21_set_rst_pin ( stepper21_t *ctx, uint8_t state )
+{
+ digital_out_write ( &ctx->rst, state );
+}
+
+uint8_t stepper21_get_int_pin ( stepper21_t *ctx )
+{
+ return digital_in_read ( &ctx->int_pin );
+}
+
+void stepper21_set_step_pin ( stepper21_t *ctx, uint8_t state )
+{
+ digital_out_write ( &ctx->step, state );
+}
+
+static void stepper21_speed_delay ( uint8_t speed_macro )
+{
+ switch ( speed_macro )
+ {
+ case STEPPER21_SPEED_VERY_SLOW:
+ {
+ Delay_10ms( );
+ break;
+ }
+ case STEPPER21_SPEED_SLOW:
+ {
+ Delay_5ms( );
+ break;
+ }
+ case STEPPER21_SPEED_MEDIUM:
+ {
+ Delay_1ms( );
+ Delay_1ms( );
+ Delay_500us( );
+ break;
+ }
+ case STEPPER21_SPEED_FAST:
+ {
+ Delay_1ms( );
+ break;
+ }
+ case STEPPER21_SPEED_VERY_FAST:
+ {
+ Delay_500us( );
+ break;
+ }
+ default:
+ {
+ Delay_1ms( );
+ break;
+ }
+ }
+}
+
+// ------------------------------------------------------------------------- END
diff --git a/clicks/stspin233/CHANGELOG.md b/clicks/stspin233/CHANGELOG.md
index fcfecd1843..dae6081f37 100644
--- a/clicks/stspin233/CHANGELOG.md
+++ b/clicks/stspin233/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.6
+### Version 2.1.0.6
- Initial release
diff --git a/clicks/stspin233/CMakeLists.txt b/clicks/stspin233/CMakeLists.txt
new file mode 100644
index 0000000000..32a9b5dcb4
--- /dev/null
+++ b/clicks/stspin233/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_stspin233 LANGUAGES MikroC)
+else()
+ project(example_stspin233 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_stspin233
+ example/main.c
+
+)
+
+
+############################ example_stspin233 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_stspin233 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_stspin233 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_stspin233 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_stspin233)
+target_link_libraries(example_stspin233 PUBLIC Click.Stspin233)
+############################ example_stspin233 GENERATED CODE END ###########################
diff --git a/clicks/stspin233/doc/doxy/Doxyfile.doxy b/clicks/stspin233/doc/doxy/Doxyfile.doxy
index 46d4d5184a..ded0430ca7 100644
--- a/clicks/stspin233/doc/doxy/Doxyfile.doxy
+++ b/clicks/stspin233/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/stspin233/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/stspin233/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/stspin233/example \
- ../clicks/stspin233/lib/include \
- ../clicks/stspin233/README.md
+INPUT = ../cmake/stspin233/example \
+ ../cmake/stspin233/lib_stspin233/include \
+ ../cmake/stspin233/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/stspin233/example
+EXAMPLE_PATH = ../cmake/stspin233/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/stspin233/doc/package/manifest.json b/clicks/stspin233/doc/package/manifest.json
index 6853856c9e..0264c9b4f1 100644
--- a/clicks/stspin233/doc/package/manifest.json
+++ b/clicks/stspin233/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Brushed",
+ "architecture": "ARM|PIC|PIC32|RISC-V",
+ "category": "Click Boards > Motor control > Brushless",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "STSPIN233 click",
"example_list": [
@@ -26,16 +25,14 @@
"name": "mikroe.click.stspin233",
"product_link": "https://www.mikroe.com/stspin233-click",
"short_description": "STSPIN233 click is a complete solution for a 3-phase integrated motor driver, based on the STSPIN233, Low voltage 3-phase integrated motor driver.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "_type": "mikroSDK Library",
+ "related_projects": [
2969
],
- "version": "2.0.0.6"
+ "version": "2.1.0.6",
+ "cmake": true,
+ "alias": "Click.Stspin233",
+ "subdir_name": "lib_stspin233"
}
-
-
-
-
-
diff --git a/clicks/stspin233/example/CMakeLists.txt b/clicks/stspin233/example/CMakeLists.txt
new file mode 100644
index 0000000000..d5cf350419
--- /dev/null
+++ b/clicks/stspin233/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_stspin233 LANGUAGES MikroC)
+else()
+ project(example_stspin233 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_stspin233
+ main.c
+
+)
+
+
+############################ example_stspin233 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_stspin233 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_stspin233 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_stspin233 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_stspin233)
+target_link_libraries(example_stspin233 PUBLIC Click.Stspin233)
+############################ example_stspin233 GENERATED CODE END ###########################
diff --git a/clicks/stspin233/example/manifest.exm b/clicks/stspin233/example/manifest.exm
index 1bb6cf7353..859696ff65 100644
--- a/clicks/stspin233/example/manifest.exm
+++ b/clicks/stspin233/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "STSPIN233 Click",
"description": "STSPIN233 click is a complete solution for a 3-phase integrated motor driver, based on the STSPIN233, Low voltage 3-phase integrated motor driver.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv"],
"hw" : ["click","STSPIN233"],
"category" : ["Brushed"]
}
diff --git a/clicks/stspin233/example/memake.txt b/clicks/stspin233/example/memake.txt
deleted file mode 100644
index 64933c3f3f..0000000000
--- a/clicks/stspin233/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_stspin233
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Stspin233
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/stspin233/lib/memake.txt b/clicks/stspin233/lib/memake.txt
deleted file mode 100644
index 336171a95c..0000000000
--- a/clicks/stspin233/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_stspin233
-
-alias: Click.Stspin233
-
-sources: {
- src/stspin233.c
-}
-
-headers: {
- include/stspin233.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/stspin233.h) dst(include/stspin233.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/stspin233/lib_stspin233/CMakeLists.txt b/clicks/stspin233/lib_stspin233/CMakeLists.txt
new file mode 100644
index 0000000000..ae70d60407
--- /dev/null
+++ b/clicks/stspin233/lib_stspin233/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_stspin233 LANGUAGES MikroC)
+else()
+ project(lib_stspin233 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_stspin233 STATIC
+ src/stspin233.c
+ include/stspin233.h
+)
+add_library(Click.Stspin233 ALIAS lib_stspin233)
+
+
+
+target_include_directories(lib_stspin233 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_stspin233 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_stspin233 PUBLIC MikroSDK.Driver)
diff --git a/clicks/stspin233/lib_stspin233/include/Click.Stspin233 b/clicks/stspin233/lib_stspin233/include/Click.Stspin233
new file mode 100644
index 0000000000..8a0f1f40d2
--- /dev/null
+++ b/clicks/stspin233/lib_stspin233/include/Click.Stspin233
@@ -0,0 +1 @@
+#include "stspin233.h"
diff --git a/clicks/stspin233/lib/include/stspin233.h b/clicks/stspin233/lib_stspin233/include/stspin233.h
similarity index 100%
rename from clicks/stspin233/lib/include/stspin233.h
rename to clicks/stspin233/lib_stspin233/include/stspin233.h
diff --git a/clicks/stspin233/lib/src/stspin233.c b/clicks/stspin233/lib_stspin233/src/stspin233.c
similarity index 100%
rename from clicks/stspin233/lib/src/stspin233.c
rename to clicks/stspin233/lib_stspin233/src/stspin233.c
diff --git a/clicks/stspin233/memake.txt b/clicks/stspin233/memake.txt
deleted file mode 100644
index aaa487cc4a..0000000000
--- a/clicks/stspin233/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Stspin233
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/terminal/CHANGELOG.md b/clicks/terminal/CHANGELOG.md
index 97df45d2c4..3a59131d28 100644
--- a/clicks/terminal/CHANGELOG.md
+++ b/clicks/terminal/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.7
+### Version 2.1.0.7
- Initial release
diff --git a/clicks/terminal/CMakeLists.txt b/clicks/terminal/CMakeLists.txt
new file mode 100644
index 0000000000..3ad1ff9ea8
--- /dev/null
+++ b/clicks/terminal/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_terminal LANGUAGES MikroC)
+else()
+ project(example_terminal LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_terminal
+ example/main.c
+
+)
+
+
+############################ example_terminal GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_terminal PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_terminal PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_terminal PUBLIC MikroSDK.Log)
+add_subdirectory(lib_terminal)
+target_link_libraries(example_terminal PUBLIC Click.Terminal)
+############################ example_terminal GENERATED CODE END ###########################
diff --git a/clicks/terminal/doc/doxy/Doxyfile.doxy b/clicks/terminal/doc/doxy/Doxyfile.doxy
index 3b3b6d9f49..a7db6a6ea5 100644
--- a/clicks/terminal/doc/doxy/Doxyfile.doxy
+++ b/clicks/terminal/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/terminal/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/terminal/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/terminal/example \
- ../clicks/terminal/lib/include \
- ../clicks/terminal/README.md
+INPUT = ../cmake/terminal/example \
+ ../cmake/terminal/lib_terminal/include \
+ ../cmake/terminal/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/terminal/example
+EXAMPLE_PATH = ../cmake/terminal/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/terminal/doc/package/manifest.json b/clicks/terminal/doc/package/manifest.json
index b6ace8c229..7a1489a64a 100644
--- a/clicks/terminal/doc/package/manifest.json
+++ b/clicks/terminal/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Adapter",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Interface > Adapter",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Terminal click",
"example_list": [
@@ -26,14 +25,11 @@
"name": "mikroe.click.terminal",
"product_link": "https://www.mikroe.com/terminal-click",
"short_description": "Terminal click can be especially interesting for the development systems that are equipped with mikroBUS™ slots only, or small number of GPIO pins available, such as the Clicker family of development systems.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
"_type": "mikroSDK Library",
- "version": "2.0.0.7"
+ "version": "2.1.0.7",
+ "cmake": true,
+ "alias": "Click.Terminal",
+ "subdir_name": "lib_terminal"
}
-
-
-
-
-
-
diff --git a/clicks/terminal/example/CMakeLists.txt b/clicks/terminal/example/CMakeLists.txt
new file mode 100644
index 0000000000..747231f0a8
--- /dev/null
+++ b/clicks/terminal/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_terminal LANGUAGES MikroC)
+else()
+ project(example_terminal LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_terminal
+ main.c
+
+)
+
+
+############################ example_terminal GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_terminal PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_terminal PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_terminal PUBLIC MikroSDK.Log)
+add_subdirectory(lib_terminal)
+target_link_libraries(example_terminal PUBLIC Click.Terminal)
+############################ example_terminal GENERATED CODE END ###########################
diff --git a/clicks/terminal/example/manifest.exm b/clicks/terminal/example/manifest.exm
index aa85295131..3bad23426c 100644
--- a/clicks/terminal/example/manifest.exm
+++ b/clicks/terminal/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Terminal Click",
"description": "",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","None"],
"category" : ["Adapter"]
}
diff --git a/clicks/terminal/example/memake.txt b/clicks/terminal/example/memake.txt
deleted file mode 100644
index 3beba36c3a..0000000000
--- a/clicks/terminal/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_terminal
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Terminal
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/terminal/lib/memake.txt b/clicks/terminal/lib/memake.txt
deleted file mode 100644
index 56a463bab2..0000000000
--- a/clicks/terminal/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_terminal
-
-alias: Click.Terminal
-
-sources: {
- src/terminal.c
-}
-
-headers: {
- include/terminal.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/terminal.h) dst(include/terminal.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/terminal/lib_terminal/CMakeLists.txt b/clicks/terminal/lib_terminal/CMakeLists.txt
new file mode 100644
index 0000000000..bb534a4aae
--- /dev/null
+++ b/clicks/terminal/lib_terminal/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_terminal LANGUAGES MikroC)
+else()
+ project(lib_terminal LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_terminal STATIC
+ src/terminal.c
+ include/terminal.h
+)
+add_library(Click.Terminal ALIAS lib_terminal)
+
+
+
+target_include_directories(lib_terminal PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_terminal PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_terminal PUBLIC MikroSDK.Driver)
diff --git a/clicks/terminal/lib_terminal/include/Click.Terminal b/clicks/terminal/lib_terminal/include/Click.Terminal
new file mode 100644
index 0000000000..b6aafe6b66
--- /dev/null
+++ b/clicks/terminal/lib_terminal/include/Click.Terminal
@@ -0,0 +1 @@
+#include "terminal.h"
diff --git a/clicks/terminal/lib/include/terminal.h b/clicks/terminal/lib_terminal/include/terminal.h
similarity index 96%
rename from clicks/terminal/lib/include/terminal.h
rename to clicks/terminal/lib_terminal/include/terminal.h
index 513f9c70dc..8d74981df0 100644
--- a/clicks/terminal/lib/include/terminal.h
+++ b/clicks/terminal/lib_terminal/include/terminal.h
@@ -1,193 +1,193 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- * \brief This file contains API for Terminal Click driver.
- *
- * \addtogroup terminal Terminal Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef TERMINAL_H
-#define TERMINAL_H
-
-#include "drv_digital_out.h"
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-#define TERMINAL_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
- cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
- cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
- cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
- cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT ); \
- cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
- cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
- cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
- cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
- cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
- cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
- cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_TX )
-/** \} */
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define TERMINAL_RETVAL uint8_t
-
-#define TERMINAL_OK 0x00
-#define TERMINAL_INIT_ERROR 0xFF
-/** \} */
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
- // Communication pins
-
- digital_out_t scl;
- digital_out_t sda;
- digital_out_t sck;
- digital_out_t miso;
- digital_out_t mosi;
- digital_out_t cs;
- digital_out_t tx_pin;
- digital_out_t rx_pin;
-
- // Gpio pins
-
- digital_out_t an;
- digital_out_t rst;
- digital_out_t pwm;
- digital_out_t int_pin;
-
-} terminal_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Communication pins
-
- pin_name_t scl;
- pin_name_t sda;
- pin_name_t sck;
- pin_name_t miso;
- pin_name_t mosi;
- pin_name_t cs;
- pin_name_t tx_pin;
- pin_name_t rx_pin;
-
- // Gpio pins
-
- pin_name_t an;
- pin_name_t rst;
- pin_name_t pwm;
- pin_name_t int_pin;
-
-} terminal_cfg_t;
-
-/** \} */ // End types group
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
- */
-void terminal_cfg_setup ( terminal_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- * @param terminal Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
- */
-TERMINAL_RETVAL terminal_init ( terminal_t *ctx, terminal_cfg_t *cfg );
-
-/**
- * @brief Set pin high function.
- *
- * @param pin Output pin adress variable.
- *
- * @description This function sets the output voltage on the specified pin to high.
- *
- * @note The pin address should be acquired in the following way: { &click.pin }
- */
-void terminal_set_pin_high ( digital_out_t *pin );
-
-/**
- * @brief Set pin low function.
- *
- * @param pin Output pin adress variable.
- *
- * @description This function sets the output voltage on the specified pin to low.
- *
- * @note The pin address should be acquired in the following way: { &click.pin }
- */
-void terminal_set_pin_low ( digital_out_t *pin );
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _TERMINAL_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ * \brief This file contains API for Terminal Click driver.
+ *
+ * \addtogroup terminal Terminal Click Driver
+ * @{
+ */
+// ----------------------------------------------------------------------------
+
+#ifndef TERMINAL_H
+#define TERMINAL_H
+
+#include "drv_digital_out.h"
+
+// -------------------------------------------------------------- PUBLIC MACROS
+/**
+ * \defgroup macros Macros
+ * \{
+ */
+
+/**
+ * \defgroup map_mikrobus MikroBUS
+ * \{
+ */
+#define TERMINAL_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
+ cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
+ cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
+ cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
+ cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT ); \
+ cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
+ cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
+ cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
+ cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
+ cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
+ cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
+ cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_TX )
+/** \} */
+
+/**
+ * \defgroup error_code Error Code
+ * \{
+ */
+#define TERMINAL_RETVAL uint8_t
+
+#define TERMINAL_OK 0x00
+#define TERMINAL_INIT_ERROR 0xFF
+/** \} */
+
+/** \} */ // End group macro
+// --------------------------------------------------------------- PUBLIC TYPES
+/**
+ * \defgroup type Types
+ * \{
+ */
+
+/**
+ * @brief Click ctx object definition.
+ */
+typedef struct
+{
+ // Communication pins
+
+ digital_out_t scl;
+ digital_out_t sda;
+ digital_out_t sck;
+ digital_out_t miso;
+ digital_out_t mosi;
+ digital_out_t cs;
+ digital_out_t tx_pin;
+ digital_out_t rx_pin;
+
+ // Gpio pins
+
+ digital_out_t an;
+ digital_out_t rst;
+ digital_out_t pwm;
+ digital_out_t int_pin;
+
+} terminal_t;
+
+/**
+ * @brief Click configuration structure definition.
+ */
+typedef struct
+{
+ // Communication pins
+
+ pin_name_t scl;
+ pin_name_t sda;
+ pin_name_t sck;
+ pin_name_t miso;
+ pin_name_t mosi;
+ pin_name_t cs;
+ pin_name_t tx_pin;
+ pin_name_t rx_pin;
+
+ // Gpio pins
+
+ pin_name_t an;
+ pin_name_t rst;
+ pin_name_t pwm;
+ pin_name_t int_pin;
+
+} terminal_cfg_t;
+
+/** \} */ // End types group
+// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
+
+/**
+ * \defgroup public_function Public function
+ * \{
+ */
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+/**
+ * @brief Config Object Initialization function.
+ *
+ * @param cfg Click configuration structure.
+ *
+ * @description This function initializes click configuration structure to init state.
+ * @note All used pins will be set to unconnected state.
+ */
+void terminal_cfg_setup ( terminal_cfg_t *cfg );
+
+/**
+ * @brief Initialization function.
+ * @param terminal Click object.
+ * @param cfg Click configuration structure.
+ *
+ * @description This function initializes all necessary pins and peripherals used for this click.
+ */
+TERMINAL_RETVAL terminal_init ( terminal_t *ctx, terminal_cfg_t *cfg );
+
+/**
+ * @brief Set pin high function.
+ *
+ * @param pin Output pin adress variable.
+ *
+ * @description This function sets the output voltage on the specified pin to high.
+ *
+ * @note The pin address should be acquired in the following way: { &click.pin }
+ */
+void terminal_set_pin_high ( digital_out_t *pin );
+
+/**
+ * @brief Set pin low function.
+ *
+ * @param pin Output pin adress variable.
+ *
+ * @description This function sets the output voltage on the specified pin to low.
+ *
+ * @note The pin address should be acquired in the following way: { &click.pin }
+ */
+void terminal_set_pin_low ( digital_out_t *pin );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _TERMINAL_H_
+
+/** \} */ // End public_function group
+/// \} // End click Driver group
+/*! @} */
+// ------------------------------------------------------------------------- END
diff --git a/clicks/terminal/lib/src/terminal.c b/clicks/terminal/lib_terminal/src/terminal.c
similarity index 96%
rename from clicks/terminal/lib/src/terminal.c
rename to clicks/terminal/lib_terminal/src/terminal.c
index 80f081e80f..8864ec049d 100644
--- a/clicks/terminal/lib/src/terminal.c
+++ b/clicks/terminal/lib_terminal/src/terminal.c
@@ -1,87 +1,87 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- */
-
-#include "terminal.h"
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void terminal_cfg_setup ( terminal_cfg_t *cfg )
-{
- // Output pins
-
- cfg->scl = HAL_PIN_NC;
- cfg->sda = HAL_PIN_NC;
- cfg->sck = HAL_PIN_NC;
- cfg->miso = HAL_PIN_NC;
- cfg->mosi = HAL_PIN_NC;
- cfg->cs = HAL_PIN_NC;
- cfg->tx_pin = HAL_PIN_NC;
- cfg->rx_pin = HAL_PIN_NC;
-
- cfg->an = HAL_PIN_NC;
- cfg->rst = HAL_PIN_NC;
- cfg->pwm = HAL_PIN_NC;
- cfg->int_pin = HAL_PIN_NC;
-}
-
-TERMINAL_RETVAL terminal_init ( terminal_t *ctx, terminal_cfg_t *cfg )
-{
- // Communication pins
-
- digital_out_init( &ctx->scl, cfg->scl );
- digital_out_init( &ctx->sda, cfg->sda );
- digital_out_init( &ctx->sck, cfg->sck );
- digital_out_init( &ctx->miso, cfg->miso );
- digital_out_init( &ctx->mosi, cfg->mosi );
- digital_out_init( &ctx->cs, cfg->cs );
- digital_out_init( &ctx->tx_pin, cfg->tx_pin );
- digital_out_init( &ctx->rx_pin, cfg->rx_pin );
-
- // Gpio pins
-
- digital_out_init( &ctx->an, cfg->an );
- digital_out_init( &ctx->rst, cfg->rst );
- digital_out_init( &ctx->pwm, cfg->pwm );
- digital_out_init( &ctx->int_pin, cfg->int_pin );
-
- return TERMINAL_OK;
-}
-
-void terminal_set_pin_high ( digital_out_t *pin )
-{
- digital_out_high( pin );
-}
-
-void terminal_set_pin_low ( digital_out_t *pin )
-{
- digital_out_low( pin );
-}
-
-// ------------------------------------------------------------------------- END
-
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ */
+
+#include "terminal.h"
+
+// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
+
+void terminal_cfg_setup ( terminal_cfg_t *cfg )
+{
+ // Output pins
+
+ cfg->scl = HAL_PIN_NC;
+ cfg->sda = HAL_PIN_NC;
+ cfg->sck = HAL_PIN_NC;
+ cfg->miso = HAL_PIN_NC;
+ cfg->mosi = HAL_PIN_NC;
+ cfg->cs = HAL_PIN_NC;
+ cfg->tx_pin = HAL_PIN_NC;
+ cfg->rx_pin = HAL_PIN_NC;
+
+ cfg->an = HAL_PIN_NC;
+ cfg->rst = HAL_PIN_NC;
+ cfg->pwm = HAL_PIN_NC;
+ cfg->int_pin = HAL_PIN_NC;
+}
+
+TERMINAL_RETVAL terminal_init ( terminal_t *ctx, terminal_cfg_t *cfg )
+{
+ // Communication pins
+
+ digital_out_init( &ctx->scl, cfg->scl );
+ digital_out_init( &ctx->sda, cfg->sda );
+ digital_out_init( &ctx->sck, cfg->sck );
+ digital_out_init( &ctx->miso, cfg->miso );
+ digital_out_init( &ctx->mosi, cfg->mosi );
+ digital_out_init( &ctx->cs, cfg->cs );
+ digital_out_init( &ctx->tx_pin, cfg->tx_pin );
+ digital_out_init( &ctx->rx_pin, cfg->rx_pin );
+
+ // Gpio pins
+
+ digital_out_init( &ctx->an, cfg->an );
+ digital_out_init( &ctx->rst, cfg->rst );
+ digital_out_init( &ctx->pwm, cfg->pwm );
+ digital_out_init( &ctx->int_pin, cfg->int_pin );
+
+ return TERMINAL_OK;
+}
+
+void terminal_set_pin_high ( digital_out_t *pin )
+{
+ digital_out_high( pin );
+}
+
+void terminal_set_pin_low ( digital_out_t *pin )
+{
+ digital_out_low( pin );
+}
+
+// ------------------------------------------------------------------------- END
+
diff --git a/clicks/terminal/memake.txt b/clicks/terminal/memake.txt
deleted file mode 100644
index b923d888ce..0000000000
--- a/clicks/terminal/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Terminal
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/thermostat3/CHANGELOG.md b/clicks/thermostat3/CHANGELOG.md
index 4edeeb3aab..ac23ae3dc2 100644
--- a/clicks/thermostat3/CHANGELOG.md
+++ b/clicks/thermostat3/CHANGELOG.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.6
+### Version 2.1.0.6
- Initial release
diff --git a/clicks/thermostat3/CMakeLists.txt b/clicks/thermostat3/CMakeLists.txt
new file mode 100644
index 0000000000..31f7d7fafe
--- /dev/null
+++ b/clicks/thermostat3/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_thermostat3 LANGUAGES MikroC)
+else()
+ project(example_thermostat3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_thermostat3
+ example/main.c
+
+)
+
+
+############################ example_thermostat3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_thermostat3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_thermostat3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_thermostat3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_thermostat3)
+target_link_libraries(example_thermostat3 PUBLIC Click.Thermostat3)
+############################ example_thermostat3 GENERATED CODE END ###########################
diff --git a/clicks/thermostat3/doc/doxy/Doxyfile.doxy b/clicks/thermostat3/doc/doxy/Doxyfile.doxy
index 438523e397..d520efb502 100644
--- a/clicks/thermostat3/doc/doxy/Doxyfile.doxy
+++ b/clicks/thermostat3/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/thermostat3/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/thermostat3/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/thermostat3/example \
- ../clicks/thermostat3/lib/include \
- ../clicks/thermostat3/README.md
+INPUT = ../cmake/thermostat3/example \
+ ../cmake/thermostat3/lib_thermostat3/include \
+ ../cmake/thermostat3/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/thermostat3/example
+EXAMPLE_PATH = ../cmake/thermostat3/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = YES
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2196,14 +2196,14 @@ CLASS_DIAGRAMS = YES
# the mscgen tool resides. If left empty the tool is assumed to be found in the
# default search path.
-MSCGEN_PATH =
+MSCGEN_PATH =
# 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 =
+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.
@@ -2252,7 +2252,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2396,26 +2396,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2423,17 +2423,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
@@ -2494,7 +2494,3 @@ GENERATE_LEGEND = YES
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
-
-
-
-
diff --git a/clicks/thermostat3/doc/package/manifest.json b/clicks/thermostat3/doc/package/manifest.json
index 9d4d7e01b6..009c03e676 100644
--- a/clicks/thermostat3/doc/package/manifest.json
+++ b/clicks/thermostat3/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Temperature & humidity",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Sensors > Temperature & humidity",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "Thermostat 3 click",
"example_list": [
@@ -26,18 +25,14 @@
"name": "mikroe.click.thermostat3",
"product_link": "https://www.mikroe.com/thermostat-3-click",
"short_description": "Thermostat 3 Click is a general-purpose thermostat Click board™ designed to be used with any temperature sensor based on the MAX31855 sensor design.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "related_projects":[
+ "_type": "mikroSDK Library",
+ "related_projects": [
2825
],
- "_type": "mikroSDK Library",
- "version": "2.0.0.6"
+ "version": "2.1.0.6",
+ "cmake": true,
+ "alias": "Click.Thermostat3",
+ "subdir_name": "lib_thermostat3"
}
-
-
-
-
-
-
diff --git a/clicks/thermostat3/example/CMakeLists.txt b/clicks/thermostat3/example/CMakeLists.txt
new file mode 100644
index 0000000000..dfac8442e6
--- /dev/null
+++ b/clicks/thermostat3/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_thermostat3 LANGUAGES MikroC)
+else()
+ project(example_thermostat3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_thermostat3
+ main.c
+
+)
+
+
+############################ example_thermostat3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_thermostat3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_thermostat3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_thermostat3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_thermostat3)
+target_link_libraries(example_thermostat3 PUBLIC Click.Thermostat3)
+############################ example_thermostat3 GENERATED CODE END ###########################
diff --git a/clicks/thermostat3/example/manifest.exm b/clicks/thermostat3/example/manifest.exm
index 462d907829..c57912d516 100644
--- a/clicks/thermostat3/example/manifest.exm
+++ b/clicks/thermostat3/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "Thermostat 3 Click",
"description": "Thermostat 3 Click is a general-purpose thermostat Click board™ designed to be used with any temperature sensor based on the MAX31855 sensor design.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","MAX31855"],
"category" : ["Temperature & humidity"]
}
diff --git a/clicks/thermostat3/example/memake.txt b/clicks/thermostat3/example/memake.txt
deleted file mode 100644
index 514fdcb5c5..0000000000
--- a/clicks/thermostat3/example/memake.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-type: executable
-target: example_thermostat3
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Thermostat3
-}
-
-uses: {
- MikroC.Core
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/thermostat3/lib/memake.txt b/clicks/thermostat3/lib/memake.txt
deleted file mode 100644
index 2e0592bb1d..0000000000
--- a/clicks/thermostat3/lib/memake.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-type: library
-
-target: lib_thermostat3
-
-alias: Click.Thermostat3
-
-sources: {
- src/thermostat3.c
-}
-
-headers: {
- include/thermostat3.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/thermostat3.h) dst(include/thermostat3.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-uses: {
- MikroC.Core
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
diff --git a/clicks/thermostat3/lib_thermostat3/CMakeLists.txt b/clicks/thermostat3/lib_thermostat3/CMakeLists.txt
new file mode 100644
index 0000000000..ab7578349a
--- /dev/null
+++ b/clicks/thermostat3/lib_thermostat3/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_thermostat3 LANGUAGES MikroC)
+else()
+ project(lib_thermostat3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_thermostat3 STATIC
+ src/thermostat3.c
+ include/thermostat3.h
+)
+add_library(Click.Thermostat3 ALIAS lib_thermostat3)
+
+
+
+target_include_directories(lib_thermostat3 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_thermostat3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_thermostat3 PUBLIC MikroSDK.Driver)
diff --git a/clicks/thermostat3/lib_thermostat3/include/Click.Thermostat3 b/clicks/thermostat3/lib_thermostat3/include/Click.Thermostat3
new file mode 100644
index 0000000000..259d7cce80
--- /dev/null
+++ b/clicks/thermostat3/lib_thermostat3/include/Click.Thermostat3
@@ -0,0 +1 @@
+#include "thermostat3.h"
diff --git a/clicks/thermostat3/lib/include/thermostat3.h b/clicks/thermostat3/lib_thermostat3/include/thermostat3.h
similarity index 96%
rename from clicks/thermostat3/lib/include/thermostat3.h
rename to clicks/thermostat3/lib_thermostat3/include/thermostat3.h
index 3f951d873b..9010218975 100644
--- a/clicks/thermostat3/lib/include/thermostat3.h
+++ b/clicks/thermostat3/lib_thermostat3/include/thermostat3.h
@@ -1,270 +1,270 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- * \brief This file contains API for Thermostat 3 Click driver.
- *
- * \addtogroup thermostat3 Thermostat 3 Click Driver
- * @{
- */
-// ----------------------------------------------------------------------------
-
-#ifndef THERMOSTAT_H
-#define THERMOSTAT_H
-
-#include "drv_digital_out.h"
-#include "drv_digital_in.h"
-#include "drv_spi_master.h"
-
-
-// -------------------------------------------------------------- PUBLIC MACROS
-/**
- * \defgroup macros Macros
- * \{
- */
-
-/**
- * \defgroup map_mikrobus MikroBUS
- * \{
- */
-
-#define THERMOSTAT3_MAP_MIKROBUS( cfg, mikrobus ) \
- cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
- cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
- cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
- cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
- cfg.rly = MIKROBUS( mikrobus, MIKROBUS_PWM)
-/** \} */
-
-/**
- * \defgroup error_code Error Code
- * \{
- */
-#define THERMOSTAT_RETVAL uint8_t
-
-#define THERMOSTAT_OK 0x00
-#define THERMOSTAT_INIT_ERROR 0xFF
-/** \} */
-
-/**
- * \defgroup relay_pos Relay position
- * \{
- */
-#define THERMOSTAT3_RELAY_ON 0x01
-#define THERMOSTAT3_RELAY_OFF 0x00
-/** \} */
-
-/**
- * \defgroup temp_unit Temperature Unit
- * \{
- */
-#define THERMOSTAT3_TEMP_IN_CELSIUS 0x00
-#define THERMOSTAT3_TEMP_IN_FAHRENHEIT 0x02
-#define THERMOSTAT3_TEMP_IN_KELVIN 0x01
-/** \} */
-
-/**
- * \defgroup fault Fault
- * \{
- */
-#define THERMOSTAT3_FAULT_ACTIVE_FLAG 0x08
-#define THERMOSTAT3_FAULT_SCV_FLAG 0x04
-#define THERMOSTAT3_FAULT_SCG_FLAG 0x02
-#define THERMOSTAT3_FAULT_OC_FLAG 0x01
-#define THERMOSTAT3_FAULT_ALL_FLAG 0x00
-/** \} */
-
-/**
- * \defgroup null Empty Buffer
- * \{
- */
-#define NULL 0x00
-/** \} */
-
-/** \} */ // End group macro
-// --------------------------------------------------------------- PUBLIC TYPES
-/**
- * \defgroup type Types
- * \{
- */
-
-/**
- * @brief Click ctx object definition.
- */
-typedef struct
-{
- // Output pins
-
- digital_out_t rly;
- digital_out_t cs;
-
- // Modules
-
- spi_master_t spi;
- pin_name_t chip_select;
-
- uint8_t relay_flag;
- uint8_t fault_flag;
- uint8_t f_error;
- uint8_t fault_status;
-
-} thermostat3_t;
-
-/**
- * @brief Click configuration structure definition.
- */
-typedef struct
-{
- // Communication gpio pins
-
- pin_name_t miso;
- pin_name_t mosi;
- pin_name_t sck;
- pin_name_t cs;
-
- // Additional gpio pins
-
- pin_name_t rly;
-
- // static variable
-
- uint32_t spi_speed;
- uint8_t spi_mode;
- spi_master_chip_select_polarity_t cs_polarity;
-
- float internal_temp_cfg;
- float thermocouple_temp_cfg;
- uint8_t fault_value_cfg;
-
-} thermostat3_cfg_t;
-
-typedef struct
-{
- float internal_temp;
- float thermocouple_temp;
- uint8_t fault_value;
-
-} temp_vals_t;
-
-
-/** \} */ // End types group
-// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
-
-/**
- * \defgroup public_function Public function
- * \{
- */
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-/**
- * @brief Config Object Initialization function.
- *
- * @param cfg Click configuration structure.
- *
- * @description This function initializes click configuration structure to init state.
- * @note All used pins will be set to unconnected state.
- */
-void thermostat3_cfg_setup ( thermostat3_cfg_t *cfg );
-
-/**
- * @brief Initialization function.
- * @param thermostat3 Click object.
- * @param cfg Click configuration structure.
- *
- * @description This function initializes all necessary pins and peripherals used for this click.
- */
-THERMOSTAT_RETVAL thermostat3_init ( thermostat3_t *ctx, thermostat3_cfg_t *cfg );
-
-void thermostat3_generic_read ( thermostat3_t *ctx, uint8_t *read_buff );
-
-/**
- * @brief Thermostat Process Read data
- *
- * @param ctx Click object.
- * @param tmp Temperature click object
- *
- * @description This function must be constantly called in the task.
- * The function continuously reads data from the SPI lines and parses the read data.
- */
-void thermostat3_process ( thermostat3_t *ctx, temp_vals_t *tmp );
-
-/**
- * @brief Junction (Internal) Temperature
- *
- * @param temp_in Temperature in (CELSIUS, KELVIN or FAHRENHEIT)
- * @param ctx Click object.
- *
- * @return Temperature data
- *
- * @description This function returns 12-Bit Internal Temperature Data
- */
-float thermostat3_get_internal_temperature ( temp_vals_t *tmp, uint8_t temp_in );
-
-/**
- * @brief Thermocouple Temperature (K probe)
- *
- * @param temp_in Temperature in (CELSIUS, KELVIN or FAHRENHEIT)
- * @param ctx Click object.
- *
- * @return Fault Error status (1 - ERROR, 0 - OK) or 4-bit data (all Error status)
- *
- * @description This function returns 14-Bit Thermocouple Temperature Data
- */
-float thermostat3_get_thermocouple_temperature ( temp_vals_t *tmp, uint8_t temp_in );
-
-/**
- * @brief Fault data value
- *
- * @param err Fault error (ACTIVE FAULT, SCV, SCG, OC or all-Error)
- * @param ctx Click object.
- *
- * @return Fault Error status (1 - ERROR, 0 - OK) or 4-bit data (all Error status)
- *
- * @description This function returns Fault data Value.
- */
-uint8_t thermostat3_get_fault_data ( temp_vals_t *tmp, uint8_t err );
-
-/**
- * @brief Relay Control
- *
- * @param relay_pos Relay (ON or OFF state)
- * @param ctx Click object.
- *
- * @description This function enables control of the relay.
- */
-void thermostat3_relay_control ( thermostat3_t *ctx, uint8_t relay_pos );
-
-#ifdef __cplusplus
-}
-#endif
-#endif // _THERMOSTAT_H_
-
-/** \} */ // End public_function group
-/// \} // End click Driver group
-/*! @} */
-// ------------------------------------------------------------------------- END
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ * \brief This file contains API for Thermostat 3 Click driver.
+ *
+ * \addtogroup thermostat3 Thermostat 3 Click Driver
+ * @{
+ */
+// ----------------------------------------------------------------------------
+
+#ifndef THERMOSTAT_H
+#define THERMOSTAT_H
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_spi_master.h"
+
+
+// -------------------------------------------------------------- PUBLIC MACROS
+/**
+ * \defgroup macros Macros
+ * \{
+ */
+
+/**
+ * \defgroup map_mikrobus MikroBUS
+ * \{
+ */
+
+#define THERMOSTAT3_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
+ cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
+ cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
+ cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
+ cfg.rly = MIKROBUS( mikrobus, MIKROBUS_PWM)
+/** \} */
+
+/**
+ * \defgroup error_code Error Code
+ * \{
+ */
+#define THERMOSTAT_RETVAL uint8_t
+
+#define THERMOSTAT_OK 0x00
+#define THERMOSTAT_INIT_ERROR 0xFF
+/** \} */
+
+/**
+ * \defgroup relay_pos Relay position
+ * \{
+ */
+#define THERMOSTAT3_RELAY_ON 0x01
+#define THERMOSTAT3_RELAY_OFF 0x00
+/** \} */
+
+/**
+ * \defgroup temp_unit Temperature Unit
+ * \{
+ */
+#define THERMOSTAT3_TEMP_IN_CELSIUS 0x00
+#define THERMOSTAT3_TEMP_IN_FAHRENHEIT 0x02
+#define THERMOSTAT3_TEMP_IN_KELVIN 0x01
+/** \} */
+
+/**
+ * \defgroup fault Fault
+ * \{
+ */
+#define THERMOSTAT3_FAULT_ACTIVE_FLAG 0x08
+#define THERMOSTAT3_FAULT_SCV_FLAG 0x04
+#define THERMOSTAT3_FAULT_SCG_FLAG 0x02
+#define THERMOSTAT3_FAULT_OC_FLAG 0x01
+#define THERMOSTAT3_FAULT_ALL_FLAG 0x00
+/** \} */
+
+/**
+ * \defgroup null Empty Buffer
+ * \{
+ */
+#define NULL 0x00
+/** \} */
+
+/** \} */ // End group macro
+// --------------------------------------------------------------- PUBLIC TYPES
+/**
+ * \defgroup type Types
+ * \{
+ */
+
+/**
+ * @brief Click ctx object definition.
+ */
+typedef struct
+{
+ // Output pins
+
+ digital_out_t rly;
+ digital_out_t cs;
+
+ // Modules
+
+ spi_master_t spi;
+ pin_name_t chip_select;
+
+ uint8_t relay_flag;
+ uint8_t fault_flag;
+ uint8_t f_error;
+ uint8_t fault_status;
+
+} thermostat3_t;
+
+/**
+ * @brief Click configuration structure definition.
+ */
+typedef struct
+{
+ // Communication gpio pins
+
+ pin_name_t miso;
+ pin_name_t mosi;
+ pin_name_t sck;
+ pin_name_t cs;
+
+ // Additional gpio pins
+
+ pin_name_t rly;
+
+ // static variable
+
+ uint32_t spi_speed;
+ uint8_t spi_mode;
+ spi_master_chip_select_polarity_t cs_polarity;
+
+ float internal_temp_cfg;
+ float thermocouple_temp_cfg;
+ uint8_t fault_value_cfg;
+
+} thermostat3_cfg_t;
+
+typedef struct
+{
+ float internal_temp;
+ float thermocouple_temp;
+ uint8_t fault_value;
+
+} temp_vals_t;
+
+
+/** \} */ // End types group
+// ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
+
+/**
+ * \defgroup public_function Public function
+ * \{
+ */
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+/**
+ * @brief Config Object Initialization function.
+ *
+ * @param cfg Click configuration structure.
+ *
+ * @description This function initializes click configuration structure to init state.
+ * @note All used pins will be set to unconnected state.
+ */
+void thermostat3_cfg_setup ( thermostat3_cfg_t *cfg );
+
+/**
+ * @brief Initialization function.
+ * @param thermostat3 Click object.
+ * @param cfg Click configuration structure.
+ *
+ * @description This function initializes all necessary pins and peripherals used for this click.
+ */
+THERMOSTAT_RETVAL thermostat3_init ( thermostat3_t *ctx, thermostat3_cfg_t *cfg );
+
+void thermostat3_generic_read ( thermostat3_t *ctx, uint8_t *read_buff );
+
+/**
+ * @brief Thermostat Process Read data
+ *
+ * @param ctx Click object.
+ * @param tmp Temperature click object
+ *
+ * @description This function must be constantly called in the task.
+ * The function continuously reads data from the SPI lines and parses the read data.
+ */
+void thermostat3_process ( thermostat3_t *ctx, temp_vals_t *tmp );
+
+/**
+ * @brief Junction (Internal) Temperature
+ *
+ * @param temp_in Temperature in (CELSIUS, KELVIN or FAHRENHEIT)
+ * @param ctx Click object.
+ *
+ * @return Temperature data
+ *
+ * @description This function returns 12-Bit Internal Temperature Data
+ */
+float thermostat3_get_internal_temperature ( temp_vals_t *tmp, uint8_t temp_in );
+
+/**
+ * @brief Thermocouple Temperature (K probe)
+ *
+ * @param temp_in Temperature in (CELSIUS, KELVIN or FAHRENHEIT)
+ * @param ctx Click object.
+ *
+ * @return Fault Error status (1 - ERROR, 0 - OK) or 4-bit data (all Error status)
+ *
+ * @description This function returns 14-Bit Thermocouple Temperature Data
+ */
+float thermostat3_get_thermocouple_temperature ( temp_vals_t *tmp, uint8_t temp_in );
+
+/**
+ * @brief Fault data value
+ *
+ * @param err Fault error (ACTIVE FAULT, SCV, SCG, OC or all-Error)
+ * @param ctx Click object.
+ *
+ * @return Fault Error status (1 - ERROR, 0 - OK) or 4-bit data (all Error status)
+ *
+ * @description This function returns Fault data Value.
+ */
+uint8_t thermostat3_get_fault_data ( temp_vals_t *tmp, uint8_t err );
+
+/**
+ * @brief Relay Control
+ *
+ * @param relay_pos Relay (ON or OFF state)
+ * @param ctx Click object.
+ *
+ * @description This function enables control of the relay.
+ */
+void thermostat3_relay_control ( thermostat3_t *ctx, uint8_t relay_pos );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // _THERMOSTAT_H_
+
+/** \} */ // End public_function group
+/// \} // End click Driver group
+/*! @} */
+// ------------------------------------------------------------------------- END
diff --git a/clicks/thermostat3/lib/src/thermostat3.c b/clicks/thermostat3/lib_thermostat3/src/thermostat3.c
similarity index 96%
rename from clicks/thermostat3/lib/src/thermostat3.c
rename to clicks/thermostat3/lib_thermostat3/src/thermostat3.c
index 89d4bd57fb..b96ab381a6 100644
--- a/clicks/thermostat3/lib/src/thermostat3.c
+++ b/clicks/thermostat3/lib_thermostat3/src/thermostat3.c
@@ -1,234 +1,234 @@
-/*
- * MikroSDK - MikroE Software Development Kit
- * Copyright© 2020 MikroElektronika d.o.o.
- *
- * 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:
- *
- * The above copyright notice and 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.
- */
-
-/*!
- * \file
- *
- */
-
-#include "thermostat3.h"
-
-// ------------------------------------------------------------- PRIVATE MACROS
-
-#define THERMOSTAT_DUMMY 0
-
-// ---------------------------------------------- PRIVATE FUNCTION DECLARATIONS
-
-static void conversions_delay ( void );
-
-// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
-
-void thermostat3_cfg_setup ( thermostat3_cfg_t *cfg )
-{
- // Communication gpio pins
-
- cfg->sck = HAL_PIN_NC;
- cfg->miso = HAL_PIN_NC;
- cfg->mosi = HAL_PIN_NC;
- cfg->cs = HAL_PIN_NC;
-
- // Additional gpio pins
-
- cfg->rly = HAL_PIN_NC;
-
- cfg->spi_speed = 100000;
- cfg->spi_mode = SPI_MASTER_MODE_0;
- cfg->cs_polarity = SPI_MASTER_CHIP_SELECT_POLARITY_ACTIVE_LOW;
-
- cfg->internal_temp_cfg = 0.0;
- cfg->thermocouple_temp_cfg = 0.0;
- cfg->fault_value_cfg = 0;
-}
-
-THERMOSTAT_RETVAL thermostat3_init ( thermostat3_t *ctx, thermostat3_cfg_t *cfg )
-{
- spi_master_config_t spi_cfg;
-
- spi_master_configure_default( &spi_cfg );
- spi_cfg.speed = cfg->spi_speed;
- spi_cfg.sck = cfg->sck;
- spi_cfg.miso = cfg->miso;
- spi_cfg.mosi = cfg->mosi;
- spi_cfg.default_write_data = THERMOSTAT_DUMMY;
-
- digital_out_init( &ctx->cs, cfg->cs );
- ctx->chip_select = cfg->cs;
-
- if ( spi_master_open( &ctx->spi, &spi_cfg ) == SPI_MASTER_ERROR )
- {
- return THERMOSTAT_INIT_ERROR;
- }
-
- spi_master_set_default_write_data( &ctx->spi, THERMOSTAT_DUMMY );
- spi_master_set_speed( &ctx->spi, cfg->spi_speed );
- spi_master_set_mode( &ctx->spi, cfg->spi_mode );
- spi_master_set_chip_select_polarity( cfg->cs_polarity );
-
- // Output pins
-
- digital_out_init( &ctx->rly, cfg->rly );
-
- spi_master_deselect_device( ctx->chip_select );
-
- ctx->relay_flag = 0;
- ctx->fault_flag = 0;
- ctx->f_error = 3;
-
- return THERMOSTAT_OK;
-}
-
-void thermostat3_generic_read ( thermostat3_t *ctx, uint8_t *read_buff )
-{
- uint8_t i;
-
- spi_master_select_device( ctx->chip_select );
- for ( i = 0; i < 4; i++ )
- {
- spi_master_read( &ctx->spi, &read_buff[ i ], 1 );
- }
- spi_master_deselect_device( ctx->chip_select );
-}
-
-void thermostat3_process ( thermostat3_t *ctx, temp_vals_t *tmp )
-{
- uint8_t read_data[ 4 ];
- int16_t i_temp;
- int16_t e_temp;
-
- thermostat3_generic_read( ctx, read_data );
-
- // External Thermocouple Temperature
-
- e_temp = read_data[ 0 ];
- e_temp <<= 8;
- e_temp |= read_data[ 1 ] & 0xFC;
-
- if ( read_data[ 0 ] > 128 )
- {
- e_temp = ~ e_temp;
-
- tmp->thermocouple_temp = ( float )( ( e_temp >> 2 ) & 0x03 );
- tmp->thermocouple_temp *= -0.25;
- tmp->thermocouple_temp -= ( float )( e_temp >> 4 );
- tmp->thermocouple_temp += 1.0;
- }
- else
- {
- tmp->thermocouple_temp = ( float )( ( e_temp >> 2 ) & 0x03 );
- tmp->thermocouple_temp *= 0.25;
- tmp->thermocouple_temp += ( float )( e_temp >> 4 );
- }
-
- // Internal Temperature
-
- i_temp = read_data[ 2 ];
- i_temp <<= 8;
- i_temp |= read_data[ 3 ] & 0xF0;
-
- if ( i_temp > 32768 )
- {
- i_temp = ~ i_temp;
-
- tmp->internal_temp = ( float )( ( i_temp >> 4 ) & 0x0F );
- tmp->internal_temp *= -0.0625;
- tmp->internal_temp -= ( float )( i_temp >> 8 );
- tmp->internal_temp += 1.0;
- }
- else
- {
- tmp->internal_temp = ( float )( ( i_temp >> 4 ) & 0x0F );
- tmp->internal_temp *= 0.0625;
- tmp->internal_temp += ( float )( i_temp >> 8 );
- tmp->internal_temp -= 1.0;
- }
-
- // Fault [Error] value
- tmp->fault_value = ( read_data[ 1 ] & 0x01 ) << 3;
- tmp->fault_value |= ( read_data[ 3 ] & 0x07 );
-
- conversions_delay( );
-}
-
-float thermostat3_get_internal_temperature ( temp_vals_t *tmp, uint8_t temp_in )
-{
- if( temp_in == THERMOSTAT3_TEMP_IN_KELVIN )
- {
- tmp->internal_temp = tmp->internal_temp + 273.15;
- }
- else if ( temp_in == THERMOSTAT3_TEMP_IN_FAHRENHEIT )
- {
- tmp->internal_temp = tmp->internal_temp * 1.8 + 32.0;
- }
-
- return tmp->internal_temp;
-}
-
-float thermostat3_get_thermocouple_temperature ( temp_vals_t *tmp, uint8_t temp_in )
-{
- if ( temp_in == THERMOSTAT3_TEMP_IN_KELVIN)
- {
- tmp->thermocouple_temp = tmp->thermocouple_temp + 273.15;
- }
- else if( temp_in == THERMOSTAT3_TEMP_IN_FAHRENHEIT )
- {
- tmp->thermocouple_temp = tmp->thermocouple_temp * 1.8 + 32.0;
- }
-
- return tmp->thermocouple_temp;
-}
-
-uint8_t thermostat3_get_fault_data ( temp_vals_t *tmp, uint8_t err )
-{
- if ( err == THERMOSTAT3_FAULT_ALL_FLAG )
- {
- return tmp->fault_value;
- }
-
- if ( ( tmp->fault_value & err ) != 0 )
- {
- return 1;
- }
- return 0;
-}
-
-void thermostat3_relay_control ( thermostat3_t *ctx, uint8_t relay_pos )
-{
- if ( relay_pos == THERMOSTAT3_RELAY_ON )
- {
- digital_out_high( &ctx->rly );
- }
- else
- {
- digital_out_low( &ctx->rly );
- }
-}
-// ----------------------------------------------- PRIVATE FUNCTION DEFINITIONS
-
-static void conversions_delay ( void )
-{
- Delay_100ms( );
-}
-
-// ------------------------------------------------------------------------- END
-
+/*
+ * MikroSDK - MikroE Software Development Kit
+ * Copyright© 2020 MikroElektronika d.o.o.
+ *
+ * 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:
+ *
+ * The above copyright notice and 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.
+ */
+
+/*!
+ * \file
+ *
+ */
+
+#include "thermostat3.h"
+
+// ------------------------------------------------------------- PRIVATE MACROS
+
+#define THERMOSTAT_DUMMY 0
+
+// ---------------------------------------------- PRIVATE FUNCTION DECLARATIONS
+
+static void conversions_delay ( void );
+
+// ------------------------------------------------ PUBLIC FUNCTION DEFINITIONS
+
+void thermostat3_cfg_setup ( thermostat3_cfg_t *cfg )
+{
+ // Communication gpio pins
+
+ cfg->sck = HAL_PIN_NC;
+ cfg->miso = HAL_PIN_NC;
+ cfg->mosi = HAL_PIN_NC;
+ cfg->cs = HAL_PIN_NC;
+
+ // Additional gpio pins
+
+ cfg->rly = HAL_PIN_NC;
+
+ cfg->spi_speed = 100000;
+ cfg->spi_mode = SPI_MASTER_MODE_0;
+ cfg->cs_polarity = SPI_MASTER_CHIP_SELECT_POLARITY_ACTIVE_LOW;
+
+ cfg->internal_temp_cfg = 0.0;
+ cfg->thermocouple_temp_cfg = 0.0;
+ cfg->fault_value_cfg = 0;
+}
+
+THERMOSTAT_RETVAL thermostat3_init ( thermostat3_t *ctx, thermostat3_cfg_t *cfg )
+{
+ spi_master_config_t spi_cfg;
+
+ spi_master_configure_default( &spi_cfg );
+ spi_cfg.speed = cfg->spi_speed;
+ spi_cfg.sck = cfg->sck;
+ spi_cfg.miso = cfg->miso;
+ spi_cfg.mosi = cfg->mosi;
+ spi_cfg.default_write_data = THERMOSTAT_DUMMY;
+
+ digital_out_init( &ctx->cs, cfg->cs );
+ ctx->chip_select = cfg->cs;
+
+ if ( spi_master_open( &ctx->spi, &spi_cfg ) == SPI_MASTER_ERROR )
+ {
+ return THERMOSTAT_INIT_ERROR;
+ }
+
+ spi_master_set_default_write_data( &ctx->spi, THERMOSTAT_DUMMY );
+ spi_master_set_speed( &ctx->spi, cfg->spi_speed );
+ spi_master_set_mode( &ctx->spi, cfg->spi_mode );
+ spi_master_set_chip_select_polarity( cfg->cs_polarity );
+
+ // Output pins
+
+ digital_out_init( &ctx->rly, cfg->rly );
+
+ spi_master_deselect_device( ctx->chip_select );
+
+ ctx->relay_flag = 0;
+ ctx->fault_flag = 0;
+ ctx->f_error = 3;
+
+ return THERMOSTAT_OK;
+}
+
+void thermostat3_generic_read ( thermostat3_t *ctx, uint8_t *read_buff )
+{
+ uint8_t i;
+
+ spi_master_select_device( ctx->chip_select );
+ for ( i = 0; i < 4; i++ )
+ {
+ spi_master_read( &ctx->spi, &read_buff[ i ], 1 );
+ }
+ spi_master_deselect_device( ctx->chip_select );
+}
+
+void thermostat3_process ( thermostat3_t *ctx, temp_vals_t *tmp )
+{
+ uint8_t read_data[ 4 ];
+ int16_t i_temp;
+ int16_t e_temp;
+
+ thermostat3_generic_read( ctx, read_data );
+
+ // External Thermocouple Temperature
+
+ e_temp = read_data[ 0 ];
+ e_temp <<= 8;
+ e_temp |= read_data[ 1 ] & 0xFC;
+
+ if ( read_data[ 0 ] > 128 )
+ {
+ e_temp = ~ e_temp;
+
+ tmp->thermocouple_temp = ( float )( ( e_temp >> 2 ) & 0x03 );
+ tmp->thermocouple_temp *= -0.25;
+ tmp->thermocouple_temp -= ( float )( e_temp >> 4 );
+ tmp->thermocouple_temp += 1.0;
+ }
+ else
+ {
+ tmp->thermocouple_temp = ( float )( ( e_temp >> 2 ) & 0x03 );
+ tmp->thermocouple_temp *= 0.25;
+ tmp->thermocouple_temp += ( float )( e_temp >> 4 );
+ }
+
+ // Internal Temperature
+
+ i_temp = read_data[ 2 ];
+ i_temp <<= 8;
+ i_temp |= read_data[ 3 ] & 0xF0;
+
+ if ( i_temp > 32768 )
+ {
+ i_temp = ~ i_temp;
+
+ tmp->internal_temp = ( float )( ( i_temp >> 4 ) & 0x0F );
+ tmp->internal_temp *= -0.0625;
+ tmp->internal_temp -= ( float )( i_temp >> 8 );
+ tmp->internal_temp += 1.0;
+ }
+ else
+ {
+ tmp->internal_temp = ( float )( ( i_temp >> 4 ) & 0x0F );
+ tmp->internal_temp *= 0.0625;
+ tmp->internal_temp += ( float )( i_temp >> 8 );
+ tmp->internal_temp -= 1.0;
+ }
+
+ // Fault [Error] value
+ tmp->fault_value = ( read_data[ 1 ] & 0x01 ) << 3;
+ tmp->fault_value |= ( read_data[ 3 ] & 0x07 );
+
+ conversions_delay( );
+}
+
+float thermostat3_get_internal_temperature ( temp_vals_t *tmp, uint8_t temp_in )
+{
+ if( temp_in == THERMOSTAT3_TEMP_IN_KELVIN )
+ {
+ tmp->internal_temp = tmp->internal_temp + 273.15;
+ }
+ else if ( temp_in == THERMOSTAT3_TEMP_IN_FAHRENHEIT )
+ {
+ tmp->internal_temp = tmp->internal_temp * 1.8 + 32.0;
+ }
+
+ return tmp->internal_temp;
+}
+
+float thermostat3_get_thermocouple_temperature ( temp_vals_t *tmp, uint8_t temp_in )
+{
+ if ( temp_in == THERMOSTAT3_TEMP_IN_KELVIN)
+ {
+ tmp->thermocouple_temp = tmp->thermocouple_temp + 273.15;
+ }
+ else if( temp_in == THERMOSTAT3_TEMP_IN_FAHRENHEIT )
+ {
+ tmp->thermocouple_temp = tmp->thermocouple_temp * 1.8 + 32.0;
+ }
+
+ return tmp->thermocouple_temp;
+}
+
+uint8_t thermostat3_get_fault_data ( temp_vals_t *tmp, uint8_t err )
+{
+ if ( err == THERMOSTAT3_FAULT_ALL_FLAG )
+ {
+ return tmp->fault_value;
+ }
+
+ if ( ( tmp->fault_value & err ) != 0 )
+ {
+ return 1;
+ }
+ return 0;
+}
+
+void thermostat3_relay_control ( thermostat3_t *ctx, uint8_t relay_pos )
+{
+ if ( relay_pos == THERMOSTAT3_RELAY_ON )
+ {
+ digital_out_high( &ctx->rly );
+ }
+ else
+ {
+ digital_out_low( &ctx->rly );
+ }
+}
+// ----------------------------------------------- PRIVATE FUNCTION DEFINITIONS
+
+static void conversions_delay ( void )
+{
+ Delay_100ms( );
+}
+
+// ------------------------------------------------------------------------- END
+
diff --git a/clicks/thermostat3/memake.txt b/clicks/thermostat3/memake.txt
deleted file mode 100644
index 08cea3e66c..0000000000
--- a/clicks/thermostat3/memake.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-type: subdirs
-project: Thermostat3
-
-subdirs: {
- lib
- example
-}
diff --git a/clicks/uartmux4/CMakeLists.txt b/clicks/uartmux4/CMakeLists.txt
new file mode 100644
index 0000000000..86188bffe2
--- /dev/null
+++ b/clicks/uartmux4/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_uartmux4 LANGUAGES MikroC)
+else()
+ project(example_uartmux4 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_uartmux4
+ example/main.c
+
+)
+
+
+############################ example_uartmux4 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_uartmux4 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_uartmux4 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_uartmux4 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_uartmux4)
+target_link_libraries(example_uartmux4 PUBLIC Click.UARTMUX4)
+############################ example_uartmux4 GENERATED CODE END ###########################
+
diff --git a/clicks/uartmux4/README.md b/clicks/uartmux4/README.md
new file mode 100644
index 0000000000..8b9ad7312d
--- /dev/null
+++ b/clicks/uartmux4/README.md
@@ -0,0 +1,169 @@
+\mainpage Main Page
+
+---
+# UART MUX 4 click
+
+> UART MUX 4 Click is a compact add-on board that switches the UART pins (RX and TX)
+from the mikroBUS™ socket to one of the two available outputs.
+This board features the 74HC4066D, a quad single-pole, single-throw analog switch from Nexperia.
+The UART MUX 4 Click allows you to switch from one multiplexed UART to another easily,
+but not both simultaneously.
+
+
+
+
+
+[click Product page](https://www.mikroe.com/uart-mux-4-click)
+
+---
+
+
+#### Click library
+
+- **Author** : Nenad Filipovic
+- **Date** : Apr 2023.
+- **Type** : UART type
+
+
+# Software Support
+
+We provide a library for the UART MUX 4 Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
+
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+## Library Description
+
+> This library contains API for UART MUX 4 Click driver.
+
+#### Standard key functions :
+
+- `uartmux4_cfg_setup` Config Object Initialization function.
+```c
+void uartmux4_cfg_setup ( uartmux4_cfg_t *cfg );
+```
+
+- `uartmux4_init` Initialization function.
+```c
+err_t uartmux4_init ( uartmux4_t *ctx, uartmux4_cfg_t *cfg );
+```
+
+#### Example key functions :
+
+- `uartmux4_enable_uart1` UART MUX 4 enable the UART 1 function.
+```c
+void uartmux4_enable_uart1 ( uartmux4_t *ctx );
+```
+
+- `uartmux4_enable_uart2` UART MUX 4 enable the UART 2 function.
+```c
+void uartmux4_enable_uart2 ( uartmux4_t *ctx );
+```
+
+## Example Description
+
+> This example demonstrates the use of UART MUX 4 click board by processing
+> the incoming data and displaying them on the USB UART.
+
+**The demo application is composed of two sections :**
+
+### Application Init
+
+> Initializes the UART driver and additional pins.
+
+```c
+void application_init ( void )
+{
+ log_cfg_t log_cfg; /**< Logger config object. */
+ uartmux4_cfg_t uartmux4_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ uartmux4_cfg_setup( &uartmux4_cfg );
+ UARTMUX4_MAP_MIKROBUS( uartmux4_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == uartmux4_init( &uartmux4, &uartmux4_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
+ log_info( &logger, " Application Task " );
+ Delay_ms( 100 );
+}
+```
+
+### Application Task
+
+> Writes demo message, echos it back, processes all incoming data
+> and displays them on the USB UART.
+
+```c
+void application_task ( void )
+{
+ log_printf( &logger, " ---------------- \r\n" );
+ log_printf( &logger, " UART 1 demo message:\r\n" );
+ uartmux4_enable_uart1( &uartmux4 );
+ Delay_ms( 100 );
+ for ( uint8_t n_cnt = 0; n_cnt < 5; n_cnt++ )
+ {
+ if ( uartmux4_generic_write ( &uartmux4, DEMO_MESSAGE, sizeof( DEMO_MESSAGE ) ) )
+ {
+ if ( uartmux4_generic_read( &uartmux4, app_buf, sizeof( DEMO_MESSAGE ) ) )
+ {
+ log_printf( &logger, "%s", app_buf );
+ }
+ }
+ Delay_ms( 2000 );
+ }
+
+ log_printf( &logger, " ---------------- \r\n" );
+ log_printf( &logger, " UART 2 demo message:\r\n" );
+ uartmux4_enable_uart1( &uartmux4 );
+ Delay_ms( 100 );
+ for ( uint8_t n_cnt = 0; n_cnt < 5; n_cnt++ )
+ {
+ if ( uartmux4_generic_write ( &uartmux4, DEMO_MESSAGE, sizeof( DEMO_MESSAGE ) ) )
+ {
+ if ( uartmux4_generic_read( &uartmux4, app_buf, sizeof( DEMO_MESSAGE ) ) )
+ {
+ log_printf( &logger, "%s", app_buf );
+ }
+ }
+ Delay_ms( 2000 );
+ }
+}
+```
+
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
+
+- MikroSDK.Board
+- MikroSDK.Log
+- Click.UARTMUX4
+
+**Additional notes and informations**
+
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
+
+---
diff --git a/clicks/uartmux4/changelog.md b/clicks/uartmux4/changelog.md
new file mode 100644
index 0000000000..086189320b
--- /dev/null
+++ b/clicks/uartmux4/changelog.md
@@ -0,0 +1,4 @@
+## Changelog
+
+### Version 2.1.0.1
+ - Initial release
diff --git a/clicks/uartmux4/details.md b/clicks/uartmux4/details.md
new file mode 100644
index 0000000000..d228f251a8
--- /dev/null
+++ b/clicks/uartmux4/details.md
@@ -0,0 +1,168 @@
+
+---
+# UART MUX 4 click
+
+> UART MUX 4 Click is a compact add-on board that switches the UART pins (RX and TX)
+from the mikroBUS™ socket to one of the two available outputs.
+This board features the 74HC4066D, a quad single-pole, single-throw analog switch from Nexperia.
+The UART MUX 4 Click allows you to switch from one multiplexed UART to another easily,
+but not both simultaneously.
+
+
+
+
+
+[click Product page](https://www.mikroe.com/uart-mux-4-click)
+
+---
+
+
+#### Click library
+
+- **Author** : Nenad Filipovic
+- **Date** : Apr 2023.
+- **Type** : UART type
+
+
+# Software Support
+
+We provide a library for the UART MUX 4 Click
+as well as a demo application (example), developed using MikroElektronika
+[compilers](https://www.mikroe.com/necto-studio).
+The demo can run on all the main MikroElektronika [development boards](https://www.mikroe.com/development-boards).
+
+Package can be downloaded/installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+## Library Description
+
+> This library contains API for UART MUX 4 Click driver.
+
+#### Standard key functions :
+
+- `uartmux4_cfg_setup` Config Object Initialization function.
+```c
+void uartmux4_cfg_setup ( uartmux4_cfg_t *cfg );
+```
+
+- `uartmux4_init` Initialization function.
+```c
+err_t uartmux4_init ( uartmux4_t *ctx, uartmux4_cfg_t *cfg );
+```
+
+#### Example key functions :
+
+- `uartmux4_enable_uart1` UART MUX 4 enable the UART 1 function.
+```c
+void uartmux4_enable_uart1 ( uartmux4_t *ctx );
+```
+
+- `uartmux4_enable_uart2` UART MUX 4 enable the UART 2 function.
+```c
+void uartmux4_enable_uart2 ( uartmux4_t *ctx );
+```
+
+## Example Description
+
+> This example demonstrates the use of UART MUX 4 click board by processing
+> the incoming data and displaying them on the USB UART.
+
+**The demo application is composed of two sections :**
+
+### Application Init
+
+> Initializes the UART driver and additional pins.
+
+```c
+void application_init ( void )
+{
+ log_cfg_t log_cfg; /**< Logger config object. */
+ uartmux4_cfg_t uartmux4_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ uartmux4_cfg_setup( &uartmux4_cfg );
+ UARTMUX4_MAP_MIKROBUS( uartmux4_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == uartmux4_init( &uartmux4, &uartmux4_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
+ log_info( &logger, " Application Task " );
+ Delay_ms( 100 );
+}
+```
+
+### Application Task
+
+> Writes demo message, echos it back, processes all incoming data
+> and displays them on the USB UART.
+
+```c
+void application_task ( void )
+{
+ log_printf( &logger, " ---------------- \r\n" );
+ log_printf( &logger, " UART 1 demo message:\r\n" );
+ uartmux4_enable_uart1( &uartmux4 );
+ Delay_ms( 100 );
+ for ( uint8_t n_cnt = 0; n_cnt < 5; n_cnt++ )
+ {
+ if ( uartmux4_generic_write ( &uartmux4, DEMO_MESSAGE, sizeof( DEMO_MESSAGE ) ) )
+ {
+ if ( uartmux4_generic_read( &uartmux4, app_buf, sizeof( DEMO_MESSAGE ) ) )
+ {
+ log_printf( &logger, "%s", app_buf );
+ }
+ }
+ Delay_ms( 2000 );
+ }
+
+ log_printf( &logger, " ---------------- \r\n" );
+ log_printf( &logger, " UART 2 demo message:\r\n" );
+ uartmux4_enable_uart1( &uartmux4 );
+ Delay_ms( 100 );
+ for ( uint8_t n_cnt = 0; n_cnt < 5; n_cnt++ )
+ {
+ if ( uartmux4_generic_write ( &uartmux4, DEMO_MESSAGE, sizeof( DEMO_MESSAGE ) ) )
+ {
+ if ( uartmux4_generic_read( &uartmux4, app_buf, sizeof( DEMO_MESSAGE ) ) )
+ {
+ log_printf( &logger, "%s", app_buf );
+ }
+ }
+ Delay_ms( 2000 );
+ }
+}
+```
+
+The full application code, and ready to use projects can be installed directly from *NECTO Studio Package Manager*(recommended way), downloaded from our [LibStock™](https://libstock.mikroe.com) or found on [Mikroe github account](https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks).
+
+**Other Mikroe Libraries used in the example:**
+
+- MikroSDK.Board
+- MikroSDK.Log
+- Click.UARTMUX4
+
+**Additional notes and informations**
+
+Depending on the development board you are using, you may need
+[USB UART click](https://www.mikroe.com/usb-uart-click),
+[USB UART 2 Click](https://www.mikroe.com/usb-uart-2-click) or
+[RS232 Click](https://www.mikroe.com/rs232-click) to connect to your PC, for
+development systems with no UART to USB interface available on the board. UART
+terminal is available in all MikroElektronika
+[compilers](https://shop.mikroe.com/compilers).
+
+---
diff --git a/clicks/uartmux4/doc/doxy/Doxyfile.doxy b/clicks/uartmux4/doc/doxy/Doxyfile.doxy
new file mode 100644
index 0000000000..86abd27ed2
--- /dev/null
+++ b/clicks/uartmux4/doc/doxy/Doxyfile.doxy
@@ -0,0 +1,2481 @@
+# Doxyfile 1.8.13
+
+# 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 config 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 http://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 = uartmux4
+
+# 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.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
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# 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 = ../cmake/uartmux4/temp/Help/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 = NO
+
+# 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 = 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, 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
+
+# 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 = 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
+
+# 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.
+
+ALIASES =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST =
+
+# 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 = YES
+
+# 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
+
+# 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,
+# C#, C, C++, D, PHP, Objective-C, Python, 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), VHDL. 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.
+
+EXTENSION_MAPPING =
+
+# 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 http://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: 0.
+# 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:
+# http://www.riverbankcomputing.co.uk/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
+
+#---------------------------------------------------------------------------
+# 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 = 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 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
+# (class|struct|union) 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
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES, upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# 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 = YES
+
+# 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 = NO
+
+# 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 http://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.
+# 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.
+# 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 =
+
+#---------------------------------------------------------------------------
+# 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 = ../cmake/uartmux4/example \
+ ../cmake/uartmux4/lib_uartmux4/include \
+ ../cmake/uartmux4/README.md
+
+# 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: http://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.
+#
+# 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, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
+# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
+
+FILE_PATTERNS = *.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 \
+ *.py \
+ *.pyw \
+ *.f90 \
+ *.f95 \
+ *.f03 \
+ *.f08 \
+ *.f \
+ *.for \
+ *.tcl \
+ *.vhd \
+ *.vhdl \
+ *.ucf \
+ *.qsf \
+ *.odl \
+ .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 =
+
+# 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 = ../cmake/uartmux4/example
+
+# 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 = *
+
+# 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 =
+
+# 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 = NO
+
+# 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
+# function 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 = NO
+
+# 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 http://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 config 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 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 =
+
+#---------------------------------------------------------------------------
+# 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
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX = 5
+
+# 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
+# http://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_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: http://DEVELOPER_NAME.apple.com/tools/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_NAME/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://DEVELOPER_NAME.apple.com/tools/creatingdocsetswithdoxygen.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 = "Mikroe Click boards"
+
+# 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 = mikroe.com
+
+# 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 = mikroe.com
+
+# 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 = MikroElektronika
+
+# 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: http://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 master .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: http://qt-project.org/doc/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 = org.doxygen.Project
+
+# 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: http://qt-project.org/doc/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 = ./temp/Help/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: http://qt-project.org/doc/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: http://qt-project.org/doc/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:
+# http://qt-project.org/doc/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 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 = org.doxygen.Project
+
+# 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 = NO
+
+# 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
+
+# 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_TRANPARENT 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
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://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/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 http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# 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/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: http://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: http://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 = NO
+
+# 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 enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# 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.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = 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 pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
+# higher quality PDF documentation.
+# 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 = NO
+
+# 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
+# http://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
+
+#---------------------------------------------------------------------------
+# 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 config
+# 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 config 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 = NO
+
+# 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 = NO
+
+#---------------------------------------------------------------------------
+# 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
+
+#---------------------------------------------------------------------------
+# 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.sf.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: NO.
+
+HAVE_DOT = NO
+
+# 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 = NO
+
+# 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 HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# 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 = NO
+
+# 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, jpg, gif, 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 = 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
+# 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 dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP = YES
diff --git a/clicks/uartmux4/doc/image/click_icon.png b/clicks/uartmux4/doc/image/click_icon.png
new file mode 100644
index 0000000000..bcb52e6055
Binary files /dev/null and b/clicks/uartmux4/doc/image/click_icon.png differ
diff --git a/clicks/uartmux4/doc/package/manifest.json b/clicks/uartmux4/doc/package/manifest.json
new file mode 100644
index 0000000000..790e874174
--- /dev/null
+++ b/clicks/uartmux4/doc/package/manifest.json
@@ -0,0 +1,35 @@
+{
+ "architecture": "ARM|PIC|PIC32|RISC-V",
+ "category": "Click Boards > Interface > RS232",
+ "changelog": "Resources/CHANGELOG.md",
+ "contains": [
+ "libraries",
+ "hex_files",
+ "examples",
+ "source_files"
+ ],
+ "dependency_list": [],
+ "details": "Resources/DETAILS.md",
+ "display_name": "UART MUX 4 click",
+ "example_list": [
+ {
+ "project_path": "Examples/example"
+ }
+ ],
+ "help": "Help/doc",
+ "icon": "Resources/click_icon.png",
+ "license": {
+ "file_path": "",
+ "id": "46"
+ },
+ "name": "mikroe.click.uartmux4",
+ "product_link": "https://www.mikroe.com/uart-mux-4-click",
+ "short_description": "UART MUX 4 Click is a compact add-on board that switches the UART pins (RX and TX) from the mikroBUS™ socket to one of the two available outputs. This board features the 74HC4066D, a quad single-pole, single-throw analog switch from Nexperia. The UART MUX 4 Click allows you to switch from one multiplexed UART to another easily, but not both simultaneously.",
+ "supported_compiler": "mikroC AI|GCC",
+ "type": "Library",
+ "_type":"mikroSDK Library",
+ "version": "2.1.0.1",
+ "cmake": true,
+ "alias": "Click.UARTMUX4",
+ "subdir_name": "lib_uartmux4"
+}
diff --git a/clicks/uartmux4/example/CMakeLists.txt b/clicks/uartmux4/example/CMakeLists.txt
new file mode 100644
index 0000000000..f9f138672b
--- /dev/null
+++ b/clicks/uartmux4/example/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_uartmux4 LANGUAGES MikroC)
+else()
+ project(example_uartmux4 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_uartmux4
+ main.c
+
+)
+
+
+############################ example_uartmux4 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_uartmux4 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_uartmux4 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_uartmux4 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_uartmux4)
+target_link_libraries(example_uartmux4 PUBLIC Click.UARTMUX4)
+############################ example_uartmux4 GENERATED CODE END ###########################
+
diff --git a/clicks/uartmux4/example/main.c b/clicks/uartmux4/example/main.c
new file mode 100644
index 0000000000..fa87f5a258
--- /dev/null
+++ b/clicks/uartmux4/example/main.c
@@ -0,0 +1,110 @@
+/*!
+ * @file main.c
+ * @brief UART MUX 4 Click Example.
+ *
+ * # Description
+ * This example demonstrates the use of UART MUX 4 click board by processing
+ * the incoming data and displaying them on the USB UART.
+ *
+ * The demo application is composed of two sections :
+ *
+ * ## Application Init
+ * Initializes the UART driver and additional pins.
+ *
+ * ## Application Task
+ * Writes demo message, echos it back, processes all incoming data
+ * and displays them on the USB UART.
+ *
+ * @author Nenad Filipovic
+ *
+ */
+
+#include "board.h"
+#include "log.h"
+#include "uartmux4.h"
+
+#define PROCESS_BUFFER_SIZE 200
+#define DEMO_MESSAGE "\r\nMikroE\r\n"
+
+static uartmux4_t uartmux4;
+static log_t logger;
+
+static uint8_t app_buf[ PROCESS_BUFFER_SIZE ] = { 0 };
+
+void application_init ( void )
+{
+ log_cfg_t log_cfg; /**< Logger config object. */
+ uartmux4_cfg_t uartmux4_cfg; /**< Click config object. */
+
+ /**
+ * Logger initialization.
+ * Default baud rate: 115200
+ * Default log level: LOG_LEVEL_DEBUG
+ * @note If USB_UART_RX and USB_UART_TX
+ * are defined as HAL_PIN_NC, you will
+ * need to define them manually for log to work.
+ * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
+ */
+ LOG_MAP_USB_UART( log_cfg );
+ log_init( &logger, &log_cfg );
+ log_info( &logger, " Application Init " );
+
+ // Click initialization.
+ uartmux4_cfg_setup( &uartmux4_cfg );
+ UARTMUX4_MAP_MIKROBUS( uartmux4_cfg, MIKROBUS_1 );
+ if ( UART_ERROR == uartmux4_init( &uartmux4, &uartmux4_cfg ) )
+ {
+ log_error( &logger, " Communication init." );
+ for ( ; ; );
+ }
+
+ log_info( &logger, " Application Task " );
+ Delay_ms( 100 );
+}
+
+void application_task ( void )
+{
+ log_printf( &logger, " ---------------- \r\n" );
+ log_printf( &logger, " UART 1 demo message:\r\n" );
+ uartmux4_enable_uart1( &uartmux4 );
+ Delay_ms( 100 );
+ for ( uint8_t n_cnt = 0; n_cnt < 5; n_cnt++ )
+ {
+ if ( uartmux4_generic_write ( &uartmux4, DEMO_MESSAGE, sizeof( DEMO_MESSAGE ) ) )
+ {
+ if ( uartmux4_generic_read( &uartmux4, app_buf, sizeof( DEMO_MESSAGE ) ) )
+ {
+ log_printf( &logger, "%s", app_buf );
+ }
+ }
+ Delay_ms( 2000 );
+ }
+
+ log_printf( &logger, " ---------------- \r\n" );
+ log_printf( &logger, " UART 2 demo message:\r\n" );
+ uartmux4_enable_uart2( &uartmux4 );
+ Delay_ms( 100 );
+ for ( uint8_t n_cnt = 0; n_cnt < 5; n_cnt++ )
+ {
+ if ( uartmux4_generic_write ( &uartmux4, DEMO_MESSAGE, sizeof( DEMO_MESSAGE ) ) )
+ {
+ if ( uartmux4_generic_read( &uartmux4, app_buf, sizeof( DEMO_MESSAGE ) ) )
+ {
+ log_printf( &logger, "%s", app_buf );
+ }
+ }
+ Delay_ms( 2000 );
+ }
+}
+
+void main ( void )
+{
+ application_init( );
+
+ for ( ; ; )
+ {
+ application_task( );
+ }
+}
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/uartmux4/example/manifest.exm b/clicks/uartmux4/example/manifest.exm
new file mode 100644
index 0000000000..2ecd1eefa3
--- /dev/null
+++ b/clicks/uartmux4/example/manifest.exm
@@ -0,0 +1,8 @@
+{
+ "name": "UART MUX 4 Click",
+ "description": "UART MUX 4 Click is a compact add-on board that switches the UART pins (RX and TX) from the mikroBUS™ socket to one of the two available outputs. This board features the 74HC4066D, a quad single-pole, single-throw analog switch from Nexperia. The UART MUX 4 Click allows you to switch from one multiplexed UART to another easily, but not both simultaneously.",
+ "image" : "../../Resources/click_icon.png",
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv"],
+ "hw" : ["click","74HC4066D"],
+ "category" : ["Click Boards > Interface > RS232"]
+}
diff --git a/clicks/uartmux4/lib_uartmux4/CMakeLists.txt b/clicks/uartmux4/lib_uartmux4/CMakeLists.txt
new file mode 100644
index 0000000000..e96bb14eb7
--- /dev/null
+++ b/clicks/uartmux4/lib_uartmux4/CMakeLists.txt
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_uartmux4 LANGUAGES MikroC)
+else()
+ project(lib_uartmux4 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_uartmux4 STATIC
+ src/uartmux4.c
+ include/uartmux4.h
+)
+add_library(Click.UARTMUX4 ALIAS lib_uartmux4)
+
+
+
+target_include_directories(lib_uartmux4 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_uartmux4 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_uartmux4 PUBLIC MikroSDK.Driver)
+
diff --git a/clicks/uartmux4/lib_uartmux4/include/Click.UARTMUX4 b/clicks/uartmux4/lib_uartmux4/include/Click.UARTMUX4
new file mode 100644
index 0000000000..c3b980da3e
--- /dev/null
+++ b/clicks/uartmux4/lib_uartmux4/include/Click.UARTMUX4
@@ -0,0 +1 @@
+#include "uartmux4.h"
diff --git a/clicks/uartmux4/lib_uartmux4/include/uartmux4.h b/clicks/uartmux4/lib_uartmux4/include/uartmux4.h
new file mode 100644
index 0000000000..932bc756da
--- /dev/null
+++ b/clicks/uartmux4/lib_uartmux4/include/uartmux4.h
@@ -0,0 +1,229 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file uartmux4.h
+ * @brief This file contains API for UART MUX 4 Click Driver.
+ */
+
+#ifndef UARTMUX4_H
+#define UARTMUX4_H
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+#include "drv_digital_out.h"
+#include "drv_digital_in.h"
+#include "drv_uart.h"
+
+/*!
+ * @addtogroup uartmux4 UART MUX 4 Click Driver
+ * @brief API for configuring and manipulating UART MUX 4 Click driver.
+ * @{
+ */
+
+/**
+ * @defgroup uartmux4_cmd UART MUX 4 Device Settings
+ * @brief Settings for registers of UART MUX 4 Click driver.
+ */
+
+/**
+ * @addtogroup uartmux4_cmd
+ * @{
+ */
+
+/**
+ * @brief UART MUX 4 driver buffer size.
+ * @details Specified size of driver ring buffer.
+ * @note Increase buffer size if needed.
+ */
+#define UARTMUX4_TX_DRV_BUFFER_SIZE 100
+#define UARTMUX4_RX_DRV_BUFFER_SIZE 300
+
+/*! @} */ // uartmux4_cmd
+
+/**
+ * @defgroup uartmux4_map UART MUX 4 MikroBUS Map
+ * @brief MikroBUS pin mapping of UART MUX 4 Click driver.
+ */
+
+/**
+ * @addtogroup uartmux4_map
+ * @{
+ */
+
+/**
+ * @brief MikroBUS pin mapping.
+ * @details Mapping pins of UART MUX 4 Click to the selected MikroBUS.
+ */
+#define UARTMUX4_MAP_MIKROBUS( cfg, mikrobus ) \
+ cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
+ cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
+ cfg.sw = MIKROBUS( mikrobus, MIKROBUS_RST )
+
+/*! @} */ // uartmux4_map
+/*! @} */ // uartmux4
+
+/**
+ * @brief UART MUX 4 Click context object.
+ * @details Context object definition of UART MUX 4 Click driver.
+ */
+typedef struct
+{
+ // Output pins
+ digital_out_t sw; /**< Switch/Multiplexer control pin. */
+
+ // Modules
+ uart_t uart; /**< UART driver object. */
+
+ // Buffers
+ uint8_t uart_rx_buffer[ UARTMUX4_RX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
+ uint8_t uart_tx_buffer[ UARTMUX4_TX_DRV_BUFFER_SIZE ]; /**< Buffer size. */
+
+} uartmux4_t;
+
+/**
+ * @brief UART MUX 4 Click configuration object.
+ * @details Configuration object definition of UART MUX 4 Click driver.
+ */
+typedef struct
+{
+ // Communication gpio pins
+ pin_name_t rx_pin; /**< RX pin. */
+ pin_name_t tx_pin; /**< TX pin. */
+
+ // Additional gpio pins
+ pin_name_t sw; /**< Switch/Multiplexer control pin. */
+
+ // Static variable
+ uint32_t baud_rate; /**< Clock speed. */
+ bool uart_blocking; /**< Wait for interrupt or not. */
+ uart_data_bits_t data_bit; /**< Data bits. */
+ uart_parity_t parity_bit; /**< Parity bit. */
+ uart_stop_bits_t stop_bit; /**< Stop bits. */
+
+} uartmux4_cfg_t;
+
+/**
+ * @brief UART MUX 4 Click return value data.
+ * @details Predefined enum values for driver return values.
+ */
+typedef enum
+{
+ UARTMUX4_OK = 0,
+ UARTMUX4_ERROR = -1
+
+} uartmux4_return_value_t;
+
+/*!
+ * @addtogroup uartmux4 UART MUX 4 Click Driver
+ * @brief API for configuring and manipulating UART MUX 4 Click driver.
+ * @{
+ */
+
+/**
+ * @brief UART MUX 4 configuration object setup function.
+ * @details This function initializes click configuration structure to initial
+ * values.
+ * @param[out] cfg : Click configuration structure.
+ * See #uartmux4_cfg_t object definition for detailed explanation.
+ * @return Nothing.
+ * @note The all used pins will be set to unconnected state.
+ */
+void uartmux4_cfg_setup ( uartmux4_cfg_t *cfg );
+
+/**
+ * @brief UART MUX 4 initialization function.
+ * @details This function initializes all necessary pins and peripherals used
+ * for this click board.
+ * @param[out] ctx : Click context object.
+ * See #uartmux4_t object definition for detailed explanation.
+ * @param[in] cfg : Click configuration structure.
+ * See #uartmux4_cfg_t object definition for detailed explanation.
+ * @return @li @c 0 - Success,
+ * @li @c -1 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t uartmux4_init ( uartmux4_t *ctx, uartmux4_cfg_t *cfg );
+
+/**
+ * @brief UART MUX 4 data writing function.
+ * @details This function writes a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #uartmux4_t object definition for detailed explanation.
+ * @param[in] data_in : Data buffer for sending.
+ * @param[in] len : Number of bytes for sending.
+ * @return @li @c >=0 - Success,
+ * @li @c <0 - Error.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t uartmux4_generic_write ( uartmux4_t *ctx, uint8_t *data_in, uint16_t len );
+
+/**
+ * @brief UART MUX 4 data reading function.
+ * @details This function reads a desired number of data bytes by using UART serial interface.
+ * @param[in] ctx : Click context object.
+ * See #uartmux4_t object definition for detailed explanation.
+ * @param[out] data_out : Output read data.
+ * @param[in] len : Number of bytes to be read.
+ * @return @li @c >0 - Number of data bytes read,
+ * @li @c <=0 - Error/Empty Ring buffer.
+ * See #err_t definition for detailed explanation.
+ * @note None.
+ */
+err_t uartmux4_generic_read ( uartmux4_t *ctx, uint8_t *data_out, uint16_t len );
+
+/**
+ * @brief UART MUX 4 enable the UART 1 function.
+ * @details This function switches the multiplexer to enable the UART 1
+ * of the 74HC4066D, Quad single-pole single-throw analog switch
+ * on the UART MUX 4 Click board™.
+ * @param[in] ctx : Click context object.
+ * See #uartmux4_t object definition for detailed explanation.
+ * @return Nothing.
+ * @note None.
+ */
+void uartmux4_enable_uart1 ( uartmux4_t *ctx );
+
+/**
+ * @brief UART MUX 4 enable the UART 2 function.
+ * @details This function switches the multiplexer to enable the UART 2
+ * of the 74HC4066D, Quad single-pole single-throw analog switch
+ * on the UART MUX 4 Click board™.
+ * @param[in] ctx : Click context object.
+ * See #uartmux4_t object definition for detailed explanation.
+ * @return Nothing.
+ * @note None.
+ */
+void uartmux4_enable_uart2 ( uartmux4_t *ctx );
+
+#ifdef __cplusplus
+}
+#endif
+#endif // UARTMUX4_H
+
+/*! @} */ // uartmux4
+
+// ------------------------------------------------------------------------ END
diff --git a/clicks/uartmux4/lib_uartmux4/src/uartmux4.c b/clicks/uartmux4/lib_uartmux4/src/uartmux4.c
new file mode 100644
index 0000000000..d430b215b4
--- /dev/null
+++ b/clicks/uartmux4/lib_uartmux4/src/uartmux4.c
@@ -0,0 +1,100 @@
+/****************************************************************************
+** Copyright (C) 2020 MikroElektronika d.o.o.
+** Contact: https://www.mikroe.com/contact
+**
+** 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:
+** The above copyright notice and 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.
+****************************************************************************/
+
+/*!
+ * @file uartmux4.c
+ * @brief UART MUX 4 Click Driver.
+ */
+
+#include "uartmux4.h"
+
+void uartmux4_cfg_setup ( uartmux4_cfg_t *cfg )
+{
+ // Communication gpio pins
+ cfg->rx_pin = HAL_PIN_NC;
+ cfg->tx_pin = HAL_PIN_NC;
+
+ // Additional gpio pins
+ cfg->sw = HAL_PIN_NC;
+
+ cfg->baud_rate = 115200;
+ cfg->data_bit = UART_DATA_BITS_DEFAULT;
+ cfg->parity_bit = UART_PARITY_DEFAULT;
+ cfg->stop_bit = UART_STOP_BITS_DEFAULT;
+ cfg->uart_blocking = false;
+}
+
+err_t uartmux4_init ( uartmux4_t *ctx, uartmux4_cfg_t *cfg )
+{
+ uart_config_t uart_cfg;
+
+ // Default config
+ uart_configure_default( &uart_cfg );
+
+ // Ring buffer mapping
+ ctx->uart.tx_ring_buffer = ctx->uart_tx_buffer;
+ ctx->uart.rx_ring_buffer = ctx->uart_rx_buffer;
+
+ // UART module config
+ uart_cfg.rx_pin = cfg->rx_pin; // UART RX pin.
+ uart_cfg.tx_pin = cfg->tx_pin; // UART TX pin.
+ uart_cfg.tx_ring_size = sizeof( ctx->uart_tx_buffer );
+ uart_cfg.rx_ring_size = sizeof( ctx->uart_rx_buffer );
+
+ if ( UART_ERROR == uart_open( &ctx->uart, &uart_cfg ) )
+ {
+ return UART_ERROR;
+ }
+ uart_set_baud( &ctx->uart, cfg->baud_rate );
+ uart_set_parity( &ctx->uart, cfg->parity_bit );
+ uart_set_stop_bits( &ctx->uart, cfg->stop_bit );
+ uart_set_data_bits( &ctx->uart, cfg->data_bit );
+
+ uart_set_blocking( &ctx->uart, cfg->uart_blocking );
+
+ // Output pins
+ digital_out_init( &ctx->sw, cfg->sw );
+
+ return UART_SUCCESS;
+}
+
+err_t uartmux4_generic_write ( uartmux4_t *ctx, uint8_t *data_in, uint16_t len )
+{
+ return uart_write( &ctx->uart, data_in, len );
+}
+
+err_t uartmux4_generic_read ( uartmux4_t *ctx, uint8_t *data_out, uint16_t len )
+{
+ return uart_read( &ctx->uart, data_out, len );
+}
+
+void uartmux4_enable_uart1 ( uartmux4_t *ctx )
+{
+ digital_out_low( &ctx->sw );
+}
+
+void uartmux4_enable_uart2 ( uartmux4_t *ctx )
+{
+ digital_out_high( &ctx->sw );
+}
+
+// ------------------------------------------------------------------------- END
diff --git a/clicks/ups3/CMakeLists.txt b/clicks/ups3/CMakeLists.txt
new file mode 100644
index 0000000000..d8715bd9ec
--- /dev/null
+++ b/clicks/ups3/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_ups3 LANGUAGES MikroC)
+else()
+ project(example_ups3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_ups3
+ example/main.c
+
+)
+
+
+############################ example_ups3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_ups3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_ups3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_ups3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_ups3)
+target_link_libraries(example_ups3 PUBLIC Click.Ups3)
+############################ example_ups3 GENERATED CODE END ###########################
diff --git a/clicks/ups3/changelog.md b/clicks/ups3/changelog.md
index fcfecd1843..dae6081f37 100644
--- a/clicks/ups3/changelog.md
+++ b/clicks/ups3/changelog.md
@@ -1,4 +1,4 @@
## Changelog
-### Version 2.0.0.6
+### Version 2.1.0.6
- Initial release
diff --git a/clicks/ups3/doc/doxy/Doxyfile.doxy b/clicks/ups3/doc/doxy/Doxyfile.doxy
index fd596816b7..5e306feb9a 100644
--- a/clicks/ups3/doc/doxy/Doxyfile.doxy
+++ b/clicks/ups3/doc/doxy/Doxyfile.doxy
@@ -44,21 +44,21 @@ PROJECT_NUMBER = 2.0.0.0
# 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 =
+PROJECT_BRIEF =
# 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 =
+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 = ../clicks/ups3/temp/Help/doc
+OUTPUT_DIRECTORY = ../cmake/ups3/temp/Help/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
@@ -162,7 +162,7 @@ FULL_PATH_NAMES = YES
# 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 =
+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
@@ -171,7 +171,7 @@ STRIP_FROM_PATH =
# specify the list of include paths that are normally passed to the compiler
# using the -I flag.
-STRIP_FROM_INC_PATH =
+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
@@ -238,13 +238,13 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
-ALIASES =
+ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.
-TCL_SUBST =
+TCL_SUBST =
# 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
@@ -291,7 +291,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
# the files are not read by doxygen.
-EXTENSION_MAPPING =
+EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
@@ -648,7 +648,7 @@ GENERATE_DEPRECATEDLIST= YES
# sections, marked by \if ... \endif and \cond
# ... \endcond blocks.
-ENABLED_SECTIONS =
+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
@@ -690,7 +690,7 @@ SHOW_NAMESPACES = YES
# by doxygen. Whatever the program writes to standard output is used as the file
# version. For an example see the documentation.
-FILE_VERSION_FILTER =
+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
@@ -703,7 +703,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
-LAYOUT_FILE =
+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
@@ -713,7 +713,7 @@ LAYOUT_FILE =
# 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 =
+CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@@ -778,7 +778,7 @@ WARN_FORMAT = "$file:$line: $text"
# messages should be written. If left blank the output is written to standard
# error (stderr).
-WARN_LOGFILE =
+WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@@ -790,9 +790,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../clicks/ups3/example \
- ../clicks/ups3/lib/include \
- ../clicks/ups3/README.md
+INPUT = ../cmake/ups3/example \
+ ../cmake/ups3/lib_ups3/include \
+ ../cmake/ups3/README.md
# 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
@@ -877,7 +877,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
-EXCLUDE =
+EXCLUDE =
# 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
@@ -893,7 +893,7 @@ EXCLUDE_SYMLINKS = NO
# 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 =
+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
@@ -904,13 +904,13 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*
-EXCLUDE_SYMBOLS =
+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 = ../clicks/ups3/example
+EXAMPLE_PATH = ../cmake/ups3/example
# 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
@@ -930,7 +930,7 @@ EXAMPLE_RECURSIVE = YES
# that contain images that are to be included in the documentation (see the
# \image command).
-IMAGE_PATH =
+IMAGE_PATH =
# 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
@@ -951,7 +951,7 @@ IMAGE_PATH =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-INPUT_FILTER =
+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
@@ -964,7 +964,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
-FILTER_PATTERNS =
+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
@@ -979,14 +979,14 @@ FILTER_SOURCE_FILES = NO
# *.ext= (so without naming a filter).
# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-FILTER_SOURCE_PATTERNS =
+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 =
+USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@@ -1091,7 +1091,7 @@ CLANG_ASSISTED_PARSING = NO
# specified with INPUT and INCLUDE_PATH.
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-CLANG_OPTIONS =
+CLANG_OPTIONS =
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
@@ -1117,7 +1117,7 @@ COLS_IN_ALPHA_INDEX = 5
# while generating the index headers.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-IGNORE_PREFIX =
+IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the HTML output
@@ -1161,7 +1161,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_HEADER =
+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
@@ -1171,7 +1171,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_FOOTER =
+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
@@ -1183,7 +1183,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_STYLESHEET =
+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
@@ -1196,7 +1196,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+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
@@ -1206,7 +1206,7 @@ HTML_EXTRA_STYLESHEET =
# 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 =
+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
@@ -1335,7 +1335,7 @@ GENERATE_HTMLHELP = NO
# written to the html output directory.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_FILE =
+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,
@@ -1343,7 +1343,7 @@ CHM_FILE =
# The file has to be specified with full path.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-HHC_LOCATION =
+HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
# (YES) or that it should be included in the master .chm file (NO).
@@ -1356,7 +1356,7 @@ GENERATE_CHI = NO
# and project file content.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-CHM_INDEX_ENCODING =
+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
@@ -1387,7 +1387,7 @@ GENERATE_QHP = NO
# the HTML output folder.
# This tag requires that the tag GENERATE_QHP is set to YES.
-QCH_FILE =
+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
@@ -1412,7 +1412,7 @@ QHP_VIRTUAL_FOLDER = ./temp/Help/doc
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_NAME =
+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
@@ -1420,21 +1420,21 @@ QHP_CUST_FILTER_NAME =
# filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_CUST_FILTER_ATTRS =
+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:
# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
-QHP_SECT_FILTER_ATTRS =
+QHP_SECT_FILTER_ATTRS =
# The QHG_LOCATION tag can be used to specify the location 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 =
+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
@@ -1567,7 +1567,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_EXTENSIONS =
+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
@@ -1575,7 +1575,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
-MATHJAX_CODEFILE =
+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
@@ -1635,7 +1635,7 @@ EXTERNAL_SEARCH = NO
# Searching" for details.
# This tag requires that the tag SEARCHENGINE is set to YES.
-SEARCHENGINE_URL =
+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
@@ -1651,7 +1651,7 @@ SEARCHDATA_FILE = searchdata.xml
# projects and redirect the results back to the right project.
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTERNAL_SEARCH_ID =
+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
@@ -1661,7 +1661,7 @@ EXTERNAL_SEARCH_ID =
# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
# This tag requires that the tag SEARCHENGINE is set to YES.
-EXTRA_SEARCH_MAPPINGS =
+EXTRA_SEARCH_MAPPINGS =
#---------------------------------------------------------------------------
# Configuration options related to the LaTeX output
@@ -1725,7 +1725,7 @@ PAPER_TYPE = a4
# If left blank no extra packages will be included.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-EXTRA_PACKAGES =
+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
@@ -1741,7 +1741,7 @@ EXTRA_PACKAGES =
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+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
@@ -1752,7 +1752,7 @@ LATEX_HEADER =
# 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 =
+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
@@ -1763,7 +1763,7 @@ LATEX_FOOTER =
# list).
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_STYLESHEET =
+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
@@ -1771,7 +1771,7 @@ LATEX_EXTRA_STYLESHEET =
# markers available.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_EXTRA_FILES =
+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
@@ -1879,14 +1879,14 @@ RTF_HYPERLINKS = NO
# default style sheet that doxygen normally uses.
# This tag requires that the tag GENERATE_RTF is set to YES.
-RTF_STYLESHEET_FILE =
+RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
# similar to doxygen's config 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 =
+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.
@@ -1931,7 +1931,7 @@ MAN_EXTENSION = .3
# MAN_EXTENSION with the initial . removed.
# This tag requires that the tag GENERATE_MAN is set to YES.
-MAN_SUBDIR =
+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
@@ -2044,7 +2044,7 @@ PERLMOD_PRETTY = YES
# overwrite each other's variables.
# This tag requires that the tag GENERATE_PERLMOD is set to YES.
-PERLMOD_MAKEVAR_PREFIX =
+PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
@@ -2085,7 +2085,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+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
@@ -2093,7 +2093,7 @@ INCLUDE_PATH =
# used.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-INCLUDE_FILE_PATTERNS =
+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.
@@ -2103,7 +2103,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+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
@@ -2112,7 +2112,7 @@ PREDEFINED =
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+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
@@ -2141,13 +2141,13 @@ SKIP_FUNCTION_MACROS = YES
# 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 =
+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 =
+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
@@ -2188,7 +2188,7 @@ CLASS_DIAGRAMS = YES
# 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 =
+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.
@@ -2237,7 +2237,7 @@ DOT_FONTSIZE = 10
# the path where dot can find it using this tag.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTPATH =
+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.
@@ -2381,26 +2381,26 @@ INTERACTIVE_SVG = NO
# 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 =
+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 =
+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 =
+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 =
+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
@@ -2408,17 +2408,17 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.
-PLANTUML_JAR_PATH =
+PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
-PLANTUML_CFG_FILE =
+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 =
+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
diff --git a/clicks/ups3/doc/package/manifest.json b/clicks/ups3/doc/package/manifest.json
index 4e813f2040..bef2ca7093 100644
--- a/clicks/ups3/doc/package/manifest.json
+++ b/clicks/ups3/doc/package/manifest.json
@@ -1,6 +1,6 @@
{
- "architecture": "ARM|PIC|PIC32",
- "category": "Battery Charger",
+ "architecture": "ARM|PIC|PIC32|RISC-V|AVR",
+ "category": "Click Boards > Power management > Battery Charger",
"changelog": "Resources/CHANGELOG.md",
"contains": [
"libraries",
@@ -8,8 +8,7 @@
"examples",
"source_files"
],
- "dependency_list": [
- ],
+"dependency_list": [],
"details": "Resources/DETAILS.md",
"display_name": "UPS 3 click",
"example_list": [
@@ -26,14 +25,11 @@
"name": "mikroe.click.ups3",
"product_link": "https://www.mikroe.com/ups-3",
"short_description": "UPS 3 Click is a compact add-on board that represents a bidirectional active charge/balancing solution. This board features the LTC3110, a bidirectional buck-boost DC/DC regulator/charger combination with selectable operation modes for charging and system backup from Analog Devices. It can autonomously transition from Charge to Backup mode or switch modes based on an external command. A proprietary low noise switching algorithm optimizes efficiency with capacitor/battery voltages above, below, or equal to the system output voltage. Additional features include voltage supervisors for direction control and end of a charge and a general-purpose comparator with open-collector output for interfacing with MCU. This Click board™ is suitable for a backup power source for a wide range of battery-operated embedded applications.",
- "supported_compiler": "mikroC AI",
+ "supported_compiler": "mikroC AI|GCC",
"type": "Library",
- "_type":"mikroSDK Library",
- "version": "2.0.0.6"
+ "_type": "mikroSDK Library",
+ "version": "2.1.0.6",
+ "cmake": true,
+ "alias": "Click.Ups3",
+ "subdir_name": "lib_ups3"
}
-
-
-
-
-
-
diff --git a/clicks/ups3/example/CMakeLists.txt b/clicks/ups3/example/CMakeLists.txt
new file mode 100644
index 0000000000..f675084651
--- /dev/null
+++ b/clicks/ups3/example/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(example_ups3 LANGUAGES MikroC)
+else()
+ project(example_ups3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_executable(example_ups3
+ main.c
+
+)
+
+
+############################ example_ups3 GENERATED CODE START ###########################
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(example_ups3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Board REQUIRED)
+target_link_libraries(example_ups3 PUBLIC MikroSDK.Board)
+find_package(MikroSDK.Log REQUIRED)
+target_link_libraries(example_ups3 PUBLIC MikroSDK.Log)
+add_subdirectory(lib_ups3)
+target_link_libraries(example_ups3 PUBLIC Click.Ups3)
+############################ example_ups3 GENERATED CODE END ###########################
diff --git a/clicks/ups3/example/manifest.exm b/clicks/ups3/example/manifest.exm
index d06ee3a1e6..1ec77ccb86 100644
--- a/clicks/ups3/example/manifest.exm
+++ b/clicks/ups3/example/manifest.exm
@@ -2,7 +2,7 @@
"name": "UPS 3 Click",
"description": "UPS 3 Click is a compact add-on board that represents a bidirectional active charge/balancing solution. This board features the LTC3110, a bidirectional buck-boost DC/DC regulator/charger combination with selectable operation modes for charging and system backup from Analog Devices. It can autonomously transition from Charge to Backup mode or switch modes based on an external command.",
"image" : "../../Resources/click_icon.png",
- "toolchain": ["mikrocarm","mikrocpic","mikrocpic32"],
+ "toolchain": ["mikrocarm","mikrocpic","mikrocpic32","gcc-riscv","mikrocavr"],
"hw" : ["click","LTC3110"],
"category" : ["Battery Charger"]
}
diff --git a/clicks/ups3/example/memake.txt b/clicks/ups3/example/memake.txt
deleted file mode 100644
index 1e16ee0bf4..0000000000
--- a/clicks/ups3/example/memake.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-type: executable
-target: example_ups3
-
-depends: {
- MikroC.Core
- MikroSDK.Board
- MikroSDK.Log
- Click.Ups3
-}
-
-sources: {
- main.c
-}
diff --git a/clicks/ups3/lib/memake.txt b/clicks/ups3/lib/memake.txt
deleted file mode 100644
index 51a1db0f47..0000000000
--- a/clicks/ups3/lib/memake.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-type: library
-
-target: lib_ups3
-
-sources: {
- src/ups3.c
-}
-
-headers: {
- include/ups3.h
-}
-
-include: {
- include
-}
-
-install: {
- src(include/ups3.h) dst(include/ups3.h)
-}
-
-expInclude: {
- include
-}
-
-depends: {
- MikroC.Core
- MikroSDK.Driver
-}
-
-others: {
- ../README.md
- ../DETAILS.md
- ../CHANGELOG.md
-}
-
-alias: Click.Ups3
diff --git a/clicks/ups3/lib_ups3/CMakeLists.txt b/clicks/ups3/lib_ups3/CMakeLists.txt
new file mode 100644
index 0000000000..4ba80cfc32
--- /dev/null
+++ b/clicks/ups3/lib_ups3/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.21)
+if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
+ project(lib_ups3 LANGUAGES MikroC)
+else()
+ project(lib_ups3 LANGUAGES C ASM)
+endif()
+
+if (NOT PROJECT_TYPE)
+ set(PROJECT_TYPE "mikrosdk" CACHE STRING "" FORCE)
+endif()
+
+add_library(lib_ups3 STATIC
+ src/ups3.c
+ include/ups3.h
+)
+add_library(Click.Ups3 ALIAS lib_ups3)
+
+
+
+target_include_directories(lib_ups3 PUBLIC
+ include
+)
+
+find_package(MikroC.Core REQUIRED)
+target_link_libraries(lib_ups3 PUBLIC MikroC.Core)
+find_package(MikroSDK.Driver REQUIRED)
+target_link_libraries(lib_ups3 PUBLIC MikroSDK.Driver)
diff --git a/clicks/ups3/lib_ups3/include/Click.Ups3 b/clicks/ups3/lib_ups3/include/Click.Ups3
new file mode 100644
index 0000000000..12c49036d9
--- /dev/null
+++ b/clicks/ups3/lib_ups3/include/Click.Ups3
@@ -0,0 +1 @@
+#include "ups3.h"
diff --git a/clicks/ups3/lib/include/ups3.h b/clicks/ups3/lib_ups3/include/ups3.h
similarity index 100%
rename from clicks/ups3/lib/include/ups3.h
rename to clicks/ups3/lib_ups3/include/ups3.h
diff --git a/clicks/ups3/lib/src/ups3.c b/clicks/ups3/lib_ups3/src/ups3.c
similarity index 100%
rename from clicks/ups3/lib/src/ups3.c
rename to clicks/ups3/lib_ups3/src/ups3.c
diff --git a/clicks/ups3/memake.txt b/clicks/ups3/memake.txt
deleted file mode 100644
index a59e394b40..0000000000
--- a/clicks/ups3/memake.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-type: subdirs
-
-project: Ups3
-
-subdirs: {
- lib
- example
-}