diff --git a/CHANGELOG.md b/CHANGELOG.md index 4354426..7c047e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.0.7 (2025-10-26) + +## Features + +- update doxygen + ## 2.0.6 (2025-04-16) ## Bug Fixes diff --git a/Doxyfile b/Doxyfile index 3254951..eb612dc 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1,7 +1,7 @@ -# Doxyfile 1.9.1 +# Doxyfile 1.15.0 # This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. +# 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. @@ -12,6 +12,16 @@ # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). +# +# Note: +# +# Use Doxygen to compare the used configuration file with the template +# configuration file: +# doxygen -x [configFile] +# Use Doxygen to compare the used configuration file with the template +# configuration file without replacing the environment variables or CMake type +# replacement variables: +# doxygen -x_noenv [configFile] #--------------------------------------------------------------------------- # Project related configuration options @@ -38,39 +48,57 @@ PROJECT_NAME = "LibDriver DS3231" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 2.0.0 +PROJECT_NUMBER = # 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 +# for a project that appears at the top of each page and should give viewers a # quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = "DS3231 full-featured driver" +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 = doc/image/Doxygen.png +PROJECT_LOGO = doc/image/doxygen.png + +# With the PROJECT_ICON tag one can specify an icon that is included in the tabs +# when the HTML document is shown. Doxygen will copy the logo to the output +# directory. + +PROJECT_ICON = doc/image/favicon.svg # 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 +# entered, it will be relative to the location where Doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = doc -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. +# If the CREATE_SUBDIRS tag is set to YES then Doxygen will create up to 4096 +# sub-directories (in 2 levels) under the output directory of each output format +# and will distribute the generated files over these directories. Enabling this +# option can be useful when feeding Doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise cause +# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to +# control the number of sub-directories. # The default value is: NO. CREATE_SUBDIRS = NO -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# Controls the number of sub-directories that will be created when +# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every +# level increment doubles the number of directories, resulting in 4096 +# directories at level 8 which is the default and also the maximum value. The +# sub-directories are organized in 2 levels, the first level always has a fixed +# number of 16 directories. +# Minimum value: 0, maximum value: 8, default value: 8. +# This tag requires that the tag CREATE_SUBDIRS is set to YES. + +CREATE_SUBDIRS_LEVEL = 8 + +# If the ALLOW_UNICODE_NAMES tag is set to YES, Doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. @@ -79,36 +107,28 @@ CREATE_SUBDIRS = 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 +# 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. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, +# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English +# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, +# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with +# English messages), Korean, Korean-en (Korean with English messages), Latvian, +# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, +# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, +# Swedish, Turkish, Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English -# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all generated output in the proper direction. -# Possible values are: None, LTR, RTL and Context. -# The default value is: None. - -OUTPUT_TEXT_DIRECTION = None - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# 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 +# 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 @@ -139,13 +159,13 @@ ABBREVIATE_BRIEF = "The $name class" \ 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 +# 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 +# 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. @@ -153,7 +173,7 @@ ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# 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. @@ -163,11 +183,11 @@ 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 +# 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. +# 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 = @@ -181,41 +201,42 @@ STRIP_FROM_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 +# If the SHORT_NAMES tag is set to YES, Doxygen will generate much shorter (but +# less readable) file names. This can be useful if your file system 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.) +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen will interpret the +# first line (until the first dot, question mark or exclamation mark) 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 JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# If the JAVADOC_BANNER tag is set to YES then Doxygen will interpret a line # such as # /*************** # as being the beginning of a Javadoc-style comment "banner". If set to NO, the # Javadoc-style will behave just like regular comments and it will not be -# interpreted by doxygen. +# interpreted by Doxygen. # The default value is: NO. JAVADOC_BANNER = NO -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will interpret the first +# line (until the first dot, question mark or exclamation mark) 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 +# 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 @@ -227,10 +248,10 @@ QT_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO -# By default Python docstrings are displayed as preformatted text and doxygen's +# By default Python docstrings are displayed as preformatted text and Doxygen's # special commands cannot be used. By setting PYTHON_DOCSTRING to NO the -# doxygen's special commands can be used and the contents of the docstring -# documentation blocks is shown as doxygen documentation. +# Doxygen's special commands can be used and the contents of the docstring +# documentation blocks is shown as Doxygen documentation. # The default value is: YES. PYTHON_DOCSTRING = YES @@ -241,7 +262,7 @@ PYTHON_DOCSTRING = YES INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# 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. @@ -258,16 +279,16 @@ TAB_SIZE = 4 # the documentation. An alias has the form: # name=value # For example adding -# "sideeffect=@par Side Effects:\n" +# "sideeffect=@par Side Effects:^^" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines (in the resulting output). You can put ^^ in the value part of an -# alias to insert a newline as if a physical newline was in the original file. -# When you need a literal { or } or , in the value part of an alias you have to -# escape them by means of a backslash (\), this can lead to conflicts with the -# commands \{ and \} for these it is advised to use the version @{ and @} or use -# a double escape (\\{ and \\}) +# "Side Effects:". Note that you cannot put \n's in the value part of an alias +# to insert newlines (in the resulting output). You can put ^^ in the value part +# of an alias to insert a newline as if a physical newline was in the original +# file. When you need a literal { or } or , in the value part of an alias you +# have to escape them by means of a backslash (\), this can lead to conflicts +# with the commands \{ and \} for these it is advised to use the version @{ and +# @} or use a double escape (\\{ and \\}) ALIASES = @@ -311,58 +332,92 @@ OPTIMIZE_OUTPUT_SLICE = NO # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, -# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, -# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# language is one of the parsers supported by Doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, +# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: # FortranFree, unknown formatted Fortran: Fortran. In the later case the parser # tries to guess whether the code is fixed or free formatted code, this is the -# default for Fortran type files). For instance to make doxygen treat .inc files +# default for Fortran type files). For instance to make Doxygen treat .inc files # as Fortran files (default is PHP), and .f files as C (default is Fortran), # use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. When specifying no_extension you should add +# the files are not read by Doxygen. When specifying no_extension you should add # * to the FILE_PATTERNS. # # Note see also the list of default file extension mappings. EXTENSION_MAPPING = -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# If the MARKDOWN_SUPPORT tag is enabled then Doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See https://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# 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 +# If the MARKDOWN_STRICT tag is enabled then Doxygen treats text in comments as +# Markdown formatted also in cases where Doxygen's native markup format +# conflicts with that of Markdown. This is only relevant in cases where +# backticks are used. Doxygen's native markup style allows a single quote to end +# a text fragment started with a backtick and then treat it as a piece of quoted +# text, whereas in Markdown such text fragment is treated as verbatim and only +# ends when a second matching backtick is found. Also, Doxygen's native markup +# format requires double quotes to be escaped when they appear in a backtick +# section, whereas this is not needed for Markdown. +# The default value is: YES. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +MARKDOWN_STRICT = YES + # When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up # to that level are automatically included in the table of contents, even if # they do not have an id attribute. # Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 5. +# Minimum value: 0, maximum value: 99, default value: 6. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. -TOC_INCLUDE_HEADINGS = 5 +TOC_INCLUDE_HEADINGS = 6 -# When enabled doxygen tries to link words that correspond to documented +# The MARKDOWN_ID_STYLE tag can be used to specify the algorithm used to +# generate identifiers for the Markdown headings. Note: Every identifier is +# unique. +# Possible values are: DOXYGEN use a fixed 'autotoc_md' string followed by a +# sequence number starting at 0 and GITHUB use the lower case version of title +# with any whitespace replaced by '-' and punctuation characters removed. +# The default value is: DOXYGEN. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +MARKDOWN_ID_STYLE = DOXYGEN + +# 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. +# globally by setting AUTOLINK_SUPPORT to NO. Words listed in the +# AUTOLINK_IGNORE_WORDS tag are excluded from automatic linking. # The default value is: YES. AUTOLINK_SUPPORT = YES +# This tag specifies a list of words that, when matching the start of a word in +# the documentation, will suppress auto links generation, if it is enabled via +# AUTOLINK_SUPPORT. This list does not affect links explicitly created using \# +# or the \link or commands. +# This tag requires that the tag AUTOLINK_SUPPORT is set to YES. + +AUTOLINK_IGNORE_WORDS = + # 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 +# 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. +# versus func(std::string) {}). This also makes the inheritance and +# collaboration diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO @@ -374,16 +429,16 @@ 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.com/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. +# https://www.riverbankcomputing.com/software) 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. +# 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. @@ -392,7 +447,7 @@ SIP_SUPPORT = NO 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 +# 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. @@ -450,34 +505,42 @@ 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 +# 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 +# symbols. At the end of a run Doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 -# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use -# during processing. When set to 0 doxygen will based this on the number of +# The NUM_PROC_THREADS specifies the number of threads Doxygen is allowed to use +# during processing. When set to 0 Doxygen will based this on the number of # cores available in the system. You can set it explicitly to a value larger # than 0 to get more control over the balance between CPU load and processing # speed. At this moment only the input processing can be done using multiple # threads. Since this is still an experimental feature the default is set to 1, -# which efficively disables parallel processing. Please report any issues you +# which effectively disables parallel processing. Please report any issues you # encounter. Generating dot graphs in parallel is controlled by the # DOT_NUM_THREADS setting. -# Minimum value: 0, maximum value: 32, default value: 1. +# Minimum value: 0, maximum value: 512, default value: 1. NUM_PROC_THREADS = 1 +# If the TIMESTAMP tag is set different from NO then each generated page will +# contain the date or date and time when the page was generated. Setting this to +# NO can help when comparing the output of multiple runs. +# Possible values are: YES, NO, DATETIME and DATE. +# The default value is: NO. + +TIMESTAMP = NO + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# 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. @@ -543,7 +606,7 @@ EXTRACT_ANON_NSPACES = NO RESOLVE_UNNAMED_PARAMS = YES -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# 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. @@ -551,22 +614,31 @@ RESOLVE_UNNAMED_PARAMS = YES HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# 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. +# will also hide undocumented C++ concepts if enabled. 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 +# If the HIDE_UNDOC_NAMESPACES tag is set to YES, Doxygen will hide all +# undocumented namespaces that are normally visible in the namespace hierarchy. +# If set to NO, these namespaces will be included in the various overviews. This +# option has no effect if EXTRACT_ALL is enabled. +# The default value is: YES. + +HIDE_UNDOC_NAMESPACES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all friend # declarations. If set to NO, these declarations will be included in the # documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# 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. @@ -580,37 +652,44 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO -# With the correct setting of option CASE_SENSE_NAMES doxygen will better be +# With the correct setting of option CASE_SENSE_NAMES Doxygen will better be # able to match the capabilities of the underlying filesystem. In case the # filesystem is case sensitive (i.e. it supports files in the same directory # whose names only differ in casing), the option must be set to YES to properly # deal with such files in case they appear in the input. For filesystems that -# are not case sensitive the option should be be set to NO to properly deal with +# are not case sensitive the option should be set to NO to properly deal with # output files written for symbols that only differ in casing, such as for two # classes, one named CLASS and the other named Class, and to also support # references to files without having to specify the exact matching casing. On -# Windows (including Cygwin) and MacOS, users should typically set this option +# Windows (including Cygwin) and macOS, users should typically set this option # to NO, whereas on Linux or other Unix flavors it should typically be set to # YES. -# The default value is: system dependent. +# Possible values are: SYSTEM, NO and YES. +# The default value is: SYSTEM. -CASE_SENSE_NAMES = NO +CASE_SENSE_NAMES = SYSTEM -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# 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 +# 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 +# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class +# will show which file needs to be included to use the class. +# The default value is: YES. + +SHOW_HEADERFILE = YES + +# 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. @@ -623,7 +702,7 @@ SHOW_INCLUDE_FILES = YES SHOW_GROUPED_MEMB_INC = NO -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# 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. @@ -635,14 +714,14 @@ FORCE_LOCAL_INCLUDES = NO INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# 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 +# 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. @@ -650,7 +729,7 @@ SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# 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. @@ -662,7 +741,7 @@ SORT_BRIEF_DOCS = NO SORT_MEMBERS_CTORS_1ST = NO -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# 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. @@ -679,11 +758,11 @@ SORT_GROUP_NAMES = NO SORT_BY_SCOPE_NAME = NO -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# 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 +# 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. @@ -753,24 +832,25 @@ SHOW_FILES = 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 +# 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 +# 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 +# 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 +# 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. +# will be used as the name of the layout file. See also section "Changing the +# layout of pages" for information. # -# 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 +# 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 = @@ -785,19 +865,35 @@ LAYOUT_FILE = CITE_BIB_FILES = +# The EXTERNAL_TOOL_PATH tag can be used to extend the search path (PATH +# environment variable) so that external tools such as latex and gs can be +# found. +# Note: Directories specified with EXTERNAL_TOOL_PATH are added in front of the +# path already specified by the PATH variable, and are added in the order +# specified. +# Note: This option is particularly useful for macOS version 14 (Sonoma) and +# higher, when running Doxygen from Doxywizard, because in this case any user- +# defined changes to the PATH are ignored. A typical example on macOS is to set +# EXTERNAL_TOOL_PATH = /Library/TeX/texbin /usr/local/bin +# together with the standard path, the full search path used by doxygen when +# launching external tools will then become +# PATH=/Library/TeX/texbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin + +EXTERNAL_TOOL_PATH = + #--------------------------------------------------------------------------- # 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 +# 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 +# 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. @@ -805,52 +901,97 @@ QUIET = NO WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# 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. +# If the WARN_IF_DOC_ERROR tag is set to YES, Doxygen will generate warnings for +# potential errors in the documentation, such as documenting some parameters in +# a documented function twice, or documenting parameters that don't exist or +# using markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES +# If WARN_IF_INCOMPLETE_DOC is set to YES, Doxygen will warn about incomplete +# function parameter documentation. If set to NO, Doxygen will accept that some +# parameters have no documentation without warning. +# The default value is: YES. + +WARN_IF_INCOMPLETE_DOC = YES + # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. If -# EXTRACT_ALL is set to YES then this flag will automatically be disabled. +# value. If set to NO, Doxygen will only warn about wrong parameter +# documentation, but not about the absence of documentation. If EXTRACT_ALL is +# set to YES then this flag will automatically be disabled. See also +# WARN_IF_INCOMPLETE_DOC # 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 +# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, Doxygen will warn about +# undocumented enumeration values. If set to NO, Doxygen will accept +# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: NO. + +WARN_IF_UNDOC_ENUM_VAL = NO + +# If WARN_LAYOUT_FILE option is set to YES, Doxygen will warn about issues found +# while parsing the user defined layout file, such as missing or wrong elements. +# See also LAYOUT_FILE for details. If set to NO, problems with the layout file +# will be suppressed. +# The default value is: YES. + +WARN_LAYOUT_FILE = YES + +# If the WARN_AS_ERROR tag is set to YES then Doxygen will immediately stop when # a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS -# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but -# at the end of the doxygen process doxygen will return with a non-zero status. -# Possible values are: NO, YES and FAIL_ON_WARNINGS. +# then Doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but +# at the end of the Doxygen process Doxygen will return with a non-zero status. +# If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then Doxygen behaves +# like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined Doxygen will not +# write the warning messages in between other messages but write them at the end +# of a run, in case a WARN_LOGFILE is defined the warning messages will be +# besides being in the defined file also be shown at the end of a run, unless +# the WARN_LOGFILE is defined as - i.e. standard output (stdout) in that case +# the behavior will remain as with the setting FAIL_ON_WARNINGS. +# Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT. # The default value is: NO. WARN_AS_ERROR = NO -# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# 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) +# See also: WARN_LINE_FORMAT # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" +# In the $text part of the WARN_FORMAT command it is possible that a reference +# to a more specific place is given. To make it easier to jump to this place +# (outside of Doxygen) the user can define a custom "cut" / "paste" string. +# Example: +# WARN_LINE_FORMAT = "'vi $file +$line'" +# See also: WARN_FORMAT +# The default value is: at line $line of file $file. + +WARN_LINE_FORMAT = "at line $line of file $file" + # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard -# error (stderr). +# error (stderr). In case the file specified cannot be opened for writing the +# warning and error messages are written to standard error. When as file - is +# specified the warning and error messages are written to standard output +# (stdout). WARN_LOGFILE = @@ -871,37 +1012,52 @@ INPUT = src \ doc/mainpage # 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 +# that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: # https://www.gnu.org/software/libiconv/) for the list of possible encodings. +# See also: INPUT_FILE_ENCODING # The default value is: UTF-8. INPUT_ENCODING = UTF-8 +# This tag can be used to specify the character encoding of the source files +# that Doxygen parses. The INPUT_FILE_ENCODING tag can be used to specify +# character encoding on a per file pattern basis. Doxygen will compare the file +# name with each pattern and apply the encoding instead of the default +# INPUT_ENCODING if there is a match. The character encodings are a list of the +# form: pattern=encoding (like *.php=ISO-8859-1). +# See also: INPUT_ENCODING for further information on supported encodings. + +INPUT_FILE_ENCODING = + # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. # # 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. +# read by Doxygen. # # Note the list of default checked file patterns might differ from the list of # default file extension mappings. # -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), -# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl, -# *.ucf, *.qsf and *.ice. +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cxxm, +# *.cpp, *.cppm, *.ccm, *.c++, *.c++m, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, +# *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, +# *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be +# provided as Doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, +# *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.c \ *.cc \ *.cxx \ + *.cxxm \ *.cpp \ + *.cppm \ + *.ccm \ *.c++ \ + *.c++m \ *.java \ *.ii \ *.ixx \ @@ -916,6 +1072,7 @@ FILE_PATTERNS = *.c \ *.hxx \ *.hpp \ *.h++ \ + *.l \ *.cs \ *.d \ *.php \ @@ -953,7 +1110,7 @@ RECURSIVE = YES # 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 +# Note that relative paths are relative to the directory from which Doxygen is # run. EXCLUDE = @@ -978,10 +1135,7 @@ EXCLUDE_PATTERNS = # (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/* +# ANamespace::AClass, ANamespace::*Test EXCLUDE_SYMBOLS = @@ -1011,7 +1165,7 @@ EXAMPLE_RECURSIVE = NO IMAGE_PATH = -# The INPUT_FILTER tag can be used to specify a program that doxygen should +# 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: # @@ -1026,9 +1180,14 @@ IMAGE_PATH = # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. # +# Note that Doxygen will use the data processed and written to standard output +# for further processing, therefore nothing else, like debug statements or used +# commands (so in case of a Windows batch file always use @echo OFF), should be +# written to standard output. +# # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. +# properly processed by Doxygen. INPUT_FILTER = @@ -1041,7 +1200,7 @@ INPUT_FILTER = # # 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. +# properly processed by Doxygen. FILTER_PATTERNS = @@ -1063,10 +1222,28 @@ 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. +# and want to reuse the introduction page also for the Doxygen output. USE_MDFILE_AS_MAINPAGE = +# If the IMPLICIT_DIR_DOCS tag is set to YES, any README.md file found in sub- +# directories of the project's root, is used as the documentation for that sub- +# directory, except when the README.md starts with a \dir, \page or \mainpage +# command. If set to NO, the README.md file needs to start with an explicit \dir +# command in order to be used as directory documentation. +# The default value is: YES. + +IMPLICIT_DIR_DOCS = YES + +# The Fortran standard specifies that for fixed formatted Fortran code all +# characters from position 72 are to be considered as comment. A common +# extension is to allow longer lines before the automatic comment starts. The +# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can +# be processed before the automatic comment starts. +# Minimum value: 7, maximum value: 10000, default value: 72. + +FORTRAN_COMMENT_AFTER = 72 + #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- @@ -1081,12 +1258,13 @@ USE_MDFILE_AS_MAINPAGE = SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. +# multi-line macros, enums or list initialized variables 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 +# 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. @@ -1124,7 +1302,7 @@ REFERENCES_LINK_SOURCE = 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 +# point to the HTML generated by the htags(1) tool instead of Doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. @@ -1138,14 +1316,14 @@ SOURCE_TOOLTIPS = YES # 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 +# 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 +# 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. @@ -1153,26 +1331,28 @@ USE_HTAGS = NO VERBATIM_HEADERS = YES -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# 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 +# which Doxygen's built-in parser lacks the necessary type information. +# Note: The availability of this option depends on whether or not Doxygen was # generated with the -Duse_libclang=ON option for CMake. # The default value is: NO. CLANG_ASSISTED_PARSING = NO -# If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to -# YES then doxygen will add the directory of each input to the include path. +# If the CLANG_ASSISTED_PARSING tag is set to YES and the CLANG_ADD_INC_PATHS +# tag is set to YES then Doxygen will add the directory of each input to the +# include path. # The default value is: YES. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. CLANG_ADD_INC_PATHS = YES # If clang assisted parsing is enabled you can provide the compiler with command # line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories +# 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. @@ -1186,7 +1366,7 @@ CLANG_OPTIONS = # specifying the -p option to a clang tool, such as clang-check. These options # will then be passed to the parser. Any options specified with CLANG_OPTIONS # will be added as well. -# Note: The availability of this option depends on whether or not doxygen was +# Note: The availability of this option depends on whether or not Doxygen was # generated with the -Duse_libclang=ON option for CMake. CLANG_DATABASE_PATH = @@ -1202,10 +1382,11 @@ CLANG_DATABASE_PATH = ALPHABETICAL_INDEX = YES -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. +# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes) +# that should be ignored while generating the index headers. The IGNORE_PREFIX +# tag works for classes, function and member names. The entity will be placed in +# the alphabetical list under the first letter of the entity name that remains +# after removing the prefix. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = @@ -1214,7 +1395,7 @@ IGNORE_PREFIX = # Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# If the GENERATE_HTML tag is set to YES, Doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES @@ -1235,40 +1416,40 @@ HTML_OUTPUT = html 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 +# 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. +# 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 +# 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 +# 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 +# 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. +# 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. +# 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. +# 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. @@ -1278,13 +1459,18 @@ 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. +# 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. +# list). +# Note: Since the styling of scrollbars can currently not be overruled in +# Webkit/Chromium, the styling will be left out of the default doxygen.css if +# one or more extra stylesheets have been specified. So if scrollbar +# customization is desired it has to be added explicitly. For an example see the +# documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = @@ -1299,9 +1485,22 @@ HTML_EXTRA_STYLESHEET = HTML_EXTRA_FILES = +# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output +# should be rendered with a dark or light theme. +# Possible values are: LIGHT always generates light mode output, DARK always +# generates dark mode output, AUTO_LIGHT automatically sets the mode according +# to the user preference, uses light mode if no preference is set (the default), +# AUTO_DARK automatically sets the mode according to the user preference, uses +# dark mode if no preference is set and TOGGLE allows a user to switch between +# light and dark mode via a button. +# The default value is: AUTO_LIGHT. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE = TOGGLE + # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see +# this color. Hue is specified as an angle on a color-wheel, see # https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. @@ -1311,7 +1510,7 @@ HTML_EXTRA_FILES = 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 +# in the HTML output. For a value of 0 the output will use gray-scales 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. @@ -1329,15 +1528,6 @@ HTML_COLORSTYLE_SAT = 100 HTML_COLORSTYLE_GAMMA = 80 -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = NO - # If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML # documentation will contain a main index with vertical navigation menus that # are dynamically created via JavaScript. If disabled, the navigation index will @@ -1357,6 +1547,33 @@ HTML_DYNAMIC_MENUS = YES HTML_DYNAMIC_SECTIONS = NO +# If the HTML_CODE_FOLDING tag is set to YES then classes and functions can be +# dynamically folded and expanded in the generated HTML source code. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_CODE_FOLDING = YES + +# If the HTML_COPY_CLIPBOARD tag is set to YES then Doxygen will show an icon in +# the top right corner of code and text fragments that allows the user to copy +# its content to the clipboard. Note this only works if supported by the browser +# and the web page is served via a secure context (see: +# https://www.w3.org/TR/secure-contexts/), i.e. using the https: or file: +# protocol. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COPY_CLIPBOARD = YES + +# Doxygen stores a couple of settings persistently in the browser (via e.g. +# cookies). By default these settings apply to all HTML pages generated by +# Doxygen across all projects. The HTML_PROJECT_COOKIE tag can be used to store +# the settings under a project specific key, such that the user preferences will +# be stored separately. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_PROJECT_COOKIE = + # 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 @@ -1374,7 +1591,7 @@ HTML_INDEX_NUM_ENTRIES = 100 # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: # https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To -# create a documentation set, doxygen will generate a Makefile in the HTML +# create a documentation set, Doxygen will generate a Makefile in the HTML # output directory. Running make will produce the docset in that directory and # running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at @@ -1393,6 +1610,13 @@ GENERATE_DOCSET = NO DOCSET_FEEDNAME = "Doxygen generated docs" +# This tag determines the URL 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. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDURL = + # 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. @@ -1415,14 +1639,18 @@ DOCSET_PUBLISHER_ID = org.doxygen.Publisher DOCSET_PUBLISHER_NAME = Publisher -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# If the GENERATE_HTMLHELP tag is set to YES then Doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: -# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows. +# on Windows. In the beginning of 2021 Microsoft took the original page, with +# a.o. the download links, offline (the HTML help workshop was already many +# years in maintenance mode). You can download the HTML help workshop from the +# web archives at Installation executable (see: +# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo +# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). # # 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 +# 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 @@ -1442,7 +1670,7 @@ 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. +# 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. @@ -1476,6 +1704,16 @@ BINARY_TOC = NO TOC_EXPAND = NO +# The SITEMAP_URL tag is used to specify the full URL of the place where the +# generated documentation will be placed on the server by the user during the +# deployment of the documentation. The generated sitemap is called sitemap.xml +# and placed on the directory specified by HTML_OUTPUT. In case no SITEMAP_URL +# is specified no sitemap is generated. For information about the sitemap +# protocol see https://www.sitemaps.org +# This tag requires that the tag GENERATE_HTML is set to YES. + +SITEMAP_URL = + # 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 @@ -1534,7 +1772,7 @@ QHP_CUST_FILTER_ATTRS = QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location (absolute path -# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to +# including file name) of Qt's qhelpgenerator. If non-empty Doxygen will try to # run qhelpgenerator on the generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1578,18 +1816,39 @@ DISABLE_INDEX = NO # 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. +# further fine tune the look of the index (see "Fine-tuning the output"). 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 more details information than the tab index, you +# could consider setting DISABLE_INDEX to YES when enabling this option. +# The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = YES +# When GENERATE_TREEVIEW is set to YES, the PAGE_OUTLINE_PANEL option determines +# if an additional navigation panel is shown at the right hand side of the +# screen, displaying an outline of the contents of the main page, similar to +# e.g. https://developer.android.com/reference If GENERATE_TREEVIEW is set to +# NO, this option has no effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +PAGE_OUTLINE_PANEL = YES + +# When GENERATE_TREEVIEW is set to YES, the FULL_SIDEBAR option determines if +# the side bar is limited to only the treeview area (value NO) or if it should +# extend to the full height of the window (value YES). Setting this to YES gives +# a layout similar to e.g. https://docs.readthedocs.io with more room for +# contents, but less room for the project logo, title, and description. If +# GENERATE_TREEVIEW is set to NO, this option has no effect. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FULL_SIDEBAR = 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. +# 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. @@ -1598,6 +1857,12 @@ GENERATE_TREEVIEW = YES ENUM_VALUES_PER_LINE = 4 +# When the SHOW_ENUM_VALUES tag is set doxygen will show the specified +# enumeration values besides the enumeration mnemonics. +# The default value is: NO. + +SHOW_ENUM_VALUES = NO + # 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. @@ -1605,14 +1870,21 @@ ENUM_VALUES_PER_LINE = 4 TREEVIEW_WIDTH = 250 -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# If the EXT_LINKS_IN_WINDOW option is set to YES, Doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO -# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg +# If the OBFUSCATE_EMAILS tag is set to YES, Doxygen will obfuscate email +# addresses. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +OBFUSCATE_EMAILS = YES + +# If the HTML_FORMULA_FORMAT option is set to svg, Doxygen will use the pdf2svg # tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see # https://inkscape.org) to generate formulas as SVG images instead of PNGs for # the HTML output. These images will generally look nicer at scaled resolutions. @@ -1621,28 +1893,17 @@ EXT_LINKS_IN_WINDOW = NO # The default value is: png. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FORMULA_FORMAT = png +HTML_FORMULA_FORMAT = svg # 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 +# Doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANSPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - # The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands # to create new LaTeX commands to be used in formulas as building blocks. See # the section "Including formulas" for details. @@ -1660,51 +1921,90 @@ FORMULA_MACROFILE = USE_MATHJAX = NO +# With MATHJAX_VERSION it is possible to specify the MathJax version to be used. +# Note that the different versions of MathJax have different requirements with +# regards to the different settings, so it is possible that also other MathJax +# settings have to be changed when switching between the different MathJax +# versions. +# Possible values are: MathJax_2, MathJax_3 and MathJax_4. +# The default value is: MathJax_2. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_VERSION = MathJax_2 + # When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. +# the MathJax output. For more details about the output format see MathJax +# version 2 (see: +# https://docs.mathjax.org/en/v2.7/output.html), MathJax version 3 (see: +# https://docs.mathjax.org/en/v3.2/output/index.html) and MathJax version 4 +# (see: +# https://docs.mathjax.org/en/v4.0/output/index.htm). # Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. +# compatibility. This is the name for Mathjax version 2, for MathJax version 3 +# this will be translated into chtml), NativeMML (i.e. MathML. Only supported +# for MathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This +# is the name for Mathjax version 3, for MathJax version 2 this will be +# translated into HTML-CSS) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. -# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. +# output directory using the MATHJAX_RELPATH option. For Mathjax version 2 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.s For Mathjax versions 3 +# and 4 the destination directory should contain the tex-.js script +# (where is either chtml or svg). 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: +# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 +# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 +# - in case of MathJax version 4: https://cdn.jsdelivr.net/npm/mathjax@4 # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_RELPATH = https://cdn.jsdelivr.net/npm/mathjax@2 +MATHJAX_RELPATH = # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example +# for MathJax version 2 (see https://docs.mathjax.org/en/v2.7/tex.html): # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# For example for MathJax version 3 (see +# https://docs.mathjax.org/en/v3.2/input/tex/extensions/): +# MATHJAX_EXTENSIONS = ams +# For example for MathJax version 4 (see +# https://docs.mathjax.org/en/v4.0/input/tex/extensions/): +# MATHJAX_EXTENSIONS = units +# Note that for Mathjax version 4 quite a few extensions are already +# automatically loaded. To disable a package in Mathjax version 4 one can use +# the package name prepended with a minus sign (- like MATHJAX_EXTENSIONS += +# -textmacros) # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: -# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an -# example see the documentation. +# 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 +# for more details: +# - MathJax version 2 (see: +# https://docs.mathjax.org/en/v2.7/) +# - MathJax version 3 (see: +# https://docs.mathjax.org/en/v3.2/) +# - MathJax version 4 (see: +# https://docs.mathjax.org/en/v4.0/) 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 +# 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 +# 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 @@ -1723,7 +2023,7 @@ 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 +# 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. @@ -1732,7 +2032,7 @@ SEARCHENGINE = YES SERVER_BASED_SEARCH = NO -# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP +# 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 @@ -1777,7 +2077,7 @@ SEARCHDATA_FILE = searchdata.xml EXTERNAL_SEARCH_ID = -# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen +# 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 @@ -1791,7 +2091,7 @@ EXTRA_SEARCH_MAPPINGS = # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. +# If the GENERATE_LATEX tag is set to YES, Doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = NO @@ -1836,7 +2136,7 @@ MAKEINDEX_CMD_NAME = makeindex LATEX_MAKEINDEX_CMD = makeindex -# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX +# 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. @@ -1865,36 +2165,38 @@ PAPER_TYPE = a4 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. +# The LATEX_HEADER tag can be used to specify a user-defined 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. It +# is highly recommended to start with a default header using +# doxygen -w latex new_header.tex new_footer.tex new_stylesheet.sty +# and then modify the file new_header.tex. See also section "Doxygen usage" for +# information on how to generate the default header that Doxygen normally uses. # -# 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. +# Note: Only use a user-defined header if you know what you are doing! +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of Doxygen. The following +# commands have a special meaning inside the header (and footer): For a +# description of the possible markers and block names see the documentation. # 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 +# The LATEX_FOOTER tag can be used to specify a user-defined 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! +# 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. 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 +# 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 @@ -1920,7 +2222,7 @@ LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES -# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as +# If the USE_PDFLATEX tag is set to YES, Doxygen will use the engine as # specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX # files. Set this option to YES, to get a higher quality PDF documentation. # @@ -1930,47 +2232,35 @@ PDF_HYPERLINKS = 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 LATEX_BATCHMODE tag signals the behavior of LaTeX in case of an error. +# Possible values are: NO same as ERROR_STOP, YES same as BATCH, BATCH In batch +# mode nothing is printed on the terminal, errors are scrolled as if is +# hit at every error; missing files that TeX tries to input or request from +# keyboard input (\read on a not open input stream) cause the job to abort, +# NON_STOP In nonstop mode the diagnostic message will appear on the terminal, +# but there is no possibility of user interaction just like in batch mode, +# SCROLL In scroll mode, TeX will stop only for missing files to input or if +# keyboard input is necessary and ERROR_STOP In errorstop mode, TeX will stop at +# each error, asking for user intervention. # 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 +# If the LATEX_HIDE_INDICES tag is set to YES then Doxygen will not include the # index chapters (such as File Index, Compound Index, etc.) in the output. # The default value is: NO. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HIDE_INDICES = NO -# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source -# code with syntax highlighting in the LaTeX output. -# -# Note that which sources are shown also depends on other settings such as -# SOURCE_BROWSER. -# The default value is: NO. -# This tag requires that the tag GENERATE_LATEX is set to YES. - -LATEX_SOURCE_CODE = NO - # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. See # https://en.wikipedia.org/wiki/BibTeX and \cite for more info. -# The default value is: plain. -# This tag requires that the tag GENERATE_LATEX is set to YES. - -LATEX_BIB_STYLE = plain - -# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: NO. +# The default value is: plainnat. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_TIMESTAMP = NO +LATEX_BIB_STYLE = plainnat # The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute) # path from which the emoji images will be read. If a relative path is entered, @@ -1984,7 +2274,7 @@ LATEX_EMOJI_DIRECTORY = # Configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The +# 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. @@ -1999,7 +2289,7 @@ GENERATE_RTF = NO RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES, doxygen generates more compact 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. @@ -2019,38 +2309,36 @@ COMPACT_RTF = NO RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's +# Load stylesheet definitions from file. Syntax is similar to Doxygen's # configuration file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. # # See also section "Doxygen usage" for information on how to generate the -# default style sheet that doxygen normally uses. +# default style sheet that Doxygen normally uses. # This tag requires that the tag GENERATE_RTF is set to YES. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an RTF document. Syntax is -# similar to doxygen's configuration file. A template extensions file can be +# similar to Doxygen's configuration file. A template extensions file can be # generated using doxygen -e rtf extensionFile. # This tag requires that the tag GENERATE_RTF is set to YES. RTF_EXTENSIONS_FILE = -# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code -# with syntax highlighting in the RTF output. -# -# Note that which sources are shown also depends on other settings such as -# SOURCE_BROWSER. -# The default value is: NO. +# The RTF_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the RTF_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_RTF is set to YES. -RTF_SOURCE_CODE = NO +RTF_EXTRA_FILES = #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for +# If the GENERATE_MAN tag is set to YES, Doxygen will generate man pages for # classes and files. # The default value is: NO. @@ -2081,7 +2369,7 @@ MAN_EXTENSION = .3 MAN_SUBDIR = -# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it +# 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. @@ -2094,7 +2382,7 @@ 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 +# 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. @@ -2108,7 +2396,7 @@ GENERATE_XML = NO XML_OUTPUT = xml -# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program +# 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. @@ -2117,7 +2405,7 @@ XML_OUTPUT = xml XML_PROGRAMLISTING = YES -# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include +# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, Doxygen will include # namespace members in file scope as well, matching the HTML output. # The default value is: NO. # This tag requires that the tag GENERATE_XML is set to YES. @@ -2128,7 +2416,7 @@ XML_NS_MEMB_FILE_SCOPE = NO # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- -# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files +# 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. @@ -2142,21 +2430,12 @@ GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the -# program listings (including syntax highlighting and cross-referencing -# information) to the DOCBOOK output. Note that enabling this will significantly -# increase the size of the DOCBOOK output. -# The default value is: NO. -# This tag requires that the tag GENERATE_DOCBOOK is set to YES. - -DOCBOOK_PROGRAMLISTING = NO - #--------------------------------------------------------------------------- # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an -# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures +# If the GENERATE_AUTOGEN_DEF tag is set to YES, Doxygen will generate an +# AutoGen Definitions (see https://autogen.sourceforge.net/) file that captures # the structure of the code including all documentation. Note that this feature # is still experimental and incomplete at the moment. # The default value is: NO. @@ -2167,11 +2446,33 @@ GENERATE_AUTOGEN_DEF = NO # Configuration options related to Sqlite3 output #--------------------------------------------------------------------------- +# If the GENERATE_SQLITE3 tag is set to YES Doxygen will generate a Sqlite3 +# database with symbols found by Doxygen stored in tables. +# The default value is: NO. + +GENERATE_SQLITE3 = NO + +# The SQLITE3_OUTPUT tag is used to specify where the Sqlite3 database 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: sqlite3. +# This tag requires that the tag GENERATE_SQLITE3 is set to YES. + +SQLITE3_OUTPUT = sqlite3 + +# The SQLITE3_RECREATE_DB tag is set to YES, the existing doxygen_sqlite3.db +# database file will be recreated with each Doxygen run. If set to NO, Doxygen +# will warn if a database file is already found and not modify it. +# The default value is: YES. +# This tag requires that the tag GENERATE_SQLITE3 is set to YES. + +SQLITE3_RECREATE_DB = YES + #--------------------------------------------------------------------------- # Configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module +# 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. @@ -2179,7 +2480,7 @@ GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary +# 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. @@ -2209,13 +2510,13 @@ PERLMOD_MAKEVAR_PREFIX = # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all +# 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 +# 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. @@ -2241,7 +2542,8 @@ 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. +# preprocessor. Note that the INCLUDE_PATH is not recursive, so the setting of +# RECURSIVE has no effect here. # This tag requires that the tag SEARCH_INCLUDES is set to YES. INCLUDE_PATH = @@ -2273,7 +2575,7 @@ PREDEFINED = EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will +# 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 @@ -2297,26 +2599,26 @@ SKIP_FUNCTION_MACROS = YES # 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 +# 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 +# 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. +# If the ALLEXTERNALS tag is set to YES, all external classes and namespaces +# will be listed in the class and namespace 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 +# in the topic index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. @@ -2330,99 +2632,111 @@ EXTERNAL_GROUPS = YES EXTERNAL_PAGES = YES #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to diagram generator tools #--------------------------------------------------------------------------- -# 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 +# 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 +# https://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 +HAVE_DOT = YES -# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed -# to run in parallel. When set to 0 doxygen will base this on the number of +# 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. +# Minimum value: 0, maximum value: 512, 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. +# DOT_COMMON_ATTR is common attributes for nodes, edges and labels of +# subgraphs. When you want a differently looking font in the dot files that +# Doxygen generates you can specify fontname, fontcolor and fontsize attributes. +# For details please see Node, +# Edge and Graph Attributes specification You need to make sure dot is able +# to find the font, which can be done by putting it in a standard location or by +# setting the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. Default graphviz fontsize is 14. +# The default value is: fontname=Helvetica,fontsize=10. +# This tag requires that the tag HAVE_DOT is set to YES. + +DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10" + +# DOT_EDGE_ATTR is concatenated with DOT_COMMON_ATTR. For elegant style you can +# add 'arrowhead=open, arrowtail=open, arrowsize=0.5'. Complete documentation about +# arrows shapes. +# The default value is: labelfontname=Helvetica,labelfontsize=10. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_FONTNAME = Helvetica +DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10" -# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of -# dot graphs. -# Minimum value: 4, maximum value: 24, default value: 10. +# DOT_NODE_ATTR is concatenated with DOT_COMMON_ATTR. For view without boxes +# around nodes set 'shape=plain' or 'shape=plaintext' Shapes specification +# The default value is: shape=box,height=0.2,width=0.4. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_FONTSIZE = 10 +DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4" -# 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. +# You can set the path where dot can find font specified with fontname in +# DOT_COMMON_ATTR and others dot attributes. # 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. +# If the CLASS_GRAPH tag is set to YES or GRAPH or BUILTIN then Doxygen will +# generate a graph for each documented class showing the direct and indirect +# inheritance relations. In case the CLASS_GRAPH tag is set to YES or GRAPH and +# HAVE_DOT is enabled as well, then dot will be used to draw the graph. In case +# the CLASS_GRAPH tag is set to YES and HAVE_DOT is disabled or if the +# CLASS_GRAPH tag is set to BUILTIN, then the built-in generator will be used. +# If the CLASS_GRAPH tag is set to TEXT the direct and indirect inheritance +# relations will be shown as texts / links. Explicit enabling an inheritance +# graph or choosing a different representation for an inheritance graph of a +# specific class, can be accomplished by means of the command \inheritancegraph. +# Disabling an inheritance graph can be accomplished by means of the command +# \hideinheritancegraph. +# Possible values are: NO, YES, TEXT, GRAPH and BUILTIN. # 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 +# 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. +# class with other documented classes. Explicit enabling a collaboration graph, +# when COLLABORATION_GRAPH is set to NO, can be accomplished by means of the +# command \collaborationgraph. Disabling a collaboration graph can be +# accomplished by means of the command \hidecollaborationgraph. # 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. +# If the GROUP_GRAPHS tag is set to YES then Doxygen will generate a graph for +# groups, showing the direct groups dependencies. Explicit enabling a group +# dependency graph, when GROUP_GRAPHS is set to NO, can be accomplished by means +# of the command \groupgraph. Disabling a directory graph can be accomplished by +# means of the command \hidegroupgraph. See also the chapter Grouping in the +# manual. # 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 +# 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. @@ -2443,10 +2757,19 @@ UML_LOOK = NO UML_LIMIT_NUM_FIELDS = 10 -# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and +# If the UML_LOOK tag is enabled, field labels are shown along the edge between +# two class nodes. If there are many fields and many nodes the graph may become +# too cluttered. The UML_MAX_EDGE_LABELS threshold limits the number of items to +# make the size more manageable. Set this to 0 for no limit. +# Minimum value: 0, maximum value: 100, default value: 10. +# This tag requires that the tag UML_LOOK is set to YES. + +UML_MAX_EDGE_LABELS = 10 + +# If the DOT_UML_DETAILS tag is set to NO, Doxygen will show attributes and # methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS -# tag is set to YES, doxygen will add type and arguments for attributes and -# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen +# tag is set to YES, Doxygen will add type and arguments for attributes and +# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, Doxygen # will not generate fields with class member information in the UML graphs. The # class diagrams will look similar to the default class diagrams but using UML # notation for the relationships. @@ -2458,8 +2781,8 @@ DOT_UML_DETAILS = NO # The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters # to display on a single line. If the actual line length exceeds this threshold -# significantly it will wrapped across multiple lines. Some heuristics are apply -# to avoid ugly line breaks. +# significantly it will be wrapped across multiple lines. Some heuristics are +# applied to avoid ugly line breaks. # Minimum value: 0, maximum value: 1000, default value: 17. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2474,24 +2797,29 @@ DOT_WRAP_THRESHOLD = 17 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 +# 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. +# files. Explicit enabling an include graph, when INCLUDE_GRAPH is is set to NO, +# can be accomplished by means of the command \includegraph. Disabling an +# include graph can be accomplished by means of the command \hideincludegraph. # 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 +# 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. +# files. Explicit enabling an included by graph, when INCLUDED_BY_GRAPH is set +# to NO, can be accomplished by means of the command \includedbygraph. Disabling +# an included by graph can be accomplished by means of the command +# \hideincludedbygraph. # 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 +# 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. @@ -2501,9 +2829,9 @@ INCLUDED_BY_GRAPH = YES # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. -CALL_GRAPH = NO +CALL_GRAPH = YES -# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller +# 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. @@ -2515,44 +2843,59 @@ CALL_GRAPH = NO CALLER_GRAPH = NO -# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical +# 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 +# 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. +# files in the directories. Explicit enabling a directory graph, when +# DIRECTORY_GRAPH is set to NO, can be accomplished by means of the command +# \directorygraph. Disabling a directory graph can be accomplished by means of +# the command \hidedirectorygraph. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. DIRECTORY_GRAPH = YES +# The DIR_GRAPH_MAX_DEPTH tag can be used to limit the maximum number of levels +# of child directories generated in directory dependency graphs by dot. +# Minimum value: 1, maximum value: 25, default value: 1. +# This tag requires that the tag DIRECTORY_GRAPH is set to YES. + +DIR_GRAPH_MAX_DEPTH = 1 + # 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). +# https://www.graphviz.org/)). +# +# Note the formats svg:cairo and svg:cairo:cairo cannot be used in combination +# with INTERACTIVE_SVG (the INTERACTIVE_SVG will be set to NO). # 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. +# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus, +# png:gdiplus:gdiplus, svg:cairo, svg:cairo:cairo, svg:svg, svg:svg:core, +# gif:cairo, gif:cairo:gd, gif:cairo:gdiplus, gif:gdiplus, gif:gdiplus:gdiplus, +# gif:gd, gif:gd:gd, jpg:cairo, jpg:cairo:gd, jpg:cairo:gdiplus, jpg:gd, +# jpg:gd:gd, jpg:gdiplus and jpg:gdiplus:gdiplus. # The default value is: png. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_IMAGE_FORMAT = png +DOT_IMAGE_FORMAT = svg -# 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. +# If DOT_IMAGE_FORMAT is set to svg or svg:svg or svg:svg:core, 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. +# +# Note This option will be automatically disabled when DOT_IMAGE_FORMAT is set +# to svg:cairo or svg:cairo:cairo. # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. @@ -2571,11 +2914,12 @@ DOT_PATH = 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). +# 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. -MSCFILE_DIRS = +DIA_PATH = # 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 @@ -2583,35 +2927,41 @@ MSCFILE_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 -# 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. +# When using PlantUML, the PLANTUML_JAR_PATH tag should be used to specify the +# path where java can find the plantuml.jar file or to the filename of jar file +# to be used. 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. +# 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. +# When using PlantUML, the specified paths are searched for files specified by +# the !include statement in a PlantUML block. PLANTUML_INCLUDE_PATH = +# The PLANTUMLFILE_DIRS tag can be used to specify one or more directories that +# contain PlantUml files that are included in the documentation (see the +# \plantumlfile command). + +PLANTUMLFILE_DIRS = + # 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 +# larger than this value, Doxygen will truncate the graph, which is visualized +# by representing a node as a red box. Note that 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 +DOT_GRAPH_MAX_NODES = 10000 # 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 @@ -2625,18 +2975,6 @@ DOT_GRAPH_MAX_NODES = 50 MAX_DOT_GRAPH_DEPTH = 0 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not seem -# to support this out of the box. -# -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to -# read). -# The default value is: NO. -# This tag requires that the tag HAVE_DOT is set to YES. - -DOT_TRANSPARENT = NO - # Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support @@ -2646,19 +2984,37 @@ DOT_TRANSPARENT = NO DOT_MULTI_TARGETS = NO -# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page +# 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. +# Note: This tag requires that UML_LOOK isn't set, i.e. the Doxygen internal +# graphical representation for inheritance and collaboration diagrams is used. # 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 +# If the DOT_CLEANUP tag is set to YES, Doxygen will remove the intermediate # files that are used to generate the various graphs. # -# Note: This setting is not only used for dot files but also for msc and -# plantuml temporary files. +# Note: This setting is not only used for dot files but also for msc temporary +# files. # The default value is: YES. DOT_CLEANUP = YES + +# You can define message sequence charts within Doxygen comments using the \msc +# command. If the MSCGEN_TOOL tag is left empty (the default), then Doxygen will +# use a built-in version of mscgen tool to produce the charts. Alternatively, +# the MSCGEN_TOOL tag can also specify the name an external tool. For instance, +# specifying prog as the value, Doxygen will call the tool as prog -T +# -o . The external tool should support +# output file formats "png", "eps", "svg", and "ismap". + +MSCGEN_TOOL = + +# 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 = diff --git a/README.md b/README.md index 2c897fa..f381a34 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC) with an integrated temperature compensated crystal oscillator (TCXO) and crystal. The device incorporates a battery input, and maintains accurate timekeeping when main power to the device is interrupted. The integration of the crystal resonator enhances the long-term accuracy of the device as well as reduces the piece-part count in a manufacturing line. The DS3231 is available in commercial and industrial temperature ranges, and is offered in a 16-pin, 300-mil SO package. -LibDriver DS3231 is a full-featured driver of DS3231 launched by LibDriver.It provides time reading, alarm clock triggering, temperature reading, square wave output and other functions. LibDriver is MISRA compliant. +LibDriver DS3231 is a full-featured driver for DS3231, launched by LibDriver. It provides time reading, alarm clock triggering, temperature reading, square wave output and additional features. LibDriver is MISRA compliant. ### Table of Contents diff --git a/doc/html/Doxygen.png b/doc/html/Doxygen.png index 94a300a..786d7ac 100644 Binary files a/doc/html/Doxygen.png and b/doc/html/Doxygen.png differ diff --git a/doc/html/annotated.html b/doc/html/annotated.html index 3a928e4..a09ab93 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Data Structures + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
Data Structures
+
Data Structures
Here are the data structures with brief descriptions:
- +
 Cds3231_handle_sDs3231 handle structure definition
 Cds3231_info_sDs3231 information structure definition
 Cds3231_info_sDs3231 information structure definition
 Cds3231_time_sDs3231 time structure definition
+
diff --git a/doc/html/bc_s.png b/doc/html/bc_s.png deleted file mode 100644 index 224b29a..0000000 Binary files a/doc/html/bc_s.png and /dev/null differ diff --git a/doc/html/bdwn.png b/doc/html/bdwn.png deleted file mode 100644 index 940a0b9..0000000 Binary files a/doc/html/bdwn.png and /dev/null differ diff --git a/doc/html/classes.html b/doc/html/classes.html index 2069aef..e9daf6c 100644 --- a/doc/html/classes.html +++ b/doc/html/classes.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Data Structure Index + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
Data Structure Index
+
Data Structure Index
+
diff --git a/doc/html/clipboard.js b/doc/html/clipboard.js new file mode 100644 index 0000000..9da9f3c --- /dev/null +++ b/doc/html/clipboard.js @@ -0,0 +1,61 @@ +/** + +The code below is based on the Doxygen Awesome project, see +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2022 jothepro + +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. + +*/ + +let clipboard_title = "Copy to clipboard" +let clipboard_icon = `` +let clipboard_successIcon = `` +let clipboard_successDuration = 1000 + +$(function() { + if(navigator.clipboard) { + const fragments = document.getElementsByClassName("fragment") + for(const fragment of fragments) { + const clipboard_div = document.createElement("div") + clipboard_div.classList.add("clipboard") + clipboard_div.innerHTML = clipboard_icon + clipboard_div.title = clipboard_title + $(clipboard_div).click(function() { + const content = this.parentNode.cloneNode(true) + // filter out line number and folded fragments from file listings + content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) + let text = content.textContent + // remove trailing newlines and trailing spaces from empty lines + text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') + navigator.clipboard.writeText(text); + this.classList.add("success") + this.innerHTML = clipboard_successIcon + window.setTimeout(() => { // switch back to normal icon after timeout + this.classList.remove("success") + this.innerHTML = clipboard_icon + }, clipboard_successDuration); + }) + fragment.insertBefore(clipboard_div, fragment.firstChild) + } + } +}) diff --git a/doc/html/closed.png b/doc/html/closed.png deleted file mode 100644 index 98cc2c9..0000000 Binary files a/doc/html/closed.png and /dev/null differ diff --git a/doc/html/cookie.js b/doc/html/cookie.js new file mode 100644 index 0000000..53ad21d --- /dev/null +++ b/doc/html/cookie.js @@ -0,0 +1,58 @@ +/*! + Cookie helper functions + Copyright (c) 2023 Dimitri van Heesch + Released under MIT license. +*/ +let Cookie = { + cookie_namespace: 'doxygen_', + + readSetting(cookie,defVal) { + if (window.chrome) { + const val = localStorage.getItem(this.cookie_namespace+cookie) || + sessionStorage.getItem(this.cookie_namespace+cookie); + if (val) return val; + } else { + let myCookie = this.cookie_namespace+cookie+"="; + if (document.cookie) { + const index = document.cookie.indexOf(myCookie); + if (index != -1) { + const valStart = index + myCookie.length; + let valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + return document.cookie.substring(valStart, valEnd); + } + } + } + return defVal; + }, + + writeSetting(cookie,val,days=10*365) { // default days='forever', 0=session cookie, -1=delete + if (window.chrome) { + if (days==0) { + sessionStorage.setItem(this.cookie_namespace+cookie,val); + } else { + localStorage.setItem(this.cookie_namespace+cookie,val); + } + } else { + let date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + const expiration = days!=0 ? "expires="+date.toGMTString()+";" : ""; + document.cookie = this.cookie_namespace + cookie + "=" + + val + "; SameSite=Lax;" + expiration + "path=/"; + } + }, + + eraseSetting(cookie) { + if (window.chrome) { + if (localStorage.getItem(this.cookie_namespace+cookie)) { + localStorage.removeItem(this.cookie_namespace+cookie); + } else if (sessionStorage.getItem(this.cookie_namespace+cookie)) { + sessionStorage.removeItem(this.cookie_namespace+cookie); + } + } else { + this.writeSetting(cookie,'',-1); + } + }, +} diff --git a/doc/html/darkmode_toggle.js b/doc/html/darkmode_toggle.js new file mode 100644 index 0000000..9c1ca07 --- /dev/null +++ b/doc/html/darkmode_toggle.js @@ -0,0 +1,228 @@ +/** + +The code below is based on the Doxygen Awesome project with some minor modifications +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2022 jothepro + +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. + +*/ + +class DarkModeToggle extends HTMLElement { + + static darkmode_cookie_name = ''+'prefers-dark'; + static lightmode_cookie_name = ''+'prefers-light'; + + static icon = ''; + static title = "Toggle Light/Dark Mode" + + static prefersLightModeInDarkModeKey = "prefers-light-mode-in-dark-mode" + static prefersDarkModeInLightModeKey = "prefers-dark-mode-in-light-mode" + + static _staticConstructor = function() { + DarkModeToggle.enableDarkMode(DarkModeToggle.userPreference) + // Update the color scheme when the browsers preference changes + // without user interaction on the website. + window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => { + DarkModeToggle.onSystemPreferenceChanged() + }) + // Update the color scheme when the tab is made visible again. + // It is possible that the appearance was changed in another tab + // while this tab was in the background. + document.addEventListener("visibilitychange", visibilityState => { + if (document.visibilityState === 'visible') { + DarkModeToggle.onSystemPreferenceChanged() + } + }); + }() + + static init() { + $(function() { + $(document).ready(function() { + const toggleButton = document.createElement('dark-mode-toggle') + toggleButton.title = DarkModeToggle.title + toggleButton.innerHTML = DarkModeToggle.icon + toggleButton.tabIndex = 0; + + function addButton() { + const titleArea = document.getElementById("titlearea"); + const searchBox = document.getElementById("MSearchBox"); + const mainMenu = document.getElementById("main-menu"); + const navRow1 = document.getElementById("navrow1"); + let mainMenuVisible = false; + if (mainMenu) { + const menuStyle = window.getComputedStyle(mainMenu); + mainMenuVisible = menuStyle.display!=='none' + } + const searchBoxPos1 = document.getElementById("searchBoxPos1"); + const buttonLi = document.getElementById('toggle-dark-mode'); + if (buttonLi) { + buttonLi.parentNode.removeChild(buttonLi); + } + if (searchBox) { // (1) search box visible + searchBox.parentNode.appendChild(toggleButton) + } else if (navRow1) { // (2) no search box, static menu bar + const li = document.createElement('li'); + li.id = 'toggle-dark-mode'; + li.style = 'float: right;' + li.appendChild(toggleButton); + toggleButton.style = 'width: 24px; height: 25px; padding-top: 11px; float: right;'; + const row = document.querySelector('#navrow1 > ul:first-of-type'); + row.appendChild(li) + } else if (mainMenu && mainMenuVisible) { // (3) no search box + dynamic menu bar expanded + const li = document.createElement('li'); + li.id = 'toggle-dark-mode'; + li.style = 'float: right;' + li.appendChild(toggleButton); + toggleButton.style = 'width: 14px; height: 36px; padding-top: 10px; float: right;'; + mainMenu.appendChild(li) + } else if (searchBoxPos1) { // (4) no search box + dynamic menu bar collapsed + toggleButton.style = 'width: 24px; height: 36px; padding-top: 10px; float: right;'; + searchBoxPos1.style = 'top: 0px;' + searchBoxPos1.appendChild(toggleButton); + } else if (titleArea) { // (5) no search box and no navigation tabs + toggleButton.style = 'width: 24px; height: 24px; position: absolute; right: 0px; top: 34px;'; + titleArea.append(toggleButton); + } + } + + $(document).ready(() => addButton()); + $(window).resize(() => addButton()); + let inFocus = false; + $(document).focusin(() => inFocus = true); + $(document).focusout(() => inFocus = false); + $(document).keyup(function(e) { + if (e.keyCode==27 && !inFocus) { // escape key maps to keycode `27` + e.stopPropagation(); + DarkModeToggle.userPreference = !DarkModeToggle.userPreference + } + }) + DarkModeToggle.setDarkModeVisibility(DarkModeToggle.darkModeEnabled) + }) + }) + } + + constructor() { + super(); + this.onclick=this.toggleDarkMode + this.onkeypress=function(e){if (e.keyCode==13) { this.toggleDarkMode(); }}; + } + + /** + * @returns `true` for dark-mode, `false` for light-mode system preference + */ + static get systemPreference() { + return window.matchMedia('(prefers-color-scheme: dark)').matches + } + + static get prefersDarkModeInLightMode() { + return Cookie.readSetting(DarkModeToggle.darkmode_cookie_name,'0')=='1'; + } + + static set prefersDarkModeInLightMode(preference) { + if (preference) { + Cookie.writeSetting(DarkModeToggle.darkmode_cookie_name,'1'); + } else { + Cookie.eraseSetting(DarkModeToggle.darkmode_cookie_name); + } + } + + static get prefersLightModeInDarkMode() { + return Cookie.readSetting(DarkModeToggle.lightmode_cookie_name,'0')=='1' + } + + static set prefersLightModeInDarkMode(preference) { + if (preference) { + Cookie.writeSetting(DarkModeToggle.lightmode_cookie_name,'1'); + } else { + Cookie.eraseSetting(DarkModeToggle.lightmode_cookie_name); + } + } + + /** + * @returns `true` for dark-mode, `false` for light-mode user preference + */ + static get userPreference() { + return (!DarkModeToggle.systemPreference && DarkModeToggle.prefersDarkModeInLightMode) || + (DarkModeToggle.systemPreference && !DarkModeToggle.prefersLightModeInDarkMode) + } + + static set userPreference(userPreference) { + DarkModeToggle.darkModeEnabled = userPreference + if (!userPreference) { + if (DarkModeToggle.systemPreference) { + DarkModeToggle.prefersLightModeInDarkMode = true + } else { + DarkModeToggle.prefersDarkModeInLightMode = false + } + } else { + if (!DarkModeToggle.systemPreference) { + DarkModeToggle.prefersDarkModeInLightMode = true + } else { + DarkModeToggle.prefersLightModeInDarkMode = false + } + } + DarkModeToggle.onUserPreferenceChanged() + } + + static setDarkModeVisibility(enable) { + let darkModeStyle, lightModeStyle; + if(enable) { + darkModeStyle = 'inline-block'; + lightModeStyle = 'none' + } else { + darkModeStyle = 'none'; + lightModeStyle = 'inline-block' + } + document.querySelectorAll('.dark-mode-visible' ).forEach(el => el.style.display = darkModeStyle); + document.querySelectorAll('.light-mode-visible').forEach(el => el.style.display = lightModeStyle); + } + static enableDarkMode(enable) { + if(enable) { + DarkModeToggle.darkModeEnabled = true + document.documentElement.classList.add("dark-mode") + document.documentElement.classList.remove("light-mode") + } else { + DarkModeToggle.darkModeEnabled = false + document.documentElement.classList.remove("dark-mode") + document.documentElement.classList.add("light-mode") + } + DarkModeToggle.setDarkModeVisibility(enable) + } + + static onSystemPreferenceChanged() { + DarkModeToggle.darkModeEnabled = DarkModeToggle.userPreference + DarkModeToggle.enableDarkMode(DarkModeToggle.darkModeEnabled) + } + + static onUserPreferenceChanged() { + DarkModeToggle.enableDarkMode(DarkModeToggle.darkModeEnabled) + } + + toggleDarkMode() { + DarkModeToggle.userPreference = !DarkModeToggle.userPreference + } +} + +customElements.define("dark-mode-toggle", DarkModeToggle); + +DarkModeToggle.init(); diff --git a/doc/html/dir_000001_000002.html b/doc/html/dir_000001_000002.html new file mode 100644 index 0000000..b3e37c1 --- /dev/null +++ b/doc/html/dir_000001_000002.html @@ -0,0 +1,112 @@ + + + + + + + +LibDriver DS3231: example -> interface Relation + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
LibDriver DS3231 +
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+ +
+ + + + diff --git a/doc/html/dir_000002_000004.html b/doc/html/dir_000002_000004.html new file mode 100644 index 0000000..3343ee6 --- /dev/null +++ b/doc/html/dir_000002_000004.html @@ -0,0 +1,112 @@ + + + + + + + +LibDriver DS3231: interface -> src Relation + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
LibDriver DS3231 +
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+

interface → src Relation

File in interfaceIncludes file in src
driver_ds3231_interface.hdriver_ds3231.h
+
+ +
+ + + + diff --git a/doc/html/dir_000005_000002.html b/doc/html/dir_000005_000002.html new file mode 100644 index 0000000..4e20cda --- /dev/null +++ b/doc/html/dir_000005_000002.html @@ -0,0 +1,112 @@ + + + + + + + +LibDriver DS3231: test -> interface Relation + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
LibDriver DS3231 +
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ + +
+ + + + diff --git a/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37.html b/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37.html index a05e738..7df73a9 100644 --- a/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37.html +++ b/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: doc/mainpage Directory Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
mainpage Directory Reference
+
mainpage Directory Reference
+
+Directory dependency graph for mainpage:
+
+
+
- - - +

+

Files

file  mainpage.h [code]
 
 
mainpage.h
+ +
diff --git a/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37_dep.md5 b/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37_dep.md5 new file mode 100644 index 0000000..6fdb029 --- /dev/null +++ b/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37_dep.md5 @@ -0,0 +1 @@ +9a2e53198467ff596c9c299cce3cdb89 \ No newline at end of file diff --git a/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37_dep.svg b/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37_dep.svg new file mode 100644 index 0000000..aec367e --- /dev/null +++ b/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37_dep.svg @@ -0,0 +1,29 @@ + + + + + + +doc/mainpage + +clusterdir_e68e8157741866f444e17edd764ebbae + + +doc + + + + + +dir_11ec664f88f5f079ad4de1adb8458c37 + + +mainpage + + + + + diff --git a/doc/html/dir_13e138d54eb8818da29c3992edef070a.html b/doc/html/dir_13e138d54eb8818da29c3992edef070a.html index dd6772a..aaeb05e 100644 --- a/doc/html/dir_13e138d54eb8818da29c3992edef070a.html +++ b/doc/html/dir_13e138d54eb8818da29c3992edef070a.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test Directory Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
test Directory Reference
+
test Directory Reference
+
+Directory dependency graph for test:
+
+
+
- - + - - + - - + - - + - - + - - + - - + - - + -

+

Files

file  driver_ds3231_alarm_test.c [code]
 
driver_ds3231_alarm_test.c
 driver ds3231 alarm test source file
 
file  driver_ds3231_alarm_test.h [code]
 
driver_ds3231_alarm_test.h
 driver ds3231 alarm test header file
 
file  driver_ds3231_output_test.c [code]
 
driver_ds3231_output_test.c
 driver ds3231 output test source file
 
file  driver_ds3231_output_test.h [code]
 
driver_ds3231_output_test.h
 driver ds3231 output test header file
 
file  driver_ds3231_readwrite_test.c [code]
 
driver_ds3231_readwrite_test.c
 driver ds3231 readwrite test source file
 
file  driver_ds3231_readwrite_test.h [code]
 
driver_ds3231_readwrite_test.h
 driver ds3231 readwrite test header file
 
file  driver_ds3231_register_test.c [code]
 
driver_ds3231_register_test.c
 driver ds3231 register test source file
 
file  driver_ds3231_register_test.h [code]
 
driver_ds3231_register_test.h
 driver ds3231 register test header file
 
+ +
diff --git a/doc/html/dir_13e138d54eb8818da29c3992edef070a_dep.md5 b/doc/html/dir_13e138d54eb8818da29c3992edef070a_dep.md5 new file mode 100644 index 0000000..7fbf6e9 --- /dev/null +++ b/doc/html/dir_13e138d54eb8818da29c3992edef070a_dep.md5 @@ -0,0 +1 @@ +5098d6f7c7b39f9e72f7b78557e27a3e \ No newline at end of file diff --git a/doc/html/dir_13e138d54eb8818da29c3992edef070a_dep.svg b/doc/html/dir_13e138d54eb8818da29c3992edef070a_dep.svg new file mode 100644 index 0000000..a11bcef --- /dev/null +++ b/doc/html/dir_13e138d54eb8818da29c3992edef070a_dep.svg @@ -0,0 +1,43 @@ + + + + + + +test + + +dir_13e138d54eb8818da29c3992edef070a + + +test + + + + + +dir_b31d54d5631803016a26f28213a41162 + + +interface + + + + + +dir_13e138d54eb8818da29c3992edef070a->dir_b31d54d5631803016a26f28213a41162 + + + + + + +4 + + + + + diff --git a/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html index da351e0..48b2f1c 100644 --- a/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: src Directory Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
src Directory Reference
+
src Directory Reference
- - + - - + -

+

Files

file  driver_ds3231.c [code]
 
driver_ds3231.c
 driver ds3231 source file
 
file  driver_ds3231.h [code]
 
driver_ds3231.h
 driver ds3231 header file
 
+ +
diff --git a/doc/html/dir_b31d54d5631803016a26f28213a41162.html b/doc/html/dir_b31d54d5631803016a26f28213a41162.html index 790c278..0d88518 100644 --- a/doc/html/dir_b31d54d5631803016a26f28213a41162.html +++ b/doc/html/dir_b31d54d5631803016a26f28213a41162.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: interface Directory Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
interface Directory Reference
+
interface Directory Reference
+
+Directory dependency graph for interface:
+
+
+
- - + - - + -

+

Files

file  driver_ds3231_interface.h [code]
 
driver_ds3231_interface.h
 driver ds3231 interface header file
 
file  driver_ds3231_interface_template.c [code]
 
driver_ds3231_interface_template.c
 driver ds3231 interface template source file
 
+ +
diff --git a/doc/html/dir_b31d54d5631803016a26f28213a41162_dep.md5 b/doc/html/dir_b31d54d5631803016a26f28213a41162_dep.md5 new file mode 100644 index 0000000..0691cd6 --- /dev/null +++ b/doc/html/dir_b31d54d5631803016a26f28213a41162_dep.md5 @@ -0,0 +1 @@ +aafca4c50518e27727ecb11e3972f370 \ No newline at end of file diff --git a/doc/html/dir_b31d54d5631803016a26f28213a41162_dep.svg b/doc/html/dir_b31d54d5631803016a26f28213a41162_dep.svg new file mode 100644 index 0000000..b8eee62 --- /dev/null +++ b/doc/html/dir_b31d54d5631803016a26f28213a41162_dep.svg @@ -0,0 +1,43 @@ + + + + + + +interface + + +dir_b31d54d5631803016a26f28213a41162 + + +interface + + + + + +dir_68267d1309a1af8e8297ef4c3efbcdba + + +src + + + + + +dir_b31d54d5631803016a26f28213a41162->dir_68267d1309a1af8e8297ef4c3efbcdba + + + + + + +1 + + + + + diff --git a/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html b/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html index 9b1112a..ab61d22 100644 --- a/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html +++ b/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: example Directory Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
example Directory Reference
+
example Directory Reference
+
+Directory dependency graph for example:
+
+
+
- - + - - + - - + - - + - - + - - + -

+

Files

file  driver_ds3231_alarm.c [code]
 
driver_ds3231_alarm.c
 driver ds3231 alarm source file
 
file  driver_ds3231_alarm.h [code]
 
driver_ds3231_alarm.h
 driver ds3231 alarm header file
 
file  driver_ds3231_basic.c [code]
 
driver_ds3231_basic.c
 driver ds3231 basic source file
 
file  driver_ds3231_basic.h [code]
 
driver_ds3231_basic.h
 driver ds3231 basic header file
 
file  driver_ds3231_output.c [code]
 
driver_ds3231_output.c
 driver ds3231 output source file
 
file  driver_ds3231_output.h [code]
 
driver_ds3231_output.h
 driver ds3231 output header file
 
+ +
diff --git a/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.md5 b/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.md5 new file mode 100644 index 0000000..c624164 --- /dev/null +++ b/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.md5 @@ -0,0 +1 @@ +8417ba6a5139d8f0d659e7187d59c8bb \ No newline at end of file diff --git a/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.svg b/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.svg new file mode 100644 index 0000000..3380e14 --- /dev/null +++ b/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.svg @@ -0,0 +1,43 @@ + + + + + + +example + + +dir_cfafba98a580ce4b62f8a6fa96d7cbb0 + + +example + + + + + +dir_b31d54d5631803016a26f28213a41162 + + +interface + + + + + +dir_cfafba98a580ce4b62f8a6fa96d7cbb0->dir_b31d54d5631803016a26f28213a41162 + + + + + + +3 + + + + + diff --git a/doc/html/dir_e68e8157741866f444e17edd764ebbae.html b/doc/html/dir_e68e8157741866f444e17edd764ebbae.html index a24da0a..2fc3d23 100644 --- a/doc/html/dir_e68e8157741866f444e17edd764ebbae.html +++ b/doc/html/dir_e68e8157741866f444e17edd764ebbae.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: doc Directory Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
doc Directory Reference
+
doc Directory Reference
- - - +

+

Directories

directory  mainpage
 
 
mainpage
+ +
diff --git a/doc/html/doc.png b/doc/html/doc.png deleted file mode 100644 index 17edabf..0000000 Binary files a/doc/html/doc.png and /dev/null differ diff --git a/doc/html/doxygen.css b/doc/html/doxygen.css index ffbff02..2e9a10a 100644 --- a/doc/html/doxygen.css +++ b/doc/html/doxygen.css @@ -1,29 +1,450 @@ -/* The standard CSS for doxygen 1.9.1 */ +/* The standard CSS for doxygen 1.15.0*/ + +html { +/* page base colors */ +--page-background-color: white; +--page-foreground-color: black; +--page-link-color: #3D578C; +--page-visited-link-color: #3D578C; +--page-external-link-color: #334975; + +/* index */ +--index-odd-item-bg-color: #F8F9FC; +--index-even-item-bg-color: white; +--index-header-color: black; +--index-separator-color: #A0A0A0; + +/* header */ +--header-background-color: #F9FAFC; +--header-separator-color: #C4CFE5; +--group-header-separator-color: #D9E0EE; +--group-header-color: #354C7B; +--inherit-header-color: gray; + +--footer-foreground-color: #2A3D61; +--footer-logo-width: 75px; +--citation-label-color: #334975; +--glow-color: cyan; + +--title-background-color: white; +--title-separator-color: #C4CFE5; +--directory-separator-color: #9CAFD4; +--separator-color: #4A6AAA; + +--blockquote-background-color: #F7F8FB; +--blockquote-border-color: #9CAFD4; + +--scrollbar-thumb-color: #C4CFE5; +--scrollbar-background-color: #F9FAFC; + +--icon-background-color: #728DC1; +--icon-foreground-color: white; +/* +--icon-doc-image: url('doc.svg'); +--icon-folder-open-image: url('folderopen.svg'); +--icon-folder-closed-image: url('folderclosed.svg');*/ +--icon-folder-open-fill-color: #C4CFE5; +--icon-folder-fill-color: #D8DFEE; +--icon-folder-border-color: #4665A2; +--icon-doc-fill-color: #D8DFEE; +--icon-doc-border-color: #4665A2; + +/* brief member declaration list */ +--memdecl-background-color: #F9FAFC; +--memdecl-separator-color: #DEE4F0; +--memdecl-foreground-color: #555; +--memdecl-template-color: #4665A2; +--memdecl-border-color: #D5DDEC; + +/* detailed member list */ +--memdef-border-color: #A8B8D9; +--memdef-title-background-color: #E2E8F2; +--memdef-proto-background-color: #EEF1F7; +--memdef-proto-text-color: #253555; +--memdef-doc-background-color: white; +--memdef-param-name-color: #602020; +--memdef-template-color: #4665A2; + +/* tables */ +--table-cell-border-color: #2D4068; +--table-header-background-color: #374F7F; +--table-header-foreground-color: #FFFFFF; + +/* labels */ +--label-background-color: #728DC1; +--label-left-top-border-color: #5373B4; +--label-right-bottom-border-color: #C4CFE5; +--label-foreground-color: white; + +/** navigation bar/tree/menu */ +--nav-background-color: #F9FAFC; +--nav-foreground-color: #364D7C; +--nav-border-color: #C4CFE5; +--nav-breadcrumb-separator-color: #C4CFE5; +--nav-breadcrumb-active-bg: #EEF1F7; +--nav-breadcrumb-color: #354C7B; +--nav-breadcrumb-border-color: #E1E7F2; +--nav-splitbar-bg-color: #DCE2EF; +--nav-splitbar-handle-color: #9CAFD4; +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #283A5D; +--nav-text-hover-color: white; +--nav-text-active-color: white; +--nav-menu-button-color: #364D7C; +--nav-menu-background-color: white; +--nav-menu-foreground-color: #555555; +--nav-menu-active-bg: #DCE2EF; +--nav-menu-active-color: #9CAFD4; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.5); +--nav-arrow-color: #B6C4DF; +--nav-arrow-selected-color: #90A5CE; + +/* sync icon */ +--sync-icon-border-color: #C4CFE5; +--sync-icon-background-color: #F9FAFC; +--sync-icon-selected-background-color: #EEF1F7; +--sync-icon-color: #C4CFE5; +--sync-icon-selected-color: #6884BD; + +/* table of contents */ +--toc-background-color: #F4F6FA; +--toc-border-color: #D8DFEE; +--toc-header-color: #4665A2; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: white; +--search-foreground-color: #909090; +--search-active-color: black; +--search-filter-background-color: rgba(255,255,255,.7); +--search-filter-backdrop-filter: blur(4px); +--search-filter-foreground-color: black; +--search-filter-border-color: rgba(150,150,150,.4); +--search-filter-highlight-text-color: white; +--search-filter-highlight-bg-color: #3D578C; +--search-results-foreground-color: #425E97; +--search-results-background-color: rgba(255,255,255,.8); +--search-results-backdrop-filter: blur(4px); +--search-results-border-color: rgba(150,150,150,.4); +--search-box-border-color: #B6C4DF; +--search-close-icon-bg-color: #A0A0A0; +--search-close-icon-fg-color: white; + +/** code fragments */ +--code-keyword-color: #008000; +--code-type-keyword-color: #604020; +--code-flow-keyword-color: #E08000; +--code-comment-color: #800000; +--code-preprocessor-color: #806020; +--code-string-literal-color: #002080; +--code-char-literal-color: #008080; +--code-xml-cdata-color: black; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #000000; +--code-vhdl-keyword-color: #700070; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #4665A2; +--code-external-link-color: #4665A2; +--fragment-foreground-color: black; +--fragment-background-color: #FBFCFD; +--fragment-border-color: #C4CFE5; +--fragment-lineno-border-color: #00FF00; +--fragment-lineno-background-color: #E8E8E8; +--fragment-lineno-foreground-color: black; +--fragment-lineno-link-fg-color: #4665A2; +--fragment-lineno-link-bg-color: #D8D8D8; +--fragment-lineno-link-hover-fg-color: #4665A2; +--fragment-lineno-link-hover-bg-color: #C8C8C8; +--fragment-copy-ok-color: #2EC82E; +--fragment-highlight-filter: -3; +--tooltip-foreground-color: black; +--tooltip-background-color: rgba(255,255,255,0.8); +--tooltip-arrow-background-color: white; +--tooltip-border-color: rgba(150,150,150,0.7); +--tooltip-backdrop-filter: blur(3px); +--tooltip-doc-color: grey; +--tooltip-declaration-color: #006318; +--tooltip-link-color: #4665A2; +--tooltip-shadow: 0 4px 8px 0 rgba(0,0,0,.25); +--fold-line-color: #808080; + +/** font-family */ +--font-family-normal: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +/** special sections */ +--warning-color-bg: #f8d1cc; +--warning-color-hl: #b61825; +--warning-color-text: #75070f; +--note-color-bg: #faf3d8; +--note-color-hl: #f3a600; +--note-color-text: #5f4204; +--todo-color-bg: #e4f3ff; +--todo-color-hl: #1879C4; +--todo-color-text: #274a5c; +--test-color-bg: #e8e8ff; +--test-color-hl: #3939C4; +--test-color-text: #1a1a5c; +--deprecated-color-bg: #ecf0f3; +--deprecated-color-hl: #5b6269; +--deprecated-color-text: #43454a; +--bug-color-bg: #e4dafd; +--bug-color-hl: #5b2bdd; +--bug-color-text: #2a0d72; +--invariant-color-bg: #d8f1e3; +--invariant-color-hl: #44b86f; +--invariant-color-text: #265532; +} + +html.dark-mode { +/* page base colors */ +--page-background-color: black; +--page-foreground-color: #C9D1D9; +--page-link-color: #90A5CE; +--page-visited-link-color: #90A5CE; +--page-external-link-color: #A3B4D7; + +/* index */ +--index-odd-item-bg-color: #0B101A; +--index-even-item-bg-color: black; +--index-header-color: #C4CFE5; +--index-separator-color: #334975; + +/* header */ +--header-background-color: #070B11; +--header-separator-color: #141C2E; +--group-header-separator-color: #1D2A43; +--group-header-color: #90A5CE; +--inherit-header-color: #A0A0A0; + +--footer-foreground-color: #5B7AB7; +--footer-logo-width: 60px; +--citation-label-color: #90A5CE; +--glow-color: cyan; + +--title-background-color: #090D16; +--title-separator-color: #212F4B; +--directory-separator-color: #283A5D; +--separator-color: #283A5D; + +--blockquote-background-color: #101826; +--blockquote-border-color: #283A5D; + +--scrollbar-thumb-color: #2C3F65; +--scrollbar-background-color: #070B11; + +--icon-background-color: #334975; +--icon-foreground-color: #C4CFE5; +--icon-folder-open-fill-color: #4665A2; +--icon-folder-fill-color: #5373B4; +--icon-folder-border-color: #C4CFE5; +--icon-doc-fill-color: #6884BD; +--icon-doc-border-color: #C4CFE5; + +/* brief member declaration list */ +--memdecl-background-color: #0B101A; +--memdecl-separator-color: #2C3F65; +--memdecl-foreground-color: #BBB; +--memdecl-template-color: #7C95C6; +--memdecl-border-color: #233250; + +/* detailed member list */ +--memdef-border-color: #233250; +--memdef-title-background-color: #1B2840; +--memdef-proto-background-color: #19243A; +--memdef-proto-text-color: #9DB0D4; +--memdef-doc-background-color: black; +--memdef-param-name-color: #D28757; +--memdef-template-color: #7C95C6; + +/* tables */ +--table-cell-border-color: #283A5D; +--table-header-background-color: #283A5D; +--table-header-foreground-color: #C4CFE5; + +/* labels */ +--label-background-color: #354C7B; +--label-left-top-border-color: #4665A2; +--label-right-bottom-border-color: #283A5D; +--label-foreground-color: #CCCCCC; + +/** navigation bar/tree/menu */ +--nav-background-color: #101826; +--nav-foreground-color: #364D7C; +--nav-border-color: #212F4B; +--nav-breadcrumb-separator-color: #212F4B; +--nav-breadcrumb-active-bg: #1D2A43; +--nav-breadcrumb-color: #90A5CE; +--nav-breadcrumb-border-color: #2A3D61; +--nav-splitbar-bg-color: #283A5D; +--nav-splitbar-handle-color: #4665A2; +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #B6C4DF; +--nav-text-hover-color: #DCE2EF; +--nav-text-active-color: #DCE2EF; +--nav-menu-button-color: #B6C4DF; +--nav-menu-background-color: #05070C; +--nav-menu-foreground-color: #BBBBBB; +--nav-menu-active-bg: #1D2A43; +--nav-menu-active-color: #C9D3E7; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.2); +--nav-arrow-color: #4665A2; +--nav-arrow-selected-color: #6884BD; + +/* sync icon */ +--sync-icon-border-color: #212F4B; +--sync-icon-background-color: #101826; +--sync-icon-selected-background-color: #1D2A43; +--sync-icon-color: #4665A2; +--sync-icon-selected-color: #5373B4; + +/* table of contents */ +--toc-background-color: #151E30; +--toc-border-color: #202E4A; +--toc-header-color: #A3B4D7; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: black; +--search-foreground-color: #C5C5C5; +--search-active-color: #F5F5F5; +--search-filter-background-color: #101826; +--search-filter-foreground-color: #90A5CE; +--search-filter-backdrop-filter: none; +--search-filter-border-color: #7C95C6; +--search-filter-highlight-text-color: #BCC9E2; +--search-filter-highlight-bg-color: #283A5D; +--search-results-background-color: black; +--search-results-foreground-color: #90A5CE; +--search-results-backdrop-filter: none; +--search-results-border-color: #334975; +--search-box-border-color: #334975; +--search-close-icon-bg-color: #909090; +--search-close-icon-fg-color: black; + +/** code fragments */ +--code-keyword-color: #CC99CD; +--code-type-keyword-color: #AB99CD; +--code-flow-keyword-color: #E08000; +--code-comment-color: #717790; +--code-preprocessor-color: #65CABE; +--code-string-literal-color: #7EC699; +--code-char-literal-color: #00E0F0; +--code-xml-cdata-color: #C9D1D9; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #C0C0C0; +--code-vhdl-keyword-color: #CF53C9; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #79C0FF; +--code-external-link-color: #79C0FF; +--fragment-foreground-color: #C9D1D9; +--fragment-background-color: #090D16; +--fragment-border-color: #30363D; +--fragment-lineno-border-color: #30363D; +--fragment-lineno-background-color: black; +--fragment-lineno-foreground-color: #6E7681; +--fragment-lineno-link-fg-color: #6E7681; +--fragment-lineno-link-bg-color: #303030; +--fragment-lineno-link-hover-fg-color: #8E96A1; +--fragment-lineno-link-hover-bg-color: #505050; +--fragment-copy-ok-color: #0EA80E; +--fragment-highlight-filter: 5; +--tooltip-foreground-color: #C9D1D9; +--tooltip-background-color: #202020; +--tooltip-arrow-background-color: #202020; +--tooltip-backdrop-filter: none; +--tooltip-border-color: #C9D1D9; +--tooltip-doc-color: #D9E1E9; +--tooltip-declaration-color: #20C348; +--tooltip-link-color: #79C0FF; +--tooltip-shadow: none; +--fold-line-color: #808080; + +/** font-family */ +--font-family-normal: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +/** special sections */ +--warning-color-bg: #2e1917; +--warning-color-hl: #ad2617; +--warning-color-text: #f5b1aa; +--note-color-bg: #3b2e04; +--note-color-hl: #f1b602; +--note-color-text: #ceb670; +--todo-color-bg: #163750; +--todo-color-hl: #1982D2; +--todo-color-text: #dcf0fa; +--test-color-bg: #121258; +--test-color-hl: #4242cf; +--test-color-text: #c0c0da; +--deprecated-color-bg: #2e323b; +--deprecated-color-hl: #738396; +--deprecated-color-text: #abb0bd; +--bug-color-bg: #2a2536; +--bug-color-hl: #7661b3; +--bug-color-text: #ae9ed6; +--invariant-color-bg: #303a35; +--invariant-color-hl: #76ce96; +--invariant-color-text: #cceed5; +} + +body { + background-color: var(--page-background-color); + color: var(--page-foreground-color); +} body, table, div, p, dl { - font: 400 14px/22px Roboto,sans-serif; + font-weight: 400; + font-size: 14px; + font-family: var(--font-family-normal); + line-height: 22px; +} + +body.resizing { + user-select: none; + -webkit-user-select: none; } -p.reference, p.definition { - font: 400 14px/22px Roboto,sans-serif; +#doc-content { + scrollbar-width: thin; } /* @group Heading Levels */ -h1.groupheader { - font-size: 150%; +.title { + font-family: var(--font-family-normal); + line-height: 28px; + font-size: 160%; + font-weight: 400; + margin: 10px 2px; } -.title { - font: 400 14px/28px Roboto,sans-serif; +h1.groupheader { font-size: 150%; - font-weight: bold; - margin: 10px 2px; } h2.groupheader { - border-bottom: 1px solid #879ECB; - color: #354C7B; + box-shadow: 12px 0 var(--page-background-color), + -12px 0 var(--page-background-color), + 12px 1px var(--group-header-separator-color), + -12px 1px var(--group-header-separator-color); + color: var(--group-header-color); font-size: 150%; font-weight: normal; margin-top: 1.75em; @@ -32,6 +453,13 @@ h2.groupheader { width: 100%; } +td h2.groupheader { + box-shadow: 13px 0 var(--page-background-color), + -13px 0 var(--page-background-color), + 13px 1px var(--group-header-separator-color), + -13px 1px var(--group-header-separator-color); +} + h3.groupheader { font-size: 100%; } @@ -46,29 +474,20 @@ h1, h2, h3, h4, h5, h6 { } h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { - text-shadow: 0 0 15px cyan; + text-shadow: 0 0 15px var(--glow-color); } dt { font-weight: bold; } -ul.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; - column-count: 3; -} - p.startli, p.startdd { margin-top: 2px; } th p.starttd, th p.intertd, th p.endtd { - font-size: 100%; - font-weight: 700; + font-size: 100%; + font-weight: 700; } p.starttd { @@ -113,10 +532,11 @@ h3.version { } div.navtab { - border-right: 1px solid #A3B4D7; - padding-right: 15px; + margin-right: 6px; + padding-right: 6px; text-align: right; line-height: 110%; + background-color: var(--nav-background-color); } div.navtab table { @@ -127,20 +547,12 @@ td.navtab { padding-right: 6px; padding-left: 6px; } + td.navtabHL { - background-image: url('tab_a.png'); - background-repeat:repeat-x; padding-right: 6px; padding-left: 6px; -} - -td.navtabHL a, td.navtabHL a:visited { - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); -} - -a.navtab { - font-weight: bold; + border-radius: 0 6px 6px 0; + background-color: var(--nav-menu-active-bg); } div.qindex{ @@ -148,7 +560,13 @@ div.qindex{ width: 100%; line-height: 140%; font-size: 130%; - color: #A0A0A0; + color: var(--index-separator-color); +} + +#main-menu a:focus { + outline: auto; + z-index: 10; + position: relative; } dt.alphachar{ @@ -157,7 +575,7 @@ dt.alphachar{ } .alphachar a{ - color: black; + color: var(--index-header-color); } .alphachar a:hover, .alphachar a:visited{ @@ -176,8 +594,12 @@ dt.alphachar{ line-height: 1.15em; } +.classindex dl.even { + background-color: var(--index-even-item-bg-color); +} + .classindex dl.odd { - background-color: #F8F9FC; + background-color: var(--index-odd-item-bg-color); } @media(min-width: 1120px) { @@ -196,21 +618,18 @@ dt.alphachar{ /* @group Link Styling */ a { - color: #3D578C; + color: var(--page-link-color); font-weight: normal; text-decoration: none; } .contents a:visited { - color: #4665A2; + color: var(--page-visited-link-color); } -a:hover { - text-decoration: underline; -} - -.contents a.qindexHL:visited { - color: #FFFFFF; +span.label a:hover { + text-decoration: none; + background: linear-gradient(to bottom, transparent 0,transparent calc(100% - 1px), currentColor 100%); } a.el { @@ -220,13 +639,40 @@ a.el { a.elRef { } -a.code, a.code:visited, a.line, a.line:visited { - color: #4665A2; +a.el, a.el:visited, a.code, a.code:visited, a.line, a.line:visited { + color: var(--page-link-color); } a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: #4665A2; -} + color: var(--page-external-link-color); +} + +a.code.hl_class { /* style for links to class names in code snippets */ } +a.code.hl_struct { /* style for links to struct names in code snippets */ } +a.code.hl_union { /* style for links to union names in code snippets */ } +a.code.hl_interface { /* style for links to interface names in code snippets */ } +a.code.hl_protocol { /* style for links to protocol names in code snippets */ } +a.code.hl_category { /* style for links to category names in code snippets */ } +a.code.hl_exception { /* style for links to exception names in code snippets */ } +a.code.hl_service { /* style for links to service names in code snippets */ } +a.code.hl_singleton { /* style for links to singleton names in code snippets */ } +a.code.hl_concept { /* style for links to concept names in code snippets */ } +a.code.hl_namespace { /* style for links to namespace names in code snippets */ } +a.code.hl_package { /* style for links to package names in code snippets */ } +a.code.hl_define { /* style for links to macro names in code snippets */ } +a.code.hl_function { /* style for links to function names in code snippets */ } +a.code.hl_variable { /* style for links to variable names in code snippets */ } +a.code.hl_typedef { /* style for links to typedef names in code snippets */ } +a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } +a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } +a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } +a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } +a.code.hl_friend { /* style for links to friend names in code snippets */ } +a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } +a.code.hl_property { /* style for links to property names in code snippets */ } +a.code.hl_event { /* style for links to event names in code snippets */ } +a.code.hl_sequence { /* style for links to sequence names in code snippets */ } +a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } /* @end */ @@ -234,58 +680,126 @@ dl.el { margin-left: -1cm; } +ul.check { + list-style:none; + text-indent: -16px; + padding-left: 38px; +} +li.unchecked:before { + content: "\2610\A0"; +} +li.checked:before { + content: "\2611\A0"; +} + +ol { + text-indent: 0px; +} + ul { - overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ + text-indent: 0px; + overflow: visible; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; + list-style-type: none; } #side-nav ul { - overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ } #main-nav ul { - overflow: visible; /* reset ul rule for the navigation bar drop down lists */ + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ } .fragment { - text-align: left; - direction: ltr; - overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ - overflow-y: hidden; + text-align: left; + direction: ltr; + overflow-x: auto; + overflow-y: hidden; + position: relative; + min-height: 12px; + margin: 10px 0px; + padding: 10px 10px; + border: 1px solid var(--fragment-border-color); + border-radius: 4px; + background-color: var(--fragment-background-color); + color: var(--fragment-foreground-color); } pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; - font-family: monospace, fixed; - font-size: 105%; + word-wrap: break-word; + font-size: 10pt; + line-height: 125%; + font-family: var(--font-family-monospace); +} + +span.tt { + white-space: pre; + font-family: var(--font-family-monospace); + background-color: var(--fragment-background-color); +} + +.clipboard { + width: 24px; + height: 24px; + right: 5px; + top: 5px; + opacity: 0; + position: absolute; + display: inline; + overflow: hidden; + justify-content: center; + align-items: center; + cursor: pointer; +} + +.clipboard.success { + border: 1px solid var(--fragment-foreground-color); + border-radius: 4px; } -div.fragment { - padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ - margin: 4px 8px 4px 2px; - background-color: #FBFCFD; - border: 1px solid #C4CFE5; +.fragment:hover .clipboard, .clipboard.success { + opacity: .4; +} + +.clipboard:hover, .clipboard.success { + opacity: 1 !important; +} + +.clipboard:active:not([class~=success]) svg { + transform: scale(.91); +} + +.clipboard.success svg { + fill: var(--fragment-copy-ok-color); +} + +.clipboard.success { + border-color: var(--fragment-copy-ok-color); } div.line { - font-family: monospace, fixed; - font-size: 13px; + font-family: var(--font-family-monospace); + font-size: 13px; min-height: 13px; - line-height: 1.0; - text-wrap: unrestricted; + line-height: 1.2; + text-wrap: wrap; + word-break: break-all; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS3 */ word-wrap: break-word; /* IE 5.5+ */ - text-indent: -53px; - padding-left: 53px; + text-indent: -62px; + padding-left: 62px; padding-bottom: 0px; margin: 0px; -webkit-transition-property: background-color, box-shadow; @@ -301,29 +815,86 @@ div.line { } div.line:after { - content:"\000A"; - white-space: pre; + content:"\000A"; + white-space: pre; } div.line.glow { - background-color: cyan; - box-shadow: 0 0 10px cyan; + background-color: var(--glow-color); + box-shadow: 0 0 10px var(--glow-color); } +span.fold { + display: inline-block; + width: 12px; + height: 12px; + margin-left: 4px; + margin-right: 1px; +} + +span.foldnone { + display: inline-block; + position: relative; + cursor: pointer; + user-select: none; +} + +span.fold.plus, span.fold.minus { + width: 10px; + height: 10px; + background-color: var(--fragment-background-color); + position: relative; + border: 1px solid var(--fold-line-color); + margin-right: 1px; +} + +span.fold.plus::before, span.fold.minus::before { + content: ''; + position: absolute; + background-color: var(--fold-line-color); +} + +span.fold.plus::before { + width: 2px; + height: 6px; + top: 2px; + left: 4px; +} + +span.fold.plus::after { + content: ''; + position: absolute; + width: 6px; + height: 2px; + top: 4px; + left: 2px; + background-color: var(--fold-line-color); +} + +span.fold.minus::before { + width: 6px; + height: 2px; + top: 4px; + left: 2px; +} span.lineno { padding-right: 4px; + margin-right: 9px; text-align: right; - border-right: 2px solid #0F0; - background-color: #E8E8E8; - white-space: pre; + border-right: 2px solid var(--fragment-lineno-border-color); + color: var(--fragment-lineno-foreground-color); + background-color: var(--fragment-lineno-background-color); + white-space: pre; } -span.lineno a { - background-color: #D8D8D8; +span.lineno a, span.lineno a:visited { + color: var(--fragment-lineno-link-fg-color); + background-color: var(--fragment-lineno-link-bg-color); } span.lineno a:hover { - background-color: #C8C8C8; + color: var(--fragment-lineno-link-hover-fg-color); + background-color: var(--fragment-lineno-link-hover-bg-color); } .lineno { @@ -335,37 +906,28 @@ span.lineno a:hover { user-select: none; } -div.ah, span.ah { - background-color: black; - font-weight: bold; - color: #FFFFFF; - margin-bottom: 3px; - margin-top: 3px; - padding: 0.2em; - border: solid thin #333; - border-radius: 0.5em; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - box-shadow: 2px 2px 3px #999; - -webkit-box-shadow: 2px 2px 3px #999; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); -} - div.classindex ul { - list-style: none; - padding-left: 0; + list-style: none; + padding-left: 0; } div.classindex span.ai { - display: inline-block; + display: inline-block; } div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; + box-shadow: 13px 0 var(--page-background-color), + -13px 0 var(--page-background-color), + 13px 1px var(--group-header-separator-color), + -13px 1px var(--group-header-separator-color); + color: var(--group-header-color); + font-size: 110%; + font-weight: 500; + margin-left: 0px; + margin-top: 0em; + margin-bottom: 6px; + padding-top: 8px; + padding-bottom: 4px; } div.groupText { @@ -374,44 +936,25 @@ div.groupText { } body { - background-color: white; - color: black; - margin: 0; + color: var(--page-foreground-color); + margin: 0; } div.contents { margin-top: 10px; margin-left: 12px; - margin-right: 8px; -} - -td.indexkey { - background-color: #EBEFF6; - font-weight: bold; - border: 1px solid #C4CFE5; - margin: 2px 0px 2px 0; - padding: 2px 10px; - white-space: nowrap; - vertical-align: top; -} - -td.indexvalue { - background-color: #EBEFF6; - border: 1px solid #C4CFE5; - padding: 2px 10px; - margin: 2px 0px; -} - -tr.memlist { - background-color: #EEF1F7; + margin-right: 12px; } p.formulaDsp { text-align: center; } -img.formulaDsp { - +img.dark-mode-visible { + display: none; +} +img.light-mode-visible { + display: none; } img.formulaInl, img.inline { @@ -420,9 +963,9 @@ img.formulaInl, img.inline { div.center { text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; } div.center img { @@ -437,89 +980,74 @@ address.footer { img.footer { border: 0px; vertical-align: middle; + width: var(--footer-logo-width); +} + +.compoundTemplParams { + color: var(--memdecl-template-color); + font-size: 80%; + line-height: 120%; } /* @group Code Colorization */ span.keyword { - color: #008000 + color: var(--code-keyword-color); } span.keywordtype { - color: #604020 + color: var(--code-type-keyword-color); } span.keywordflow { - color: #e08000 + color: var(--code-flow-keyword-color); } span.comment { - color: #800000 + color: var(--code-comment-color); } span.preprocessor { - color: #806020 + color: var(--code-preprocessor-color); } span.stringliteral { - color: #002080 + color: var(--code-string-literal-color); } span.charliteral { - color: #008080 + color: var(--code-char-literal-color); +} + +span.xmlcdata { + color: var(--code-xml-cdata-color); } span.vhdldigit { - color: #ff00ff + color: var(--code-vhdl-digit-color); } span.vhdlchar { - color: #000000 + color: var(--code-vhdl-char-color); } span.vhdlkeyword { - color: #700070 + color: var(--code-vhdl-keyword-color); } span.vhdllogic { - color: #ff0000 + color: var(--code-vhdl-logic-color); } blockquote { - background-color: #F7F8FB; - border-left: 2px solid #9CAFD4; - margin: 0 24px 0 4px; - padding: 0 12px 0 16px; -} - -blockquote.DocNodeRTL { - border-left: 0; - border-right: 2px solid #9CAFD4; - margin: 0 4px 0 24px; - padding: 0 16px 0 12px; + background-color: var(--blockquote-background-color); + border-left: 2px solid var(--blockquote-border-color); + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; } /* @end */ -/* -.search { - color: #003399; - font-weight: bold; -} - -form.search { - margin-bottom: 0px; - margin-top: 0px; -} - -input.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -*/ - td.tiny { font-size: 75%; } @@ -527,18 +1055,24 @@ td.tiny { .dirtab { padding: 4px; border-collapse: collapse; - border: 1px solid #A3B4D7; + border: 1px solid var(--table-cell-border-color); } th.dirtab { - background: #EBEFF6; + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); font-weight: bold; } hr { - height: 0px; border: none; - border-top: 1px solid #4A6AAA; + margin-top: 16px; + margin-bottom: 16px; + height: 1px; + box-shadow: 13px 0 var(--page-background-color), + -13px 0 var(--page-background-color), + 13px 1px var(--group-header-separator-color), + -13px 1px var(--group-header-separator-color); } hr.footer { @@ -553,58 +1087,137 @@ table.memberdecls { } .memberdecls td, .fieldtable tr { - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; transition-property: background-color, box-shadow; transition-duration: 0.5s; } .memberdecls td.glow, .fieldtable tr.glow { - background-color: cyan; - box-shadow: 0 0 15px cyan; + background-color: var(--glow-color); + box-shadow: 0 0 15px var(--glow-color); +} + +.memberdecls tr[class^='memitem'] { + font-family: var(--font-family-monospace); } .mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #F9FAFC; - border: none; - margin: 4px; - padding: 1px 0 0 8px; +.memItemLeft, .memItemRight { + padding-top: 2px; + padding-bottom: 2px; +} + +.memTemplParams { + padding-left: 10px; + padding-top: 5px; +} + +.memItemLeft, .memItemRight, .memTemplParams { + background-color: var(--memdecl-background-color); } .mdescLeft, .mdescRight { padding: 0px 8px 4px 8px; - color: #555; + color: var(--memdecl-foreground-color); } -.memSeparator { - border-bottom: 1px solid #DEE4F0; - line-height: 1px; - margin: 0px; - padding: 0px; +tr[class^='memdesc'] { + box-shadow: inset 0px 1px 3px 0px rgba(0,0,0,.075); } -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; +.mdescLeft { + border-left: 1px solid var(--memdecl-border-color); + border-bottom: 1px solid var(--memdecl-border-color); } -.memItemRight, .memTemplItemRight { - width: 100%; +.mdescRight { + border-right: 1px solid var(--memdecl-border-color); + border-bottom: 1px solid var(--memdecl-border-color); } .memTemplParams { - color: #4665A2; - white-space: nowrap; + color: var(--memdecl-template-color); + white-space: nowrap; font-size: 80%; + border-left: 1px solid var(--memdecl-border-color); + border-right: 1px solid var(--memdecl-border-color); +} + +td.ititle { + border: 1px solid var(--memdecl-border-color); + border-top-left-radius: 4px; + border-top-right-radius: 4px; + padding-left: 10px; +} + +tr:not(:first-child) > td.ititle { + border-top: 0; + border-radius: 0; +} + +.memItemLeft { + white-space: nowrap; + border-left: 1px solid var(--memdecl-border-color); + border-bottom: 1px solid var(--memdecl-border-color); + padding-left: 10px; + transition: none; +} + +.memItemRight { + width: 100%; + border-right: 1px solid var(--memdecl-border-color); + border-bottom: 1px solid var(--memdecl-border-color); + padding-right: 10px; + transition: none; +} + +tr.heading + tr[class^='memitem'] td.memItemLeft, +tr.groupHeader + tr[class^='memitem'] td.memItemLeft, +tr.inherit_header + tr[class^='memitem'] td.memItemLeft { + border-top: 1px solid var(--memdecl-border-color); + border-top-left-radius: 4px; +} + +tr.heading + tr[class^='memitem'] td.memItemRight, +tr.groupHeader + tr[class^='memitem'] td.memItemRight, +tr.inherit_header + tr[class^='memitem'] td.memItemRight { + border-top: 1px solid var(--memdecl-border-color); + border-top-right-radius: 4px; +} + +tr.heading + tr[class^='memitem'] td.memTemplParams, +tr.heading + tr td.ititle, +tr.groupHeader + tr[class^='memitem'] td.memTemplParams, +tr.groupHeader + tr td.ititle, +tr.inherit_header + tr[class^='memitem'] td.memTemplParams { + border-top: 1px solid var(--memdecl-border-color); + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} + +table.memberdecls tr:last-child td.memItemLeft, +table.memberdecls tr:last-child td.mdescLeft, +table.memberdecls tr[class^='memitem']:has(+ tr.groupHeader) td.memItemLeft, +table.memberdecls tr[class^='memitem']:has(+ tr.inherit_header) td.memItemLeft, +table.memberdecls tr[class^='memdesc']:has(+ tr.groupHeader) td.mdescLeft, +table.memberdecls tr[class^='memdesc']:has(+ tr.inherit_header) td.mdescLeft { + border-bottom-left-radius: 4px; } +table.memberdecls tr:last-child td.memItemRight, +table.memberdecls tr:last-child td.mdescRight, +table.memberdecls tr[class^='memitem']:has(+ tr.groupHeader) td.memItemRight, +table.memberdecls tr[class^='memitem']:has(+ tr.inherit_header) td.memItemRight, +table.memberdecls tr[class^='memdesc']:has(+ tr.groupHeader) td.mdescRight, +table.memberdecls tr[class^='memdesc']:has(+ tr.inherit_header) td.mdescRight { + border-bottom-right-radius: 4px; +} + +tr.template .memItemLeft, tr.template .memItemRight { + border-top: none; + padding-top: 0; +} + + /* @end */ /* @group Member Details */ @@ -613,43 +1226,53 @@ table.memberdecls { .memtitle { padding: 8px; - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); border-top-right-radius: 4px; border-top-left-radius: 4px; margin-bottom: -1px; - background-image: url('nav_f.png'); - background-repeat: repeat-x; - background-color: #E2E8F2; + background-color: var(--memdef-proto-background-color); line-height: 1.25; - font-weight: 300; + font-family: var(--font-family-monospace); + font-weight: 500; + font-size: 16px; float:left; + box-shadow: 0 10px 0 -1px var(--memdef-proto-background-color), + 0 2px 8px 0 rgba(0,0,0,.075); + position: relative; +} + +.memtitle:after { + content: ''; + display: block; + background: var(--memdef-proto-background-color); + height: 10px; + bottom: -10px; + left: 0px; + right: -14px; + position: absolute; + border-top-right-radius: 6px; } .permalink { - font-size: 65%; - display: inline-block; - vertical-align: middle; + font-family: var(--font-family-monospace); + font-weight: 500; + line-height: 1.25; + font-size: 16px; + display: inline-block; + vertical-align: middle; } .memtemplate { font-size: 80%; - color: #4665A2; + color: var(--memdef-template-color); + font-family: var(--font-family-monospace); font-weight: normal; margin-left: 9px; } -.memnav { - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} - .mempage { width: 100%; } @@ -658,22 +1281,21 @@ table.memberdecls { padding: 0; margin-bottom: 10px; margin-right: 5px; - -webkit-transition: box-shadow 0.5s linear; - -moz-transition: box-shadow 0.5s linear; - -ms-transition: box-shadow 0.5s linear; - -o-transition: box-shadow 0.5s linear; - transition: box-shadow 0.5s linear; - display: table !important; - width: 100%; + display: table !important; + width: 100%; + box-shadow: 0 2px 8px 0 rgba(0,0,0,.075); + border-radius: 4px; } .memitem.glow { - box-shadow: 0 0 15px cyan; + box-shadow: 0 0 15px var(--glow-color); } .memname { - font-weight: 400; - margin-left: 6px; + font-family: var(--font-family-monospace); + font-size: 13px; + font-weight: 400; + margin-left: 6px; } .memname td { @@ -681,62 +1303,39 @@ table.memberdecls { } .memproto, dl.reflist dt { - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 0px 6px 0px; - color: #253555; - font-weight: bold; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - background-color: #DFE5F1; - /* opera specific markup */ - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 4px; - /* firefox specific markup */ - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -moz-border-radius-topright: 4px; - /* webkit specific markup */ - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -webkit-border-top-right-radius: 4px; - + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 0px 6px 0px; + color: var(--memdef-proto-text-color); + font-weight: bold; + background-color: var(--memdef-proto-background-color); + border-top-right-radius: 4px; + border-bottom: 1px solid var(--memdef-border-color); } .overload { - font-family: "courier new",courier,monospace; + font-family: var(--font-family-monospace); font-size: 65%; } .memdoc, dl.reflist dd { - border-bottom: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 10px 2px 10px; - background-color: #FBFCFD; - border-top-width: 0; - background-image:url('nav_g.png'); - background-repeat:repeat-x; - background-color: #FFFFFF; - /* opera specific markup */ - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 4px; - -moz-border-radius-bottomright: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-bottom: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 10px 2px 10px; + border-top-width: 0; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; } dl.reflist dt { - padding: 5px; + padding: 5px; } dl.reflist dd { - margin: 0px 0px 10px 0px; - padding: 5px; + margin: 0px 0px 10px 0px; + padding: 5px; } .paramkey { @@ -745,37 +1344,45 @@ dl.reflist dd { .paramtype { white-space: nowrap; + padding: 0px; + padding-bottom: 1px; } .paramname { - color: #602020; white-space: nowrap; + padding: 0px; + padding-bottom: 1px; + margin-left: 2px; } + .paramname em { + color: var(--memdef-param-name-color); font-style: normal; + margin-right: 1px; } -.paramname code { - line-height: 14px; + +.paramname .paramdefval { + font-family: var(--font-family-monospace); } .params, .retval, .exception, .tparams { - margin-left: 0px; - padding-left: 0px; -} + margin-left: 0px; + padding-left: 0px; +} .params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { - font-weight: bold; - vertical-align: top; + font-weight: bold; + vertical-align: top; } - + .params .paramtype, .tparams .paramtype { - font-style: italic; - vertical-align: top; -} - + font-style: italic; + vertical-align: top; +} + .params .paramdir, .tparams .paramdir { - font-family: "courier new",courier,monospace; - vertical-align: top; + font-family: var(--font-family-monospace); + vertical-align: top; } table.mlabels { @@ -794,17 +1401,17 @@ td.mlabels-right { } span.mlabels { - margin-left: 8px; + margin-left: 8px; } span.mlabel { - background-color: #728DC1; - border-top:1px solid #5373B4; - border-left:1px solid #5373B4; - border-right:1px solid #C4CFE5; - border-bottom:1px solid #C4CFE5; + background-color: var(--label-background-color); + border-top:1px solid var(--label-left-top-border-color); + border-left:1px solid var(--label-left-top-border-color); + border-right:1px solid var(--label-right-bottom-border-color); + border-bottom:1px solid var(--label-right-bottom-border-color); text-shadow: none; - color: white; + color: var(--label-foreground-color); margin-right: 4px; padding: 2px 3px; border-radius: 3px; @@ -820,47 +1427,50 @@ span.mlabel { /* these are for tree view inside a (index) page */ div.directory { - margin: 10px 0px; - border-top: 1px solid #9CAFD4; - border-bottom: 1px solid #9CAFD4; - width: 100%; + margin: 10px 0px; + width: 100%; } .directory table { - border-collapse:collapse; + border-collapse:collapse; } .directory td { - margin: 0px; - padding: 0px; + margin: 0px; + padding: 0px; vertical-align: top; } .directory td.entry { - white-space: nowrap; - padding-right: 6px; + white-space: nowrap; + padding-right: 6px; padding-top: 3px; } .directory td.entry a { - outline:none; + outline:none; } .directory td.entry a img { - border: none; + border: none; } .directory td.desc { - width: 100%; - padding-left: 6px; + width: 100%; + padding-left: 6px; padding-right: 6px; padding-top: 3px; border-left: 1px solid rgba(0,0,0,0.05); } +.directory tr.odd { + padding-left: 6px; + background-color: var(--index-odd-item-bg-color); +} + .directory tr.even { padding-left: 6px; - background-color: #F7F8FB; + background-color: var(--index-even-item-bg-color); } .directory img { @@ -868,95 +1478,178 @@ div.directory { } .directory .levels { - white-space: nowrap; - width: 100%; - text-align: right; - font-size: 9pt; + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; } .directory .levels span { - cursor: pointer; - padding-left: 2px; - padding-right: 2px; - color: #3D578C; + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: var(--page-link-color); } .arrow { - color: #9CAFD4; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - cursor: pointer; - font-size: 80%; - display: inline-block; - width: 16px; - height: 22px; + color: var(--nav-background-color); + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 14px; + transition: opacity 0.3s ease; +} + +span.arrowhead { + position: relative; + padding: 0; + margin: 0 0 0 2px; + display: inline-block; + width: 5px; + height: 5px; + border-right: 2px solid var(--nav-arrow-color); + border-bottom: 2px solid var(--nav-arrow-color); + transform: rotate(-45deg); + transition: transform 0.3s ease; +} + +span.arrowhead.opened { + transform: rotate(45deg); +} + +.selected span.arrowhead { + border-right: 2px solid var(--nav-arrow-selected-color); + border-bottom: 2px solid var(--nav-arrow-selected-color); } .icon { - font-family: Arial, Helvetica; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: #728DC1; - color: white; - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; + font-family: var(--font-family-icon); + line-height: normal; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: var(--icon-background-color); + color: var(--icon-foreground-color); + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; } .icona { - width: 24px; - height: 22px; - display: inline-block; + width: 24px; + height: 22px; + display: inline-block; } -.iconfopen { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('folderopen.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; +.iconfolder { + width: 24px; + height: 18px; + margin-top: 6px; + vertical-align:top; + display: inline-block; + position: relative; } -.iconfclosed { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('folderclosed.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; +.icondoc { + width: 24px; + height: 18px; + margin-top: 3px; + vertical-align:top; + display: inline-block; + position: relative; } -.icondoc { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('doc.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; +.folder-icon { + width: 16px; + height: 11px; + background-color: var(--icon-folder-fill-color); + border: 1px solid var(--icon-folder-border-color); + border-radius: 0 2px 2px 2px; + position: relative; + box-sizing: content-box; } -table.directory { - font: 400 14px Roboto,sans-serif; +.folder-icon::after { + content: ''; + position: absolute; + top: 2px; + left: -1px; + width: 16px; + height: 7px; + background-color: var(--icon-folder-open-fill-color); + border: 1px solid var(--icon-folder-border-color); + border-radius: 7px 7px 2px 2px; + transform-origin: top left; + opacity: 0; + transition: all 0.3s linear; +} + +.folder-icon::before { + content: ''; + position: absolute; + top: -3px; + left: -1px; + width: 6px; + height: 2px; + background-color: var(--icon-folder-fill-color); + border-top: 1px solid var(--icon-folder-border-color); + border-left: 1px solid var(--icon-folder-border-color); + border-right: 1px solid var(--icon-folder-border-color); + border-radius: 2px 2px 0 0; +} + +.folder-icon.open::after { + top: 3px; + opacity: 1; +} + +.doc-icon { + left: 6px; + width: 12px; + height: 16px; + background-color: var(--icon-doc-border-color); + clip-path: polygon(0 0, 66% 0, 100% 25%, 100% 100%, 0 100%); + position: relative; + display: inline-block; +} +.doc-icon::before { + content: ""; + left: 1px; + top: 1px; + width: 10px; + height: 14px; + background-color: var(--icon-doc-fill-color); + clip-path: polygon(0 0, 66% 0, 100% 25%, 100% 100%, 0 100%); + position: absolute; + box-sizing: border-box; +} +.doc-icon::after { + content: ""; + left: 7px; + top: 0px; + width: 3px; + height: 3px; + background-color: transparent; + position: absolute; + border: 1px solid var(--icon-doc-border-color); } + + + /* @end */ div.dynheader { - margin-top: 8px; + margin-top: 8px; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; @@ -965,9 +1658,16 @@ div.dynheader { user-select: none; } +span.dynarrow { + position: relative; + display: inline-block; + width: 12px; + bottom: 1px; +} + address { font-style: normal; - color: #2A3D61; + color: var(--footer-foreground-color); } table.doxtable caption { @@ -976,155 +1676,163 @@ table.doxtable caption { table.doxtable { border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; + margin-top: 4px; + margin-bottom: 4px; } table.doxtable td, table.doxtable th { - border: 1px solid #2D4068; + border: 1px solid var(--table-cell-border-color); padding: 3px 7px 2px; } table.doxtable th { - background-color: #374F7F; - color: #FFFFFF; + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); font-size: 110%; padding-bottom: 4px; padding-top: 5px; } table.fieldtable { - /*width: 100%;*/ - margin-bottom: 10px; - border: 1px solid #A8B8D9; - border-spacing: 0px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + margin-bottom: 10px; + border: 1px solid var(--memdef-border-color); + border-spacing: 0px; + border-radius: 4px; + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); } .fieldtable td, .fieldtable th { - padding: 3px 7px 2px; + padding: 3px 7px 2px; } -.fieldtable td.fieldtype, .fieldtable td.fieldname { - white-space: nowrap; - border-right: 1px solid #A8B8D9; - border-bottom: 1px solid #A8B8D9; - vertical-align: top; +.fieldtable td.fieldtype, .fieldtable td.fieldname, .fieldtable td.fieldinit { + white-space: nowrap; + border-right: 1px solid var(--memdef-border-color); + border-bottom: 1px solid var(--memdef-border-color); + vertical-align: top; } .fieldtable td.fieldname { - padding-top: 3px; + padding-top: 3px; } +.fieldtable td.fieldinit { + padding-top: 3px; + text-align: right; +} + + .fieldtable td.fielddoc { - border-bottom: 1px solid #A8B8D9; - /*width: 100%;*/ + border-bottom: 1px solid var(--memdef-border-color); } .fieldtable td.fielddoc p:first-child { - margin-top: 0px; -} - + margin-top: 0px; +} + .fieldtable td.fielddoc p:last-child { - margin-bottom: 2px; + margin-bottom: 2px; } .fieldtable tr:last-child td { - border-bottom: none; + border-bottom: none; } .fieldtable th { - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - font-size: 90%; - color: #253555; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; - font-weight: 400; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid #A8B8D9; -} - - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: url('tab_b.png'); - z-index: 101; + background-color: var(--memdef-title-background-color); + font-size: 90%; + color: var(--memdef-proto-text-color); + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid var(--memdef-border-color); +} + +/* ----------- navigation breadcrumb styling ----------- */ + +#nav-path ul { + height: 30px; + line-height: 30px; + color: var(--nav-text-normal-color); overflow: hidden; - font-size: 13px; + margin: 0px; + padding-left: 4px; + background-image: none; + background: var(--page-background-color); + border-bottom: 1px solid var(--nav-breadcrumb-separator-color); + font-size: var(--nav-font-size-level1); + font-family: var(--font-family-nav); + position: relative; + z-index: 100; } -.navpath ul -{ - font-size: 11px; - background-image:url('tab_b.png'); - background-repeat:repeat-x; - background-position: 0 -5px; - height:30px; - line-height:30px; - color:#8AA0CC; - border:solid 1px #C2CDE4; - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ +#main-nav { + border-bottom: 1px solid var(--nav-border-color); +} + +.navpath li { list-style-type:none; float:left; + color: var(--nav-foreground-color); +} + +.navpath li.footer { + list-style-type:none; + float:right; padding-left:10px; padding-right:15px; - background-image:url('bc_s.png'); + background-image:none; background-repeat:no-repeat; background-position:right; - color:#364D7C; + font-size: 8pt; + color: var(--footer-foreground-color); } -.navpath li.navelem a -{ - height:32px; - display:block; - text-decoration: none; - outline: none; - color: #283A5D; - font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; +#nav-path li.navelem { + background-image: none; + display: flex; + align-items: center; + padding-left: 15px; } -.navpath li.navelem a:hover -{ - color:#6884BD; +.navpath li.navelem a { + text-shadow: none; + display: inline-block; + color: var(--nav-breadcrumb-color); + position: relative; + top: 0px; + height: 30px; + margin-right: -20px; } -.navpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color:#364D7C; - font-size: 8pt; +#nav-path li.navelem:after { + content: ''; + display: inline-block; + position: relative; + top: 0; + right: -15px; + width: 30px; + height: 30px; + transform: scaleX(0.5) scale(0.707) rotate(45deg); + z-index: 10; + background: var(--page-background-color); + box-shadow: 2px -2px 0 2px var(--nav-breadcrumb-separator-color); + border-radius: 0 5px 0 50px; +} + +#nav-path li.navelem:first-child { + margin-left: -6px; } +#nav-path li.navelem:hover, +#nav-path li.navelem:hover:after { + background-color: var(--nav-breadcrumb-active-bg); +} + +/* ---------------------- */ div.summary { @@ -1133,7 +1841,7 @@ div.summary padding-right: 5px; width: 50%; text-align: right; -} +} div.summary a { @@ -1142,14 +1850,14 @@ div.summary a table.classindex { - margin: 10px; - white-space: nowrap; - margin-left: 3%; - margin-right: 3%; - width: 94%; - border: 0; - border-spacing: 0; - padding: 0; + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; } div.ingroups @@ -1166,11 +1874,9 @@ div.ingroups a div.header { - background-image:url('nav_h.png'); - background-repeat:repeat-x; - background-color: #F9FAFC; margin: 0px; - border-bottom: 1px solid #C4CFE5; + background-color: var(--header-background-color); + border-bottom: 1px solid var(--header-separator-color); } div.headertitle @@ -1178,149 +1884,141 @@ div.headertitle padding: 5px 5px 5px 10px; } -.PageDocRTL-title div.headertitle { - text-align: right; - direction: rtl; -} - dl { - padding: 0 0 0 0; + padding: 0 0 0 0; } -/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ -dl.section { - margin-left: 0px; - padding-left: 0px; +dl.bug dt a, dl.deprecated dt a, dl.todo dt a, dl.test a { + font-weight: bold !important; } -dl.section.DocNodeRTL { - margin-right: 0px; - padding-right: 0px; +dl.warning, dl.attention, dl.important, dl.note, dl.deprecated, dl.bug, +dl.invariant, dl.pre, dl.post, dl.todo, dl.test, dl.remark { + padding: 10px; + margin: 10px 0px; + overflow: hidden; + margin-left: 0; + border-radius: 4px; } -dl.note { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #D0C000; +dl.section dd { + margin-bottom: 2px; } -dl.note.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #D0C000; +dl.warning, dl.attention, dl.important { + background: var(--warning-color-bg); + border-left: 8px solid var(--warning-color-hl); + color: var(--warning-color-text); } -dl.warning, dl.attention { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #FF0000; +dl.warning dt, dl.attention dt, dl.important dt { + color: var(--warning-color-hl); } -dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #FF0000; +dl.warning .tt, dl.attention .tt, dl.important .tt { + background-color: hsl(from var(--warning-color-bg) h s calc(l + var(--fragment-highlight-filter))); } -dl.pre, dl.post, dl.invariant { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #00D000; +dl.note, dl.remark { + background: var(--note-color-bg); + border-left: 8px solid var(--note-color-hl); + color: var(--note-color-text); } -dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #00D000; +dl.note dt, dl.remark dt { + color: var(--note-color-hl); } -dl.deprecated { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #505050; +dl.note .tt, dl.remark .tt { + background-color: hsl(from var(--note-color-bg) h s calc(l + var(--fragment-highlight-filter))); } -dl.deprecated.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #505050; +dl.todo { + background: var(--todo-color-bg); + border-left: 8px solid var(--todo-color-hl); + color: var(--todo-color-text); } -dl.todo { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #00C0E0; +dl.todo dt { + color: var(--todo-color-hl); } -dl.todo.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #00C0E0; +dl.todo .tt { + background-color: hsl(from var(--todo-color-bg) h s calc(l + var(--fragment-highlight-filter))); } dl.test { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #3030E0; + background: var(--test-color-bg); + border-left: 8px solid var(--test-color-hl); + color: var(--test-color-text); +} + +dl.test dt { + color: var(--test-color-hl); +} + +dl.test .tt { + background-color: hsl(from var(--test-color-bg) h s calc(l + var(--fragment-highlight-filter))); } -dl.test.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #3030E0; +dl.bug dt a { + color: var(--bug-color-hl) !important; } dl.bug { - margin-left: -7px; - padding-left: 3px; - border-left: 4px solid; - border-color: #C08050; + background: var(--bug-color-bg); + border-left: 8px solid var(--bug-color-hl); + color: var(--bug-color-text); } -dl.bug.DocNodeRTL { - margin-left: 0; - padding-left: 0; - border-left: 0; - margin-right: -7px; - padding-right: 3px; - border-right: 4px solid; - border-color: #C08050; +dl.bug dt a { + color: var(--bug-color-hl) !important; } -dl.section dd { - margin-bottom: 6px; +dl.bug .tt { + background-color: hsl(from var(--bug-color-bg) h s calc(l + var(--fragment-highlight-filter))); } +dl.deprecated { + background: var(--deprecated-color-bg); + border-left: 8px solid var(--deprecated-color-hl); + color: var(--deprecated-color-text); +} + +dl.deprecated dt a { + color: var(--deprecated-color-hl) !important; +} + +dl.deprecated .tt { + background-color: hsl(from var(--deprecated-color-bg) h s calc(l + var(--fragment-highlight-filter))); +} + + +dl.invariant, dl.pre, dl.post { + background: var(--invariant-color-bg); + border-left: 8px solid var(--invariant-color-hl); + color: var(--invariant-color-text); +} + +dl.invariant dt, dl.pre dt, dl.post dt { + color: var(--invariant-color-hl); +} + +dl.invariant .tt, dl.pre .tt, dl.post .tt { + background-color: hsl(from var(--invariant-color-bg) h s calc(l + var(--fragment-highlight-filter))); +} + +dl.note dd, dl.warning dd, dl.pre dd, dl.post dd, +dl.remark dd, dl.attention dd, dl.important dd, dl.invariant dd, +dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd { + margin-inline-start: 0px; +} + + +#projectrow +{ + height: 56px; +} #projectlogo { @@ -1328,69 +2026,78 @@ dl.section dd { vertical-align: bottom; border-collapse: separate; } - + #projectlogo img -{ +{ border: 0px none; } - + #projectalign { - vertical-align: middle; + vertical-align: middle; + padding-left: 0.5em; } #projectname { - font: 300% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 2px 0px; + font-size: 200%; + font-family: var(--font-family-title); + margin: 0; + padding: 0; +} + +#side-nav #projectname +{ + font-size: 130%; } - + #projectbrief { - font: 120% Tahoma, Arial,sans-serif; + font-size: 90%; + font-family: var(--font-family-title); margin: 0px; padding: 0px; } #projectnumber { - font: 50% Tahoma, Arial,sans-serif; + font-size: 50%; + font-family: var(--font-family-title); margin: 0px; padding: 0px; } #titlearea { - padding: 0px; + padding: 0 0 0 5px; margin: 0px; - width: 100%; - border-bottom: 1px solid #5373B4; + border-bottom: 1px solid var(--title-separator-color); + background-color: var(--title-background-color); } .image { - text-align: center; + text-align: center; } .dotgraph { - text-align: center; + text-align: center; } .mscgraph { - text-align: center; + text-align: center; } .plantumlgraph { - text-align: center; + text-align: center; } .diagraph { - text-align: center; + text-align: center; } .caption @@ -1398,87 +2105,68 @@ dl.section dd { font-weight: bold; } -div.zoom -{ - border: 1px solid #90A5CE; -} - dl.citelist { - margin-bottom:50px; + margin-bottom:50px; } dl.citelist dt { - color:#334975; - float:left; - font-weight:bold; - margin-right:10px; - padding:5px; - text-align:right; - width:52px; + color:var(--citation-label-color); + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; } dl.citelist dd { - margin:2px 0 2px 72px; - padding:5px 0; + margin:2px 0 2px 72px; + padding:5px 0; } div.toc { - padding: 14px 25px; - background-color: #F4F6FA; - border: 1px solid #D8DFEE; - border-radius: 7px 7px 7px 7px; - float: right; - height: auto; - margin: 0 8px 10px 10px; - width: 200px; -} - -.PageDocRTL-title div.toc { - float: left !important; - text-align: right; + padding: 14px 25px; + background-color: var(--toc-background-color); + border: 1px solid var(--toc-border-color); + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; } div.toc li { - background: url("bdwn.png") no-repeat scroll 0 5px transparent; - font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; - margin-top: 5px; - padding-left: 10px; - padding-top: 2px; -} - -.PageDocRTL-title div.toc li { - background-position-x: right !important; - padding-left: 0 !important; - padding-right: 10px; + background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; + font: 10px/1.2 var(--font-family-toc); + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; } div.toc h3 { - font: bold 12px/1.2 Arial,FreeSans,sans-serif; - color: #4665A2; - border-bottom: 0 none; - margin: 0; + font: bold 12px/1.2 var(--font-family-toc); + color: var(--toc-header-color); + border-bottom: 0 none; + margin: 0; } div.toc ul { - list-style: none outside none; - border: medium none; - padding: 0px; -} - -div.toc li.level1 { - margin-left: 0px; + list-style: none outside none; + border: medium none; + padding: 0px; } -div.toc li.level2 { - margin-left: 15px; +div.toc li[class^='level'] { + margin-left: 15px; } -div.toc li.level3 { - margin-left: 30px; +div.toc li.level1 { + margin-left: 0px; } -div.toc li.level4 { - margin-left: 45px; +div.toc li.empty { + background-image: none; + margin-top: 0px; } span.emoji { @@ -1487,30 +2175,13 @@ span.emoji { */ } -.PageDocRTL-title div.toc li.level1 { - margin-left: 0 !important; - margin-right: 0; -} - -.PageDocRTL-title div.toc li.level2 { - margin-left: 0 !important; - margin-right: 15px; -} - -.PageDocRTL-title div.toc li.level3 { - margin-left: 0 !important; - margin-right: 30px; -} - -.PageDocRTL-title div.toc li.level4 { - margin-left: 0 !important; - margin-right: 45px; +span.obfuscator { + display: none; } .inherit_header { - font-weight: bold; - color: gray; - cursor: pointer; + font-weight: 400; + cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; @@ -1520,62 +2191,69 @@ span.emoji { } .inherit_header td { - padding: 6px 0px 2px 5px; + padding: 6px 0 2px 0; } .inherit { - display: none; + display: none; } tr.heading h2 { - margin-top: 12px; - margin-bottom: 4px; + margin-top: 12px; + margin-bottom: 12px; } /* tooltip related style info */ .ttc { - position: absolute; - display: none; + position: absolute; + display: none; } #powerTip { cursor: default; - white-space: nowrap; - background-color: white; - border: 1px solid gray; - border-radius: 4px 4px 4px 4px; - box-shadow: 1px 1px 7px gray; + color: var(--tooltip-foreground-color); + background-color: var(--tooltip-background-color); + backdrop-filter: var(--tooltip-backdrop-filter); + -webkit-backdrop-filter: var(--tooltip-backdrop-filter); + border: 1px solid var(--tooltip-border-color); + border-radius: 4px; + box-shadow: var(--tooltip-shadow); display: none; font-size: smaller; max-width: 80%; - opacity: 0.9; padding: 1ex 1em 1em; position: absolute; z-index: 2147483647; } #powerTip div.ttdoc { - color: grey; + color: var(--tooltip-doc-color); font-style: italic; } #powerTip div.ttname a { - font-weight: bold; + font-weight: bold; +} + +#powerTip a { + color: var(--tooltip-link-color); } #powerTip div.ttname { - font-weight: bold; + font-weight: bold; } #powerTip div.ttdeci { - color: #006318; + color: var(--tooltip-declaration-color); } #powerTip div { - margin: 0px; - padding: 0px; - font: 12px/16px Roboto,sans-serif; + margin: 0px; + padding: 0px; + font-size: 12px; + font-family: var(--font-family-tooltip); + line-height: 16px; } #powerTip:before, #powerTip:after { @@ -1620,12 +2298,12 @@ tr.heading h2 { } #powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { - border-top-color: #FFFFFF; + border-top-color: var(--tooltip-arrow-background-color); border-width: 10px; margin: 0px -10px; } -#powerTip.n:before { - border-top-color: #808080; +#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { + border-top-color: var(--tooltip-border-color); border-width: 11px; margin: 0px -11px; } @@ -1648,13 +2326,13 @@ tr.heading h2 { } #powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { - border-bottom-color: #FFFFFF; + border-bottom-color: var(--tooltip-arrow-background-color); border-width: 10px; margin: 0px -10px; } #powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { - border-bottom-color: #808080; + border-bottom-color: var(--tooltip-border-color); border-width: 11px; margin: 0px -11px; } @@ -1675,13 +2353,13 @@ tr.heading h2 { left: 100%; } #powerTip.e:after { - border-left-color: #FFFFFF; + border-left-color: var(--tooltip-border-color); border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.e:before { - border-left-color: #808080; + border-left-color: var(--tooltip-border-color); border-width: 11px; top: 50%; margin-top: -11px; @@ -1691,13 +2369,13 @@ tr.heading h2 { right: 100%; } #powerTip.w:after { - border-right-color: #FFFFFF; + border-right-color: var(--tooltip-border-color); border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.w:before { - border-right-color: #808080; + border-right-color: var(--tooltip-border-color); border-width: 11px; top: 50%; margin-top: -11px; @@ -1705,33 +2383,33 @@ tr.heading h2 { @media print { - #top { display: none; } - #side-nav { display: none; } - #nav-path { display: none; } - body { overflow:visible; } - h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } - .summary { display: none; } - .memitem { page-break-inside: avoid; } - #doc-content - { - margin-left:0 !important; - height:auto !important; - width:auto !important; - overflow:inherit; - display:inline; - } + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } } /* @group Markdown */ table.markdownTable { border-collapse:collapse; - margin-top: 4px; - margin-bottom: 4px; + margin-top: 4px; + margin-bottom: 4px; } table.markdownTable td, table.markdownTable th { - border: 1px solid #2D4068; + border: 1px solid var(--table-cell-border-color); padding: 3px 7px 2px; } @@ -1739,8 +2417,8 @@ table.markdownTable tr { } th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { - background-color: #374F7F; - color: #FFFFFF; + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); font-size: 110%; padding-bottom: 4px; padding-top: 5px; @@ -1758,36 +2436,56 @@ th.markdownTableHeadCenter, td.markdownTableBodyCenter { text-align: center } -.DocNodeRTL { - text-align: right; - direction: rtl; +tt, code, kbd +{ + display: inline-block; +} +tt, code, kbd +{ + vertical-align: top; +} +/* @end */ + +u { + text-decoration: underline; +} + +details>summary { + list-style-type: none; } -.DocNodeLTR { - text-align: left; - direction: ltr; +details > summary::-webkit-details-marker { + display: none; } -table.DocNodeRTL { - width: auto; - margin-right: 0; - margin-left: auto; +details>summary::before { + content: "\25ba"; + padding-right:4px; + font-size: 80%; } -table.DocNodeLTR { - width: auto; - margin-right: auto; - margin-left: 0; +details[open]>summary::before { + content: "\25bc"; + padding-right:4px; + font-size: 80%; } -tt, code, kbd, samp -{ - display: inline-block; - direction:ltr; +:root { + scrollbar-width: thin; + scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color); } -/* @end */ -u { - text-decoration: underline; +::-webkit-scrollbar { + background-color: var(--scrollbar-background-color); + height: 12px; + width: 12px; +} +::-webkit-scrollbar-thumb { + border-radius: 6px; + box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color); + border: solid 2px transparent; +} +::-webkit-scrollbar-corner { + background-color: var(--scrollbar-background-color); } diff --git a/doc/html/doxygen.svg b/doc/html/doxygen.svg index d42dad5..79a7635 100644 --- a/doc/html/doxygen.svg +++ b/doc/html/doxygen.svg @@ -1,4 +1,6 @@ + @@ -17,7 +19,7 @@ - + diff --git a/doc/html/doxygen_crawl.html b/doc/html/doxygen_crawl.html new file mode 100644 index 0000000..bf59d7f --- /dev/null +++ b/doc/html/doxygen_crawl.html @@ -0,0 +1,271 @@ + + + +Validator / crawler helper + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/html/driver__ds3231_8c.html b/doc/html/driver__ds3231_8c.html index c48d998..dd62944 100644 --- a/doc/html/driver__ds3231_8c.html +++ b/doc/html/driver__ds3231_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: src/driver_ds3231.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231.c File Reference
+
driver_ds3231.c File Reference

driver ds3231 source file More...

#include "driver_ds3231.h"
+
+Include dependency graph for driver_ds3231.c:
+
+
+

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+

Macros

#define CHIP_NAME   "Maxim Integrated DS3231"
 chip information definition More...
 
#define MANUFACTURER_NAME   "Maxim Integrated"
 
#define SUPPLY_VOLTAGE_MIN   2.3f
 
#define SUPPLY_VOLTAGE_MAX   5.5f
 
#define MAX_CURRENT   0.65f
 
#define TEMPERATURE_MIN   -40.0f
 
#define TEMPERATURE_MAX   85.0f
 
#define DRIVER_VERSION   2000
 
#define DS3231_REG_SECOND   0x00
 chip register definition More...
 
#define DS3231_REG_MINUTE   0x01
 
#define DS3231_REG_HOUR   0x02
 
#define DS3231_REG_WEEK   0x03
 
#define DS3231_REG_DATE   0x04
 
#define DS3231_REG_MONTH   0x05
 
#define DS3231_REG_YEAR   0x06
 
#define DS3231_REG_ALARM1_SECOND   0x07
 
#define DS3231_REG_ALARM1_MINUTE   0x08
 
#define DS3231_REG_ALARM1_HOUR   0x09
 
#define DS3231_REG_ALARM1_WEEK   0x0A
 
#define DS3231_REG_ALARM2_MINUTE   0x0B
 
#define DS3231_REG_ALARM2_HOUR   0x0C
 
#define DS3231_REG_ALARM2_WEEK   0x0D
 
#define DS3231_REG_CONTROL   0x0E
 
#define DS3231_REG_STATUS   0x0F
 
#define DS3231_REG_XTAL   0x10
 
#define DS3231_REG_TEMPERATUREH   0x11
 
#define DS3231_REG_TEMPERATUREL   0x12
 
#define DS3231_ADDRESS   0xD0
 chip address definition More...
 
#define CHIP_NAME   "Maxim Integrated DS3231"
 chip information definition
#define MANUFACTURER_NAME   "Maxim Integrated"
#define SUPPLY_VOLTAGE_MIN   2.3f
#define SUPPLY_VOLTAGE_MAX   5.5f
#define MAX_CURRENT   0.65f
#define TEMPERATURE_MIN   -40.0f
#define TEMPERATURE_MAX   85.0f
#define DRIVER_VERSION   2000
#define DS3231_REG_SECOND   0x00
 chip register definition
#define DS3231_REG_MINUTE   0x01
#define DS3231_REG_HOUR   0x02
#define DS3231_REG_WEEK   0x03
#define DS3231_REG_DATE   0x04
#define DS3231_REG_MONTH   0x05
#define DS3231_REG_YEAR   0x06
#define DS3231_REG_ALARM1_SECOND   0x07
#define DS3231_REG_ALARM1_MINUTE   0x08
#define DS3231_REG_ALARM1_HOUR   0x09
#define DS3231_REG_ALARM1_WEEK   0x0A
#define DS3231_REG_ALARM2_MINUTE   0x0B
#define DS3231_REG_ALARM2_HOUR   0x0C
#define DS3231_REG_ALARM2_WEEK   0x0D
#define DS3231_REG_CONTROL   0x0E
#define DS3231_REG_STATUS   0x0F
#define DS3231_REG_XTAL   0x10
#define DS3231_REG_TEMPERATUREH   0x11
#define DS3231_REG_TEMPERATUREL   0x12
#define DS3231_ADDRESS   0xD0
 chip address definition
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_set_time (ds3231_handle_t *handle, ds3231_time_t *t)
 set the current time More...
 
uint8_t ds3231_get_time (ds3231_handle_t *handle, ds3231_time_t *t)
 get the current time More...
 
uint8_t ds3231_set_alarm1 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
 set the alarm1 time More...
 
uint8_t ds3231_get_alarm1 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
 get the alarm1 time More...
 
uint8_t ds3231_set_alarm2 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
 set the alarm2 time More...
 
uint8_t ds3231_get_alarm2 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
 get the alarm2 time More...
 
uint8_t ds3231_set_oscillator (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the oscillator More...
 
uint8_t ds3231_get_oscillator (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the chip oscillator status More...
 
uint8_t ds3231_set_alarm_interrupt (ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
 enable or disable the alarm interrupt More...
 
uint8_t ds3231_get_alarm_interrupt (ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t *enable)
 get the alarm interrupt status More...
 
uint8_t ds3231_set_pin (ds3231_handle_t *handle, ds3231_pin_t pin)
 set the chip pin function More...
 
uint8_t ds3231_get_pin (ds3231_handle_t *handle, ds3231_pin_t *pin)
 get the chip pin function More...
 
uint8_t ds3231_set_square_wave (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the square wave output More...
 
uint8_t ds3231_get_square_wave (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the square wave output status More...
 
uint8_t ds3231_get_temperature (ds3231_handle_t *handle, int16_t *raw, float *s)
 get the chip temperature More...
 
uint8_t ds3231_get_status (ds3231_handle_t *handle, uint8_t *status)
 get the chip status More...
 
uint8_t ds3231_set_aging_offset (ds3231_handle_t *handle, int8_t offset)
 set the chip aging offset More...
 
uint8_t ds3231_get_aging_offset (ds3231_handle_t *handle, int8_t *offset)
 get the chip aging offset More...
 
uint8_t ds3231_aging_offset_convert_to_register (ds3231_handle_t *handle, float offset, int8_t *reg)
 convert a aging offset value to a register raw data More...
 
uint8_t ds3231_aging_offset_convert_to_data (ds3231_handle_t *handle, int8_t reg, float *offset)
 convert a register raw data to a converted aging offset data More...
 
uint8_t ds3231_irq_handler (ds3231_handle_t *handle)
 irq handler More...
 
uint8_t ds3231_init (ds3231_handle_t *handle)
 initialize the chip More...
 
uint8_t ds3231_deinit (ds3231_handle_t *handle)
 close the chip More...
 
uint8_t ds3231_alarm_clear (ds3231_handle_t *handle, ds3231_alarm_t alarm)
 clear the alarm flag More...
 
uint8_t ds3231_set_32khz_output (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the 32KHz output More...
 
uint8_t ds3231_get_32khz_output (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the 32KHz output status More...
 
uint8_t ds3231_set_reg (ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 set the chip register More...
 
uint8_t ds3231_get_reg (ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 get the chip register More...
 
uint8_t ds3231_info (ds3231_info_t *info)
 get chip's information More...
 
uint8_t ds3231_set_time (ds3231_handle_t *handle, ds3231_time_t *t)
 set the current time
uint8_t ds3231_get_time (ds3231_handle_t *handle, ds3231_time_t *t)
 get the current time
uint8_t ds3231_set_alarm1 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
 set the alarm1 time
uint8_t ds3231_get_alarm1 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
 get the alarm1 time
uint8_t ds3231_set_alarm2 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
 set the alarm2 time
uint8_t ds3231_get_alarm2 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
 get the alarm2 time
uint8_t ds3231_set_oscillator (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the oscillator
uint8_t ds3231_get_oscillator (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the chip oscillator status
uint8_t ds3231_set_alarm_interrupt (ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
 enable or disable the alarm interrupt
uint8_t ds3231_get_alarm_interrupt (ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t *enable)
 get the alarm interrupt status
uint8_t ds3231_set_pin (ds3231_handle_t *handle, ds3231_pin_t pin)
 set the chip pin function
uint8_t ds3231_get_pin (ds3231_handle_t *handle, ds3231_pin_t *pin)
 get the chip pin function
uint8_t ds3231_set_square_wave (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the square wave output
uint8_t ds3231_get_square_wave (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the square wave output status
uint8_t ds3231_get_temperature (ds3231_handle_t *handle, int16_t *raw, float *s)
 get the chip temperature
uint8_t ds3231_get_status (ds3231_handle_t *handle, uint8_t *status)
 get the chip status
uint8_t ds3231_set_aging_offset (ds3231_handle_t *handle, int8_t offset)
 set the chip aging offset
uint8_t ds3231_get_aging_offset (ds3231_handle_t *handle, int8_t *offset)
 get the chip aging offset
uint8_t ds3231_aging_offset_convert_to_register (ds3231_handle_t *handle, float offset, int8_t *reg)
 convert a aging offset value to a register raw data
uint8_t ds3231_aging_offset_convert_to_data (ds3231_handle_t *handle, int8_t reg, float *offset)
 convert a register raw data to a converted aging offset data
uint8_t ds3231_irq_handler (ds3231_handle_t *handle)
 irq handler
uint8_t ds3231_init (ds3231_handle_t *handle)
 initialize the chip
uint8_t ds3231_deinit (ds3231_handle_t *handle)
 close the chip
uint8_t ds3231_alarm_clear (ds3231_handle_t *handle, ds3231_alarm_t alarm)
 clear the alarm flag
uint8_t ds3231_set_32khz_output (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the 32KHz output
uint8_t ds3231_get_32khz_output (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the 32KHz output status
uint8_t ds3231_set_reg (ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 set the chip register
uint8_t ds3231_get_reg (ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 get the chip register
uint8_t ds3231_info (ds3231_info_t *info)
 get chip's information
-

Detailed Description

+

Detailed Description

driver ds3231 source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -271,9 +222,9 @@

history

Definition in file driver_ds3231.c.

-

Macro Definition Documentation

- -

◆ CHIP_NAME

+

Macro Definition Documentation

+ +

◆ CHIP_NAME

@@ -291,8 +242,8 @@

-

◆ DRIVER_VERSION

+ +

◆ DRIVER_VERSION

@@ -308,8 +259,8 @@

-

◆ DS3231_ADDRESS

+ +

◆ DS3231_ADDRESS

@@ -327,8 +278,8 @@

-

◆ DS3231_REG_ALARM1_HOUR

+ +

◆ DS3231_REG_ALARM1_HOUR

@@ -344,8 +295,8 @@

-

◆ DS3231_REG_ALARM1_MINUTE

+ +

◆ DS3231_REG_ALARM1_MINUTE

@@ -361,8 +312,8 @@

-

◆ DS3231_REG_ALARM1_SECOND

+ +

◆ DS3231_REG_ALARM1_SECOND

@@ -378,8 +329,8 @@

-

◆ DS3231_REG_ALARM1_WEEK

+ +

◆ DS3231_REG_ALARM1_WEEK

@@ -395,8 +346,8 @@

-

◆ DS3231_REG_ALARM2_HOUR

+ +

◆ DS3231_REG_ALARM2_HOUR

@@ -412,8 +363,8 @@

-

◆ DS3231_REG_ALARM2_MINUTE

+ +

◆ DS3231_REG_ALARM2_MINUTE

@@ -429,8 +380,8 @@

-

◆ DS3231_REG_ALARM2_WEEK

+ +

◆ DS3231_REG_ALARM2_WEEK

@@ -446,8 +397,8 @@

-

◆ DS3231_REG_CONTROL

+ +

◆ DS3231_REG_CONTROL

@@ -463,8 +414,8 @@

-

◆ DS3231_REG_DATE

+ +

◆ DS3231_REG_DATE

@@ -480,8 +431,8 @@

-

◆ DS3231_REG_HOUR

+ +

◆ DS3231_REG_HOUR

@@ -497,8 +448,8 @@

-

◆ DS3231_REG_MINUTE

+ +

◆ DS3231_REG_MINUTE

@@ -514,8 +465,8 @@

-

◆ DS3231_REG_MONTH

+ +

◆ DS3231_REG_MONTH

@@ -531,8 +482,8 @@

-

◆ DS3231_REG_SECOND

+ +

◆ DS3231_REG_SECOND

@@ -550,8 +501,8 @@

-

◆ DS3231_REG_STATUS

+ +

◆ DS3231_REG_STATUS

@@ -567,8 +518,8 @@

-

◆ DS3231_REG_TEMPERATUREH

+ +

◆ DS3231_REG_TEMPERATUREH

@@ -584,8 +535,8 @@

-

◆ DS3231_REG_TEMPERATUREL

+ +

◆ DS3231_REG_TEMPERATUREL

@@ -601,8 +552,8 @@

-

◆ DS3231_REG_WEEK

+ +

◆ DS3231_REG_WEEK

@@ -618,8 +569,8 @@

-

◆ DS3231_REG_XTAL

+ +

◆ DS3231_REG_XTAL

@@ -635,8 +586,8 @@

-

◆ DS3231_REG_YEAR

+ +

◆ DS3231_REG_YEAR

@@ -652,8 +603,8 @@

-

◆ MANUFACTURER_NAME

+ +

◆ MANUFACTURER_NAME

@@ -669,8 +620,8 @@

-

◆ MAX_CURRENT

+ +

◆ MAX_CURRENT

@@ -686,8 +637,8 @@

-

◆ SUPPLY_VOLTAGE_MAX

+ +

◆ SUPPLY_VOLTAGE_MAX

@@ -703,8 +654,8 @@

-

◆ SUPPLY_VOLTAGE_MIN

+ +

◆ SUPPLY_VOLTAGE_MIN

@@ -720,8 +671,8 @@

-

◆ TEMPERATURE_MAX

+ +

◆ TEMPERATURE_MAX

@@ -737,8 +688,8 @@

-

◆ TEMPERATURE_MIN

+ +

◆ TEMPERATURE_MIN

@@ -756,11 +707,19 @@

+ + +

+
diff --git a/doc/html/driver__ds3231_8c__incl.md5 b/doc/html/driver__ds3231_8c__incl.md5 new file mode 100644 index 0000000..d68793a --- /dev/null +++ b/doc/html/driver__ds3231_8c__incl.md5 @@ -0,0 +1 @@ +7bac5fd94efa1e9a37d2d67ce67a9a2b \ No newline at end of file diff --git a/doc/html/driver__ds3231_8c__incl.svg b/doc/html/driver__ds3231_8c__incl.svg new file mode 100644 index 0000000..1b078bf --- /dev/null +++ b/doc/html/driver__ds3231_8c__incl.svg @@ -0,0 +1,93 @@ + + + + + + +src/driver_ds3231.c + + +Node1 + + +src/driver_ds3231.c + + + + + +Node2 + + +driver_ds3231.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +stdio.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdint.h + + + + + +Node2->Node4 + + + + + + + + +Node5 + + +string.h + + + + + +Node2->Node5 + + + + + + + + diff --git a/doc/html/driver__ds3231_8c_source.html b/doc/html/driver__ds3231_8c_source.html index fb129d6..9b37abb 100644 --- a/doc/html/driver__ds3231_8c_source.html +++ b/doc/html/driver__ds3231_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: src/driver_ds3231.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +

@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231.c
+
driver_ds3231.c
-Go to the documentation of this file.
1 
-
38 #include "driver_ds3231.h"
-
39 
-
43 #define CHIP_NAME "Maxim Integrated DS3231"
-
44 #define MANUFACTURER_NAME "Maxim Integrated"
-
45 #define SUPPLY_VOLTAGE_MIN 2.3f
-
46 #define SUPPLY_VOLTAGE_MAX 5.5f
-
47 #define MAX_CURRENT 0.65f
-
48 #define TEMPERATURE_MIN -40.0f
-
49 #define TEMPERATURE_MAX 85.0f
-
50 #define DRIVER_VERSION 2000
-
55 #define DS3231_REG_SECOND 0x00
-
56 #define DS3231_REG_MINUTE 0x01
-
57 #define DS3231_REG_HOUR 0x02
-
58 #define DS3231_REG_WEEK 0x03
-
59 #define DS3231_REG_DATE 0x04
-
60 #define DS3231_REG_MONTH 0x05
-
61 #define DS3231_REG_YEAR 0x06
-
62 #define DS3231_REG_ALARM1_SECOND 0x07
-
63 #define DS3231_REG_ALARM1_MINUTE 0x08
-
64 #define DS3231_REG_ALARM1_HOUR 0x09
-
65 #define DS3231_REG_ALARM1_WEEK 0x0A
-
66 #define DS3231_REG_ALARM2_MINUTE 0x0B
-
67 #define DS3231_REG_ALARM2_HOUR 0x0C
-
68 #define DS3231_REG_ALARM2_WEEK 0x0D
-
69 #define DS3231_REG_CONTROL 0x0E
-
70 #define DS3231_REG_STATUS 0x0F
-
71 #define DS3231_REG_XTAL 0x10
-
72 #define DS3231_REG_TEMPERATUREH 0x11
-
73 #define DS3231_REG_TEMPERATUREL 0x12
-
78 #define DS3231_ADDRESS 0xD0
-
90 static uint8_t a_ds3231_iic_write(ds3231_handle_t *handle, uint8_t reg, uint8_t data)
-
91 {
-
92  if (handle->iic_write(DS3231_ADDRESS, reg, &data, 1) != 0) /* write data */
-
93  {
-
94  return 1; /* return error */
-
95  }
-
96  else
-
97  {
-
98  return 0; /* success return 0 */
-
99  }
-
100 }
-
101 
-
113 static uint8_t a_ds3231_iic_multiple_read(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint8_t len)
-
114 {
-
115  if (handle->iic_read(DS3231_ADDRESS, reg, buf, len) != 0) /* read data */
-
116  {
-
117  return 1; /* return error */
-
118  }
-
119  else
-
120  { /* success return 0 */
-
121  return 0;
-
122  }
-
123 }
-
124 
-
131 static uint8_t a_ds3231_hex2bcd(uint8_t val)
-
132 {
-
133  uint8_t i, j, k;
-
134 
-
135  i = val / 10; /* get tens place */
-
136  j = val % 10; /* get ones place */
-
137  k = j + (i << 4); /* set bcd */
-
138 
-
139  return k; /* return bcd */
-
140 }
-
141 
-
148 static uint8_t a_ds3231_bcd2hex(uint8_t val)
-
149 {
-
150  uint8_t temp;
-
151 
-
152  temp = val & 0x0F; /* get ones place */
-
153  val = (val >> 4) & 0x0F; /* get tens place */
-
154  val = val * 10; /* set tens place */
-
155  temp = temp + val; /* get hex */
-
156 
-
157  return temp; /* return hex */
-
158 }
-
159 
- -
173 {
-
174  uint8_t res;
-
175  uint8_t reg;
-
176  uint8_t century;
-
177  uint16_t year;
-
178 
-
179  if (handle == NULL) /* check handle */
-
180  {
-
181  return 2; /* return error */
-
182  }
-
183  if (handle->inited != 1) /* check handle initialization */
-
184  {
-
185  return 3; /* return error */
-
186  }
-
187  if (t == NULL) /* check time */
-
188  {
-
189  handle->debug_print("ds3231: time is null.\n"); /* time is null */
-
190 
-
191  return 2; /* return error */
-
192  }
-
193  if (t->format == DS3231_FORMAT_12H) /* if 12H */
-
194  {
-
195  if ((t->year < 2000) || (t->year > 2200)) /* check year */
-
196  {
-
197  handle->debug_print("ds3231: year can't be over 2200 or less than 2000.\n"); /* year can't be over 2200 or less than 2000 */
-
198 
-
199  return 4; /* return error */
-
200  }
-
201  if ((t->month == 0) || (t->month > 12)) /* check month */
-
202  {
-
203  handle->debug_print("ds3231: month can't be zero or over than 12.\n"); /* month can't be zero or over than 12 */
-
204 
-
205  return 4; /* return error */
-
206  }
-
207  if ((t->week == 0) || (t->week > 7)) /* check week */
-
208  {
-
209  handle->debug_print("ds3231: week can't be zero or over than 7.\n"); /* week can't be zero or over than 7 */
-
210 
-
211  return 4; /* return error */
-
212  }
-
213  if ((t->date == 0) || (t->date > 31)) /* check data */
-
214  {
-
215  handle->debug_print("ds3231: date can't be zero or over than 31.\n"); /* date can't be zero or over than 31 */
-
216 
-
217  return 4; /* return error */
-
218  }
-
219  if ((t->hour < 1) || (t->hour > 12)) /* check hour */
-
220  {
-
221  handle->debug_print("ds3231: hour can't be over than 12 or less 1.\n"); /* hour can't be over than 12 or less 1 */
-
222 
-
223  return 4; /* return error */
-
224  }
-
225  if (t->minute > 59) /* check minute */
-
226  {
-
227  handle->debug_print("ds3231: minute can't be over than 59.\n"); /* minute can't be over than 59 */
-
228 
-
229  return 4; /* return error */
-
230  }
-
231  if (t->second > 59) /* check second */
-
232  {
-
233  handle->debug_print("ds3231: second can't be over than 59.\n"); /* second can't be over than 59 */
-
234 
-
235  return 4; /* return error */
-
236  }
-
237  }
-
238  else if (t->format == DS3231_FORMAT_24H) /* if 24H */
-
239  {
-
240  if ((t->year < 2000) || (t->year > 2200)) /* check year */
-
241  {
-
242  handle->debug_print("ds3231: year can't be over 2200 or less than 2000.\n"); /* year can't be over 2200 or less than 2000 */
-
243 
-
244  return 4; /* return error */
-
245  }
-
246  if ((t->month == 0) || (t->month > 12)) /* check month */
-
247  {
-
248  handle->debug_print("ds3231: month can't be zero or over than 12.\n"); /* month can't be zero or over than 12 */
-
249 
-
250  return 4; /* return error */
-
251  }
-
252  if ((t->week == 0) || (t->week > 7)) /* check week */
-
253  {
-
254  handle->debug_print("ds3231: week can't be zero or over than 7.\n"); /* week can't be zero or over than 7 */
-
255 
-
256  return 4; /* return error */
-
257  }
-
258  if ((t->date == 0) || (t->date > 31)) /* check data */
-
259  {
-
260  handle->debug_print("ds3231: date can't be zero or over than 31.\n"); /* date can't be zero or over than 31 */
-
261 
-
262  return 4; /* return error */
-
263  }
-
264  if (t->hour > 23) /* check hour */
-
265  {
-
266  handle->debug_print("ds3231: hour can't be over than 23.\n"); /* hour can't be over than 23 */
-
267 
-
268  return 4; /* return error */
-
269  }
-
270  if (t->minute > 59) /* check minute */
-
271  {
-
272  handle->debug_print("ds3231: minute can't be over than 59.\n"); /* minute can't be over than 59 */
-
273 
-
274  return 4; /* return error */
-
275  }
-
276  if (t->second > 59) /* check second */
-
277  {
-
278  handle->debug_print("ds3231: second can't be over than 59.\n"); /* second can't be over than 59 */
-
279 
-
280  return 4; /* return error */
-
281  }
-
282  }
-
283  else
-
284  {
-
285  handle->debug_print("ds3231: format is invalid.\n"); /* format is invalid */
-
286 
-
287  return 4; /* return error */
-
288  }
-
289 
-
290  res = a_ds3231_iic_write(handle, DS3231_REG_SECOND, a_ds3231_hex2bcd(t->second)); /* write second */
-
291  if (res != 0) /* check result */
-
292  {
-
293  handle->debug_print("ds3231: write second failed.\n"); /* write second failed */
-
294 
-
295  return 1; /* return error */
-
296  }
-
297  res = a_ds3231_iic_write(handle, DS3231_REG_MINUTE, a_ds3231_hex2bcd(t->minute)); /* write minute */
-
298  if (res != 0) /* check result */
-
299  {
-
300  handle->debug_print("ds3231: write minute failed.\n"); /* write minute failed */
-
301 
-
302  return 1; /* return error */
-
303  }
-
304  if (t->format == DS3231_FORMAT_12H) /* if 12H */
-
305  {
-
306  reg = (uint8_t)((1 << 6) | (t->am_pm << 5) | a_ds3231_hex2bcd(t->hour)); /* set hour in 12H */
-
307  }
-
308  else /* if 24H */
-
309  {
-
310  reg = (0 << 6) | a_ds3231_hex2bcd(t->hour); /* set hour in 24H */
-
311  }
-
312  res = a_ds3231_iic_write(handle, DS3231_REG_HOUR, reg); /* write hour */
-
313  if (res != 0) /* check result */
-
314  {
-
315  handle->debug_print("ds3231: write hour failed.\n"); /* write hour failed */
-
316 
-
317  return 1; /* return error */
-
318  }
-
319  res = a_ds3231_iic_write(handle, DS3231_REG_WEEK, a_ds3231_hex2bcd(t->week)); /* write week */
-
320  if (res != 0) /* check result */
-
321  {
-
322  handle->debug_print("ds3231: write week failed.\n"); /* write week failed */
-
323 
-
324  return 1; /* return error */
-
325  }
-
326  res = a_ds3231_iic_write(handle, DS3231_REG_DATE, a_ds3231_hex2bcd(t->date)); /* write data */
-
327  if (res != 0) /* check result */
-
328  {
-
329  handle->debug_print("ds3231: write date failed.\n"); /* write date failed */
-
330 
-
331  return 1; /* return error */
-
332  }
-
333  year = t->year - 2000; /* year - 2000 */
-
334  if (year >= 100) /* check year */
-
335  {
-
336  century = 1; /* set century */
-
337  year -= 100; /* year -= 100 */
-
338  }
-
339  else
-
340  {
-
341  century = 0; /* set century 0 */
-
342  }
-
343  res = a_ds3231_iic_write(handle, DS3231_REG_MONTH, a_ds3231_hex2bcd(t->month) | (century << 7)); /* write month and century */
-
344  if (res != 0) /* check result */
-
345  {
-
346  handle->debug_print("ds3231: write century and month failed.\n"); /* write century and month failed */
-
347 
-
348  return 1; /* return error */
-
349  }
-
350  res = a_ds3231_iic_write(handle, DS3231_REG_YEAR, a_ds3231_hex2bcd((uint8_t)year)); /* write year */
-
351  if (res != 0) /* check result */
-
352  {
-
353  handle->debug_print("ds3231: write year failed.\n"); /* write year failed */
-
354 
-
355  return 1; /* return error */
-
356  }
-
357 
-
358  return 0; /* success return 0 */
-
359 }
-
360 
- -
373 {
-
374  uint8_t res;
-
375  uint8_t buf[7];
-
376 
-
377  if (handle == NULL) /* check handle */
-
378  {
-
379  return 2; /* return error */
-
380  }
-
381  if (handle->inited != 1) /* check handle initialization */
-
382  {
-
383  return 3; /* return error */
-
384  }
-
385  if (t == NULL) /* check time */
-
386  {
-
387  handle->debug_print("ds3231: time is null.\n"); /* time is null */
-
388 
-
389  return 2; /* return error */
-
390  }
-
391 
-
392  memset(buf, 0, sizeof(uint8_t) * 7); /* clear the buffer */
-
393  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_SECOND, (uint8_t *)buf, 7); /* multiple_read */
-
394  if (res != 0) /* check result */
-
395  {
-
396  handle->debug_print("ds3231: multiple read failed.\n"); /* multiple read failed */
-
397 
-
398  return 1; /* return error */
-
399  }
-
400  t->year = a_ds3231_bcd2hex(buf[6]) + 2000 + ((buf[5] >> 7) & 0x01) * 100; /* get year */
-
401  t->month = a_ds3231_bcd2hex(buf[5]&0x1F); /* get month */
-
402  t->week = a_ds3231_bcd2hex(buf[3]); /* get week */
-
403  t->date = a_ds3231_bcd2hex(buf[4]); /* get date */
-
404  t->am_pm = (ds3231_am_pm_t)((buf[2] >> 5) & 0x01); /* get am pm */
-
405  t->format = (ds3231_format_t)((buf[2] >> 6) & 0x01); /* get format */
-
406  if (t->format == DS3231_FORMAT_12H) /* if 12H */
-
407  {
-
408  t->hour = a_ds3231_bcd2hex(buf[2] & 0x1F); /* get hour */
-
409  }
-
410  else
-
411  {
-
412  t->hour = a_ds3231_bcd2hex(buf[2] & 0x3F); /* get hour */
-
413  }
-
414  t->minute = a_ds3231_bcd2hex(buf[1]); /* get minute */
-
415  t->second = a_ds3231_bcd2hex(buf[0]); /* get second */
-
416 
-
417  return 0; /* success return 0 */
-
418 }
-
419 
- -
433 {
-
434  uint8_t res;
-
435  uint8_t reg;
-
436 
-
437  if (handle == NULL) /* check handle */
-
438  {
-
439  return 2; /* return error */
-
440  }
-
441  if (handle->inited != 1) /* check handle initialization */
-
442  {
-
443  return 3; /* return error */
-
444  }
-
445  if (t == NULL) /* check time */
-
446  {
-
447  handle->debug_print("ds3231: time is null.\n"); /* time is null */
-
448 
-
449  return 2; /* return error */
-
450  }
-
451  if (t->format == DS3231_FORMAT_12H) /* if 12H */
-
452  {
-
453  if ((t->week == 0) || (t->week > 7)) /* check week */
-
454  {
-
455  handle->debug_print("ds3231: week can't be zero or over than 7.\n"); /* week can't be zero or over than 7 */
-
456 
-
457  return 1; /* return error */
-
458  }
-
459  if ((t->date == 0) || (t->date > 31)) /* check data */
-
460  {
-
461  handle->debug_print("ds3231: date can't be zero or over than 31.\n"); /* date can't be zero or over than 31 */
-
462 
-
463  return 1; /* return error */
-
464  }
-
465  if ((t->hour < 1) || (t->hour > 12)) /* check hour */
-
466  {
-
467  handle->debug_print("ds3231: hour can't be over than 12 or less 1.\n"); /* hour can't be over than 12 or less 1 */
-
468 
-
469  return 1; /* return error */
-
470  }
-
471  if (t->minute > 59) /* check minute */
-
472  {
-
473  handle->debug_print("ds3231: minute can't be over than 59.\n"); /* minute can't be over than 59 */
-
474 
-
475  return 1; /* return error */
-
476  }
-
477  if (t->second > 59) /* check second */
-
478  {
-
479  handle->debug_print("ds3231: second can't be over than 59.\n"); /* second can't be over than 59 */
-
480 
-
481  return 1; /* return error */
-
482  }
-
483  }
-
484  else if (t->format == DS3231_FORMAT_24H) /* if 24H */
-
485  {
-
486  if ((t->week == 0) || (t->week > 7)) /* check week */
-
487  {
-
488  handle->debug_print("ds3231: week can't be zero or over than 7.\n"); /* week can't be zero or over than 7 */
-
489 
-
490  return 1; /* return error */
-
491  }
-
492  if ((t->date == 0) || (t->date > 31)) /* check data */
-
493  {
-
494  handle->debug_print("ds3231: date can't be zero or over than 31.\n"); /* date can't be zero or over than 31 */
-
495 
-
496  return 1; /* return error */
-
497  }
-
498  if (t->hour > 23) /* check hour */
-
499  {
-
500  handle->debug_print("ds3231: hour can't be over than 23.\n"); /* hour can't be over than 23 */
-
501 
-
502  return 1; /* return error */
-
503  }
-
504  if (t->minute > 59) /* check minute */
-
505  {
-
506  handle->debug_print("ds3231: minute can't be over than 59.\n"); /* minute can't be over than 59 */
-
507 
-
508  return 1; /* return error */
-
509  }
-
510  if (t->second > 59) /* check second */
-
511  {
-
512  handle->debug_print("ds3231: second can't be over than 59.\n"); /* second can't be over than 59 */
-
513 
-
514  return 1; /* return error */
-
515  }
-
516  }
-
517  else
-
518  {
-
519  handle->debug_print("ds3231: format is invalid.\n"); /* format is invalid */
-
520 
-
521  return 1; /* return error */
-
522  }
-
523 
-
524  res = a_ds3231_iic_write(handle, DS3231_REG_ALARM1_SECOND, a_ds3231_hex2bcd(t->second) | ((mode & 0x01) << 7)); /* write second */
-
525  if (res != 0) /* check result */
-
526  {
-
527  handle->debug_print("ds3231: write alarm1 second failed.\n"); /* write alarm1 second failed */
-
528 
-
529  return 1; /* return error */
-
530  }
-
531  res = a_ds3231_iic_write(handle, DS3231_REG_ALARM1_MINUTE, a_ds3231_hex2bcd(t->minute) | (((mode >> 1) & 0x01) << 7)); /* write minute */
-
532  if (res != 0) /* check result */
-
533  {
-
534  handle->debug_print("ds3231: write alarm1 minute failed.\n"); /* write alarm1 minute failed */
-
535 
-
536  return 1; /* return error */
-
537  }
-
538  if (t->format == DS3231_FORMAT_12H) /* if 12H */
-
539  {
-
540  reg = (uint8_t)((((mode >> 2) & 0x01) << 7) | (1 << 6) | (t->am_pm << 5) | a_ds3231_hex2bcd(t->hour)); /* set hour in 12H */
-
541  }
-
542  else /* if 24H */
-
543  {
-
544  reg = (((mode >> 2) & 0x01) << 7) | a_ds3231_hex2bcd(t->hour); /* set hour in 24H */
-
545  }
-
546  res = a_ds3231_iic_write(handle, DS3231_REG_ALARM1_HOUR, reg); /* write hour */
-
547  if (res != 0) /* check result */
-
548  {
-
549  handle->debug_print("ds3231: write alarm1 hour failed.\n"); /* write alarm1 hour failed */
-
550 
-
551  return 1; /* return error */
-
552  }
-
553  if (mode >= DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH) /* if week */
-
554  {
-
555  reg = (((mode >> 3) & 0x01) << 7) | (1 << 6) | a_ds3231_hex2bcd(t->week); /* set data in week */
-
556  }
-
557  else /* if day */
-
558  {
-
559  reg = (((mode >> 3) & 0x01) << 7) | a_ds3231_hex2bcd(t->date); /* set data in date */
-
560  }
-
561  res = a_ds3231_iic_write(handle, DS3231_REG_ALARM1_WEEK, reg); /* write week */
-
562  if (res != 0) /* check result */
-
563  {
-
564  handle->debug_print("ds3231: write alarm1 week failed.\n"); /* write alarm1 week failed */
-
565 
-
566  return 1; /* return error */
-
567  }
-
568 
-
569  return 0; /* success return 0 */
-
570 }
-
571 
- -
585 {
-
586  uint8_t res;
-
587  uint8_t buf[4];
-
588 
-
589  if (handle == NULL) /* check handle */
-
590  {
-
591  return 2; /* return error */
-
592  }
-
593  if (handle->inited != 1) /* check handle initialization */
-
594  {
-
595  return 3; /* return error */
-
596  }
-
597  if (t == NULL) /* check time */
-
598  {
-
599  handle->debug_print("ds3231: time is null.\n"); /* time is null */
-
600 
-
601  return 2; /* return error */
-
602  }
-
603 
-
604  memset(buf, 0, sizeof(uint8_t) * 4); /* clear the buffer */
-
605  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_ALARM1_SECOND, (uint8_t *)buf, 4); /* multiple_read */
-
606  if (res != 0) /* check result */
-
607  {
-
608  handle->debug_print("ds3231: multiple read failed.\n"); /* multiple read failed */
-
609 
-
610  return 1; /* return error */
-
611  }
-
612  t->year = 0; /* get year */
-
613  t->month = 0; /* get month */
-
614  if (((buf[3] >> 6) & 0x01) != 0) /* if week */
-
615  {
-
616  t->week = a_ds3231_bcd2hex(buf[3] & 0x0F); /* get week */
-
617  t->date = 0; /* get data */
-
618  }
-
619  else /* if data */
-
620  {
-
621  t->week = 0; /* get week */
-
622  t->date = a_ds3231_bcd2hex(buf[3] & 0x3F); /* get data */
-
623  }
-
624  t->am_pm = (ds3231_am_pm_t)((buf[2] >> 5) & 0x01); /* get am pm */
-
625  t->format = (ds3231_format_t)((buf[2] >> 6) & 0x01); /* get format */
-
626  if (t->format == DS3231_FORMAT_12H) /* if 12H */
-
627  {
-
628  t->hour = a_ds3231_bcd2hex(buf[2]&0x1F); /* get hour */
-
629  }
-
630  else /* if 24H */
-
631  {
-
632  t->hour = a_ds3231_bcd2hex(buf[2]&0x3F); /* get hour */
-
633  }
-
634  t->minute = a_ds3231_bcd2hex(buf[1] & 0x7F); /* get minute */
-
635  t->second = a_ds3231_bcd2hex(buf[0] & 0x7F); /* get second */
-
636  *mode = (ds3231_alarm1_mode_t)(((buf[0]>>7)&0x01)<<0 | ((buf[1]>>7)&0x01)<<1 | ((buf[2]>>7)&0x01)<<2 | ((buf[3]>>7)&0x01)<<3 |
-
637  ((buf[3] >> 6)&0x01)<<4
-
638  ); /* get mode */
-
639 
-
640  return 0; /* success return 0 */
-
641 }
-
642 
- -
656 {
-
657  uint8_t res;
-
658  uint8_t reg;
-
659 
-
660  if (handle == NULL) /* check handle */
-
661  {
-
662  return 2; /* return error */
-
663  }
-
664  if (handle->inited != 1) /* check handle initialization */
-
665  {
-
666  return 3; /* return error */
-
667  }
-
668  if (t == NULL) /* check time */
-
669  {
-
670  handle->debug_print("ds3231: time is null.\n"); /* time is null */
-
671 
-
672  return 2; /* return error */
-
673  }
-
674  if (t->format == DS3231_FORMAT_12H) /* if 12H */
-
675  {
-
676  if ((t->week == 0) || (t->week > 7)) /* check week */
-
677  {
-
678  handle->debug_print("ds3231: week can't be zero or over than 7.\n"); /* week can't be zero or over than 7 */
-
679 
-
680  return 1; /* return error */
-
681  }
-
682  if ((t->date == 0) || (t->date > 31)) /* check data */
-
683  {
-
684  handle->debug_print("ds3231: date can't be zero or over than 31.\n"); /* date can't be zero or over than 31 */
-
685 
-
686  return 1; /* return error */
-
687  }
-
688  if ((t->hour < 1) || (t->hour > 12)) /* check hour */
-
689  {
-
690  handle->debug_print("ds3231: hour can't be over than 12 or less 1.\n"); /* hour can't be over than 12 or less 1 */
-
691 
-
692  return 1; /* return error */
-
693  }
-
694  if (t->minute > 59) /* check minute */
-
695  {
-
696  handle->debug_print("ds3231: minute can't be over than 59.\n"); /* minute can't be over than 59 */
-
697 
-
698  return 1; /* return error */
-
699  }
-
700  }
-
701  else if (t->format == DS3231_FORMAT_24H) /* if 24H */
-
702  {
-
703  if ((t->week == 0) || (t->week > 7)) /* check week */
-
704  {
-
705  handle->debug_print("ds3231: week can't be zero or over than 7.\n"); /* week can't be zero or over than 7 */
-
706 
-
707  return 1; /* return error */
-
708  }
-
709  if ((t->date == 0) || (t->date > 31)) /* check data */
-
710  {
-
711  handle->debug_print("ds3231: date can't be zero or over than 31.\n"); /* date can't be zero or over than 31 */
-
712 
-
713  return 1; /* return error */
-
714  }
-
715  if (t->hour > 23) /* check hour */
-
716  {
-
717  handle->debug_print("ds3231: hour can't be over than 23.\n"); /* hour can't be over than 23 */
-
718 
-
719  return 1; /* return error */
-
720  }
-
721  if (t->minute > 59) /* check minute */
-
722  {
-
723  handle->debug_print("ds3231: minute can't be over than 59.\n"); /* minute can't be over than 59 */
-
724 
-
725  return 1; /* return error */
-
726  }
-
727  }
-
728  else
-
729  {
-
730  handle->debug_print("ds3231: format is invalid.\n"); /* format is invalid */
-
731 
-
732  return 1; /* return error */
-
733  }
-
734 
-
735  res = a_ds3231_iic_write(handle, DS3231_REG_ALARM2_MINUTE, a_ds3231_hex2bcd(t->minute) | (((mode >> 0) & 0x01) << 7)); /* write minute */
-
736  if (res != 0) /* check result */
-
737  {
-
738  handle->debug_print("ds3231: write alarm2 minute failed.\n"); /* write alarm2 minute failed */
-
739 
-
740  return 1; /* return error */
-
741  }
-
742  if (t->format == DS3231_FORMAT_12H) /* if 12H */
-
743  {
-
744  reg = (uint8_t)((((mode >> 1) & 0x01) << 7) | (1 << 6) | (t->am_pm << 5) | a_ds3231_hex2bcd(t->hour)); /* set hour in 12H */
-
745  }
-
746  else /* if 24H */
-
747  {
-
748  reg = (((mode >> 1) & 0x01) << 7) | a_ds3231_hex2bcd(t->hour); /* set hour in 24H */
-
749  }
-
750  res = a_ds3231_iic_write(handle, DS3231_REG_ALARM2_HOUR, reg); /* write hour */
-
751  if (res != 0) /* check result */
-
752  {
-
753  handle->debug_print("ds3231: write alarm2 hour failed.\n"); /* write alarm2 hour failed */
-
754 
-
755  return 1; /* return error */
-
756  }
-
757  if (mode >= (uint8_t)DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH) /* if week */
-
758  {
-
759  reg = (((mode >> 2) & 0x01) << 7) | (1 << 6) | a_ds3231_hex2bcd(t->week); /* set data in week */
-
760  }
-
761  else /* if day */
-
762  {
-
763  reg = (((mode >> 2) & 0x01) << 7) | a_ds3231_hex2bcd(t->date); /* set data in date */
-
764  }
-
765  res = a_ds3231_iic_write(handle, DS3231_REG_ALARM2_WEEK, reg); /* write week */
-
766  if (res != 0) /* check result */
-
767  {
-
768  handle->debug_print("ds3231: write alarm2 week failed.\n"); /* write alarm2 week failed */
-
769 
-
770  return 1; /* return error */
-
771  }
-
772 
-
773  return 0; /* success return 0 */
-
774 }
-
775 
- -
789 {
-
790  uint8_t res;
-
791  uint8_t buf[3];
-
792 
-
793  if (handle == NULL) /* check handle */
-
794  {
-
795  return 2; /* return error */
-
796  }
-
797  if (handle->inited != 1) /* check handle initialization */
-
798  {
-
799  return 3; /* return error */
-
800  }
-
801  if (t == NULL) /* check time */
-
802  {
-
803  handle->debug_print("ds3231: time is null.\n"); /* time is null */
-
804 
-
805  return 2; /* return error */
-
806  }
-
807 
-
808  memset(buf, 0, sizeof(uint8_t) * 3); /* clear the buffer */
-
809  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_ALARM2_MINUTE, (uint8_t *)buf, 3); /* multiple read */
-
810  if (res != 0) /* check result */
-
811  {
-
812  handle->debug_print("ds3231: multiple read failed.\n"); /* multiple read failed */
-
813 
-
814  return 1; /* return error */
-
815  }
-
816  t->year = 0; /* get year */
-
817  t->month = 0; /* get month */
-
818  if (((buf[2] >> 6) & 0x01) != 0) /* if week */
-
819  {
-
820  t->week = a_ds3231_bcd2hex(buf[2] & 0x0F); /* get week */
-
821  t->date = 0; /* get data */
-
822  }
-
823  else /* if data */
-
824  {
-
825  t->week = 0; /* get week */
-
826  t->date = a_ds3231_bcd2hex(buf[2] & 0x3F); /* get data */
-
827  }
-
828  t->am_pm = (ds3231_am_pm_t)((buf[1] >> 5) & 0x01); /* get am pm */
-
829  t->format = (ds3231_format_t)((buf[1] >> 6) & 0x01); /* get format */
-
830  if (t->format == DS3231_FORMAT_12H) /* if 12H */
-
831  {
-
832  t->hour = a_ds3231_bcd2hex(buf[1]&0x1F); /* get hour */
-
833  }
-
834  else /* if 24H */
-
835  {
-
836  t->hour = a_ds3231_bcd2hex(buf[1]&0x3F); /* get hour */
-
837  }
-
838  t->minute = a_ds3231_bcd2hex(buf[0] & 0x7F); /* get minute */
-
839  t->second = 0; /* get second */
-
840  *mode = (ds3231_alarm2_mode_t)(((buf[0]>>7)&0x01)<<0 | ((buf[1]>>7)&0x01)<<1 | ((buf[2]>>7)&0x01)<<2 | ((buf[2]>>6)&0x01)<<4); /* get mode */
-
841 
-
842  return 0; /* success return 0 */
-
843 }
-
844 
- -
857 {
-
858  uint8_t res;
-
859  uint8_t prev;
-
860 
-
861  if (handle == NULL) /* check handle */
-
862  {
-
863  return 2; /* return error */
-
864  }
-
865  if (handle->inited != 1) /* check handle initialization */
-
866  {
-
867  return 3; /* return error */
-
868  }
-
869 
-
870  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple read */
-
871  if (res != 0) /* check result */
-
872  {
-
873  handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
-
874 
-
875  return 1; /* return error */
-
876  }
-
877  prev &= ~ (1 << 7); /* clear config */
-
878  prev |= (!enable) << 7; /* set enable */
-
879  res = a_ds3231_iic_write(handle, DS3231_REG_CONTROL, prev); /* write control */
-
880  if (res != 0) /* check result */
-
881  {
-
882  handle->debug_print("ds3231: write control failed.\n"); /* write control failed */
-
883 
-
884  return 1; /* return error */
-
885  }
-
886 
-
887  return 0; /* success return 0 */
-
888 }
-
889 
- -
902 {
-
903  uint8_t res;
-
904  uint8_t prev;
-
905 
-
906  if (handle == NULL) /* check handle */
-
907  {
-
908  return 2; /* return error */
-
909  }
-
910  if (handle->inited != 1) /* check handle initialization */
-
911  {
-
912  return 3; /* return error */
-
913  }
-
914 
-
915  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple read */
-
916  if (res != 0) /* check result */
-
917  {
-
918  handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
-
919 
-
920  return 1; /* return error */
-
921  }
-
922  *enable = (ds3231_bool_t)(!((prev >> 7) & 0x01)); /* get enable */
-
923 
-
924  return 0; /* success return 0 */
-
925 }
-
926 
- -
940 {
-
941  uint8_t res;
-
942  uint8_t prev;
-
943 
-
944  if (handle == NULL) /* check handle */
-
945  {
-
946  return 2; /* return error */
-
947  }
-
948  if (handle->inited != 1) /* check handle initialization */
-
949  {
-
950  return 3; /* return error */
-
951  }
-
952 
-
953  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple_read */
-
954  if (res != 0) /* check result */
-
955  {
-
956  handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
-
957 
-
958  return 1; /* return error */
-
959  }
-
960  prev &= ~(1 << alarm); /* clear config */
-
961  prev |= enable << alarm; /* set enable */
-
962  res = a_ds3231_iic_write(handle, DS3231_REG_CONTROL, prev); /* write control */
-
963  if (res != 0) /* check result */
-
964  {
-
965  handle->debug_print("ds3231: write control failed.\n"); /* write control failed */
-
966 
-
967  return 1; /* return error */
-
968  }
-
969 
-
970  return 0; /* success return 0 */
-
971 }
-
972 
- -
986 {
-
987  uint8_t res;
-
988  uint8_t prev;
-
989 
-
990  if (handle == NULL) /* check handle */
-
991  {
-
992  return 2; /* return error */
-
993  }
-
994  if (handle->inited != 1) /* check handle initialization */
-
995  {
-
996  return 3; /* return error */
-
997  }
-
998 
-
999  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple_read */
-
1000  if (res != 0) /* check result */
-
1001  {
-
1002  handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
-
1003 
-
1004  return 1; /* return error */
-
1005  }
-
1006  *enable = (ds3231_bool_t)((prev >> alarm) & 0x01); /* get enable */
-
1007 
-
1008  return 0; /* success return 0 */
-
1009 }
-
1010 
- -
1023 {
-
1024  uint8_t res;
-
1025  uint8_t prev;
-
1026 
-
1027  if (handle == NULL) /* check handle */
-
1028  {
-
1029  return 2; /* return error */
-
1030  }
-
1031  if (handle->inited != 1) /* check handle initialization */
-
1032  {
-
1033  return 3; /* return error */
-
1034  }
-
1035 
-
1036  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple_read */
-
1037  if (res != 0) /* check result */
-
1038  {
-
1039  handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
-
1040 
-
1041  return 1; /* return error */
-
1042  }
-
1043  prev &= ~(1 << 2); /* clear config */
-
1044  prev |= pin << 2; /* set pin */
-
1045  res = a_ds3231_iic_write(handle, DS3231_REG_CONTROL, prev); /* write control */
-
1046  if (res != 0) /* check result */
-
1047  {
-
1048  handle->debug_print("ds3231: write control failed.\n"); /* write control failed */
-
1049 
-
1050  return 1; /* return error */
-
1051  }
-
1052 
-
1053  return 0; /* success return 0 */
-
1054 }
-
1055 
- -
1068 {
-
1069  uint8_t res;
-
1070  uint8_t prev;
-
1071 
-
1072  if (handle == NULL) /* check handle */
-
1073  {
-
1074  return 2; /* return error */
-
1075  }
-
1076  if (handle->inited != 1) /* check handle initialization */
-
1077  {
-
1078  return 3; /* return error */
-
1079  }
-
1080 
-
1081  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple_read */
-
1082  if (res != 0) /* check result */
-
1083  {
-
1084  handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
-
1085 
-
1086  return 1; /* return error */
-
1087  }
-
1088  *pin = (ds3231_pin_t)((prev >> 2) & 0x01); /* get pin */
-
1089 
-
1090  return 0; /* success return 0 */
-
1091 }
-
1092 
- -
1105 {
-
1106  uint8_t res;
-
1107  uint8_t prev;
-
1108 
-
1109  if (handle == NULL) /* check handle */
-
1110  {
-
1111  return 2; /* return error */
-
1112  }
-
1113  if (handle->inited != 1) /* check handle initialization */
-
1114  {
-
1115  return 3; /* return error */
-
1116  }
-
1117 
-
1118  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple_read */
-
1119  if (res != 0) /* check result */
-
1120  {
-
1121  handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
-
1122 
-
1123  return 1; /* return error */
-
1124  }
-
1125  prev &= ~(1 << 6); /* clear config */
-
1126  prev |= enable << 6; /* set enable */
-
1127  res = a_ds3231_iic_write(handle, DS3231_REG_CONTROL, prev); /* write control */
-
1128  if (res != 0) /* check result */
-
1129  {
-
1130  handle->debug_print("ds3231: write control failed.\n"); /* write control failed */
-
1131 
-
1132  return 1; /* return error */
-
1133  }
-
1134 
-
1135  return 0; /* success return 0 */
-
1136 }
-
1137 
- -
1150 {
-
1151  uint8_t res;
-
1152  uint8_t prev;
-
1153 
-
1154  if (handle == NULL) /* check handle */
-
1155  {
-
1156  return 2; /* return error */
-
1157  }
-
1158  if (handle->inited != 1) /* check handle initialization */
-
1159  {
-
1160  return 3; /* return error */
-
1161  }
-
1162 
-
1163  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple_read */
-
1164  if (res != 0) /* check result */
-
1165  {
-
1166  handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
-
1167 
-
1168  return 1; /* return error */
-
1169  }
-
1170  *enable = (ds3231_bool_t)((prev >> 6) & 0x01); /* get enable */
-
1171 
-
1172  return 0; /* success return 0 */
-
1173 }
-
1174 
-
1187 uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
-
1188 {
-
1189  uint8_t res;
-
1190  uint8_t prev;
-
1191  uint32_t times;
-
1192  uint8_t buf[2];
-
1193 
-
1194  if (handle == NULL) /* check handle */
-
1195  {
-
1196  return 2; /* return error */
-
1197  }
-
1198  if (handle->inited != 1) /* check handle initialization */
-
1199  {
-
1200  return 3; /* return error */
-
1201  }
-
1202 
-
1203  memset(buf, 0, sizeof(uint8_t) * 2); /* clear the buffer */
-
1204  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple read */
-
1205  if (res != 0) /* check result */
-
1206  {
-
1207  handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
-
1208 
-
1209  return 1; /* return error */
-
1210  }
-
1211  prev &= ~(1 << 5); /* clear config */
-
1212  prev |= 1 << 5; /* set enable */
-
1213  res = a_ds3231_iic_write(handle, DS3231_REG_CONTROL, prev); /* write control */
-
1214  if (res != 0) /* check result */
-
1215  {
-
1216  handle->debug_print("ds3231: write control failed.\n"); /* write control failed */
-
1217 
-
1218  return 1; /* return error */
-
1219  }
-
1220  times = 500; /* set 5s */
-
1221  while (times != 0) /* check times */
-
1222  {
-
1223  handle->delay_ms(10); /* delay 10 ms */
-
1224  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)&prev, 1); /* read status */
-
1225  if (res != 0) /* check result */
-
1226  {
-
1227  handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
-
1228 
-
1229  return 1; /* return error */
-
1230  }
-
1231  if (((prev >> 2) & 0x01) == 0) /* check result */
-
1232  {
-
1233  break; /* break */
-
1234  }
-
1235  times--; /* times-- */
-
1236  }
-
1237  if (times == 0) /* if zero */
-
1238  {
-
1239  handle->debug_print("ds3231: read timeout.\n"); /* read timeout */
-
1240 
-
1241  return 1; /* return error */
-
1242  }
-
1243  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_TEMPERATUREH, (uint8_t *)buf, 2); /* read temperature */
-
1244  if (res != 0) /* check result */
-
1245  {
-
1246  handle->debug_print("ds3231: read temperature failed.\n"); /* read temperature failed */
-
1247 
-
1248  return 1; /* return error */
-
1249  }
-
1250  *raw = (int16_t)(((uint16_t)buf[0]) << 8) | buf[1]; /* set raw temperature */
-
1251  *raw = (*raw) >> 6; /* right shift */
-
1252  if (((*raw) & 0x0200) != 0) /* set negative value */
-
1253  {
-
1254  *raw = (*raw) | 0xFC00U; /* set negative part */
-
1255  }
-
1256  *s = (float)(*raw) * 0.25f; /* set converted temperature */
-
1257 
-
1258  return 0; /* success return 0 */
-
1259 }
-
1260 
-
1272 uint8_t ds3231_get_status(ds3231_handle_t *handle, uint8_t *status)
-
1273 {
-
1274  uint8_t res;
-
1275 
-
1276  if (handle == NULL) /* check handle */
-
1277  {
-
1278  return 2; /* return error */
-
1279  }
-
1280  if (handle->inited != 1) /* check handle initialization */
-
1281  {
-
1282  return 3; /* return error */
-
1283  }
-
1284 
-
1285  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)status, 1); /* multiple read */
-
1286  if (res != 0) /* check result */
-
1287  {
-
1288  handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
-
1289 
-
1290  return 1; /* return error */
-
1291  }
-
1292 
-
1293  return 0; /* success return 0 */
-
1294 }
-
1295 
-
1307 uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
-
1308 {
-
1309  uint8_t res;
-
1310 
-
1311  if (handle == NULL) /* check handle */
-
1312  {
-
1313  return 2; /* return error */
-
1314  }
-
1315  if (handle->inited != 1) /* check handle initialization */
-
1316  {
-
1317  return 3; /* return error */
-
1318  }
-
1319 
-
1320  res = a_ds3231_iic_write(handle, DS3231_REG_XTAL, offset); /* write offset */
-
1321  if (res != 0) /* check result */
-
1322  {
-
1323  handle->debug_print("ds3231: write offset failed.\n"); /* write offset failed */
-
1324 
-
1325  return 1; /* return error */
-
1326  }
-
1327 
-
1328  return 0; /* success return 0 */
-
1329 }
-
1330 
-
1342 uint8_t ds3231_get_aging_offset(ds3231_handle_t *handle, int8_t *offset)
-
1343 {
-
1344  uint8_t res;
-
1345 
-
1346  if (handle == NULL) /* check handle */
-
1347  {
-
1348  return 2; /* return error */
-
1349  }
-
1350  if (handle->inited != 1) /* check handle initialization */
-
1351  {
-
1352  return 3; /* return error */
-
1353  }
-
1354 
-
1355  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_XTAL, (uint8_t *)offset, 1); /* read offset */
-
1356  if (res != 0) /* check result */
-
1357  {
-
1358  handle->debug_print("ds3231: read offset failed.\n"); /* read offset failed */
-
1359 
-
1360  return 1; /* return error */
-
1361  }
-
1362 
-
1363  return 0; /* success return 0 */
-
1364 }
-
1365 
-
1377 uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
-
1378 {
-
1379  if (handle == NULL) /* check handle */
-
1380  {
-
1381  return 2; /* return error */
-
1382  }
-
1383  if (handle->inited != 1) /* check handle initialization */
-
1384  {
-
1385  return 3; /* return error */
-
1386  }
-
1387 
-
1388  *reg = (int8_t)(offset / 0.12f); /* convert real data to register data */
-
1389 
-
1390  return 0; /* success return 0 */
-
1391 }
-
1392 
-
1404 uint8_t ds3231_aging_offset_convert_to_data(ds3231_handle_t *handle, int8_t reg, float *offset)
-
1405 {
-
1406  if (handle == NULL) /* check handle */
-
1407  {
-
1408  return 2; /* return error */
-
1409  }
-
1410  if (handle->inited != 1) /* check handle initialization */
-
1411  {
-
1412  return 3; /* return error */
-
1413  }
-
1414 
-
1415  *offset = (float)(reg) * 0.12f; /* convert raw data to real data */
-
1416 
-
1417  return 0; /* success return 0 */
-
1418 }
-
1419 
- -
1431 {
-
1432  uint8_t res, prev;
-
1433 
-
1434  if (handle == NULL) /* check handle */
-
1435  {
-
1436  return 2; /* return error */
-
1437  }
-
1438  if (handle->inited != 1) /* check handle initialization */
-
1439  {
-
1440  return 3; /* return error */
-
1441  }
-
1442 
-
1443  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)&prev, 1); /* multiple read */
-
1444  if (res != 0) /* check result */
-
1445  {
-
1446  handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
-
1447 
-
1448  return 1; /* return error */
-
1449  } /* if oscillator stop */
-
1450  if ((prev & DS3231_STATUS_ALARM_2) != 0) /* if alarm 2 */
-
1451  {
-
1452  if (handle->receive_callback != NULL) /* if receive callback */
-
1453  {
-
1454  handle->receive_callback(DS3231_STATUS_ALARM_2); /* run callback */
-
1455  }
-
1456  }
-
1457  if ((prev & DS3231_STATUS_ALARM_1) != 0) /* if alarm 1 */
-
1458  {
-
1459  if (handle->receive_callback != NULL) /* if receive callback */
-
1460  {
-
1461  handle->receive_callback(DS3231_STATUS_ALARM_1); /* run callback */
-
1462  }
-
1463  }
-
1464 
-
1465  return 0; /* success return 0 */
-
1466 }
-
1467 
- -
1479 {
-
1480  uint8_t res;
-
1481  uint8_t prev;
-
1482 
-
1483  if (handle == NULL) /* check handle */
-
1484  {
-
1485  return 2; /* return error */
-
1486  }
-
1487  if (handle->debug_print == NULL) /* check debug_print */
-
1488  {
-
1489  return 3; /* return error */
-
1490  }
-
1491  if (handle->iic_init == NULL) /* check iic_init */
-
1492  {
-
1493  handle->debug_print("ds3231: iic_init is null.\n"); /* iic_init is null */
-
1494 
-
1495  return 3; /* return error */
-
1496  }
-
1497  if (handle->iic_deinit == NULL) /* check iic_deinit */
-
1498  {
-
1499  handle->debug_print("ds3231: iic_deinit is null.\n"); /* iic_deinit is null */
-
1500 
-
1501  return 3; /* return error */
-
1502  }
-
1503  if (handle->iic_write == NULL) /* check iic_write */
-
1504  {
-
1505  handle->debug_print("ds3231: iic_write is null.\n"); /* iic_write is null */
-
1506 
-
1507  return 3; /* return error */
-
1508  }
-
1509  if (handle->iic_read == NULL) /* check iic_read */
-
1510  {
-
1511  handle->debug_print("ds3231: iic_read is null.\n"); /* iic_read is null */
-
1512 
-
1513  return 3; /* return error */
-
1514  }
-
1515  if (handle->delay_ms == NULL) /* check delay_ms */
-
1516  {
-
1517  handle->debug_print("ds3231: delay_ms is null.\n"); /* delay_ms is null */
-
1518 
-
1519  return 3; /* return error */
-
1520  }
-
1521  if (handle->receive_callback == NULL) /* check receive_callback */
-
1522  {
-
1523  handle->debug_print("ds3231: receive_callback is null.\n"); /* receive_callback is null */
-
1524 
-
1525  return 3; /* return error */
-
1526  }
-
1527 
-
1528  if (handle->iic_init() != 0) /* iic init */
-
1529  {
-
1530  handle->debug_print("ds3231: iic init failed.\n"); /* iic init failed */
-
1531 
-
1532  return 1; /* return error */
-
1533  }
-
1534  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)&prev, 1); /* multiple_read */
-
1535  if (res != 0) /* check result */
-
1536  {
-
1537  handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
-
1538  (void)handle->iic_deinit(); /* iic deinit */
-
1539 
-
1540  return 1; /* return error */
-
1541  }
-
1542  prev &= ~(1 << 7); /* clear config */
-
1543  res = a_ds3231_iic_write(handle, DS3231_REG_STATUS, prev); /* write status */
-
1544  if (res != 0) /* check result */
-
1545  {
-
1546  handle->debug_print("ds3231: write status failed.\n"); /* write status failed */
-
1547  (void)handle->iic_deinit(); /* iic deinit */
-
1548 
-
1549  return 1; /* return error */
-
1550  }
-
1551  handle->inited = 1; /* flag finish initialization */
-
1552 
-
1553  return 0; /* success return 0 */
-
1554 }
-
1555 
- -
1567 {
-
1568  if (handle == NULL) /* check handle */
-
1569  {
-
1570  return 2; /* return error */
-
1571  }
-
1572  if (handle->inited != 1) /* check handle initialization */
-
1573  {
-
1574  return 3; /* return error */
-
1575  }
-
1576 
-
1577  if (handle->iic_deinit() != 0) /* iic deinit */
-
1578  {
-
1579  handle->debug_print("ds3231: iic deinit failed.\n"); /* iic deinit failed */
-
1580 
-
1581  return 1; /* return error */
-
1582  }
-
1583  handle->inited = 0; /* flag close */
-
1584 
-
1585  return 0; /* success return 0 */
-
1586 }
-
1587 
- -
1600 {
-
1601  uint8_t res;
-
1602  uint8_t prev;
-
1603 
-
1604  if (handle == NULL) /* check handle */
-
1605  {
-
1606  return 2; /* return error */
-
1607  }
-
1608  if (handle->inited != 1) /* check handle initialization */
-
1609  {
-
1610  return 3; /* return error */
-
1611  }
-
1612 
-
1613  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)&prev, 1); /* multiple_read */
-
1614  if (res != 0) /* check result */
-
1615  {
-
1616  handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
-
1617 
-
1618  return 1; /* return error */
-
1619  }
-
1620  prev &= ~(1 << alarm); /* clear config */
-
1621  res = a_ds3231_iic_write(handle, DS3231_REG_STATUS, prev); /* write status */
-
1622  if (res != 0) /* check result */
-
1623  {
-
1624  handle->debug_print("ds3231: write status failed.\n"); /* write status failed */
-
1625 
-
1626  return 1; /* return error */
-
1627  }
-
1628 
-
1629  return 0; /* success return 0 */
-
1630 }
-
1631 
- -
1644 {
-
1645  uint8_t res;
-
1646  uint8_t prev;
-
1647 
-
1648  if (handle == NULL) /* check handle */
-
1649  {
-
1650  return 2; /* return error */
-
1651  }
-
1652  if (handle->inited != 1) /* check handle initialization */
-
1653  {
-
1654  return 3; /* return error */
-
1655  }
-
1656 
-
1657  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)&prev, 1); /* multiple read */
-
1658  if (res != 0) /* check result */
-
1659  {
-
1660  handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
-
1661 
-
1662  return 1; /* return error */
-
1663  }
-
1664  prev &= ~(1 << 3); /* clear config */
-
1665  prev |= enable << 3; /* set enable */
-
1666  res = a_ds3231_iic_write(handle, DS3231_REG_STATUS, prev); /* write status */
-
1667  if (res != 0) /* check result */
-
1668  {
-
1669  handle->debug_print("ds3231: write status failed.\n"); /* write status failed */
-
1670 
-
1671  return 1; /* return error */
-
1672  }
-
1673 
-
1674  return 0; /* success return 0 */
-
1675 }
-
1676 
- -
1689 {
-
1690  uint8_t res;
-
1691  uint8_t prev;
-
1692 
-
1693  if (handle == NULL) /* check handle */
-
1694  {
-
1695  return 2; /* return error */
-
1696  }
-
1697  if (handle->inited != 1) /* check handle initialization */
-
1698  {
-
1699  return 3; /* return error */
-
1700  }
-
1701 
-
1702  res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)&prev, 1); /* multiple read */
-
1703  if (res != 0) /* check result */
-
1704  {
-
1705  handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
-
1706 
-
1707  return 1; /* return error */
-
1708  }
-
1709  *enable = (ds3231_bool_t)((prev >> 3) & 0x01); /* get enable */
-
1710 
-
1711  return 0; /* success return 0 */
-
1712 }
-
1713 
-
1727 uint8_t ds3231_set_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
-
1728 {
-
1729  if (handle == NULL) /* check handle */
-
1730  {
-
1731  return 2; /* return error */
-
1732  }
-
1733  if (handle->inited != 1) /* check handle initialization */
-
1734  {
-
1735  return 3; /* return error */
-
1736  }
-
1737 
-
1738  if (handle->iic_write(DS3231_ADDRESS, reg, buf, len) != 0) /* write data */
-
1739  {
-
1740  return 1; /* return error */
-
1741  }
-
1742  else
-
1743  {
-
1744  return 0; /* success return 0 */
-
1745  }
-
1746 }
-
1747 
-
1761 uint8_t ds3231_get_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
-
1762 {
-
1763  if (handle == NULL) /* check handle */
-
1764  {
-
1765  return 2; /* return error */
-
1766  }
-
1767  if (handle->inited != 1) /* check handle initialization */
-
1768  {
-
1769  return 3; /* return error */
-
1770  }
-
1771 
-
1772  if (handle->iic_read(DS3231_ADDRESS, reg, buf, len) != 0) /* read data */
-
1773  {
-
1774  return 1; /* return error */
-
1775  }
-
1776  else
-
1777  {
-
1778  return 0; /* success return 0 */
-
1779  }
-
1780 }
-
1781 
- -
1791 {
-
1792  if (info == NULL) /* check handle */
-
1793  {
-
1794  return 2; /* return error */
-
1795  }
-
1796 
-
1797  memset(info, 0, sizeof(ds3231_info_t)); /* initialize ds3231 info structure */
-
1798  strncpy(info->chip_name, CHIP_NAME, 32); /* copy chip name */
-
1799  strncpy(info->manufacturer_name, MANUFACTURER_NAME, 32); /* copy manufacturer name */
-
1800  strncpy(info->interface, "IIC", 8); /* copy interface name */
-
1801  info->supply_voltage_min_v = SUPPLY_VOLTAGE_MIN; /* set minimal supply voltage */
-
1802  info->supply_voltage_max_v = SUPPLY_VOLTAGE_MAX; /* set maximum supply voltage */
-
1803  info->max_current_ma = MAX_CURRENT; /* set maximum current */
-
1804  info->temperature_max = TEMPERATURE_MAX; /* set minimal temperature */
-
1805  info->temperature_min = TEMPERATURE_MIN; /* set maximum temperature */
-
1806  info->driver_version = DRIVER_VERSION; /* set driver version */
-
1807 
-
1808  return 0; /* success return 0 */
-
1809 }
-
#define DS3231_REG_MINUTE
Definition: driver_ds3231.c:56
-
#define DS3231_REG_YEAR
Definition: driver_ds3231.c:61
-
#define DS3231_REG_CONTROL
Definition: driver_ds3231.c:69
-
#define MAX_CURRENT
Definition: driver_ds3231.c:47
-
#define DS3231_REG_DATE
Definition: driver_ds3231.c:59
-
#define DS3231_REG_ALARM2_MINUTE
Definition: driver_ds3231.c:66
-
#define DS3231_REG_XTAL
Definition: driver_ds3231.c:71
-
#define DS3231_REG_ALARM2_WEEK
Definition: driver_ds3231.c:68
-
#define SUPPLY_VOLTAGE_MAX
Definition: driver_ds3231.c:46
-
#define DS3231_REG_HOUR
Definition: driver_ds3231.c:57
-
#define DS3231_ADDRESS
chip address definition
Definition: driver_ds3231.c:78
-
#define DS3231_REG_ALARM1_MINUTE
Definition: driver_ds3231.c:63
-
#define DS3231_REG_ALARM2_HOUR
Definition: driver_ds3231.c:67
-
#define TEMPERATURE_MAX
Definition: driver_ds3231.c:49
-
#define DS3231_REG_SECOND
chip register definition
Definition: driver_ds3231.c:55
-
#define MANUFACTURER_NAME
Definition: driver_ds3231.c:44
-
#define DS3231_REG_MONTH
Definition: driver_ds3231.c:60
-
#define TEMPERATURE_MIN
Definition: driver_ds3231.c:48
-
#define SUPPLY_VOLTAGE_MIN
Definition: driver_ds3231.c:45
-
#define DS3231_REG_ALARM1_HOUR
Definition: driver_ds3231.c:64
-
#define DS3231_REG_ALARM1_SECOND
Definition: driver_ds3231.c:62
-
#define DS3231_REG_TEMPERATUREH
Definition: driver_ds3231.c:72
-
#define DS3231_REG_ALARM1_WEEK
Definition: driver_ds3231.c:65
-
#define CHIP_NAME
chip information definition
Definition: driver_ds3231.c:43
-
#define DRIVER_VERSION
Definition: driver_ds3231.c:50
-
#define DS3231_REG_STATUS
Definition: driver_ds3231.c:70
-
#define DS3231_REG_WEEK
Definition: driver_ds3231.c:58
+Go to the documentation of this file.
1
+
37
+
38#include "driver_ds3231.h"
+
39
+
43#define CHIP_NAME "Maxim Integrated DS3231"
+
44#define MANUFACTURER_NAME "Maxim Integrated"
+
45#define SUPPLY_VOLTAGE_MIN 2.3f
+
46#define SUPPLY_VOLTAGE_MAX 5.5f
+
47#define MAX_CURRENT 0.65f
+
48#define TEMPERATURE_MIN -40.0f
+
49#define TEMPERATURE_MAX 85.0f
+
50#define DRIVER_VERSION 2000
+
51
+
55#define DS3231_REG_SECOND 0x00
+
56#define DS3231_REG_MINUTE 0x01
+
57#define DS3231_REG_HOUR 0x02
+
58#define DS3231_REG_WEEK 0x03
+
59#define DS3231_REG_DATE 0x04
+
60#define DS3231_REG_MONTH 0x05
+
61#define DS3231_REG_YEAR 0x06
+
62#define DS3231_REG_ALARM1_SECOND 0x07
+
63#define DS3231_REG_ALARM1_MINUTE 0x08
+
64#define DS3231_REG_ALARM1_HOUR 0x09
+
65#define DS3231_REG_ALARM1_WEEK 0x0A
+
66#define DS3231_REG_ALARM2_MINUTE 0x0B
+
67#define DS3231_REG_ALARM2_HOUR 0x0C
+
68#define DS3231_REG_ALARM2_WEEK 0x0D
+
69#define DS3231_REG_CONTROL 0x0E
+
70#define DS3231_REG_STATUS 0x0F
+
71#define DS3231_REG_XTAL 0x10
+
72#define DS3231_REG_TEMPERATUREH 0x11
+
73#define DS3231_REG_TEMPERATUREL 0x12
+
74
+
78#define DS3231_ADDRESS 0xD0
+
79
+
90static uint8_t a_ds3231_iic_write(ds3231_handle_t *handle, uint8_t reg, uint8_t data)
+
91{
+
92 if (handle->iic_write(DS3231_ADDRESS, reg, &data, 1) != 0) /* write data */
+
93 {
+
94 return 1; /* return error */
+
95 }
+
96 else
+
97 {
+
98 return 0; /* success return 0 */
+
99 }
+
100}
+
101
+
113static uint8_t a_ds3231_iic_multiple_read(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint8_t len)
+
114{
+
115 if (handle->iic_read(DS3231_ADDRESS, reg, buf, len) != 0) /* read data */
+
116 {
+
117 return 1; /* return error */
+
118 }
+
119 else
+
120 { /* success return 0 */
+
121 return 0;
+
122 }
+
123}
+
124
+
131static uint8_t a_ds3231_hex2bcd(uint8_t val)
+
132{
+
133 uint8_t i, j, k;
+
134
+
135 i = val / 10; /* get tens place */
+
136 j = val % 10; /* get ones place */
+
137 k = j + (i << 4); /* set bcd */
+
138
+
139 return k; /* return bcd */
+
140}
+
141
+
148static uint8_t a_ds3231_bcd2hex(uint8_t val)
+
149{
+
150 uint8_t temp;
+
151
+
152 temp = val & 0x0F; /* get ones place */
+
153 val = (val >> 4) & 0x0F; /* get tens place */
+
154 val = val * 10; /* set tens place */
+
155 temp = temp + val; /* get hex */
+
156
+
157 return temp; /* return hex */
+
158}
+
159
+
+ +
173{
+
174 uint8_t res;
+
175 uint8_t reg;
+
176 uint8_t century;
+
177 uint16_t year;
+
178
+
179 if (handle == NULL) /* check handle */
+
180 {
+
181 return 2; /* return error */
+
182 }
+
183 if (handle->inited != 1) /* check handle initialization */
+
184 {
+
185 return 3; /* return error */
+
186 }
+
187 if (t == NULL) /* check time */
+
188 {
+
189 handle->debug_print("ds3231: time is null.\n"); /* time is null */
+
190
+
191 return 2; /* return error */
+
192 }
+
193 if (t->format == DS3231_FORMAT_12H) /* if 12H */
+
194 {
+
195 if ((t->year < 2000) || (t->year > 2200)) /* check year */
+
196 {
+
197 handle->debug_print("ds3231: year can't be over 2200 or less than 2000.\n"); /* year can't be over 2200 or less than 2000 */
+
198
+
199 return 4; /* return error */
+
200 }
+
201 if ((t->month == 0) || (t->month > 12)) /* check month */
+
202 {
+
203 handle->debug_print("ds3231: month can't be zero or over than 12.\n"); /* month can't be zero or over than 12 */
+
204
+
205 return 4; /* return error */
+
206 }
+
207 if ((t->week == 0) || (t->week > 7)) /* check week */
+
208 {
+
209 handle->debug_print("ds3231: week can't be zero or over than 7.\n"); /* week can't be zero or over than 7 */
+
210
+
211 return 4; /* return error */
+
212 }
+
213 if ((t->date == 0) || (t->date > 31)) /* check data */
+
214 {
+
215 handle->debug_print("ds3231: date can't be zero or over than 31.\n"); /* date can't be zero or over than 31 */
+
216
+
217 return 4; /* return error */
+
218 }
+
219 if ((t->hour < 1) || (t->hour > 12)) /* check hour */
+
220 {
+
221 handle->debug_print("ds3231: hour can't be over than 12 or less 1.\n"); /* hour can't be over than 12 or less 1 */
+
222
+
223 return 4; /* return error */
+
224 }
+
225 if (t->minute > 59) /* check minute */
+
226 {
+
227 handle->debug_print("ds3231: minute can't be over than 59.\n"); /* minute can't be over than 59 */
+
228
+
229 return 4; /* return error */
+
230 }
+
231 if (t->second > 59) /* check second */
+
232 {
+
233 handle->debug_print("ds3231: second can't be over than 59.\n"); /* second can't be over than 59 */
+
234
+
235 return 4; /* return error */
+
236 }
+
237 }
+
238 else if (t->format == DS3231_FORMAT_24H) /* if 24H */
+
239 {
+
240 if ((t->year < 2000) || (t->year > 2200)) /* check year */
+
241 {
+
242 handle->debug_print("ds3231: year can't be over 2200 or less than 2000.\n"); /* year can't be over 2200 or less than 2000 */
+
243
+
244 return 4; /* return error */
+
245 }
+
246 if ((t->month == 0) || (t->month > 12)) /* check month */
+
247 {
+
248 handle->debug_print("ds3231: month can't be zero or over than 12.\n"); /* month can't be zero or over than 12 */
+
249
+
250 return 4; /* return error */
+
251 }
+
252 if ((t->week == 0) || (t->week > 7)) /* check week */
+
253 {
+
254 handle->debug_print("ds3231: week can't be zero or over than 7.\n"); /* week can't be zero or over than 7 */
+
255
+
256 return 4; /* return error */
+
257 }
+
258 if ((t->date == 0) || (t->date > 31)) /* check data */
+
259 {
+
260 handle->debug_print("ds3231: date can't be zero or over than 31.\n"); /* date can't be zero or over than 31 */
+
261
+
262 return 4; /* return error */
+
263 }
+
264 if (t->hour > 23) /* check hour */
+
265 {
+
266 handle->debug_print("ds3231: hour can't be over than 23.\n"); /* hour can't be over than 23 */
+
267
+
268 return 4; /* return error */
+
269 }
+
270 if (t->minute > 59) /* check minute */
+
271 {
+
272 handle->debug_print("ds3231: minute can't be over than 59.\n"); /* minute can't be over than 59 */
+
273
+
274 return 4; /* return error */
+
275 }
+
276 if (t->second > 59) /* check second */
+
277 {
+
278 handle->debug_print("ds3231: second can't be over than 59.\n"); /* second can't be over than 59 */
+
279
+
280 return 4; /* return error */
+
281 }
+
282 }
+
283 else
+
284 {
+
285 handle->debug_print("ds3231: format is invalid.\n"); /* format is invalid */
+
286
+
287 return 4; /* return error */
+
288 }
+
289
+
290 res = a_ds3231_iic_write(handle, DS3231_REG_SECOND, a_ds3231_hex2bcd(t->second)); /* write second */
+
291 if (res != 0) /* check result */
+
292 {
+
293 handle->debug_print("ds3231: write second failed.\n"); /* write second failed */
+
294
+
295 return 1; /* return error */
+
296 }
+
297 res = a_ds3231_iic_write(handle, DS3231_REG_MINUTE, a_ds3231_hex2bcd(t->minute)); /* write minute */
+
298 if (res != 0) /* check result */
+
299 {
+
300 handle->debug_print("ds3231: write minute failed.\n"); /* write minute failed */
+
301
+
302 return 1; /* return error */
+
303 }
+
304 if (t->format == DS3231_FORMAT_12H) /* if 12H */
+
305 {
+
306 reg = (uint8_t)((1 << 6) | (t->am_pm << 5) | a_ds3231_hex2bcd(t->hour)); /* set hour in 12H */
+
307 }
+
308 else /* if 24H */
+
309 {
+
310 reg = (0 << 6) | a_ds3231_hex2bcd(t->hour); /* set hour in 24H */
+
311 }
+
312 res = a_ds3231_iic_write(handle, DS3231_REG_HOUR, reg); /* write hour */
+
313 if (res != 0) /* check result */
+
314 {
+
315 handle->debug_print("ds3231: write hour failed.\n"); /* write hour failed */
+
316
+
317 return 1; /* return error */
+
318 }
+
319 res = a_ds3231_iic_write(handle, DS3231_REG_WEEK, a_ds3231_hex2bcd(t->week)); /* write week */
+
320 if (res != 0) /* check result */
+
321 {
+
322 handle->debug_print("ds3231: write week failed.\n"); /* write week failed */
+
323
+
324 return 1; /* return error */
+
325 }
+
326 res = a_ds3231_iic_write(handle, DS3231_REG_DATE, a_ds3231_hex2bcd(t->date)); /* write data */
+
327 if (res != 0) /* check result */
+
328 {
+
329 handle->debug_print("ds3231: write date failed.\n"); /* write date failed */
+
330
+
331 return 1; /* return error */
+
332 }
+
333 year = t->year - 2000; /* year - 2000 */
+
334 if (year >= 100) /* check year */
+
335 {
+
336 century = 1; /* set century */
+
337 year -= 100; /* year -= 100 */
+
338 }
+
339 else
+
340 {
+
341 century = 0; /* set century 0 */
+
342 }
+
343 res = a_ds3231_iic_write(handle, DS3231_REG_MONTH, a_ds3231_hex2bcd(t->month) | (century << 7)); /* write month and century */
+
344 if (res != 0) /* check result */
+
345 {
+
346 handle->debug_print("ds3231: write century and month failed.\n"); /* write century and month failed */
+
347
+
348 return 1; /* return error */
+
349 }
+
350 res = a_ds3231_iic_write(handle, DS3231_REG_YEAR, a_ds3231_hex2bcd((uint8_t)year)); /* write year */
+
351 if (res != 0) /* check result */
+
352 {
+
353 handle->debug_print("ds3231: write year failed.\n"); /* write year failed */
+
354
+
355 return 1; /* return error */
+
356 }
+
357
+
358 return 0; /* success return 0 */
+
359}
+
+
360
+
+ +
373{
+
374 uint8_t res;
+
375 uint8_t buf[7];
+
376
+
377 if (handle == NULL) /* check handle */
+
378 {
+
379 return 2; /* return error */
+
380 }
+
381 if (handle->inited != 1) /* check handle initialization */
+
382 {
+
383 return 3; /* return error */
+
384 }
+
385 if (t == NULL) /* check time */
+
386 {
+
387 handle->debug_print("ds3231: time is null.\n"); /* time is null */
+
388
+
389 return 2; /* return error */
+
390 }
+
391
+
392 memset(buf, 0, sizeof(uint8_t) * 7); /* clear the buffer */
+
393 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_SECOND, (uint8_t *)buf, 7); /* multiple_read */
+
394 if (res != 0) /* check result */
+
395 {
+
396 handle->debug_print("ds3231: multiple read failed.\n"); /* multiple read failed */
+
397
+
398 return 1; /* return error */
+
399 }
+
400 t->year = a_ds3231_bcd2hex(buf[6]) + 2000 + ((buf[5] >> 7) & 0x01) * 100; /* get year */
+
401 t->month = a_ds3231_bcd2hex(buf[5]&0x1F); /* get month */
+
402 t->week = a_ds3231_bcd2hex(buf[3]); /* get week */
+
403 t->date = a_ds3231_bcd2hex(buf[4]); /* get date */
+
404 t->am_pm = (ds3231_am_pm_t)((buf[2] >> 5) & 0x01); /* get am pm */
+
405 t->format = (ds3231_format_t)((buf[2] >> 6) & 0x01); /* get format */
+
406 if (t->format == DS3231_FORMAT_12H) /* if 12H */
+
407 {
+
408 t->hour = a_ds3231_bcd2hex(buf[2] & 0x1F); /* get hour */
+
409 }
+
410 else
+
411 {
+
412 t->hour = a_ds3231_bcd2hex(buf[2] & 0x3F); /* get hour */
+
413 }
+
414 t->minute = a_ds3231_bcd2hex(buf[1]); /* get minute */
+
415 t->second = a_ds3231_bcd2hex(buf[0]); /* get second */
+
416
+
417 return 0; /* success return 0 */
+
418}
+
+
419
+
+ +
433{
+
434 uint8_t res;
+
435 uint8_t reg;
+
436
+
437 if (handle == NULL) /* check handle */
+
438 {
+
439 return 2; /* return error */
+
440 }
+
441 if (handle->inited != 1) /* check handle initialization */
+
442 {
+
443 return 3; /* return error */
+
444 }
+
445 if (t == NULL) /* check time */
+
446 {
+
447 handle->debug_print("ds3231: time is null.\n"); /* time is null */
+
448
+
449 return 2; /* return error */
+
450 }
+
451 if (t->format == DS3231_FORMAT_12H) /* if 12H */
+
452 {
+
453 if ((t->week == 0) || (t->week > 7)) /* check week */
+
454 {
+
455 handle->debug_print("ds3231: week can't be zero or over than 7.\n"); /* week can't be zero or over than 7 */
+
456
+
457 return 1; /* return error */
+
458 }
+
459 if ((t->date == 0) || (t->date > 31)) /* check data */
+
460 {
+
461 handle->debug_print("ds3231: date can't be zero or over than 31.\n"); /* date can't be zero or over than 31 */
+
462
+
463 return 1; /* return error */
+
464 }
+
465 if ((t->hour < 1) || (t->hour > 12)) /* check hour */
+
466 {
+
467 handle->debug_print("ds3231: hour can't be over than 12 or less 1.\n"); /* hour can't be over than 12 or less 1 */
+
468
+
469 return 1; /* return error */
+
470 }
+
471 if (t->minute > 59) /* check minute */
+
472 {
+
473 handle->debug_print("ds3231: minute can't be over than 59.\n"); /* minute can't be over than 59 */
+
474
+
475 return 1; /* return error */
+
476 }
+
477 if (t->second > 59) /* check second */
+
478 {
+
479 handle->debug_print("ds3231: second can't be over than 59.\n"); /* second can't be over than 59 */
+
480
+
481 return 1; /* return error */
+
482 }
+
483 }
+
484 else if (t->format == DS3231_FORMAT_24H) /* if 24H */
+
485 {
+
486 if ((t->week == 0) || (t->week > 7)) /* check week */
+
487 {
+
488 handle->debug_print("ds3231: week can't be zero or over than 7.\n"); /* week can't be zero or over than 7 */
+
489
+
490 return 1; /* return error */
+
491 }
+
492 if ((t->date == 0) || (t->date > 31)) /* check data */
+
493 {
+
494 handle->debug_print("ds3231: date can't be zero or over than 31.\n"); /* date can't be zero or over than 31 */
+
495
+
496 return 1; /* return error */
+
497 }
+
498 if (t->hour > 23) /* check hour */
+
499 {
+
500 handle->debug_print("ds3231: hour can't be over than 23.\n"); /* hour can't be over than 23 */
+
501
+
502 return 1; /* return error */
+
503 }
+
504 if (t->minute > 59) /* check minute */
+
505 {
+
506 handle->debug_print("ds3231: minute can't be over than 59.\n"); /* minute can't be over than 59 */
+
507
+
508 return 1; /* return error */
+
509 }
+
510 if (t->second > 59) /* check second */
+
511 {
+
512 handle->debug_print("ds3231: second can't be over than 59.\n"); /* second can't be over than 59 */
+
513
+
514 return 1; /* return error */
+
515 }
+
516 }
+
517 else
+
518 {
+
519 handle->debug_print("ds3231: format is invalid.\n"); /* format is invalid */
+
520
+
521 return 1; /* return error */
+
522 }
+
523
+
524 res = a_ds3231_iic_write(handle, DS3231_REG_ALARM1_SECOND, a_ds3231_hex2bcd(t->second) | ((mode & 0x01) << 7)); /* write second */
+
525 if (res != 0) /* check result */
+
526 {
+
527 handle->debug_print("ds3231: write alarm1 second failed.\n"); /* write alarm1 second failed */
+
528
+
529 return 1; /* return error */
+
530 }
+
531 res = a_ds3231_iic_write(handle, DS3231_REG_ALARM1_MINUTE, a_ds3231_hex2bcd(t->minute) | (((mode >> 1) & 0x01) << 7)); /* write minute */
+
532 if (res != 0) /* check result */
+
533 {
+
534 handle->debug_print("ds3231: write alarm1 minute failed.\n"); /* write alarm1 minute failed */
+
535
+
536 return 1; /* return error */
+
537 }
+
538 if (t->format == DS3231_FORMAT_12H) /* if 12H */
+
539 {
+
540 reg = (uint8_t)((((mode >> 2) & 0x01) << 7) | (1 << 6) | (t->am_pm << 5) | a_ds3231_hex2bcd(t->hour)); /* set hour in 12H */
+
541 }
+
542 else /* if 24H */
+
543 {
+
544 reg = (((mode >> 2) & 0x01) << 7) | a_ds3231_hex2bcd(t->hour); /* set hour in 24H */
+
545 }
+
546 res = a_ds3231_iic_write(handle, DS3231_REG_ALARM1_HOUR, reg); /* write hour */
+
547 if (res != 0) /* check result */
+
548 {
+
549 handle->debug_print("ds3231: write alarm1 hour failed.\n"); /* write alarm1 hour failed */
+
550
+
551 return 1; /* return error */
+
552 }
+
553 if (mode >= DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH) /* if week */
+
554 {
+
555 reg = (((mode >> 3) & 0x01) << 7) | (1 << 6) | a_ds3231_hex2bcd(t->week); /* set data in week */
+
556 }
+
557 else /* if day */
+
558 {
+
559 reg = (((mode >> 3) & 0x01) << 7) | a_ds3231_hex2bcd(t->date); /* set data in date */
+
560 }
+
561 res = a_ds3231_iic_write(handle, DS3231_REG_ALARM1_WEEK, reg); /* write week */
+
562 if (res != 0) /* check result */
+
563 {
+
564 handle->debug_print("ds3231: write alarm1 week failed.\n"); /* write alarm1 week failed */
+
565
+
566 return 1; /* return error */
+
567 }
+
568
+
569 return 0; /* success return 0 */
+
570}
+
+
571
+
+ +
585{
+
586 uint8_t res;
+
587 uint8_t buf[4];
+
588
+
589 if (handle == NULL) /* check handle */
+
590 {
+
591 return 2; /* return error */
+
592 }
+
593 if (handle->inited != 1) /* check handle initialization */
+
594 {
+
595 return 3; /* return error */
+
596 }
+
597 if (t == NULL) /* check time */
+
598 {
+
599 handle->debug_print("ds3231: time is null.\n"); /* time is null */
+
600
+
601 return 2; /* return error */
+
602 }
+
603
+
604 memset(buf, 0, sizeof(uint8_t) * 4); /* clear the buffer */
+
605 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_ALARM1_SECOND, (uint8_t *)buf, 4); /* multiple_read */
+
606 if (res != 0) /* check result */
+
607 {
+
608 handle->debug_print("ds3231: multiple read failed.\n"); /* multiple read failed */
+
609
+
610 return 1; /* return error */
+
611 }
+
612 t->year = 0; /* get year */
+
613 t->month = 0; /* get month */
+
614 if (((buf[3] >> 6) & 0x01) != 0) /* if week */
+
615 {
+
616 t->week = a_ds3231_bcd2hex(buf[3] & 0x0F); /* get week */
+
617 t->date = 0; /* get data */
+
618 }
+
619 else /* if data */
+
620 {
+
621 t->week = 0; /* get week */
+
622 t->date = a_ds3231_bcd2hex(buf[3] & 0x3F); /* get data */
+
623 }
+
624 t->am_pm = (ds3231_am_pm_t)((buf[2] >> 5) & 0x01); /* get am pm */
+
625 t->format = (ds3231_format_t)((buf[2] >> 6) & 0x01); /* get format */
+
626 if (t->format == DS3231_FORMAT_12H) /* if 12H */
+
627 {
+
628 t->hour = a_ds3231_bcd2hex(buf[2]&0x1F); /* get hour */
+
629 }
+
630 else /* if 24H */
+
631 {
+
632 t->hour = a_ds3231_bcd2hex(buf[2]&0x3F); /* get hour */
+
633 }
+
634 t->minute = a_ds3231_bcd2hex(buf[1] & 0x7F); /* get minute */
+
635 t->second = a_ds3231_bcd2hex(buf[0] & 0x7F); /* get second */
+
636 *mode = (ds3231_alarm1_mode_t)(((buf[0]>>7)&0x01)<<0 | ((buf[1]>>7)&0x01)<<1 | ((buf[2]>>7)&0x01)<<2 | ((buf[3]>>7)&0x01)<<3 |
+
637 ((buf[3] >> 6)&0x01)<<4
+
638 ); /* get mode */
+
639
+
640 return 0; /* success return 0 */
+
641}
+
+
642
+
+ +
656{
+
657 uint8_t res;
+
658 uint8_t reg;
+
659
+
660 if (handle == NULL) /* check handle */
+
661 {
+
662 return 2; /* return error */
+
663 }
+
664 if (handle->inited != 1) /* check handle initialization */
+
665 {
+
666 return 3; /* return error */
+
667 }
+
668 if (t == NULL) /* check time */
+
669 {
+
670 handle->debug_print("ds3231: time is null.\n"); /* time is null */
+
671
+
672 return 2; /* return error */
+
673 }
+
674 if (t->format == DS3231_FORMAT_12H) /* if 12H */
+
675 {
+
676 if ((t->week == 0) || (t->week > 7)) /* check week */
+
677 {
+
678 handle->debug_print("ds3231: week can't be zero or over than 7.\n"); /* week can't be zero or over than 7 */
+
679
+
680 return 1; /* return error */
+
681 }
+
682 if ((t->date == 0) || (t->date > 31)) /* check data */
+
683 {
+
684 handle->debug_print("ds3231: date can't be zero or over than 31.\n"); /* date can't be zero or over than 31 */
+
685
+
686 return 1; /* return error */
+
687 }
+
688 if ((t->hour < 1) || (t->hour > 12)) /* check hour */
+
689 {
+
690 handle->debug_print("ds3231: hour can't be over than 12 or less 1.\n"); /* hour can't be over than 12 or less 1 */
+
691
+
692 return 1; /* return error */
+
693 }
+
694 if (t->minute > 59) /* check minute */
+
695 {
+
696 handle->debug_print("ds3231: minute can't be over than 59.\n"); /* minute can't be over than 59 */
+
697
+
698 return 1; /* return error */
+
699 }
+
700 }
+
701 else if (t->format == DS3231_FORMAT_24H) /* if 24H */
+
702 {
+
703 if ((t->week == 0) || (t->week > 7)) /* check week */
+
704 {
+
705 handle->debug_print("ds3231: week can't be zero or over than 7.\n"); /* week can't be zero or over than 7 */
+
706
+
707 return 1; /* return error */
+
708 }
+
709 if ((t->date == 0) || (t->date > 31)) /* check data */
+
710 {
+
711 handle->debug_print("ds3231: date can't be zero or over than 31.\n"); /* date can't be zero or over than 31 */
+
712
+
713 return 1; /* return error */
+
714 }
+
715 if (t->hour > 23) /* check hour */
+
716 {
+
717 handle->debug_print("ds3231: hour can't be over than 23.\n"); /* hour can't be over than 23 */
+
718
+
719 return 1; /* return error */
+
720 }
+
721 if (t->minute > 59) /* check minute */
+
722 {
+
723 handle->debug_print("ds3231: minute can't be over than 59.\n"); /* minute can't be over than 59 */
+
724
+
725 return 1; /* return error */
+
726 }
+
727 }
+
728 else
+
729 {
+
730 handle->debug_print("ds3231: format is invalid.\n"); /* format is invalid */
+
731
+
732 return 1; /* return error */
+
733 }
+
734
+
735 res = a_ds3231_iic_write(handle, DS3231_REG_ALARM2_MINUTE, a_ds3231_hex2bcd(t->minute) | (((mode >> 0) & 0x01) << 7)); /* write minute */
+
736 if (res != 0) /* check result */
+
737 {
+
738 handle->debug_print("ds3231: write alarm2 minute failed.\n"); /* write alarm2 minute failed */
+
739
+
740 return 1; /* return error */
+
741 }
+
742 if (t->format == DS3231_FORMAT_12H) /* if 12H */
+
743 {
+
744 reg = (uint8_t)((((mode >> 1) & 0x01) << 7) | (1 << 6) | (t->am_pm << 5) | a_ds3231_hex2bcd(t->hour)); /* set hour in 12H */
+
745 }
+
746 else /* if 24H */
+
747 {
+
748 reg = (((mode >> 1) & 0x01) << 7) | a_ds3231_hex2bcd(t->hour); /* set hour in 24H */
+
749 }
+
750 res = a_ds3231_iic_write(handle, DS3231_REG_ALARM2_HOUR, reg); /* write hour */
+
751 if (res != 0) /* check result */
+
752 {
+
753 handle->debug_print("ds3231: write alarm2 hour failed.\n"); /* write alarm2 hour failed */
+
754
+
755 return 1; /* return error */
+
756 }
+
757 if (mode >= (uint8_t)DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH) /* if week */
+
758 {
+
759 reg = (((mode >> 2) & 0x01) << 7) | (1 << 6) | a_ds3231_hex2bcd(t->week); /* set data in week */
+
760 }
+
761 else /* if day */
+
762 {
+
763 reg = (((mode >> 2) & 0x01) << 7) | a_ds3231_hex2bcd(t->date); /* set data in date */
+
764 }
+
765 res = a_ds3231_iic_write(handle, DS3231_REG_ALARM2_WEEK, reg); /* write week */
+
766 if (res != 0) /* check result */
+
767 {
+
768 handle->debug_print("ds3231: write alarm2 week failed.\n"); /* write alarm2 week failed */
+
769
+
770 return 1; /* return error */
+
771 }
+
772
+
773 return 0; /* success return 0 */
+
774}
+
+
775
+
+ +
789{
+
790 uint8_t res;
+
791 uint8_t buf[3];
+
792
+
793 if (handle == NULL) /* check handle */
+
794 {
+
795 return 2; /* return error */
+
796 }
+
797 if (handle->inited != 1) /* check handle initialization */
+
798 {
+
799 return 3; /* return error */
+
800 }
+
801 if (t == NULL) /* check time */
+
802 {
+
803 handle->debug_print("ds3231: time is null.\n"); /* time is null */
+
804
+
805 return 2; /* return error */
+
806 }
+
807
+
808 memset(buf, 0, sizeof(uint8_t) * 3); /* clear the buffer */
+
809 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_ALARM2_MINUTE, (uint8_t *)buf, 3); /* multiple read */
+
810 if (res != 0) /* check result */
+
811 {
+
812 handle->debug_print("ds3231: multiple read failed.\n"); /* multiple read failed */
+
813
+
814 return 1; /* return error */
+
815 }
+
816 t->year = 0; /* get year */
+
817 t->month = 0; /* get month */
+
818 if (((buf[2] >> 6) & 0x01) != 0) /* if week */
+
819 {
+
820 t->week = a_ds3231_bcd2hex(buf[2] & 0x0F); /* get week */
+
821 t->date = 0; /* get data */
+
822 }
+
823 else /* if data */
+
824 {
+
825 t->week = 0; /* get week */
+
826 t->date = a_ds3231_bcd2hex(buf[2] & 0x3F); /* get data */
+
827 }
+
828 t->am_pm = (ds3231_am_pm_t)((buf[1] >> 5) & 0x01); /* get am pm */
+
829 t->format = (ds3231_format_t)((buf[1] >> 6) & 0x01); /* get format */
+
830 if (t->format == DS3231_FORMAT_12H) /* if 12H */
+
831 {
+
832 t->hour = a_ds3231_bcd2hex(buf[1]&0x1F); /* get hour */
+
833 }
+
834 else /* if 24H */
+
835 {
+
836 t->hour = a_ds3231_bcd2hex(buf[1]&0x3F); /* get hour */
+
837 }
+
838 t->minute = a_ds3231_bcd2hex(buf[0] & 0x7F); /* get minute */
+
839 t->second = 0; /* get second */
+
840 *mode = (ds3231_alarm2_mode_t)(((buf[0]>>7)&0x01)<<0 | ((buf[1]>>7)&0x01)<<1 | ((buf[2]>>7)&0x01)<<2 | ((buf[2]>>6)&0x01)<<4); /* get mode */
+
841
+
842 return 0; /* success return 0 */
+
843}
+
+
844
+
+ +
857{
+
858 uint8_t res;
+
859 uint8_t prev;
+
860
+
861 if (handle == NULL) /* check handle */
+
862 {
+
863 return 2; /* return error */
+
864 }
+
865 if (handle->inited != 1) /* check handle initialization */
+
866 {
+
867 return 3; /* return error */
+
868 }
+
869
+
870 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple read */
+
871 if (res != 0) /* check result */
+
872 {
+
873 handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
+
874
+
875 return 1; /* return error */
+
876 }
+
877 prev &= ~ (1 << 7); /* clear config */
+
878 prev |= (!enable) << 7; /* set enable */
+
879 res = a_ds3231_iic_write(handle, DS3231_REG_CONTROL, prev); /* write control */
+
880 if (res != 0) /* check result */
+
881 {
+
882 handle->debug_print("ds3231: write control failed.\n"); /* write control failed */
+
883
+
884 return 1; /* return error */
+
885 }
+
886
+
887 return 0; /* success return 0 */
+
888}
+
+
889
+
+ +
902{
+
903 uint8_t res;
+
904 uint8_t prev;
+
905
+
906 if (handle == NULL) /* check handle */
+
907 {
+
908 return 2; /* return error */
+
909 }
+
910 if (handle->inited != 1) /* check handle initialization */
+
911 {
+
912 return 3; /* return error */
+
913 }
+
914
+
915 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple read */
+
916 if (res != 0) /* check result */
+
917 {
+
918 handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
+
919
+
920 return 1; /* return error */
+
921 }
+
922 *enable = (ds3231_bool_t)(!((prev >> 7) & 0x01)); /* get enable */
+
923
+
924 return 0; /* success return 0 */
+
925}
+
+
926
+
+ +
940{
+
941 uint8_t res;
+
942 uint8_t prev;
+
943
+
944 if (handle == NULL) /* check handle */
+
945 {
+
946 return 2; /* return error */
+
947 }
+
948 if (handle->inited != 1) /* check handle initialization */
+
949 {
+
950 return 3; /* return error */
+
951 }
+
952
+
953 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple_read */
+
954 if (res != 0) /* check result */
+
955 {
+
956 handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
+
957
+
958 return 1; /* return error */
+
959 }
+
960 prev &= ~(1 << alarm); /* clear config */
+
961 prev |= enable << alarm; /* set enable */
+
962 res = a_ds3231_iic_write(handle, DS3231_REG_CONTROL, prev); /* write control */
+
963 if (res != 0) /* check result */
+
964 {
+
965 handle->debug_print("ds3231: write control failed.\n"); /* write control failed */
+
966
+
967 return 1; /* return error */
+
968 }
+
969
+
970 return 0; /* success return 0 */
+
971}
+
+
972
+
+ +
986{
+
987 uint8_t res;
+
988 uint8_t prev;
+
989
+
990 if (handle == NULL) /* check handle */
+
991 {
+
992 return 2; /* return error */
+
993 }
+
994 if (handle->inited != 1) /* check handle initialization */
+
995 {
+
996 return 3; /* return error */
+
997 }
+
998
+
999 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple_read */
+
1000 if (res != 0) /* check result */
+
1001 {
+
1002 handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
+
1003
+
1004 return 1; /* return error */
+
1005 }
+
1006 *enable = (ds3231_bool_t)((prev >> alarm) & 0x01); /* get enable */
+
1007
+
1008 return 0; /* success return 0 */
+
1009}
+
+
1010
+
+ +
1023{
+
1024 uint8_t res;
+
1025 uint8_t prev;
+
1026
+
1027 if (handle == NULL) /* check handle */
+
1028 {
+
1029 return 2; /* return error */
+
1030 }
+
1031 if (handle->inited != 1) /* check handle initialization */
+
1032 {
+
1033 return 3; /* return error */
+
1034 }
+
1035
+
1036 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple_read */
+
1037 if (res != 0) /* check result */
+
1038 {
+
1039 handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
+
1040
+
1041 return 1; /* return error */
+
1042 }
+
1043 prev &= ~(1 << 2); /* clear config */
+
1044 prev |= pin << 2; /* set pin */
+
1045 res = a_ds3231_iic_write(handle, DS3231_REG_CONTROL, prev); /* write control */
+
1046 if (res != 0) /* check result */
+
1047 {
+
1048 handle->debug_print("ds3231: write control failed.\n"); /* write control failed */
+
1049
+
1050 return 1; /* return error */
+
1051 }
+
1052
+
1053 return 0; /* success return 0 */
+
1054}
+
+
1055
+
+ +
1068{
+
1069 uint8_t res;
+
1070 uint8_t prev;
+
1071
+
1072 if (handle == NULL) /* check handle */
+
1073 {
+
1074 return 2; /* return error */
+
1075 }
+
1076 if (handle->inited != 1) /* check handle initialization */
+
1077 {
+
1078 return 3; /* return error */
+
1079 }
+
1080
+
1081 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple_read */
+
1082 if (res != 0) /* check result */
+
1083 {
+
1084 handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
+
1085
+
1086 return 1; /* return error */
+
1087 }
+
1088 *pin = (ds3231_pin_t)((prev >> 2) & 0x01); /* get pin */
+
1089
+
1090 return 0; /* success return 0 */
+
1091}
+
+
1092
+
+ +
1105{
+
1106 uint8_t res;
+
1107 uint8_t prev;
+
1108
+
1109 if (handle == NULL) /* check handle */
+
1110 {
+
1111 return 2; /* return error */
+
1112 }
+
1113 if (handle->inited != 1) /* check handle initialization */
+
1114 {
+
1115 return 3; /* return error */
+
1116 }
+
1117
+
1118 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple_read */
+
1119 if (res != 0) /* check result */
+
1120 {
+
1121 handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
+
1122
+
1123 return 1; /* return error */
+
1124 }
+
1125 prev &= ~(1 << 6); /* clear config */
+
1126 prev |= enable << 6; /* set enable */
+
1127 res = a_ds3231_iic_write(handle, DS3231_REG_CONTROL, prev); /* write control */
+
1128 if (res != 0) /* check result */
+
1129 {
+
1130 handle->debug_print("ds3231: write control failed.\n"); /* write control failed */
+
1131
+
1132 return 1; /* return error */
+
1133 }
+
1134
+
1135 return 0; /* success return 0 */
+
1136}
+
+
1137
+
+ +
1150{
+
1151 uint8_t res;
+
1152 uint8_t prev;
+
1153
+
1154 if (handle == NULL) /* check handle */
+
1155 {
+
1156 return 2; /* return error */
+
1157 }
+
1158 if (handle->inited != 1) /* check handle initialization */
+
1159 {
+
1160 return 3; /* return error */
+
1161 }
+
1162
+
1163 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple_read */
+
1164 if (res != 0) /* check result */
+
1165 {
+
1166 handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
+
1167
+
1168 return 1; /* return error */
+
1169 }
+
1170 *enable = (ds3231_bool_t)((prev >> 6) & 0x01); /* get enable */
+
1171
+
1172 return 0; /* success return 0 */
+
1173}
+
+
1174
+
+
1187uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
+
1188{
+
1189 uint8_t res;
+
1190 uint8_t prev;
+
1191 uint32_t times;
+
1192 uint8_t buf[2];
+
1193
+
1194 if (handle == NULL) /* check handle */
+
1195 {
+
1196 return 2; /* return error */
+
1197 }
+
1198 if (handle->inited != 1) /* check handle initialization */
+
1199 {
+
1200 return 3; /* return error */
+
1201 }
+
1202
+
1203 memset(buf, 0, sizeof(uint8_t) * 2); /* clear the buffer */
+
1204 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_CONTROL, (uint8_t *)&prev, 1); /* multiple read */
+
1205 if (res != 0) /* check result */
+
1206 {
+
1207 handle->debug_print("ds3231: read control failed.\n"); /* read control failed */
+
1208
+
1209 return 1; /* return error */
+
1210 }
+
1211 prev &= ~(1 << 5); /* clear config */
+
1212 prev |= 1 << 5; /* set enable */
+
1213 res = a_ds3231_iic_write(handle, DS3231_REG_CONTROL, prev); /* write control */
+
1214 if (res != 0) /* check result */
+
1215 {
+
1216 handle->debug_print("ds3231: write control failed.\n"); /* write control failed */
+
1217
+
1218 return 1; /* return error */
+
1219 }
+
1220 times = 500; /* set 5s */
+
1221 while (times != 0) /* check times */
+
1222 {
+
1223 handle->delay_ms(10); /* delay 10 ms */
+
1224 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)&prev, 1); /* read status */
+
1225 if (res != 0) /* check result */
+
1226 {
+
1227 handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
+
1228
+
1229 return 1; /* return error */
+
1230 }
+
1231 if (((prev >> 2) & 0x01) == 0) /* check result */
+
1232 {
+
1233 break; /* break */
+
1234 }
+
1235 times--; /* times-- */
+
1236 }
+
1237 if (times == 0) /* if zero */
+
1238 {
+
1239 handle->debug_print("ds3231: read timeout.\n"); /* read timeout */
+
1240
+
1241 return 1; /* return error */
+
1242 }
+
1243 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_TEMPERATUREH, (uint8_t *)buf, 2); /* read temperature */
+
1244 if (res != 0) /* check result */
+
1245 {
+
1246 handle->debug_print("ds3231: read temperature failed.\n"); /* read temperature failed */
+
1247
+
1248 return 1; /* return error */
+
1249 }
+
1250 *raw = (int16_t)(((uint16_t)buf[0]) << 8) | buf[1]; /* set raw temperature */
+
1251 *raw = (*raw) >> 6; /* right shift */
+
1252 if (((*raw) & 0x0200) != 0) /* set negative value */
+
1253 {
+
1254 *raw = (*raw) | 0xFC00U; /* set negative part */
+
1255 }
+
1256 *s = (float)(*raw) * 0.25f; /* set converted temperature */
+
1257
+
1258 return 0; /* success return 0 */
+
1259}
+
+
1260
+
+
1272uint8_t ds3231_get_status(ds3231_handle_t *handle, uint8_t *status)
+
1273{
+
1274 uint8_t res;
+
1275
+
1276 if (handle == NULL) /* check handle */
+
1277 {
+
1278 return 2; /* return error */
+
1279 }
+
1280 if (handle->inited != 1) /* check handle initialization */
+
1281 {
+
1282 return 3; /* return error */
+
1283 }
+
1284
+
1285 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)status, 1); /* multiple read */
+
1286 if (res != 0) /* check result */
+
1287 {
+
1288 handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
+
1289
+
1290 return 1; /* return error */
+
1291 }
+
1292
+
1293 return 0; /* success return 0 */
+
1294}
+
+
1295
+
+
1307uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
+
1308{
+
1309 uint8_t res;
+
1310
+
1311 if (handle == NULL) /* check handle */
+
1312 {
+
1313 return 2; /* return error */
+
1314 }
+
1315 if (handle->inited != 1) /* check handle initialization */
+
1316 {
+
1317 return 3; /* return error */
+
1318 }
+
1319
+
1320 res = a_ds3231_iic_write(handle, DS3231_REG_XTAL, offset); /* write offset */
+
1321 if (res != 0) /* check result */
+
1322 {
+
1323 handle->debug_print("ds3231: write offset failed.\n"); /* write offset failed */
+
1324
+
1325 return 1; /* return error */
+
1326 }
+
1327
+
1328 return 0; /* success return 0 */
+
1329}
+
+
1330
+
+
1342uint8_t ds3231_get_aging_offset(ds3231_handle_t *handle, int8_t *offset)
+
1343{
+
1344 uint8_t res;
+
1345
+
1346 if (handle == NULL) /* check handle */
+
1347 {
+
1348 return 2; /* return error */
+
1349 }
+
1350 if (handle->inited != 1) /* check handle initialization */
+
1351 {
+
1352 return 3; /* return error */
+
1353 }
+
1354
+
1355 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_XTAL, (uint8_t *)offset, 1); /* read offset */
+
1356 if (res != 0) /* check result */
+
1357 {
+
1358 handle->debug_print("ds3231: read offset failed.\n"); /* read offset failed */
+
1359
+
1360 return 1; /* return error */
+
1361 }
+
1362
+
1363 return 0; /* success return 0 */
+
1364}
+
+
1365
+
+
1377uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
+
1378{
+
1379 if (handle == NULL) /* check handle */
+
1380 {
+
1381 return 2; /* return error */
+
1382 }
+
1383 if (handle->inited != 1) /* check handle initialization */
+
1384 {
+
1385 return 3; /* return error */
+
1386 }
+
1387
+
1388 *reg = (int8_t)(offset / 0.12f); /* convert real data to register data */
+
1389
+
1390 return 0; /* success return 0 */
+
1391}
+
+
1392
+
+
1404uint8_t ds3231_aging_offset_convert_to_data(ds3231_handle_t *handle, int8_t reg, float *offset)
+
1405{
+
1406 if (handle == NULL) /* check handle */
+
1407 {
+
1408 return 2; /* return error */
+
1409 }
+
1410 if (handle->inited != 1) /* check handle initialization */
+
1411 {
+
1412 return 3; /* return error */
+
1413 }
+
1414
+
1415 *offset = (float)(reg) * 0.12f; /* convert raw data to real data */
+
1416
+
1417 return 0; /* success return 0 */
+
1418}
+
+
1419
+
+ +
1431{
+
1432 uint8_t res, prev;
+
1433
+
1434 if (handle == NULL) /* check handle */
+
1435 {
+
1436 return 2; /* return error */
+
1437 }
+
1438 if (handle->inited != 1) /* check handle initialization */
+
1439 {
+
1440 return 3; /* return error */
+
1441 }
+
1442
+
1443 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)&prev, 1); /* multiple read */
+
1444 if (res != 0) /* check result */
+
1445 {
+
1446 handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
+
1447
+
1448 return 1; /* return error */
+
1449 } /* if oscillator stop */
+
1450 if ((prev & DS3231_STATUS_ALARM_2) != 0) /* if alarm 2 */
+
1451 {
+
1452 if (handle->receive_callback != NULL) /* if receive callback */
+
1453 {
+
1454 handle->receive_callback(DS3231_STATUS_ALARM_2); /* run callback */
+
1455 }
+
1456 }
+
1457 if ((prev & DS3231_STATUS_ALARM_1) != 0) /* if alarm 1 */
+
1458 {
+
1459 if (handle->receive_callback != NULL) /* if receive callback */
+
1460 {
+
1461 handle->receive_callback(DS3231_STATUS_ALARM_1); /* run callback */
+
1462 }
+
1463 }
+
1464
+
1465 return 0; /* success return 0 */
+
1466}
+
+
1467
+
+ +
1479{
+
1480 uint8_t res;
+
1481 uint8_t prev;
+
1482
+
1483 if (handle == NULL) /* check handle */
+
1484 {
+
1485 return 2; /* return error */
+
1486 }
+
1487 if (handle->debug_print == NULL) /* check debug_print */
+
1488 {
+
1489 return 3; /* return error */
+
1490 }
+
1491 if (handle->iic_init == NULL) /* check iic_init */
+
1492 {
+
1493 handle->debug_print("ds3231: iic_init is null.\n"); /* iic_init is null */
+
1494
+
1495 return 3; /* return error */
+
1496 }
+
1497 if (handle->iic_deinit == NULL) /* check iic_deinit */
+
1498 {
+
1499 handle->debug_print("ds3231: iic_deinit is null.\n"); /* iic_deinit is null */
+
1500
+
1501 return 3; /* return error */
+
1502 }
+
1503 if (handle->iic_write == NULL) /* check iic_write */
+
1504 {
+
1505 handle->debug_print("ds3231: iic_write is null.\n"); /* iic_write is null */
+
1506
+
1507 return 3; /* return error */
+
1508 }
+
1509 if (handle->iic_read == NULL) /* check iic_read */
+
1510 {
+
1511 handle->debug_print("ds3231: iic_read is null.\n"); /* iic_read is null */
+
1512
+
1513 return 3; /* return error */
+
1514 }
+
1515 if (handle->delay_ms == NULL) /* check delay_ms */
+
1516 {
+
1517 handle->debug_print("ds3231: delay_ms is null.\n"); /* delay_ms is null */
+
1518
+
1519 return 3; /* return error */
+
1520 }
+
1521 if (handle->receive_callback == NULL) /* check receive_callback */
+
1522 {
+
1523 handle->debug_print("ds3231: receive_callback is null.\n"); /* receive_callback is null */
+
1524
+
1525 return 3; /* return error */
+
1526 }
+
1527
+
1528 if (handle->iic_init() != 0) /* iic init */
+
1529 {
+
1530 handle->debug_print("ds3231: iic init failed.\n"); /* iic init failed */
+
1531
+
1532 return 1; /* return error */
+
1533 }
+
1534 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)&prev, 1); /* multiple_read */
+
1535 if (res != 0) /* check result */
+
1536 {
+
1537 handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
+
1538 (void)handle->iic_deinit(); /* iic deinit */
+
1539
+
1540 return 1; /* return error */
+
1541 }
+
1542 prev &= ~(1 << 7); /* clear config */
+
1543 res = a_ds3231_iic_write(handle, DS3231_REG_STATUS, prev); /* write status */
+
1544 if (res != 0) /* check result */
+
1545 {
+
1546 handle->debug_print("ds3231: write status failed.\n"); /* write status failed */
+
1547 (void)handle->iic_deinit(); /* iic deinit */
+
1548
+
1549 return 1; /* return error */
+
1550 }
+
1551 handle->inited = 1; /* flag finish initialization */
+
1552
+
1553 return 0; /* success return 0 */
+
1554}
+
+
1555
+
+ +
1567{
+
1568 if (handle == NULL) /* check handle */
+
1569 {
+
1570 return 2; /* return error */
+
1571 }
+
1572 if (handle->inited != 1) /* check handle initialization */
+
1573 {
+
1574 return 3; /* return error */
+
1575 }
+
1576
+
1577 if (handle->iic_deinit() != 0) /* iic deinit */
+
1578 {
+
1579 handle->debug_print("ds3231: iic deinit failed.\n"); /* iic deinit failed */
+
1580
+
1581 return 1; /* return error */
+
1582 }
+
1583 handle->inited = 0; /* flag close */
+
1584
+
1585 return 0; /* success return 0 */
+
1586}
+
+
1587
+
+ +
1600{
+
1601 uint8_t res;
+
1602 uint8_t prev;
+
1603
+
1604 if (handle == NULL) /* check handle */
+
1605 {
+
1606 return 2; /* return error */
+
1607 }
+
1608 if (handle->inited != 1) /* check handle initialization */
+
1609 {
+
1610 return 3; /* return error */
+
1611 }
+
1612
+
1613 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)&prev, 1); /* multiple_read */
+
1614 if (res != 0) /* check result */
+
1615 {
+
1616 handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
+
1617
+
1618 return 1; /* return error */
+
1619 }
+
1620 prev &= ~(1 << alarm); /* clear config */
+
1621 res = a_ds3231_iic_write(handle, DS3231_REG_STATUS, prev); /* write status */
+
1622 if (res != 0) /* check result */
+
1623 {
+
1624 handle->debug_print("ds3231: write status failed.\n"); /* write status failed */
+
1625
+
1626 return 1; /* return error */
+
1627 }
+
1628
+
1629 return 0; /* success return 0 */
+
1630}
+
+
1631
+
+ +
1644{
+
1645 uint8_t res;
+
1646 uint8_t prev;
+
1647
+
1648 if (handle == NULL) /* check handle */
+
1649 {
+
1650 return 2; /* return error */
+
1651 }
+
1652 if (handle->inited != 1) /* check handle initialization */
+
1653 {
+
1654 return 3; /* return error */
+
1655 }
+
1656
+
1657 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)&prev, 1); /* multiple read */
+
1658 if (res != 0) /* check result */
+
1659 {
+
1660 handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
+
1661
+
1662 return 1; /* return error */
+
1663 }
+
1664 prev &= ~(1 << 3); /* clear config */
+
1665 prev |= enable << 3; /* set enable */
+
1666 res = a_ds3231_iic_write(handle, DS3231_REG_STATUS, prev); /* write status */
+
1667 if (res != 0) /* check result */
+
1668 {
+
1669 handle->debug_print("ds3231: write status failed.\n"); /* write status failed */
+
1670
+
1671 return 1; /* return error */
+
1672 }
+
1673
+
1674 return 0; /* success return 0 */
+
1675}
+
+
1676
+
+ +
1689{
+
1690 uint8_t res;
+
1691 uint8_t prev;
+
1692
+
1693 if (handle == NULL) /* check handle */
+
1694 {
+
1695 return 2; /* return error */
+
1696 }
+
1697 if (handle->inited != 1) /* check handle initialization */
+
1698 {
+
1699 return 3; /* return error */
+
1700 }
+
1701
+
1702 res = a_ds3231_iic_multiple_read(handle, DS3231_REG_STATUS, (uint8_t *)&prev, 1); /* multiple read */
+
1703 if (res != 0) /* check result */
+
1704 {
+
1705 handle->debug_print("ds3231: read status failed.\n"); /* read status failed */
+
1706
+
1707 return 1; /* return error */
+
1708 }
+
1709 *enable = (ds3231_bool_t)((prev >> 3) & 0x01); /* get enable */
+
1710
+
1711 return 0; /* success return 0 */
+
1712}
+
+
1713
+
+
1727uint8_t ds3231_set_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
+
1728{
+
1729 if (handle == NULL) /* check handle */
+
1730 {
+
1731 return 2; /* return error */
+
1732 }
+
1733 if (handle->inited != 1) /* check handle initialization */
+
1734 {
+
1735 return 3; /* return error */
+
1736 }
+
1737
+
1738 if (handle->iic_write(DS3231_ADDRESS, reg, buf, len) != 0) /* write data */
+
1739 {
+
1740 return 1; /* return error */
+
1741 }
+
1742 else
+
1743 {
+
1744 return 0; /* success return 0 */
+
1745 }
+
1746}
+
+
1747
+
+
1761uint8_t ds3231_get_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
+
1762{
+
1763 if (handle == NULL) /* check handle */
+
1764 {
+
1765 return 2; /* return error */
+
1766 }
+
1767 if (handle->inited != 1) /* check handle initialization */
+
1768 {
+
1769 return 3; /* return error */
+
1770 }
+
1771
+
1772 if (handle->iic_read(DS3231_ADDRESS, reg, buf, len) != 0) /* read data */
+
1773 {
+
1774 return 1; /* return error */
+
1775 }
+
1776 else
+
1777 {
+
1778 return 0; /* success return 0 */
+
1779 }
+
1780}
+
+
1781
+
+ +
1791{
+
1792 if (info == NULL) /* check handle */
+
1793 {
+
1794 return 2; /* return error */
+
1795 }
+
1796
+
1797 memset(info, 0, sizeof(ds3231_info_t)); /* initialize ds3231 info structure */
+
1798 strncpy(info->chip_name, CHIP_NAME, 32); /* copy chip name */
+
1799 strncpy(info->manufacturer_name, MANUFACTURER_NAME, 32); /* copy manufacturer name */
+
1800 strncpy(info->interface, "IIC", 8); /* copy interface name */
+
1801 info->supply_voltage_min_v = SUPPLY_VOLTAGE_MIN; /* set minimal supply voltage */
+
1802 info->supply_voltage_max_v = SUPPLY_VOLTAGE_MAX; /* set maximum supply voltage */
+
1803 info->max_current_ma = MAX_CURRENT; /* set maximum current */
+
1804 info->temperature_max = TEMPERATURE_MAX; /* set minimal temperature */
+
1805 info->temperature_min = TEMPERATURE_MIN; /* set maximum temperature */
+
1806 info->driver_version = DRIVER_VERSION; /* set driver version */
+
1807
+
1808 return 0; /* success return 0 */
+
1809}
+
+
#define DS3231_REG_MINUTE
+
#define DS3231_REG_YEAR
+
#define DS3231_REG_CONTROL
+
#define MAX_CURRENT
+
#define DS3231_REG_DATE
+
#define DS3231_REG_ALARM2_MINUTE
+
#define DS3231_REG_XTAL
+
#define DS3231_REG_ALARM2_WEEK
+
#define SUPPLY_VOLTAGE_MAX
+
#define DS3231_REG_HOUR
+
#define DS3231_ADDRESS
chip address definition
+
#define DS3231_REG_ALARM1_MINUTE
+
#define DS3231_REG_ALARM2_HOUR
+
#define TEMPERATURE_MAX
+
#define DS3231_REG_SECOND
chip register definition
+
#define MANUFACTURER_NAME
+
#define DS3231_REG_MONTH
+
#define TEMPERATURE_MIN
+
#define SUPPLY_VOLTAGE_MIN
+
#define DS3231_REG_ALARM1_HOUR
+
#define DS3231_REG_ALARM1_SECOND
+
#define DS3231_REG_TEMPERATUREH
+
#define DS3231_REG_ALARM1_WEEK
+
#define CHIP_NAME
chip information definition
+
#define DRIVER_VERSION
+
#define DS3231_REG_STATUS
+
#define DS3231_REG_WEEK
driver ds3231 header file
-
uint8_t ds3231_get_32khz_output(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the 32KHz output status
-
uint8_t ds3231_get_pin(ds3231_handle_t *handle, ds3231_pin_t *pin)
get the chip pin function
-
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
-
uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
get the chip temperature
-
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
-
uint8_t ds3231_aging_offset_convert_to_data(ds3231_handle_t *handle, int8_t reg, float *offset)
convert a register raw data to a converted aging offset data
-
uint8_t ds3231_get_aging_offset(ds3231_handle_t *handle, int8_t *offset)
get the chip aging offset
-
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
-
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
-
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
-
uint8_t ds3231_get_square_wave(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the square wave output status
-
uint8_t ds3231_get_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t *enable)
get the alarm interrupt status
-
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
-
ds3231_alarm2_mode_t
ds3231 alarm2 enumeration definition
-
uint8_t ds3231_get_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
get the alarm1 time
-
ds3231_alarm1_mode_t
ds3231 alarm1 enumeration definition
-
uint8_t ds3231_set_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
set the alarm2 time
-
uint8_t ds3231_alarm_clear(ds3231_handle_t *handle, ds3231_alarm_t alarm)
clear the alarm flag
-
uint8_t ds3231_set_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
set the alarm1 time
-
uint8_t ds3231_get_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
get the alarm2 time
-
@ DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH
-
ds3231_am_pm_t
ds3231 am pm enumeration definition
Definition: driver_ds3231.h:82
-
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
-
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
-
uint8_t ds3231_get_oscillator(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the chip oscillator status
-
ds3231_alarm_t
ds3231 alarm enumeration definition
Definition: driver_ds3231.h:73
-
ds3231_format_t
ds3231 format enumeration definition
-
ds3231_pin_t
ds3231 pin enumeration definition
Definition: driver_ds3231.h:91
-
uint8_t ds3231_info(ds3231_info_t *info)
get chip's information
-
uint8_t ds3231_irq_handler(ds3231_handle_t *handle)
irq handler
-
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
-
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
-
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
-
ds3231_bool_t
ds3231 bool enumeration definition
Definition: driver_ds3231.h:64
-
uint8_t ds3231_get_status(ds3231_handle_t *handle, uint8_t *status)
get the chip status
-
@ DS3231_FORMAT_24H
-
@ DS3231_FORMAT_12H
-
@ DS3231_STATUS_ALARM_1
-
@ DS3231_STATUS_ALARM_2
-
uint8_t ds3231_set_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
set the chip register
-
uint8_t ds3231_get_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
get the chip register
-
ds3231 handle structure definition
- -
void(* delay_ms)(uint32_t ms)
-
void(* receive_callback)(uint8_t type)
-
void(* debug_print)(const char *const fmt,...)
-
uint8_t(* iic_init)(void)
-
uint8_t(* iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
-
uint8_t(* iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
-
uint8_t(* iic_deinit)(void)
-
ds3231 information structure definition
-
float temperature_max
-
float supply_voltage_max_v
-
uint32_t driver_version
-
float temperature_min
-
float max_current_ma
-
char manufacturer_name[32]
-
float supply_voltage_min_v
-
char interface[8]
-
char chip_name[32]
-
ds3231 time structure definition
- - -
ds3231_am_pm_t am_pm
- - -
ds3231_format_t format
- - - +
uint8_t ds3231_get_32khz_output(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the 32KHz output status
+
uint8_t ds3231_get_pin(ds3231_handle_t *handle, ds3231_pin_t *pin)
get the chip pin function
+
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
+
uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
get the chip temperature
+
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
+
uint8_t ds3231_aging_offset_convert_to_data(ds3231_handle_t *handle, int8_t reg, float *offset)
convert a register raw data to a converted aging offset data
+
uint8_t ds3231_get_aging_offset(ds3231_handle_t *handle, int8_t *offset)
get the chip aging offset
+
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
+
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
+
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
+
uint8_t ds3231_get_square_wave(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the square wave output status
+
uint8_t ds3231_get_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t *enable)
get the alarm interrupt status
+
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
+
ds3231_alarm2_mode_t
ds3231 alarm2 enumeration definition
+
uint8_t ds3231_get_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
get the alarm1 time
+
ds3231_alarm1_mode_t
ds3231 alarm1 enumeration definition
+
uint8_t ds3231_set_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
set the alarm2 time
+
uint8_t ds3231_alarm_clear(ds3231_handle_t *handle, ds3231_alarm_t alarm)
clear the alarm flag
+
uint8_t ds3231_set_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
set the alarm1 time
+
uint8_t ds3231_get_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
get the alarm2 time
+
@ DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH
+
ds3231_am_pm_t
ds3231 am pm enumeration definition
+
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
+
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
+
uint8_t ds3231_get_oscillator(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the chip oscillator status
+
struct ds3231_time_s ds3231_time_t
ds3231 time structure definition
+
ds3231_alarm_t
ds3231 alarm enumeration definition
+
ds3231_format_t
ds3231 format enumeration definition
+
ds3231_pin_t
ds3231 pin enumeration definition
+
uint8_t ds3231_info(ds3231_info_t *info)
get chip's information
+
uint8_t ds3231_irq_handler(ds3231_handle_t *handle)
irq handler
+
struct ds3231_handle_s ds3231_handle_t
ds3231 handle structure definition
+
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
+
struct ds3231_info_s ds3231_info_t
ds3231 information structure definition
+
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
+
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
+
ds3231_bool_t
ds3231 bool enumeration definition
+
uint8_t ds3231_get_status(ds3231_handle_t *handle, uint8_t *status)
get the chip status
+
@ DS3231_FORMAT_24H
+
@ DS3231_FORMAT_12H
+
@ DS3231_STATUS_ALARM_1
+
@ DS3231_STATUS_ALARM_2
+
uint8_t ds3231_set_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
set the chip register
+
uint8_t ds3231_get_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
get the chip register
+ +
void(* delay_ms)(uint32_t ms)
+
void(* receive_callback)(uint8_t type)
+
void(* debug_print)(const char *const fmt,...)
+
uint8_t(* iic_init)(void)
+
uint8_t(* iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
+
uint8_t(* iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
+
uint8_t(* iic_deinit)(void)
+ +
float supply_voltage_max_v
+
uint32_t driver_version
+ + +
char manufacturer_name[32]
+
float supply_voltage_min_v
+ +
char chip_name[32]
+ + +
ds3231_am_pm_t am_pm
+ + +
ds3231_format_t format
+ + +
+
diff --git a/doc/html/driver__ds3231_8h.html b/doc/html/driver__ds3231_8h.html index e6f8a2b..1c68cc5 100644 --- a/doc/html/driver__ds3231_8h.html +++ b/doc/html/driver__ds3231_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: src/driver_ds3231.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231.h File Reference
+
driver_ds3231.h File Reference
@@ -100,93 +100,83 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
+
+Include dependency graph for driver_ds3231.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+

Go to the source code of this file.

- - + - - + - - + -

+

Data Structures

struct  ds3231_time_s
struct  ds3231_time_s
 ds3231 time structure definition More...
 
struct  ds3231_handle_s
struct  ds3231_handle_s
 ds3231 handle structure definition More...
 
struct  ds3231_info_s
struct  ds3231_info_s
 ds3231 information structure definition More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +

+

Macros

#define DRIVER_DS3231_LINK_INIT(HANDLE, STRUCTURE)   memset(HANDLE, 0, sizeof(STRUCTURE))
 initialize ds3231_handle_t structure More...
 
#define DRIVER_DS3231_LINK_IIC_INIT(HANDLE, FUC)   (HANDLE)->iic_init = FUC
 link iic_init function More...
 
#define DRIVER_DS3231_LINK_IIC_DEINIT(HANDLE, FUC)   (HANDLE)->iic_deinit = FUC
 link iic_deinit function More...
 
#define DRIVER_DS3231_LINK_IIC_READ(HANDLE, FUC)   (HANDLE)->iic_read = FUC
 link iic_read function More...
 
#define DRIVER_DS3231_LINK_IIC_WRITE(HANDLE, FUC)   (HANDLE)->iic_write = FUC
 link iic_write function More...
 
#define DRIVER_DS3231_LINK_DELAY_MS(HANDLE, FUC)   (HANDLE)->delay_ms = FUC
 link delay_ms function More...
 
#define DRIVER_DS3231_LINK_DEBUG_PRINT(HANDLE, FUC)   (HANDLE)->debug_print = FUC
 link debug_print function More...
 
#define DRIVER_DS3231_LINK_RECEIVE_CALLBACK(HANDLE, FUC)   (HANDLE)->receive_callback = FUC
 link receive_callback function More...
 
#define DRIVER_DS3231_LINK_INIT(HANDLE, STRUCTURE)
 initialize ds3231_handle_t structure
#define DRIVER_DS3231_LINK_IIC_INIT(HANDLE, FUC)
 link iic_init function
#define DRIVER_DS3231_LINK_IIC_DEINIT(HANDLE, FUC)
 link iic_deinit function
#define DRIVER_DS3231_LINK_IIC_READ(HANDLE, FUC)
 link iic_read function
#define DRIVER_DS3231_LINK_IIC_WRITE(HANDLE, FUC)
 link iic_write function
#define DRIVER_DS3231_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_DS3231_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function
#define DRIVER_DS3231_LINK_RECEIVE_CALLBACK(HANDLE, FUC)
 link receive_callback function
- - - - - - - - - - + + + + + +

+

Typedefs

typedef struct ds3231_time_s ds3231_time_t
 ds3231 time structure definition More...
 
typedef struct ds3231_handle_s ds3231_handle_t
 ds3231 handle structure definition More...
 
typedef struct ds3231_info_s ds3231_info_t
 ds3231 information structure definition More...
 
typedef struct ds3231_time_s ds3231_time_t
 ds3231 time structure definition
typedef struct ds3231_handle_s ds3231_handle_t
 ds3231 handle structure definition
typedef struct ds3231_info_s ds3231_info_t
 ds3231 information structure definition
- - - - - - - - - - - - - - - - -

+

Enumerations

enum  ds3231_bool_t { DS3231_BOOL_FALSE = 0x00 +
enum  ds3231_bool_t { DS3231_BOOL_FALSE = 0x00 , DS3231_BOOL_TRUE = 0x01 }
 ds3231 bool enumeration definition More...
 
enum  ds3231_alarm_t { DS3231_ALARM_1 = 0x00 +
enum  ds3231_alarm_t { DS3231_ALARM_1 = 0x00 , DS3231_ALARM_2 = 0x01 }
 ds3231 alarm enumeration definition More...
 
enum  ds3231_am_pm_t { DS3231_AM = 0x00 +
enum  ds3231_am_pm_t { DS3231_AM = 0x00 , DS3231_PM = 0x01 }
 ds3231 am pm enumeration definition More...
 
enum  ds3231_pin_t { DS3231_PIN_SQUARE_WAVE = 0x00 +
enum  ds3231_pin_t { DS3231_PIN_SQUARE_WAVE = 0x00 , DS3231_PIN_INTERRUPT = 0x01 }
 ds3231 pin enumeration definition More...
 
enum  ds3231_format_t { DS3231_FORMAT_12H = 0x01 +
enum  ds3231_format_t { DS3231_FORMAT_12H = 0x01 , DS3231_FORMAT_24H = 0x00 }
 ds3231 format enumeration definition More...
 
enum  ds3231_status_t { DS3231_STATUS_ALARM_2 = (1 << 1) +
enum  ds3231_status_t { DS3231_STATUS_ALARM_2 = (1 << 1) , DS3231_STATUS_ALARM_1 = (1 << 0) }
 ds3231 alarm1 enumeration definition More...
 
enum  ds3231_alarm1_mode_t {
+
enum  ds3231_alarm1_mode_t {
  DS3231_ALARM1_MODE_ONCE_A_SECOND = 0x0F , DS3231_ALARM1_MODE_SECOND_MATCH = 0x0E , DS3231_ALARM1_MODE_MINUTE_SECOND_MATCH = 0x0C @@ -197,8 +187,7 @@
}
 ds3231 alarm1 enumeration definition More...
 
enum  ds3231_alarm2_mode_t {
+
enum  ds3231_alarm2_mode_t {
  DS3231_ALARM2_MODE_ONCE_A_MINUTE = 0x07 , DS3231_ALARM2_MODE_MINUTE_MATCH = 0x06 , DS3231_ALARM2_MODE_HOUR_MINUTE_MATCH = 0x04 @@ -208,99 +197,69 @@
}
 ds3231 alarm2 enumeration definition More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_info (ds3231_info_t *info)
 get chip's information More...
 
uint8_t ds3231_init (ds3231_handle_t *handle)
 initialize the chip More...
 
uint8_t ds3231_deinit (ds3231_handle_t *handle)
 close the chip More...
 
uint8_t ds3231_irq_handler (ds3231_handle_t *handle)
 irq handler More...
 
uint8_t ds3231_set_time (ds3231_handle_t *handle, ds3231_time_t *t)
 set the current time More...
 
uint8_t ds3231_get_time (ds3231_handle_t *handle, ds3231_time_t *t)
 get the current time More...
 
uint8_t ds3231_set_oscillator (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the oscillator More...
 
uint8_t ds3231_get_oscillator (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the chip oscillator status More...
 
uint8_t ds3231_get_status (ds3231_handle_t *handle, uint8_t *status)
 get the chip status More...
 
uint8_t ds3231_set_pin (ds3231_handle_t *handle, ds3231_pin_t pin)
 set the chip pin function More...
 
uint8_t ds3231_get_pin (ds3231_handle_t *handle, ds3231_pin_t *pin)
 get the chip pin function More...
 
uint8_t ds3231_set_square_wave (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the square wave output More...
 
uint8_t ds3231_get_square_wave (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the square wave output status More...
 
uint8_t ds3231_set_32khz_output (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the 32KHz output More...
 
uint8_t ds3231_get_32khz_output (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the 32KHz output status More...
 
uint8_t ds3231_get_temperature (ds3231_handle_t *handle, int16_t *raw, float *s)
 get the chip temperature More...
 
uint8_t ds3231_set_aging_offset (ds3231_handle_t *handle, int8_t offset)
 set the chip aging offset More...
 
uint8_t ds3231_get_aging_offset (ds3231_handle_t *handle, int8_t *offset)
 get the chip aging offset More...
 
uint8_t ds3231_aging_offset_convert_to_register (ds3231_handle_t *handle, float offset, int8_t *reg)
 convert a aging offset value to a register raw data More...
 
uint8_t ds3231_aging_offset_convert_to_data (ds3231_handle_t *handle, int8_t reg, float *offset)
 convert a register raw data to a converted aging offset data More...
 
uint8_t ds3231_set_alarm_interrupt (ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
 enable or disable the alarm interrupt More...
 
uint8_t ds3231_get_alarm_interrupt (ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t *enable)
 get the alarm interrupt status More...
 
uint8_t ds3231_set_alarm1 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
 set the alarm1 time More...
 
uint8_t ds3231_get_alarm1 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
 get the alarm1 time More...
 
uint8_t ds3231_set_alarm2 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
 set the alarm2 time More...
 
uint8_t ds3231_get_alarm2 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
 get the alarm2 time More...
 
uint8_t ds3231_alarm_clear (ds3231_handle_t *handle, ds3231_alarm_t alarm)
 clear the alarm flag More...
 
uint8_t ds3231_set_reg (ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 set the chip register More...
 
uint8_t ds3231_get_reg (ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 get the chip register More...
 
uint8_t ds3231_info (ds3231_info_t *info)
 get chip's information
uint8_t ds3231_init (ds3231_handle_t *handle)
 initialize the chip
uint8_t ds3231_deinit (ds3231_handle_t *handle)
 close the chip
uint8_t ds3231_irq_handler (ds3231_handle_t *handle)
 irq handler
uint8_t ds3231_set_time (ds3231_handle_t *handle, ds3231_time_t *t)
 set the current time
uint8_t ds3231_get_time (ds3231_handle_t *handle, ds3231_time_t *t)
 get the current time
uint8_t ds3231_set_oscillator (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the oscillator
uint8_t ds3231_get_oscillator (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the chip oscillator status
uint8_t ds3231_get_status (ds3231_handle_t *handle, uint8_t *status)
 get the chip status
uint8_t ds3231_set_pin (ds3231_handle_t *handle, ds3231_pin_t pin)
 set the chip pin function
uint8_t ds3231_get_pin (ds3231_handle_t *handle, ds3231_pin_t *pin)
 get the chip pin function
uint8_t ds3231_set_square_wave (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the square wave output
uint8_t ds3231_get_square_wave (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the square wave output status
uint8_t ds3231_set_32khz_output (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the 32KHz output
uint8_t ds3231_get_32khz_output (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the 32KHz output status
uint8_t ds3231_get_temperature (ds3231_handle_t *handle, int16_t *raw, float *s)
 get the chip temperature
uint8_t ds3231_set_aging_offset (ds3231_handle_t *handle, int8_t offset)
 set the chip aging offset
uint8_t ds3231_get_aging_offset (ds3231_handle_t *handle, int8_t *offset)
 get the chip aging offset
uint8_t ds3231_aging_offset_convert_to_register (ds3231_handle_t *handle, float offset, int8_t *reg)
 convert a aging offset value to a register raw data
uint8_t ds3231_aging_offset_convert_to_data (ds3231_handle_t *handle, int8_t reg, float *offset)
 convert a register raw data to a converted aging offset data
uint8_t ds3231_set_alarm_interrupt (ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
 enable or disable the alarm interrupt
uint8_t ds3231_get_alarm_interrupt (ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t *enable)
 get the alarm interrupt status
uint8_t ds3231_set_alarm1 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
 set the alarm1 time
uint8_t ds3231_get_alarm1 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
 get the alarm1 time
uint8_t ds3231_set_alarm2 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
 set the alarm2 time
uint8_t ds3231_get_alarm2 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
 get the alarm2 time
uint8_t ds3231_alarm_clear (ds3231_handle_t *handle, ds3231_alarm_t alarm)
 clear the alarm flag
uint8_t ds3231_set_reg (ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 set the chip register
uint8_t ds3231_get_reg (ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 get the chip register
-

Detailed Description

+

Detailed Description

driver ds3231 header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -323,11 +282,19 @@

history

Definition in file driver_ds3231.h.

+ +
diff --git a/doc/html/driver__ds3231_8h__dep__incl.md5 b/doc/html/driver__ds3231_8h__dep__incl.md5 new file mode 100644 index 0000000..95fb232 --- /dev/null +++ b/doc/html/driver__ds3231_8h__dep__incl.md5 @@ -0,0 +1 @@ +dc4b0e3ed32f698fb05b45675416f337 \ No newline at end of file diff --git a/doc/html/driver__ds3231_8h__dep__incl.svg b/doc/html/driver__ds3231_8h__dep__incl.svg new file mode 100644 index 0000000..4096694 --- /dev/null +++ b/doc/html/driver__ds3231_8h__dep__incl.svg @@ -0,0 +1,343 @@ + + + + + + +src/driver_ds3231.h + + +Node1 + + +src/driver_ds3231.h + + + + + +Node2 + + +interface/driver_ds3231 +_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node18 + + +src/driver_ds3231.c + + + + + +Node1->Node18 + + + + + + + + +Node3 + + +example/driver_ds3231 +_alarm.h + + + + + +Node2->Node3 + + + + + + + + +Node5 + + +example/driver_ds3231 +_basic.h + + + + + +Node2->Node5 + + + + + + + + +Node7 + + +example/driver_ds3231 +_output.h + + + + + +Node2->Node7 + + + + + + + + +Node9 + + +interface/driver_ds3231 +_interface_template.c + + + + + +Node2->Node9 + + + + + + + + +Node10 + + +test/driver_ds3231 +_alarm_test.h + + + + + +Node2->Node10 + + + + + + + + +Node12 + + +test/driver_ds3231 +_output_test.h + + + + + +Node2->Node12 + + + + + + + + +Node14 + + +test/driver_ds3231 +_readwrite_test.h + + + + + +Node2->Node14 + + + + + + + + +Node16 + + +test/driver_ds3231 +_register_test.h + + + + + +Node2->Node16 + + + + + + + + +Node4 + + +example/driver_ds3231 +_alarm.c + + + + + +Node3->Node4 + + + + + + + + +Node6 + + +example/driver_ds3231 +_basic.c + + + + + +Node5->Node6 + + + + + + + + +Node8 + + +example/driver_ds3231 +_output.c + + + + + +Node7->Node8 + + + + + + + + +Node11 + + +test/driver_ds3231 +_alarm_test.c + + + + + +Node10->Node11 + + + + + + + + +Node13 + + +test/driver_ds3231 +_output_test.c + + + + + +Node12->Node13 + + + + + + + + +Node15 + + +test/driver_ds3231 +_readwrite_test.c + + + + + +Node14->Node15 + + + + + + + + +Node17 + + +test/driver_ds3231 +_register_test.c + + + + + +Node16->Node17 + + + + + + + + diff --git a/doc/html/driver__ds3231_8h__incl.md5 b/doc/html/driver__ds3231_8h__incl.md5 new file mode 100644 index 0000000..ddce016 --- /dev/null +++ b/doc/html/driver__ds3231_8h__incl.md5 @@ -0,0 +1 @@ +2fa681ff33b2c8c3495269ddcc495a82 \ No newline at end of file diff --git a/doc/html/driver__ds3231_8h__incl.svg b/doc/html/driver__ds3231_8h__incl.svg new file mode 100644 index 0000000..ec83116 --- /dev/null +++ b/doc/html/driver__ds3231_8h__incl.svg @@ -0,0 +1,75 @@ + + + + + + +src/driver_ds3231.h + + +Node1 + + +src/driver_ds3231.h + + + + + +Node2 + + +stdio.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +stdint.h + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +string.h + + + + + +Node1->Node4 + + + + + + + + diff --git a/doc/html/driver__ds3231_8h_source.html b/doc/html/driver__ds3231_8h_source.html index 16ab016..6d01e79 100644 --- a/doc/html/driver__ds3231_8h_source.html +++ b/doc/html/driver__ds3231_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: src/driver_ds3231.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231.h
+
driver_ds3231.h
-Go to the documentation of this file.
1 
-
38 #ifndef DRIVER_DS3231_H
-
39 #define DRIVER_DS3231_H
-
40 
-
41 #include <stdio.h>
-
42 #include <stdint.h>
-
43 #include <string.h>
-
44 
-
45 #ifdef __cplusplus
-
46 extern "C"{
-
47 #endif
-
48 
-
63 typedef enum
-
64 {
- - - -
68 
-
72 typedef enum
-
73 {
-
74  DS3231_ALARM_1 = 0x00,
-
75  DS3231_ALARM_2 = 0x01,
- -
77 
-
81 typedef enum
-
82 {
-
83  DS3231_AM = 0x00,
-
84  DS3231_PM = 0x01,
- -
86 
-
90 typedef enum
-
91 {
- - -
94 } ds3231_pin_t;
-
95 
-
99 typedef enum
-
100 {
- - - -
104 
-
108 typedef enum
-
109 {
- - - -
113 
-
126 typedef enum
-
127 {
- - - - - - - -
135 
-
139 typedef enum
-
140 {
- - - - - - -
147 
-
160 typedef struct ds3231_time_s
-
161 {
-
162  uint16_t year;
-
163  uint8_t month;
-
164  uint8_t week;
-
165  uint8_t date;
-
166  uint8_t hour;
-
167  uint8_t minute;
-
168  uint8_t second;
- - - -
172 
-
176 typedef struct ds3231_handle_s
-
177 {
-
178  uint8_t (*iic_init)(void);
-
179  uint8_t (*iic_deinit)(void);
-
180  uint8_t (*iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
-
181  uint8_t (*iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
-
182  void (*debug_print)(const char *const fmt, ...);
-
183  void (*receive_callback)(uint8_t type);
-
184  void (*delay_ms)(uint32_t ms);
-
185  uint8_t inited;
- -
187 
-
191 typedef struct ds3231_info_s
-
192 {
-
193  char chip_name[32];
-
194  char manufacturer_name[32];
-
195  char interface[8];
- - - - - -
201  uint32_t driver_version;
- -
203 
-
221 #define DRIVER_DS3231_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
-
222 
-
229 #define DRIVER_DS3231_LINK_IIC_INIT(HANDLE, FUC) (HANDLE)->iic_init = FUC
-
230 
-
237 #define DRIVER_DS3231_LINK_IIC_DEINIT(HANDLE, FUC) (HANDLE)->iic_deinit = FUC
-
238 
-
245 #define DRIVER_DS3231_LINK_IIC_READ(HANDLE, FUC) (HANDLE)->iic_read = FUC
-
246 
-
253 #define DRIVER_DS3231_LINK_IIC_WRITE(HANDLE, FUC) (HANDLE)->iic_write = FUC
-
254 
-
261 #define DRIVER_DS3231_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
-
262 
-
269 #define DRIVER_DS3231_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
-
270 
-
277 #define DRIVER_DS3231_LINK_RECEIVE_CALLBACK(HANDLE, FUC) (HANDLE)->receive_callback = FUC
-
278 
-
298 uint8_t ds3231_info(ds3231_info_t *info);
-
299 
-
310 uint8_t ds3231_init(ds3231_handle_t *handle);
-
311 
-
322 uint8_t ds3231_deinit(ds3231_handle_t *handle);
-
323 
-
334 uint8_t ds3231_irq_handler(ds3231_handle_t *handle);
-
335 
-
348 uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t);
-
349 
-
361 uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t);
-
362 
-
374 uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable);
-
375 
-
387 uint8_t ds3231_get_oscillator(ds3231_handle_t *handle, ds3231_bool_t *enable);
-
388 
-
400 uint8_t ds3231_get_status(ds3231_handle_t *handle, uint8_t *status);
-
401 
-
424 uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin);
-
425 
-
437 uint8_t ds3231_get_pin(ds3231_handle_t *handle, ds3231_pin_t *pin);
-
438 
-
450 uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable);
-
451 
-
463 uint8_t ds3231_get_square_wave(ds3231_handle_t *handle, ds3231_bool_t *enable);
-
464 
-
476 uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable);
-
477 
-
489 uint8_t ds3231_get_32khz_output(ds3231_handle_t *handle, ds3231_bool_t *enable);
-
490 
-
503 uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s);
-
504 
-
516 uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset);
-
517 
-
529 uint8_t ds3231_get_aging_offset(ds3231_handle_t *handle, int8_t *offset);
-
530 
-
542 uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg);
-
543 
-
555 uint8_t ds3231_aging_offset_convert_to_data(ds3231_handle_t *handle, int8_t reg, float *offset);
-
556 
- -
581 
- -
595 
- -
609 
- -
623 
- -
637 
- -
651 
-
663 uint8_t ds3231_alarm_clear(ds3231_handle_t *handle, ds3231_alarm_t alarm);
-
664 
-
689 uint8_t ds3231_set_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len);
-
690 
-
704 uint8_t ds3231_get_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len);
-
705 
-
714 #ifdef __cplusplus
-
715 }
-
716 #endif
-
717 
-
718 #endif
-
uint8_t ds3231_get_32khz_output(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the 32KHz output status
-
uint8_t ds3231_get_pin(ds3231_handle_t *handle, ds3231_pin_t *pin)
get the chip pin function
-
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
-
uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
get the chip temperature
-
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
-
uint8_t ds3231_aging_offset_convert_to_data(ds3231_handle_t *handle, int8_t reg, float *offset)
convert a register raw data to a converted aging offset data
-
uint8_t ds3231_get_aging_offset(ds3231_handle_t *handle, int8_t *offset)
get the chip aging offset
-
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
-
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
-
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
-
uint8_t ds3231_get_square_wave(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the square wave output status
-
uint8_t ds3231_get_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t *enable)
get the alarm interrupt status
-
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
-
ds3231_alarm2_mode_t
ds3231 alarm2 enumeration definition
-
uint8_t ds3231_get_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
get the alarm1 time
-
ds3231_alarm1_mode_t
ds3231 alarm1 enumeration definition
-
uint8_t ds3231_set_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
set the alarm2 time
-
uint8_t ds3231_alarm_clear(ds3231_handle_t *handle, ds3231_alarm_t alarm)
clear the alarm flag
-
uint8_t ds3231_set_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
set the alarm1 time
-
uint8_t ds3231_get_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
get the alarm2 time
-
@ DS3231_ALARM2_MODE_ONCE_A_MINUTE
-
@ DS3231_ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH
-
@ DS3231_ALARM2_MODE_HOUR_MINUTE_MATCH
-
@ DS3231_ALARM2_MODE_MINUTE_MATCH
-
@ DS3231_ALARM2_MODE_DATE_HOUR_MINUTE_MATCH
-
@ DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH
-
@ DS3231_ALARM1_MODE_ONCE_A_SECOND
-
@ DS3231_ALARM1_MODE_MINUTE_SECOND_MATCH
-
@ DS3231_ALARM1_MODE_SECOND_MATCH
-
@ DS3231_ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH
-
@ DS3231_ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH
-
ds3231_am_pm_t
ds3231 am pm enumeration definition
Definition: driver_ds3231.h:82
-
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
-
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
-
uint8_t ds3231_get_oscillator(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the chip oscillator status
+Go to the documentation of this file.
1
+
37
+
38#ifndef DRIVER_DS3231_H
+
39#define DRIVER_DS3231_H
+
40
+
41#include <stdio.h>
+
42#include <stdint.h>
+
43#include <string.h>
+
44
+
45#ifdef __cplusplus
+
46extern "C"{
+
47#endif
+
48
+
54
+
59
+
+
63typedef enum
+
64{
+ + + +
+
68
+
+
72typedef enum
+
73{
+ + + +
+
77
+
+
81typedef enum
+
82{
+
83 DS3231_AM = 0x00,
+
84 DS3231_PM = 0x01,
+ +
+
86
+
+
90typedef enum
+
91{
+ + + +
+
95
+
+
99typedef enum
+
100{
+ + + +
+
104
+
+
108typedef enum
+
109{
+ + + +
+
113
+
117
+
122
+ +
135
+ +
147
+
151
+
156
+
+
160typedef struct ds3231_time_s
+
161{
+
162 uint16_t year;
+
163 uint8_t month;
+
164 uint8_t week;
+
165 uint8_t date;
+
166 uint8_t hour;
+
167 uint8_t minute;
+
168 uint8_t second;
+ + + +
+
172
+
+
176typedef struct ds3231_handle_s
+
177{
+
178 uint8_t (*iic_init)(void);
+
179 uint8_t (*iic_deinit)(void);
+
180 uint8_t (*iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
+
181 uint8_t (*iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
+
182 void (*debug_print)(const char *const fmt, ...);
+
183 void (*receive_callback)(uint8_t type);
+
184 void (*delay_ms)(uint32_t ms);
+
185 uint8_t inited;
+ +
+
187
+ +
203
+
207
+
214
+
221#define DRIVER_DS3231_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
+
222
+
229#define DRIVER_DS3231_LINK_IIC_INIT(HANDLE, FUC) (HANDLE)->iic_init = FUC
+
230
+
237#define DRIVER_DS3231_LINK_IIC_DEINIT(HANDLE, FUC) (HANDLE)->iic_deinit = FUC
+
238
+
245#define DRIVER_DS3231_LINK_IIC_READ(HANDLE, FUC) (HANDLE)->iic_read = FUC
+
246
+
253#define DRIVER_DS3231_LINK_IIC_WRITE(HANDLE, FUC) (HANDLE)->iic_write = FUC
+
254
+
261#define DRIVER_DS3231_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
+
262
+
269#define DRIVER_DS3231_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
+
270
+
277#define DRIVER_DS3231_LINK_RECEIVE_CALLBACK(HANDLE, FUC) (HANDLE)->receive_callback = FUC
+
278
+
282
+
289
+
298uint8_t ds3231_info(ds3231_info_t *info);
+
299
+
310uint8_t ds3231_init(ds3231_handle_t *handle);
+
311
+
322uint8_t ds3231_deinit(ds3231_handle_t *handle);
+
323
+
334uint8_t ds3231_irq_handler(ds3231_handle_t *handle);
+
335
+ +
349
+ +
362
+ +
375
+
387uint8_t ds3231_get_oscillator(ds3231_handle_t *handle, ds3231_bool_t *enable);
+
388
+
400uint8_t ds3231_get_status(ds3231_handle_t *handle, uint8_t *status);
+
401
+
405
+
412
+
424uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin);
+
425
+
437uint8_t ds3231_get_pin(ds3231_handle_t *handle, ds3231_pin_t *pin);
+
438
+ +
451
+ +
464
+ +
477
+ +
490
+
503uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s);
+
504
+
516uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset);
+
517
+
529uint8_t ds3231_get_aging_offset(ds3231_handle_t *handle, int8_t *offset);
+
530
+
542uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg);
+
543
+
555uint8_t ds3231_aging_offset_convert_to_data(ds3231_handle_t *handle, int8_t reg, float *offset);
+
556
+
560
+
567
+ +
581
+ +
595
+ +
609
+ +
623
+ +
637
+ +
651
+ +
664
+
668
+
675
+
689uint8_t ds3231_set_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len);
+
690
+
704uint8_t ds3231_get_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len);
+
705
+
709
+
713
+
714#ifdef __cplusplus
+
715}
+
716#endif
+
717
+
718#endif
+
uint8_t ds3231_get_32khz_output(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the 32KHz output status
+
uint8_t ds3231_get_pin(ds3231_handle_t *handle, ds3231_pin_t *pin)
get the chip pin function
+
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
+
uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
get the chip temperature
+
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
+
uint8_t ds3231_aging_offset_convert_to_data(ds3231_handle_t *handle, int8_t reg, float *offset)
convert a register raw data to a converted aging offset data
+
uint8_t ds3231_get_aging_offset(ds3231_handle_t *handle, int8_t *offset)
get the chip aging offset
+
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
+
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
+
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
+
uint8_t ds3231_get_square_wave(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the square wave output status
+
uint8_t ds3231_get_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t *enable)
get the alarm interrupt status
+
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
+
ds3231_alarm2_mode_t
ds3231 alarm2 enumeration definition
+
uint8_t ds3231_get_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
get the alarm1 time
+
ds3231_alarm1_mode_t
ds3231 alarm1 enumeration definition
+
uint8_t ds3231_set_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
set the alarm2 time
+
uint8_t ds3231_alarm_clear(ds3231_handle_t *handle, ds3231_alarm_t alarm)
clear the alarm flag
+
uint8_t ds3231_set_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
set the alarm1 time
+
uint8_t ds3231_get_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
get the alarm2 time
+
@ DS3231_ALARM2_MODE_ONCE_A_MINUTE
+
@ DS3231_ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH
+
@ DS3231_ALARM2_MODE_HOUR_MINUTE_MATCH
+
@ DS3231_ALARM2_MODE_MINUTE_MATCH
+
@ DS3231_ALARM2_MODE_DATE_HOUR_MINUTE_MATCH
+
@ DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH
+
@ DS3231_ALARM1_MODE_ONCE_A_SECOND
+
@ DS3231_ALARM1_MODE_MINUTE_SECOND_MATCH
+
@ DS3231_ALARM1_MODE_SECOND_MATCH
+
@ DS3231_ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH
+
@ DS3231_ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH
+
ds3231_am_pm_t
ds3231 am pm enumeration definition
+
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
+
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
+
uint8_t ds3231_get_oscillator(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the chip oscillator status
struct ds3231_time_s ds3231_time_t
ds3231 time structure definition
-
ds3231_alarm_t
ds3231 alarm enumeration definition
Definition: driver_ds3231.h:73
-
ds3231_format_t
ds3231 format enumeration definition
-
ds3231_pin_t
ds3231 pin enumeration definition
Definition: driver_ds3231.h:91
-
uint8_t ds3231_info(ds3231_info_t *info)
get chip's information
-
uint8_t ds3231_irq_handler(ds3231_handle_t *handle)
irq handler
+
ds3231_alarm_t
ds3231 alarm enumeration definition
+
ds3231_format_t
ds3231 format enumeration definition
+
ds3231_pin_t
ds3231 pin enumeration definition
+
uint8_t ds3231_info(ds3231_info_t *info)
get chip's information
+
uint8_t ds3231_irq_handler(ds3231_handle_t *handle)
irq handler
struct ds3231_handle_s ds3231_handle_t
ds3231 handle structure definition
-
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
+
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
struct ds3231_info_s ds3231_info_t
ds3231 information structure definition
-
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
-
ds3231_status_t
ds3231 alarm1 enumeration definition
-
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
-
ds3231_bool_t
ds3231 bool enumeration definition
Definition: driver_ds3231.h:64
-
uint8_t ds3231_get_status(ds3231_handle_t *handle, uint8_t *status)
get the chip status
-
@ DS3231_PM
Definition: driver_ds3231.h:84
-
@ DS3231_AM
Definition: driver_ds3231.h:83
-
@ DS3231_ALARM_2
Definition: driver_ds3231.h:75
-
@ DS3231_ALARM_1
Definition: driver_ds3231.h:74
-
@ DS3231_FORMAT_24H
-
@ DS3231_FORMAT_12H
-
@ DS3231_PIN_INTERRUPT
Definition: driver_ds3231.h:93
-
@ DS3231_PIN_SQUARE_WAVE
Definition: driver_ds3231.h:92
-
@ DS3231_STATUS_ALARM_1
-
@ DS3231_STATUS_ALARM_2
-
@ DS3231_BOOL_TRUE
Definition: driver_ds3231.h:66
-
@ DS3231_BOOL_FALSE
Definition: driver_ds3231.h:65
-
uint8_t ds3231_set_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
set the chip register
-
uint8_t ds3231_get_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
get the chip register
-
ds3231 handle structure definition
- -
void(* delay_ms)(uint32_t ms)
-
void(* receive_callback)(uint8_t type)
-
void(* debug_print)(const char *const fmt,...)
-
uint8_t(* iic_init)(void)
-
uint8_t(* iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
-
uint8_t(* iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
-
uint8_t(* iic_deinit)(void)
-
ds3231 information structure definition
-
float temperature_max
-
float supply_voltage_max_v
-
uint32_t driver_version
-
float temperature_min
-
float max_current_ma
-
char manufacturer_name[32]
-
float supply_voltage_min_v
-
char interface[8]
-
char chip_name[32]
-
ds3231 time structure definition
- - -
ds3231_am_pm_t am_pm
- - -
ds3231_format_t format
- - - +
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
+
ds3231_status_t
ds3231 alarm1 enumeration definition
+
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
+
ds3231_bool_t
ds3231 bool enumeration definition
+
uint8_t ds3231_get_status(ds3231_handle_t *handle, uint8_t *status)
get the chip status
+
@ DS3231_PM
+
@ DS3231_AM
+
@ DS3231_ALARM_2
+
@ DS3231_ALARM_1
+
@ DS3231_FORMAT_24H
+
@ DS3231_FORMAT_12H
+
@ DS3231_PIN_INTERRUPT
+
@ DS3231_PIN_SQUARE_WAVE
+
@ DS3231_STATUS_ALARM_1
+
@ DS3231_STATUS_ALARM_2
+
@ DS3231_BOOL_TRUE
+
@ DS3231_BOOL_FALSE
+
uint8_t ds3231_set_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
set the chip register
+
uint8_t ds3231_get_reg(ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
get the chip register
+
ds3231 handle structure definition
+ +
void(* delay_ms)(uint32_t ms)
+
void(* receive_callback)(uint8_t type)
+
void(* debug_print)(const char *const fmt,...)
+
uint8_t(* iic_init)(void)
+
uint8_t(* iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
+
uint8_t(* iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
+
uint8_t(* iic_deinit)(void)
+
ds3231 information structure definition
+ +
float supply_voltage_max_v
+
uint32_t driver_version
+ + +
char manufacturer_name[32]
+
float supply_voltage_min_v
+ +
char chip_name[32]
+
ds3231 time structure definition
+ + +
ds3231_am_pm_t am_pm
+ + +
ds3231_format_t format
+ + +
+
diff --git a/doc/html/driver__ds3231__alarm_8c.html b/doc/html/driver__ds3231__alarm_8c.html index 2fc7514..217dd0f 100644 --- a/doc/html/driver__ds3231__alarm_8c.html +++ b/doc/html/driver__ds3231__alarm_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: example/driver_ds3231_alarm.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_alarm.c File Reference
+
driver_ds3231_alarm.c File Reference

driver ds3231 alarm source file More...

+Include dependency graph for driver_ds3231_alarm.c:
+
+
+

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_alarm_irq_handler (void)
 alarm irq handler More...
 
uint8_t ds3231_alarm_init (void(*alarm_receive_callback)(uint8_t type))
 alarm example init More...
 
uint8_t ds3231_alarm_deinit (void)
 alarm example deinit More...
 
uint8_t ds3231_alarm_set_alarm1 (ds3231_time_t *t, ds3231_alarm1_mode_t mode)
 alarm example set the alarm 1 More...
 
uint8_t ds3231_alarm_get_alarm1 (ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
 alarm example get the alarm 1 More...
 
uint8_t ds3231_alarm_set_alarm2 (ds3231_time_t *t, ds3231_alarm2_mode_t mode)
 alarm example set the alarm 2 More...
 
uint8_t ds3231_alarm_get_alarm2 (ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
 alarm example get the alarm 2 More...
 
uint8_t ds3231_alarm_clear_flag (ds3231_alarm_t alarm)
 alarm clear the interrupt flag More...
 
uint8_t ds3231_alarm_enable (ds3231_alarm_t alarm)
 enable the alarm More...
 
uint8_t ds3231_alarm_disable (ds3231_alarm_t alarm)
 disable the alarm More...
 
uint8_t ds3231_alarm_set_time (ds3231_time_t *t)
 alarm example set the time More...
 
uint8_t ds3231_alarm_set_timestamp (time_t timestamp)
 alarm example set the time by a unix timestamp More...
 
uint8_t ds3231_alarm_set_timestamp_time_zone (int8_t zone)
 alarm example set the local time zone More...
 
uint8_t ds3231_alarm_get_time (ds3231_time_t *t)
 alarm example get the time More...
 
uint8_t ds3231_alarm_get_timestamp (time_t *timestamp)
 alarm example get the time in a unix timestamp More...
 
uint8_t ds3231_alarm_get_timestamp_time_zone (int8_t *zone)
 alarm example get the local time zone More...
 
uint8_t ds3231_alarm_get_temperature (int16_t *raw, float *s)
 alarm example get the current temperature More...
 
uint8_t ds3231_alarm_alarm_ascii_time (char *buf, uint8_t len)
 alarm example get the ascii time More...
 
uint8_t ds3231_alarm_irq_handler (void)
 alarm irq handler
uint8_t ds3231_alarm_init (void(*alarm_receive_callback)(uint8_t type))
 alarm example init
uint8_t ds3231_alarm_deinit (void)
 alarm example deinit
uint8_t ds3231_alarm_set_alarm1 (ds3231_time_t *t, ds3231_alarm1_mode_t mode)
 alarm example set the alarm 1
uint8_t ds3231_alarm_get_alarm1 (ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
 alarm example get the alarm 1
uint8_t ds3231_alarm_set_alarm2 (ds3231_time_t *t, ds3231_alarm2_mode_t mode)
 alarm example set the alarm 2
uint8_t ds3231_alarm_get_alarm2 (ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
 alarm example get the alarm 2
uint8_t ds3231_alarm_clear_flag (ds3231_alarm_t alarm)
 alarm clear the interrupt flag
uint8_t ds3231_alarm_enable (ds3231_alarm_t alarm)
 enable the alarm
uint8_t ds3231_alarm_disable (ds3231_alarm_t alarm)
 disable the alarm
uint8_t ds3231_alarm_set_time (ds3231_time_t *t)
 alarm example set the time
uint8_t ds3231_alarm_set_timestamp (time_t timestamp)
 alarm example set the time by a unix timestamp
uint8_t ds3231_alarm_set_timestamp_time_zone (int8_t zone)
 alarm example set the local time zone
uint8_t ds3231_alarm_get_time (ds3231_time_t *t)
 alarm example get the time
uint8_t ds3231_alarm_get_timestamp (time_t *timestamp)
 alarm example get the time in a unix timestamp
uint8_t ds3231_alarm_get_timestamp_time_zone (int8_t *zone)
 alarm example get the local time zone
uint8_t ds3231_alarm_get_temperature (int16_t *raw, float *s)
 alarm example get the current temperature
uint8_t ds3231_alarm_alarm_ascii_time (char *buf, uint8_t len)
 alarm example get the ascii time
-

Detailed Description

+

Detailed Description

driver ds3231 alarm source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -177,11 +168,19 @@

history

Definition in file driver_ds3231_alarm.c.

+ +
diff --git a/doc/html/driver__ds3231__alarm_8c__incl.md5 b/doc/html/driver__ds3231__alarm_8c__incl.md5 new file mode 100644 index 0000000..3a38552 --- /dev/null +++ b/doc/html/driver__ds3231__alarm_8c__incl.md5 @@ -0,0 +1 @@ +50bcc379c224346cf74530b2be2452ed \ No newline at end of file diff --git a/doc/html/driver__ds3231__alarm_8c__incl.svg b/doc/html/driver__ds3231__alarm_8c__incl.svg new file mode 100644 index 0000000..e6114aa --- /dev/null +++ b/doc/html/driver__ds3231__alarm_8c__incl.svg @@ -0,0 +1,148 @@ + + + + + + +example/driver_ds3231_alarm.c + + +Node1 + + +example/driver_ds3231 +_alarm.c + + + + + +Node2 + + +driver_ds3231_alarm.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ds3231_interface.h + + + + + +Node2->Node3 + + + + + + + + +Node8 + + +time.h + + + + + +Node2->Node8 + + + + + + + + +Node4 + + +driver_ds3231.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdio.h + + + + + +Node4->Node5 + + + + + + + + +Node6 + + +stdint.h + + + + + +Node4->Node6 + + + + + + + + +Node7 + + +string.h + + + + + +Node4->Node7 + + + + + + + + diff --git a/doc/html/driver__ds3231__alarm_8c_source.html b/doc/html/driver__ds3231__alarm_8c_source.html index c4d615d..61e8a9e 100644 --- a/doc/html/driver__ds3231__alarm_8c_source.html +++ b/doc/html/driver__ds3231__alarm_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: example/driver_ds3231_alarm.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_alarm.c
+
driver_ds3231_alarm.c
-Go to the documentation of this file.
1 
-
38 #include "driver_ds3231_alarm.h"
-
39 
-
40 static ds3231_handle_t gs_handle;
-
41 static int8_t gs_time_zone = 0;
- -
51 {
-
52  /* irq handler */
-
53  if (ds3231_irq_handler(&gs_handle) != 0)
-
54  {
-
55  return 1;
-
56  }
-
57  else
-
58  {
-
59  return 0;
-
60  }
-
61 }
-
62 
-
71 uint8_t ds3231_alarm_init(void (*alarm_receive_callback)(uint8_t type))
-
72 {
-
73  uint8_t res;
-
74  int8_t reg;
-
75 
-
76  /* link functions */
- - - - - - - -
84  DRIVER_DS3231_LINK_RECEIVE_CALLBACK(&gs_handle, alarm_receive_callback);
-
85 
-
86  /* init ds3231 */
-
87  res = ds3231_init(&gs_handle);
-
88  if (res != 0)
-
89  {
-
90  ds3231_interface_debug_print("ds3231: init failed.\n");
-
91 
-
92  return 1;
-
93  }
-
94 
-
95  /* set oscillator */
-
96  res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
-
97  if (res != 0)
-
98  {
-
99  ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
-
100  (void)ds3231_deinit(&gs_handle);
-
101 
-
102  return 1;
-
103  }
-
104 
-
105  /* set interrupt */
-
106  res = ds3231_set_pin(&gs_handle, DS3231_PIN_INTERRUPT);
-
107  if (res != 0)
-
108  {
-
109  ds3231_interface_debug_print("ds3231: set pin failed.\n");
-
110  (void)ds3231_deinit(&gs_handle);
-
111 
-
112  return 1;
-
113  }
-
114 
-
115  /* disable square wave */
-
116  res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
-
117  if (res != 0)
-
118  {
-
119  ds3231_interface_debug_print("ds3231: set square wave failed.\n");
-
120  (void)ds3231_deinit(&gs_handle);
-
121 
-
122  return 1;
-
123  }
-
124 
-
125  /* disable 32khz output */
-
126  res = ds3231_set_32khz_output(&gs_handle, DS3231_BOOL_FALSE);
-
127  if (res != 0)
-
128  {
-
129  ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
-
130  (void)ds3231_deinit(&gs_handle);
-
131 
-
132  return 1;
-
133  }
-
134 
-
135  /* convert to register */
- -
137  if (res != 0)
-
138  {
-
139  ds3231_interface_debug_print("ds3231: convert to register failed.\n");
-
140  (void)ds3231_deinit(&gs_handle);
-
141 
-
142  return 1;
-
143  }
-
144 
-
145  /* set aging offset */
-
146  res = ds3231_set_aging_offset(&gs_handle, reg);
-
147  if (res != 0)
-
148  {
-
149  ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
-
150  (void)ds3231_deinit(&gs_handle);
-
151 
-
152  return 1;
-
153  }
-
154 
-
155  return 0;
-
156 }
-
157 
-
165 uint8_t ds3231_alarm_deinit(void)
-
166 {
-
167  if (ds3231_deinit(&gs_handle) != 0)
-
168  {
-
169  return 1;
-
170  }
-
171  else
-
172  {
-
173  return 0;
-
174  }
-
175 }
-
176 
- -
187 {
-
188  /* set alarm1 */
-
189  if (ds3231_set_alarm1(&gs_handle, t, mode) != 0)
-
190  {
-
191  return 1;
-
192  }
-
193  else
-
194  {
-
195  return 0;
-
196  }
-
197 }
-
198 
- -
209 {
-
210  /* get alarm1 */
-
211  if (ds3231_get_alarm1(&gs_handle, t, mode) != 0)
-
212  {
-
213  return 1;
-
214  }
-
215  else
-
216  {
-
217  return 0;
-
218  }
-
219 }
-
220 
- -
231 {
-
232  /* set alarm2 */
-
233  if (ds3231_set_alarm2(&gs_handle, t, mode) != 0)
-
234  {
-
235  return 1;
-
236  }
-
237  else
-
238  {
-
239  return 0;
-
240  }
-
241 }
-
242 
- -
253 {
-
254  /* get alarm2 */
-
255  if (ds3231_get_alarm2(&gs_handle, t, mode) != 0)
-
256  {
-
257  return 1;
-
258  }
-
259  else
-
260  {
-
261  return 0;
-
262  }
-
263 }
-
264 
- -
274 {
-
275  /* alarm clear */
-
276  if (ds3231_alarm_clear(&gs_handle, alarm) != 0)
-
277  {
-
278  return 1;
-
279  }
-
280  else
-
281  {
-
282  return 0;
-
283  }
-
284 }
-
285 
- -
295 {
-
296  /* clear alarm flag */
-
297  if (ds3231_alarm_clear(&gs_handle, alarm) != 0)
-
298  {
-
299  return 1;
-
300  }
-
301 
-
302  /* enable alarm */
-
303  if (ds3231_set_alarm_interrupt(&gs_handle, alarm, DS3231_BOOL_TRUE) != 0)
-
304  {
-
305  return 1;
-
306  }
-
307  else
-
308  {
-
309  return 0;
-
310  }
-
311 }
-
312 
- -
322 {
-
323  /* disable alarm */
-
324  if (ds3231_set_alarm_interrupt(&gs_handle, alarm, DS3231_BOOL_FALSE) != 0)
-
325  {
-
326  return 1;
-
327  }
-
328  else
-
329  {
-
330  return 0;
-
331  }
-
332 }
-
333 
- -
343 {
-
344  /* set time */
-
345  if (ds3231_set_time(&gs_handle, t) != 0)
-
346  {
-
347  return 1;
-
348  }
-
349  else
-
350  {
-
351  return 0;
-
352  }
-
353 }
-
354 
-
363 uint8_t ds3231_alarm_set_timestamp(time_t timestamp)
-
364 {
-
365  ds3231_time_t t;
-
366  struct tm *timeptr;
-
367 
-
368  /* convert times */
-
369  timestamp += (time_t)(gs_time_zone * 3600);
-
370  timeptr = localtime(&timestamp);
-
371  t.am_pm = DS3231_AM;
-
372  t.date = (uint8_t)timeptr->tm_mday;
- -
374  t.hour = (uint8_t)timeptr->tm_hour;
-
375  t.minute = (uint8_t)timeptr->tm_min;
-
376  t.month = (uint8_t)timeptr->tm_mon + 1;
-
377  t.second = (uint8_t)timeptr->tm_sec;
-
378  if (timeptr->tm_wday == 0)
-
379  {
-
380  t.week = 7;
-
381  }
-
382  else
-
383  {
-
384  t.week = (uint8_t)timeptr->tm_wday;
-
385  }
-
386  t.year = (uint16_t)(timeptr->tm_year + 1900);
-
387 
-
388  /* set time */
-
389  if (ds3231_set_time(&gs_handle, &t) != 0)
-
390  {
-
391  return 1;
-
392  }
-
393  else
-
394  {
-
395  return 0;
-
396  }
-
397 }
-
398 
- -
407 {
-
408  gs_time_zone = zone;
-
409 
-
410  return 0;
-
411 }
-
412 
- -
422 {
-
423  /* get time */
-
424  if (ds3231_get_time(&gs_handle, t) != 0)
-
425  {
-
426  return 1;
-
427  }
-
428  else
-
429  {
-
430  return 0;
-
431  }
-
432 }
-
433 
-
442 uint8_t ds3231_alarm_get_timestamp(time_t *timestamp)
-
443 {
-
444  ds3231_time_t t;
-
445  struct tm timeptr;
-
446 
-
447  /* get time */
-
448  if (ds3231_get_time(&gs_handle, &t) != 0)
-
449  {
-
450  return 1;
-
451  }
-
452  timeptr.tm_year = t.year - 1900;
-
453  timeptr.tm_mon = t.month - 1;
-
454  timeptr.tm_wday = t.week;
-
455  timeptr.tm_mday = t.date;
-
456  if (t.format == DS3231_FORMAT_24H)
-
457  {
-
458  timeptr.tm_hour = t.hour;
-
459  }
-
460  else
-
461  {
-
462  timeptr.tm_hour = t.hour % 12 + t.am_pm * 12;
-
463  }
-
464  timeptr.tm_min = t.minute;
-
465  timeptr.tm_sec = t.second;
-
466 
-
467  /* make time */
-
468  *timestamp = mktime(&timeptr) - gs_time_zone * 3600;
-
469 
-
470  return 0;
-
471 }
-
472 
- -
481 {
-
482  *zone = gs_time_zone;
-
483 
-
484  return 0;
-
485 }
-
486 
-
496 uint8_t ds3231_alarm_get_temperature(int16_t *raw, float *s)
-
497 {
-
498  /* get temperature */
-
499  if (ds3231_get_temperature(&gs_handle, raw, s) != 0)
-
500  {
-
501  return 1;
-
502  }
-
503  else
-
504  {
-
505  return 0;
-
506  }
-
507 }
-
508 
-
518 uint8_t ds3231_alarm_alarm_ascii_time(char *buf, uint8_t len)
-
519 {
-
520  ds3231_time_t t;
-
521 
-
522  /* get time */
-
523  if (ds3231_get_time(&gs_handle, &t) != 0)
-
524  {
-
525  return 1;
-
526  }
-
527 
-
528  if (t.format == DS3231_FORMAT_24H)
-
529  {
-
530  (void)snprintf(buf, len, "%04d-%02d-%02d %02d:%02d:%02d %d.\n", t.year, t.month, t.date, t.hour, t.minute, t.second, t.week);
-
531  }
-
532  else
-
533  {
-
534  (void)snprintf(buf, len, "%04d-%02d-%02d %s %02d:%02d:%02d %d.\n", t.year, t.month, t.date, (t.am_pm == DS3231_AM) ? "AM" : "PM",
-
535  t.hour, t.minute, t.second, t.week
-
536  );
-
537  }
-
538 
-
539  return 0;
-
540 }
+Go to the documentation of this file.
1
+
37
+
38#include "driver_ds3231_alarm.h"
+
39
+
40static ds3231_handle_t gs_handle;
+
41static int8_t gs_time_zone = 0;
+
42
+
+ +
51{
+
52 /* irq handler */
+
53 if (ds3231_irq_handler(&gs_handle) != 0)
+
54 {
+
55 return 1;
+
56 }
+
57 else
+
58 {
+
59 return 0;
+
60 }
+
61}
+
+
62
+
+
71uint8_t ds3231_alarm_init(void (*alarm_receive_callback)(uint8_t type))
+
72{
+
73 uint8_t res;
+
74 int8_t reg;
+
75
+
76 /* link functions */
+ + + + + + + +
84 DRIVER_DS3231_LINK_RECEIVE_CALLBACK(&gs_handle, alarm_receive_callback);
+
85
+
86 /* init ds3231 */
+
87 res = ds3231_init(&gs_handle);
+
88 if (res != 0)
+
89 {
+
90 ds3231_interface_debug_print("ds3231: init failed.\n");
+
91
+
92 return 1;
+
93 }
+
94
+
95 /* set oscillator */
+
96 res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
+
97 if (res != 0)
+
98 {
+
99 ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
+
100 (void)ds3231_deinit(&gs_handle);
+
101
+
102 return 1;
+
103 }
+
104
+
105 /* set interrupt */
+
106 res = ds3231_set_pin(&gs_handle, DS3231_PIN_INTERRUPT);
+
107 if (res != 0)
+
108 {
+
109 ds3231_interface_debug_print("ds3231: set pin failed.\n");
+
110 (void)ds3231_deinit(&gs_handle);
+
111
+
112 return 1;
+
113 }
+
114
+
115 /* disable square wave */
+
116 res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
+
117 if (res != 0)
+
118 {
+
119 ds3231_interface_debug_print("ds3231: set square wave failed.\n");
+
120 (void)ds3231_deinit(&gs_handle);
+
121
+
122 return 1;
+
123 }
+
124
+
125 /* disable 32khz output */
+ +
127 if (res != 0)
+
128 {
+
129 ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
+
130 (void)ds3231_deinit(&gs_handle);
+
131
+
132 return 1;
+
133 }
+
134
+
135 /* convert to register */
+ +
137 if (res != 0)
+
138 {
+
139 ds3231_interface_debug_print("ds3231: convert to register failed.\n");
+
140 (void)ds3231_deinit(&gs_handle);
+
141
+
142 return 1;
+
143 }
+
144
+
145 /* set aging offset */
+
146 res = ds3231_set_aging_offset(&gs_handle, reg);
+
147 if (res != 0)
+
148 {
+
149 ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
+
150 (void)ds3231_deinit(&gs_handle);
+
151
+
152 return 1;
+
153 }
+
154
+
155 return 0;
+
156}
+
+
157
+
+ +
166{
+
167 if (ds3231_deinit(&gs_handle) != 0)
+
168 {
+
169 return 1;
+
170 }
+
171 else
+
172 {
+
173 return 0;
+
174 }
+
175}
+
+
176
+
+ +
187{
+
188 /* set alarm1 */
+
189 if (ds3231_set_alarm1(&gs_handle, t, mode) != 0)
+
190 {
+
191 return 1;
+
192 }
+
193 else
+
194 {
+
195 return 0;
+
196 }
+
197}
+
+
198
+
+ +
209{
+
210 /* get alarm1 */
+
211 if (ds3231_get_alarm1(&gs_handle, t, mode) != 0)
+
212 {
+
213 return 1;
+
214 }
+
215 else
+
216 {
+
217 return 0;
+
218 }
+
219}
+
+
220
+
+ +
231{
+
232 /* set alarm2 */
+
233 if (ds3231_set_alarm2(&gs_handle, t, mode) != 0)
+
234 {
+
235 return 1;
+
236 }
+
237 else
+
238 {
+
239 return 0;
+
240 }
+
241}
+
+
242
+
+ +
253{
+
254 /* get alarm2 */
+
255 if (ds3231_get_alarm2(&gs_handle, t, mode) != 0)
+
256 {
+
257 return 1;
+
258 }
+
259 else
+
260 {
+
261 return 0;
+
262 }
+
263}
+
+
264
+
+ +
274{
+
275 /* alarm clear */
+
276 if (ds3231_alarm_clear(&gs_handle, alarm) != 0)
+
277 {
+
278 return 1;
+
279 }
+
280 else
+
281 {
+
282 return 0;
+
283 }
+
284}
+
+
285
+
+ +
295{
+
296 /* clear alarm flag */
+
297 if (ds3231_alarm_clear(&gs_handle, alarm) != 0)
+
298 {
+
299 return 1;
+
300 }
+
301
+
302 /* enable alarm */
+
303 if (ds3231_set_alarm_interrupt(&gs_handle, alarm, DS3231_BOOL_TRUE) != 0)
+
304 {
+
305 return 1;
+
306 }
+
307 else
+
308 {
+
309 return 0;
+
310 }
+
311}
+
+
312
+
+ +
322{
+
323 /* disable alarm */
+
324 if (ds3231_set_alarm_interrupt(&gs_handle, alarm, DS3231_BOOL_FALSE) != 0)
+
325 {
+
326 return 1;
+
327 }
+
328 else
+
329 {
+
330 return 0;
+
331 }
+
332}
+
+
333
+
+ +
343{
+
344 /* set time */
+
345 if (ds3231_set_time(&gs_handle, t) != 0)
+
346 {
+
347 return 1;
+
348 }
+
349 else
+
350 {
+
351 return 0;
+
352 }
+
353}
+
+
354
+
+
363uint8_t ds3231_alarm_set_timestamp(time_t timestamp)
+
364{
+ +
366 struct tm *timeptr;
+
367
+
368 /* convert times */
+
369 timestamp += (time_t)(gs_time_zone * 3600);
+
370 timeptr = localtime(&timestamp);
+
371 t.am_pm = DS3231_AM;
+
372 t.date = (uint8_t)timeptr->tm_mday;
+ +
374 t.hour = (uint8_t)timeptr->tm_hour;
+
375 t.minute = (uint8_t)timeptr->tm_min;
+
376 t.month = (uint8_t)timeptr->tm_mon + 1;
+
377 t.second = (uint8_t)timeptr->tm_sec;
+
378 if (timeptr->tm_wday == 0)
+
379 {
+
380 t.week = 7;
+
381 }
+
382 else
+
383 {
+
384 t.week = (uint8_t)timeptr->tm_wday;
+
385 }
+
386 t.year = (uint16_t)(timeptr->tm_year + 1900);
+
387
+
388 /* set time */
+
389 if (ds3231_set_time(&gs_handle, &t) != 0)
+
390 {
+
391 return 1;
+
392 }
+
393 else
+
394 {
+
395 return 0;
+
396 }
+
397}
+
+
398
+
+ +
407{
+
408 gs_time_zone = zone;
+
409
+
410 return 0;
+
411}
+
+
412
+
+ +
422{
+
423 /* get time */
+
424 if (ds3231_get_time(&gs_handle, t) != 0)
+
425 {
+
426 return 1;
+
427 }
+
428 else
+
429 {
+
430 return 0;
+
431 }
+
432}
+
+
433
+
+
442uint8_t ds3231_alarm_get_timestamp(time_t *timestamp)
+
443{
+ +
445 struct tm timeptr;
+
446
+
447 /* get time */
+
448 if (ds3231_get_time(&gs_handle, &t) != 0)
+
449 {
+
450 return 1;
+
451 }
+
452 timeptr.tm_year = t.year - 1900;
+
453 timeptr.tm_mon = t.month - 1;
+
454 timeptr.tm_wday = t.week;
+
455 timeptr.tm_mday = t.date;
+
456 if (t.format == DS3231_FORMAT_24H)
+
457 {
+
458 timeptr.tm_hour = t.hour;
+
459 }
+
460 else
+
461 {
+
462 timeptr.tm_hour = t.hour % 12 + t.am_pm * 12;
+
463 }
+
464 timeptr.tm_min = t.minute;
+
465 timeptr.tm_sec = t.second;
+
466
+
467 /* make time */
+
468 *timestamp = mktime(&timeptr) - gs_time_zone * 3600;
+
469
+
470 return 0;
+
471}
+
+
472
+
+ +
481{
+
482 *zone = gs_time_zone;
+
483
+
484 return 0;
+
485}
+
+
486
+
+
496uint8_t ds3231_alarm_get_temperature(int16_t *raw, float *s)
+
497{
+
498 /* get temperature */
+
499 if (ds3231_get_temperature(&gs_handle, raw, s) != 0)
+
500 {
+
501 return 1;
+
502 }
+
503 else
+
504 {
+
505 return 0;
+
506 }
+
507}
+
+
508
+
+
518uint8_t ds3231_alarm_alarm_ascii_time(char *buf, uint8_t len)
+
519{
+ +
521
+
522 /* get time */
+
523 if (ds3231_get_time(&gs_handle, &t) != 0)
+
524 {
+
525 return 1;
+
526 }
+
527
+
528 if (t.format == DS3231_FORMAT_24H)
+
529 {
+
530 (void)snprintf(buf, len, "%04d-%02d-%02d %02d:%02d:%02d %d.\n", t.year, t.month, t.date, t.hour, t.minute, t.second, t.week);
+
531 }
+
532 else
+
533 {
+
534 (void)snprintf(buf, len, "%04d-%02d-%02d %s %02d:%02d:%02d %d.\n", t.year, t.month, t.date, (t.am_pm == DS3231_AM) ? "AM" : "PM",
+
535 t.hour, t.minute, t.second, t.week
+
536 );
+
537 }
+
538
+
539 return 0;
+
540}
+
driver ds3231 alarm header file
-
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
-
uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
get the chip temperature
-
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
-
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
-
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
-
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
-
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
-
ds3231_alarm2_mode_t
ds3231 alarm2 enumeration definition
-
uint8_t ds3231_get_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
get the alarm1 time
-
ds3231_alarm1_mode_t
ds3231 alarm1 enumeration definition
-
uint8_t ds3231_set_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
set the alarm2 time
-
uint8_t ds3231_alarm_clear(ds3231_handle_t *handle, ds3231_alarm_t alarm)
clear the alarm flag
-
uint8_t ds3231_set_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
set the alarm1 time
-
uint8_t ds3231_get_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
get the alarm2 time
-
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
-
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
-
ds3231_alarm_t
ds3231 alarm enumeration definition
Definition: driver_ds3231.h:73
-
uint8_t ds3231_irq_handler(ds3231_handle_t *handle)
irq handler
-
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
-
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
-
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
-
@ DS3231_AM
Definition: driver_ds3231.h:83
-
@ DS3231_FORMAT_24H
-
@ DS3231_PIN_INTERRUPT
Definition: driver_ds3231.h:93
-
@ DS3231_BOOL_TRUE
Definition: driver_ds3231.h:66
-
@ DS3231_BOOL_FALSE
Definition: driver_ds3231.h:65
-
uint8_t ds3231_alarm_get_time(ds3231_time_t *t)
alarm example get the time
-
uint8_t ds3231_alarm_set_alarm2(ds3231_time_t *t, ds3231_alarm2_mode_t mode)
alarm example set the alarm 2
-
uint8_t ds3231_alarm_set_alarm1(ds3231_time_t *t, ds3231_alarm1_mode_t mode)
alarm example set the alarm 1
-
uint8_t ds3231_alarm_enable(ds3231_alarm_t alarm)
enable the alarm
-
uint8_t ds3231_alarm_set_timestamp(time_t timestamp)
alarm example set the time by a unix timestamp
-
uint8_t ds3231_alarm_get_temperature(int16_t *raw, float *s)
alarm example get the current temperature
-
uint8_t ds3231_alarm_init(void(*alarm_receive_callback)(uint8_t type))
alarm example init
-
uint8_t ds3231_alarm_disable(ds3231_alarm_t alarm)
disable the alarm
-
uint8_t ds3231_alarm_clear_flag(ds3231_alarm_t alarm)
alarm clear the interrupt flag
-
#define DS3231_ALARM_DEFAULT_AGING_OFFSET
ds3231 alarm example default definition
-
uint8_t ds3231_alarm_set_time(ds3231_time_t *t)
alarm example set the time
-
uint8_t ds3231_alarm_set_timestamp_time_zone(int8_t zone)
alarm example set the local time zone
-
uint8_t ds3231_alarm_get_alarm1(ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
alarm example get the alarm 1
-
uint8_t ds3231_alarm_irq_handler(void)
alarm irq handler
-
uint8_t ds3231_alarm_get_timestamp(time_t *timestamp)
alarm example get the time in a unix timestamp
-
uint8_t ds3231_alarm_get_timestamp_time_zone(int8_t *zone)
alarm example get the local time zone
-
uint8_t ds3231_alarm_get_alarm2(ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
alarm example get the alarm 2
-
uint8_t ds3231_alarm_alarm_ascii_time(char *buf, uint8_t len)
alarm example get the ascii time
-
uint8_t ds3231_alarm_deinit(void)
alarm example deinit
-
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
-
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
-
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
-
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
- - - - - - - - -
ds3231 handle structure definition
-
ds3231 time structure definition
- - -
ds3231_am_pm_t am_pm
- - -
ds3231_format_t format
- - - +
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
+
uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
get the chip temperature
+
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
+
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
+
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
+
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
+
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
+
ds3231_alarm2_mode_t
ds3231 alarm2 enumeration definition
+
uint8_t ds3231_get_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
get the alarm1 time
+
ds3231_alarm1_mode_t
ds3231 alarm1 enumeration definition
+
uint8_t ds3231_set_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
set the alarm2 time
+
uint8_t ds3231_alarm_clear(ds3231_handle_t *handle, ds3231_alarm_t alarm)
clear the alarm flag
+
uint8_t ds3231_set_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
set the alarm1 time
+
uint8_t ds3231_get_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
get the alarm2 time
+
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
+
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
+
struct ds3231_time_s ds3231_time_t
ds3231 time structure definition
+
ds3231_alarm_t
ds3231 alarm enumeration definition
+
uint8_t ds3231_irq_handler(ds3231_handle_t *handle)
irq handler
+
struct ds3231_handle_s ds3231_handle_t
ds3231 handle structure definition
+
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
+
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
+
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
+
@ DS3231_AM
+
@ DS3231_FORMAT_24H
+
@ DS3231_PIN_INTERRUPT
+
@ DS3231_BOOL_TRUE
+
@ DS3231_BOOL_FALSE
+
uint8_t ds3231_alarm_get_time(ds3231_time_t *t)
alarm example get the time
+
uint8_t ds3231_alarm_set_alarm2(ds3231_time_t *t, ds3231_alarm2_mode_t mode)
alarm example set the alarm 2
+
uint8_t ds3231_alarm_set_alarm1(ds3231_time_t *t, ds3231_alarm1_mode_t mode)
alarm example set the alarm 1
+
uint8_t ds3231_alarm_enable(ds3231_alarm_t alarm)
enable the alarm
+
uint8_t ds3231_alarm_set_timestamp(time_t timestamp)
alarm example set the time by a unix timestamp
+
uint8_t ds3231_alarm_get_temperature(int16_t *raw, float *s)
alarm example get the current temperature
+
uint8_t ds3231_alarm_init(void(*alarm_receive_callback)(uint8_t type))
alarm example init
+
uint8_t ds3231_alarm_disable(ds3231_alarm_t alarm)
disable the alarm
+
uint8_t ds3231_alarm_clear_flag(ds3231_alarm_t alarm)
alarm clear the interrupt flag
+
#define DS3231_ALARM_DEFAULT_AGING_OFFSET
ds3231 alarm example default definition
+
uint8_t ds3231_alarm_set_time(ds3231_time_t *t)
alarm example set the time
+
uint8_t ds3231_alarm_set_timestamp_time_zone(int8_t zone)
alarm example set the local time zone
+
uint8_t ds3231_alarm_get_alarm1(ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
alarm example get the alarm 1
+
uint8_t ds3231_alarm_irq_handler(void)
alarm irq handler
+
uint8_t ds3231_alarm_get_timestamp(time_t *timestamp)
alarm example get the time in a unix timestamp
+
uint8_t ds3231_alarm_get_timestamp_time_zone(int8_t *zone)
alarm example get the local time zone
+
uint8_t ds3231_alarm_get_alarm2(ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
alarm example get the alarm 2
+
uint8_t ds3231_alarm_alarm_ascii_time(char *buf, uint8_t len)
alarm example get the ascii time
+
uint8_t ds3231_alarm_deinit(void)
alarm example deinit
+
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
+
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
+
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
+
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+ + + + + + + + + + +
ds3231_am_pm_t am_pm
+ + +
ds3231_format_t format
+ + +
+
diff --git a/doc/html/driver__ds3231__alarm_8h.html b/doc/html/driver__ds3231__alarm_8h.html index 8cb9e9b..304eda8 100644 --- a/doc/html/driver__ds3231__alarm_8h.html +++ b/doc/html/driver__ds3231__alarm_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: example/driver_ds3231_alarm.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_alarm.h File Reference
+
driver_ds3231_alarm.h File Reference
@@ -96,73 +99,64 @@ More...

#include "driver_ds3231_interface.h"
#include <time.h>
+
+Include dependency graph for driver_ds3231_alarm.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+

Go to the source code of this file.

- - - - + +

+

Macros

#define DS3231_ALARM_DEFAULT_AGING_OFFSET   0
 ds3231 alarm example default definition More...
 
#define DS3231_ALARM_DEFAULT_AGING_OFFSET   0
 ds3231 alarm example default definition
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_alarm_irq_handler (void)
 alarm irq handler More...
 
uint8_t ds3231_alarm_init (void(*alarm_receive_callback)(uint8_t type))
 alarm example init More...
 
uint8_t ds3231_alarm_deinit (void)
 alarm example deinit More...
 
uint8_t ds3231_alarm_set_alarm1 (ds3231_time_t *t, ds3231_alarm1_mode_t mode)
 alarm example set the alarm 1 More...
 
uint8_t ds3231_alarm_get_alarm1 (ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
 alarm example get the alarm 1 More...
 
uint8_t ds3231_alarm_set_alarm2 (ds3231_time_t *t, ds3231_alarm2_mode_t mode)
 alarm example set the alarm 2 More...
 
uint8_t ds3231_alarm_get_alarm2 (ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
 alarm example get the alarm 2 More...
 
uint8_t ds3231_alarm_clear_flag (ds3231_alarm_t alarm)
 alarm clear the interrupt flag More...
 
uint8_t ds3231_alarm_enable (ds3231_alarm_t alarm)
 enable the alarm More...
 
uint8_t ds3231_alarm_disable (ds3231_alarm_t alarm)
 disable the alarm More...
 
uint8_t ds3231_alarm_set_time (ds3231_time_t *t)
 alarm example set the time More...
 
uint8_t ds3231_alarm_get_time (ds3231_time_t *t)
 alarm example get the time More...
 
uint8_t ds3231_alarm_set_timestamp (time_t timestamp)
 alarm example set the time by a unix timestamp More...
 
uint8_t ds3231_alarm_get_timestamp (time_t *timestamp)
 alarm example get the time in a unix timestamp More...
 
uint8_t ds3231_alarm_set_timestamp_time_zone (int8_t zone)
 alarm example set the local time zone More...
 
uint8_t ds3231_alarm_get_timestamp_time_zone (int8_t *zone)
 alarm example get the local time zone More...
 
uint8_t ds3231_alarm_get_temperature (int16_t *raw, float *s)
 alarm example get the current temperature More...
 
uint8_t ds3231_alarm_alarm_ascii_time (char *buf, uint8_t len)
 alarm example get the ascii time More...
 
uint8_t ds3231_alarm_irq_handler (void)
 alarm irq handler
uint8_t ds3231_alarm_init (void(*alarm_receive_callback)(uint8_t type))
 alarm example init
uint8_t ds3231_alarm_deinit (void)
 alarm example deinit
uint8_t ds3231_alarm_set_alarm1 (ds3231_time_t *t, ds3231_alarm1_mode_t mode)
 alarm example set the alarm 1
uint8_t ds3231_alarm_get_alarm1 (ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
 alarm example get the alarm 1
uint8_t ds3231_alarm_set_alarm2 (ds3231_time_t *t, ds3231_alarm2_mode_t mode)
 alarm example set the alarm 2
uint8_t ds3231_alarm_get_alarm2 (ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
 alarm example get the alarm 2
uint8_t ds3231_alarm_clear_flag (ds3231_alarm_t alarm)
 alarm clear the interrupt flag
uint8_t ds3231_alarm_enable (ds3231_alarm_t alarm)
 enable the alarm
uint8_t ds3231_alarm_disable (ds3231_alarm_t alarm)
 disable the alarm
uint8_t ds3231_alarm_set_time (ds3231_time_t *t)
 alarm example set the time
uint8_t ds3231_alarm_get_time (ds3231_time_t *t)
 alarm example get the time
uint8_t ds3231_alarm_set_timestamp (time_t timestamp)
 alarm example set the time by a unix timestamp
uint8_t ds3231_alarm_get_timestamp (time_t *timestamp)
 alarm example get the time in a unix timestamp
uint8_t ds3231_alarm_set_timestamp_time_zone (int8_t zone)
 alarm example set the local time zone
uint8_t ds3231_alarm_get_timestamp_time_zone (int8_t *zone)
 alarm example get the local time zone
uint8_t ds3231_alarm_get_temperature (int16_t *raw, float *s)
 alarm example get the current temperature
uint8_t ds3231_alarm_alarm_ascii_time (char *buf, uint8_t len)
 alarm example get the ascii time
-

Detailed Description

+

Detailed Description

driver ds3231 alarm header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -185,11 +179,19 @@

history

Definition in file driver_ds3231_alarm.h.

+ +
diff --git a/doc/html/driver__ds3231__alarm_8h__dep__incl.md5 b/doc/html/driver__ds3231__alarm_8h__dep__incl.md5 new file mode 100644 index 0000000..e4a459c --- /dev/null +++ b/doc/html/driver__ds3231__alarm_8h__dep__incl.md5 @@ -0,0 +1 @@ +9e7975048bd6e6eac388bec301c9a9fd \ No newline at end of file diff --git a/doc/html/driver__ds3231__alarm_8h__dep__incl.svg b/doc/html/driver__ds3231__alarm_8h__dep__incl.svg new file mode 100644 index 0000000..ef59d86 --- /dev/null +++ b/doc/html/driver__ds3231__alarm_8h__dep__incl.svg @@ -0,0 +1,41 @@ + + + + + + +example/driver_ds3231_alarm.h + + +Node1 + + +example/driver_ds3231 +_alarm.h + + + + + +Node2 + + +example/driver_ds3231 +_alarm.c + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/driver__ds3231__alarm_8h__incl.md5 b/doc/html/driver__ds3231__alarm_8h__incl.md5 new file mode 100644 index 0000000..61a75d9 --- /dev/null +++ b/doc/html/driver__ds3231__alarm_8h__incl.md5 @@ -0,0 +1 @@ +58a848c8b2ad08936454628ba9c02fa4 \ No newline at end of file diff --git a/doc/html/driver__ds3231__alarm_8h__incl.svg b/doc/html/driver__ds3231__alarm_8h__incl.svg new file mode 100644 index 0000000..212dfcf --- /dev/null +++ b/doc/html/driver__ds3231__alarm_8h__incl.svg @@ -0,0 +1,130 @@ + + + + + + +example/driver_ds3231_alarm.h + + +Node1 + + +example/driver_ds3231 +_alarm.h + + + + + +Node2 + + +driver_ds3231_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node7 + + +time.h + + + + + +Node1->Node7 + + + + + + + + +Node3 + + +driver_ds3231.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdio.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdint.h + + + + + +Node3->Node5 + + + + + + + + +Node6 + + +string.h + + + + + +Node3->Node6 + + + + + + + + diff --git a/doc/html/driver__ds3231__alarm_8h_source.html b/doc/html/driver__ds3231__alarm_8h_source.html index 9ef67c6..a8f0108 100644 --- a/doc/html/driver__ds3231__alarm_8h_source.html +++ b/doc/html/driver__ds3231__alarm_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: example/driver_ds3231_alarm.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_alarm.h
+
driver_ds3231_alarm.h
-Go to the documentation of this file.
1 
-
38 #ifndef DRIVER_DS3231_ALARM_H
-
39 #define DRIVER_DS3231_ALARM_H
-
40 
- -
42 #include <time.h>
-
43 
-
44 #ifdef __cplusplus
-
45 extern "C"{
-
46 #endif
-
47 
-
56 #define DS3231_ALARM_DEFAULT_AGING_OFFSET 0
-
65 uint8_t ds3231_alarm_irq_handler(void);
-
66 
-
75 uint8_t ds3231_alarm_init(void (*alarm_receive_callback)(uint8_t type));
-
76 
-
84 uint8_t ds3231_alarm_deinit(void);
-
85 
- -
96 
- -
107 
- -
118 
- -
129 
- -
139 
-
148 uint8_t ds3231_alarm_enable(ds3231_alarm_t alarm);
-
149 
-
158 uint8_t ds3231_alarm_disable(ds3231_alarm_t alarm);
-
159 
- -
169 
- -
179 
-
188 uint8_t ds3231_alarm_set_timestamp(time_t timestamp);
-
189 
-
198 uint8_t ds3231_alarm_get_timestamp(time_t *timestamp);
-
199 
-
207 uint8_t ds3231_alarm_set_timestamp_time_zone(int8_t zone);
-
208 
-
216 uint8_t ds3231_alarm_get_timestamp_time_zone(int8_t *zone);
-
217 
-
227 uint8_t ds3231_alarm_get_temperature(int16_t *raw, float *s);
-
228 
-
238 uint8_t ds3231_alarm_alarm_ascii_time(char *buf, uint8_t len);
-
239 
-
244 #ifdef __cplusplus
-
245 }
-
246 #endif
-
247 
-
248 #endif
+Go to the documentation of this file.
1
+
37
+
38#ifndef DRIVER_DS3231_ALARM_H
+
39#define DRIVER_DS3231_ALARM_H
+
40
+ +
42#include <time.h>
+
43
+
44#ifdef __cplusplus
+
45extern "C"{
+
46#endif
+
47
+
52
+
56#define DS3231_ALARM_DEFAULT_AGING_OFFSET 0
+
57
+
65uint8_t ds3231_alarm_irq_handler(void);
+
66
+
75uint8_t ds3231_alarm_init(void (*alarm_receive_callback)(uint8_t type));
+
76
+
84uint8_t ds3231_alarm_deinit(void);
+
85
+ +
96
+ +
107
+ +
118
+ +
129
+ +
139
+ +
149
+ +
159
+ +
169
+ +
179
+
188uint8_t ds3231_alarm_set_timestamp(time_t timestamp);
+
189
+
198uint8_t ds3231_alarm_get_timestamp(time_t *timestamp);
+
199
+
207uint8_t ds3231_alarm_set_timestamp_time_zone(int8_t zone);
+
208
+
216uint8_t ds3231_alarm_get_timestamp_time_zone(int8_t *zone);
+
217
+
227uint8_t ds3231_alarm_get_temperature(int16_t *raw, float *s);
+
228
+
238uint8_t ds3231_alarm_alarm_ascii_time(char *buf, uint8_t len);
+
239
+
243
+
244#ifdef __cplusplus
+
245}
+
246#endif
+
247
+
248#endif
driver ds3231 interface header file
-
ds3231_alarm2_mode_t
ds3231 alarm2 enumeration definition
-
ds3231_alarm1_mode_t
ds3231 alarm1 enumeration definition
-
ds3231_alarm_t
ds3231 alarm enumeration definition
Definition: driver_ds3231.h:73
-
uint8_t ds3231_alarm_get_time(ds3231_time_t *t)
alarm example get the time
-
uint8_t ds3231_alarm_set_alarm2(ds3231_time_t *t, ds3231_alarm2_mode_t mode)
alarm example set the alarm 2
-
uint8_t ds3231_alarm_set_alarm1(ds3231_time_t *t, ds3231_alarm1_mode_t mode)
alarm example set the alarm 1
-
uint8_t ds3231_alarm_enable(ds3231_alarm_t alarm)
enable the alarm
-
uint8_t ds3231_alarm_set_timestamp(time_t timestamp)
alarm example set the time by a unix timestamp
-
uint8_t ds3231_alarm_get_temperature(int16_t *raw, float *s)
alarm example get the current temperature
-
uint8_t ds3231_alarm_init(void(*alarm_receive_callback)(uint8_t type))
alarm example init
-
uint8_t ds3231_alarm_disable(ds3231_alarm_t alarm)
disable the alarm
-
uint8_t ds3231_alarm_clear_flag(ds3231_alarm_t alarm)
alarm clear the interrupt flag
-
uint8_t ds3231_alarm_set_time(ds3231_time_t *t)
alarm example set the time
-
uint8_t ds3231_alarm_set_timestamp_time_zone(int8_t zone)
alarm example set the local time zone
-
uint8_t ds3231_alarm_get_alarm1(ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
alarm example get the alarm 1
-
uint8_t ds3231_alarm_irq_handler(void)
alarm irq handler
-
uint8_t ds3231_alarm_get_timestamp(time_t *timestamp)
alarm example get the time in a unix timestamp
-
uint8_t ds3231_alarm_get_timestamp_time_zone(int8_t *zone)
alarm example get the local time zone
-
uint8_t ds3231_alarm_get_alarm2(ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
alarm example get the alarm 2
-
uint8_t ds3231_alarm_alarm_ascii_time(char *buf, uint8_t len)
alarm example get the ascii time
-
uint8_t ds3231_alarm_deinit(void)
alarm example deinit
-
ds3231 time structure definition
+
ds3231_alarm2_mode_t
ds3231 alarm2 enumeration definition
+
ds3231_alarm1_mode_t
ds3231 alarm1 enumeration definition
+
struct ds3231_time_s ds3231_time_t
ds3231 time structure definition
+
ds3231_alarm_t
ds3231 alarm enumeration definition
+
uint8_t ds3231_alarm_get_time(ds3231_time_t *t)
alarm example get the time
+
uint8_t ds3231_alarm_set_alarm2(ds3231_time_t *t, ds3231_alarm2_mode_t mode)
alarm example set the alarm 2
+
uint8_t ds3231_alarm_set_alarm1(ds3231_time_t *t, ds3231_alarm1_mode_t mode)
alarm example set the alarm 1
+
uint8_t ds3231_alarm_enable(ds3231_alarm_t alarm)
enable the alarm
+
uint8_t ds3231_alarm_set_timestamp(time_t timestamp)
alarm example set the time by a unix timestamp
+
uint8_t ds3231_alarm_get_temperature(int16_t *raw, float *s)
alarm example get the current temperature
+
uint8_t ds3231_alarm_init(void(*alarm_receive_callback)(uint8_t type))
alarm example init
+
uint8_t ds3231_alarm_disable(ds3231_alarm_t alarm)
disable the alarm
+
uint8_t ds3231_alarm_clear_flag(ds3231_alarm_t alarm)
alarm clear the interrupt flag
+
uint8_t ds3231_alarm_set_time(ds3231_time_t *t)
alarm example set the time
+
uint8_t ds3231_alarm_set_timestamp_time_zone(int8_t zone)
alarm example set the local time zone
+
uint8_t ds3231_alarm_get_alarm1(ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
alarm example get the alarm 1
+
uint8_t ds3231_alarm_irq_handler(void)
alarm irq handler
+
uint8_t ds3231_alarm_get_timestamp(time_t *timestamp)
alarm example get the time in a unix timestamp
+
uint8_t ds3231_alarm_get_timestamp_time_zone(int8_t *zone)
alarm example get the local time zone
+
uint8_t ds3231_alarm_get_alarm2(ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
alarm example get the alarm 2
+
uint8_t ds3231_alarm_alarm_ascii_time(char *buf, uint8_t len)
alarm example get the ascii time
+
uint8_t ds3231_alarm_deinit(void)
alarm example deinit
+
diff --git a/doc/html/driver__ds3231__alarm__test_8c.html b/doc/html/driver__ds3231__alarm__test_8c.html index cfa08d8..91ecfae 100644 --- a/doc/html/driver__ds3231__alarm__test_8c.html +++ b/doc/html/driver__ds3231__alarm__test_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_alarm_test.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_alarm_test.c File Reference
+
driver_ds3231_alarm_test.c File Reference
@@ -95,16 +99,20 @@ More...

#include "driver_ds3231_alarm_test.h"
#include <stdlib.h>
+
+Include dependency graph for driver_ds3231_alarm_test.c:
+
+
+

Go to the source code of this file.

- - - - + +

+

Functions

uint8_t ds3231_alarm_test (void)
 alarm test More...
 
uint8_t ds3231_alarm_test (void)
 alarm test
-

Detailed Description

+

Detailed Description

driver ds3231 alarm test source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -127,11 +135,19 @@

history

Definition in file driver_ds3231_alarm_test.c.

+ +
diff --git a/doc/html/driver__ds3231__alarm__test_8c__incl.md5 b/doc/html/driver__ds3231__alarm__test_8c__incl.md5 new file mode 100644 index 0000000..fae3b4e --- /dev/null +++ b/doc/html/driver__ds3231__alarm__test_8c__incl.md5 @@ -0,0 +1 @@ +4b45e0ab41d83814ad2707a8af2d9246 \ No newline at end of file diff --git a/doc/html/driver__ds3231__alarm__test_8c__incl.svg b/doc/html/driver__ds3231__alarm__test_8c__incl.svg new file mode 100644 index 0000000..d684c00 --- /dev/null +++ b/doc/html/driver__ds3231__alarm__test_8c__incl.svg @@ -0,0 +1,149 @@ + + + + + + +test/driver_ds3231_alarm_test.c + + +Node1 + + +test/driver_ds3231 +_alarm_test.c + + + + + +Node2 + + +driver_ds3231_alarm +_test.h + + + + + +Node1->Node2 + + + + + + + + +Node8 + + +stdlib.h + + + + + +Node1->Node8 + + + + + + + + +Node3 + + +driver_ds3231_interface.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +driver_ds3231.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdio.h + + + + + +Node4->Node5 + + + + + + + + +Node6 + + +stdint.h + + + + + +Node4->Node6 + + + + + + + + +Node7 + + +string.h + + + + + +Node4->Node7 + + + + + + + + diff --git a/doc/html/driver__ds3231__alarm__test_8c_source.html b/doc/html/driver__ds3231__alarm__test_8c_source.html index 04f0049..3e39ccf 100644 --- a/doc/html/driver__ds3231__alarm__test_8c_source.html +++ b/doc/html/driver__ds3231__alarm__test_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_alarm_test.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_alarm_test.c
+
driver_ds3231_alarm_test.c
-Go to the documentation of this file.
1 
- -
39 #include <stdlib.h>
-
40 
-
41 static ds3231_handle_t gs_handle;
-
50 uint8_t ds3231_alarm_test(void)
-
51 {
-
52  uint8_t res;
-
53  int8_t reg;
-
54  uint8_t times;
-
55  uint8_t status;
-
56  ds3231_info_t info;
-
57  ds3231_time_t time_in;
-
58 
-
59  /* link functions */
- - - - - - - - -
68 
-
69  /* get ds3231 info */
-
70  res = ds3231_info(&info);
-
71  if (res != 0)
-
72  {
-
73  ds3231_interface_debug_print("ds3231: get info failed.\n");
-
74 
-
75  return 1;
-
76  }
-
77  else
-
78  {
-
79  /* print ds3231 info */
-
80  ds3231_interface_debug_print("ds3231: chip is %s.\n", info.chip_name);
-
81  ds3231_interface_debug_print("ds3231: manufacturer is %s.\n", info.manufacturer_name);
-
82  ds3231_interface_debug_print("ds3231: interface is %s.\n", info.interface);
-
83  ds3231_interface_debug_print("ds3231: driver version is %d.%d.\n", info.driver_version / 1000, (info.driver_version % 1000) / 100);
-
84  ds3231_interface_debug_print("ds3231: min supply voltage is %0.1fV.\n", info.supply_voltage_min_v);
-
85  ds3231_interface_debug_print("ds3231: max supply voltage is %0.1fV.\n", info.supply_voltage_max_v);
-
86  ds3231_interface_debug_print("ds3231: max current is %0.2fmA.\n", info.max_current_ma);
-
87  ds3231_interface_debug_print("ds3231: max temperature is %0.1fC.\n", info.temperature_max);
-
88  ds3231_interface_debug_print("ds3231: min temperature is %0.1fC.\n", info.temperature_min);
-
89  }
-
90 
-
91  /* start alarm test */
-
92  ds3231_interface_debug_print("ds3231: start alarm test.\n");
-
93 
-
94  /* init ds3231 */
-
95  res = ds3231_init(&gs_handle);
-
96  if (res != 0)
-
97  {
-
98  ds3231_interface_debug_print("ds3231: init failed.\n");
-
99 
-
100  return 1;
-
101  }
-
102 
-
103  /* set oscillator */
-
104  res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
-
105  if (res != 0)
-
106  {
-
107  ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
-
108  (void)ds3231_deinit(&gs_handle);
-
109 
-
110  return 1;
-
111  }
-
112 
-
113  /* enable alarm1 */
- -
115  if (res != 0)
-
116  {
-
117  ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
-
118  (void)ds3231_deinit(&gs_handle);
-
119 
-
120  return 1;
-
121  }
-
122 
-
123  /* enable alarm2 */
- -
125  if (res != 0)
-
126  {
-
127  ds3231_interface_debug_print("ds3231: set alarm2 interrupt failed.\n");
-
128  (void)ds3231_deinit(&gs_handle);
-
129 
-
130  return 1;
-
131  }
-
132 
-
133  /* set interrupt */
-
134  res = ds3231_set_pin(&gs_handle, DS3231_PIN_INTERRUPT);
-
135  if (res != 0)
-
136  {
-
137  ds3231_interface_debug_print("ds3231: set pin failed.\n");
-
138  (void)ds3231_deinit(&gs_handle);
-
139 
-
140  return 1;
-
141  }
-
142 
-
143  /* disable square wave */
-
144  res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
-
145  if (res != 0)
-
146  {
-
147  ds3231_interface_debug_print("ds3231: set square wave failed.\n");
-
148  (void)ds3231_deinit(&gs_handle);
-
149 
-
150  return 1;
-
151  }
-
152 
-
153  /* disable 32khz output */
-
154  res = ds3231_set_32khz_output(&gs_handle, DS3231_BOOL_FALSE);
-
155  if (res != 0)
-
156  {
-
157  ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
-
158  (void)ds3231_deinit(&gs_handle);
-
159 
-
160  return 1;
-
161  }
-
162 
-
163  /* convert to register */
-
164  res = ds3231_aging_offset_convert_to_register(&gs_handle, 0, (int8_t *)&reg);
-
165  if (res != 0)
-
166  {
-
167  ds3231_interface_debug_print("ds3231: convert to register failed.\n");
-
168  (void)ds3231_deinit(&gs_handle);
-
169 
-
170  return 1;
-
171  }
-
172 
-
173  /* set aging offset */
-
174  res = ds3231_set_aging_offset(&gs_handle, reg);
-
175  if (res != 0)
-
176  {
-
177  ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
-
178  (void)ds3231_deinit(&gs_handle);
-
179 
-
180  return 1;
-
181  }
-
182 
-
183  /* 24H format */
-
184  time_in.format = DS3231_FORMAT_24H;
-
185  time_in.am_pm = DS3231_AM;
-
186  time_in.year = rand() % 100 + 2090;
-
187  time_in.month = rand() % 12 + 1;
-
188  time_in.date = rand() % 20 + 1;
-
189  time_in.week = rand() % 7 + 1;
-
190  time_in.hour = rand() % 12 + 12;
-
191  time_in.minute = rand() % 60;
-
192  time_in.second = rand() % 60;
-
193  ds3231_interface_debug_print("ds3231: set time %04d-%02d-%02d %02d:%02d:%02d %d in 24 format.\n",
-
194  time_in.year, time_in.month, time_in.date,
-
195  time_in.hour, time_in.minute, time_in.second, time_in.week
-
196  );
-
197  res = ds3231_set_time(&gs_handle, &time_in);
-
198  if (res != 0)
-
199  {
-
200  ds3231_interface_debug_print("ds3231: set time failed.\n");
-
201  (void)ds3231_deinit(&gs_handle);
-
202 
-
203  return 1;
-
204  }
-
205 
-
206  /* clear alarm 1 */
-
207  res = ds3231_alarm_clear(&gs_handle, DS3231_ALARM_1);
-
208  if (res != 0)
-
209  {
-
210  ds3231_interface_debug_print("ds3231: alarm clear failed.\n");
-
211  (void)ds3231_deinit(&gs_handle);
-
212 
-
213  return 1;
-
214  }
-
215  res = ds3231_set_alarm1(&gs_handle, &time_in, DS3231_ALARM1_MODE_ONCE_A_SECOND);
-
216  if (res != 0)
-
217  {
-
218  ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
-
219  (void)ds3231_deinit(&gs_handle);
-
220 
-
221  return 1;
-
222  }
- -
224  res = ds3231_get_status(&gs_handle, (uint8_t *)&status);
-
225  if (res != 0)
-
226  {
-
227  ds3231_interface_debug_print("ds3231: get status failed.\n");
-
228  (void)ds3231_deinit(&gs_handle);
-
229 
-
230  return 1;
-
231  }
-
232  if ((status & DS3231_STATUS_ALARM_1) != 0)
-
233  {
-
234  ds3231_interface_debug_print("ds3231: check alarm1 %s.\n", "ok");
-
235  }
-
236  else
-
237  {
-
238  ds3231_interface_debug_print("ds3231: check alarm1 %s.\n", "error");
-
239  (void)ds3231_deinit(&gs_handle);
-
240 
-
241  return 1;
-
242  }
-
243 
-
244  /* disable alarm1 */
- -
246  if (res != 0)
-
247  {
-
248  ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
-
249  (void)ds3231_deinit(&gs_handle);
-
250 
-
251  return 1;
-
252  }
-
253 
-
254  /* clear alarm 2 */
-
255  res = ds3231_alarm_clear(&gs_handle, DS3231_ALARM_2);
-
256  if (res != 0)
-
257  {
-
258  ds3231_interface_debug_print("ds3231: alarm clear failed.\n");
-
259  (void)ds3231_deinit(&gs_handle);
-
260 
-
261  return 1;
-
262  }
-
263  res = ds3231_set_alarm2(&gs_handle, &time_in, DS3231_ALARM2_MODE_ONCE_A_MINUTE);
-
264  if (res != 0)
-
265  {
-
266  ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
-
267  (void)ds3231_deinit(&gs_handle);
-
268 
-
269  return 1;
-
270  }
-
271  times = 61;
-
272  while (times != 0)
-
273  {
- -
275  times--;
-
276  ds3231_interface_debug_print("ds3231: time left %ds.\n", times);
-
277  }
-
278  res = ds3231_get_status(&gs_handle, (uint8_t *)&status);
-
279  if (res != 0)
-
280  {
-
281  ds3231_interface_debug_print("ds3231: get status failed.\n");
-
282  (void)ds3231_deinit(&gs_handle);
-
283 
-
284  return 1;
-
285  }
-
286  if ((status & DS3231_STATUS_ALARM_2) != 0)
-
287  {
-
288  ds3231_interface_debug_print("ds3231: check alarm2 %s.\n", "ok");
-
289  }
-
290  else
-
291  {
-
292  ds3231_interface_debug_print("ds3231: check alarm2 %s.\n", "error");
-
293  (void)ds3231_deinit(&gs_handle);
-
294 
-
295  return 1;
-
296  }
-
297 
-
298  /* disable alarm2 */
- -
300  if (res != 0)
-
301  {
-
302  ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
-
303  (void)ds3231_deinit(&gs_handle);
-
304 
-
305  return 1;
-
306  }
-
307 
-
308  /* finish alarm test */
-
309  ds3231_interface_debug_print("ds3231: finish alarm test.\n");
-
310  (void)ds3231_deinit(&gs_handle);
-
311 
-
312  return 0;
-
313 }
+Go to the documentation of this file.
1
+
37
+ +
39#include <stdlib.h>
+
40
+
41static ds3231_handle_t gs_handle;
+
42
+
+
50uint8_t ds3231_alarm_test(void)
+
51{
+
52 uint8_t res;
+
53 int8_t reg;
+
54 uint8_t times;
+
55 uint8_t status;
+
56 ds3231_info_t info;
+
57 ds3231_time_t time_in;
+
58
+
59 /* link functions */
+ + + + + + + + +
68
+
69 /* get ds3231 info */
+
70 res = ds3231_info(&info);
+
71 if (res != 0)
+
72 {
+
73 ds3231_interface_debug_print("ds3231: get info failed.\n");
+
74
+
75 return 1;
+
76 }
+
77 else
+
78 {
+
79 /* print ds3231 info */
+
80 ds3231_interface_debug_print("ds3231: chip is %s.\n", info.chip_name);
+
81 ds3231_interface_debug_print("ds3231: manufacturer is %s.\n", info.manufacturer_name);
+
82 ds3231_interface_debug_print("ds3231: interface is %s.\n", info.interface);
+
83 ds3231_interface_debug_print("ds3231: driver version is %d.%d.\n", info.driver_version / 1000, (info.driver_version % 1000) / 100);
+
84 ds3231_interface_debug_print("ds3231: min supply voltage is %0.1fV.\n", info.supply_voltage_min_v);
+
85 ds3231_interface_debug_print("ds3231: max supply voltage is %0.1fV.\n", info.supply_voltage_max_v);
+
86 ds3231_interface_debug_print("ds3231: max current is %0.2fmA.\n", info.max_current_ma);
+
87 ds3231_interface_debug_print("ds3231: max temperature is %0.1fC.\n", info.temperature_max);
+
88 ds3231_interface_debug_print("ds3231: min temperature is %0.1fC.\n", info.temperature_min);
+
89 }
+
90
+
91 /* start alarm test */
+
92 ds3231_interface_debug_print("ds3231: start alarm test.\n");
+
93
+
94 /* init ds3231 */
+
95 res = ds3231_init(&gs_handle);
+
96 if (res != 0)
+
97 {
+
98 ds3231_interface_debug_print("ds3231: init failed.\n");
+
99
+
100 return 1;
+
101 }
+
102
+
103 /* set oscillator */
+
104 res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
+
105 if (res != 0)
+
106 {
+
107 ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
+
108 (void)ds3231_deinit(&gs_handle);
+
109
+
110 return 1;
+
111 }
+
112
+
113 /* enable alarm1 */
+ +
115 if (res != 0)
+
116 {
+
117 ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
+
118 (void)ds3231_deinit(&gs_handle);
+
119
+
120 return 1;
+
121 }
+
122
+
123 /* enable alarm2 */
+ +
125 if (res != 0)
+
126 {
+
127 ds3231_interface_debug_print("ds3231: set alarm2 interrupt failed.\n");
+
128 (void)ds3231_deinit(&gs_handle);
+
129
+
130 return 1;
+
131 }
+
132
+
133 /* set interrupt */
+
134 res = ds3231_set_pin(&gs_handle, DS3231_PIN_INTERRUPT);
+
135 if (res != 0)
+
136 {
+
137 ds3231_interface_debug_print("ds3231: set pin failed.\n");
+
138 (void)ds3231_deinit(&gs_handle);
+
139
+
140 return 1;
+
141 }
+
142
+
143 /* disable square wave */
+
144 res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
+
145 if (res != 0)
+
146 {
+
147 ds3231_interface_debug_print("ds3231: set square wave failed.\n");
+
148 (void)ds3231_deinit(&gs_handle);
+
149
+
150 return 1;
+
151 }
+
152
+
153 /* disable 32khz output */
+ +
155 if (res != 0)
+
156 {
+
157 ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
+
158 (void)ds3231_deinit(&gs_handle);
+
159
+
160 return 1;
+
161 }
+
162
+
163 /* convert to register */
+
164 res = ds3231_aging_offset_convert_to_register(&gs_handle, 0, (int8_t *)&reg);
+
165 if (res != 0)
+
166 {
+
167 ds3231_interface_debug_print("ds3231: convert to register failed.\n");
+
168 (void)ds3231_deinit(&gs_handle);
+
169
+
170 return 1;
+
171 }
+
172
+
173 /* set aging offset */
+
174 res = ds3231_set_aging_offset(&gs_handle, reg);
+
175 if (res != 0)
+
176 {
+
177 ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
+
178 (void)ds3231_deinit(&gs_handle);
+
179
+
180 return 1;
+
181 }
+
182
+
183 /* 24H format */
+
184 time_in.format = DS3231_FORMAT_24H;
+
185 time_in.am_pm = DS3231_AM;
+
186 time_in.year = rand() % 100 + 2090;
+
187 time_in.month = rand() % 12 + 1;
+
188 time_in.date = rand() % 20 + 1;
+
189 time_in.week = rand() % 7 + 1;
+
190 time_in.hour = rand() % 12 + 12;
+
191 time_in.minute = rand() % 60;
+
192 time_in.second = rand() % 60;
+
193 ds3231_interface_debug_print("ds3231: set time %04d-%02d-%02d %02d:%02d:%02d %d in 24 format.\n",
+
194 time_in.year, time_in.month, time_in.date,
+
195 time_in.hour, time_in.minute, time_in.second, time_in.week
+
196 );
+
197 res = ds3231_set_time(&gs_handle, &time_in);
+
198 if (res != 0)
+
199 {
+
200 ds3231_interface_debug_print("ds3231: set time failed.\n");
+
201 (void)ds3231_deinit(&gs_handle);
+
202
+
203 return 1;
+
204 }
+
205
+
206 /* clear alarm 1 */
+
207 res = ds3231_alarm_clear(&gs_handle, DS3231_ALARM_1);
+
208 if (res != 0)
+
209 {
+
210 ds3231_interface_debug_print("ds3231: alarm clear failed.\n");
+
211 (void)ds3231_deinit(&gs_handle);
+
212
+
213 return 1;
+
214 }
+
215 res = ds3231_set_alarm1(&gs_handle, &time_in, DS3231_ALARM1_MODE_ONCE_A_SECOND);
+
216 if (res != 0)
+
217 {
+
218 ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
+
219 (void)ds3231_deinit(&gs_handle);
+
220
+
221 return 1;
+
222 }
+ +
224 res = ds3231_get_status(&gs_handle, (uint8_t *)&status);
+
225 if (res != 0)
+
226 {
+
227 ds3231_interface_debug_print("ds3231: get status failed.\n");
+
228 (void)ds3231_deinit(&gs_handle);
+
229
+
230 return 1;
+
231 }
+
232 if ((status & DS3231_STATUS_ALARM_1) != 0)
+
233 {
+
234 ds3231_interface_debug_print("ds3231: check alarm1 %s.\n", "ok");
+
235 }
+
236 else
+
237 {
+
238 ds3231_interface_debug_print("ds3231: check alarm1 %s.\n", "error");
+
239 (void)ds3231_deinit(&gs_handle);
+
240
+
241 return 1;
+
242 }
+
243
+
244 /* disable alarm1 */
+ +
246 if (res != 0)
+
247 {
+
248 ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
+
249 (void)ds3231_deinit(&gs_handle);
+
250
+
251 return 1;
+
252 }
+
253
+
254 /* clear alarm 2 */
+
255 res = ds3231_alarm_clear(&gs_handle, DS3231_ALARM_2);
+
256 if (res != 0)
+
257 {
+
258 ds3231_interface_debug_print("ds3231: alarm clear failed.\n");
+
259 (void)ds3231_deinit(&gs_handle);
+
260
+
261 return 1;
+
262 }
+
263 res = ds3231_set_alarm2(&gs_handle, &time_in, DS3231_ALARM2_MODE_ONCE_A_MINUTE);
+
264 if (res != 0)
+
265 {
+
266 ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
+
267 (void)ds3231_deinit(&gs_handle);
+
268
+
269 return 1;
+
270 }
+
271 times = 61;
+
272 while (times != 0)
+
273 {
+ +
275 times--;
+
276 ds3231_interface_debug_print("ds3231: time left %ds.\n", times);
+
277 }
+
278 res = ds3231_get_status(&gs_handle, (uint8_t *)&status);
+
279 if (res != 0)
+
280 {
+
281 ds3231_interface_debug_print("ds3231: get status failed.\n");
+
282 (void)ds3231_deinit(&gs_handle);
+
283
+
284 return 1;
+
285 }
+
286 if ((status & DS3231_STATUS_ALARM_2) != 0)
+
287 {
+
288 ds3231_interface_debug_print("ds3231: check alarm2 %s.\n", "ok");
+
289 }
+
290 else
+
291 {
+
292 ds3231_interface_debug_print("ds3231: check alarm2 %s.\n", "error");
+
293 (void)ds3231_deinit(&gs_handle);
+
294
+
295 return 1;
+
296 }
+
297
+
298 /* disable alarm2 */
+ +
300 if (res != 0)
+
301 {
+
302 ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
+
303 (void)ds3231_deinit(&gs_handle);
+
304
+
305 return 1;
+
306 }
+
307
+
308 /* finish alarm test */
+
309 ds3231_interface_debug_print("ds3231: finish alarm test.\n");
+
310 (void)ds3231_deinit(&gs_handle);
+
311
+
312 return 0;
+
313}
+
driver ds3231 alarm test header file
-
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
-
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
-
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
-
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
-
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
-
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
-
uint8_t ds3231_set_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
set the alarm2 time
-
uint8_t ds3231_alarm_clear(ds3231_handle_t *handle, ds3231_alarm_t alarm)
clear the alarm flag
-
uint8_t ds3231_set_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
set the alarm1 time
-
@ DS3231_ALARM2_MODE_ONCE_A_MINUTE
-
@ DS3231_ALARM1_MODE_ONCE_A_SECOND
-
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
-
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
-
uint8_t ds3231_info(ds3231_info_t *info)
get chip's information
-
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
-
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
-
uint8_t ds3231_get_status(ds3231_handle_t *handle, uint8_t *status)
get the chip status
-
@ DS3231_AM
Definition: driver_ds3231.h:83
-
@ DS3231_ALARM_2
Definition: driver_ds3231.h:75
-
@ DS3231_ALARM_1
Definition: driver_ds3231.h:74
-
@ DS3231_FORMAT_24H
-
@ DS3231_PIN_INTERRUPT
Definition: driver_ds3231.h:93
-
@ DS3231_STATUS_ALARM_1
-
@ DS3231_STATUS_ALARM_2
-
@ DS3231_BOOL_TRUE
Definition: driver_ds3231.h:66
-
@ DS3231_BOOL_FALSE
Definition: driver_ds3231.h:65
-
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
-
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
-
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
-
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
-
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
- - - - - - - - -
uint8_t ds3231_alarm_test(void)
alarm test
-
ds3231 handle structure definition
-
ds3231 information structure definition
-
float temperature_max
-
float supply_voltage_max_v
-
uint32_t driver_version
-
float temperature_min
-
float max_current_ma
-
char manufacturer_name[32]
-
float supply_voltage_min_v
-
char interface[8]
-
char chip_name[32]
-
ds3231 time structure definition
- - -
ds3231_am_pm_t am_pm
- - -
ds3231_format_t format
- - - +
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
+
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
+
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
+
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
+
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
+
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
+
uint8_t ds3231_set_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
set the alarm2 time
+
uint8_t ds3231_alarm_clear(ds3231_handle_t *handle, ds3231_alarm_t alarm)
clear the alarm flag
+
uint8_t ds3231_set_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
set the alarm1 time
+
@ DS3231_ALARM2_MODE_ONCE_A_MINUTE
+
@ DS3231_ALARM1_MODE_ONCE_A_SECOND
+
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
+
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
+
struct ds3231_time_s ds3231_time_t
ds3231 time structure definition
+
uint8_t ds3231_info(ds3231_info_t *info)
get chip's information
+
struct ds3231_handle_s ds3231_handle_t
ds3231 handle structure definition
+
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
+
struct ds3231_info_s ds3231_info_t
ds3231 information structure definition
+
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
+
uint8_t ds3231_get_status(ds3231_handle_t *handle, uint8_t *status)
get the chip status
+
@ DS3231_AM
+
@ DS3231_ALARM_2
+
@ DS3231_ALARM_1
+
@ DS3231_FORMAT_24H
+
@ DS3231_PIN_INTERRUPT
+
@ DS3231_STATUS_ALARM_1
+
@ DS3231_STATUS_ALARM_2
+
@ DS3231_BOOL_TRUE
+
@ DS3231_BOOL_FALSE
+
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
+
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
+
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
+
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
+
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+ + + + + + + + +
uint8_t ds3231_alarm_test(void)
alarm test
+ +
float supply_voltage_max_v
+
uint32_t driver_version
+ + +
char manufacturer_name[32]
+
float supply_voltage_min_v
+ +
char chip_name[32]
+ + +
ds3231_am_pm_t am_pm
+ + +
ds3231_format_t format
+ + +
+
diff --git a/doc/html/driver__ds3231__alarm__test_8h.html b/doc/html/driver__ds3231__alarm__test_8h.html index e0ebdc8..1318748 100644 --- a/doc/html/driver__ds3231__alarm__test_8h.html +++ b/doc/html/driver__ds3231__alarm__test_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_alarm_test.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_alarm_test.h File Reference
+
driver_ds3231_alarm_test.h File Reference

driver ds3231 alarm test header file More...

+Include dependency graph for driver_ds3231_alarm_test.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+

Go to the source code of this file.

- - - - + +

+

Functions

uint8_t ds3231_alarm_test (void)
 alarm test More...
 
uint8_t ds3231_alarm_test (void)
 alarm test
-

Detailed Description

+

Detailed Description

driver ds3231 alarm test header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -126,11 +139,19 @@

history

Definition in file driver_ds3231_alarm_test.h.

+ +
diff --git a/doc/html/driver__ds3231__alarm__test_8h__dep__incl.md5 b/doc/html/driver__ds3231__alarm__test_8h__dep__incl.md5 new file mode 100644 index 0000000..1bf82ac --- /dev/null +++ b/doc/html/driver__ds3231__alarm__test_8h__dep__incl.md5 @@ -0,0 +1 @@ +c041fcfee3739c2a04e5c10d010a93a3 \ No newline at end of file diff --git a/doc/html/driver__ds3231__alarm__test_8h__dep__incl.svg b/doc/html/driver__ds3231__alarm__test_8h__dep__incl.svg new file mode 100644 index 0000000..18e463f --- /dev/null +++ b/doc/html/driver__ds3231__alarm__test_8h__dep__incl.svg @@ -0,0 +1,41 @@ + + + + + + +test/driver_ds3231_alarm_test.h + + +Node1 + + +test/driver_ds3231 +_alarm_test.h + + + + + +Node2 + + +test/driver_ds3231 +_alarm_test.c + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/driver__ds3231__alarm__test_8h__incl.md5 b/doc/html/driver__ds3231__alarm__test_8h__incl.md5 new file mode 100644 index 0000000..b834526 --- /dev/null +++ b/doc/html/driver__ds3231__alarm__test_8h__incl.md5 @@ -0,0 +1 @@ +292e8844b805fd1a28f748a44e390e1e \ No newline at end of file diff --git a/doc/html/driver__ds3231__alarm__test_8h__incl.svg b/doc/html/driver__ds3231__alarm__test_8h__incl.svg new file mode 100644 index 0000000..387b53b --- /dev/null +++ b/doc/html/driver__ds3231__alarm__test_8h__incl.svg @@ -0,0 +1,112 @@ + + + + + + +test/driver_ds3231_alarm_test.h + + +Node1 + + +test/driver_ds3231 +_alarm_test.h + + + + + +Node2 + + +driver_ds3231_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ds3231.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdio.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdint.h + + + + + +Node3->Node5 + + + + + + + + +Node6 + + +string.h + + + + + +Node3->Node6 + + + + + + + + diff --git a/doc/html/driver__ds3231__alarm__test_8h_source.html b/doc/html/driver__ds3231__alarm__test_8h_source.html index 7aeb92d..3a8f2b4 100644 --- a/doc/html/driver__ds3231__alarm__test_8h_source.html +++ b/doc/html/driver__ds3231__alarm__test_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_alarm_test.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_alarm_test.h
+
driver_ds3231_alarm_test.h
-Go to the documentation of this file.
1 
-
38 #ifndef DRIVER_DS3231_ALARM_TEST_H
-
39 #define DRIVER_DS3231_ALARM_TEST_H
-
40 
- -
42 
-
43 #ifdef __cplusplus
-
44 extern "C"{
-
45 #endif
-
46 
-
59 uint8_t ds3231_alarm_test(void);
-
60 
-
65 #ifdef __cplusplus
-
66 }
-
67 #endif
-
68 
-
69 #endif
+Go to the documentation of this file.
1
+
37
+
38#ifndef DRIVER_DS3231_ALARM_TEST_H
+
39#define DRIVER_DS3231_ALARM_TEST_H
+
40
+ +
42
+
43#ifdef __cplusplus
+
44extern "C"{
+
45#endif
+
46
+
51
+
59uint8_t ds3231_alarm_test(void);
+
60
+
64
+
65#ifdef __cplusplus
+
66}
+
67#endif
+
68
+
69#endif
driver ds3231 interface header file
-
uint8_t ds3231_alarm_test(void)
alarm test
+
uint8_t ds3231_alarm_test(void)
alarm test
+
diff --git a/doc/html/driver__ds3231__basic_8c.html b/doc/html/driver__ds3231__basic_8c.html index 81f4141..18e2fd0 100644 --- a/doc/html/driver__ds3231__basic_8c.html +++ b/doc/html/driver__ds3231__basic_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: example/driver_ds3231_basic.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_basic.c File Reference
+
driver_ds3231_basic.c File Reference

driver ds3231 basic source file More...

+Include dependency graph for driver_ds3231_basic.c:
+
+
+

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_basic_init (void)
 basic example init More...
 
uint8_t ds3231_basic_deinit (void)
 basic example deinit More...
 
uint8_t ds3231_basic_set_time (ds3231_time_t *t)
 basic example set the time More...
 
uint8_t ds3231_basic_set_timestamp (time_t timestamp)
 basic example set the time by a unix timestamp More...
 
uint8_t ds3231_basic_set_timestamp_time_zone (int8_t zone)
 basic example set the local time zone More...
 
uint8_t ds3231_basic_get_time (ds3231_time_t *t)
 basic example get the time More...
 
uint8_t ds3231_basic_get_timestamp (time_t *timestamp)
 basic example get the time in a unix timestamp More...
 
uint8_t ds3231_basic_get_timestamp_time_zone (int8_t *zone)
 basic example get the local time zone More...
 
uint8_t ds3231_basic_get_temperature (int16_t *raw, float *s)
 basic example get the current temperature More...
 
uint8_t ds3231_basic_get_ascii_time (char *buf, uint8_t len)
 basic example get the ascii time More...
 
uint8_t ds3231_basic_init (void)
 basic example init
uint8_t ds3231_basic_deinit (void)
 basic example deinit
uint8_t ds3231_basic_set_time (ds3231_time_t *t)
 basic example set the time
uint8_t ds3231_basic_set_timestamp (time_t timestamp)
 basic example set the time by a unix timestamp
uint8_t ds3231_basic_set_timestamp_time_zone (int8_t zone)
 basic example set the local time zone
uint8_t ds3231_basic_get_time (ds3231_time_t *t)
 basic example get the time
uint8_t ds3231_basic_get_timestamp (time_t *timestamp)
 basic example get the time in a unix timestamp
uint8_t ds3231_basic_get_timestamp_time_zone (int8_t *zone)
 basic example get the local time zone
uint8_t ds3231_basic_get_temperature (int16_t *raw, float *s)
 basic example get the current temperature
uint8_t ds3231_basic_get_ascii_time (char *buf, uint8_t len)
 basic example get the ascii time
-

Detailed Description

+

Detailed Description

driver ds3231 basic source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -153,11 +152,19 @@

history

Definition in file driver_ds3231_basic.c.

+ +
diff --git a/doc/html/driver__ds3231__basic_8c__incl.md5 b/doc/html/driver__ds3231__basic_8c__incl.md5 new file mode 100644 index 0000000..29b56ef --- /dev/null +++ b/doc/html/driver__ds3231__basic_8c__incl.md5 @@ -0,0 +1 @@ +bc0dcc49dfbde5c1cc96ebb713c153b6 \ No newline at end of file diff --git a/doc/html/driver__ds3231__basic_8c__incl.svg b/doc/html/driver__ds3231__basic_8c__incl.svg new file mode 100644 index 0000000..345e300 --- /dev/null +++ b/doc/html/driver__ds3231__basic_8c__incl.svg @@ -0,0 +1,148 @@ + + + + + + +example/driver_ds3231_basic.c + + +Node1 + + +example/driver_ds3231 +_basic.c + + + + + +Node2 + + +driver_ds3231_basic.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ds3231_interface.h + + + + + +Node2->Node3 + + + + + + + + +Node8 + + +time.h + + + + + +Node2->Node8 + + + + + + + + +Node4 + + +driver_ds3231.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdio.h + + + + + +Node4->Node5 + + + + + + + + +Node6 + + +stdint.h + + + + + +Node4->Node6 + + + + + + + + +Node7 + + +string.h + + + + + +Node4->Node7 + + + + + + + + diff --git a/doc/html/driver__ds3231__basic_8c_source.html b/doc/html/driver__ds3231__basic_8c_source.html index dfda682..b1cee11 100644 --- a/doc/html/driver__ds3231__basic_8c_source.html +++ b/doc/html/driver__ds3231__basic_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: example/driver_ds3231_basic.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_basic.c
+
driver_ds3231_basic.c
-Go to the documentation of this file.
1 
-
38 #include "driver_ds3231_basic.h"
-
39 
-
40 static ds3231_handle_t gs_handle;
-
41 static int8_t gs_time_zone = 0;
-
50 uint8_t ds3231_basic_init(void)
-
51 {
-
52  uint8_t res;
-
53  int8_t reg;
-
54 
-
55  /* link functions */
- - - - - - - - -
64 
-
65  /* init ds3231 */
-
66  res = ds3231_init(&gs_handle);
-
67  if (res != 0)
-
68  {
-
69  ds3231_interface_debug_print("ds3231: init failed.\n");
-
70 
-
71  return 1;
-
72  }
-
73 
-
74  /* set oscillator */
-
75  res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
-
76  if (res != 0)
-
77  {
-
78  ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
-
79  (void)ds3231_deinit(&gs_handle);
-
80 
-
81  return 1;
-
82  }
-
83 
-
84  /* disable alarm1 */
- -
86  if (res != 0)
-
87  {
-
88  ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
-
89  (void)ds3231_deinit(&gs_handle);
-
90 
-
91  return 1;
-
92  }
-
93 
-
94  /* disable alarm2 */
- -
96  if (res != 0)
-
97  {
-
98  ds3231_interface_debug_print("ds3231: set alarm2 interrupt failed.\n");
-
99  (void)ds3231_deinit(&gs_handle);
-
100 
-
101  return 1;
-
102  }
-
103 
-
104  /* set square wave */
-
105  res = ds3231_set_pin(&gs_handle, DS3231_PIN_SQUARE_WAVE);
-
106  if (res != 0)
-
107  {
-
108  ds3231_interface_debug_print("ds3231: set pin failed.\n");
-
109  (void)ds3231_deinit(&gs_handle);
-
110 
-
111  return 1;
-
112  }
-
113 
-
114  /* disable square wave */
-
115  res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
-
116  if (res != 0)
-
117  {
-
118  ds3231_interface_debug_print("ds3231: set square wave failed.\n");
-
119  (void)ds3231_deinit(&gs_handle);
-
120 
-
121  return 1;
-
122  }
-
123 
-
124  /* disable 32khz output */
-
125  res = ds3231_set_32khz_output(&gs_handle, DS3231_BOOL_FALSE);
-
126  if (res != 0)
-
127  {
-
128  ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
-
129  (void)ds3231_deinit(&gs_handle);
-
130 
-
131  return 1;
-
132  }
-
133 
-
134  /* convert to register */
- -
136  if (res != 0)
-
137  {
-
138  ds3231_interface_debug_print("ds3231: convert to register failed.\n");
-
139  (void)ds3231_deinit(&gs_handle);
-
140 
-
141  return 1;
-
142  }
-
143 
-
144  /* set aging offset */
-
145  res = ds3231_set_aging_offset(&gs_handle, reg);
-
146  if (res != 0)
-
147  {
-
148  ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
-
149  (void)ds3231_deinit(&gs_handle);
-
150 
-
151  return 1;
-
152  }
-
153 
-
154  return 0;
-
155 }
-
156 
-
164 uint8_t ds3231_basic_deinit(void)
-
165 {
-
166  if (ds3231_deinit(&gs_handle) != 0)
-
167  {
-
168  return 1;
-
169  }
-
170  else
-
171  {
-
172  return 0;
-
173  }
-
174 }
-
175 
- -
185 {
-
186  /* set time */
-
187  if (ds3231_set_time(&gs_handle, t) != 0)
-
188  {
-
189  return 1;
-
190  }
-
191  else
-
192  {
-
193  return 0;
-
194  }
-
195 }
-
196 
-
205 uint8_t ds3231_basic_set_timestamp(time_t timestamp)
-
206 {
-
207  ds3231_time_t t;
-
208  struct tm *timeptr;
-
209 
-
210  /* convert times */
-
211  timestamp += (time_t)(gs_time_zone * 3600);
-
212  timeptr = localtime(&timestamp);
-
213  t.am_pm = DS3231_AM;
-
214  t.date = (uint8_t)timeptr->tm_mday;
- -
216  t.hour = (uint8_t)timeptr->tm_hour;
-
217  t.minute = (uint8_t)timeptr->tm_min;
-
218  t.month = (uint8_t)timeptr->tm_mon + 1;
-
219  t.second = (uint8_t)timeptr->tm_sec;
-
220  if (timeptr->tm_wday == 0)
-
221  {
-
222  t.week = 7;
-
223  }
-
224  else
-
225  {
-
226  t.week = (uint8_t)timeptr->tm_wday;
-
227  }
-
228  t.year = (uint16_t)(timeptr->tm_year + 1900);
-
229 
-
230  /* set time */
-
231  if (ds3231_set_time(&gs_handle, &t) != 0)
-
232  {
-
233  return 1;
-
234  }
-
235  else
-
236  {
-
237  return 0;
-
238  }
-
239 }
-
240 
- -
249 {
-
250  gs_time_zone = zone;
-
251 
-
252  return 0;
-
253 }
-
254 
- -
264 {
-
265  /* get time */
-
266  if (ds3231_get_time(&gs_handle, t) != 0)
-
267  {
-
268  return 1;
-
269  }
-
270  else
-
271  {
-
272  return 0;
-
273  }
-
274 }
-
275 
-
284 uint8_t ds3231_basic_get_timestamp(time_t *timestamp)
-
285 {
-
286  ds3231_time_t t;
-
287  struct tm timeptr;
-
288 
-
289  /* get time */
-
290  if (ds3231_get_time(&gs_handle, &t) != 0)
-
291  {
-
292  return 1;
-
293  }
-
294  timeptr.tm_year = t.year - 1900;
-
295  timeptr.tm_mon = t.month - 1;
-
296  timeptr.tm_wday = t.week;
-
297  timeptr.tm_mday = t.date;
-
298  if (t.format == DS3231_FORMAT_24H)
-
299  {
-
300  timeptr.tm_hour = t.hour;
-
301  }
-
302  else
-
303  {
-
304  timeptr.tm_hour = t.hour % 12 + t.am_pm * 12;
-
305  }
-
306  timeptr.tm_min = t.minute;
-
307  timeptr.tm_sec = t.second;
-
308 
-
309  /* make time */
-
310  *timestamp = mktime(&timeptr) - gs_time_zone * 3600;
-
311 
-
312  return 0;
-
313 }
-
314 
- -
323 {
-
324  *zone = gs_time_zone;
-
325 
-
326  return 0;
-
327 }
-
328 
-
338 uint8_t ds3231_basic_get_temperature(int16_t *raw, float *s)
-
339 {
-
340  /* get temperature */
-
341  if (ds3231_get_temperature(&gs_handle, raw, s) != 0)
-
342  {
-
343  return 1;
-
344  }
-
345  else
-
346  {
-
347  return 0;
-
348  }
-
349 }
-
350 
-
360 uint8_t ds3231_basic_get_ascii_time(char *buf, uint8_t len)
-
361 {
-
362  ds3231_time_t t;
-
363 
-
364  /* get time */
-
365  if (ds3231_get_time(&gs_handle, &t) != 0)
-
366  {
-
367  return 1;
-
368  }
-
369 
-
370  if (t.format == DS3231_FORMAT_24H)
-
371  {
-
372  (void)snprintf(buf, len, "%04d-%02d-%02d %02d:%02d:%02d %d.\n", t.year, t.month, t.date, t.hour, t.minute, t.second, t.week);
-
373  }
-
374  else
-
375  {
-
376  (void)snprintf(buf, len, "%04d-%02d-%02d %s %02d:%02d:%02d %d.\n", t.year, t.month, t.date, (t.am_pm == DS3231_AM) ? "AM" : "PM",
-
377  t.hour, t.minute, t.second, t.week
-
378  );
-
379  }
-
380 
-
381  return 0;
-
382 }
+Go to the documentation of this file.
1
+
37
+
38#include "driver_ds3231_basic.h"
+
39
+
40static ds3231_handle_t gs_handle;
+
41static int8_t gs_time_zone = 0;
+
42
+
+
50uint8_t ds3231_basic_init(void)
+
51{
+
52 uint8_t res;
+
53 int8_t reg;
+
54
+
55 /* link functions */
+ + + + + + + + +
64
+
65 /* init ds3231 */
+
66 res = ds3231_init(&gs_handle);
+
67 if (res != 0)
+
68 {
+
69 ds3231_interface_debug_print("ds3231: init failed.\n");
+
70
+
71 return 1;
+
72 }
+
73
+
74 /* set oscillator */
+
75 res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
+
76 if (res != 0)
+
77 {
+
78 ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
+
79 (void)ds3231_deinit(&gs_handle);
+
80
+
81 return 1;
+
82 }
+
83
+
84 /* disable alarm1 */
+ +
86 if (res != 0)
+
87 {
+
88 ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
+
89 (void)ds3231_deinit(&gs_handle);
+
90
+
91 return 1;
+
92 }
+
93
+
94 /* disable alarm2 */
+ +
96 if (res != 0)
+
97 {
+
98 ds3231_interface_debug_print("ds3231: set alarm2 interrupt failed.\n");
+
99 (void)ds3231_deinit(&gs_handle);
+
100
+
101 return 1;
+
102 }
+
103
+
104 /* set square wave */
+
105 res = ds3231_set_pin(&gs_handle, DS3231_PIN_SQUARE_WAVE);
+
106 if (res != 0)
+
107 {
+
108 ds3231_interface_debug_print("ds3231: set pin failed.\n");
+
109 (void)ds3231_deinit(&gs_handle);
+
110
+
111 return 1;
+
112 }
+
113
+
114 /* disable square wave */
+
115 res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
+
116 if (res != 0)
+
117 {
+
118 ds3231_interface_debug_print("ds3231: set square wave failed.\n");
+
119 (void)ds3231_deinit(&gs_handle);
+
120
+
121 return 1;
+
122 }
+
123
+
124 /* disable 32khz output */
+ +
126 if (res != 0)
+
127 {
+
128 ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
+
129 (void)ds3231_deinit(&gs_handle);
+
130
+
131 return 1;
+
132 }
+
133
+
134 /* convert to register */
+ +
136 if (res != 0)
+
137 {
+
138 ds3231_interface_debug_print("ds3231: convert to register failed.\n");
+
139 (void)ds3231_deinit(&gs_handle);
+
140
+
141 return 1;
+
142 }
+
143
+
144 /* set aging offset */
+
145 res = ds3231_set_aging_offset(&gs_handle, reg);
+
146 if (res != 0)
+
147 {
+
148 ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
+
149 (void)ds3231_deinit(&gs_handle);
+
150
+
151 return 1;
+
152 }
+
153
+
154 return 0;
+
155}
+
+
156
+
+ +
165{
+
166 if (ds3231_deinit(&gs_handle) != 0)
+
167 {
+
168 return 1;
+
169 }
+
170 else
+
171 {
+
172 return 0;
+
173 }
+
174}
+
+
175
+
+ +
185{
+
186 /* set time */
+
187 if (ds3231_set_time(&gs_handle, t) != 0)
+
188 {
+
189 return 1;
+
190 }
+
191 else
+
192 {
+
193 return 0;
+
194 }
+
195}
+
+
196
+
+
205uint8_t ds3231_basic_set_timestamp(time_t timestamp)
+
206{
+ +
208 struct tm *timeptr;
+
209
+
210 /* convert times */
+
211 timestamp += (time_t)(gs_time_zone * 3600);
+
212 timeptr = localtime(&timestamp);
+
213 t.am_pm = DS3231_AM;
+
214 t.date = (uint8_t)timeptr->tm_mday;
+ +
216 t.hour = (uint8_t)timeptr->tm_hour;
+
217 t.minute = (uint8_t)timeptr->tm_min;
+
218 t.month = (uint8_t)timeptr->tm_mon + 1;
+
219 t.second = (uint8_t)timeptr->tm_sec;
+
220 if (timeptr->tm_wday == 0)
+
221 {
+
222 t.week = 7;
+
223 }
+
224 else
+
225 {
+
226 t.week = (uint8_t)timeptr->tm_wday;
+
227 }
+
228 t.year = (uint16_t)(timeptr->tm_year + 1900);
+
229
+
230 /* set time */
+
231 if (ds3231_set_time(&gs_handle, &t) != 0)
+
232 {
+
233 return 1;
+
234 }
+
235 else
+
236 {
+
237 return 0;
+
238 }
+
239}
+
+
240
+
+ +
249{
+
250 gs_time_zone = zone;
+
251
+
252 return 0;
+
253}
+
+
254
+
+ +
264{
+
265 /* get time */
+
266 if (ds3231_get_time(&gs_handle, t) != 0)
+
267 {
+
268 return 1;
+
269 }
+
270 else
+
271 {
+
272 return 0;
+
273 }
+
274}
+
+
275
+
+
284uint8_t ds3231_basic_get_timestamp(time_t *timestamp)
+
285{
+ +
287 struct tm timeptr;
+
288
+
289 /* get time */
+
290 if (ds3231_get_time(&gs_handle, &t) != 0)
+
291 {
+
292 return 1;
+
293 }
+
294 timeptr.tm_year = t.year - 1900;
+
295 timeptr.tm_mon = t.month - 1;
+
296 timeptr.tm_wday = t.week;
+
297 timeptr.tm_mday = t.date;
+
298 if (t.format == DS3231_FORMAT_24H)
+
299 {
+
300 timeptr.tm_hour = t.hour;
+
301 }
+
302 else
+
303 {
+
304 timeptr.tm_hour = t.hour % 12 + t.am_pm * 12;
+
305 }
+
306 timeptr.tm_min = t.minute;
+
307 timeptr.tm_sec = t.second;
+
308
+
309 /* make time */
+
310 *timestamp = mktime(&timeptr) - gs_time_zone * 3600;
+
311
+
312 return 0;
+
313}
+
+
314
+
+ +
323{
+
324 *zone = gs_time_zone;
+
325
+
326 return 0;
+
327}
+
+
328
+
+
338uint8_t ds3231_basic_get_temperature(int16_t *raw, float *s)
+
339{
+
340 /* get temperature */
+
341 if (ds3231_get_temperature(&gs_handle, raw, s) != 0)
+
342 {
+
343 return 1;
+
344 }
+
345 else
+
346 {
+
347 return 0;
+
348 }
+
349}
+
+
350
+
+
360uint8_t ds3231_basic_get_ascii_time(char *buf, uint8_t len)
+
361{
+ +
363
+
364 /* get time */
+
365 if (ds3231_get_time(&gs_handle, &t) != 0)
+
366 {
+
367 return 1;
+
368 }
+
369
+
370 if (t.format == DS3231_FORMAT_24H)
+
371 {
+
372 (void)snprintf(buf, len, "%04d-%02d-%02d %02d:%02d:%02d %d.\n", t.year, t.month, t.date, t.hour, t.minute, t.second, t.week);
+
373 }
+
374 else
+
375 {
+
376 (void)snprintf(buf, len, "%04d-%02d-%02d %s %02d:%02d:%02d %d.\n", t.year, t.month, t.date, (t.am_pm == DS3231_AM) ? "AM" : "PM",
+
377 t.hour, t.minute, t.second, t.week
+
378 );
+
379 }
+
380
+
381 return 0;
+
382}
+
driver ds3231 basic header file
-
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
-
uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
get the chip temperature
-
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
-
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
-
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
-
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
-
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
-
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
-
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
-
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
-
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
-
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
-
@ DS3231_AM
Definition: driver_ds3231.h:83
-
@ DS3231_ALARM_2
Definition: driver_ds3231.h:75
-
@ DS3231_ALARM_1
Definition: driver_ds3231.h:74
-
@ DS3231_FORMAT_24H
-
@ DS3231_PIN_SQUARE_WAVE
Definition: driver_ds3231.h:92
-
@ DS3231_BOOL_TRUE
Definition: driver_ds3231.h:66
-
@ DS3231_BOOL_FALSE
Definition: driver_ds3231.h:65
-
uint8_t ds3231_basic_get_temperature(int16_t *raw, float *s)
basic example get the current temperature
-
uint8_t ds3231_basic_set_time(ds3231_time_t *t)
basic example set the time
-
uint8_t ds3231_basic_get_timestamp_time_zone(int8_t *zone)
basic example get the local time zone
-
uint8_t ds3231_basic_set_timestamp(time_t timestamp)
basic example set the time by a unix timestamp
-
uint8_t ds3231_basic_set_timestamp_time_zone(int8_t zone)
basic example set the local time zone
-
uint8_t ds3231_basic_init(void)
basic example init
-
#define DS3231_BASIC_DEFAULT_AGING_OFFSET
ds3231 basic example default definition
-
uint8_t ds3231_basic_get_time(ds3231_time_t *t)
basic example get the time
-
uint8_t ds3231_basic_get_ascii_time(char *buf, uint8_t len)
basic example get the ascii time
-
uint8_t ds3231_basic_get_timestamp(time_t *timestamp)
basic example get the time in a unix timestamp
-
uint8_t ds3231_basic_deinit(void)
basic example deinit
-
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
-
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
-
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
-
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
-
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
- - - - - - - - -
ds3231 handle structure definition
-
ds3231 time structure definition
- - -
ds3231_am_pm_t am_pm
- - -
ds3231_format_t format
- - - +
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
+
uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
get the chip temperature
+
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
+
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
+
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
+
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
+
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
+
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
+
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
+
struct ds3231_time_s ds3231_time_t
ds3231 time structure definition
+
struct ds3231_handle_s ds3231_handle_t
ds3231 handle structure definition
+
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
+
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
+
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
+
@ DS3231_AM
+
@ DS3231_ALARM_2
+
@ DS3231_ALARM_1
+
@ DS3231_FORMAT_24H
+
@ DS3231_PIN_SQUARE_WAVE
+
@ DS3231_BOOL_TRUE
+
@ DS3231_BOOL_FALSE
+
uint8_t ds3231_basic_get_temperature(int16_t *raw, float *s)
basic example get the current temperature
+
uint8_t ds3231_basic_set_time(ds3231_time_t *t)
basic example set the time
+
uint8_t ds3231_basic_get_timestamp_time_zone(int8_t *zone)
basic example get the local time zone
+
uint8_t ds3231_basic_set_timestamp(time_t timestamp)
basic example set the time by a unix timestamp
+
uint8_t ds3231_basic_set_timestamp_time_zone(int8_t zone)
basic example set the local time zone
+
uint8_t ds3231_basic_init(void)
basic example init
+
#define DS3231_BASIC_DEFAULT_AGING_OFFSET
ds3231 basic example default definition
+
uint8_t ds3231_basic_get_time(ds3231_time_t *t)
basic example get the time
+
uint8_t ds3231_basic_get_ascii_time(char *buf, uint8_t len)
basic example get the ascii time
+
uint8_t ds3231_basic_get_timestamp(time_t *timestamp)
basic example get the time in a unix timestamp
+
uint8_t ds3231_basic_deinit(void)
basic example deinit
+
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
+
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
+
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
+
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
+
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+ + + + + + + + + + +
ds3231_am_pm_t am_pm
+ + +
ds3231_format_t format
+ + +
+
diff --git a/doc/html/driver__ds3231__basic_8h.html b/doc/html/driver__ds3231__basic_8h.html index 700b67f..edfcaa6 100644 --- a/doc/html/driver__ds3231__basic_8h.html +++ b/doc/html/driver__ds3231__basic_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: example/driver_ds3231_basic.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_basic.h File Reference
+
driver_ds3231_basic.h File Reference
@@ -96,49 +99,48 @@ More...

#include "driver_ds3231_interface.h"
#include <time.h>
+
+Include dependency graph for driver_ds3231_basic.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+

Go to the source code of this file.

- - - - + +

+

Macros

#define DS3231_BASIC_DEFAULT_AGING_OFFSET   0
 ds3231 basic example default definition More...
 
#define DS3231_BASIC_DEFAULT_AGING_OFFSET   0
 ds3231 basic example default definition
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_basic_init (void)
 basic example init More...
 
uint8_t ds3231_basic_deinit (void)
 basic example deinit More...
 
uint8_t ds3231_basic_set_time (ds3231_time_t *t)
 basic example set the time More...
 
uint8_t ds3231_basic_get_time (ds3231_time_t *t)
 basic example get the time More...
 
uint8_t ds3231_basic_set_timestamp (time_t timestamp)
 basic example set the time by a unix timestamp More...
 
uint8_t ds3231_basic_get_timestamp (time_t *timestamp)
 basic example get the time in a unix timestamp More...
 
uint8_t ds3231_basic_set_timestamp_time_zone (int8_t zone)
 basic example set the local time zone More...
 
uint8_t ds3231_basic_get_timestamp_time_zone (int8_t *zone)
 basic example get the local time zone More...
 
uint8_t ds3231_basic_get_temperature (int16_t *raw, float *s)
 basic example get the current temperature More...
 
uint8_t ds3231_basic_get_ascii_time (char *buf, uint8_t len)
 basic example get the ascii time More...
 
uint8_t ds3231_basic_init (void)
 basic example init
uint8_t ds3231_basic_deinit (void)
 basic example deinit
uint8_t ds3231_basic_set_time (ds3231_time_t *t)
 basic example set the time
uint8_t ds3231_basic_get_time (ds3231_time_t *t)
 basic example get the time
uint8_t ds3231_basic_set_timestamp (time_t timestamp)
 basic example set the time by a unix timestamp
uint8_t ds3231_basic_get_timestamp (time_t *timestamp)
 basic example get the time in a unix timestamp
uint8_t ds3231_basic_set_timestamp_time_zone (int8_t zone)
 basic example set the local time zone
uint8_t ds3231_basic_get_timestamp_time_zone (int8_t *zone)
 basic example get the local time zone
uint8_t ds3231_basic_get_temperature (int16_t *raw, float *s)
 basic example get the current temperature
uint8_t ds3231_basic_get_ascii_time (char *buf, uint8_t len)
 basic example get the ascii time
-

Detailed Description

+

Detailed Description

driver ds3231 basic header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -161,11 +163,19 @@

history

Definition in file driver_ds3231_basic.h.

+ +
diff --git a/doc/html/driver__ds3231__basic_8h__dep__incl.md5 b/doc/html/driver__ds3231__basic_8h__dep__incl.md5 new file mode 100644 index 0000000..75cc7b6 --- /dev/null +++ b/doc/html/driver__ds3231__basic_8h__dep__incl.md5 @@ -0,0 +1 @@ +94a05cdfaaf66d4a72690881159cb66d \ No newline at end of file diff --git a/doc/html/driver__ds3231__basic_8h__dep__incl.svg b/doc/html/driver__ds3231__basic_8h__dep__incl.svg new file mode 100644 index 0000000..1dab1ab --- /dev/null +++ b/doc/html/driver__ds3231__basic_8h__dep__incl.svg @@ -0,0 +1,41 @@ + + + + + + +example/driver_ds3231_basic.h + + +Node1 + + +example/driver_ds3231 +_basic.h + + + + + +Node2 + + +example/driver_ds3231 +_basic.c + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/driver__ds3231__basic_8h__incl.md5 b/doc/html/driver__ds3231__basic_8h__incl.md5 new file mode 100644 index 0000000..afd1aeb --- /dev/null +++ b/doc/html/driver__ds3231__basic_8h__incl.md5 @@ -0,0 +1 @@ +5e17842e91dbbc42ebe37f97907c9636 \ No newline at end of file diff --git a/doc/html/driver__ds3231__basic_8h__incl.svg b/doc/html/driver__ds3231__basic_8h__incl.svg new file mode 100644 index 0000000..f0283d3 --- /dev/null +++ b/doc/html/driver__ds3231__basic_8h__incl.svg @@ -0,0 +1,130 @@ + + + + + + +example/driver_ds3231_basic.h + + +Node1 + + +example/driver_ds3231 +_basic.h + + + + + +Node2 + + +driver_ds3231_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node7 + + +time.h + + + + + +Node1->Node7 + + + + + + + + +Node3 + + +driver_ds3231.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdio.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdint.h + + + + + +Node3->Node5 + + + + + + + + +Node6 + + +string.h + + + + + +Node3->Node6 + + + + + + + + diff --git a/doc/html/driver__ds3231__basic_8h_source.html b/doc/html/driver__ds3231__basic_8h_source.html index c9e7cbb..6c83be8 100644 --- a/doc/html/driver__ds3231__basic_8h_source.html +++ b/doc/html/driver__ds3231__basic_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: example/driver_ds3231_basic.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_basic.h
+
driver_ds3231_basic.h
-Go to the documentation of this file.
1 
-
38 #ifndef DRIVER_DS3231_BASIC_H
-
39 #define DRIVER_DS3231_BASIC_H
-
40 
- -
42 #include <time.h>
-
43 
-
44 #ifdef __cplusplus
-
45 extern "C"{
-
46 #endif
-
47 
-
58 #define DS3231_BASIC_DEFAULT_AGING_OFFSET 0
-
67 uint8_t ds3231_basic_init(void);
-
68 
-
76 uint8_t ds3231_basic_deinit(void);
-
77 
- -
87 
- -
97 
-
106 uint8_t ds3231_basic_set_timestamp(time_t timestamp);
-
107 
-
116 uint8_t ds3231_basic_get_timestamp(time_t *timestamp);
-
117 
-
125 uint8_t ds3231_basic_set_timestamp_time_zone(int8_t zone);
-
126 
-
134 uint8_t ds3231_basic_get_timestamp_time_zone(int8_t *zone);
-
135 
-
145 uint8_t ds3231_basic_get_temperature(int16_t *raw, float *s);
-
146 
-
156 uint8_t ds3231_basic_get_ascii_time(char *buf, uint8_t len);
-
157 
-
162 #ifdef __cplusplus
-
163 }
-
164 #endif
-
165 
-
166 #endif
+Go to the documentation of this file.
1
+
37
+
38#ifndef DRIVER_DS3231_BASIC_H
+
39#define DRIVER_DS3231_BASIC_H
+
40
+ +
42#include <time.h>
+
43
+
44#ifdef __cplusplus
+
45extern "C"{
+
46#endif
+
47
+
54
+
58#define DS3231_BASIC_DEFAULT_AGING_OFFSET 0
+
59
+
67uint8_t ds3231_basic_init(void);
+
68
+
76uint8_t ds3231_basic_deinit(void);
+
77
+ +
87
+ +
97
+
106uint8_t ds3231_basic_set_timestamp(time_t timestamp);
+
107
+
116uint8_t ds3231_basic_get_timestamp(time_t *timestamp);
+
117
+
125uint8_t ds3231_basic_set_timestamp_time_zone(int8_t zone);
+
126
+
134uint8_t ds3231_basic_get_timestamp_time_zone(int8_t *zone);
+
135
+
145uint8_t ds3231_basic_get_temperature(int16_t *raw, float *s);
+
146
+
156uint8_t ds3231_basic_get_ascii_time(char *buf, uint8_t len);
+
157
+
161
+
162#ifdef __cplusplus
+
163}
+
164#endif
+
165
+
166#endif
driver ds3231 interface header file
-
uint8_t ds3231_basic_get_temperature(int16_t *raw, float *s)
basic example get the current temperature
-
uint8_t ds3231_basic_set_time(ds3231_time_t *t)
basic example set the time
-
uint8_t ds3231_basic_get_timestamp_time_zone(int8_t *zone)
basic example get the local time zone
-
uint8_t ds3231_basic_set_timestamp(time_t timestamp)
basic example set the time by a unix timestamp
-
uint8_t ds3231_basic_set_timestamp_time_zone(int8_t zone)
basic example set the local time zone
-
uint8_t ds3231_basic_init(void)
basic example init
-
uint8_t ds3231_basic_get_time(ds3231_time_t *t)
basic example get the time
-
uint8_t ds3231_basic_get_ascii_time(char *buf, uint8_t len)
basic example get the ascii time
-
uint8_t ds3231_basic_get_timestamp(time_t *timestamp)
basic example get the time in a unix timestamp
-
uint8_t ds3231_basic_deinit(void)
basic example deinit
-
ds3231 time structure definition
+
struct ds3231_time_s ds3231_time_t
ds3231 time structure definition
+
uint8_t ds3231_basic_get_temperature(int16_t *raw, float *s)
basic example get the current temperature
+
uint8_t ds3231_basic_set_time(ds3231_time_t *t)
basic example set the time
+
uint8_t ds3231_basic_get_timestamp_time_zone(int8_t *zone)
basic example get the local time zone
+
uint8_t ds3231_basic_set_timestamp(time_t timestamp)
basic example set the time by a unix timestamp
+
uint8_t ds3231_basic_set_timestamp_time_zone(int8_t zone)
basic example set the local time zone
+
uint8_t ds3231_basic_init(void)
basic example init
+
uint8_t ds3231_basic_get_time(ds3231_time_t *t)
basic example get the time
+
uint8_t ds3231_basic_get_ascii_time(char *buf, uint8_t len)
basic example get the ascii time
+
uint8_t ds3231_basic_get_timestamp(time_t *timestamp)
basic example get the time in a unix timestamp
+
uint8_t ds3231_basic_deinit(void)
basic example deinit
+
diff --git a/doc/html/driver__ds3231__interface_8h.html b/doc/html/driver__ds3231__interface_8h.html index ef04948..e86bf21 100644 --- a/doc/html/driver__ds3231__interface_8h.html +++ b/doc/html/driver__ds3231__interface_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: interface/driver_ds3231_interface.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_interface.h File Reference
+
driver_ds3231_interface.h File Reference

driver ds3231 interface header file More...

#include "driver_ds3231.h"
+
+Include dependency graph for driver_ds3231_interface.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_interface_iic_init (void)
 interface iic bus init More...
 
uint8_t ds3231_interface_iic_deinit (void)
 interface iic bus deinit More...
 
uint8_t ds3231_interface_iic_read (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus read More...
 
uint8_t ds3231_interface_iic_write (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus write More...
 
void ds3231_interface_delay_ms (uint32_t ms)
 interface delay ms More...
 
void ds3231_interface_debug_print (const char *const fmt,...)
 interface print format data More...
 
void ds3231_interface_receive_callback (uint8_t type)
 interface receive callback More...
 
uint8_t ds3231_interface_iic_init (void)
 interface iic bus init
uint8_t ds3231_interface_iic_deinit (void)
 interface iic bus deinit
uint8_t ds3231_interface_iic_read (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus read
uint8_t ds3231_interface_iic_write (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus write
void ds3231_interface_delay_ms (uint32_t ms)
 interface delay ms
void ds3231_interface_debug_print (const char *const fmt,...)
 interface print format data
void ds3231_interface_receive_callback (uint8_t type)
 interface receive callback
-

Detailed Description

+

Detailed Description

driver ds3231 interface header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -144,11 +151,19 @@

history

Definition in file driver_ds3231_interface.h.

+ +
diff --git a/doc/html/driver__ds3231__interface_8h__dep__incl.md5 b/doc/html/driver__ds3231__interface_8h__dep__incl.md5 new file mode 100644 index 0000000..7751d33 --- /dev/null +++ b/doc/html/driver__ds3231__interface_8h__dep__incl.md5 @@ -0,0 +1 @@ +22b6335dc14544a9a9f442c7119470d1 \ No newline at end of file diff --git a/doc/html/driver__ds3231__interface_8h__dep__incl.svg b/doc/html/driver__ds3231__interface_8h__dep__incl.svg new file mode 100644 index 0000000..8bff3d8 --- /dev/null +++ b/doc/html/driver__ds3231__interface_8h__dep__incl.svg @@ -0,0 +1,307 @@ + + + + + + +interface/driver_ds3231_interface.h + + +Node1 + + +interface/driver_ds3231 +_interface.h + + + + + +Node2 + + +example/driver_ds3231 +_alarm.h + + + + + +Node1->Node2 + + + + + + + + +Node4 + + +example/driver_ds3231 +_basic.h + + + + + +Node1->Node4 + + + + + + + + +Node6 + + +example/driver_ds3231 +_output.h + + + + + +Node1->Node6 + + + + + + + + +Node8 + + +interface/driver_ds3231 +_interface_template.c + + + + + +Node1->Node8 + + + + + + + + +Node9 + + +test/driver_ds3231 +_alarm_test.h + + + + + +Node1->Node9 + + + + + + + + +Node11 + + +test/driver_ds3231 +_output_test.h + + + + + +Node1->Node11 + + + + + + + + +Node13 + + +test/driver_ds3231 +_readwrite_test.h + + + + + +Node1->Node13 + + + + + + + + +Node15 + + +test/driver_ds3231 +_register_test.h + + + + + +Node1->Node15 + + + + + + + + +Node3 + + +example/driver_ds3231 +_alarm.c + + + + + +Node2->Node3 + + + + + + + + +Node5 + + +example/driver_ds3231 +_basic.c + + + + + +Node4->Node5 + + + + + + + + +Node7 + + +example/driver_ds3231 +_output.c + + + + + +Node6->Node7 + + + + + + + + +Node10 + + +test/driver_ds3231 +_alarm_test.c + + + + + +Node9->Node10 + + + + + + + + +Node12 + + +test/driver_ds3231 +_output_test.c + + + + + +Node11->Node12 + + + + + + + + +Node14 + + +test/driver_ds3231 +_readwrite_test.c + + + + + +Node13->Node14 + + + + + + + + +Node16 + + +test/driver_ds3231 +_register_test.c + + + + + +Node15->Node16 + + + + + + + + diff --git a/doc/html/driver__ds3231__interface_8h__incl.md5 b/doc/html/driver__ds3231__interface_8h__incl.md5 new file mode 100644 index 0000000..6a91a24 --- /dev/null +++ b/doc/html/driver__ds3231__interface_8h__incl.md5 @@ -0,0 +1 @@ +c2ce70a97b07a8211c797abe9d71594a \ No newline at end of file diff --git a/doc/html/driver__ds3231__interface_8h__incl.svg b/doc/html/driver__ds3231__interface_8h__incl.svg new file mode 100644 index 0000000..ca637b5 --- /dev/null +++ b/doc/html/driver__ds3231__interface_8h__incl.svg @@ -0,0 +1,94 @@ + + + + + + +interface/driver_ds3231_interface.h + + +Node1 + + +interface/driver_ds3231 +_interface.h + + + + + +Node2 + + +driver_ds3231.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +stdio.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdint.h + + + + + +Node2->Node4 + + + + + + + + +Node5 + + +string.h + + + + + +Node2->Node5 + + + + + + + + diff --git a/doc/html/driver__ds3231__interface_8h_source.html b/doc/html/driver__ds3231__interface_8h_source.html index 88b461d..2da1ea8 100644 --- a/doc/html/driver__ds3231__interface_8h_source.html +++ b/doc/html/driver__ds3231__interface_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: interface/driver_ds3231_interface.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_interface.h
+
driver_ds3231_interface.h
-Go to the documentation of this file.
1 
-
38 #ifndef DRIVER_DS3231_INTERFACE_H
-
39 #define DRIVER_DS3231_INTERFACE_H
-
40 
-
41 #include "driver_ds3231.h"
-
42 
-
43 #ifdef __cplusplus
-
44 extern "C"{
-
45 #endif
-
46 
-
61 uint8_t ds3231_interface_iic_init(void);
-
62 
-
70 uint8_t ds3231_interface_iic_deinit(void);
-
71 
-
83 uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
-
84 
-
96 uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
-
97 
-
103 void ds3231_interface_delay_ms(uint32_t ms);
-
104 
-
110 void ds3231_interface_debug_print(const char *const fmt, ...);
-
111 
-
117 void ds3231_interface_receive_callback(uint8_t type);
-
118 
-
123 #ifdef __cplusplus
-
124 }
-
125 #endif
-
126 
-
127 #endif
+Go to the documentation of this file.
1
+
37
+
38#ifndef DRIVER_DS3231_INTERFACE_H
+
39#define DRIVER_DS3231_INTERFACE_H
+
40
+
41#include "driver_ds3231.h"
+
42
+
43#ifdef __cplusplus
+
44extern "C"{
+
45#endif
+
46
+
53
+
61uint8_t ds3231_interface_iic_init(void);
+
62
+
70uint8_t ds3231_interface_iic_deinit(void);
+
71
+
83uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
+
84
+
96uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
+
97
+
103void ds3231_interface_delay_ms(uint32_t ms);
+
104
+
110void ds3231_interface_debug_print(const char *const fmt, ...);
+
111
+
117void ds3231_interface_receive_callback(uint8_t type);
+
118
+
122
+
123#ifdef __cplusplus
+
124}
+
125#endif
+
126
+
127#endif
driver ds3231 header file
-
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
-
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
-
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
-
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
-
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
+
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
+
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
+
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
+
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+
diff --git a/doc/html/driver__ds3231__interface__template_8c.html b/doc/html/driver__ds3231__interface__template_8c.html index 754ffe6..3d2aa95 100644 --- a/doc/html/driver__ds3231__interface__template_8c.html +++ b/doc/html/driver__ds3231__interface__template_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: interface/driver_ds3231_interface_template.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_interface_template.c File Reference
+
driver_ds3231_interface_template.c File Reference

driver ds3231 interface template source file More...

+Include dependency graph for driver_ds3231_interface_template.c:
+
+
+

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_interface_iic_init (void)
 interface iic bus init More...
 
uint8_t ds3231_interface_iic_deinit (void)
 interface iic bus deinit More...
 
uint8_t ds3231_interface_iic_read (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus read More...
 
uint8_t ds3231_interface_iic_write (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus write More...
 
void ds3231_interface_delay_ms (uint32_t ms)
 interface delay ms More...
 
void ds3231_interface_debug_print (const char *const fmt,...)
 interface print format data More...
 
void ds3231_interface_receive_callback (uint8_t type)
 interface receive callback More...
 
uint8_t ds3231_interface_iic_init (void)
 interface iic bus init
uint8_t ds3231_interface_iic_deinit (void)
 interface iic bus deinit
uint8_t ds3231_interface_iic_read (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus read
uint8_t ds3231_interface_iic_write (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus write
void ds3231_interface_delay_ms (uint32_t ms)
 interface delay ms
void ds3231_interface_debug_print (const char *const fmt,...)
 interface print format data
void ds3231_interface_receive_callback (uint8_t type)
 interface receive callback
-

Detailed Description

+

Detailed Description

driver ds3231 interface template source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -144,11 +146,19 @@

history

Definition in file driver_ds3231_interface_template.c.

+ +
diff --git a/doc/html/driver__ds3231__interface__template_8c__incl.md5 b/doc/html/driver__ds3231__interface__template_8c__incl.md5 new file mode 100644 index 0000000..1a54abb --- /dev/null +++ b/doc/html/driver__ds3231__interface__template_8c__incl.md5 @@ -0,0 +1 @@ +1b7b9b775292f8e828ba3245b77c3cd3 \ No newline at end of file diff --git a/doc/html/driver__ds3231__interface__template_8c__incl.svg b/doc/html/driver__ds3231__interface__template_8c__incl.svg new file mode 100644 index 0000000..8339340 --- /dev/null +++ b/doc/html/driver__ds3231__interface__template_8c__incl.svg @@ -0,0 +1,112 @@ + + + + + + +interface/driver_ds3231_interface_template.c + + +Node1 + + +interface/driver_ds3231 +_interface_template.c + + + + + +Node2 + + +driver_ds3231_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ds3231.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdio.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdint.h + + + + + +Node3->Node5 + + + + + + + + +Node6 + + +string.h + + + + + +Node3->Node6 + + + + + + + + diff --git a/doc/html/driver__ds3231__interface__template_8c_source.html b/doc/html/driver__ds3231__interface__template_8c_source.html index 6974c87..ba8149a 100644 --- a/doc/html/driver__ds3231__interface__template_8c_source.html +++ b/doc/html/driver__ds3231__interface__template_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: interface/driver_ds3231_interface_template.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_interface_template.c
+
driver_ds3231_interface_template.c
-Go to the documentation of this file.
1 
- -
39 
- -
48 {
-
49  return 0;
-
50 }
-
51 
- -
60 {
-
61  return 0;
-
62 }
-
63 
-
75 uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
-
76 {
-
77  return 0;
-
78 }
-
79 
-
91 uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
-
92 {
-
93  return 0;
-
94 }
-
95 
-
101 void ds3231_interface_delay_ms(uint32_t ms)
-
102 {
-
103 
-
104 }
-
105 
-
111 void ds3231_interface_debug_print(const char *const fmt, ...)
-
112 {
-
113 
-
114 }
-
115 
- -
122 {
-
123  switch (type)
-
124  {
-
125  case DS3231_STATUS_ALARM_2 :
-
126  {
-
127  ds3231_interface_debug_print("ds3231: irq alarm2.\n");
-
128 
-
129  break;
-
130  }
-
131  case DS3231_STATUS_ALARM_1 :
-
132  {
-
133  ds3231_interface_debug_print("ds3231: irq alarm1.\n");
-
134 
-
135  break;
-
136  }
-
137  default :
-
138  {
-
139  break;
-
140  }
-
141  }
-
142 }
+Go to the documentation of this file.
1
+
37
+ +
39
+
+ +
48{
+
49 return 0;
+
50}
+
+
51
+
+ +
60{
+
61 return 0;
+
62}
+
+
63
+
+
75uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
+
76{
+
77 return 0;
+
78}
+
+
79
+
+
91uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
+
92{
+
93 return 0;
+
94}
+
+
95
+
+ +
102{
+
103
+
104}
+
+
105
+
+
111void ds3231_interface_debug_print(const char *const fmt, ...)
+
112{
+
113
+
114}
+
+
115
+
+ +
122{
+
123 switch (type)
+
124 {
+ +
126 {
+
127 ds3231_interface_debug_print("ds3231: irq alarm2.\n");
+
128
+
129 break;
+
130 }
+ +
132 {
+
133 ds3231_interface_debug_print("ds3231: irq alarm1.\n");
+
134
+
135 break;
+
136 }
+
137 default :
+
138 {
+
139 break;
+
140 }
+
141 }
+
142}
+
driver ds3231 interface header file
-
@ DS3231_STATUS_ALARM_1
-
@ DS3231_STATUS_ALARM_2
-
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
-
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
-
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
-
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
-
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+
@ DS3231_STATUS_ALARM_1
+
@ DS3231_STATUS_ALARM_2
+
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
+
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
+
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
+
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
+
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+
diff --git a/doc/html/driver__ds3231__output_8c.html b/doc/html/driver__ds3231__output_8c.html index 849bd52..51a055f 100644 --- a/doc/html/driver__ds3231__output_8c.html +++ b/doc/html/driver__ds3231__output_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: example/driver_ds3231_output.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_output.c File Reference
+
driver_ds3231_output.c File Reference

driver ds3231 output source file More...

+Include dependency graph for driver_ds3231_output.c:
+
+
+

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_output_init (void)
 output example init More...
 
uint8_t ds3231_output_deinit (void)
 output example deinit More...
 
uint8_t ds3231_output_set_time (ds3231_time_t *t)
 output example set the time More...
 
uint8_t ds3231_output_set_timestamp (time_t timestamp)
 output example set the time by a unix timestamp More...
 
uint8_t ds3231_output_set_timestamp_time_zone (int8_t zone)
 output example set the local time zone More...
 
uint8_t ds3231_output_get_time (ds3231_time_t *t)
 output example get the time More...
 
uint8_t ds3231_output_get_timestamp (time_t *timestamp)
 output example get the time in a unix timestamp More...
 
uint8_t ds3231_output_get_timestamp_time_zone (int8_t *zone)
 output example get the local time zone More...
 
uint8_t ds3231_output_get_temperature (int16_t *raw, float *s)
 output example get the current temperature More...
 
uint8_t ds3231_output_get_ascii_time (char *buf, uint8_t len)
 output example get the ascii time More...
 
uint8_t ds3231_output_set_square_wave (ds3231_bool_t enable)
 output example enable or disable the square wave More...
 
uint8_t ds3231_output_get_square_wave (ds3231_bool_t *enable)
 output example get the square wave status More...
 
uint8_t ds3231_output_set_32khz_output (ds3231_bool_t enable)
 output example enable or disable the 32KHz output More...
 
uint8_t ds3231_output_get_32khz_output (ds3231_bool_t *enable)
 output example get the 32KHz output status More...
 
uint8_t ds3231_output_init (void)
 output example init
uint8_t ds3231_output_deinit (void)
 output example deinit
uint8_t ds3231_output_set_time (ds3231_time_t *t)
 output example set the time
uint8_t ds3231_output_set_timestamp (time_t timestamp)
 output example set the time by a unix timestamp
uint8_t ds3231_output_set_timestamp_time_zone (int8_t zone)
 output example set the local time zone
uint8_t ds3231_output_get_time (ds3231_time_t *t)
 output example get the time
uint8_t ds3231_output_get_timestamp (time_t *timestamp)
 output example get the time in a unix timestamp
uint8_t ds3231_output_get_timestamp_time_zone (int8_t *zone)
 output example get the local time zone
uint8_t ds3231_output_get_temperature (int16_t *raw, float *s)
 output example get the current temperature
uint8_t ds3231_output_get_ascii_time (char *buf, uint8_t len)
 output example get the ascii time
uint8_t ds3231_output_set_square_wave (ds3231_bool_t enable)
 output example enable or disable the square wave
uint8_t ds3231_output_get_square_wave (ds3231_bool_t *enable)
 output example get the square wave status
uint8_t ds3231_output_set_32khz_output (ds3231_bool_t enable)
 output example enable or disable the 32KHz output
uint8_t ds3231_output_get_32khz_output (ds3231_bool_t *enable)
 output example get the 32KHz output status
-

Detailed Description

+

Detailed Description

driver ds3231 output source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -165,11 +160,19 @@

history

Definition in file driver_ds3231_output.c.

+ +
diff --git a/doc/html/driver__ds3231__output_8c__incl.md5 b/doc/html/driver__ds3231__output_8c__incl.md5 new file mode 100644 index 0000000..c158fc9 --- /dev/null +++ b/doc/html/driver__ds3231__output_8c__incl.md5 @@ -0,0 +1 @@ +55d7314f5c1fa245b071c1229c89b38c \ No newline at end of file diff --git a/doc/html/driver__ds3231__output_8c__incl.svg b/doc/html/driver__ds3231__output_8c__incl.svg new file mode 100644 index 0000000..c6142e1 --- /dev/null +++ b/doc/html/driver__ds3231__output_8c__incl.svg @@ -0,0 +1,148 @@ + + + + + + +example/driver_ds3231_output.c + + +Node1 + + +example/driver_ds3231 +_output.c + + + + + +Node2 + + +driver_ds3231_output.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ds3231_interface.h + + + + + +Node2->Node3 + + + + + + + + +Node8 + + +time.h + + + + + +Node2->Node8 + + + + + + + + +Node4 + + +driver_ds3231.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdio.h + + + + + +Node4->Node5 + + + + + + + + +Node6 + + +stdint.h + + + + + +Node4->Node6 + + + + + + + + +Node7 + + +string.h + + + + + +Node4->Node7 + + + + + + + + diff --git a/doc/html/driver__ds3231__output_8c_source.html b/doc/html/driver__ds3231__output_8c_source.html index 8faad38..b0ef5ae 100644 --- a/doc/html/driver__ds3231__output_8c_source.html +++ b/doc/html/driver__ds3231__output_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: example/driver_ds3231_output.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_output.c
+
driver_ds3231_output.c
-Go to the documentation of this file.
1 
-
38 #include "driver_ds3231_output.h"
-
39 
-
40 static ds3231_handle_t gs_handle;
-
41 static int8_t gs_time_zone = 0;
-
50 uint8_t ds3231_output_init(void)
-
51 {
-
52  uint8_t res;
-
53  int8_t reg;
-
54 
-
55  /* link functions */
- - - - - - - - -
64 
-
65  /* init ds3231 */
-
66  res = ds3231_init(&gs_handle);
-
67  if (res != 0)
-
68  {
-
69  ds3231_interface_debug_print("ds3231: init failed.\n");
-
70 
-
71  return 1;
-
72  }
-
73 
-
74  /* set oscillator */
-
75  res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
-
76  if (res != 0)
-
77  {
-
78  ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
-
79  (void)ds3231_deinit(&gs_handle);
-
80 
-
81  return 1;
-
82  }
-
83 
-
84  /* disable alarm1 */
- -
86  if (res != 0)
-
87  {
-
88  ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
-
89  (void)ds3231_deinit(&gs_handle);
-
90 
-
91  return 1;
-
92  }
-
93 
-
94  /* disable alarm2 */
- -
96  if (res != 0)
-
97  {
-
98  ds3231_interface_debug_print("ds3231: set alarm2 interrupt failed.\n");
-
99  (void)ds3231_deinit(&gs_handle);
-
100 
-
101  return 1;
-
102  }
-
103 
-
104  /* set square wave */
-
105  res = ds3231_set_pin(&gs_handle, DS3231_PIN_SQUARE_WAVE);
-
106  if (res != 0)
-
107  {
-
108  ds3231_interface_debug_print("ds3231: set pin failed.\n");
-
109  (void)ds3231_deinit(&gs_handle);
-
110 
-
111  return 1;
-
112  }
-
113 
-
114  /* convert to register */
- -
116  if (res != 0)
-
117  {
-
118  ds3231_interface_debug_print("ds3231: convert to register failed.\n");
-
119  (void)ds3231_deinit(&gs_handle);
-
120 
-
121  return 1;
-
122  }
-
123 
-
124  /* set aging offset */
-
125  res = ds3231_set_aging_offset(&gs_handle, reg);
-
126  if (res != 0)
-
127  {
-
128  ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
-
129  (void)ds3231_deinit(&gs_handle);
-
130 
-
131  return 1;
-
132  }
-
133 
-
134  return 0;
-
135 }
-
136 
-
144 uint8_t ds3231_output_deinit(void)
-
145 {
-
146  if (ds3231_deinit(&gs_handle) != 0)
-
147  {
-
148  return 1;
-
149  }
-
150  else
-
151  {
-
152  return 0;
-
153  }
-
154 }
-
155 
- -
165 {
-
166  /* set time */
-
167  if (ds3231_set_time(&gs_handle, t) != 0)
-
168  {
-
169  return 1;
-
170  }
-
171  else
-
172  {
-
173  return 0;
-
174  }
-
175 }
-
176 
-
185 uint8_t ds3231_output_set_timestamp(time_t timestamp)
-
186 {
-
187  ds3231_time_t t;
-
188  struct tm *timeptr;
-
189 
-
190  /* convert times */
-
191  timestamp += (time_t)(gs_time_zone * 3600);
-
192  timeptr = localtime(&timestamp);
-
193  t.am_pm = DS3231_AM;
-
194  t.date = (uint8_t)timeptr->tm_mday;
- -
196  t.hour = (uint8_t)timeptr->tm_hour;
-
197  t.minute = (uint8_t)timeptr->tm_min;
-
198  t.month = (uint8_t)timeptr->tm_mon + 1;
-
199  t.second = (uint8_t)timeptr->tm_sec;
-
200  if (timeptr->tm_wday == 0)
-
201  {
-
202  t.week = 7;
-
203  }
-
204  else
-
205  {
-
206  t.week = (uint8_t)timeptr->tm_wday;
-
207  }
-
208  t.year = (uint16_t)(timeptr->tm_year + 1900);
-
209 
-
210  /* set time */
-
211  if (ds3231_set_time(&gs_handle, &t) != 0)
-
212  {
-
213  return 1;
-
214  }
-
215  else
-
216  {
-
217  return 0;
-
218  }
-
219 }
-
220 
- -
229 {
-
230  gs_time_zone = zone;
-
231 
-
232  return 0;
-
233 }
-
234 
- -
244 {
-
245  /* get time */
-
246  if (ds3231_get_time(&gs_handle, t) != 0)
-
247  {
-
248  return 1;
-
249  }
-
250  else
-
251  {
-
252  return 0;
-
253  }
-
254 }
-
255 
-
264 uint8_t ds3231_output_get_timestamp(time_t *timestamp)
-
265 {
-
266  ds3231_time_t t;
-
267  struct tm timeptr;
-
268 
-
269  /* get time */
-
270  if (ds3231_get_time(&gs_handle, &t) != 0)
-
271  {
-
272  return 1;
-
273  }
-
274  timeptr.tm_year = t.year - 1900;
-
275  timeptr.tm_mon = t.month - 1;
-
276  timeptr.tm_wday = t.week;
-
277  timeptr.tm_mday = t.date;
-
278  if (t.format == DS3231_FORMAT_24H)
-
279  {
-
280  timeptr.tm_hour = t.hour;
-
281  }
-
282  else
-
283  {
-
284  timeptr.tm_hour = t.hour % 12 + t.am_pm * 12;
-
285  }
-
286  timeptr.tm_min = t.minute;
-
287  timeptr.tm_sec = t.second;
-
288 
-
289  /* make time */
-
290  *timestamp = mktime(&timeptr) - gs_time_zone * 3600;
-
291 
-
292  return 0;
-
293 }
-
294 
- -
303 {
-
304  *zone = gs_time_zone;
-
305 
-
306  return 0;
-
307 }
-
308 
-
318 uint8_t ds3231_output_get_temperature(int16_t *raw, float *s)
-
319 {
-
320  /* get temperature */
-
321  if (ds3231_get_temperature(&gs_handle, raw, s) != 0)
-
322  {
-
323  return 1;
-
324  }
-
325  else
-
326  {
-
327  return 0;
-
328  }
-
329 }
-
330 
-
340 uint8_t ds3231_output_get_ascii_time(char *buf, uint8_t len)
-
341 {
-
342  ds3231_time_t t;
-
343 
-
344  /* get time */
-
345  if (ds3231_get_time(&gs_handle, &t) != 0)
-
346  {
-
347  return 1;
-
348  }
-
349 
-
350  if (t.format == DS3231_FORMAT_24H)
-
351  {
-
352  (void)snprintf(buf, len, "%04d-%02d-%02d %02d:%02d:%02d %d.\n", t.year, t.month, t.date, t.hour, t.minute, t.second, t.week);
-
353  }
-
354  else
-
355  {
-
356  (void)snprintf(buf, len, "%04d-%02d-%02d %s %02d:%02d:%02d %d.\n", t.year, t.month, t.date, (t.am_pm == DS3231_AM) ? "AM" : "PM",
-
357  t.hour, t.minute, t.second, t.week
-
358  );
-
359  }
-
360 
-
361  return 0;
-
362 }
-
363 
- -
373 {
-
374  /* set square wave */
-
375  if (ds3231_set_square_wave(&gs_handle, enable) != 0)
-
376  {
-
377  return 1;
-
378  }
-
379  else
-
380  {
-
381  return 0;
-
382  }
-
383 }
-
384 
- -
394 {
-
395  /* get square wave */
-
396  if (ds3231_get_square_wave(&gs_handle, enable) != 0)
-
397  {
-
398  return 1;
-
399  }
-
400  else
-
401  {
-
402  return 0;
-
403  }
-
404 }
-
405 
- -
415 {
-
416  /* set 32khz_output */
-
417  if (ds3231_set_32khz_output(&gs_handle, enable) != 0)
-
418  {
-
419  return 1;
-
420  }
-
421  else
-
422  {
-
423  return 0;
-
424  }
-
425 }
-
426 
- -
436 {
-
437  /* get 32khz_output */
-
438  if (ds3231_get_32khz_output(&gs_handle, enable) != 0)
-
439  {
-
440  return 1;
-
441  }
-
442  else
-
443  {
-
444  return 0;
-
445  }
-
446 }
+Go to the documentation of this file.
1
+
37
+ +
39
+
40static ds3231_handle_t gs_handle;
+
41static int8_t gs_time_zone = 0;
+
42
+
+
50uint8_t ds3231_output_init(void)
+
51{
+
52 uint8_t res;
+
53 int8_t reg;
+
54
+
55 /* link functions */
+ + + + + + + + +
64
+
65 /* init ds3231 */
+
66 res = ds3231_init(&gs_handle);
+
67 if (res != 0)
+
68 {
+
69 ds3231_interface_debug_print("ds3231: init failed.\n");
+
70
+
71 return 1;
+
72 }
+
73
+
74 /* set oscillator */
+
75 res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
+
76 if (res != 0)
+
77 {
+
78 ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
+
79 (void)ds3231_deinit(&gs_handle);
+
80
+
81 return 1;
+
82 }
+
83
+
84 /* disable alarm1 */
+ +
86 if (res != 0)
+
87 {
+
88 ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
+
89 (void)ds3231_deinit(&gs_handle);
+
90
+
91 return 1;
+
92 }
+
93
+
94 /* disable alarm2 */
+ +
96 if (res != 0)
+
97 {
+
98 ds3231_interface_debug_print("ds3231: set alarm2 interrupt failed.\n");
+
99 (void)ds3231_deinit(&gs_handle);
+
100
+
101 return 1;
+
102 }
+
103
+
104 /* set square wave */
+
105 res = ds3231_set_pin(&gs_handle, DS3231_PIN_SQUARE_WAVE);
+
106 if (res != 0)
+
107 {
+
108 ds3231_interface_debug_print("ds3231: set pin failed.\n");
+
109 (void)ds3231_deinit(&gs_handle);
+
110
+
111 return 1;
+
112 }
+
113
+
114 /* convert to register */
+ +
116 if (res != 0)
+
117 {
+
118 ds3231_interface_debug_print("ds3231: convert to register failed.\n");
+
119 (void)ds3231_deinit(&gs_handle);
+
120
+
121 return 1;
+
122 }
+
123
+
124 /* set aging offset */
+
125 res = ds3231_set_aging_offset(&gs_handle, reg);
+
126 if (res != 0)
+
127 {
+
128 ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
+
129 (void)ds3231_deinit(&gs_handle);
+
130
+
131 return 1;
+
132 }
+
133
+
134 return 0;
+
135}
+
+
136
+
+ +
145{
+
146 if (ds3231_deinit(&gs_handle) != 0)
+
147 {
+
148 return 1;
+
149 }
+
150 else
+
151 {
+
152 return 0;
+
153 }
+
154}
+
+
155
+
+ +
165{
+
166 /* set time */
+
167 if (ds3231_set_time(&gs_handle, t) != 0)
+
168 {
+
169 return 1;
+
170 }
+
171 else
+
172 {
+
173 return 0;
+
174 }
+
175}
+
+
176
+
+
185uint8_t ds3231_output_set_timestamp(time_t timestamp)
+
186{
+ +
188 struct tm *timeptr;
+
189
+
190 /* convert times */
+
191 timestamp += (time_t)(gs_time_zone * 3600);
+
192 timeptr = localtime(&timestamp);
+
193 t.am_pm = DS3231_AM;
+
194 t.date = (uint8_t)timeptr->tm_mday;
+ +
196 t.hour = (uint8_t)timeptr->tm_hour;
+
197 t.minute = (uint8_t)timeptr->tm_min;
+
198 t.month = (uint8_t)timeptr->tm_mon + 1;
+
199 t.second = (uint8_t)timeptr->tm_sec;
+
200 if (timeptr->tm_wday == 0)
+
201 {
+
202 t.week = 7;
+
203 }
+
204 else
+
205 {
+
206 t.week = (uint8_t)timeptr->tm_wday;
+
207 }
+
208 t.year = (uint16_t)(timeptr->tm_year + 1900);
+
209
+
210 /* set time */
+
211 if (ds3231_set_time(&gs_handle, &t) != 0)
+
212 {
+
213 return 1;
+
214 }
+
215 else
+
216 {
+
217 return 0;
+
218 }
+
219}
+
+
220
+
+ +
229{
+
230 gs_time_zone = zone;
+
231
+
232 return 0;
+
233}
+
+
234
+
+ +
244{
+
245 /* get time */
+
246 if (ds3231_get_time(&gs_handle, t) != 0)
+
247 {
+
248 return 1;
+
249 }
+
250 else
+
251 {
+
252 return 0;
+
253 }
+
254}
+
+
255
+
+
264uint8_t ds3231_output_get_timestamp(time_t *timestamp)
+
265{
+ +
267 struct tm timeptr;
+
268
+
269 /* get time */
+
270 if (ds3231_get_time(&gs_handle, &t) != 0)
+
271 {
+
272 return 1;
+
273 }
+
274 timeptr.tm_year = t.year - 1900;
+
275 timeptr.tm_mon = t.month - 1;
+
276 timeptr.tm_wday = t.week;
+
277 timeptr.tm_mday = t.date;
+
278 if (t.format == DS3231_FORMAT_24H)
+
279 {
+
280 timeptr.tm_hour = t.hour;
+
281 }
+
282 else
+
283 {
+
284 timeptr.tm_hour = t.hour % 12 + t.am_pm * 12;
+
285 }
+
286 timeptr.tm_min = t.minute;
+
287 timeptr.tm_sec = t.second;
+
288
+
289 /* make time */
+
290 *timestamp = mktime(&timeptr) - gs_time_zone * 3600;
+
291
+
292 return 0;
+
293}
+
+
294
+
+ +
303{
+
304 *zone = gs_time_zone;
+
305
+
306 return 0;
+
307}
+
+
308
+
+
318uint8_t ds3231_output_get_temperature(int16_t *raw, float *s)
+
319{
+
320 /* get temperature */
+
321 if (ds3231_get_temperature(&gs_handle, raw, s) != 0)
+
322 {
+
323 return 1;
+
324 }
+
325 else
+
326 {
+
327 return 0;
+
328 }
+
329}
+
+
330
+
+
340uint8_t ds3231_output_get_ascii_time(char *buf, uint8_t len)
+
341{
+ +
343
+
344 /* get time */
+
345 if (ds3231_get_time(&gs_handle, &t) != 0)
+
346 {
+
347 return 1;
+
348 }
+
349
+
350 if (t.format == DS3231_FORMAT_24H)
+
351 {
+
352 (void)snprintf(buf, len, "%04d-%02d-%02d %02d:%02d:%02d %d.\n", t.year, t.month, t.date, t.hour, t.minute, t.second, t.week);
+
353 }
+
354 else
+
355 {
+
356 (void)snprintf(buf, len, "%04d-%02d-%02d %s %02d:%02d:%02d %d.\n", t.year, t.month, t.date, (t.am_pm == DS3231_AM) ? "AM" : "PM",
+
357 t.hour, t.minute, t.second, t.week
+
358 );
+
359 }
+
360
+
361 return 0;
+
362}
+
+
363
+
+ +
373{
+
374 /* set square wave */
+
375 if (ds3231_set_square_wave(&gs_handle, enable) != 0)
+
376 {
+
377 return 1;
+
378 }
+
379 else
+
380 {
+
381 return 0;
+
382 }
+
383}
+
+
384
+
+ +
394{
+
395 /* get square wave */
+
396 if (ds3231_get_square_wave(&gs_handle, enable) != 0)
+
397 {
+
398 return 1;
+
399 }
+
400 else
+
401 {
+
402 return 0;
+
403 }
+
404}
+
+
405
+
+ +
415{
+
416 /* set 32khz_output */
+
417 if (ds3231_set_32khz_output(&gs_handle, enable) != 0)
+
418 {
+
419 return 1;
+
420 }
+
421 else
+
422 {
+
423 return 0;
+
424 }
+
425}
+
+
426
+
+ +
436{
+
437 /* get 32khz_output */
+
438 if (ds3231_get_32khz_output(&gs_handle, enable) != 0)
+
439 {
+
440 return 1;
+
441 }
+
442 else
+
443 {
+
444 return 0;
+
445 }
+
446}
+
driver ds3231 output header file
-
uint8_t ds3231_get_32khz_output(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the 32KHz output status
-
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
-
uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
get the chip temperature
-
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
-
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
-
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
-
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
-
uint8_t ds3231_get_square_wave(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the square wave output status
-
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
-
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
-
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
-
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
-
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
-
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
-
ds3231_bool_t
ds3231 bool enumeration definition
Definition: driver_ds3231.h:64
-
@ DS3231_AM
Definition: driver_ds3231.h:83
-
@ DS3231_ALARM_2
Definition: driver_ds3231.h:75
-
@ DS3231_ALARM_1
Definition: driver_ds3231.h:74
-
@ DS3231_FORMAT_24H
-
@ DS3231_PIN_SQUARE_WAVE
Definition: driver_ds3231.h:92
-
@ DS3231_BOOL_TRUE
Definition: driver_ds3231.h:66
-
@ DS3231_BOOL_FALSE
Definition: driver_ds3231.h:65
-
#define DS3231_OUTPUT_DEFAULT_AGING_OFFSET
ds3231 output example default definition
-
uint8_t ds3231_output_set_timestamp(time_t timestamp)
output example set the time by a unix timestamp
-
uint8_t ds3231_output_set_square_wave(ds3231_bool_t enable)
output example enable or disable the square wave
-
uint8_t ds3231_output_set_32khz_output(ds3231_bool_t enable)
output example enable or disable the 32KHz output
-
uint8_t ds3231_output_get_timestamp_time_zone(int8_t *zone)
output example get the local time zone
-
uint8_t ds3231_output_set_time(ds3231_time_t *t)
output example set the time
-
uint8_t ds3231_output_get_32khz_output(ds3231_bool_t *enable)
output example get the 32KHz output status
-
uint8_t ds3231_output_get_temperature(int16_t *raw, float *s)
output example get the current temperature
-
uint8_t ds3231_output_set_timestamp_time_zone(int8_t zone)
output example set the local time zone
-
uint8_t ds3231_output_get_timestamp(time_t *timestamp)
output example get the time in a unix timestamp
-
uint8_t ds3231_output_init(void)
output example init
-
uint8_t ds3231_output_get_ascii_time(char *buf, uint8_t len)
output example get the ascii time
-
uint8_t ds3231_output_get_time(ds3231_time_t *t)
output example get the time
-
uint8_t ds3231_output_get_square_wave(ds3231_bool_t *enable)
output example get the square wave status
-
uint8_t ds3231_output_deinit(void)
output example deinit
-
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
-
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
-
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
-
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
-
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
- - - - - - - - -
ds3231 handle structure definition
-
ds3231 time structure definition
- - -
ds3231_am_pm_t am_pm
- - -
ds3231_format_t format
- - - +
uint8_t ds3231_get_32khz_output(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the 32KHz output status
+
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
+
uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
get the chip temperature
+
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
+
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
+
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
+
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
+
uint8_t ds3231_get_square_wave(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the square wave output status
+
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
+
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
+
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
+
struct ds3231_time_s ds3231_time_t
ds3231 time structure definition
+
struct ds3231_handle_s ds3231_handle_t
ds3231 handle structure definition
+
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
+
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
+
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
+
ds3231_bool_t
ds3231 bool enumeration definition
+
@ DS3231_AM
+
@ DS3231_ALARM_2
+
@ DS3231_ALARM_1
+
@ DS3231_FORMAT_24H
+
@ DS3231_PIN_SQUARE_WAVE
+
@ DS3231_BOOL_TRUE
+
@ DS3231_BOOL_FALSE
+
#define DS3231_OUTPUT_DEFAULT_AGING_OFFSET
ds3231 output example default definition
+
uint8_t ds3231_output_set_timestamp(time_t timestamp)
output example set the time by a unix timestamp
+
uint8_t ds3231_output_set_square_wave(ds3231_bool_t enable)
output example enable or disable the square wave
+
uint8_t ds3231_output_set_32khz_output(ds3231_bool_t enable)
output example enable or disable the 32KHz output
+
uint8_t ds3231_output_get_timestamp_time_zone(int8_t *zone)
output example get the local time zone
+
uint8_t ds3231_output_set_time(ds3231_time_t *t)
output example set the time
+
uint8_t ds3231_output_get_32khz_output(ds3231_bool_t *enable)
output example get the 32KHz output status
+
uint8_t ds3231_output_get_temperature(int16_t *raw, float *s)
output example get the current temperature
+
uint8_t ds3231_output_set_timestamp_time_zone(int8_t zone)
output example set the local time zone
+
uint8_t ds3231_output_get_timestamp(time_t *timestamp)
output example get the time in a unix timestamp
+
uint8_t ds3231_output_init(void)
output example init
+
uint8_t ds3231_output_get_ascii_time(char *buf, uint8_t len)
output example get the ascii time
+
uint8_t ds3231_output_get_time(ds3231_time_t *t)
output example get the time
+
uint8_t ds3231_output_get_square_wave(ds3231_bool_t *enable)
output example get the square wave status
+
uint8_t ds3231_output_deinit(void)
output example deinit
+
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
+
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
+
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
+
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
+
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+ + + + + + + + + + +
ds3231_am_pm_t am_pm
+ + +
ds3231_format_t format
+ + +
+
diff --git a/doc/html/driver__ds3231__output_8h.html b/doc/html/driver__ds3231__output_8h.html index a413123..a97f58b 100644 --- a/doc/html/driver__ds3231__output_8h.html +++ b/doc/html/driver__ds3231__output_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: example/driver_ds3231_output.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_output.h File Reference
+
driver_ds3231_output.h File Reference
@@ -96,61 +99,56 @@ More...

#include "driver_ds3231_interface.h"
#include <time.h>
+
+Include dependency graph for driver_ds3231_output.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+

Go to the source code of this file.

- - - - + +

+

Macros

#define DS3231_OUTPUT_DEFAULT_AGING_OFFSET   0
 ds3231 output example default definition More...
 
#define DS3231_OUTPUT_DEFAULT_AGING_OFFSET   0
 ds3231 output example default definition
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_output_init (void)
 output example init More...
 
uint8_t ds3231_output_deinit (void)
 output example deinit More...
 
uint8_t ds3231_output_set_time (ds3231_time_t *t)
 output example set the time More...
 
uint8_t ds3231_output_get_time (ds3231_time_t *t)
 output example get the time More...
 
uint8_t ds3231_output_set_timestamp (time_t timestamp)
 output example set the time by a unix timestamp More...
 
uint8_t ds3231_output_set_timestamp_time_zone (int8_t zone)
 output example set the local time zone More...
 
uint8_t ds3231_output_get_timestamp (time_t *timestamp)
 output example get the time in a unix timestamp More...
 
uint8_t ds3231_output_get_timestamp_time_zone (int8_t *zone)
 output example get the local time zone More...
 
uint8_t ds3231_output_get_temperature (int16_t *raw, float *s)
 output example get the current temperature More...
 
uint8_t ds3231_output_get_ascii_time (char *buf, uint8_t len)
 output example get the ascii time More...
 
uint8_t ds3231_output_set_square_wave (ds3231_bool_t enable)
 output example enable or disable the square wave More...
 
uint8_t ds3231_output_get_square_wave (ds3231_bool_t *enable)
 output example get the square wave status More...
 
uint8_t ds3231_output_set_32khz_output (ds3231_bool_t enable)
 output example enable or disable the 32KHz output More...
 
uint8_t ds3231_output_get_32khz_output (ds3231_bool_t *enable)
 output example get the 32KHz output status More...
 
uint8_t ds3231_output_init (void)
 output example init
uint8_t ds3231_output_deinit (void)
 output example deinit
uint8_t ds3231_output_set_time (ds3231_time_t *t)
 output example set the time
uint8_t ds3231_output_get_time (ds3231_time_t *t)
 output example get the time
uint8_t ds3231_output_set_timestamp (time_t timestamp)
 output example set the time by a unix timestamp
uint8_t ds3231_output_set_timestamp_time_zone (int8_t zone)
 output example set the local time zone
uint8_t ds3231_output_get_timestamp (time_t *timestamp)
 output example get the time in a unix timestamp
uint8_t ds3231_output_get_timestamp_time_zone (int8_t *zone)
 output example get the local time zone
uint8_t ds3231_output_get_temperature (int16_t *raw, float *s)
 output example get the current temperature
uint8_t ds3231_output_get_ascii_time (char *buf, uint8_t len)
 output example get the ascii time
uint8_t ds3231_output_set_square_wave (ds3231_bool_t enable)
 output example enable or disable the square wave
uint8_t ds3231_output_get_square_wave (ds3231_bool_t *enable)
 output example get the square wave status
uint8_t ds3231_output_set_32khz_output (ds3231_bool_t enable)
 output example enable or disable the 32KHz output
uint8_t ds3231_output_get_32khz_output (ds3231_bool_t *enable)
 output example get the 32KHz output status
-

Detailed Description

+

Detailed Description

driver ds3231 output header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -173,11 +171,19 @@

history

Definition in file driver_ds3231_output.h.

+ +
diff --git a/doc/html/driver__ds3231__output_8h__dep__incl.md5 b/doc/html/driver__ds3231__output_8h__dep__incl.md5 new file mode 100644 index 0000000..1b233ec --- /dev/null +++ b/doc/html/driver__ds3231__output_8h__dep__incl.md5 @@ -0,0 +1 @@ +83d2c6618e333ef69b6bbc1021bd2939 \ No newline at end of file diff --git a/doc/html/driver__ds3231__output_8h__dep__incl.svg b/doc/html/driver__ds3231__output_8h__dep__incl.svg new file mode 100644 index 0000000..878638e --- /dev/null +++ b/doc/html/driver__ds3231__output_8h__dep__incl.svg @@ -0,0 +1,41 @@ + + + + + + +example/driver_ds3231_output.h + + +Node1 + + +example/driver_ds3231 +_output.h + + + + + +Node2 + + +example/driver_ds3231 +_output.c + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/driver__ds3231__output_8h__incl.md5 b/doc/html/driver__ds3231__output_8h__incl.md5 new file mode 100644 index 0000000..5debe95 --- /dev/null +++ b/doc/html/driver__ds3231__output_8h__incl.md5 @@ -0,0 +1 @@ +6263a0eae78a0b9ccfa4b96430a93337 \ No newline at end of file diff --git a/doc/html/driver__ds3231__output_8h__incl.svg b/doc/html/driver__ds3231__output_8h__incl.svg new file mode 100644 index 0000000..63eb39f --- /dev/null +++ b/doc/html/driver__ds3231__output_8h__incl.svg @@ -0,0 +1,130 @@ + + + + + + +example/driver_ds3231_output.h + + +Node1 + + +example/driver_ds3231 +_output.h + + + + + +Node2 + + +driver_ds3231_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node7 + + +time.h + + + + + +Node1->Node7 + + + + + + + + +Node3 + + +driver_ds3231.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdio.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdint.h + + + + + +Node3->Node5 + + + + + + + + +Node6 + + +string.h + + + + + +Node3->Node6 + + + + + + + + diff --git a/doc/html/driver__ds3231__output_8h_source.html b/doc/html/driver__ds3231__output_8h_source.html index 6b5111e..69d2b11 100644 --- a/doc/html/driver__ds3231__output_8h_source.html +++ b/doc/html/driver__ds3231__output_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: example/driver_ds3231_output.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_output.h
+
driver_ds3231_output.h
-Go to the documentation of this file.
1 
-
38 #ifndef DRIVER_DS3231_OUTPUT_H
-
39 #define DRIVER_DS3231_OUTPUT_H
-
40 
- -
42 #include <time.h>
-
43 
-
44 #ifdef __cplusplus
-
45 extern "C"{
-
46 #endif
-
47 
-
56 #define DS3231_OUTPUT_DEFAULT_AGING_OFFSET 0
-
65 uint8_t ds3231_output_init(void);
-
66 
-
74 uint8_t ds3231_output_deinit(void);
-
75 
- -
85 
- -
95 
-
104 uint8_t ds3231_output_set_timestamp(time_t timestamp);
-
105 
-
113 uint8_t ds3231_output_set_timestamp_time_zone(int8_t zone);
-
114 
-
123 uint8_t ds3231_output_get_timestamp(time_t *timestamp);
-
124 
-
132 uint8_t ds3231_output_get_timestamp_time_zone(int8_t *zone);
-
133 
-
143 uint8_t ds3231_output_get_temperature(int16_t *raw, float *s);
-
144 
-
154 uint8_t ds3231_output_get_ascii_time(char *buf, uint8_t len);
-
155 
- -
165 
- -
175 
- -
185 
- -
195 
-
200 #ifdef __cplusplus
-
201 }
-
202 #endif
-
203 
-
204 #endif
+Go to the documentation of this file.
1
+
37
+
38#ifndef DRIVER_DS3231_OUTPUT_H
+
39#define DRIVER_DS3231_OUTPUT_H
+
40
+ +
42#include <time.h>
+
43
+
44#ifdef __cplusplus
+
45extern "C"{
+
46#endif
+
47
+
52
+
56#define DS3231_OUTPUT_DEFAULT_AGING_OFFSET 0
+
57
+
65uint8_t ds3231_output_init(void);
+
66
+
74uint8_t ds3231_output_deinit(void);
+
75
+ +
85
+ +
95
+
104uint8_t ds3231_output_set_timestamp(time_t timestamp);
+
105
+
113uint8_t ds3231_output_set_timestamp_time_zone(int8_t zone);
+
114
+
123uint8_t ds3231_output_get_timestamp(time_t *timestamp);
+
124
+
132uint8_t ds3231_output_get_timestamp_time_zone(int8_t *zone);
+
133
+
143uint8_t ds3231_output_get_temperature(int16_t *raw, float *s);
+
144
+
154uint8_t ds3231_output_get_ascii_time(char *buf, uint8_t len);
+
155
+ +
165
+ +
175
+ +
185
+ +
195
+
199
+
200#ifdef __cplusplus
+
201}
+
202#endif
+
203
+
204#endif
driver ds3231 interface header file
-
ds3231_bool_t
ds3231 bool enumeration definition
Definition: driver_ds3231.h:64
-
uint8_t ds3231_output_set_timestamp(time_t timestamp)
output example set the time by a unix timestamp
-
uint8_t ds3231_output_set_square_wave(ds3231_bool_t enable)
output example enable or disable the square wave
-
uint8_t ds3231_output_set_32khz_output(ds3231_bool_t enable)
output example enable or disable the 32KHz output
-
uint8_t ds3231_output_get_timestamp_time_zone(int8_t *zone)
output example get the local time zone
-
uint8_t ds3231_output_set_time(ds3231_time_t *t)
output example set the time
-
uint8_t ds3231_output_get_32khz_output(ds3231_bool_t *enable)
output example get the 32KHz output status
-
uint8_t ds3231_output_get_temperature(int16_t *raw, float *s)
output example get the current temperature
-
uint8_t ds3231_output_set_timestamp_time_zone(int8_t zone)
output example set the local time zone
-
uint8_t ds3231_output_get_timestamp(time_t *timestamp)
output example get the time in a unix timestamp
-
uint8_t ds3231_output_init(void)
output example init
-
uint8_t ds3231_output_get_ascii_time(char *buf, uint8_t len)
output example get the ascii time
-
uint8_t ds3231_output_get_time(ds3231_time_t *t)
output example get the time
-
uint8_t ds3231_output_get_square_wave(ds3231_bool_t *enable)
output example get the square wave status
-
uint8_t ds3231_output_deinit(void)
output example deinit
-
ds3231 time structure definition
+
struct ds3231_time_s ds3231_time_t
ds3231 time structure definition
+
ds3231_bool_t
ds3231 bool enumeration definition
+
uint8_t ds3231_output_set_timestamp(time_t timestamp)
output example set the time by a unix timestamp
+
uint8_t ds3231_output_set_square_wave(ds3231_bool_t enable)
output example enable or disable the square wave
+
uint8_t ds3231_output_set_32khz_output(ds3231_bool_t enable)
output example enable or disable the 32KHz output
+
uint8_t ds3231_output_get_timestamp_time_zone(int8_t *zone)
output example get the local time zone
+
uint8_t ds3231_output_set_time(ds3231_time_t *t)
output example set the time
+
uint8_t ds3231_output_get_32khz_output(ds3231_bool_t *enable)
output example get the 32KHz output status
+
uint8_t ds3231_output_get_temperature(int16_t *raw, float *s)
output example get the current temperature
+
uint8_t ds3231_output_set_timestamp_time_zone(int8_t zone)
output example set the local time zone
+
uint8_t ds3231_output_get_timestamp(time_t *timestamp)
output example get the time in a unix timestamp
+
uint8_t ds3231_output_init(void)
output example init
+
uint8_t ds3231_output_get_ascii_time(char *buf, uint8_t len)
output example get the ascii time
+
uint8_t ds3231_output_get_time(ds3231_time_t *t)
output example get the time
+
uint8_t ds3231_output_get_square_wave(ds3231_bool_t *enable)
output example get the square wave status
+
uint8_t ds3231_output_deinit(void)
output example deinit
+
diff --git a/doc/html/driver__ds3231__output__test_8c.html b/doc/html/driver__ds3231__output__test_8c.html index 7200d3a..62f099c 100644 --- a/doc/html/driver__ds3231__output__test_8c.html +++ b/doc/html/driver__ds3231__output__test_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_output_test.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_output_test.c File Reference
+
driver_ds3231_output_test.c File Reference
@@ -95,16 +99,20 @@ More...

#include "driver_ds3231_output_test.h"
#include <stdlib.h>
+
+Include dependency graph for driver_ds3231_output_test.c:
+
+
+

Go to the source code of this file.

- - - - + +

+

Functions

uint8_t ds3231_output_test (uint32_t times)
 output test More...
 
uint8_t ds3231_output_test (uint32_t times)
 output test
-

Detailed Description

+

Detailed Description

driver ds3231 output test source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -127,11 +135,19 @@

history

Definition in file driver_ds3231_output_test.c.

+ +
diff --git a/doc/html/driver__ds3231__output__test_8c__incl.md5 b/doc/html/driver__ds3231__output__test_8c__incl.md5 new file mode 100644 index 0000000..b88db15 --- /dev/null +++ b/doc/html/driver__ds3231__output__test_8c__incl.md5 @@ -0,0 +1 @@ +21ca06a229d5e948ad4fa10745ce78b6 \ No newline at end of file diff --git a/doc/html/driver__ds3231__output__test_8c__incl.svg b/doc/html/driver__ds3231__output__test_8c__incl.svg new file mode 100644 index 0000000..58c8c5b --- /dev/null +++ b/doc/html/driver__ds3231__output__test_8c__incl.svg @@ -0,0 +1,149 @@ + + + + + + +test/driver_ds3231_output_test.c + + +Node1 + + +test/driver_ds3231 +_output_test.c + + + + + +Node2 + + +driver_ds3231_output +_test.h + + + + + +Node1->Node2 + + + + + + + + +Node8 + + +stdlib.h + + + + + +Node1->Node8 + + + + + + + + +Node3 + + +driver_ds3231_interface.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +driver_ds3231.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdio.h + + + + + +Node4->Node5 + + + + + + + + +Node6 + + +stdint.h + + + + + +Node4->Node6 + + + + + + + + +Node7 + + +string.h + + + + + +Node4->Node7 + + + + + + + + diff --git a/doc/html/driver__ds3231__output__test_8c_source.html b/doc/html/driver__ds3231__output__test_8c_source.html index b0f8097..bbd09c7 100644 --- a/doc/html/driver__ds3231__output__test_8c_source.html +++ b/doc/html/driver__ds3231__output__test_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_output_test.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_output_test.c
+
driver_ds3231_output_test.c
-Go to the documentation of this file.
1 
- -
39 #include <stdlib.h>
-
40 
-
41 static ds3231_handle_t gs_handle;
-
51 uint8_t ds3231_output_test(uint32_t times)
-
52 {
-
53  uint8_t res;
-
54  uint32_t i;
-
55  int8_t reg;
-
56  ds3231_info_t info;
-
57 
-
58  /* link functions */
- - - - - - - - -
67 
-
68  /* get ds3231 info */
-
69  res = ds3231_info(&info);
-
70  if (res != 0)
-
71  {
-
72  ds3231_interface_debug_print("ds3231: get info failed.\n");
-
73 
-
74  return 1;
-
75  }
-
76  else
-
77  {
-
78  /* print ds3231 info */
-
79  ds3231_interface_debug_print("ds3231: chip is %s.\n", info.chip_name);
-
80  ds3231_interface_debug_print("ds3231: manufacturer is %s.\n", info.manufacturer_name);
-
81  ds3231_interface_debug_print("ds3231: interface is %s.\n", info.interface);
-
82  ds3231_interface_debug_print("ds3231: driver version is %d.%d.\n", info.driver_version / 1000, (info.driver_version % 1000) / 100);
-
83  ds3231_interface_debug_print("ds3231: min supply voltage is %0.1fV.\n", info.supply_voltage_min_v);
-
84  ds3231_interface_debug_print("ds3231: max supply voltage is %0.1fV.\n", info.supply_voltage_max_v);
-
85  ds3231_interface_debug_print("ds3231: max current is %0.2fmA.\n", info.max_current_ma);
-
86  ds3231_interface_debug_print("ds3231: max temperature is %0.1fC.\n", info.temperature_max);
-
87  ds3231_interface_debug_print("ds3231: min temperature is %0.1fC.\n", info.temperature_min);
-
88  }
-
89 
-
90  /* start output test */
-
91  ds3231_interface_debug_print("ds3231: start output test.\n");
-
92 
-
93  /* init ds3231 */
-
94  res = ds3231_init(&gs_handle);
-
95  if (res != 0)
-
96  {
-
97  ds3231_interface_debug_print("ds3231: init failed.\n");
-
98 
-
99  return 1;
-
100  }
-
101 
-
102  /* set oscillator */
-
103  res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
-
104  if (res != 0)
-
105  {
-
106  ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
-
107  (void)ds3231_deinit(&gs_handle);
-
108 
-
109  return 1;
-
110  }
-
111 
-
112  /* disable alarm1 */
- -
114  if (res != 0)
-
115  {
-
116  ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
-
117  (void)ds3231_deinit(&gs_handle);
-
118 
-
119  return 1;
-
120  }
-
121 
-
122  /* disable alarm2 */
- -
124  if (res != 0)
-
125  {
-
126  ds3231_interface_debug_print("ds3231: set alarm2 interrupt failed.\n");
-
127  (void)ds3231_deinit(&gs_handle);
-
128 
-
129  return 1;
-
130  }
-
131 
-
132  /* set square wave */
-
133  res = ds3231_set_pin(&gs_handle, DS3231_PIN_SQUARE_WAVE);
-
134  if (res != 0)
-
135  {
-
136  ds3231_interface_debug_print("ds3231: set pin failed.\n");
-
137  (void)ds3231_deinit(&gs_handle);
-
138 
-
139  return 1;
-
140  }
-
141 
-
142  /* disable square wave */
-
143  res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
-
144  if (res != 0)
-
145  {
-
146  ds3231_interface_debug_print("ds3231: set square wave failed.\n");
-
147  (void)ds3231_deinit(&gs_handle);
-
148 
-
149  return 1;
-
150  }
-
151 
-
152  /* disable 32khz output */
-
153  res = ds3231_set_32khz_output(&gs_handle, DS3231_BOOL_FALSE);
-
154  if (res != 0)
-
155  {
-
156  ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
-
157  (void)ds3231_deinit(&gs_handle);
-
158 
-
159  return 1;
-
160  }
-
161 
-
162  /* convert to register */
-
163  res = ds3231_aging_offset_convert_to_register(&gs_handle, 0, (int8_t *)&reg);
-
164  if (res != 0)
-
165  {
-
166  ds3231_interface_debug_print("ds3231: convert to register failed.\n");
-
167  (void)ds3231_deinit(&gs_handle);
-
168 
-
169  return 1;
-
170  }
-
171 
-
172  /* set aging offset */
-
173  res = ds3231_set_aging_offset(&gs_handle, reg);
-
174  if (res != 0)
-
175  {
-
176  ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
-
177  (void)ds3231_deinit(&gs_handle);
-
178 
-
179  return 1;
-
180  }
-
181  ds3231_interface_debug_print("ds3231: enable square wave.\n");
-
182 
-
183  /* enable square wave */
-
184  res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_TRUE);
-
185  if (res != 0)
-
186  {
-
187  ds3231_interface_debug_print("ds3231: set square wave failed.\n");
-
188  (void)ds3231_deinit(&gs_handle);
-
189 
-
190  return 1;
-
191  }
-
192  for (i = 0; i < times; i++)
-
193  {
- -
195  ds3231_interface_debug_print("ds3231: run %ds.\n", i+1);
-
196  }
-
197 
-
198  /* disable square wave */
-
199  res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
-
200  if (res != 0)
-
201  {
-
202  ds3231_interface_debug_print("ds3231: set square wave failed.\n");
-
203  (void)ds3231_deinit(&gs_handle);
-
204 
-
205  return 1;
-
206  }
-
207  ds3231_interface_debug_print("ds3231: disable square wave.\n");
-
208  ds3231_interface_debug_print("ds3231: enable 32khz output.\n");
-
209 
-
210  /* enable 32khz output */
-
211  res = ds3231_set_32khz_output(&gs_handle, DS3231_BOOL_TRUE);
-
212  if (res != 0)
-
213  {
-
214  ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
-
215  (void)ds3231_deinit(&gs_handle);
-
216 
-
217  return 1;
-
218  }
-
219  for (i = 0; i < times; i++)
-
220  {
- -
222  ds3231_interface_debug_print("ds3231: run %ds.\n", i+1);
-
223  }
-
224 
-
225  /* disable 32khz output */
-
226  res = ds3231_set_32khz_output(&gs_handle, DS3231_BOOL_FALSE);
-
227  if (res != 0)
-
228  {
-
229  ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
-
230  (void)ds3231_deinit(&gs_handle);
-
231 
-
232  return 1;
-
233  }
-
234  ds3231_interface_debug_print("ds3231: disable 32khz output.\n");
-
235 
-
236  /* finish output test */
-
237  ds3231_interface_debug_print("ds3231: finish output test.\n");
-
238  (void)ds3231_deinit(&gs_handle);
-
239 
-
240  return 0;
-
241 }
+Go to the documentation of this file.
1
+
37
+ +
39#include <stdlib.h>
+
40
+
41static ds3231_handle_t gs_handle;
+
42
+
+
51uint8_t ds3231_output_test(uint32_t times)
+
52{
+
53 uint8_t res;
+
54 uint32_t i;
+
55 int8_t reg;
+
56 ds3231_info_t info;
+
57
+
58 /* link functions */
+ + + + + + + + +
67
+
68 /* get ds3231 info */
+
69 res = ds3231_info(&info);
+
70 if (res != 0)
+
71 {
+
72 ds3231_interface_debug_print("ds3231: get info failed.\n");
+
73
+
74 return 1;
+
75 }
+
76 else
+
77 {
+
78 /* print ds3231 info */
+
79 ds3231_interface_debug_print("ds3231: chip is %s.\n", info.chip_name);
+
80 ds3231_interface_debug_print("ds3231: manufacturer is %s.\n", info.manufacturer_name);
+
81 ds3231_interface_debug_print("ds3231: interface is %s.\n", info.interface);
+
82 ds3231_interface_debug_print("ds3231: driver version is %d.%d.\n", info.driver_version / 1000, (info.driver_version % 1000) / 100);
+
83 ds3231_interface_debug_print("ds3231: min supply voltage is %0.1fV.\n", info.supply_voltage_min_v);
+
84 ds3231_interface_debug_print("ds3231: max supply voltage is %0.1fV.\n", info.supply_voltage_max_v);
+
85 ds3231_interface_debug_print("ds3231: max current is %0.2fmA.\n", info.max_current_ma);
+
86 ds3231_interface_debug_print("ds3231: max temperature is %0.1fC.\n", info.temperature_max);
+
87 ds3231_interface_debug_print("ds3231: min temperature is %0.1fC.\n", info.temperature_min);
+
88 }
+
89
+
90 /* start output test */
+
91 ds3231_interface_debug_print("ds3231: start output test.\n");
+
92
+
93 /* init ds3231 */
+
94 res = ds3231_init(&gs_handle);
+
95 if (res != 0)
+
96 {
+
97 ds3231_interface_debug_print("ds3231: init failed.\n");
+
98
+
99 return 1;
+
100 }
+
101
+
102 /* set oscillator */
+
103 res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
+
104 if (res != 0)
+
105 {
+
106 ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
+
107 (void)ds3231_deinit(&gs_handle);
+
108
+
109 return 1;
+
110 }
+
111
+
112 /* disable alarm1 */
+ +
114 if (res != 0)
+
115 {
+
116 ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
+
117 (void)ds3231_deinit(&gs_handle);
+
118
+
119 return 1;
+
120 }
+
121
+
122 /* disable alarm2 */
+ +
124 if (res != 0)
+
125 {
+
126 ds3231_interface_debug_print("ds3231: set alarm2 interrupt failed.\n");
+
127 (void)ds3231_deinit(&gs_handle);
+
128
+
129 return 1;
+
130 }
+
131
+
132 /* set square wave */
+
133 res = ds3231_set_pin(&gs_handle, DS3231_PIN_SQUARE_WAVE);
+
134 if (res != 0)
+
135 {
+
136 ds3231_interface_debug_print("ds3231: set pin failed.\n");
+
137 (void)ds3231_deinit(&gs_handle);
+
138
+
139 return 1;
+
140 }
+
141
+
142 /* disable square wave */
+
143 res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
+
144 if (res != 0)
+
145 {
+
146 ds3231_interface_debug_print("ds3231: set square wave failed.\n");
+
147 (void)ds3231_deinit(&gs_handle);
+
148
+
149 return 1;
+
150 }
+
151
+
152 /* disable 32khz output */
+ +
154 if (res != 0)
+
155 {
+
156 ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
+
157 (void)ds3231_deinit(&gs_handle);
+
158
+
159 return 1;
+
160 }
+
161
+
162 /* convert to register */
+
163 res = ds3231_aging_offset_convert_to_register(&gs_handle, 0, (int8_t *)&reg);
+
164 if (res != 0)
+
165 {
+
166 ds3231_interface_debug_print("ds3231: convert to register failed.\n");
+
167 (void)ds3231_deinit(&gs_handle);
+
168
+
169 return 1;
+
170 }
+
171
+
172 /* set aging offset */
+
173 res = ds3231_set_aging_offset(&gs_handle, reg);
+
174 if (res != 0)
+
175 {
+
176 ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
+
177 (void)ds3231_deinit(&gs_handle);
+
178
+
179 return 1;
+
180 }
+
181 ds3231_interface_debug_print("ds3231: enable square wave.\n");
+
182
+
183 /* enable square wave */
+
184 res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_TRUE);
+
185 if (res != 0)
+
186 {
+
187 ds3231_interface_debug_print("ds3231: set square wave failed.\n");
+
188 (void)ds3231_deinit(&gs_handle);
+
189
+
190 return 1;
+
191 }
+
192 for (i = 0; i < times; i++)
+
193 {
+ +
195 ds3231_interface_debug_print("ds3231: run %ds.\n", i+1);
+
196 }
+
197
+
198 /* disable square wave */
+
199 res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
+
200 if (res != 0)
+
201 {
+
202 ds3231_interface_debug_print("ds3231: set square wave failed.\n");
+
203 (void)ds3231_deinit(&gs_handle);
+
204
+
205 return 1;
+
206 }
+
207 ds3231_interface_debug_print("ds3231: disable square wave.\n");
+
208 ds3231_interface_debug_print("ds3231: enable 32khz output.\n");
+
209
+
210 /* enable 32khz output */
+
211 res = ds3231_set_32khz_output(&gs_handle, DS3231_BOOL_TRUE);
+
212 if (res != 0)
+
213 {
+
214 ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
+
215 (void)ds3231_deinit(&gs_handle);
+
216
+
217 return 1;
+
218 }
+
219 for (i = 0; i < times; i++)
+
220 {
+ +
222 ds3231_interface_debug_print("ds3231: run %ds.\n", i+1);
+
223 }
+
224
+
225 /* disable 32khz output */
+ +
227 if (res != 0)
+
228 {
+
229 ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
+
230 (void)ds3231_deinit(&gs_handle);
+
231
+
232 return 1;
+
233 }
+
234 ds3231_interface_debug_print("ds3231: disable 32khz output.\n");
+
235
+
236 /* finish output test */
+
237 ds3231_interface_debug_print("ds3231: finish output test.\n");
+
238 (void)ds3231_deinit(&gs_handle);
+
239
+
240 return 0;
+
241}
+
driver ds3231 output test header file
-
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
-
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
-
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
-
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
-
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
-
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
-
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
-
uint8_t ds3231_info(ds3231_info_t *info)
get chip's information
-
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
-
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
-
@ DS3231_ALARM_2
Definition: driver_ds3231.h:75
-
@ DS3231_ALARM_1
Definition: driver_ds3231.h:74
-
@ DS3231_PIN_SQUARE_WAVE
Definition: driver_ds3231.h:92
-
@ DS3231_BOOL_TRUE
Definition: driver_ds3231.h:66
-
@ DS3231_BOOL_FALSE
Definition: driver_ds3231.h:65
-
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
-
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
-
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
-
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
-
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
- - - - - - - - -
uint8_t ds3231_output_test(uint32_t times)
output test
-
ds3231 handle structure definition
-
ds3231 information structure definition
-
float temperature_max
-
float supply_voltage_max_v
-
uint32_t driver_version
-
float temperature_min
-
float max_current_ma
-
char manufacturer_name[32]
-
float supply_voltage_min_v
-
char interface[8]
-
char chip_name[32]
+
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
+
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
+
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
+
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
+
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
+
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
+
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
+
uint8_t ds3231_info(ds3231_info_t *info)
get chip's information
+
struct ds3231_handle_s ds3231_handle_t
ds3231 handle structure definition
+
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
+
struct ds3231_info_s ds3231_info_t
ds3231 information structure definition
+
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
+
@ DS3231_ALARM_2
+
@ DS3231_ALARM_1
+
@ DS3231_PIN_SQUARE_WAVE
+
@ DS3231_BOOL_TRUE
+
@ DS3231_BOOL_FALSE
+
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
+
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
+
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
+
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
+
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+ + + + + + + + +
uint8_t ds3231_output_test(uint32_t times)
output test
+ +
float supply_voltage_max_v
+
uint32_t driver_version
+ + +
char manufacturer_name[32]
+
float supply_voltage_min_v
+ +
char chip_name[32]
+
diff --git a/doc/html/driver__ds3231__output__test_8h.html b/doc/html/driver__ds3231__output__test_8h.html index 504a346..af1e8ef 100644 --- a/doc/html/driver__ds3231__output__test_8h.html +++ b/doc/html/driver__ds3231__output__test_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_output_test.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_output_test.h File Reference
+
driver_ds3231_output_test.h File Reference

driver ds3231 output test header file More...

+Include dependency graph for driver_ds3231_output_test.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+

Go to the source code of this file.

- - - - + +

+

Functions

uint8_t ds3231_output_test (uint32_t times)
 output test More...
 
uint8_t ds3231_output_test (uint32_t times)
 output test
-

Detailed Description

+

Detailed Description

driver ds3231 output test header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -126,11 +139,19 @@

history

Definition in file driver_ds3231_output_test.h.

+ +
diff --git a/doc/html/driver__ds3231__output__test_8h__dep__incl.md5 b/doc/html/driver__ds3231__output__test_8h__dep__incl.md5 new file mode 100644 index 0000000..e6bf590 --- /dev/null +++ b/doc/html/driver__ds3231__output__test_8h__dep__incl.md5 @@ -0,0 +1 @@ +3595e5cf4583cfd4107d9075dcdcd36b \ No newline at end of file diff --git a/doc/html/driver__ds3231__output__test_8h__dep__incl.svg b/doc/html/driver__ds3231__output__test_8h__dep__incl.svg new file mode 100644 index 0000000..324f19b --- /dev/null +++ b/doc/html/driver__ds3231__output__test_8h__dep__incl.svg @@ -0,0 +1,41 @@ + + + + + + +test/driver_ds3231_output_test.h + + +Node1 + + +test/driver_ds3231 +_output_test.h + + + + + +Node2 + + +test/driver_ds3231 +_output_test.c + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/driver__ds3231__output__test_8h__incl.md5 b/doc/html/driver__ds3231__output__test_8h__incl.md5 new file mode 100644 index 0000000..e69d2e5 --- /dev/null +++ b/doc/html/driver__ds3231__output__test_8h__incl.md5 @@ -0,0 +1 @@ +8d991fa1af94dc5d74b19aecab38f0c4 \ No newline at end of file diff --git a/doc/html/driver__ds3231__output__test_8h__incl.svg b/doc/html/driver__ds3231__output__test_8h__incl.svg new file mode 100644 index 0000000..44cef19 --- /dev/null +++ b/doc/html/driver__ds3231__output__test_8h__incl.svg @@ -0,0 +1,112 @@ + + + + + + +test/driver_ds3231_output_test.h + + +Node1 + + +test/driver_ds3231 +_output_test.h + + + + + +Node2 + + +driver_ds3231_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ds3231.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdio.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdint.h + + + + + +Node3->Node5 + + + + + + + + +Node6 + + +string.h + + + + + +Node3->Node6 + + + + + + + + diff --git a/doc/html/driver__ds3231__output__test_8h_source.html b/doc/html/driver__ds3231__output__test_8h_source.html index 9a9bb99..02a8701 100644 --- a/doc/html/driver__ds3231__output__test_8h_source.html +++ b/doc/html/driver__ds3231__output__test_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_output_test.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_output_test.h
+
driver_ds3231_output_test.h
-Go to the documentation of this file.
1 
-
38 #ifndef DRIVER_DS3231_OUTPUT_TEST_H
-
39 #define DRIVER_DS3231_OUTPUT_TEST_H
-
40 
- -
42 
-
43 #ifdef __cplusplus
-
44 extern "C"{
-
45 #endif
-
46 
-
60 uint8_t ds3231_output_test(uint32_t times);
-
61 
-
66 #ifdef __cplusplus
-
67 }
-
68 #endif
-
69 
-
70 #endif
+Go to the documentation of this file.
1
+
37
+
38#ifndef DRIVER_DS3231_OUTPUT_TEST_H
+
39#define DRIVER_DS3231_OUTPUT_TEST_H
+
40
+ +
42
+
43#ifdef __cplusplus
+
44extern "C"{
+
45#endif
+
46
+
51
+
60uint8_t ds3231_output_test(uint32_t times);
+
61
+
65
+
66#ifdef __cplusplus
+
67}
+
68#endif
+
69
+
70#endif
driver ds3231 interface header file
-
uint8_t ds3231_output_test(uint32_t times)
output test
+
uint8_t ds3231_output_test(uint32_t times)
output test
+
diff --git a/doc/html/driver__ds3231__readwrite__test_8c.html b/doc/html/driver__ds3231__readwrite__test_8c.html index a68bacf..0d6375d 100644 --- a/doc/html/driver__ds3231__readwrite__test_8c.html +++ b/doc/html/driver__ds3231__readwrite__test_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_readwrite_test.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_readwrite_test.c File Reference
+
driver_ds3231_readwrite_test.c File Reference
@@ -95,16 +99,20 @@ More...

#include "driver_ds3231_readwrite_test.h"
#include <stdlib.h>
+
+Include dependency graph for driver_ds3231_readwrite_test.c:
+
+
+

Go to the source code of this file.

- - - - + +

+

Functions

uint8_t ds3231_readwrite_test (uint32_t times)
 readwrite test More...
 
uint8_t ds3231_readwrite_test (uint32_t times)
 readwrite test
-

Detailed Description

+

Detailed Description

driver ds3231 readwrite test source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -127,11 +135,19 @@

history

Definition in file driver_ds3231_readwrite_test.c.

+ +
diff --git a/doc/html/driver__ds3231__readwrite__test_8c__incl.md5 b/doc/html/driver__ds3231__readwrite__test_8c__incl.md5 new file mode 100644 index 0000000..67d532f --- /dev/null +++ b/doc/html/driver__ds3231__readwrite__test_8c__incl.md5 @@ -0,0 +1 @@ +24392ac770b670681cb676d46741c0f7 \ No newline at end of file diff --git a/doc/html/driver__ds3231__readwrite__test_8c__incl.svg b/doc/html/driver__ds3231__readwrite__test_8c__incl.svg new file mode 100644 index 0000000..211f9ef --- /dev/null +++ b/doc/html/driver__ds3231__readwrite__test_8c__incl.svg @@ -0,0 +1,149 @@ + + + + + + +test/driver_ds3231_readwrite_test.c + + +Node1 + + +test/driver_ds3231 +_readwrite_test.c + + + + + +Node2 + + +driver_ds3231_readwrite +_test.h + + + + + +Node1->Node2 + + + + + + + + +Node8 + + +stdlib.h + + + + + +Node1->Node8 + + + + + + + + +Node3 + + +driver_ds3231_interface.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +driver_ds3231.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdio.h + + + + + +Node4->Node5 + + + + + + + + +Node6 + + +stdint.h + + + + + +Node4->Node6 + + + + + + + + +Node7 + + +string.h + + + + + +Node4->Node7 + + + + + + + + diff --git a/doc/html/driver__ds3231__readwrite__test_8c_source.html b/doc/html/driver__ds3231__readwrite__test_8c_source.html index bc88bfa..5182ff6 100644 --- a/doc/html/driver__ds3231__readwrite__test_8c_source.html +++ b/doc/html/driver__ds3231__readwrite__test_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_readwrite_test.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_readwrite_test.c
+
driver_ds3231_readwrite_test.c
-Go to the documentation of this file.
1 
- -
39 #include <stdlib.h>
-
40 
-
41 static ds3231_handle_t gs_handle;
-
51 uint8_t ds3231_readwrite_test(uint32_t times)
-
52 {
-
53  uint8_t res;
-
54  int8_t reg;
-
55  uint32_t i;
-
56  int16_t raw;
-
57  float s;
-
58  ds3231_info_t info;
-
59  ds3231_time_t time_in, time_out;
-
60 
-
61  /* link functions */
- - - - - - - - -
70 
-
71  /* get ds3231 info */
-
72  res = ds3231_info(&info);
-
73  if (res != 0)
-
74  {
-
75  ds3231_interface_debug_print("ds3231: get info failed.\n");
-
76 
-
77  return 1;
-
78  }
-
79  else
-
80  {
-
81  /* print ds3231 info */
-
82  ds3231_interface_debug_print("ds3231: chip is %s.\n", info.chip_name);
-
83  ds3231_interface_debug_print("ds3231: manufacturer is %s.\n", info.manufacturer_name);
-
84  ds3231_interface_debug_print("ds3231: interface is %s.\n", info.interface);
-
85  ds3231_interface_debug_print("ds3231: driver version is %d.%d.\n", info.driver_version / 1000, (info.driver_version % 1000) / 100);
-
86  ds3231_interface_debug_print("ds3231: min supply voltage is %0.1fV.\n", info.supply_voltage_min_v);
-
87  ds3231_interface_debug_print("ds3231: max supply voltage is %0.1fV.\n", info.supply_voltage_max_v);
-
88  ds3231_interface_debug_print("ds3231: max current is %0.2fmA.\n", info.max_current_ma);
-
89  ds3231_interface_debug_print("ds3231: max temperature is %0.1fC.\n", info.temperature_max);
-
90  ds3231_interface_debug_print("ds3231: min temperature is %0.1fC.\n", info.temperature_min);
-
91  }
-
92 
-
93  /* start readwrite test */
-
94  ds3231_interface_debug_print("ds3231: start readwrite test.\n");
-
95 
-
96  /* init ds3231 */
-
97  res = ds3231_init(&gs_handle);
-
98  if (res != 0)
-
99  {
-
100  ds3231_interface_debug_print("ds3231: init failed.\n");
-
101 
-
102  return 1;
-
103  }
-
104 
-
105  /* set oscillator */
-
106  res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
-
107  if (res != 0)
-
108  {
-
109  ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
-
110  (void)ds3231_deinit(&gs_handle);
-
111 
-
112  return 1;
-
113  }
-
114 
-
115  /* disable alarm1 */
- -
117  if (res != 0)
-
118  {
-
119  ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
-
120  (void)ds3231_deinit(&gs_handle);
-
121 
-
122  return 1;
-
123  }
-
124 
-
125  /* disable alarm2 */
- -
127  if (res != 0)
-
128  {
-
129  ds3231_interface_debug_print("ds3231: set alarm2 interrupt failed.\n");
-
130  (void)ds3231_deinit(&gs_handle);
-
131 
-
132  return 1;
-
133  }
-
134 
-
135  /* set square wave */
-
136  res = ds3231_set_pin(&gs_handle, DS3231_PIN_SQUARE_WAVE);
-
137  if (res != 0)
-
138  {
-
139  ds3231_interface_debug_print("ds3231: set pin failed.\n");
-
140  (void)ds3231_deinit(&gs_handle);
-
141 
-
142  return 1;
-
143  }
-
144 
-
145  /* disable square wave */
-
146  res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
-
147  if (res != 0)
-
148  {
-
149  ds3231_interface_debug_print("ds3231: set square wave failed.\n");
-
150  (void)ds3231_deinit(&gs_handle);
-
151 
-
152  return 1;
-
153  }
-
154 
-
155  /* disable 32khz output */
-
156  res = ds3231_set_32khz_output(&gs_handle, DS3231_BOOL_FALSE);
-
157  if (res != 0)
-
158  {
-
159  ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
-
160  (void)ds3231_deinit(&gs_handle);
-
161 
-
162  return 1;
-
163  }
-
164 
-
165  /* convert to register */
-
166  res = ds3231_aging_offset_convert_to_register(&gs_handle, 0, (int8_t *)&reg);
-
167  if (res != 0)
-
168  {
-
169  ds3231_interface_debug_print("ds3231: convert to register failed.\n");
-
170  (void)ds3231_deinit(&gs_handle);
-
171 
-
172  return 1;
-
173  }
-
174 
-
175  /* set aging offset */
-
176  res = ds3231_set_aging_offset(&gs_handle, reg);
-
177  if (res != 0)
-
178  {
-
179  ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
-
180  (void)ds3231_deinit(&gs_handle);
-
181 
-
182  return 1;
-
183  }
-
184 
-
185  /* ds3231_set_time/ds3231_get_time test */
-
186  ds3231_interface_debug_print("ds3231: ds3231_set_time/ds3231_get_time test.\n");
-
187 
-
188  /* 12H format */
-
189  time_in.format = DS3231_FORMAT_12H;
-
190  time_in.am_pm = DS3231_PM;
-
191  time_in.year = rand() % 100 + 2000;
-
192  time_in.month = rand() % 12 + 1;
-
193  time_in.date = rand() % 20 + 1;
-
194  time_in.date = rand() % 20 + 1;
-
195  time_in.week = rand() % 7 + 1;
-
196  time_in.hour = rand() % 11 + 1;
-
197  time_in.minute = rand() % 60;
-
198  time_in.second = rand() % 60;
-
199  ds3231_interface_debug_print("ds3231: set time %04d-%02d-%02d PM %02d:%02d:%02d %d in 12 format.\n",
-
200  time_in.year, time_in.month, time_in.date,
-
201  time_in.hour, time_in.minute, time_in.second, time_in.week
-
202  );
-
203  res = ds3231_set_time(&gs_handle, &time_in);
-
204  if (res != 0)
-
205  {
-
206  ds3231_interface_debug_print("ds3231: set time failed.\n");
-
207  (void)ds3231_deinit(&gs_handle);
-
208 
-
209  return 1;
-
210  }
-
211  for (i = 0; i < times; i++)
-
212  {
- -
214  res = ds3231_get_time(&gs_handle, &time_out);
-
215  if (res != 0)
-
216  {
-
217  ds3231_interface_debug_print("ds3231: get time failed.\n");
-
218  (void)ds3231_deinit(&gs_handle);
-
219 
-
220  return 1;
-
221  }
-
222  ds3231_interface_debug_print("ds3231: time is %04d-%02d-%02d PM %02d:%02d:%02d %d.\n",
-
223  time_out.year, time_out.month, time_out.date,
-
224  time_out.hour, time_out.minute, time_out.second, time_out.week
-
225  );
-
226  }
-
227 
-
228  /* 24H format */
-
229  time_in.format = DS3231_FORMAT_24H;
-
230  time_in.am_pm = DS3231_AM;
-
231  time_in.year = rand() % 100 + 2090;
-
232  time_in.month = rand() % 12 + 1;
-
233  time_in.date = rand() % 20 + 1;
-
234  time_in.week = rand() % 7 + 1;
-
235  time_in.hour = rand() % 12 + 12;
-
236  time_in.minute = rand() % 60;
-
237  time_in.second = rand() % 60;
-
238  ds3231_interface_debug_print("ds3231: set time %04d-%02d-%02d %02d:%02d:%02d %d in 24 format.\n",
-
239  time_in.year, time_in.month, time_in.date,
-
240  time_in.hour, time_in.minute, time_in.second, time_in.week
-
241  );
-
242  res = ds3231_set_time(&gs_handle, &time_in);
-
243  if (res != 0)
-
244  {
-
245  ds3231_interface_debug_print("ds3231: set time failed.\n");
-
246  (void)ds3231_deinit(&gs_handle);
-
247 
-
248  return 1;
-
249  }
-
250  for (i = 0; i < times; i++)
-
251  {
- -
253  res = ds3231_get_time(&gs_handle, &time_out);
-
254  if (res != 0)
-
255  {
-
256  ds3231_interface_debug_print("ds3231: get time failed.\n");
-
257  (void)ds3231_deinit(&gs_handle);
-
258 
-
259  return 1;
-
260  }
-
261  ds3231_interface_debug_print("ds3231: time is %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
262  time_out.year, time_out.month, time_out.date,
-
263  time_out.hour, time_out.minute, time_out.second, time_out.week
-
264  );
-
265  }
-
266  ds3231_interface_debug_print("ds3231: read temperature.\n");
-
267  for (i = 0; i < times; i++)
-
268  {
- -
270  res = ds3231_get_temperature(&gs_handle, (int16_t *)&raw, (float *)&s);
-
271  if (res != 0)
-
272  {
-
273  ds3231_interface_debug_print("ds3231: get temperature failed.\n");
-
274  (void)ds3231_deinit(&gs_handle);
-
275 
-
276  return 1;
-
277  }
-
278  ds3231_interface_debug_print("ds3231: temperature is %0.2f.\n", s);
-
279  }
-
280 
-
281  /* finish readwrite test */
-
282  ds3231_interface_debug_print("ds3231: finish readwrite test.\n");
-
283  (void)ds3231_deinit(&gs_handle);
-
284 
-
285  return 0;
-
286 }
+Go to the documentation of this file.
1
+
37
+ +
39#include <stdlib.h>
+
40
+
41static ds3231_handle_t gs_handle;
+
42
+
+
51uint8_t ds3231_readwrite_test(uint32_t times)
+
52{
+
53 uint8_t res;
+
54 int8_t reg;
+
55 uint32_t i;
+
56 int16_t raw;
+
57 float s;
+
58 ds3231_info_t info;
+
59 ds3231_time_t time_in, time_out;
+
60
+
61 /* link functions */
+ + + + + + + + +
70
+
71 /* get ds3231 info */
+
72 res = ds3231_info(&info);
+
73 if (res != 0)
+
74 {
+
75 ds3231_interface_debug_print("ds3231: get info failed.\n");
+
76
+
77 return 1;
+
78 }
+
79 else
+
80 {
+
81 /* print ds3231 info */
+
82 ds3231_interface_debug_print("ds3231: chip is %s.\n", info.chip_name);
+
83 ds3231_interface_debug_print("ds3231: manufacturer is %s.\n", info.manufacturer_name);
+
84 ds3231_interface_debug_print("ds3231: interface is %s.\n", info.interface);
+
85 ds3231_interface_debug_print("ds3231: driver version is %d.%d.\n", info.driver_version / 1000, (info.driver_version % 1000) / 100);
+
86 ds3231_interface_debug_print("ds3231: min supply voltage is %0.1fV.\n", info.supply_voltage_min_v);
+
87 ds3231_interface_debug_print("ds3231: max supply voltage is %0.1fV.\n", info.supply_voltage_max_v);
+
88 ds3231_interface_debug_print("ds3231: max current is %0.2fmA.\n", info.max_current_ma);
+
89 ds3231_interface_debug_print("ds3231: max temperature is %0.1fC.\n", info.temperature_max);
+
90 ds3231_interface_debug_print("ds3231: min temperature is %0.1fC.\n", info.temperature_min);
+
91 }
+
92
+
93 /* start readwrite test */
+
94 ds3231_interface_debug_print("ds3231: start readwrite test.\n");
+
95
+
96 /* init ds3231 */
+
97 res = ds3231_init(&gs_handle);
+
98 if (res != 0)
+
99 {
+
100 ds3231_interface_debug_print("ds3231: init failed.\n");
+
101
+
102 return 1;
+
103 }
+
104
+
105 /* set oscillator */
+
106 res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
+
107 if (res != 0)
+
108 {
+
109 ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
+
110 (void)ds3231_deinit(&gs_handle);
+
111
+
112 return 1;
+
113 }
+
114
+
115 /* disable alarm1 */
+ +
117 if (res != 0)
+
118 {
+
119 ds3231_interface_debug_print("ds3231: set alarm1 interrupt failed.\n");
+
120 (void)ds3231_deinit(&gs_handle);
+
121
+
122 return 1;
+
123 }
+
124
+
125 /* disable alarm2 */
+ +
127 if (res != 0)
+
128 {
+
129 ds3231_interface_debug_print("ds3231: set alarm2 interrupt failed.\n");
+
130 (void)ds3231_deinit(&gs_handle);
+
131
+
132 return 1;
+
133 }
+
134
+
135 /* set square wave */
+
136 res = ds3231_set_pin(&gs_handle, DS3231_PIN_SQUARE_WAVE);
+
137 if (res != 0)
+
138 {
+
139 ds3231_interface_debug_print("ds3231: set pin failed.\n");
+
140 (void)ds3231_deinit(&gs_handle);
+
141
+
142 return 1;
+
143 }
+
144
+
145 /* disable square wave */
+
146 res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
+
147 if (res != 0)
+
148 {
+
149 ds3231_interface_debug_print("ds3231: set square wave failed.\n");
+
150 (void)ds3231_deinit(&gs_handle);
+
151
+
152 return 1;
+
153 }
+
154
+
155 /* disable 32khz output */
+ +
157 if (res != 0)
+
158 {
+
159 ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
+
160 (void)ds3231_deinit(&gs_handle);
+
161
+
162 return 1;
+
163 }
+
164
+
165 /* convert to register */
+
166 res = ds3231_aging_offset_convert_to_register(&gs_handle, 0, (int8_t *)&reg);
+
167 if (res != 0)
+
168 {
+
169 ds3231_interface_debug_print("ds3231: convert to register failed.\n");
+
170 (void)ds3231_deinit(&gs_handle);
+
171
+
172 return 1;
+
173 }
+
174
+
175 /* set aging offset */
+
176 res = ds3231_set_aging_offset(&gs_handle, reg);
+
177 if (res != 0)
+
178 {
+
179 ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
+
180 (void)ds3231_deinit(&gs_handle);
+
181
+
182 return 1;
+
183 }
+
184
+
185 /* ds3231_set_time/ds3231_get_time test */
+
186 ds3231_interface_debug_print("ds3231: ds3231_set_time/ds3231_get_time test.\n");
+
187
+
188 /* 12H format */
+
189 time_in.format = DS3231_FORMAT_12H;
+
190 time_in.am_pm = DS3231_PM;
+
191 time_in.year = rand() % 100 + 2000;
+
192 time_in.month = rand() % 12 + 1;
+
193 time_in.date = rand() % 20 + 1;
+
194 time_in.date = rand() % 20 + 1;
+
195 time_in.week = rand() % 7 + 1;
+
196 time_in.hour = rand() % 11 + 1;
+
197 time_in.minute = rand() % 60;
+
198 time_in.second = rand() % 60;
+
199 ds3231_interface_debug_print("ds3231: set time %04d-%02d-%02d PM %02d:%02d:%02d %d in 12 format.\n",
+
200 time_in.year, time_in.month, time_in.date,
+
201 time_in.hour, time_in.minute, time_in.second, time_in.week
+
202 );
+
203 res = ds3231_set_time(&gs_handle, &time_in);
+
204 if (res != 0)
+
205 {
+
206 ds3231_interface_debug_print("ds3231: set time failed.\n");
+
207 (void)ds3231_deinit(&gs_handle);
+
208
+
209 return 1;
+
210 }
+
211 for (i = 0; i < times; i++)
+
212 {
+ +
214 res = ds3231_get_time(&gs_handle, &time_out);
+
215 if (res != 0)
+
216 {
+
217 ds3231_interface_debug_print("ds3231: get time failed.\n");
+
218 (void)ds3231_deinit(&gs_handle);
+
219
+
220 return 1;
+
221 }
+
222 ds3231_interface_debug_print("ds3231: time is %04d-%02d-%02d PM %02d:%02d:%02d %d.\n",
+
223 time_out.year, time_out.month, time_out.date,
+
224 time_out.hour, time_out.minute, time_out.second, time_out.week
+
225 );
+
226 }
+
227
+
228 /* 24H format */
+
229 time_in.format = DS3231_FORMAT_24H;
+
230 time_in.am_pm = DS3231_AM;
+
231 time_in.year = rand() % 100 + 2090;
+
232 time_in.month = rand() % 12 + 1;
+
233 time_in.date = rand() % 20 + 1;
+
234 time_in.week = rand() % 7 + 1;
+
235 time_in.hour = rand() % 12 + 12;
+
236 time_in.minute = rand() % 60;
+
237 time_in.second = rand() % 60;
+
238 ds3231_interface_debug_print("ds3231: set time %04d-%02d-%02d %02d:%02d:%02d %d in 24 format.\n",
+
239 time_in.year, time_in.month, time_in.date,
+
240 time_in.hour, time_in.minute, time_in.second, time_in.week
+
241 );
+
242 res = ds3231_set_time(&gs_handle, &time_in);
+
243 if (res != 0)
+
244 {
+
245 ds3231_interface_debug_print("ds3231: set time failed.\n");
+
246 (void)ds3231_deinit(&gs_handle);
+
247
+
248 return 1;
+
249 }
+
250 for (i = 0; i < times; i++)
+
251 {
+ +
253 res = ds3231_get_time(&gs_handle, &time_out);
+
254 if (res != 0)
+
255 {
+
256 ds3231_interface_debug_print("ds3231: get time failed.\n");
+
257 (void)ds3231_deinit(&gs_handle);
+
258
+
259 return 1;
+
260 }
+
261 ds3231_interface_debug_print("ds3231: time is %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
262 time_out.year, time_out.month, time_out.date,
+
263 time_out.hour, time_out.minute, time_out.second, time_out.week
+
264 );
+
265 }
+
266 ds3231_interface_debug_print("ds3231: read temperature.\n");
+
267 for (i = 0; i < times; i++)
+
268 {
+ +
270 res = ds3231_get_temperature(&gs_handle, (int16_t *)&raw, (float *)&s);
+
271 if (res != 0)
+
272 {
+
273 ds3231_interface_debug_print("ds3231: get temperature failed.\n");
+
274 (void)ds3231_deinit(&gs_handle);
+
275
+
276 return 1;
+
277 }
+
278 ds3231_interface_debug_print("ds3231: temperature is %0.2f.\n", s);
+
279 }
+
280
+
281 /* finish readwrite test */
+
282 ds3231_interface_debug_print("ds3231: finish readwrite test.\n");
+
283 (void)ds3231_deinit(&gs_handle);
+
284
+
285 return 0;
+
286}
+
driver ds3231 readwrite test header file
-
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
-
uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
get the chip temperature
-
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
-
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
-
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
-
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
-
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
-
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
-
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
-
uint8_t ds3231_info(ds3231_info_t *info)
get chip's information
-
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
-
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
-
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
-
@ DS3231_PM
Definition: driver_ds3231.h:84
-
@ DS3231_AM
Definition: driver_ds3231.h:83
-
@ DS3231_ALARM_2
Definition: driver_ds3231.h:75
-
@ DS3231_ALARM_1
Definition: driver_ds3231.h:74
-
@ DS3231_FORMAT_24H
-
@ DS3231_FORMAT_12H
-
@ DS3231_PIN_SQUARE_WAVE
Definition: driver_ds3231.h:92
-
@ DS3231_BOOL_TRUE
Definition: driver_ds3231.h:66
-
@ DS3231_BOOL_FALSE
Definition: driver_ds3231.h:65
-
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
-
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
-
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
-
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
-
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
- - - - - - - - -
uint8_t ds3231_readwrite_test(uint32_t times)
readwrite test
-
ds3231 handle structure definition
-
ds3231 information structure definition
-
float temperature_max
-
float supply_voltage_max_v
-
uint32_t driver_version
-
float temperature_min
-
float max_current_ma
-
char manufacturer_name[32]
-
float supply_voltage_min_v
-
char interface[8]
-
char chip_name[32]
-
ds3231 time structure definition
- - -
ds3231_am_pm_t am_pm
- - -
ds3231_format_t format
- - - +
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
+
uint8_t ds3231_get_temperature(ds3231_handle_t *handle, int16_t *raw, float *s)
get the chip temperature
+
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
+
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
+
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
+
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
+
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
+
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
+
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
+
struct ds3231_time_s ds3231_time_t
ds3231 time structure definition
+
uint8_t ds3231_info(ds3231_info_t *info)
get chip's information
+
struct ds3231_handle_s ds3231_handle_t
ds3231 handle structure definition
+
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
+
struct ds3231_info_s ds3231_info_t
ds3231 information structure definition
+
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
+
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
+
@ DS3231_PM
+
@ DS3231_AM
+
@ DS3231_ALARM_2
+
@ DS3231_ALARM_1
+
@ DS3231_FORMAT_24H
+
@ DS3231_FORMAT_12H
+
@ DS3231_PIN_SQUARE_WAVE
+
@ DS3231_BOOL_TRUE
+
@ DS3231_BOOL_FALSE
+
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
+
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
+
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
+
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
+
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+ + + + + + + + +
uint8_t ds3231_readwrite_test(uint32_t times)
readwrite test
+ +
float supply_voltage_max_v
+
uint32_t driver_version
+ + +
char manufacturer_name[32]
+
float supply_voltage_min_v
+ +
char chip_name[32]
+ + +
ds3231_am_pm_t am_pm
+ + +
ds3231_format_t format
+ + +
+
diff --git a/doc/html/driver__ds3231__readwrite__test_8h.html b/doc/html/driver__ds3231__readwrite__test_8h.html index 13ef945..20d4fb4 100644 --- a/doc/html/driver__ds3231__readwrite__test_8h.html +++ b/doc/html/driver__ds3231__readwrite__test_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_readwrite_test.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_readwrite_test.h File Reference
+
driver_ds3231_readwrite_test.h File Reference

driver ds3231 readwrite test header file More...

+Include dependency graph for driver_ds3231_readwrite_test.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+

Go to the source code of this file.

- - - - + +

+

Functions

uint8_t ds3231_readwrite_test (uint32_t times)
 readwrite test More...
 
uint8_t ds3231_readwrite_test (uint32_t times)
 readwrite test
-

Detailed Description

+

Detailed Description

driver ds3231 readwrite test header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -126,11 +139,19 @@

history

Definition in file driver_ds3231_readwrite_test.h.

+ +
diff --git a/doc/html/driver__ds3231__readwrite__test_8h__dep__incl.md5 b/doc/html/driver__ds3231__readwrite__test_8h__dep__incl.md5 new file mode 100644 index 0000000..b521f94 --- /dev/null +++ b/doc/html/driver__ds3231__readwrite__test_8h__dep__incl.md5 @@ -0,0 +1 @@ +de6c67b3a42202db7f941dcb6f62f7bc \ No newline at end of file diff --git a/doc/html/driver__ds3231__readwrite__test_8h__dep__incl.svg b/doc/html/driver__ds3231__readwrite__test_8h__dep__incl.svg new file mode 100644 index 0000000..be239a5 --- /dev/null +++ b/doc/html/driver__ds3231__readwrite__test_8h__dep__incl.svg @@ -0,0 +1,41 @@ + + + + + + +test/driver_ds3231_readwrite_test.h + + +Node1 + + +test/driver_ds3231 +_readwrite_test.h + + + + + +Node2 + + +test/driver_ds3231 +_readwrite_test.c + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/driver__ds3231__readwrite__test_8h__incl.md5 b/doc/html/driver__ds3231__readwrite__test_8h__incl.md5 new file mode 100644 index 0000000..7b2d8bb --- /dev/null +++ b/doc/html/driver__ds3231__readwrite__test_8h__incl.md5 @@ -0,0 +1 @@ +a6e9c699d29d5f2f91fa68a88a586b25 \ No newline at end of file diff --git a/doc/html/driver__ds3231__readwrite__test_8h__incl.svg b/doc/html/driver__ds3231__readwrite__test_8h__incl.svg new file mode 100644 index 0000000..499bfeb --- /dev/null +++ b/doc/html/driver__ds3231__readwrite__test_8h__incl.svg @@ -0,0 +1,112 @@ + + + + + + +test/driver_ds3231_readwrite_test.h + + +Node1 + + +test/driver_ds3231 +_readwrite_test.h + + + + + +Node2 + + +driver_ds3231_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ds3231.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdio.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdint.h + + + + + +Node3->Node5 + + + + + + + + +Node6 + + +string.h + + + + + +Node3->Node6 + + + + + + + + diff --git a/doc/html/driver__ds3231__readwrite__test_8h_source.html b/doc/html/driver__ds3231__readwrite__test_8h_source.html index c2f1307..c0c94ab 100644 --- a/doc/html/driver__ds3231__readwrite__test_8h_source.html +++ b/doc/html/driver__ds3231__readwrite__test_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_readwrite_test.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_readwrite_test.h
+
driver_ds3231_readwrite_test.h
-Go to the documentation of this file.
1 
-
38 #ifndef DRIVER_DS3231_READWRITE_TEST_H
-
39 #define DRIVER_DS3231_READWRITE_TEST_H
-
40 
- -
42 
-
43 #ifdef __cplusplus
-
44 extern "C"{
-
45 #endif
-
46 
-
60 uint8_t ds3231_readwrite_test(uint32_t times);
-
61 
-
66 #ifdef __cplusplus
-
67 }
-
68 #endif
-
69 
-
70 #endif
+Go to the documentation of this file.
1
+
37
+
38#ifndef DRIVER_DS3231_READWRITE_TEST_H
+
39#define DRIVER_DS3231_READWRITE_TEST_H
+
40
+ +
42
+
43#ifdef __cplusplus
+
44extern "C"{
+
45#endif
+
46
+
51
+
60uint8_t ds3231_readwrite_test(uint32_t times);
+
61
+
65
+
66#ifdef __cplusplus
+
67}
+
68#endif
+
69
+
70#endif
driver ds3231 interface header file
-
uint8_t ds3231_readwrite_test(uint32_t times)
readwrite test
+
uint8_t ds3231_readwrite_test(uint32_t times)
readwrite test
+
diff --git a/doc/html/driver__ds3231__register__test_8c.html b/doc/html/driver__ds3231__register__test_8c.html index 3485784..5d34175 100644 --- a/doc/html/driver__ds3231__register__test_8c.html +++ b/doc/html/driver__ds3231__register__test_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_register_test.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_register_test.c File Reference
+
driver_ds3231_register_test.c File Reference
@@ -95,16 +99,20 @@ More...

#include "driver_ds3231_register_test.h"
#include <stdlib.h>
+
+Include dependency graph for driver_ds3231_register_test.c:
+
+
+

Go to the source code of this file.

- - - - + +

+

Functions

uint8_t ds3231_register_test (void)
 register test More...
 
uint8_t ds3231_register_test (void)
 register test
-

Detailed Description

+

Detailed Description

driver ds3231 register test source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -127,11 +135,19 @@

history

Definition in file driver_ds3231_register_test.c.

+ +
diff --git a/doc/html/driver__ds3231__register__test_8c__incl.md5 b/doc/html/driver__ds3231__register__test_8c__incl.md5 new file mode 100644 index 0000000..3b4bd8a --- /dev/null +++ b/doc/html/driver__ds3231__register__test_8c__incl.md5 @@ -0,0 +1 @@ +ef15af9f35b475ffb9eb1c0651a57cb5 \ No newline at end of file diff --git a/doc/html/driver__ds3231__register__test_8c__incl.svg b/doc/html/driver__ds3231__register__test_8c__incl.svg new file mode 100644 index 0000000..6013a26 --- /dev/null +++ b/doc/html/driver__ds3231__register__test_8c__incl.svg @@ -0,0 +1,149 @@ + + + + + + +test/driver_ds3231_register_test.c + + +Node1 + + +test/driver_ds3231 +_register_test.c + + + + + +Node2 + + +driver_ds3231_register +_test.h + + + + + +Node1->Node2 + + + + + + + + +Node8 + + +stdlib.h + + + + + +Node1->Node8 + + + + + + + + +Node3 + + +driver_ds3231_interface.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +driver_ds3231.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdio.h + + + + + +Node4->Node5 + + + + + + + + +Node6 + + +stdint.h + + + + + +Node4->Node6 + + + + + + + + +Node7 + + +string.h + + + + + +Node4->Node7 + + + + + + + + diff --git a/doc/html/driver__ds3231__register__test_8c_source.html b/doc/html/driver__ds3231__register__test_8c_source.html index d558e79..2a0e3b8 100644 --- a/doc/html/driver__ds3231__register__test_8c_source.html +++ b/doc/html/driver__ds3231__register__test_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_register_test.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_register_test.c
+
driver_ds3231_register_test.c
-Go to the documentation of this file.
1 
- -
39 #include <stdlib.h>
-
40 
-
41 static ds3231_handle_t gs_handle;
-
50 uint8_t ds3231_register_test(void)
-
51 {
-
52  uint8_t res;
-
53  int8_t offset, offset_check;
-
54  uint8_t status;
-
55  float o, o_check;
-
56  ds3231_info_t info;
-
57  ds3231_time_t time_in, time_out;
- - -
60  ds3231_bool_t enable;
-
61  ds3231_pin_t pin;
-
62 
-
63  /* link functions */
- - - - - - - - -
72 
-
73  /* get ds3231 info */
-
74  res = ds3231_info(&info);
-
75  if (res != 0)
-
76  {
-
77  ds3231_interface_debug_print("ds3231: get info failed.\n");
-
78 
-
79  return 1;
-
80  }
-
81  else
-
82  {
-
83  /* print ds3231 info */
-
84  ds3231_interface_debug_print("ds3231: chip is %s.\n", info.chip_name);
-
85  ds3231_interface_debug_print("ds3231: manufacturer is %s.\n", info.manufacturer_name);
-
86  ds3231_interface_debug_print("ds3231: interface is %s.\n", info.interface);
-
87  ds3231_interface_debug_print("ds3231: driver version is %d.%d.\n", info.driver_version / 1000, (info.driver_version % 1000) / 100);
-
88  ds3231_interface_debug_print("ds3231: min supply voltage is %0.1fV.\n", info.supply_voltage_min_v);
-
89  ds3231_interface_debug_print("ds3231: max supply voltage is %0.1fV.\n", info.supply_voltage_max_v);
-
90  ds3231_interface_debug_print("ds3231: max current is %0.2fmA.\n", info.max_current_ma);
-
91  ds3231_interface_debug_print("ds3231: max temperature is %0.1fC.\n", info.temperature_max);
-
92  ds3231_interface_debug_print("ds3231: min temperature is %0.1fC.\n", info.temperature_min);
-
93  }
-
94 
-
95  /* start register test */
-
96  ds3231_interface_debug_print("ds3231: start register test.\n");
-
97 
-
98  /* init ds3231 */
-
99  res = ds3231_init(&gs_handle);
-
100  if (res != 0)
-
101  {
-
102  ds3231_interface_debug_print("ds3231: init failed.\n");
-
103 
-
104  return 1;
-
105  }
-
106 
-
107  /* ds3231_set_time/ds3231_get_time test */
-
108  ds3231_interface_debug_print("ds3231: ds3231_set_time/ds3231_get_time test.\n");
-
109 
-
110  /* 12H format */
-
111  time_in.format = DS3231_FORMAT_12H;
-
112  time_in.am_pm = DS3231_PM;
-
113  time_in.year = rand() % 100 + 2000;
-
114  time_in.month = rand() % 12 + 1;
-
115  time_in.date = rand() % 20 + 1;
-
116  time_in.date = rand() % 20 + 1;
-
117  time_in.week = rand() % 7 + 1;
-
118  time_in.hour = rand() % 11 + 1;
-
119  time_in.minute = rand() % 60;
-
120  time_in.second = rand() % 60;
-
121  ds3231_interface_debug_print("ds3231: set time %04d-%02d-%02d PM %02d:%02d:%02d %d.\n",
-
122  time_in.year, time_in.month, time_in.date,
-
123  time_in.hour, time_in.minute, time_in.second, time_in.week
-
124  );
-
125  res = ds3231_set_time(&gs_handle, &time_in);
-
126  if (res != 0)
-
127  {
-
128  ds3231_interface_debug_print("ds3231: set time failed.\n");
-
129  (void)ds3231_deinit(&gs_handle);
-
130 
-
131  return 1;
-
132  }
-
133  res = ds3231_get_time(&gs_handle, &time_out);
-
134  if (res != 0)
-
135  {
-
136  ds3231_interface_debug_print("ds3231: get time failed.\n");
-
137  (void)ds3231_deinit(&gs_handle);
-
138 
-
139  return 1;
-
140  }
-
141  ds3231_interface_debug_print("ds3231: check time %s.\n", (memcmp(&time_in, &time_out, sizeof(ds3231_time_t))==0)?"ok":"error");
-
142 
-
143  /* 24H format */
-
144  time_in.format = DS3231_FORMAT_24H;
-
145  time_in.am_pm = DS3231_AM;
-
146  time_in.year = rand() % 100 + 2090;
-
147  time_in.month = rand() % 12 + 1;
-
148  time_in.date = rand() % 20 + 1;
-
149  time_in.week = rand() % 7 + 1;
-
150  time_in.hour = rand() % 24;
-
151  time_in.minute = rand() % 60;
-
152  time_in.second = rand() % 60;
-
153  ds3231_interface_debug_print("ds3231: set time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
154  time_in.year, time_in.month, time_in.date,
-
155  time_in.hour, time_in.minute, time_in.second, time_in.week
-
156  );
-
157  res = ds3231_set_time(&gs_handle, &time_in);
-
158  if (res != 0)
-
159  {
-
160  ds3231_interface_debug_print("ds3231: set time failed.\n");
-
161  (void)ds3231_deinit(&gs_handle);
-
162 
-
163  return 1;
-
164  }
-
165  res = ds3231_get_time(&gs_handle, &time_out);
-
166  if (res != 0)
-
167  {
-
168  ds3231_interface_debug_print("ds3231: get time failed.\n");
-
169  (void)ds3231_deinit(&gs_handle);
-
170 
-
171  return 1;
-
172  }
-
173  ds3231_interface_debug_print("ds3231: check time %s.\n", (memcmp(&time_in, &time_out, sizeof(ds3231_time_t))==0)?"ok":"error");
-
174 
-
175  /* ds3231_set_alarm1/ds3231_get_alarm1 test */
-
176  ds3231_interface_debug_print("ds3231: ds3231_set_alarm1/ds3231_get_alarm1 test.\n");
-
177 
-
178  /* 12H format */
-
179  time_in.format = DS3231_FORMAT_12H;
-
180  time_in.am_pm = DS3231_PM;
-
181  time_in.year = 0;
-
182  time_in.month = 0;
-
183  time_in.week = rand() % 7 + 1;
-
184  time_in.date = 1;
-
185  time_in.hour = rand() % 11 + 1;
-
186  time_in.minute = rand() % 60;
-
187  time_in.second = rand() % 60;
-
188  ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d PM %02d:%02d:%02d %d.\n",
-
189  time_in.year, time_in.month, time_in.date,
-
190  time_in.hour, time_in.minute, time_in.second, time_in.week
-
191  );
- -
193  if (res != 0)
-
194  {
-
195  ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
-
196  (void)ds3231_deinit(&gs_handle);
-
197 
-
198  return 1;
-
199  }
-
200  res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
-
201  if (res != 0)
-
202  {
-
203  ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
-
204  (void)ds3231_deinit(&gs_handle);
-
205 
-
206  return 1;
-
207  }
-
208  time_in.date = 0;
-
209  ds3231_interface_debug_print("ds3231: check alarm1 time %s.\n", (memcmp(&time_in, &time_out, sizeof(ds3231_time_t))==0)?"ok":"error");
-
210 
-
211  /* 24H format */
-
212  time_in.format = DS3231_FORMAT_24H;
-
213  time_in.am_pm = DS3231_AM;
-
214  time_in.year = 0;
-
215  time_in.month = 0;
-
216  time_in.week = rand() % 7 + 1;
-
217  time_in.date = 1;
-
218  time_in.hour = rand() % 24;
-
219  time_in.minute = rand() % 60;
-
220  time_in.second = rand() % 60;
-
221  ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
222  time_in.year, time_in.month, time_in.date,
-
223  time_in.hour, time_in.minute, time_in.second, time_in.week
-
224  );
- -
226  if (res != 0)
-
227  {
-
228  ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
-
229  (void)ds3231_deinit(&gs_handle);
-
230 
-
231  return 1;
-
232  }
-
233  res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
-
234  if (res != 0)
-
235  {
-
236  ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
-
237  (void)ds3231_deinit(&gs_handle);
-
238 
-
239  return 1;
-
240  }
-
241  time_in.date = 0;
-
242  ds3231_interface_debug_print("ds3231: check alarm1 time %s.\n", (memcmp(&time_in, &time_out, sizeof(ds3231_time_t))==0)?"ok":"error");
-
243 
-
244  /* ALARM1_MODE_ONCE_A_SECOND */
-
245  time_in.format = DS3231_FORMAT_24H;
-
246  time_in.am_pm = DS3231_AM;
-
247  time_in.year = 0;
-
248  time_in.month = 0;
-
249  time_in.week = rand() % 7 + 1;
-
250  time_in.date = rand() % 20 + 1;
-
251  time_in.hour = rand() % 24;
-
252  time_in.minute = rand() % 60;
-
253  time_in.second = rand() % 60;
-
254  ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
255  time_in.year, time_in.month, time_in.date,
-
256  time_in.hour, time_in.minute, time_in.second, time_in.week
-
257  );
-
258  res = ds3231_set_alarm1(&gs_handle, &time_in, DS3231_ALARM1_MODE_ONCE_A_SECOND);
-
259  if (res != 0)
-
260  {
-
261  ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
-
262  (void)ds3231_deinit(&gs_handle);
-
263 
-
264  return 1;
-
265  }
-
266  ds3231_interface_debug_print("ds3231: set alarm1 mode ALARM1_MODE_ONCE_A_SECOND.\n");
-
267  res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
-
268  if (res != 0)
-
269  {
-
270  ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
-
271  (void)ds3231_deinit(&gs_handle);
-
272 
-
273  return 1;
-
274  }
-
275  ds3231_interface_debug_print("ds3231: check alarm1 mode %s.\n", (mode1 == DS3231_ALARM1_MODE_ONCE_A_SECOND)?"ok":"error");
-
276 
-
277  /* ALARM1_MODE_SECOND_MATCH */
-
278  time_in.format = DS3231_FORMAT_24H;
-
279  time_in.am_pm = DS3231_AM;
-
280  time_in.year = 0;
-
281  time_in.month = 0;
-
282  time_in.week = rand() % 7 + 1;
-
283  time_in.date = rand() % 20 + 1;
-
284  time_in.hour = rand() % 24;
-
285  time_in.minute = rand() % 60;
-
286  time_in.second = rand() % 60;
-
287  ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
288  time_in.year, time_in.month, time_in.date,
-
289  time_in.hour, time_in.minute, time_in.second, time_in.week
-
290  );
-
291  res = ds3231_set_alarm1(&gs_handle, &time_in, DS3231_ALARM1_MODE_SECOND_MATCH);
-
292  if (res != 0)
-
293  {
-
294  ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
-
295  (void)ds3231_deinit(&gs_handle);
-
296 
-
297  return 1;
-
298  }
-
299  ds3231_interface_debug_print("ds3231: set alarm1 mode ALARM1_MODE_SECOND_MATCH.\n");
-
300  res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
-
301  if (res != 0)
-
302  {
-
303  ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
-
304  (void)ds3231_deinit(&gs_handle);
-
305 
-
306  return 1;
-
307  }
-
308  ds3231_interface_debug_print("ds3231: check alarm1 mode %s.\n", (mode1 == DS3231_ALARM1_MODE_SECOND_MATCH)?"ok":"error");
-
309 
-
310  /* ALARM1_MODE_MINUTE_SECOND_MATCH */
-
311  time_in.format = DS3231_FORMAT_24H;
-
312  time_in.am_pm = DS3231_AM;
-
313  time_in.year = 0;
-
314  time_in.month = 0;
-
315  time_in.week = rand() % 7 + 1;
-
316  time_in.date = rand() % 20 + 1;
-
317  time_in.hour = rand() % 24;
-
318  time_in.minute = rand() % 60;
-
319  time_in.second = rand() % 60;
-
320  ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
321  time_in.year, time_in.month, time_in.date,
-
322  time_in.hour, time_in.minute, time_in.second, time_in.week
-
323  );
-
324  res = ds3231_set_alarm1(&gs_handle, &time_in, DS3231_ALARM1_MODE_MINUTE_SECOND_MATCH);
-
325  if (res != 0)
-
326  {
-
327  ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
-
328  (void)ds3231_deinit(&gs_handle);
-
329 
-
330  return 1;
-
331  }
-
332  ds3231_interface_debug_print("ds3231: set alarm1 mode ALARM1_MODE_MINUTE_SECOND_MATCH.\n");
-
333  res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
-
334  if (res != 0)
-
335  {
-
336  ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
-
337  (void)ds3231_deinit(&gs_handle);
-
338 
-
339  return 1;
-
340  }
-
341  ds3231_interface_debug_print("ds3231: check alarm1 mode %s.\n", (mode1 == DS3231_ALARM1_MODE_MINUTE_SECOND_MATCH)?"ok":"error");
-
342 
-
343  /* ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH */
-
344  time_in.format = DS3231_FORMAT_24H;
-
345  time_in.am_pm = DS3231_AM;
-
346  time_in.year = 0;
-
347  time_in.month = 0;
-
348  time_in.week = rand() % 7 + 1;
-
349  time_in.date = rand() % 20 + 1;
-
350  time_in.hour = rand() % 24;
-
351  time_in.minute = rand() % 60;
-
352  time_in.second = rand() % 60;
-
353  ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
354  time_in.year, time_in.month, time_in.date,
-
355  time_in.hour, time_in.minute, time_in.second, time_in.week
-
356  );
- -
358  if (res != 0)
-
359  {
-
360  ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
-
361  (void)ds3231_deinit(&gs_handle);
-
362 
-
363  return 1;
-
364  }
-
365  ds3231_interface_debug_print("ds3231: set alarm1 mode ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH.\n");
-
366  res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
-
367  if (res != 0)
-
368  {
-
369  ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
-
370  (void)ds3231_deinit(&gs_handle);
-
371 
-
372  return 1;
-
373  }
-
374  ds3231_interface_debug_print("ds3231: check alarm1 mode %s.\n", (mode1 == DS3231_ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH)?"ok":"error");
-
375 
-
376  /* DS3231_ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH */
-
377  time_in.format = DS3231_FORMAT_24H;
-
378  time_in.am_pm = DS3231_AM;
-
379  time_in.year = 0;
-
380  time_in.month = 0;
-
381  time_in.week = rand() % 7 + 1;
-
382  time_in.date = rand() % 20 + 1;
-
383  time_in.hour = rand() % 24;
-
384  time_in.minute = rand() % 60;
-
385  time_in.second = rand() % 60;
-
386  ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
387  time_in.year, time_in.month, time_in.date,
-
388  time_in.hour, time_in.minute, time_in.second, time_in.week
-
389  );
- -
391  if (res != 0)
-
392  {
-
393  ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
-
394  (void)ds3231_deinit(&gs_handle);
-
395 
-
396  return 1;
-
397  }
-
398  ds3231_interface_debug_print("ds3231: set alarm1 mode ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH.\n");
-
399  res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
-
400  if (res != 0)
-
401  {
-
402  ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
-
403  (void)ds3231_deinit(&gs_handle);
-
404 
-
405  return 1;
-
406  }
-
407  ds3231_interface_debug_print("ds3231: check alarm1 mode %s.\n", (mode1 == DS3231_ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH)?"ok":"error");
-
408 
-
409  /* DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH */
-
410  time_in.format = DS3231_FORMAT_24H;
-
411  time_in.am_pm = DS3231_AM;
-
412  time_in.year = 0;
-
413  time_in.month = 0;
-
414  time_in.week = rand() % 7 + 1;
-
415  time_in.date = rand() % 20 + 1;
-
416  time_in.hour = rand() % 24;
-
417  time_in.minute = rand() % 60;
-
418  time_in.second = rand() % 60;
-
419  ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
420  time_in.year, time_in.month, time_in.date,
-
421  time_in.hour, time_in.minute, time_in.second, time_in.week
-
422  );
- -
424  if (res != 0)
-
425  {
-
426  ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
-
427  (void)ds3231_deinit(&gs_handle);
-
428 
-
429  return 1;
-
430  }
-
431  ds3231_interface_debug_print("ds3231: set alarm1 mode ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH.\n");
-
432  res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
-
433  if (res != 0)
-
434  {
-
435  ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
-
436  (void)ds3231_deinit(&gs_handle);
-
437 
-
438  return 1;
-
439  }
-
440  ds3231_interface_debug_print("ds3231: check alarm1 mode %s.\n", (mode1 == DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH)?"ok":"error");
-
441 
-
442  /* ds3231_set_alarm2/ds3231_get_alarm2 test */
-
443  ds3231_interface_debug_print("ds3231: ds3231_set_alarm2/ds3231_get_alarm2 test.\n");
-
444 
-
445  /* 12H format */
-
446  time_in.format = DS3231_FORMAT_12H;
-
447  time_in.am_pm = DS3231_AM;
-
448  time_in.year = 0;
-
449  time_in.month = 0;
-
450  time_in.week = rand() % 7 + 1;
-
451  time_in.date = rand() % 20 + 1;
-
452  time_in.hour = rand() % 11 + 1;
-
453  time_in.minute = rand() % 60;
-
454  time_in.second = 0;
-
455  ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d PM %02d:%02d:%02d %d.\n",
-
456  time_in.year, time_in.month, time_in.date,
-
457  time_in.hour, time_in.minute, time_in.second, time_in.week
-
458  );
- -
460  if (res != 0)
-
461  {
-
462  ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
-
463  (void)ds3231_deinit(&gs_handle);
-
464 
-
465  return 1;
-
466  }
-
467  res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
-
468  if (res != 0)
-
469  {
-
470  ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
-
471  (void)ds3231_deinit(&gs_handle);
-
472 
-
473  return 1;
-
474  }
-
475  time_in.date = 0;
-
476  ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (memcmp(&time_in, &time_out, sizeof(ds3231_time_t))==0)?"ok":"error");
-
477 
-
478  /* 24H format */
-
479  time_in.format = DS3231_FORMAT_24H;
-
480  time_in.am_pm = DS3231_AM;
-
481  time_in.year = 0;
-
482  time_in.month = 0;
-
483  time_in.week = rand() % 7 + 1;
-
484  time_in.date = rand() % 20 + 1;
-
485  time_in.hour = rand() % 24;
-
486  time_in.minute = rand() % 60;
-
487  time_in.second = 0;
-
488  ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
489  time_in.year, time_in.month, time_in.date,
-
490  time_in.hour, time_in.minute, time_in.second, time_in.week
-
491  );
- -
493  if (res != 0)
-
494  {
-
495  ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
-
496  (void)ds3231_deinit(&gs_handle);
-
497 
-
498  return 1;
-
499  }
-
500  res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
-
501  if (res != 0)
-
502  {
-
503  ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
-
504  (void)ds3231_deinit(&gs_handle);
-
505 
-
506  return 1;
-
507  }
-
508  time_in.date = 0;
-
509  ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (memcmp(&time_in, &time_out, sizeof(ds3231_time_t))==0)?"ok":"error");
-
510 
-
511  /* DS3231_ALARM2_MODE_ONCE_A_MINUTE */
-
512  time_in.format = DS3231_FORMAT_24H;
-
513  time_in.am_pm = DS3231_AM;
-
514  time_in.year = 0;
-
515  time_in.month = 0;
-
516  time_in.week = rand() % 7 + 1;
-
517  time_in.date = rand() % 20 + 1;
-
518  time_in.hour = rand() % 24;
-
519  time_in.minute = rand() % 60;
-
520  time_in.second = 0;
-
521  ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
522  time_in.year, time_in.month, time_in.date,
-
523  time_in.hour, time_in.minute, time_in.second, time_in.week
-
524  );
-
525  res = ds3231_set_alarm2(&gs_handle, &time_in, DS3231_ALARM2_MODE_ONCE_A_MINUTE);
-
526  if (res != 0)
-
527  {
-
528  ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
-
529  (void)ds3231_deinit(&gs_handle);
-
530 
-
531  return 1;
-
532  }
-
533  ds3231_interface_debug_print("ds3231: set mode ALARM2_MODE_ONCE_A_MINUTE.\n");
-
534  res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
-
535  if (res != 0)
-
536  {
-
537  ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
-
538  (void)ds3231_deinit(&gs_handle);
-
539 
-
540  return 1;
-
541  }
-
542  ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (mode2 == DS3231_ALARM2_MODE_ONCE_A_MINUTE)?"ok":"error");
-
543 
-
544  /* ALARM2_MODE_MINUTE_MATCH */
-
545  time_in.format = DS3231_FORMAT_24H;
-
546  time_in.am_pm = DS3231_AM;
-
547  time_in.year = 0;
-
548  time_in.month = 0;
-
549  time_in.week = rand() % 7 + 1;
-
550  time_in.date = rand() % 20 + 1;
-
551  time_in.hour = rand() % 24;
-
552  time_in.minute = rand() % 60;
-
553  time_in.second = 0;
-
554  ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
555  time_in.year, time_in.month, time_in.date,
-
556  time_in.hour, time_in.minute, time_in.second, time_in.week
-
557  );
-
558  res = ds3231_set_alarm2(&gs_handle, &time_in, DS3231_ALARM2_MODE_MINUTE_MATCH);
-
559  if (res != 0)
-
560  {
-
561  ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
-
562  (void)ds3231_deinit(&gs_handle);
-
563 
-
564  return 1;
-
565  }
-
566  ds3231_interface_debug_print("ds3231: set mode ALARM2_MODE_MINUTE_MATCH.\n");
-
567  res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
-
568  if (res != 0)
-
569  {
-
570  ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
-
571  (void)ds3231_deinit(&gs_handle);
-
572 
-
573  return 1;
-
574  }
-
575  ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (mode2 == DS3231_ALARM2_MODE_MINUTE_MATCH)?"ok":"error");
-
576 
-
577  /* ALARM2_MODE_HOUR_MINUTE_MATCH */
-
578  time_in.format = DS3231_FORMAT_24H;
-
579  time_in.am_pm = DS3231_AM;
-
580  time_in.year = 0;
-
581  time_in.month = 0;
-
582  time_in.week = rand() % 7 + 1;
-
583  time_in.date = rand() % 20 + 1;
-
584  time_in.hour = rand() % 24;
-
585  time_in.minute = rand() % 60;
-
586  time_in.second = 0;
-
587  ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
588  time_in.year, time_in.month, time_in.date,
-
589  time_in.hour, time_in.minute, time_in.second, time_in.week
-
590  );
-
591  res = ds3231_set_alarm2(&gs_handle, &time_in, DS3231_ALARM2_MODE_HOUR_MINUTE_MATCH);
-
592  if (res != 0)
-
593  {
-
594  ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
-
595  (void)ds3231_deinit(&gs_handle);
-
596 
-
597  return 1;
-
598  }
-
599  ds3231_interface_debug_print("ds3231: set mode ALARM2_MODE_HOUR_MINUTE_MATCH.\n");
-
600  res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
-
601  if (res != 0)
-
602  {
-
603  ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
-
604  (void)ds3231_deinit(&gs_handle);
-
605 
-
606  return 1;
-
607  }
-
608  ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (mode2 == DS3231_ALARM2_MODE_HOUR_MINUTE_MATCH)?"ok":"error");
-
609 
-
610  /* DS3231_ALARM2_MODE_DATE_HOUR_MINUTE_MATCH */
-
611  time_in.format = DS3231_FORMAT_24H;
-
612  time_in.am_pm = DS3231_AM;
-
613  time_in.year = 0;
-
614  time_in.month = 0;
-
615  time_in.week = rand() % 7 + 1;
-
616  time_in.date = rand() % 20 + 1;
-
617  time_in.hour = rand() % 24;
-
618  time_in.minute = rand() % 60;
-
619  time_in.second = 0;
-
620  ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
621  time_in.year, time_in.month, time_in.date,
-
622  time_in.hour, time_in.minute, time_in.second, time_in.week
-
623  );
- -
625  if (res != 0)
-
626  {
-
627  ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
-
628  (void)ds3231_deinit(&gs_handle);
-
629 
-
630  return 1;
-
631  }
-
632  ds3231_interface_debug_print("ds3231: set mode ALARM2_MODE_DATE_HOUR_MINUTE_MATCH.\n");
-
633  res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
-
634  if (res != 0)
-
635  {
-
636  ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
-
637  (void)ds3231_deinit(&gs_handle);
-
638 
-
639  return 1;
-
640  }
-
641  ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (mode2 == DS3231_ALARM2_MODE_DATE_HOUR_MINUTE_MATCH)?"ok":"error");
-
642 
-
643  /* DS3231_ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH */
-
644  time_in.format = DS3231_FORMAT_24H;
-
645  time_in.am_pm = DS3231_AM;
-
646  time_in.year = 0;
-
647  time_in.month = 0;
-
648  time_in.week = rand() % 7 + 1;
-
649  time_in.date = rand() % 20 + 1;
-
650  time_in.hour = rand() % 24;
-
651  time_in.minute = rand() % 60;
-
652  time_in.second = 0;
-
653  ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
-
654  time_in.year, time_in.month, time_in.date,
-
655  time_in.hour, time_in.minute, time_in.second, time_in.week
-
656  );
- -
658  if (res != 0)
-
659  {
-
660  ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
-
661  (void)ds3231_deinit(&gs_handle);
-
662 
-
663  return 1;
-
664  }
-
665  ds3231_interface_debug_print("ds3231: set mode ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH.\n");
-
666  res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
-
667  if (res != 0)
-
668  {
-
669  ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
-
670  (void)ds3231_deinit(&gs_handle);
-
671 
-
672  return 1;
-
673  }
-
674  ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (mode2 == DS3231_ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH)?"ok":"error");
-
675 
-
676  /* ds3231_set_oscillator/ds3231_get_oscillator test */
-
677  ds3231_interface_debug_print("ds3231: ds3231_set_oscillator/ds3231_get_oscillator test.\n");
-
678 
-
679  /* enable */
-
680  res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
-
681  if (res != 0)
-
682  {
-
683  ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
-
684  (void)ds3231_deinit(&gs_handle);
-
685 
-
686  return 1;
-
687  }
-
688  ds3231_interface_debug_print("ds3231: enable.\n");
-
689  res = ds3231_get_oscillator(&gs_handle, &enable);
-
690  if (res != 0)
-
691  {
-
692  ds3231_interface_debug_print("ds3231: get oscillator failed.\n");
-
693  (void)ds3231_deinit(&gs_handle);
-
694 
-
695  return 1;
-
696  }
-
697  ds3231_interface_debug_print("ds3231: check bool %s.\n", (enable == DS3231_BOOL_TRUE)?"ok":"error");
-
698 
-
699  /* disable */
-
700  res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_FALSE);
-
701  if (res != 0)
-
702  {
-
703  ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
-
704  (void)ds3231_deinit(&gs_handle);
-
705 
-
706  return 1;
-
707  }
-
708  ds3231_interface_debug_print("ds3231: disable.\n");
-
709  res = ds3231_get_oscillator(&gs_handle, &enable);
-
710  if (res != 0)
-
711  {
-
712  ds3231_interface_debug_print("ds3231: get oscillator failed.\n");
-
713  (void)ds3231_deinit(&gs_handle);
-
714 
-
715  return 1;
-
716  }
-
717  ds3231_interface_debug_print("ds3231: check bool %s.\n", (enable == DS3231_BOOL_FALSE)?"ok":"error");
-
718 
-
719  /* ds3231_set_alarm_interrupt/ds3231_get_alarm_interrupt */
-
720  ds3231_interface_debug_print("ds3231: ds3231_set_alarm_interrupt/ds3231_get_alarm_interrupt test.\n");
-
721 
-
722  /* alarm1 enable*/
- -
724  if (res != 0)
-
725  {
-
726  ds3231_interface_debug_print("ds3231: set alarm interrupt failed.\n");
-
727  (void)ds3231_deinit(&gs_handle);
-
728 
-
729  return 1;
-
730  }
-
731  ds3231_interface_debug_print("ds3231: alarm1 enable.\n");
-
732  res = ds3231_get_alarm_interrupt(&gs_handle, DS3231_ALARM_1, &enable);
-
733  if (res != 0)
-
734  {
-
735  ds3231_interface_debug_print("ds3231: get alarm interrupt failed.\n");
-
736  (void)ds3231_deinit(&gs_handle);
-
737 
-
738  return 1;
-
739  }
-
740  ds3231_interface_debug_print("ds3231: check alarm1 bool %s.\n", (enable == DS3231_BOOL_TRUE)?"ok":"error");
-
741 
-
742  /* alarm1 disable*/
- -
744  if (res != 0)
-
745  {
-
746  ds3231_interface_debug_print("ds3231: set alarm interrupt failed.\n");
-
747  (void)ds3231_deinit(&gs_handle);
-
748 
-
749  return 1;
-
750  }
-
751  ds3231_interface_debug_print("ds3231: alarm1 disable.\n");
-
752  res = ds3231_get_alarm_interrupt(&gs_handle, DS3231_ALARM_1, &enable);
-
753  if (res != 0)
-
754  {
-
755  ds3231_interface_debug_print("ds3231: get alarm interrupt failed.\n");
-
756  (void)ds3231_deinit(&gs_handle);
-
757 
-
758  return 1;
-
759  }
-
760  ds3231_interface_debug_print("ds3231: check alarm1 bool %s.\n", (enable == DS3231_BOOL_FALSE)?"ok":"error");
-
761 
-
762  /* alarm2 enable*/
- -
764  if (res != 0)
-
765  {
-
766  ds3231_interface_debug_print("ds3231: set alarm interrupt failed.\n");
-
767  (void)ds3231_deinit(&gs_handle);
-
768 
-
769  return 1;
-
770  }
-
771  ds3231_interface_debug_print("ds3231: alarm2 enable.\n");
-
772  res = ds3231_get_alarm_interrupt(&gs_handle, DS3231_ALARM_2, &enable);
-
773  if (res != 0)
-
774  {
-
775  ds3231_interface_debug_print("ds3231: get alarm interrupt failed.\n");
-
776  (void)ds3231_deinit(&gs_handle);
-
777 
-
778  return 1;
-
779  }
-
780  ds3231_interface_debug_print("ds3231: check alarm2 bool %s.\n", (enable == DS3231_BOOL_TRUE)?"ok":"error");
-
781 
-
782  /* alarm2 disable*/
- -
784  if (res != 0)
-
785  {
-
786  ds3231_interface_debug_print("ds3231: set alarm interrupt failed.\n");
-
787  (void)ds3231_deinit(&gs_handle);
-
788 
-
789  return 1;
-
790  }
-
791  ds3231_interface_debug_print("ds3231: alarm2 disable.\n");
-
792  res = ds3231_get_alarm_interrupt(&gs_handle, DS3231_ALARM_2, &enable);
-
793  if (res != 0)
-
794  {
-
795  ds3231_interface_debug_print("ds3231: get alarm interrupt failed.\n");
-
796  (void)ds3231_deinit(&gs_handle);
-
797 
-
798  return 1;
-
799  }
-
800  ds3231_interface_debug_print("ds3231: check alarm2 bool %s.\n", (enable == DS3231_BOOL_FALSE)?"ok":"error");
-
801 
-
802  /* ds3231_set_pin/ds3231_get_pin */
-
803  ds3231_interface_debug_print("ds3231: ds3231_set_pin/ds3231_get_pin test.\n");
-
804 
-
805  /* set square wave pin */
-
806  res = ds3231_set_pin(&gs_handle, DS3231_PIN_SQUARE_WAVE);
-
807  if (res != 0)
-
808  {
-
809  ds3231_interface_debug_print("ds3231: set pin failed.\n");
-
810  (void)ds3231_deinit(&gs_handle);
-
811 
-
812  return 1;
-
813  }
-
814  ds3231_interface_debug_print("ds3231: set square wave pin.\n");
-
815  res = ds3231_get_pin(&gs_handle, &pin);
-
816  if (res != 0)
-
817  {
-
818  ds3231_interface_debug_print("ds3231: get pin failed.\n");
-
819  (void)ds3231_deinit(&gs_handle);
-
820 
-
821  return 1;
-
822  }
-
823  ds3231_interface_debug_print("ds3231: check pin %s.\n", (pin == DS3231_PIN_SQUARE_WAVE)?"ok":"error");
-
824 
-
825  /* set interrupt pin */
-
826  res = ds3231_set_pin(&gs_handle, DS3231_PIN_INTERRUPT);
-
827  if (res != 0)
-
828  {
-
829  ds3231_interface_debug_print("ds3231: set pin failed.\n");
-
830  (void)ds3231_deinit(&gs_handle);
-
831 
-
832  return 1;
-
833  }
-
834  ds3231_interface_debug_print("ds3231: set interrupt pin.\n");
-
835  res = ds3231_get_pin(&gs_handle, &pin);
-
836  if (res != 0)
-
837  {
-
838  ds3231_interface_debug_print("ds3231: get pin failed.\n");
-
839  (void)ds3231_deinit(&gs_handle);
-
840 
-
841  return 1;
-
842  }
-
843  ds3231_interface_debug_print("ds3231: check pin %s.\n", (pin == DS3231_PIN_INTERRUPT)?"ok":"error");
-
844 
-
845  /* ds3231_set_square_wave/ds3231_get_square_wave */
-
846  ds3231_interface_debug_print("ds3231: ds3231_set_square_wave/ds3231_get_square_wave test.\n");
-
847 
-
848  /* enable */
-
849  res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_TRUE);
-
850  if (res != 0)
-
851  {
-
852  ds3231_interface_debug_print("ds3231: set square wave failed.\n");
-
853  (void)ds3231_deinit(&gs_handle);
-
854 
-
855  return 1;
-
856  }
-
857  ds3231_interface_debug_print("ds3231: set enable.\n");
-
858  res = ds3231_get_square_wave(&gs_handle, &enable);
-
859  if (res != 0)
-
860  {
-
861  ds3231_interface_debug_print("ds3231: get square wave failed.\n");
-
862  (void)ds3231_deinit(&gs_handle);
-
863 
-
864  return 1;
-
865  }
-
866  ds3231_interface_debug_print("ds3231: check bool %s.\n", (enable == DS3231_BOOL_TRUE)?"ok":"error");
-
867 
-
868  /* disable */
-
869  res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
-
870  if (res != 0)
-
871  {
-
872  ds3231_interface_debug_print("ds3231: set square wave failed.\n");
-
873  (void)ds3231_deinit(&gs_handle);
-
874 
-
875  return 1;
-
876  }
-
877  ds3231_interface_debug_print("ds3231: set disable.\n");
-
878  res = ds3231_get_square_wave(&gs_handle, &enable);
-
879  if (res != 0)
-
880  {
-
881  ds3231_interface_debug_print("ds3231: get square wave failed.\n");
-
882  (void)ds3231_deinit(&gs_handle);
-
883 
-
884  return 1;
-
885  }
-
886  ds3231_interface_debug_print("ds3231: check bool %s.\n", (enable == DS3231_BOOL_FALSE)?"ok":"error");
-
887 
-
888  /* ds3231_set_32khz_output/ds3231_get_32khz_output */
-
889  ds3231_interface_debug_print("ds3231: ds3231_set_32khz_output/ds3231_get_32khz_output test.\n");
-
890 
-
891  /* enable */
-
892  res = ds3231_set_32khz_output(&gs_handle, DS3231_BOOL_TRUE);
-
893  if (res != 0)
-
894  {
-
895  ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
-
896  (void)ds3231_deinit(&gs_handle);
-
897 
-
898  return 1;
-
899  }
-
900  ds3231_interface_debug_print("ds3231: enable.\n");
-
901  res = ds3231_get_32khz_output(&gs_handle, &enable);
-
902  if (res != 0)
-
903  {
-
904  ds3231_interface_debug_print("ds3231: get 32khz output failed.\n");
-
905  (void)ds3231_deinit(&gs_handle);
-
906 
-
907  return 1;
-
908  }
-
909  ds3231_interface_debug_print("ds3231: check bool %s.\n", (enable == DS3231_BOOL_TRUE)?"ok":"error");
-
910 
-
911  /* disable */
-
912  res = ds3231_set_32khz_output(&gs_handle, DS3231_BOOL_FALSE);
-
913  if (res != 0)
-
914  {
-
915  ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
-
916  (void)ds3231_deinit(&gs_handle);
-
917 
-
918  return 1;
-
919  }
-
920  ds3231_interface_debug_print("ds3231: disable.\n");
-
921  res = ds3231_get_32khz_output(&gs_handle, &enable);
-
922  if (res != 0)
-
923  {
-
924  ds3231_interface_debug_print("ds3231: get 32khz output failed.\n");
-
925  (void)ds3231_deinit(&gs_handle);
-
926 
-
927  return 1;
-
928  }
-
929  ds3231_interface_debug_print("ds3231: check bool %s.\n", (enable == DS3231_BOOL_FALSE)?"ok":"error");
-
930 
-
931  /* ds3231_set_aging_offset/ds3231_get_aging_offset */
-
932  ds3231_interface_debug_print("ds3231: ds3231_set_aging_offset/ds3231_get_aging_offset test.\n");
-
933  offset = -(rand() % 128);
-
934  res = ds3231_set_aging_offset(&gs_handle, offset);
-
935  if (res != 0)
-
936  {
-
937  ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
-
938  (void)ds3231_deinit(&gs_handle);
-
939 
-
940  return 1;
-
941  }
-
942  ds3231_interface_debug_print("ds3231: set offset %d.\n", offset);
-
943  res = ds3231_get_aging_offset(&gs_handle, (int8_t *)&offset_check);
-
944  if (res != 0)
-
945  {
-
946  ds3231_interface_debug_print("ds3231: get aging offset failed.\n");
-
947  (void)ds3231_deinit(&gs_handle);
-
948 
-
949  return 1;
-
950  }
-
951  ds3231_interface_debug_print("ds3231: check offset %s.\n", (offset_check == offset)?"ok":"error");
-
952 
-
953  /* ds3231_get_status_offset */
-
954  ds3231_interface_debug_print("ds3231: ds3231_get_status test.\n");
-
955  res = ds3231_get_status(&gs_handle, (uint8_t *)&status);
-
956  if (res != 0)
-
957  {
-
958  ds3231_interface_debug_print("ds3231: get status failed.\n");
-
959  (void)ds3231_deinit(&gs_handle);
-
960 
-
961  return 1;
-
962  }
-
963  ds3231_interface_debug_print("ds3231: check status 0x%02X.\n", status);
-
964 
-
965  /* ds3231_aging_offset_convert_to_register/ds3231_aging_offset_convert_to_data test */
-
966  ds3231_interface_debug_print("ds3231: ds3231_aging_offset_convert_to_register/ds3231_aging_offset_convert_to_data test.\n");
-
967  o = (float)(rand() % 100) /100.0f;
-
968  res = ds3231_aging_offset_convert_to_register(&gs_handle, o, (int8_t *)&offset);
-
969  if (res != 0)
-
970  {
-
971  ds3231_interface_debug_print("ds3231: aging offset convert to register failed.\n");
-
972  (void)ds3231_deinit(&gs_handle);
-
973 
-
974  return 1;
-
975  }
-
976  ds3231_interface_debug_print("ds3231: offset is %d.\n", offset);
-
977  res = ds3231_aging_offset_convert_to_data(&gs_handle, offset, (float *)&o_check);
-
978  if (res != 0)
-
979  {
-
980  ds3231_interface_debug_print("ds3231: aging offset convert to data failed.\n");
-
981  (void)ds3231_deinit(&gs_handle);
-
982 
-
983  return 1;
-
984  }
-
985  ds3231_interface_debug_print("ds3231: offset is %0.3f.\n", o);
-
986  ds3231_interface_debug_print("ds3231: convert offset is %0.3f.\n", o_check);
-
987 
-
988  /* finish register test */
-
989  ds3231_interface_debug_print("ds3231: finish register test.\n");
-
990  (void)ds3231_deinit(&gs_handle);
-
991 
-
992  return 0;
-
993 }
+Go to the documentation of this file.
1
+
37
+ +
39#include <stdlib.h>
+
40
+
41static ds3231_handle_t gs_handle;
+
42
+
+ +
51{
+
52 uint8_t res;
+
53 int8_t offset, offset_check;
+
54 uint8_t status;
+
55 float o, o_check;
+
56 ds3231_info_t info;
+
57 ds3231_time_t time_in, time_out;
+ + +
60 ds3231_bool_t enable;
+
61 ds3231_pin_t pin;
+
62
+
63 /* link functions */
+ + + + + + + + +
72
+
73 /* get ds3231 info */
+
74 res = ds3231_info(&info);
+
75 if (res != 0)
+
76 {
+
77 ds3231_interface_debug_print("ds3231: get info failed.\n");
+
78
+
79 return 1;
+
80 }
+
81 else
+
82 {
+
83 /* print ds3231 info */
+
84 ds3231_interface_debug_print("ds3231: chip is %s.\n", info.chip_name);
+
85 ds3231_interface_debug_print("ds3231: manufacturer is %s.\n", info.manufacturer_name);
+
86 ds3231_interface_debug_print("ds3231: interface is %s.\n", info.interface);
+
87 ds3231_interface_debug_print("ds3231: driver version is %d.%d.\n", info.driver_version / 1000, (info.driver_version % 1000) / 100);
+
88 ds3231_interface_debug_print("ds3231: min supply voltage is %0.1fV.\n", info.supply_voltage_min_v);
+
89 ds3231_interface_debug_print("ds3231: max supply voltage is %0.1fV.\n", info.supply_voltage_max_v);
+
90 ds3231_interface_debug_print("ds3231: max current is %0.2fmA.\n", info.max_current_ma);
+
91 ds3231_interface_debug_print("ds3231: max temperature is %0.1fC.\n", info.temperature_max);
+
92 ds3231_interface_debug_print("ds3231: min temperature is %0.1fC.\n", info.temperature_min);
+
93 }
+
94
+
95 /* start register test */
+
96 ds3231_interface_debug_print("ds3231: start register test.\n");
+
97
+
98 /* init ds3231 */
+
99 res = ds3231_init(&gs_handle);
+
100 if (res != 0)
+
101 {
+
102 ds3231_interface_debug_print("ds3231: init failed.\n");
+
103
+
104 return 1;
+
105 }
+
106
+
107 /* ds3231_set_time/ds3231_get_time test */
+
108 ds3231_interface_debug_print("ds3231: ds3231_set_time/ds3231_get_time test.\n");
+
109
+
110 /* 12H format */
+
111 time_in.format = DS3231_FORMAT_12H;
+
112 time_in.am_pm = DS3231_PM;
+
113 time_in.year = rand() % 100 + 2000;
+
114 time_in.month = rand() % 12 + 1;
+
115 time_in.date = rand() % 20 + 1;
+
116 time_in.date = rand() % 20 + 1;
+
117 time_in.week = rand() % 7 + 1;
+
118 time_in.hour = rand() % 11 + 1;
+
119 time_in.minute = rand() % 60;
+
120 time_in.second = rand() % 60;
+
121 ds3231_interface_debug_print("ds3231: set time %04d-%02d-%02d PM %02d:%02d:%02d %d.\n",
+
122 time_in.year, time_in.month, time_in.date,
+
123 time_in.hour, time_in.minute, time_in.second, time_in.week
+
124 );
+
125 res = ds3231_set_time(&gs_handle, &time_in);
+
126 if (res != 0)
+
127 {
+
128 ds3231_interface_debug_print("ds3231: set time failed.\n");
+
129 (void)ds3231_deinit(&gs_handle);
+
130
+
131 return 1;
+
132 }
+
133 res = ds3231_get_time(&gs_handle, &time_out);
+
134 if (res != 0)
+
135 {
+
136 ds3231_interface_debug_print("ds3231: get time failed.\n");
+
137 (void)ds3231_deinit(&gs_handle);
+
138
+
139 return 1;
+
140 }
+
141 ds3231_interface_debug_print("ds3231: check time %s.\n", (memcmp(&time_in, &time_out, sizeof(ds3231_time_t))==0)?"ok":"error");
+
142
+
143 /* 24H format */
+
144 time_in.format = DS3231_FORMAT_24H;
+
145 time_in.am_pm = DS3231_AM;
+
146 time_in.year = rand() % 100 + 2090;
+
147 time_in.month = rand() % 12 + 1;
+
148 time_in.date = rand() % 20 + 1;
+
149 time_in.week = rand() % 7 + 1;
+
150 time_in.hour = rand() % 24;
+
151 time_in.minute = rand() % 60;
+
152 time_in.second = rand() % 60;
+
153 ds3231_interface_debug_print("ds3231: set time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
154 time_in.year, time_in.month, time_in.date,
+
155 time_in.hour, time_in.minute, time_in.second, time_in.week
+
156 );
+
157 res = ds3231_set_time(&gs_handle, &time_in);
+
158 if (res != 0)
+
159 {
+
160 ds3231_interface_debug_print("ds3231: set time failed.\n");
+
161 (void)ds3231_deinit(&gs_handle);
+
162
+
163 return 1;
+
164 }
+
165 res = ds3231_get_time(&gs_handle, &time_out);
+
166 if (res != 0)
+
167 {
+
168 ds3231_interface_debug_print("ds3231: get time failed.\n");
+
169 (void)ds3231_deinit(&gs_handle);
+
170
+
171 return 1;
+
172 }
+
173 ds3231_interface_debug_print("ds3231: check time %s.\n", (memcmp(&time_in, &time_out, sizeof(ds3231_time_t))==0)?"ok":"error");
+
174
+
175 /* ds3231_set_alarm1/ds3231_get_alarm1 test */
+
176 ds3231_interface_debug_print("ds3231: ds3231_set_alarm1/ds3231_get_alarm1 test.\n");
+
177
+
178 /* 12H format */
+
179 time_in.format = DS3231_FORMAT_12H;
+
180 time_in.am_pm = DS3231_PM;
+
181 time_in.year = 0;
+
182 time_in.month = 0;
+
183 time_in.week = rand() % 7 + 1;
+
184 time_in.date = 1;
+
185 time_in.hour = rand() % 11 + 1;
+
186 time_in.minute = rand() % 60;
+
187 time_in.second = rand() % 60;
+
188 ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d PM %02d:%02d:%02d %d.\n",
+
189 time_in.year, time_in.month, time_in.date,
+
190 time_in.hour, time_in.minute, time_in.second, time_in.week
+
191 );
+ +
193 if (res != 0)
+
194 {
+
195 ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
+
196 (void)ds3231_deinit(&gs_handle);
+
197
+
198 return 1;
+
199 }
+
200 res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
+
201 if (res != 0)
+
202 {
+
203 ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
+
204 (void)ds3231_deinit(&gs_handle);
+
205
+
206 return 1;
+
207 }
+
208 time_in.date = 0;
+
209 ds3231_interface_debug_print("ds3231: check alarm1 time %s.\n", (memcmp(&time_in, &time_out, sizeof(ds3231_time_t))==0)?"ok":"error");
+
210
+
211 /* 24H format */
+
212 time_in.format = DS3231_FORMAT_24H;
+
213 time_in.am_pm = DS3231_AM;
+
214 time_in.year = 0;
+
215 time_in.month = 0;
+
216 time_in.week = rand() % 7 + 1;
+
217 time_in.date = 1;
+
218 time_in.hour = rand() % 24;
+
219 time_in.minute = rand() % 60;
+
220 time_in.second = rand() % 60;
+
221 ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
222 time_in.year, time_in.month, time_in.date,
+
223 time_in.hour, time_in.minute, time_in.second, time_in.week
+
224 );
+ +
226 if (res != 0)
+
227 {
+
228 ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
+
229 (void)ds3231_deinit(&gs_handle);
+
230
+
231 return 1;
+
232 }
+
233 res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
+
234 if (res != 0)
+
235 {
+
236 ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
+
237 (void)ds3231_deinit(&gs_handle);
+
238
+
239 return 1;
+
240 }
+
241 time_in.date = 0;
+
242 ds3231_interface_debug_print("ds3231: check alarm1 time %s.\n", (memcmp(&time_in, &time_out, sizeof(ds3231_time_t))==0)?"ok":"error");
+
243
+
244 /* ALARM1_MODE_ONCE_A_SECOND */
+
245 time_in.format = DS3231_FORMAT_24H;
+
246 time_in.am_pm = DS3231_AM;
+
247 time_in.year = 0;
+
248 time_in.month = 0;
+
249 time_in.week = rand() % 7 + 1;
+
250 time_in.date = rand() % 20 + 1;
+
251 time_in.hour = rand() % 24;
+
252 time_in.minute = rand() % 60;
+
253 time_in.second = rand() % 60;
+
254 ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
255 time_in.year, time_in.month, time_in.date,
+
256 time_in.hour, time_in.minute, time_in.second, time_in.week
+
257 );
+
258 res = ds3231_set_alarm1(&gs_handle, &time_in, DS3231_ALARM1_MODE_ONCE_A_SECOND);
+
259 if (res != 0)
+
260 {
+
261 ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
+
262 (void)ds3231_deinit(&gs_handle);
+
263
+
264 return 1;
+
265 }
+
266 ds3231_interface_debug_print("ds3231: set alarm1 mode ALARM1_MODE_ONCE_A_SECOND.\n");
+
267 res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
+
268 if (res != 0)
+
269 {
+
270 ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
+
271 (void)ds3231_deinit(&gs_handle);
+
272
+
273 return 1;
+
274 }
+
275 ds3231_interface_debug_print("ds3231: check alarm1 mode %s.\n", (mode1 == DS3231_ALARM1_MODE_ONCE_A_SECOND)?"ok":"error");
+
276
+
277 /* ALARM1_MODE_SECOND_MATCH */
+
278 time_in.format = DS3231_FORMAT_24H;
+
279 time_in.am_pm = DS3231_AM;
+
280 time_in.year = 0;
+
281 time_in.month = 0;
+
282 time_in.week = rand() % 7 + 1;
+
283 time_in.date = rand() % 20 + 1;
+
284 time_in.hour = rand() % 24;
+
285 time_in.minute = rand() % 60;
+
286 time_in.second = rand() % 60;
+
287 ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
288 time_in.year, time_in.month, time_in.date,
+
289 time_in.hour, time_in.minute, time_in.second, time_in.week
+
290 );
+
291 res = ds3231_set_alarm1(&gs_handle, &time_in, DS3231_ALARM1_MODE_SECOND_MATCH);
+
292 if (res != 0)
+
293 {
+
294 ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
+
295 (void)ds3231_deinit(&gs_handle);
+
296
+
297 return 1;
+
298 }
+
299 ds3231_interface_debug_print("ds3231: set alarm1 mode ALARM1_MODE_SECOND_MATCH.\n");
+
300 res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
+
301 if (res != 0)
+
302 {
+
303 ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
+
304 (void)ds3231_deinit(&gs_handle);
+
305
+
306 return 1;
+
307 }
+
308 ds3231_interface_debug_print("ds3231: check alarm1 mode %s.\n", (mode1 == DS3231_ALARM1_MODE_SECOND_MATCH)?"ok":"error");
+
309
+
310 /* ALARM1_MODE_MINUTE_SECOND_MATCH */
+
311 time_in.format = DS3231_FORMAT_24H;
+
312 time_in.am_pm = DS3231_AM;
+
313 time_in.year = 0;
+
314 time_in.month = 0;
+
315 time_in.week = rand() % 7 + 1;
+
316 time_in.date = rand() % 20 + 1;
+
317 time_in.hour = rand() % 24;
+
318 time_in.minute = rand() % 60;
+
319 time_in.second = rand() % 60;
+
320 ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
321 time_in.year, time_in.month, time_in.date,
+
322 time_in.hour, time_in.minute, time_in.second, time_in.week
+
323 );
+ +
325 if (res != 0)
+
326 {
+
327 ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
+
328 (void)ds3231_deinit(&gs_handle);
+
329
+
330 return 1;
+
331 }
+
332 ds3231_interface_debug_print("ds3231: set alarm1 mode ALARM1_MODE_MINUTE_SECOND_MATCH.\n");
+
333 res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
+
334 if (res != 0)
+
335 {
+
336 ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
+
337 (void)ds3231_deinit(&gs_handle);
+
338
+
339 return 1;
+
340 }
+
341 ds3231_interface_debug_print("ds3231: check alarm1 mode %s.\n", (mode1 == DS3231_ALARM1_MODE_MINUTE_SECOND_MATCH)?"ok":"error");
+
342
+
343 /* ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH */
+
344 time_in.format = DS3231_FORMAT_24H;
+
345 time_in.am_pm = DS3231_AM;
+
346 time_in.year = 0;
+
347 time_in.month = 0;
+
348 time_in.week = rand() % 7 + 1;
+
349 time_in.date = rand() % 20 + 1;
+
350 time_in.hour = rand() % 24;
+
351 time_in.minute = rand() % 60;
+
352 time_in.second = rand() % 60;
+
353 ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
354 time_in.year, time_in.month, time_in.date,
+
355 time_in.hour, time_in.minute, time_in.second, time_in.week
+
356 );
+ +
358 if (res != 0)
+
359 {
+
360 ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
+
361 (void)ds3231_deinit(&gs_handle);
+
362
+
363 return 1;
+
364 }
+
365 ds3231_interface_debug_print("ds3231: set alarm1 mode ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH.\n");
+
366 res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
+
367 if (res != 0)
+
368 {
+
369 ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
+
370 (void)ds3231_deinit(&gs_handle);
+
371
+
372 return 1;
+
373 }
+
374 ds3231_interface_debug_print("ds3231: check alarm1 mode %s.\n", (mode1 == DS3231_ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH)?"ok":"error");
+
375
+
376 /* DS3231_ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH */
+
377 time_in.format = DS3231_FORMAT_24H;
+
378 time_in.am_pm = DS3231_AM;
+
379 time_in.year = 0;
+
380 time_in.month = 0;
+
381 time_in.week = rand() % 7 + 1;
+
382 time_in.date = rand() % 20 + 1;
+
383 time_in.hour = rand() % 24;
+
384 time_in.minute = rand() % 60;
+
385 time_in.second = rand() % 60;
+
386 ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
387 time_in.year, time_in.month, time_in.date,
+
388 time_in.hour, time_in.minute, time_in.second, time_in.week
+
389 );
+ +
391 if (res != 0)
+
392 {
+
393 ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
+
394 (void)ds3231_deinit(&gs_handle);
+
395
+
396 return 1;
+
397 }
+
398 ds3231_interface_debug_print("ds3231: set alarm1 mode ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH.\n");
+
399 res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
+
400 if (res != 0)
+
401 {
+
402 ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
+
403 (void)ds3231_deinit(&gs_handle);
+
404
+
405 return 1;
+
406 }
+
407 ds3231_interface_debug_print("ds3231: check alarm1 mode %s.\n", (mode1 == DS3231_ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH)?"ok":"error");
+
408
+
409 /* DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH */
+
410 time_in.format = DS3231_FORMAT_24H;
+
411 time_in.am_pm = DS3231_AM;
+
412 time_in.year = 0;
+
413 time_in.month = 0;
+
414 time_in.week = rand() % 7 + 1;
+
415 time_in.date = rand() % 20 + 1;
+
416 time_in.hour = rand() % 24;
+
417 time_in.minute = rand() % 60;
+
418 time_in.second = rand() % 60;
+
419 ds3231_interface_debug_print("ds3231: set alarm1 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
420 time_in.year, time_in.month, time_in.date,
+
421 time_in.hour, time_in.minute, time_in.second, time_in.week
+
422 );
+ +
424 if (res != 0)
+
425 {
+
426 ds3231_interface_debug_print("ds3231: set alarm1 failed.\n");
+
427 (void)ds3231_deinit(&gs_handle);
+
428
+
429 return 1;
+
430 }
+
431 ds3231_interface_debug_print("ds3231: set alarm1 mode ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH.\n");
+
432 res = ds3231_get_alarm1(&gs_handle, &time_out, &mode1);
+
433 if (res != 0)
+
434 {
+
435 ds3231_interface_debug_print("ds3231: get alarm1 failed.\n");
+
436 (void)ds3231_deinit(&gs_handle);
+
437
+
438 return 1;
+
439 }
+
440 ds3231_interface_debug_print("ds3231: check alarm1 mode %s.\n", (mode1 == DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH)?"ok":"error");
+
441
+
442 /* ds3231_set_alarm2/ds3231_get_alarm2 test */
+
443 ds3231_interface_debug_print("ds3231: ds3231_set_alarm2/ds3231_get_alarm2 test.\n");
+
444
+
445 /* 12H format */
+
446 time_in.format = DS3231_FORMAT_12H;
+
447 time_in.am_pm = DS3231_AM;
+
448 time_in.year = 0;
+
449 time_in.month = 0;
+
450 time_in.week = rand() % 7 + 1;
+
451 time_in.date = rand() % 20 + 1;
+
452 time_in.hour = rand() % 11 + 1;
+
453 time_in.minute = rand() % 60;
+
454 time_in.second = 0;
+
455 ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d PM %02d:%02d:%02d %d.\n",
+
456 time_in.year, time_in.month, time_in.date,
+
457 time_in.hour, time_in.minute, time_in.second, time_in.week
+
458 );
+ +
460 if (res != 0)
+
461 {
+
462 ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
+
463 (void)ds3231_deinit(&gs_handle);
+
464
+
465 return 1;
+
466 }
+
467 res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
+
468 if (res != 0)
+
469 {
+
470 ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
+
471 (void)ds3231_deinit(&gs_handle);
+
472
+
473 return 1;
+
474 }
+
475 time_in.date = 0;
+
476 ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (memcmp(&time_in, &time_out, sizeof(ds3231_time_t))==0)?"ok":"error");
+
477
+
478 /* 24H format */
+
479 time_in.format = DS3231_FORMAT_24H;
+
480 time_in.am_pm = DS3231_AM;
+
481 time_in.year = 0;
+
482 time_in.month = 0;
+
483 time_in.week = rand() % 7 + 1;
+
484 time_in.date = rand() % 20 + 1;
+
485 time_in.hour = rand() % 24;
+
486 time_in.minute = rand() % 60;
+
487 time_in.second = 0;
+
488 ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
489 time_in.year, time_in.month, time_in.date,
+
490 time_in.hour, time_in.minute, time_in.second, time_in.week
+
491 );
+ +
493 if (res != 0)
+
494 {
+
495 ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
+
496 (void)ds3231_deinit(&gs_handle);
+
497
+
498 return 1;
+
499 }
+
500 res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
+
501 if (res != 0)
+
502 {
+
503 ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
+
504 (void)ds3231_deinit(&gs_handle);
+
505
+
506 return 1;
+
507 }
+
508 time_in.date = 0;
+
509 ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (memcmp(&time_in, &time_out, sizeof(ds3231_time_t))==0)?"ok":"error");
+
510
+
511 /* DS3231_ALARM2_MODE_ONCE_A_MINUTE */
+
512 time_in.format = DS3231_FORMAT_24H;
+
513 time_in.am_pm = DS3231_AM;
+
514 time_in.year = 0;
+
515 time_in.month = 0;
+
516 time_in.week = rand() % 7 + 1;
+
517 time_in.date = rand() % 20 + 1;
+
518 time_in.hour = rand() % 24;
+
519 time_in.minute = rand() % 60;
+
520 time_in.second = 0;
+
521 ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
522 time_in.year, time_in.month, time_in.date,
+
523 time_in.hour, time_in.minute, time_in.second, time_in.week
+
524 );
+
525 res = ds3231_set_alarm2(&gs_handle, &time_in, DS3231_ALARM2_MODE_ONCE_A_MINUTE);
+
526 if (res != 0)
+
527 {
+
528 ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
+
529 (void)ds3231_deinit(&gs_handle);
+
530
+
531 return 1;
+
532 }
+
533 ds3231_interface_debug_print("ds3231: set mode ALARM2_MODE_ONCE_A_MINUTE.\n");
+
534 res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
+
535 if (res != 0)
+
536 {
+
537 ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
+
538 (void)ds3231_deinit(&gs_handle);
+
539
+
540 return 1;
+
541 }
+
542 ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (mode2 == DS3231_ALARM2_MODE_ONCE_A_MINUTE)?"ok":"error");
+
543
+
544 /* ALARM2_MODE_MINUTE_MATCH */
+
545 time_in.format = DS3231_FORMAT_24H;
+
546 time_in.am_pm = DS3231_AM;
+
547 time_in.year = 0;
+
548 time_in.month = 0;
+
549 time_in.week = rand() % 7 + 1;
+
550 time_in.date = rand() % 20 + 1;
+
551 time_in.hour = rand() % 24;
+
552 time_in.minute = rand() % 60;
+
553 time_in.second = 0;
+
554 ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
555 time_in.year, time_in.month, time_in.date,
+
556 time_in.hour, time_in.minute, time_in.second, time_in.week
+
557 );
+
558 res = ds3231_set_alarm2(&gs_handle, &time_in, DS3231_ALARM2_MODE_MINUTE_MATCH);
+
559 if (res != 0)
+
560 {
+
561 ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
+
562 (void)ds3231_deinit(&gs_handle);
+
563
+
564 return 1;
+
565 }
+
566 ds3231_interface_debug_print("ds3231: set mode ALARM2_MODE_MINUTE_MATCH.\n");
+
567 res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
+
568 if (res != 0)
+
569 {
+
570 ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
+
571 (void)ds3231_deinit(&gs_handle);
+
572
+
573 return 1;
+
574 }
+
575 ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (mode2 == DS3231_ALARM2_MODE_MINUTE_MATCH)?"ok":"error");
+
576
+
577 /* ALARM2_MODE_HOUR_MINUTE_MATCH */
+
578 time_in.format = DS3231_FORMAT_24H;
+
579 time_in.am_pm = DS3231_AM;
+
580 time_in.year = 0;
+
581 time_in.month = 0;
+
582 time_in.week = rand() % 7 + 1;
+
583 time_in.date = rand() % 20 + 1;
+
584 time_in.hour = rand() % 24;
+
585 time_in.minute = rand() % 60;
+
586 time_in.second = 0;
+
587 ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
588 time_in.year, time_in.month, time_in.date,
+
589 time_in.hour, time_in.minute, time_in.second, time_in.week
+
590 );
+
591 res = ds3231_set_alarm2(&gs_handle, &time_in, DS3231_ALARM2_MODE_HOUR_MINUTE_MATCH);
+
592 if (res != 0)
+
593 {
+
594 ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
+
595 (void)ds3231_deinit(&gs_handle);
+
596
+
597 return 1;
+
598 }
+
599 ds3231_interface_debug_print("ds3231: set mode ALARM2_MODE_HOUR_MINUTE_MATCH.\n");
+
600 res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
+
601 if (res != 0)
+
602 {
+
603 ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
+
604 (void)ds3231_deinit(&gs_handle);
+
605
+
606 return 1;
+
607 }
+
608 ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (mode2 == DS3231_ALARM2_MODE_HOUR_MINUTE_MATCH)?"ok":"error");
+
609
+
610 /* DS3231_ALARM2_MODE_DATE_HOUR_MINUTE_MATCH */
+
611 time_in.format = DS3231_FORMAT_24H;
+
612 time_in.am_pm = DS3231_AM;
+
613 time_in.year = 0;
+
614 time_in.month = 0;
+
615 time_in.week = rand() % 7 + 1;
+
616 time_in.date = rand() % 20 + 1;
+
617 time_in.hour = rand() % 24;
+
618 time_in.minute = rand() % 60;
+
619 time_in.second = 0;
+
620 ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
621 time_in.year, time_in.month, time_in.date,
+
622 time_in.hour, time_in.minute, time_in.second, time_in.week
+
623 );
+ +
625 if (res != 0)
+
626 {
+
627 ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
+
628 (void)ds3231_deinit(&gs_handle);
+
629
+
630 return 1;
+
631 }
+
632 ds3231_interface_debug_print("ds3231: set mode ALARM2_MODE_DATE_HOUR_MINUTE_MATCH.\n");
+
633 res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
+
634 if (res != 0)
+
635 {
+
636 ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
+
637 (void)ds3231_deinit(&gs_handle);
+
638
+
639 return 1;
+
640 }
+
641 ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (mode2 == DS3231_ALARM2_MODE_DATE_HOUR_MINUTE_MATCH)?"ok":"error");
+
642
+
643 /* DS3231_ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH */
+
644 time_in.format = DS3231_FORMAT_24H;
+
645 time_in.am_pm = DS3231_AM;
+
646 time_in.year = 0;
+
647 time_in.month = 0;
+
648 time_in.week = rand() % 7 + 1;
+
649 time_in.date = rand() % 20 + 1;
+
650 time_in.hour = rand() % 24;
+
651 time_in.minute = rand() % 60;
+
652 time_in.second = 0;
+
653 ds3231_interface_debug_print("ds3231: set alarm2 time %04d-%02d-%02d %02d:%02d:%02d %d.\n",
+
654 time_in.year, time_in.month, time_in.date,
+
655 time_in.hour, time_in.minute, time_in.second, time_in.week
+
656 );
+ +
658 if (res != 0)
+
659 {
+
660 ds3231_interface_debug_print("ds3231: set alarm2 failed.\n");
+
661 (void)ds3231_deinit(&gs_handle);
+
662
+
663 return 1;
+
664 }
+
665 ds3231_interface_debug_print("ds3231: set mode ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH.\n");
+
666 res = ds3231_get_alarm2(&gs_handle, &time_out, &mode2);
+
667 if (res != 0)
+
668 {
+
669 ds3231_interface_debug_print("ds3231: get alarm2 failed.\n");
+
670 (void)ds3231_deinit(&gs_handle);
+
671
+
672 return 1;
+
673 }
+
674 ds3231_interface_debug_print("ds3231: check alarm2 time %s.\n", (mode2 == DS3231_ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH)?"ok":"error");
+
675
+
676 /* ds3231_set_oscillator/ds3231_get_oscillator test */
+
677 ds3231_interface_debug_print("ds3231: ds3231_set_oscillator/ds3231_get_oscillator test.\n");
+
678
+
679 /* enable */
+
680 res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_TRUE);
+
681 if (res != 0)
+
682 {
+
683 ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
+
684 (void)ds3231_deinit(&gs_handle);
+
685
+
686 return 1;
+
687 }
+
688 ds3231_interface_debug_print("ds3231: enable.\n");
+
689 res = ds3231_get_oscillator(&gs_handle, &enable);
+
690 if (res != 0)
+
691 {
+
692 ds3231_interface_debug_print("ds3231: get oscillator failed.\n");
+
693 (void)ds3231_deinit(&gs_handle);
+
694
+
695 return 1;
+
696 }
+
697 ds3231_interface_debug_print("ds3231: check bool %s.\n", (enable == DS3231_BOOL_TRUE)?"ok":"error");
+
698
+
699 /* disable */
+
700 res = ds3231_set_oscillator(&gs_handle, DS3231_BOOL_FALSE);
+
701 if (res != 0)
+
702 {
+
703 ds3231_interface_debug_print("ds3231: set oscillator failed.\n");
+
704 (void)ds3231_deinit(&gs_handle);
+
705
+
706 return 1;
+
707 }
+
708 ds3231_interface_debug_print("ds3231: disable.\n");
+
709 res = ds3231_get_oscillator(&gs_handle, &enable);
+
710 if (res != 0)
+
711 {
+
712 ds3231_interface_debug_print("ds3231: get oscillator failed.\n");
+
713 (void)ds3231_deinit(&gs_handle);
+
714
+
715 return 1;
+
716 }
+
717 ds3231_interface_debug_print("ds3231: check bool %s.\n", (enable == DS3231_BOOL_FALSE)?"ok":"error");
+
718
+
719 /* ds3231_set_alarm_interrupt/ds3231_get_alarm_interrupt */
+
720 ds3231_interface_debug_print("ds3231: ds3231_set_alarm_interrupt/ds3231_get_alarm_interrupt test.\n");
+
721
+
722 /* alarm1 enable*/
+ +
724 if (res != 0)
+
725 {
+
726 ds3231_interface_debug_print("ds3231: set alarm interrupt failed.\n");
+
727 (void)ds3231_deinit(&gs_handle);
+
728
+
729 return 1;
+
730 }
+
731 ds3231_interface_debug_print("ds3231: alarm1 enable.\n");
+
732 res = ds3231_get_alarm_interrupt(&gs_handle, DS3231_ALARM_1, &enable);
+
733 if (res != 0)
+
734 {
+
735 ds3231_interface_debug_print("ds3231: get alarm interrupt failed.\n");
+
736 (void)ds3231_deinit(&gs_handle);
+
737
+
738 return 1;
+
739 }
+
740 ds3231_interface_debug_print("ds3231: check alarm1 bool %s.\n", (enable == DS3231_BOOL_TRUE)?"ok":"error");
+
741
+
742 /* alarm1 disable*/
+ +
744 if (res != 0)
+
745 {
+
746 ds3231_interface_debug_print("ds3231: set alarm interrupt failed.\n");
+
747 (void)ds3231_deinit(&gs_handle);
+
748
+
749 return 1;
+
750 }
+
751 ds3231_interface_debug_print("ds3231: alarm1 disable.\n");
+
752 res = ds3231_get_alarm_interrupt(&gs_handle, DS3231_ALARM_1, &enable);
+
753 if (res != 0)
+
754 {
+
755 ds3231_interface_debug_print("ds3231: get alarm interrupt failed.\n");
+
756 (void)ds3231_deinit(&gs_handle);
+
757
+
758 return 1;
+
759 }
+
760 ds3231_interface_debug_print("ds3231: check alarm1 bool %s.\n", (enable == DS3231_BOOL_FALSE)?"ok":"error");
+
761
+
762 /* alarm2 enable*/
+ +
764 if (res != 0)
+
765 {
+
766 ds3231_interface_debug_print("ds3231: set alarm interrupt failed.\n");
+
767 (void)ds3231_deinit(&gs_handle);
+
768
+
769 return 1;
+
770 }
+
771 ds3231_interface_debug_print("ds3231: alarm2 enable.\n");
+
772 res = ds3231_get_alarm_interrupt(&gs_handle, DS3231_ALARM_2, &enable);
+
773 if (res != 0)
+
774 {
+
775 ds3231_interface_debug_print("ds3231: get alarm interrupt failed.\n");
+
776 (void)ds3231_deinit(&gs_handle);
+
777
+
778 return 1;
+
779 }
+
780 ds3231_interface_debug_print("ds3231: check alarm2 bool %s.\n", (enable == DS3231_BOOL_TRUE)?"ok":"error");
+
781
+
782 /* alarm2 disable*/
+ +
784 if (res != 0)
+
785 {
+
786 ds3231_interface_debug_print("ds3231: set alarm interrupt failed.\n");
+
787 (void)ds3231_deinit(&gs_handle);
+
788
+
789 return 1;
+
790 }
+
791 ds3231_interface_debug_print("ds3231: alarm2 disable.\n");
+
792 res = ds3231_get_alarm_interrupt(&gs_handle, DS3231_ALARM_2, &enable);
+
793 if (res != 0)
+
794 {
+
795 ds3231_interface_debug_print("ds3231: get alarm interrupt failed.\n");
+
796 (void)ds3231_deinit(&gs_handle);
+
797
+
798 return 1;
+
799 }
+
800 ds3231_interface_debug_print("ds3231: check alarm2 bool %s.\n", (enable == DS3231_BOOL_FALSE)?"ok":"error");
+
801
+
802 /* ds3231_set_pin/ds3231_get_pin */
+
803 ds3231_interface_debug_print("ds3231: ds3231_set_pin/ds3231_get_pin test.\n");
+
804
+
805 /* set square wave pin */
+
806 res = ds3231_set_pin(&gs_handle, DS3231_PIN_SQUARE_WAVE);
+
807 if (res != 0)
+
808 {
+
809 ds3231_interface_debug_print("ds3231: set pin failed.\n");
+
810 (void)ds3231_deinit(&gs_handle);
+
811
+
812 return 1;
+
813 }
+
814 ds3231_interface_debug_print("ds3231: set square wave pin.\n");
+
815 res = ds3231_get_pin(&gs_handle, &pin);
+
816 if (res != 0)
+
817 {
+
818 ds3231_interface_debug_print("ds3231: get pin failed.\n");
+
819 (void)ds3231_deinit(&gs_handle);
+
820
+
821 return 1;
+
822 }
+
823 ds3231_interface_debug_print("ds3231: check pin %s.\n", (pin == DS3231_PIN_SQUARE_WAVE)?"ok":"error");
+
824
+
825 /* set interrupt pin */
+
826 res = ds3231_set_pin(&gs_handle, DS3231_PIN_INTERRUPT);
+
827 if (res != 0)
+
828 {
+
829 ds3231_interface_debug_print("ds3231: set pin failed.\n");
+
830 (void)ds3231_deinit(&gs_handle);
+
831
+
832 return 1;
+
833 }
+
834 ds3231_interface_debug_print("ds3231: set interrupt pin.\n");
+
835 res = ds3231_get_pin(&gs_handle, &pin);
+
836 if (res != 0)
+
837 {
+
838 ds3231_interface_debug_print("ds3231: get pin failed.\n");
+
839 (void)ds3231_deinit(&gs_handle);
+
840
+
841 return 1;
+
842 }
+
843 ds3231_interface_debug_print("ds3231: check pin %s.\n", (pin == DS3231_PIN_INTERRUPT)?"ok":"error");
+
844
+
845 /* ds3231_set_square_wave/ds3231_get_square_wave */
+
846 ds3231_interface_debug_print("ds3231: ds3231_set_square_wave/ds3231_get_square_wave test.\n");
+
847
+
848 /* enable */
+
849 res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_TRUE);
+
850 if (res != 0)
+
851 {
+
852 ds3231_interface_debug_print("ds3231: set square wave failed.\n");
+
853 (void)ds3231_deinit(&gs_handle);
+
854
+
855 return 1;
+
856 }
+
857 ds3231_interface_debug_print("ds3231: set enable.\n");
+
858 res = ds3231_get_square_wave(&gs_handle, &enable);
+
859 if (res != 0)
+
860 {
+
861 ds3231_interface_debug_print("ds3231: get square wave failed.\n");
+
862 (void)ds3231_deinit(&gs_handle);
+
863
+
864 return 1;
+
865 }
+
866 ds3231_interface_debug_print("ds3231: check bool %s.\n", (enable == DS3231_BOOL_TRUE)?"ok":"error");
+
867
+
868 /* disable */
+
869 res = ds3231_set_square_wave(&gs_handle, DS3231_BOOL_FALSE);
+
870 if (res != 0)
+
871 {
+
872 ds3231_interface_debug_print("ds3231: set square wave failed.\n");
+
873 (void)ds3231_deinit(&gs_handle);
+
874
+
875 return 1;
+
876 }
+
877 ds3231_interface_debug_print("ds3231: set disable.\n");
+
878 res = ds3231_get_square_wave(&gs_handle, &enable);
+
879 if (res != 0)
+
880 {
+
881 ds3231_interface_debug_print("ds3231: get square wave failed.\n");
+
882 (void)ds3231_deinit(&gs_handle);
+
883
+
884 return 1;
+
885 }
+
886 ds3231_interface_debug_print("ds3231: check bool %s.\n", (enable == DS3231_BOOL_FALSE)?"ok":"error");
+
887
+
888 /* ds3231_set_32khz_output/ds3231_get_32khz_output */
+
889 ds3231_interface_debug_print("ds3231: ds3231_set_32khz_output/ds3231_get_32khz_output test.\n");
+
890
+
891 /* enable */
+
892 res = ds3231_set_32khz_output(&gs_handle, DS3231_BOOL_TRUE);
+
893 if (res != 0)
+
894 {
+
895 ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
+
896 (void)ds3231_deinit(&gs_handle);
+
897
+
898 return 1;
+
899 }
+
900 ds3231_interface_debug_print("ds3231: enable.\n");
+
901 res = ds3231_get_32khz_output(&gs_handle, &enable);
+
902 if (res != 0)
+
903 {
+
904 ds3231_interface_debug_print("ds3231: get 32khz output failed.\n");
+
905 (void)ds3231_deinit(&gs_handle);
+
906
+
907 return 1;
+
908 }
+
909 ds3231_interface_debug_print("ds3231: check bool %s.\n", (enable == DS3231_BOOL_TRUE)?"ok":"error");
+
910
+
911 /* disable */
+ +
913 if (res != 0)
+
914 {
+
915 ds3231_interface_debug_print("ds3231: set 32khz output failed.\n");
+
916 (void)ds3231_deinit(&gs_handle);
+
917
+
918 return 1;
+
919 }
+
920 ds3231_interface_debug_print("ds3231: disable.\n");
+
921 res = ds3231_get_32khz_output(&gs_handle, &enable);
+
922 if (res != 0)
+
923 {
+
924 ds3231_interface_debug_print("ds3231: get 32khz output failed.\n");
+
925 (void)ds3231_deinit(&gs_handle);
+
926
+
927 return 1;
+
928 }
+
929 ds3231_interface_debug_print("ds3231: check bool %s.\n", (enable == DS3231_BOOL_FALSE)?"ok":"error");
+
930
+
931 /* ds3231_set_aging_offset/ds3231_get_aging_offset */
+
932 ds3231_interface_debug_print("ds3231: ds3231_set_aging_offset/ds3231_get_aging_offset test.\n");
+
933 offset = -(rand() % 128);
+
934 res = ds3231_set_aging_offset(&gs_handle, offset);
+
935 if (res != 0)
+
936 {
+
937 ds3231_interface_debug_print("ds3231: set aging offset failed.\n");
+
938 (void)ds3231_deinit(&gs_handle);
+
939
+
940 return 1;
+
941 }
+
942 ds3231_interface_debug_print("ds3231: set offset %d.\n", offset);
+
943 res = ds3231_get_aging_offset(&gs_handle, (int8_t *)&offset_check);
+
944 if (res != 0)
+
945 {
+
946 ds3231_interface_debug_print("ds3231: get aging offset failed.\n");
+
947 (void)ds3231_deinit(&gs_handle);
+
948
+
949 return 1;
+
950 }
+
951 ds3231_interface_debug_print("ds3231: check offset %s.\n", (offset_check == offset)?"ok":"error");
+
952
+
953 /* ds3231_get_status_offset */
+
954 ds3231_interface_debug_print("ds3231: ds3231_get_status test.\n");
+
955 res = ds3231_get_status(&gs_handle, (uint8_t *)&status);
+
956 if (res != 0)
+
957 {
+
958 ds3231_interface_debug_print("ds3231: get status failed.\n");
+
959 (void)ds3231_deinit(&gs_handle);
+
960
+
961 return 1;
+
962 }
+
963 ds3231_interface_debug_print("ds3231: check status 0x%02X.\n", status);
+
964
+
965 /* ds3231_aging_offset_convert_to_register/ds3231_aging_offset_convert_to_data test */
+
966 ds3231_interface_debug_print("ds3231: ds3231_aging_offset_convert_to_register/ds3231_aging_offset_convert_to_data test.\n");
+
967 o = (float)(rand() % 100) /100.0f;
+
968 res = ds3231_aging_offset_convert_to_register(&gs_handle, o, (int8_t *)&offset);
+
969 if (res != 0)
+
970 {
+
971 ds3231_interface_debug_print("ds3231: aging offset convert to register failed.\n");
+
972 (void)ds3231_deinit(&gs_handle);
+
973
+
974 return 1;
+
975 }
+
976 ds3231_interface_debug_print("ds3231: offset is %d.\n", offset);
+
977 res = ds3231_aging_offset_convert_to_data(&gs_handle, offset, (float *)&o_check);
+
978 if (res != 0)
+
979 {
+
980 ds3231_interface_debug_print("ds3231: aging offset convert to data failed.\n");
+
981 (void)ds3231_deinit(&gs_handle);
+
982
+
983 return 1;
+
984 }
+
985 ds3231_interface_debug_print("ds3231: offset is %0.3f.\n", o);
+
986 ds3231_interface_debug_print("ds3231: convert offset is %0.3f.\n", o_check);
+
987
+
988 /* finish register test */
+
989 ds3231_interface_debug_print("ds3231: finish register test.\n");
+
990 (void)ds3231_deinit(&gs_handle);
+
991
+
992 return 0;
+
993}
+
driver ds3231 register test header file
-
uint8_t ds3231_get_32khz_output(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the 32KHz output status
-
uint8_t ds3231_get_pin(ds3231_handle_t *handle, ds3231_pin_t *pin)
get the chip pin function
-
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
-
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
-
uint8_t ds3231_aging_offset_convert_to_data(ds3231_handle_t *handle, int8_t reg, float *offset)
convert a register raw data to a converted aging offset data
-
uint8_t ds3231_get_aging_offset(ds3231_handle_t *handle, int8_t *offset)
get the chip aging offset
-
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
-
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
-
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
-
uint8_t ds3231_get_square_wave(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the square wave output status
-
uint8_t ds3231_get_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t *enable)
get the alarm interrupt status
-
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
-
ds3231_alarm2_mode_t
ds3231 alarm2 enumeration definition
-
uint8_t ds3231_get_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
get the alarm1 time
-
ds3231_alarm1_mode_t
ds3231 alarm1 enumeration definition
-
uint8_t ds3231_set_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
set the alarm2 time
-
uint8_t ds3231_set_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
set the alarm1 time
-
uint8_t ds3231_get_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
get the alarm2 time
-
@ DS3231_ALARM2_MODE_ONCE_A_MINUTE
-
@ DS3231_ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH
-
@ DS3231_ALARM2_MODE_HOUR_MINUTE_MATCH
-
@ DS3231_ALARM2_MODE_MINUTE_MATCH
-
@ DS3231_ALARM2_MODE_DATE_HOUR_MINUTE_MATCH
-
@ DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH
-
@ DS3231_ALARM1_MODE_ONCE_A_SECOND
-
@ DS3231_ALARM1_MODE_MINUTE_SECOND_MATCH
-
@ DS3231_ALARM1_MODE_SECOND_MATCH
-
@ DS3231_ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH
-
@ DS3231_ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH
-
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
-
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
-
uint8_t ds3231_get_oscillator(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the chip oscillator status
-
ds3231_pin_t
ds3231 pin enumeration definition
Definition: driver_ds3231.h:91
-
uint8_t ds3231_info(ds3231_info_t *info)
get chip's information
-
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
-
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
-
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
-
ds3231_bool_t
ds3231 bool enumeration definition
Definition: driver_ds3231.h:64
-
uint8_t ds3231_get_status(ds3231_handle_t *handle, uint8_t *status)
get the chip status
-
@ DS3231_PM
Definition: driver_ds3231.h:84
-
@ DS3231_AM
Definition: driver_ds3231.h:83
-
@ DS3231_ALARM_2
Definition: driver_ds3231.h:75
-
@ DS3231_ALARM_1
Definition: driver_ds3231.h:74
-
@ DS3231_FORMAT_24H
-
@ DS3231_FORMAT_12H
-
@ DS3231_PIN_INTERRUPT
Definition: driver_ds3231.h:93
-
@ DS3231_PIN_SQUARE_WAVE
Definition: driver_ds3231.h:92
-
@ DS3231_BOOL_TRUE
Definition: driver_ds3231.h:66
-
@ DS3231_BOOL_FALSE
Definition: driver_ds3231.h:65
-
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
-
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
-
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
-
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
-
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
- - - - - - - - -
uint8_t ds3231_register_test(void)
register test
-
ds3231 handle structure definition
-
ds3231 information structure definition
-
float temperature_max
-
float supply_voltage_max_v
-
uint32_t driver_version
-
float temperature_min
-
float max_current_ma
-
char manufacturer_name[32]
-
float supply_voltage_min_v
-
char interface[8]
-
char chip_name[32]
-
ds3231 time structure definition
- - -
ds3231_am_pm_t am_pm
- - -
ds3231_format_t format
- - - +
uint8_t ds3231_get_32khz_output(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the 32KHz output status
+
uint8_t ds3231_get_pin(ds3231_handle_t *handle, ds3231_pin_t *pin)
get the chip pin function
+
uint8_t ds3231_set_aging_offset(ds3231_handle_t *handle, int8_t offset)
set the chip aging offset
+
uint8_t ds3231_set_pin(ds3231_handle_t *handle, ds3231_pin_t pin)
set the chip pin function
+
uint8_t ds3231_aging_offset_convert_to_data(ds3231_handle_t *handle, int8_t reg, float *offset)
convert a register raw data to a converted aging offset data
+
uint8_t ds3231_get_aging_offset(ds3231_handle_t *handle, int8_t *offset)
get the chip aging offset
+
uint8_t ds3231_aging_offset_convert_to_register(ds3231_handle_t *handle, float offset, int8_t *reg)
convert a aging offset value to a register raw data
+
uint8_t ds3231_set_32khz_output(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the 32KHz output
+
uint8_t ds3231_set_square_wave(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the square wave output
+
uint8_t ds3231_get_square_wave(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the square wave output status
+
uint8_t ds3231_get_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t *enable)
get the alarm interrupt status
+
uint8_t ds3231_set_alarm_interrupt(ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
enable or disable the alarm interrupt
+
ds3231_alarm2_mode_t
ds3231 alarm2 enumeration definition
+
uint8_t ds3231_get_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
get the alarm1 time
+
ds3231_alarm1_mode_t
ds3231 alarm1 enumeration definition
+
uint8_t ds3231_set_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
set the alarm2 time
+
uint8_t ds3231_set_alarm1(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
set the alarm1 time
+
uint8_t ds3231_get_alarm2(ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
get the alarm2 time
+
@ DS3231_ALARM2_MODE_ONCE_A_MINUTE
+
@ DS3231_ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH
+
@ DS3231_ALARM2_MODE_HOUR_MINUTE_MATCH
+
@ DS3231_ALARM2_MODE_MINUTE_MATCH
+
@ DS3231_ALARM2_MODE_DATE_HOUR_MINUTE_MATCH
+
@ DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH
+
@ DS3231_ALARM1_MODE_ONCE_A_SECOND
+
@ DS3231_ALARM1_MODE_MINUTE_SECOND_MATCH
+
@ DS3231_ALARM1_MODE_SECOND_MATCH
+
@ DS3231_ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH
+
@ DS3231_ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH
+
uint8_t ds3231_set_oscillator(ds3231_handle_t *handle, ds3231_bool_t enable)
enable or disable the oscillator
+
uint8_t ds3231_set_time(ds3231_handle_t *handle, ds3231_time_t *t)
set the current time
+
uint8_t ds3231_get_oscillator(ds3231_handle_t *handle, ds3231_bool_t *enable)
get the chip oscillator status
+
struct ds3231_time_s ds3231_time_t
ds3231 time structure definition
+
ds3231_pin_t
ds3231 pin enumeration definition
+
uint8_t ds3231_info(ds3231_info_t *info)
get chip's information
+
struct ds3231_handle_s ds3231_handle_t
ds3231 handle structure definition
+
uint8_t ds3231_init(ds3231_handle_t *handle)
initialize the chip
+
struct ds3231_info_s ds3231_info_t
ds3231 information structure definition
+
uint8_t ds3231_get_time(ds3231_handle_t *handle, ds3231_time_t *t)
get the current time
+
uint8_t ds3231_deinit(ds3231_handle_t *handle)
close the chip
+
ds3231_bool_t
ds3231 bool enumeration definition
+
uint8_t ds3231_get_status(ds3231_handle_t *handle, uint8_t *status)
get the chip status
+
@ DS3231_PM
+
@ DS3231_AM
+
@ DS3231_ALARM_2
+
@ DS3231_ALARM_1
+
@ DS3231_FORMAT_24H
+
@ DS3231_FORMAT_12H
+
@ DS3231_PIN_INTERRUPT
+
@ DS3231_PIN_SQUARE_WAVE
+
@ DS3231_BOOL_TRUE
+
@ DS3231_BOOL_FALSE
+
uint8_t ds3231_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ds3231_interface_iic_init(void)
interface iic bus init
+
uint8_t ds3231_interface_iic_deinit(void)
interface iic bus deinit
+
void ds3231_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ds3231_interface_debug_print(const char *const fmt,...)
interface print format data
+
void ds3231_interface_receive_callback(uint8_t type)
interface receive callback
+
uint8_t ds3231_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+ + + + + + + + +
uint8_t ds3231_register_test(void)
register test
+ +
float supply_voltage_max_v
+
uint32_t driver_version
+ + +
char manufacturer_name[32]
+
float supply_voltage_min_v
+ +
char chip_name[32]
+ + +
ds3231_am_pm_t am_pm
+ + +
ds3231_format_t format
+ + +
+
diff --git a/doc/html/driver__ds3231__register__test_8h.html b/doc/html/driver__ds3231__register__test_8h.html index 4f288cc..f91c026 100644 --- a/doc/html/driver__ds3231__register__test_8h.html +++ b/doc/html/driver__ds3231__register__test_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_register_test.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ds3231_register_test.h File Reference
+
driver_ds3231_register_test.h File Reference

driver ds3231 register test header file More...

+Include dependency graph for driver_ds3231_register_test.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+

Go to the source code of this file.

- - - - + +

+

Functions

uint8_t ds3231_register_test (void)
 register test More...
 
uint8_t ds3231_register_test (void)
 register test
-

Detailed Description

+

Detailed Description

driver ds3231 register test header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -126,11 +139,19 @@

history

Definition in file driver_ds3231_register_test.h.

+ +
diff --git a/doc/html/driver__ds3231__register__test_8h__dep__incl.md5 b/doc/html/driver__ds3231__register__test_8h__dep__incl.md5 new file mode 100644 index 0000000..749e0c6 --- /dev/null +++ b/doc/html/driver__ds3231__register__test_8h__dep__incl.md5 @@ -0,0 +1 @@ +69351648f84fe33c9f437a1fc8714134 \ No newline at end of file diff --git a/doc/html/driver__ds3231__register__test_8h__dep__incl.svg b/doc/html/driver__ds3231__register__test_8h__dep__incl.svg new file mode 100644 index 0000000..c3984f4 --- /dev/null +++ b/doc/html/driver__ds3231__register__test_8h__dep__incl.svg @@ -0,0 +1,41 @@ + + + + + + +test/driver_ds3231_register_test.h + + +Node1 + + +test/driver_ds3231 +_register_test.h + + + + + +Node2 + + +test/driver_ds3231 +_register_test.c + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/driver__ds3231__register__test_8h__incl.md5 b/doc/html/driver__ds3231__register__test_8h__incl.md5 new file mode 100644 index 0000000..3627bc0 --- /dev/null +++ b/doc/html/driver__ds3231__register__test_8h__incl.md5 @@ -0,0 +1 @@ +9deec134073e9d372413e2ed2fb2dc24 \ No newline at end of file diff --git a/doc/html/driver__ds3231__register__test_8h__incl.svg b/doc/html/driver__ds3231__register__test_8h__incl.svg new file mode 100644 index 0000000..190b0c4 --- /dev/null +++ b/doc/html/driver__ds3231__register__test_8h__incl.svg @@ -0,0 +1,112 @@ + + + + + + +test/driver_ds3231_register_test.h + + +Node1 + + +test/driver_ds3231 +_register_test.h + + + + + +Node2 + + +driver_ds3231_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ds3231.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdio.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdint.h + + + + + +Node3->Node5 + + + + + + + + +Node6 + + +string.h + + + + + +Node3->Node6 + + + + + + + + diff --git a/doc/html/driver__ds3231__register__test_8h_source.html b/doc/html/driver__ds3231__register__test_8h_source.html index 2d3934e..9655604 100644 --- a/doc/html/driver__ds3231__register__test_8h_source.html +++ b/doc/html/driver__ds3231__register__test_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: test/driver_ds3231_register_test.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ds3231_register_test.h
+
driver_ds3231_register_test.h
-Go to the documentation of this file.
1 
-
38 #ifndef DRIVER_DS3231_REGISTER_TEST_H
-
39 #define DRIVER_DS3231_REGISTER_TEST_H
-
40 
- -
42 
-
43 #ifdef __cplusplus
-
44 extern "C"{
-
45 #endif
-
46 
-
61 uint8_t ds3231_register_test(void);
-
62 
-
67 #ifdef __cplusplus
-
68 }
-
69 #endif
-
70 
-
71 #endif
+Go to the documentation of this file.
1
+
37
+
38#ifndef DRIVER_DS3231_REGISTER_TEST_H
+
39#define DRIVER_DS3231_REGISTER_TEST_H
+
40
+ +
42
+
43#ifdef __cplusplus
+
44extern "C"{
+
45#endif
+
46
+
53
+
61uint8_t ds3231_register_test(void);
+
62
+
66
+
67#ifdef __cplusplus
+
68}
+
69#endif
+
70
+
71#endif
driver ds3231 interface header file
-
uint8_t ds3231_register_test(void)
register test
+
uint8_t ds3231_register_test(void)
register test
+
diff --git a/doc/html/dynsections.js b/doc/html/dynsections.js index 88f2c27..d89724e 100644 --- a/doc/html/dynsections.js +++ b/doc/html/dynsections.js @@ -22,107 +22,177 @@ @licend The above is the entire license notice for the JavaScript code in this file */ -function toggleVisibility(linkObj) -{ - var base = $(linkObj).attr('id'); - var summary = $('#'+base+'-summary'); - var content = $('#'+base+'-content'); - var trigger = $('#'+base+'-trigger'); - var src=$(trigger).attr('src'); - if (content.is(':visible')===true) { - content.hide(); - summary.show(); - $(linkObj).addClass('closed').removeClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); - } else { - content.show(); - summary.hide(); - $(linkObj).removeClass('closed').addClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } - return false; -} -function updateStripes() -{ - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); +function toggleVisibility(linkObj) { + return dynsection.toggleVisibility(linkObj); } -function toggleLevel(level) -{ - $('table.directory tr').each(function() { - var l = this.id.split('_').length-1; - var i = $('#img'+this.id.substring(3)); - var a = $('#arr'+this.id.substring(3)); - if (l'); + // add vertical lines to other rows + $('span[class=lineno]').not(':eq(0)').append(''); + // add toggle controls to lines with fold divs + $('div[class=foldopen]').each(function() { + // extract specific id to use + const id = $(this).attr('id').replace('foldopen',''); + // extract start and end foldable fragment attributes + const start = $(this).attr('data-start'); + const end = $(this).attr('data-end'); + // replace normal fold span with controls for the first line of a foldable fragment + $(this).find('span[class=fold]:first').replaceWith(''); + // append div for folded (closed) representation + $(this).after(''); + // extract the first line from the "open" section to represent closed content + const line = $(this).children().first().clone(); + // remove any glow that might still be active on the original line + $(line).removeClass('glow'); + if (start) { + // if line already ends with a start marker (e.g. trailing {), remove it + $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); + } + // replace minus with plus symbol + $(line).find('span[class=fold]').addClass('plus').removeClass('minus'); + // append ellipsis + $(line).append(' '+start+''+end); + // insert constructed line into closed div + $('#foldclosed'+id).html(line); + }); + }, +}; /* @license-end */ - -$(document).ready(function() { +$(function() { $('.code,.codeRef').each(function() { $(this).data('powertip',$('#a'+$(this).attr('href').replace(/.*\//,'').replace(/[^a-z_A-Z0-9]/g,'_')).html()); + $.fn.powerTip.smartPlacementLists.s = [ 's', 'n', 'ne', 'se' ]; $(this).powerTip({ placement: 's', smartPlacement: true, mouseOnToPopup: true }); }); }); diff --git a/doc/html/favicon.svg b/doc/html/favicon.svg new file mode 100644 index 0000000..7ab3ea8 --- /dev/null +++ b/doc/html/favicon.svg @@ -0,0 +1,20 @@ + + + + + + + + + \ No newline at end of file diff --git a/doc/html/files.html b/doc/html/files.html index 33e49d7..c7357f1 100644 --- a/doc/html/files.html +++ b/doc/html/files.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: File List + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
File List
+
File List
Here is a list of all files with brief descriptions:
-
[detail level 123]
- - - - - - - - - - - - - - - - - - - - - - - - - +
[detail level 123]
  doc
  mainpage
 mainpage.h
  example
 driver_ds3231_alarm.cDriver ds3231 alarm source file
 driver_ds3231_alarm.hDriver ds3231 alarm header file
 driver_ds3231_basic.cDriver ds3231 basic source file
 driver_ds3231_basic.hDriver ds3231 basic header file
 driver_ds3231_output.cDriver ds3231 output source file
 driver_ds3231_output.hDriver ds3231 output header file
  interface
 driver_ds3231_interface.hDriver ds3231 interface header file
 driver_ds3231_interface_template.cDriver ds3231 interface template source file
  src
 driver_ds3231.cDriver ds3231 source file
 driver_ds3231.hDriver ds3231 header file
  test
 driver_ds3231_alarm_test.cDriver ds3231 alarm test source file
 driver_ds3231_alarm_test.hDriver ds3231 alarm test header file
 driver_ds3231_output_test.cDriver ds3231 output test source file
 driver_ds3231_output_test.hDriver ds3231 output test header file
 driver_ds3231_readwrite_test.cDriver ds3231 readwrite test source file
 driver_ds3231_readwrite_test.hDriver ds3231 readwrite test header file
 driver_ds3231_register_test.cDriver ds3231 register test source file
 driver_ds3231_register_test.hDriver ds3231 register test header file
+ + + + + + + + + + + + + + + + + + + + + + + + +
 
doc
 
mainpage
 
mainpage.h
 
example
 
driver_ds3231_alarm.c
Driver ds3231 alarm source file
 
driver_ds3231_alarm.h
Driver ds3231 alarm header file
 
driver_ds3231_basic.c
Driver ds3231 basic source file
 
driver_ds3231_basic.h
Driver ds3231 basic header file
 
driver_ds3231_output.c
Driver ds3231 output source file
 
driver_ds3231_output.h
Driver ds3231 output header file
 
interface
 
driver_ds3231_interface.h
Driver ds3231 interface header file
 
driver_ds3231_interface_template.c
Driver ds3231 interface template source file
 
src
 
driver_ds3231.c
Driver ds3231 source file
 
driver_ds3231.h
Driver ds3231 header file
 
test
 
driver_ds3231_alarm_test.c
Driver ds3231 alarm test source file
 
driver_ds3231_alarm_test.h
Driver ds3231 alarm test header file
 
driver_ds3231_output_test.c
Driver ds3231 output test source file
 
driver_ds3231_output_test.h
Driver ds3231 output test header file
 
driver_ds3231_readwrite_test.c
Driver ds3231 readwrite test source file
 
driver_ds3231_readwrite_test.h
Driver ds3231 readwrite test header file
 
driver_ds3231_register_test.c
Driver ds3231 register test source file
 
driver_ds3231_register_test.h
Driver ds3231 register test header file
+
diff --git a/doc/html/folderclosed.png b/doc/html/folderclosed.png deleted file mode 100644 index bb8ab35..0000000 Binary files a/doc/html/folderclosed.png and /dev/null differ diff --git a/doc/html/folderopen.png b/doc/html/folderopen.png deleted file mode 100644 index d6c7f67..0000000 Binary files a/doc/html/folderopen.png and /dev/null differ diff --git a/doc/html/functions.html b/doc/html/functions.html index be109c5..795f045 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Data Fields + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
Here is a list of all struct and union fields with links to the structures/unions they belong to:
+
diff --git a/doc/html/functions_vars.html b/doc/html/functions_vars.html index 70c7ad4..8f9c141 100644 --- a/doc/html/functions_vars.html +++ b/doc/html/functions_vars.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Data Fields - Variables + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
diff --git a/doc/html/globals.html b/doc/html/globals.html index eca72db..de0801c 100644 --- a/doc/html/globals.html +++ b/doc/html/globals.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
-

- c -

+
diff --git a/doc/html/globals_d.html b/doc/html/globals_d.html index 055ce45..6394144 100644 --- a/doc/html/globals_d.html +++ b/doc/html/globals_d.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
-

- d -

+
diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html index a17c658..31bd229 100644 --- a/doc/html/globals_defs.html +++ b/doc/html/globals_defs.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-  +
Here is a list of all macros with links to the files they belong to:
-

- c -

+
diff --git a/doc/html/globals_enum.html b/doc/html/globals_enum.html index 4977124..f57b7d8 100644 --- a/doc/html/globals_enum.html +++ b/doc/html/globals_enum.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
diff --git a/doc/html/globals_eval.html b/doc/html/globals_eval.html index 52c309c..3f16888 100644 --- a/doc/html/globals_eval.html +++ b/doc/html/globals_eval.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html index 57a8be2..50764f6 100644 --- a/doc/html/globals_func.html +++ b/doc/html/globals_func.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-  +
Here is a list of all functions with links to the files they belong to:
-

- d -

+
diff --git a/doc/html/globals_m.html b/doc/html/globals_m.html index 1605378..7210137 100644 --- a/doc/html/globals_m.html +++ b/doc/html/globals_m.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
-

- m -

+
diff --git a/doc/html/globals_s.html b/doc/html/globals_s.html index 1df781e..5692468 100644 --- a/doc/html/globals_s.html +++ b/doc/html/globals_s.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
-

- s -

+
diff --git a/doc/html/globals_t.html b/doc/html/globals_t.html index 3ff6d91..b4c5074 100644 --- a/doc/html/globals_t.html +++ b/doc/html/globals_t.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
-

- t -

+
diff --git a/doc/html/globals_type.html b/doc/html/globals_type.html index c80ed03..a52fa06 100644 --- a/doc/html/globals_type.html +++ b/doc/html/globals_type.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
diff --git a/doc/html/graph_legend.html b/doc/html/graph_legend.html new file mode 100644 index 0000000..42caa12 --- /dev/null +++ b/doc/html/graph_legend.html @@ -0,0 +1,167 @@ + + + + + + + +LibDriver DS3231: Graph Legend + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
LibDriver DS3231 +
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Graph Legend
+
+
+

This page explains how to interpret the graphs that are generated by doxygen.

+

Consider the following example:

/*! Invisible class because of truncation */
+
class Invisible { };
+
+
/*! Truncated class, inheritance relation is hidden */
+
class Truncated : public Invisible { };
+
+
/* Class not documented with doxygen comments */
+
class Undocumented { };
+
+
/*! Class that is inherited using public inheritance */
+
class PublicBase : public Truncated { };
+
+
/*! A template class */
+
template<class T> class Templ { };
+
+
/*! Class that is inherited using protected inheritance */
+
class ProtectedBase { };
+
+
/*! Class that is inherited using private inheritance */
+
class PrivateBase { };
+
+
/*! Class that is used by the Inherited class */
+
class Used { };
+
+
/*! Super class that inherits a number of other classes */
+
class Inherited : public PublicBase,
+
protected ProtectedBase,
+
private PrivateBase,
+
public Undocumented,
+
public Templ<int>
+
{
+
private:
+
Used *m_usedClass;
+
};
+

This will result in the following graph:

+

The boxes in the above graph have the following meaning:

+
    +
  • +A filled gray box represents the struct or class for which the graph is generated.
  • +
  • +A box with a black border denotes a documented struct or class.
  • +
  • +A box with a gray border denotes an undocumented struct or class.
  • +
  • +A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • +
+

The arrows have the following meaning:

+
    +
  • +A blue arrow is used to visualize a public inheritance relation between two classes.
  • +
  • +A dark green arrow is used for protected inheritance.
  • +
  • +A dark red arrow is used for private inheritance.
  • +
  • +A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • +
  • +A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • +
+
+
+
+ + + + diff --git a/doc/html/graph_legend.md5 b/doc/html/graph_legend.md5 new file mode 100644 index 0000000..da515da --- /dev/null +++ b/doc/html/graph_legend.md5 @@ -0,0 +1 @@ +f74606a252eb303675caf37987d0b7af \ No newline at end of file diff --git a/doc/html/graph_legend.svg b/doc/html/graph_legend.svg new file mode 100644 index 0000000..8cf264a --- /dev/null +++ b/doc/html/graph_legend.svg @@ -0,0 +1,167 @@ + + + + + + +Graph Legend + + +Node9 + + +Inherited + + + + + +Node10 + + +PublicBase + + + + + +Node10->Node9 + + + + + + + + +Node11 + + +Truncated + + + + + +Node11->Node10 + + + + + + + + +Node13 + + +ProtectedBase + + + + + +Node13->Node9 + + + + + + + + +Node14 + + +PrivateBase + + + + + +Node14->Node9 + + + + + + + + +Node15 + + +Undocumented + + + + + +Node15->Node9 + + + + + + + + +Node16 + + +Templ< int > + + + + + +Node16->Node9 + + + + + + + + +Node17 + + +Templ< T > + + + + + +Node17->Node16 + + + + + +< int > + + + +Node18 + + +Used + + + + + +Node18->Node9 + + + + + +m_usedClass + + + diff --git a/doc/html/group__ds3231__advance__driver.html b/doc/html/group__ds3231__advance__driver.html index 53df01a..a2b23d6 100644 --- a/doc/html/group__ds3231__advance__driver.html +++ b/doc/html/group__ds3231__advance__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: ds3231 advance driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
ds3231 advance driver function
+
ds3231 advance driver function

ds3231 advance driver modules More...

+
+Collaboration diagram for ds3231 advance driver function:
+
+
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_set_pin (ds3231_handle_t *handle, ds3231_pin_t pin)
 set the chip pin function More...
 
uint8_t ds3231_get_pin (ds3231_handle_t *handle, ds3231_pin_t *pin)
 get the chip pin function More...
 
uint8_t ds3231_set_square_wave (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the square wave output More...
 
uint8_t ds3231_get_square_wave (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the square wave output status More...
 
uint8_t ds3231_set_32khz_output (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the 32KHz output More...
 
uint8_t ds3231_get_32khz_output (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the 32KHz output status More...
 
uint8_t ds3231_get_temperature (ds3231_handle_t *handle, int16_t *raw, float *s)
 get the chip temperature More...
 
uint8_t ds3231_set_aging_offset (ds3231_handle_t *handle, int8_t offset)
 set the chip aging offset More...
 
uint8_t ds3231_get_aging_offset (ds3231_handle_t *handle, int8_t *offset)
 get the chip aging offset More...
 
uint8_t ds3231_aging_offset_convert_to_register (ds3231_handle_t *handle, float offset, int8_t *reg)
 convert a aging offset value to a register raw data More...
 
uint8_t ds3231_aging_offset_convert_to_data (ds3231_handle_t *handle, int8_t reg, float *offset)
 convert a register raw data to a converted aging offset data More...
 
uint8_t ds3231_set_pin (ds3231_handle_t *handle, ds3231_pin_t pin)
 set the chip pin function
uint8_t ds3231_get_pin (ds3231_handle_t *handle, ds3231_pin_t *pin)
 get the chip pin function
uint8_t ds3231_set_square_wave (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the square wave output
uint8_t ds3231_get_square_wave (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the square wave output status
uint8_t ds3231_set_32khz_output (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the 32KHz output
uint8_t ds3231_get_32khz_output (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the 32KHz output status
uint8_t ds3231_get_temperature (ds3231_handle_t *handle, int16_t *raw, float *s)
 get the chip temperature
uint8_t ds3231_set_aging_offset (ds3231_handle_t *handle, int8_t offset)
 set the chip aging offset
uint8_t ds3231_get_aging_offset (ds3231_handle_t *handle, int8_t *offset)
 get the chip aging offset
uint8_t ds3231_aging_offset_convert_to_register (ds3231_handle_t *handle, float offset, int8_t *reg)
 convert a aging offset value to a register raw data
uint8_t ds3231_aging_offset_convert_to_data (ds3231_handle_t *handle, int8_t reg, float *offset)
 convert a register raw data to a converted aging offset data
-

Detailed Description

+

Detailed Description

ds3231 advance driver modules

-

Function Documentation

- -

◆ ds3231_aging_offset_convert_to_data()

+

Function Documentation

+ +

◆ ds3231_aging_offset_convert_to_data()

@@ -142,25 +140,17 @@

uint8_t ds3231_aging_offset_convert_to_data ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - int8_t  - reg, + int8_t reg, - float *  - offset  - - - - ) - + float * offset )

@@ -186,8 +176,8 @@

-

◆ ds3231_aging_offset_convert_to_register()

+ +

◆ ds3231_aging_offset_convert_to_register()

@@ -195,25 +185,17 @@

uint8_t ds3231_aging_offset_convert_to_register ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - float  - offset, + float offset, - int8_t *  - reg  - - - - ) - + int8_t * reg )

@@ -239,8 +221,8 @@

-

◆ ds3231_get_32khz_output()

+ +

◆ ds3231_get_32khz_output()

@@ -248,19 +230,12 @@

uint8_t ds3231_get_32khz_output ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_bool_t *  - enable  - - - - ) - + ds3231_bool_t * enable )

@@ -286,8 +261,8 @@

-

◆ ds3231_get_aging_offset()

+ +

◆ ds3231_get_aging_offset()

@@ -295,19 +270,12 @@

uint8_t ds3231_get_aging_offset ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - int8_t *  - offset  - - - - ) - + int8_t * offset )

@@ -333,8 +301,8 @@

-

◆ ds3231_get_pin()

+ +

◆ ds3231_get_pin()

@@ -342,19 +310,12 @@

uint8_t ds3231_get_pin ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_pin_t *  - pin  - - - - ) - + ds3231_pin_t * pin )

@@ -380,8 +341,8 @@

-

◆ ds3231_get_square_wave()

+ +

◆ ds3231_get_square_wave()

@@ -389,19 +350,12 @@

uint8_t ds3231_get_square_wave ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_bool_t *  - enable  - - - - ) - + ds3231_bool_t * enable )

@@ -427,8 +381,8 @@

-

◆ ds3231_get_temperature()

+ +

◆ ds3231_get_temperature()

@@ -436,25 +390,17 @@

uint8_t ds3231_get_temperature ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - int16_t *  - raw, + int16_t * raw, - float *  - s  - - - - ) - + float * s )

@@ -481,8 +427,8 @@

-

◆ ds3231_set_32khz_output()

+ +

◆ ds3231_set_32khz_output()

@@ -490,19 +436,12 @@

uint8_t ds3231_set_32khz_output ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_bool_t  - enable  - - - - ) - + ds3231_bool_t enable )

@@ -528,8 +467,8 @@

-

◆ ds3231_set_aging_offset()

+ +

◆ ds3231_set_aging_offset()

@@ -537,19 +476,12 @@

uint8_t ds3231_set_aging_offset ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - int8_t  - offset  - - - - ) - + int8_t offset )

@@ -575,8 +507,8 @@

-

◆ ds3231_set_pin()

+ +

◆ ds3231_set_pin()

@@ -584,19 +516,12 @@

uint8_t ds3231_set_pin ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_pin_t  - pin  - - - - ) - + ds3231_pin_t pin )

@@ -622,8 +547,8 @@

-

◆ ds3231_set_square_wave()

+ +

◆ ds3231_set_square_wave()

@@ -631,19 +556,12 @@

uint8_t ds3231_set_square_wave ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_bool_t  - enable  - - - - ) - + ds3231_bool_t enable )

@@ -671,10 +589,18 @@

+ + +

+
diff --git a/doc/html/group__ds3231__advance__driver.md5 b/doc/html/group__ds3231__advance__driver.md5 new file mode 100644 index 0000000..aa329c2 --- /dev/null +++ b/doc/html/group__ds3231__advance__driver.md5 @@ -0,0 +1 @@ +4906947c00887641af6a5728b26fc823 \ No newline at end of file diff --git a/doc/html/group__ds3231__advance__driver.svg b/doc/html/group__ds3231__advance__driver.svg new file mode 100644 index 0000000..a3ac357 --- /dev/null +++ b/doc/html/group__ds3231__advance__driver.svg @@ -0,0 +1,37 @@ + + + + + + +ds3231 advance driver function + + +Node1 + + +ds3231 advance driver + function + + + + + +Node2 + + +ds3231 driver function + + + + + +Node2->Node1 + + + + + diff --git a/doc/html/group__ds3231__alarm__driver.html b/doc/html/group__ds3231__alarm__driver.html index 3cd72af..f7edbab 100644 --- a/doc/html/group__ds3231__alarm__driver.html +++ b/doc/html/group__ds3231__alarm__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: ds3231 alarm driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +

@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
ds3231 alarm driver function
+
ds3231 alarm driver function

ds3231 alarm driver modules More...

+
+Collaboration diagram for ds3231 alarm driver function:
+
+
+
- - - - - + - - +

+

Enumerations

enum  ds3231_alarm1_mode_t {
-  DS3231_ALARM1_MODE_ONCE_A_SECOND = 0x0F -, DS3231_ALARM1_MODE_SECOND_MATCH = 0x0E -, DS3231_ALARM1_MODE_MINUTE_SECOND_MATCH = 0x0C -, DS3231_ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH = 0x08 +
enum  ds3231_alarm1_mode_t {
+  DS3231_ALARM1_MODE_ONCE_A_SECOND = 0x0F +, DS3231_ALARM1_MODE_SECOND_MATCH = 0x0E +, DS3231_ALARM1_MODE_MINUTE_SECOND_MATCH = 0x0C +, DS3231_ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH = 0x08 ,
-  DS3231_ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH = 0x00 -, DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH = 0x10 +  DS3231_ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH = 0x00 +, DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH = 0x10
}
 ds3231 alarm1 enumeration definition More...
 
enum  ds3231_alarm2_mode_t {
-  DS3231_ALARM2_MODE_ONCE_A_MINUTE = 0x07 -, DS3231_ALARM2_MODE_MINUTE_MATCH = 0x06 -, DS3231_ALARM2_MODE_HOUR_MINUTE_MATCH = 0x04 -, DS3231_ALARM2_MODE_DATE_HOUR_MINUTE_MATCH = 0x00 +
 ds3231 alarm1 enumeration definition More...
enum  ds3231_alarm2_mode_t {
+  DS3231_ALARM2_MODE_ONCE_A_MINUTE = 0x07 +, DS3231_ALARM2_MODE_MINUTE_MATCH = 0x06 +, DS3231_ALARM2_MODE_HOUR_MINUTE_MATCH = 0x04 +, DS3231_ALARM2_MODE_DATE_HOUR_MINUTE_MATCH = 0x00 ,
-  DS3231_ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH = 0x10 +  DS3231_ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH = 0x10
}
 ds3231 alarm2 enumeration definition More...
 
 ds3231 alarm2 enumeration definition More...
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_set_alarm_interrupt (ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
 enable or disable the alarm interrupt More...
 
uint8_t ds3231_get_alarm_interrupt (ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t *enable)
 get the alarm interrupt status More...
 
uint8_t ds3231_set_alarm1 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
 set the alarm1 time More...
 
uint8_t ds3231_get_alarm1 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
 get the alarm1 time More...
 
uint8_t ds3231_set_alarm2 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
 set the alarm2 time More...
 
uint8_t ds3231_get_alarm2 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
 get the alarm2 time More...
 
uint8_t ds3231_alarm_clear (ds3231_handle_t *handle, ds3231_alarm_t alarm)
 clear the alarm flag More...
 
uint8_t ds3231_set_alarm_interrupt (ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t enable)
 enable or disable the alarm interrupt
uint8_t ds3231_get_alarm_interrupt (ds3231_handle_t *handle, ds3231_alarm_t alarm, ds3231_bool_t *enable)
 get the alarm interrupt status
uint8_t ds3231_set_alarm1 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t mode)
 set the alarm1 time
uint8_t ds3231_get_alarm1 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
 get the alarm1 time
uint8_t ds3231_set_alarm2 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t mode)
 set the alarm2 time
uint8_t ds3231_get_alarm2 (ds3231_handle_t *handle, ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
 get the alarm2 time
uint8_t ds3231_alarm_clear (ds3231_handle_t *handle, ds3231_alarm_t alarm)
 clear the alarm flag
-

Detailed Description

+

Detailed Description

ds3231 alarm driver modules

-

Enumeration Type Documentation

- -

◆ ds3231_alarm1_mode_t

+

Enumeration Type Documentation

+ +

◆ ds3231_alarm1_mode_t

ds3231 alarm1 enumeration definition

- - - - - -
Enumerator
DS3231_ALARM1_MODE_ONCE_A_SECOND 

interrupt once a second

+
Enumerator
DS3231_ALARM1_MODE_ONCE_A_SECOND 

interrupt once a second

DS3231_ALARM1_MODE_SECOND_MATCH 

interrupt second match

+
DS3231_ALARM1_MODE_SECOND_MATCH 

interrupt second match

DS3231_ALARM1_MODE_MINUTE_SECOND_MATCH 

interrupt minute second match

+
DS3231_ALARM1_MODE_MINUTE_SECOND_MATCH 

interrupt minute second match

DS3231_ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH 

interrupt hour minute second match

+
DS3231_ALARM1_MODE_HOUR_MINUTE_SECOND_MATCH 

interrupt hour minute second match

DS3231_ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH 

interrupt date hour minute second match

+
DS3231_ALARM1_MODE_DATE_HOUR_MINUTE_SECOND_MATCH 

interrupt date hour minute second match

DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH 

interrupt week hour minute second match

+
DS3231_ALARM1_MODE_WEEK_HOUR_MINUTE_SECOND_MATCH 

interrupt week hour minute second match

@@ -180,29 +179,29 @@

-

◆ ds3231_alarm2_mode_t

+ +

◆ ds3231_alarm2_mode_t

ds3231 alarm2 enumeration definition

- - - - -
Enumerator
DS3231_ALARM2_MODE_ONCE_A_MINUTE 

interrupt once a minute

+
Enumerator
DS3231_ALARM2_MODE_ONCE_A_MINUTE 

interrupt once a minute

DS3231_ALARM2_MODE_MINUTE_MATCH 

interrupt minute match

+
DS3231_ALARM2_MODE_MINUTE_MATCH 

interrupt minute match

DS3231_ALARM2_MODE_HOUR_MINUTE_MATCH 

interrupt hour minute match

+
DS3231_ALARM2_MODE_HOUR_MINUTE_MATCH 

interrupt hour minute match

DS3231_ALARM2_MODE_DATE_HOUR_MINUTE_MATCH 

interrupt data hour minute match

+
DS3231_ALARM2_MODE_DATE_HOUR_MINUTE_MATCH 

interrupt data hour minute match

DS3231_ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH 

interrupt week hour minute match

+
DS3231_ALARM2_MODE_WEEK_HOUR_MINUTE_MATCH 

interrupt week hour minute match

@@ -210,9 +209,9 @@

Function Documentation

- -

◆ ds3231_alarm_clear()

+

Function Documentation

+ +

◆ ds3231_alarm_clear()

@@ -220,19 +219,12 @@

uint8_t ds3231_alarm_clear ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_alarm_t  - alarm  - - - - ) - + ds3231_alarm_t alarm )

@@ -258,8 +250,8 @@

-

◆ ds3231_get_alarm1()

+ +

◆ ds3231_get_alarm1()

@@ -267,25 +259,17 @@

uint8_t ds3231_get_alarm1 ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_time_t *  - t, + ds3231_time_t * t, - ds3231_alarm1_mode_t *  - mode  - - - - ) - + ds3231_alarm1_mode_t * mode )

@@ -312,8 +296,8 @@

-

◆ ds3231_get_alarm2()

+ +

◆ ds3231_get_alarm2()

@@ -321,25 +305,17 @@

uint8_t ds3231_get_alarm2 ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_time_t *  - t, + ds3231_time_t * t, - ds3231_alarm2_mode_t *  - mode  - - - - ) - + ds3231_alarm2_mode_t * mode )

@@ -366,8 +342,8 @@

-

◆ ds3231_get_alarm_interrupt()

+ +

◆ ds3231_get_alarm_interrupt()

@@ -375,25 +351,17 @@

uint8_t ds3231_get_alarm_interrupt ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_alarm_t  - alarm, + ds3231_alarm_t alarm, - ds3231_bool_t *  - enable  - - - - ) - + ds3231_bool_t * enable )

@@ -420,8 +388,8 @@

-

◆ ds3231_set_alarm1()

+ +

◆ ds3231_set_alarm1()

@@ -429,25 +397,17 @@

uint8_t ds3231_set_alarm1 ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_time_t *  - t, + ds3231_time_t * t, - ds3231_alarm1_mode_t  - mode  - - - - ) - + ds3231_alarm1_mode_t mode )

@@ -474,8 +434,8 @@

-

◆ ds3231_set_alarm2()

+ +

◆ ds3231_set_alarm2()

@@ -483,25 +443,17 @@

uint8_t ds3231_set_alarm2 ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_time_t *  - t, + ds3231_time_t * t, - ds3231_alarm2_mode_t  - mode  - - - - ) - + ds3231_alarm2_mode_t mode )

@@ -528,8 +480,8 @@

-

◆ ds3231_set_alarm_interrupt()

+ +

◆ ds3231_set_alarm_interrupt()

@@ -537,25 +489,17 @@

uint8_t ds3231_set_alarm_interrupt ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_alarm_t  - alarm, + ds3231_alarm_t alarm, - ds3231_bool_t  - enable  - - - - ) - + ds3231_bool_t enable )

@@ -584,10 +528,18 @@

+ + +

+
diff --git a/doc/html/group__ds3231__alarm__driver.md5 b/doc/html/group__ds3231__alarm__driver.md5 new file mode 100644 index 0000000..d626fe2 --- /dev/null +++ b/doc/html/group__ds3231__alarm__driver.md5 @@ -0,0 +1 @@ +b87f55ad34235987e11fae2c9e193a7c \ No newline at end of file diff --git a/doc/html/group__ds3231__alarm__driver.svg b/doc/html/group__ds3231__alarm__driver.svg new file mode 100644 index 0000000..2335eeb --- /dev/null +++ b/doc/html/group__ds3231__alarm__driver.svg @@ -0,0 +1,37 @@ + + + + + + +ds3231 alarm driver function + + +Node1 + + +ds3231 alarm driver + function + + + + + +Node2 + + +ds3231 driver function + + + + + +Node2->Node1 + + + + + diff --git a/doc/html/group__ds3231__base__driver.html b/doc/html/group__ds3231__base__driver.html index afddb2c..089051a 100644 --- a/doc/html/group__ds3231__base__driver.html +++ b/doc/html/group__ds3231__base__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: ds3231 base driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +

@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
ds3231 base driver function
+
ds3231 base driver function

ds3231 base driver modules More...

+
+Collaboration diagram for ds3231 base driver function:
+
+
+
- - + - - + - - + -

+

Data Structures

struct  ds3231_time_s
struct  ds3231_time_s
 ds3231 time structure definition More...
 
struct  ds3231_handle_s
struct  ds3231_handle_s
 ds3231 handle structure definition More...
 
struct  ds3231_info_s
struct  ds3231_info_s
 ds3231 information structure definition More...
 
- - - - - - - - - - + + + + + +

+

Typedefs

typedef struct ds3231_time_s ds3231_time_t
 ds3231 time structure definition More...
 
typedef struct ds3231_handle_s ds3231_handle_t
 ds3231 handle structure definition More...
 
typedef struct ds3231_info_s ds3231_info_t
 ds3231 information structure definition More...
 
typedef struct ds3231_time_s ds3231_time_t
 ds3231 time structure definition
typedef struct ds3231_handle_s ds3231_handle_t
 ds3231 handle structure definition
typedef struct ds3231_info_s ds3231_info_t
 ds3231 information structure definition
- - - - - + - - - + - - - + - - - + - - - + - - +

+

Enumerations

enum  ds3231_bool_t { DS3231_BOOL_FALSE = 0x00 -, DS3231_BOOL_TRUE = 0x01 +
enum  ds3231_bool_t { DS3231_BOOL_FALSE = 0x00 +, DS3231_BOOL_TRUE = 0x01 }
 ds3231 bool enumeration definition More...
 
enum  ds3231_alarm_t { DS3231_ALARM_1 = 0x00 -, DS3231_ALARM_2 = 0x01 +
 ds3231 bool enumeration definition More...
enum  ds3231_alarm_t { DS3231_ALARM_1 = 0x00 +, DS3231_ALARM_2 = 0x01 }
 ds3231 alarm enumeration definition More...
 
enum  ds3231_am_pm_t { DS3231_AM = 0x00 -, DS3231_PM = 0x01 +
 ds3231 alarm enumeration definition More...
enum  ds3231_am_pm_t { DS3231_AM = 0x00 +, DS3231_PM = 0x01 }
 ds3231 am pm enumeration definition More...
 
enum  ds3231_pin_t { DS3231_PIN_SQUARE_WAVE = 0x00 -, DS3231_PIN_INTERRUPT = 0x01 +
 ds3231 am pm enumeration definition More...
enum  ds3231_pin_t { DS3231_PIN_SQUARE_WAVE = 0x00 +, DS3231_PIN_INTERRUPT = 0x01 }
 ds3231 pin enumeration definition More...
 
enum  ds3231_format_t { DS3231_FORMAT_12H = 0x01 -, DS3231_FORMAT_24H = 0x00 +
 ds3231 pin enumeration definition More...
enum  ds3231_format_t { DS3231_FORMAT_12H = 0x01 +, DS3231_FORMAT_24H = 0x00 }
 ds3231 format enumeration definition More...
 
enum  ds3231_status_t { DS3231_STATUS_ALARM_2 = (1 << 1) -, DS3231_STATUS_ALARM_1 = (1 << 0) +
 ds3231 format enumeration definition More...
enum  ds3231_status_t { DS3231_STATUS_ALARM_2 = (1 << 1) +, DS3231_STATUS_ALARM_1 = (1 << 0) }
 ds3231 alarm1 enumeration definition More...
 
 ds3231 alarm1 enumeration definition More...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_info (ds3231_info_t *info)
 get chip's information More...
 
uint8_t ds3231_init (ds3231_handle_t *handle)
 initialize the chip More...
 
uint8_t ds3231_deinit (ds3231_handle_t *handle)
 close the chip More...
 
uint8_t ds3231_irq_handler (ds3231_handle_t *handle)
 irq handler More...
 
uint8_t ds3231_set_time (ds3231_handle_t *handle, ds3231_time_t *t)
 set the current time More...
 
uint8_t ds3231_get_time (ds3231_handle_t *handle, ds3231_time_t *t)
 get the current time More...
 
uint8_t ds3231_set_oscillator (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the oscillator More...
 
uint8_t ds3231_get_oscillator (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the chip oscillator status More...
 
uint8_t ds3231_get_status (ds3231_handle_t *handle, uint8_t *status)
 get the chip status More...
 
uint8_t ds3231_info (ds3231_info_t *info)
 get chip's information
uint8_t ds3231_init (ds3231_handle_t *handle)
 initialize the chip
uint8_t ds3231_deinit (ds3231_handle_t *handle)
 close the chip
uint8_t ds3231_irq_handler (ds3231_handle_t *handle)
 irq handler
uint8_t ds3231_set_time (ds3231_handle_t *handle, ds3231_time_t *t)
 set the current time
uint8_t ds3231_get_time (ds3231_handle_t *handle, ds3231_time_t *t)
 get the current time
uint8_t ds3231_set_oscillator (ds3231_handle_t *handle, ds3231_bool_t enable)
 enable or disable the oscillator
uint8_t ds3231_get_oscillator (ds3231_handle_t *handle, ds3231_bool_t *enable)
 get the chip oscillator status
uint8_t ds3231_get_status (ds3231_handle_t *handle, uint8_t *status)
 get the chip status
-

Detailed Description

+

Detailed Description

ds3231 base driver modules

-

Typedef Documentation

- -

◆ ds3231_handle_t

+

Typedef Documentation

+ +

◆ ds3231_handle_t

@@ -203,14 +188,14 @@

-

◆ ds3231_info_t

+ +

◆ ds3231_info_t

- +
typedef struct ds3231_info_s ds3231_info_ttypedef struct ds3231_info_s ds3231_info_t
@@ -219,14 +204,14 @@

-

◆ ds3231_time_t

+ +

◆ ds3231_time_t

- +
typedef struct ds3231_time_s ds3231_time_ttypedef struct ds3231_time_s ds3231_time_t
@@ -235,24 +220,24 @@

Enumeration Type Documentation

- -

◆ ds3231_alarm_t

+

Enumeration Type Documentation

+ +

◆ ds3231_alarm_t

ds3231 alarm enumeration definition

- -
Enumerator
DS3231_ALARM_1 

alarm 1

+
Enumerator
DS3231_ALARM_1 

alarm 1

DS3231_ALARM_2 

alarm 2

+
DS3231_ALARM_2 

alarm 2

@@ -260,23 +245,23 @@

-

◆ ds3231_am_pm_t

+ +

◆ ds3231_am_pm_t

ds3231 am pm enumeration definition

- -
Enumerator
DS3231_AM 

am

+
Enumerator
DS3231_AM 

am

DS3231_PM 

pm

+
DS3231_PM 

pm

@@ -284,23 +269,23 @@

-

◆ ds3231_bool_t

+ +

◆ ds3231_bool_t

ds3231 bool enumeration definition

- -
Enumerator
DS3231_BOOL_FALSE 

disable function

+
Enumerator
DS3231_BOOL_FALSE 

disable function

DS3231_BOOL_TRUE 

enable function

+
DS3231_BOOL_TRUE 

enable function

@@ -308,23 +293,23 @@

-

◆ ds3231_format_t

+ +

◆ ds3231_format_t

ds3231 format enumeration definition

- -
Enumerator
DS3231_FORMAT_12H 

12h format

+
Enumerator
DS3231_FORMAT_12H 

12h format

DS3231_FORMAT_24H 

24h format

+
DS3231_FORMAT_24H 

24h format

@@ -332,23 +317,23 @@

-

◆ ds3231_pin_t

+ +

◆ ds3231_pin_t

- +
enum ds3231_pin_tenum ds3231_pin_t

ds3231 pin enumeration definition

- -
Enumerator
DS3231_PIN_SQUARE_WAVE 

square wave pin

+
Enumerator
DS3231_PIN_SQUARE_WAVE 

square wave pin

DS3231_PIN_INTERRUPT 

interrupt pin

+
DS3231_PIN_INTERRUPT 

interrupt pin

@@ -356,23 +341,23 @@

-

◆ ds3231_status_t

+ +

◆ ds3231_status_t

ds3231 alarm1 enumeration definition

- -
Enumerator
DS3231_STATUS_ALARM_2 

alarm 2 status

+
Enumerator
DS3231_STATUS_ALARM_2 

alarm 2 status

DS3231_STATUS_ALARM_1 

alarm 1 status

+
DS3231_STATUS_ALARM_1 

alarm 1 status

@@ -380,9 +365,9 @@

Function Documentation

- -

◆ ds3231_deinit()

+

Function Documentation

+ +

◆ ds3231_deinit()

@@ -390,8 +375,7 @@

uint8_t ds3231_deinit ( - ds3231_handle_t *  - handle) + ds3231_handle_t * handle) @@ -417,8 +401,8 @@

-

◆ ds3231_get_oscillator()

+ +

◆ ds3231_get_oscillator()

@@ -426,19 +410,12 @@

uint8_t ds3231_get_oscillator ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_bool_t *  - enable  - - - - ) - + ds3231_bool_t * enable )

@@ -464,8 +441,8 @@

-

◆ ds3231_get_status()

+ +

◆ ds3231_get_status()

@@ -473,19 +450,12 @@

uint8_t ds3231_get_status ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - uint8_t *  - status  - - - - ) - + uint8_t * status )

@@ -511,8 +481,8 @@

-

◆ ds3231_get_time()

+ +

◆ ds3231_get_time()

@@ -520,19 +490,12 @@

uint8_t ds3231_get_time ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_time_t *  - t  - - - - ) - + ds3231_time_t * t )

@@ -558,8 +521,8 @@

-

◆ ds3231_info()

+ +

◆ ds3231_info()

@@ -567,8 +530,7 @@

uint8_t ds3231_info ( - ds3231_info_t *  - info) + ds3231_info_t * info) @@ -592,8 +554,8 @@

-

◆ ds3231_init()

+ +

◆ ds3231_init()

@@ -601,8 +563,7 @@

uint8_t ds3231_init ( - ds3231_handle_t *  - handle) + ds3231_handle_t * handle) @@ -628,8 +589,8 @@

-

◆ ds3231_irq_handler()

+ +

◆ ds3231_irq_handler()

@@ -637,8 +598,7 @@

uint8_t ds3231_irq_handler ( - ds3231_handle_t *  - handle) + ds3231_handle_t * handle) @@ -664,8 +624,8 @@

-

◆ ds3231_set_oscillator()

+ +

◆ ds3231_set_oscillator()

@@ -673,19 +633,12 @@

uint8_t ds3231_set_oscillator ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_bool_t  - enable  - - - - ) - + ds3231_bool_t enable )

@@ -711,8 +664,8 @@

-

◆ ds3231_set_time()

+ +

◆ ds3231_set_time()

@@ -720,19 +673,12 @@

uint8_t ds3231_set_time ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - ds3231_time_t *  - t  - - - - ) - + ds3231_time_t * t )

@@ -761,10 +707,18 @@

+ + +

+
diff --git a/doc/html/group__ds3231__base__driver.md5 b/doc/html/group__ds3231__base__driver.md5 new file mode 100644 index 0000000..9d770eb --- /dev/null +++ b/doc/html/group__ds3231__base__driver.md5 @@ -0,0 +1 @@ +7e9ce27c356ab626a7f8c99b9fd4de37 \ No newline at end of file diff --git a/doc/html/group__ds3231__base__driver.svg b/doc/html/group__ds3231__base__driver.svg new file mode 100644 index 0000000..c9b36a5 --- /dev/null +++ b/doc/html/group__ds3231__base__driver.svg @@ -0,0 +1,37 @@ + + + + + + +ds3231 base driver function + + +Node1 + + +ds3231 base driver + function + + + + + +Node2 + + +ds3231 driver function + + + + + +Node2->Node1 + + + + + diff --git a/doc/html/group__ds3231__driver.html b/doc/html/group__ds3231__driver.html index 5b5f7f5..ae6c9a5 100644 --- a/doc/html/group__ds3231__driver.html +++ b/doc/html/group__ds3231__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: ds3231 driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +

@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
ds3231 driver function
+
ds3231 driver function

ds3231 driver modules More...

+
+Collaboration diagram for ds3231 driver function:
+
+
+
- - + + - - + - - + - - + - - + - - + - - + - - + -

-Modules

+Topics

 
 ds3231 base driver function
 ds3231 base driver function
 ds3231 base driver modules
 
 ds3231 advance driver function
 ds3231 advance driver function
 ds3231 advance driver modules
 
 ds3231 alarm driver function
 ds3231 alarm driver function
 ds3231 alarm driver modules
 
 ds3231 extern driver function
 ds3231 extern driver function
 ds3231 extern driver modules
 
 ds3231 interface driver function
 ds3231 interface driver function
 ds3231 interface driver modules
 
 ds3231 example driver function
 ds3231 example driver function
 ds3231 example driver modules
 
 ds3231 test driver function
 ds3231 test driver function
 ds3231 test driver modules
 
-

Detailed Description

+

Detailed Description

ds3231 driver modules

+ +
diff --git a/doc/html/group__ds3231__driver.md5 b/doc/html/group__ds3231__driver.md5 new file mode 100644 index 0000000..721dc5f --- /dev/null +++ b/doc/html/group__ds3231__driver.md5 @@ -0,0 +1 @@ +a8d731ad1ae00ce931f266710bba0c4d \ No newline at end of file diff --git a/doc/html/group__ds3231__driver.svg b/doc/html/group__ds3231__driver.svg new file mode 100644 index 0000000..41c76dc --- /dev/null +++ b/doc/html/group__ds3231__driver.svg @@ -0,0 +1,149 @@ + + + + + + +ds3231 driver function + + +Node4 + + +ds3231 advance driver + function + + + + + +Node5 + + +ds3231 alarm driver + function + + + + + +Node3 + + +ds3231 base driver + function + + + + + +Node1 + + +ds3231 driver function + + + + + +Node1->Node4 + + + + + +Node1->Node5 + + + + + +Node1->Node3 + + + + + +Node8 + + +ds3231 example driver + function + + + + + +Node1->Node8 + + + + + +Node6 + + +ds3231 extern driver + function + + + + + +Node1->Node6 + + + + + +Node7 + + +ds3231 interface driver + function + + + + + +Node1->Node7 + + + + + +Node2 + + +ds3231 link driver + function + + + + + +Node1->Node2 + + + + + +Node9 + + +ds3231 test driver + function + + + + + +Node1->Node9 + + + + + diff --git a/doc/html/group__ds3231__example__driver.html b/doc/html/group__ds3231__example__driver.html index 5dd13c4..3d76d4f 100644 --- a/doc/html/group__ds3231__example__driver.html +++ b/doc/html/group__ds3231__example__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: ds3231 example driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
ds3231 example driver function
+
ds3231 example driver function

ds3231 example driver modules More...

+
+Collaboration diagram for ds3231 example driver function:
+
+
+
- - - - - - - - - - + + + + + +

+

Macros

#define DS3231_ALARM_DEFAULT_AGING_OFFSET   0
 ds3231 alarm example default definition More...
 
#define DS3231_BASIC_DEFAULT_AGING_OFFSET   0
 ds3231 basic example default definition More...
 
#define DS3231_OUTPUT_DEFAULT_AGING_OFFSET   0
 ds3231 output example default definition More...
 
#define DS3231_ALARM_DEFAULT_AGING_OFFSET   0
 ds3231 alarm example default definition
#define DS3231_BASIC_DEFAULT_AGING_OFFSET   0
 ds3231 basic example default definition
#define DS3231_OUTPUT_DEFAULT_AGING_OFFSET   0
 ds3231 output example default definition
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_alarm_irq_handler (void)
 alarm irq handler More...
 
uint8_t ds3231_alarm_init (void(*alarm_receive_callback)(uint8_t type))
 alarm example init More...
 
uint8_t ds3231_alarm_deinit (void)
 alarm example deinit More...
 
uint8_t ds3231_alarm_set_alarm1 (ds3231_time_t *t, ds3231_alarm1_mode_t mode)
 alarm example set the alarm 1 More...
 
uint8_t ds3231_alarm_get_alarm1 (ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
 alarm example get the alarm 1 More...
 
uint8_t ds3231_alarm_set_alarm2 (ds3231_time_t *t, ds3231_alarm2_mode_t mode)
 alarm example set the alarm 2 More...
 
uint8_t ds3231_alarm_get_alarm2 (ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
 alarm example get the alarm 2 More...
 
uint8_t ds3231_alarm_clear_flag (ds3231_alarm_t alarm)
 alarm clear the interrupt flag More...
 
uint8_t ds3231_alarm_enable (ds3231_alarm_t alarm)
 enable the alarm More...
 
uint8_t ds3231_alarm_disable (ds3231_alarm_t alarm)
 disable the alarm More...
 
uint8_t ds3231_alarm_set_time (ds3231_time_t *t)
 alarm example set the time More...
 
uint8_t ds3231_alarm_get_time (ds3231_time_t *t)
 alarm example get the time More...
 
uint8_t ds3231_alarm_set_timestamp (time_t timestamp)
 alarm example set the time by a unix timestamp More...
 
uint8_t ds3231_alarm_get_timestamp (time_t *timestamp)
 alarm example get the time in a unix timestamp More...
 
uint8_t ds3231_alarm_set_timestamp_time_zone (int8_t zone)
 alarm example set the local time zone More...
 
uint8_t ds3231_alarm_get_timestamp_time_zone (int8_t *zone)
 alarm example get the local time zone More...
 
uint8_t ds3231_alarm_get_temperature (int16_t *raw, float *s)
 alarm example get the current temperature More...
 
uint8_t ds3231_alarm_alarm_ascii_time (char *buf, uint8_t len)
 alarm example get the ascii time More...
 
uint8_t ds3231_basic_init (void)
 basic example init More...
 
uint8_t ds3231_basic_deinit (void)
 basic example deinit More...
 
uint8_t ds3231_basic_set_time (ds3231_time_t *t)
 basic example set the time More...
 
uint8_t ds3231_basic_get_time (ds3231_time_t *t)
 basic example get the time More...
 
uint8_t ds3231_basic_set_timestamp (time_t timestamp)
 basic example set the time by a unix timestamp More...
 
uint8_t ds3231_basic_get_timestamp (time_t *timestamp)
 basic example get the time in a unix timestamp More...
 
uint8_t ds3231_basic_set_timestamp_time_zone (int8_t zone)
 basic example set the local time zone More...
 
uint8_t ds3231_basic_get_timestamp_time_zone (int8_t *zone)
 basic example get the local time zone More...
 
uint8_t ds3231_basic_get_temperature (int16_t *raw, float *s)
 basic example get the current temperature More...
 
uint8_t ds3231_basic_get_ascii_time (char *buf, uint8_t len)
 basic example get the ascii time More...
 
uint8_t ds3231_output_init (void)
 output example init More...
 
uint8_t ds3231_output_deinit (void)
 output example deinit More...
 
uint8_t ds3231_output_set_time (ds3231_time_t *t)
 output example set the time More...
 
uint8_t ds3231_output_get_time (ds3231_time_t *t)
 output example get the time More...
 
uint8_t ds3231_output_set_timestamp (time_t timestamp)
 output example set the time by a unix timestamp More...
 
uint8_t ds3231_output_set_timestamp_time_zone (int8_t zone)
 output example set the local time zone More...
 
uint8_t ds3231_output_get_timestamp (time_t *timestamp)
 output example get the time in a unix timestamp More...
 
uint8_t ds3231_output_get_timestamp_time_zone (int8_t *zone)
 output example get the local time zone More...
 
uint8_t ds3231_output_get_temperature (int16_t *raw, float *s)
 output example get the current temperature More...
 
uint8_t ds3231_output_get_ascii_time (char *buf, uint8_t len)
 output example get the ascii time More...
 
uint8_t ds3231_output_set_square_wave (ds3231_bool_t enable)
 output example enable or disable the square wave More...
 
uint8_t ds3231_output_get_square_wave (ds3231_bool_t *enable)
 output example get the square wave status More...
 
uint8_t ds3231_output_set_32khz_output (ds3231_bool_t enable)
 output example enable or disable the 32KHz output More...
 
uint8_t ds3231_output_get_32khz_output (ds3231_bool_t *enable)
 output example get the 32KHz output status More...
 
uint8_t ds3231_alarm_irq_handler (void)
 alarm irq handler
uint8_t ds3231_alarm_init (void(*alarm_receive_callback)(uint8_t type))
 alarm example init
uint8_t ds3231_alarm_deinit (void)
 alarm example deinit
uint8_t ds3231_alarm_set_alarm1 (ds3231_time_t *t, ds3231_alarm1_mode_t mode)
 alarm example set the alarm 1
uint8_t ds3231_alarm_get_alarm1 (ds3231_time_t *t, ds3231_alarm1_mode_t *mode)
 alarm example get the alarm 1
uint8_t ds3231_alarm_set_alarm2 (ds3231_time_t *t, ds3231_alarm2_mode_t mode)
 alarm example set the alarm 2
uint8_t ds3231_alarm_get_alarm2 (ds3231_time_t *t, ds3231_alarm2_mode_t *mode)
 alarm example get the alarm 2
uint8_t ds3231_alarm_clear_flag (ds3231_alarm_t alarm)
 alarm clear the interrupt flag
uint8_t ds3231_alarm_enable (ds3231_alarm_t alarm)
 enable the alarm
uint8_t ds3231_alarm_disable (ds3231_alarm_t alarm)
 disable the alarm
uint8_t ds3231_alarm_set_time (ds3231_time_t *t)
 alarm example set the time
uint8_t ds3231_alarm_get_time (ds3231_time_t *t)
 alarm example get the time
uint8_t ds3231_alarm_set_timestamp (time_t timestamp)
 alarm example set the time by a unix timestamp
uint8_t ds3231_alarm_get_timestamp (time_t *timestamp)
 alarm example get the time in a unix timestamp
uint8_t ds3231_alarm_set_timestamp_time_zone (int8_t zone)
 alarm example set the local time zone
uint8_t ds3231_alarm_get_timestamp_time_zone (int8_t *zone)
 alarm example get the local time zone
uint8_t ds3231_alarm_get_temperature (int16_t *raw, float *s)
 alarm example get the current temperature
uint8_t ds3231_alarm_alarm_ascii_time (char *buf, uint8_t len)
 alarm example get the ascii time
uint8_t ds3231_basic_init (void)
 basic example init
uint8_t ds3231_basic_deinit (void)
 basic example deinit
uint8_t ds3231_basic_set_time (ds3231_time_t *t)
 basic example set the time
uint8_t ds3231_basic_get_time (ds3231_time_t *t)
 basic example get the time
uint8_t ds3231_basic_set_timestamp (time_t timestamp)
 basic example set the time by a unix timestamp
uint8_t ds3231_basic_get_timestamp (time_t *timestamp)
 basic example get the time in a unix timestamp
uint8_t ds3231_basic_set_timestamp_time_zone (int8_t zone)
 basic example set the local time zone
uint8_t ds3231_basic_get_timestamp_time_zone (int8_t *zone)
 basic example get the local time zone
uint8_t ds3231_basic_get_temperature (int16_t *raw, float *s)
 basic example get the current temperature
uint8_t ds3231_basic_get_ascii_time (char *buf, uint8_t len)
 basic example get the ascii time
uint8_t ds3231_output_init (void)
 output example init
uint8_t ds3231_output_deinit (void)
 output example deinit
uint8_t ds3231_output_set_time (ds3231_time_t *t)
 output example set the time
uint8_t ds3231_output_get_time (ds3231_time_t *t)
 output example get the time
uint8_t ds3231_output_set_timestamp (time_t timestamp)
 output example set the time by a unix timestamp
uint8_t ds3231_output_set_timestamp_time_zone (int8_t zone)
 output example set the local time zone
uint8_t ds3231_output_get_timestamp (time_t *timestamp)
 output example get the time in a unix timestamp
uint8_t ds3231_output_get_timestamp_time_zone (int8_t *zone)
 output example get the local time zone
uint8_t ds3231_output_get_temperature (int16_t *raw, float *s)
 output example get the current temperature
uint8_t ds3231_output_get_ascii_time (char *buf, uint8_t len)
 output example get the ascii time
uint8_t ds3231_output_set_square_wave (ds3231_bool_t enable)
 output example enable or disable the square wave
uint8_t ds3231_output_get_square_wave (ds3231_bool_t *enable)
 output example get the square wave status
uint8_t ds3231_output_set_32khz_output (ds3231_bool_t enable)
 output example enable or disable the 32KHz output
uint8_t ds3231_output_get_32khz_output (ds3231_bool_t *enable)
 output example get the 32KHz output status
-

Detailed Description

+

Detailed Description

ds3231 example driver modules

-

Macro Definition Documentation

- -

◆ DS3231_ALARM_DEFAULT_AGING_OFFSET

+

Macro Definition Documentation

+ +

◆ DS3231_ALARM_DEFAULT_AGING_OFFSET

@@ -258,8 +221,8 @@

-

◆ DS3231_BASIC_DEFAULT_AGING_OFFSET

+ +

◆ DS3231_BASIC_DEFAULT_AGING_OFFSET

@@ -277,8 +240,8 @@

-

◆ DS3231_OUTPUT_DEFAULT_AGING_OFFSET

+ +

◆ DS3231_OUTPUT_DEFAULT_AGING_OFFSET

@@ -296,9 +259,9 @@

Function Documentation

- -

◆ ds3231_alarm_alarm_ascii_time()

+

Function Documentation

+ +

◆ ds3231_alarm_alarm_ascii_time()

@@ -339,11 +295,16 @@

Note
none

Definition at line 518 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_clear_flag()

+ +

◆ ds3231_alarm_clear_flag()

@@ -351,8 +312,7 @@

uint8_t ds3231_alarm_clear_flag ( - ds3231_alarm_t  - alarm) + ds3231_alarm_t alarm) @@ -373,11 +333,16 @@

Note
none

Definition at line 273 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_deinit()

+ +

◆ ds3231_alarm_deinit()

@@ -385,8 +350,7 @@

uint8_t ds3231_alarm_deinit ( - void  - ) + void ) @@ -401,11 +365,16 @@

Note
none

Definition at line 165 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_disable()

+ +

◆ ds3231_alarm_disable()

@@ -413,8 +382,7 @@

uint8_t ds3231_alarm_disable ( - ds3231_alarm_t  - alarm) + ds3231_alarm_t alarm) @@ -435,11 +403,16 @@

Note
none

Definition at line 321 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_enable()

+ +

◆ ds3231_alarm_enable()

@@ -447,8 +420,7 @@

uint8_t ds3231_alarm_enable ( - ds3231_alarm_t  - alarm) + ds3231_alarm_t alarm) @@ -469,11 +441,16 @@

Note
none

Definition at line 294 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_get_alarm1()

+ +

◆ ds3231_alarm_get_alarm1()

@@ -481,19 +458,12 @@

uint8_t ds3231_alarm_get_alarm1 ( - ds3231_time_t *  - t, + ds3231_time_t * t, - ds3231_alarm1_mode_t *  - mode  - - - - ) - + ds3231_alarm1_mode_t * mode )

@@ -514,11 +484,16 @@

Note
none

Definition at line 208 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_get_alarm2()

+ +

◆ ds3231_alarm_get_alarm2()

@@ -526,19 +501,12 @@

uint8_t ds3231_alarm_get_alarm2 ( - ds3231_time_t *  - t, + ds3231_time_t * t, - ds3231_alarm2_mode_t *  - mode  - - - - ) - + ds3231_alarm2_mode_t * mode )

@@ -559,11 +527,16 @@

Note
none

Definition at line 252 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_get_temperature()

+ +

◆ ds3231_alarm_get_temperature()

@@ -604,11 +570,16 @@

Note
none

Definition at line 496 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_get_time()

+ +

◆ ds3231_alarm_get_time()

@@ -616,8 +587,7 @@

uint8_t ds3231_alarm_get_time ( - ds3231_time_t *  - t) + ds3231_time_t * t) @@ -638,11 +608,16 @@

Note
none

Definition at line 421 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_get_timestamp()

+ +

◆ ds3231_alarm_get_timestamp()

@@ -650,8 +625,7 @@

uint8_t ds3231_alarm_get_timestamp ( - time_t *  - timestamp) + time_t * timestamp) @@ -672,11 +646,16 @@

Note
none

Definition at line 442 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_get_timestamp_time_zone()

+ +

◆ ds3231_alarm_get_timestamp_time_zone()

@@ -684,8 +663,7 @@

uint8_t ds3231_alarm_get_timestamp_time_zone ( - int8_t *  - zone) + int8_t * zone) @@ -708,8 +686,8 @@

-

◆ ds3231_alarm_init()

+ +

◆ ds3231_alarm_init()

@@ -717,8 +695,7 @@

uint8_t ds3231_alarm_init ( - void(*)(uint8_t type)  - alarm_receive_callback) + void(* alarm_receive_callback )(uint8_t type)) @@ -739,11 +716,16 @@

Note
none

Definition at line 71 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_irq_handler()

+ +

◆ ds3231_alarm_irq_handler()

@@ -751,8 +733,7 @@

uint8_t ds3231_alarm_irq_handler ( - void  - ) + void ) @@ -767,11 +748,16 @@

Note
none

Definition at line 50 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_set_alarm1()

+ +

◆ ds3231_alarm_set_alarm1()

@@ -779,19 +765,12 @@

uint8_t ds3231_alarm_set_alarm1 ( - ds3231_time_t *  - t, + ds3231_time_t * t, - ds3231_alarm1_mode_t  - mode  - - - - ) - + ds3231_alarm1_mode_t mode )

@@ -812,11 +791,16 @@

Note
none

Definition at line 186 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_set_alarm2()

+ +

◆ ds3231_alarm_set_alarm2()

@@ -824,19 +808,12 @@

uint8_t ds3231_alarm_set_alarm2 ( - ds3231_time_t *  - t, + ds3231_time_t * t, - ds3231_alarm2_mode_t  - mode  - - - - ) - + ds3231_alarm2_mode_t mode )

@@ -857,11 +834,16 @@

Note
none

Definition at line 230 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_set_time()

+ +

◆ ds3231_alarm_set_time()

@@ -869,8 +851,7 @@

uint8_t ds3231_alarm_set_time ( - ds3231_time_t *  - t) + ds3231_time_t * t) @@ -891,11 +872,16 @@

Note
none

Definition at line 342 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_set_timestamp()

+ +

◆ ds3231_alarm_set_timestamp()

@@ -903,8 +889,7 @@

uint8_t ds3231_alarm_set_timestamp ( - time_t  - timestamp) + time_t timestamp) @@ -925,11 +910,16 @@

Note
none

Definition at line 363 of file driver_ds3231_alarm.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_alarm_set_timestamp_time_zone()

+ +

◆ ds3231_alarm_set_timestamp_time_zone()

@@ -937,8 +927,7 @@

uint8_t ds3231_alarm_set_timestamp_time_zone ( - int8_t  - zone) + int8_t zone) @@ -961,8 +950,8 @@

-

◆ ds3231_basic_deinit()

+ +

◆ ds3231_basic_deinit()

@@ -970,8 +959,7 @@

uint8_t ds3231_basic_deinit ( - void  - ) + void ) @@ -986,11 +974,16 @@

Note
none

Definition at line 164 of file driver_ds3231_basic.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_basic_get_ascii_time()

+ +

◆ ds3231_basic_get_ascii_time()

@@ -1031,11 +1017,16 @@

Note
none

Definition at line 360 of file driver_ds3231_basic.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_basic_get_temperature()

+ +

◆ ds3231_basic_get_temperature()

@@ -1076,11 +1060,16 @@

Note
none

Definition at line 338 of file driver_ds3231_basic.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_basic_get_time()

+ +

◆ ds3231_basic_get_time()

@@ -1088,8 +1077,7 @@

uint8_t ds3231_basic_get_time ( - ds3231_time_t *  - t) + ds3231_time_t * t) @@ -1110,11 +1098,16 @@

Note
none

Definition at line 263 of file driver_ds3231_basic.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_basic_get_timestamp()

+ +

◆ ds3231_basic_get_timestamp()

@@ -1122,8 +1115,7 @@

uint8_t ds3231_basic_get_timestamp ( - time_t *  - timestamp) + time_t * timestamp) @@ -1144,11 +1136,16 @@

Note
none

Definition at line 284 of file driver_ds3231_basic.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_basic_get_timestamp_time_zone()

+ +

◆ ds3231_basic_get_timestamp_time_zone()

@@ -1156,8 +1153,7 @@

uint8_t ds3231_basic_get_timestamp_time_zone ( - int8_t *  - zone) + int8_t * zone) @@ -1180,8 +1176,8 @@

-

◆ ds3231_basic_init()

+ +

◆ ds3231_basic_init()

@@ -1189,8 +1185,7 @@

uint8_t ds3231_basic_init ( - void  - ) + void ) @@ -1205,11 +1200,16 @@

Note
none

Definition at line 50 of file driver_ds3231_basic.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_basic_set_time()

+ +

◆ ds3231_basic_set_time()

@@ -1217,8 +1217,7 @@

uint8_t ds3231_basic_set_time ( - ds3231_time_t *  - t) + ds3231_time_t * t) @@ -1239,11 +1238,16 @@

Note
none

Definition at line 184 of file driver_ds3231_basic.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_basic_set_timestamp()

+ +

◆ ds3231_basic_set_timestamp()

@@ -1251,8 +1255,7 @@

uint8_t ds3231_basic_set_timestamp ( - time_t  - timestamp) + time_t timestamp) @@ -1273,11 +1276,16 @@

Note
none

Definition at line 205 of file driver_ds3231_basic.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_basic_set_timestamp_time_zone()

+ +

◆ ds3231_basic_set_timestamp_time_zone()

@@ -1285,8 +1293,7 @@

uint8_t ds3231_basic_set_timestamp_time_zone ( - int8_t  - zone) + int8_t zone) @@ -1309,8 +1316,8 @@

-

◆ ds3231_output_deinit()

+ +

◆ ds3231_output_deinit()

@@ -1318,8 +1325,7 @@

uint8_t ds3231_output_deinit ( - void  - ) + void ) @@ -1334,11 +1340,16 @@

Note
none

Definition at line 144 of file driver_ds3231_output.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_output_get_32khz_output()

+ +

◆ ds3231_output_get_32khz_output()

@@ -1346,8 +1357,7 @@

uint8_t ds3231_output_get_32khz_output ( - ds3231_bool_t *  - enable) + ds3231_bool_t * enable) @@ -1368,11 +1378,16 @@

Note
none

Definition at line 435 of file driver_ds3231_output.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_output_get_ascii_time()

+ +

◆ ds3231_output_get_ascii_time()

@@ -1413,11 +1421,16 @@

Note
none

Definition at line 340 of file driver_ds3231_output.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_output_get_square_wave()

+ +

◆ ds3231_output_get_square_wave()

@@ -1425,8 +1438,7 @@

uint8_t ds3231_output_get_square_wave ( - ds3231_bool_t *  - enable) + ds3231_bool_t * enable) @@ -1447,11 +1459,16 @@

Note
none

Definition at line 393 of file driver_ds3231_output.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_output_get_temperature()

+ +

◆ ds3231_output_get_temperature()

@@ -1492,11 +1502,16 @@

Note
none

Definition at line 318 of file driver_ds3231_output.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_output_get_time()

+ +

◆ ds3231_output_get_time()

@@ -1504,8 +1519,7 @@

uint8_t ds3231_output_get_time ( - ds3231_time_t *  - t) + ds3231_time_t * t) @@ -1526,11 +1540,16 @@

Note
none

Definition at line 243 of file driver_ds3231_output.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_output_get_timestamp()

+ +

◆ ds3231_output_get_timestamp()

@@ -1538,8 +1557,7 @@

uint8_t ds3231_output_get_timestamp ( - time_t *  - timestamp) + time_t * timestamp) @@ -1560,11 +1578,16 @@

Note
none

Definition at line 264 of file driver_ds3231_output.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_output_get_timestamp_time_zone()

+ +

◆ ds3231_output_get_timestamp_time_zone()

@@ -1572,8 +1595,7 @@

uint8_t ds3231_output_get_timestamp_time_zone ( - int8_t *  - zone) + int8_t * zone) @@ -1596,8 +1618,8 @@

-

◆ ds3231_output_init()

+ +

◆ ds3231_output_init()

@@ -1605,8 +1627,7 @@

uint8_t ds3231_output_init ( - void  - ) + void ) @@ -1621,11 +1642,16 @@

Note
none

Definition at line 50 of file driver_ds3231_output.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_output_set_32khz_output()

+ +

◆ ds3231_output_set_32khz_output()

@@ -1633,8 +1659,7 @@

uint8_t ds3231_output_set_32khz_output ( - ds3231_bool_t  - enable) + ds3231_bool_t enable) @@ -1655,11 +1680,16 @@

Note
none

Definition at line 414 of file driver_ds3231_output.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_output_set_square_wave()

+ +

◆ ds3231_output_set_square_wave()

@@ -1667,8 +1697,7 @@

uint8_t ds3231_output_set_square_wave ( - ds3231_bool_t  - enable) + ds3231_bool_t enable) @@ -1689,11 +1718,16 @@

Note
none

Definition at line 372 of file driver_ds3231_output.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_output_set_time()

+ +

◆ ds3231_output_set_time()

@@ -1701,8 +1735,7 @@

uint8_t ds3231_output_set_time ( - ds3231_time_t *  - t) + ds3231_time_t * t) @@ -1723,11 +1756,16 @@

Note
none

Definition at line 164 of file driver_ds3231_output.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_output_set_timestamp()

+ +

◆ ds3231_output_set_timestamp()

@@ -1735,8 +1773,7 @@

uint8_t ds3231_output_set_timestamp ( - time_t  - timestamp) + time_t timestamp) @@ -1757,11 +1794,16 @@

Note
none

Definition at line 185 of file driver_ds3231_output.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_output_set_timestamp_time_zone()

+ +

◆ ds3231_output_set_timestamp_time_zone()

diff --git a/doc/html/group__ds3231__example__driver.md5 b/doc/html/group__ds3231__example__driver.md5 new file mode 100644 index 0000000..51f44d5 --- /dev/null +++ b/doc/html/group__ds3231__example__driver.md5 @@ -0,0 +1 @@ +7f5be0eff7b8c6112a80a611c209f293 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver.svg b/doc/html/group__ds3231__example__driver.svg new file mode 100644 index 0000000..bc5ee97 --- /dev/null +++ b/doc/html/group__ds3231__example__driver.svg @@ -0,0 +1,37 @@ + + + + + + +ds3231 example driver function + + +Node2 + + +ds3231 driver function + + + + + +Node1 + + +ds3231 example driver + function + + + + + +Node2->Node1 + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga0bdcfafb16b18ddf0012ce7a28ffb727_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga0bdcfafb16b18ddf0012ce7a28ffb727_cgraph.md5 new file mode 100644 index 0000000..a8f348c --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga0bdcfafb16b18ddf0012ce7a28ffb727_cgraph.md5 @@ -0,0 +1 @@ +a264f2d128ebc5361c7283a8586c1903 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga0bdcfafb16b18ddf0012ce7a28ffb727_cgraph.svg b/doc/html/group__ds3231__example__driver_ga0bdcfafb16b18ddf0012ce7a28ffb727_cgraph.svg new file mode 100644 index 0000000..98aa96b --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga0bdcfafb16b18ddf0012ce7a28ffb727_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_basic_get_temperature + + +Node1 + + +ds3231_basic_get_temperature + + + + + +Node2 + + +ds3231_get_temperature + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga0ecd4fe3543ebe0e9ace29ea2686f957_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga0ecd4fe3543ebe0e9ace29ea2686f957_cgraph.md5 new file mode 100644 index 0000000..52e014a --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga0ecd4fe3543ebe0e9ace29ea2686f957_cgraph.md5 @@ -0,0 +1 @@ +a1e718445c8a28edbdefdfca4e8cd3e0 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga0ecd4fe3543ebe0e9ace29ea2686f957_cgraph.svg b/doc/html/group__ds3231__example__driver_ga0ecd4fe3543ebe0e9ace29ea2686f957_cgraph.svg new file mode 100644 index 0000000..db2fcdf --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga0ecd4fe3543ebe0e9ace29ea2686f957_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_alarm_get_time + + +Node1 + + +ds3231_alarm_get_time + + + + + +Node2 + + +ds3231_get_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga0fb97fdd3dcddc597fe7099578b07096_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga0fb97fdd3dcddc597fe7099578b07096_cgraph.md5 new file mode 100644 index 0000000..da1402c --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga0fb97fdd3dcddc597fe7099578b07096_cgraph.md5 @@ -0,0 +1 @@ +0c18aff17e57619ecc45d1ecfe973881 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga0fb97fdd3dcddc597fe7099578b07096_cgraph.svg b/doc/html/group__ds3231__example__driver_ga0fb97fdd3dcddc597fe7099578b07096_cgraph.svg new file mode 100644 index 0000000..47dca99 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga0fb97fdd3dcddc597fe7099578b07096_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_basic_set_time + + +Node1 + + +ds3231_basic_set_time + + + + + +Node2 + + +ds3231_set_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga10c7793c331e4455088d08188062970f_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga10c7793c331e4455088d08188062970f_cgraph.md5 new file mode 100644 index 0000000..11850a3 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga10c7793c331e4455088d08188062970f_cgraph.md5 @@ -0,0 +1 @@ +e6b0074e8692a4c700194e37e05bb309 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga10c7793c331e4455088d08188062970f_cgraph.svg b/doc/html/group__ds3231__example__driver_ga10c7793c331e4455088d08188062970f_cgraph.svg new file mode 100644 index 0000000..10f9a2b --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga10c7793c331e4455088d08188062970f_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_output_set_timestamp + + +Node1 + + +ds3231_output_set_timestamp + + + + + +Node2 + + +ds3231_set_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga10c8edd6569e9e41a806d3f8a6ced0da_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga10c8edd6569e9e41a806d3f8a6ced0da_cgraph.md5 new file mode 100644 index 0000000..b0e189a --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga10c8edd6569e9e41a806d3f8a6ced0da_cgraph.md5 @@ -0,0 +1 @@ +210c53f549cb6411a7ee992559f9c72e \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga10c8edd6569e9e41a806d3f8a6ced0da_cgraph.svg b/doc/html/group__ds3231__example__driver_ga10c8edd6569e9e41a806d3f8a6ced0da_cgraph.svg new file mode 100644 index 0000000..1f624a7 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga10c8edd6569e9e41a806d3f8a6ced0da_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_alarm_set_alarm2 + + +Node1 + + +ds3231_alarm_set_alarm2 + + + + + +Node2 + + +ds3231_set_alarm2 + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga198db64c8e40ada337016dd37eeaee63_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga198db64c8e40ada337016dd37eeaee63_cgraph.md5 new file mode 100644 index 0000000..a7257cd --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga198db64c8e40ada337016dd37eeaee63_cgraph.md5 @@ -0,0 +1 @@ +14c53732f7d0729c9e3d53ca83c81a61 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga198db64c8e40ada337016dd37eeaee63_cgraph.svg b/doc/html/group__ds3231__example__driver_ga198db64c8e40ada337016dd37eeaee63_cgraph.svg new file mode 100644 index 0000000..c5fadb6 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga198db64c8e40ada337016dd37eeaee63_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_alarm_set_alarm1 + + +Node1 + + +ds3231_alarm_set_alarm1 + + + + + +Node2 + + +ds3231_set_alarm1 + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga1a2130de771392abca4e1a9dc2fa61cc_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga1a2130de771392abca4e1a9dc2fa61cc_cgraph.md5 new file mode 100644 index 0000000..4367220 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga1a2130de771392abca4e1a9dc2fa61cc_cgraph.md5 @@ -0,0 +1 @@ +e33bbe7de5680eae4f63b417ca007e24 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga1a2130de771392abca4e1a9dc2fa61cc_cgraph.svg b/doc/html/group__ds3231__example__driver_ga1a2130de771392abca4e1a9dc2fa61cc_cgraph.svg new file mode 100644 index 0000000..3c6f789 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga1a2130de771392abca4e1a9dc2fa61cc_cgraph.svg @@ -0,0 +1,57 @@ + + + + + + +ds3231_alarm_enable + + +Node1 + + +ds3231_alarm_enable + + + + + +Node2 + + +ds3231_alarm_clear + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ds3231_set_alarm_interrupt + + + + + +Node1->Node3 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga1c8bf706c83da1be166ef8cb2e441b19_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga1c8bf706c83da1be166ef8cb2e441b19_cgraph.md5 new file mode 100644 index 0000000..27e6de6 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga1c8bf706c83da1be166ef8cb2e441b19_cgraph.md5 @@ -0,0 +1 @@ +ded9d31c406c6d3801540e30bd192add \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga1c8bf706c83da1be166ef8cb2e441b19_cgraph.svg b/doc/html/group__ds3231__example__driver_ga1c8bf706c83da1be166ef8cb2e441b19_cgraph.svg new file mode 100644 index 0000000..7460a63 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga1c8bf706c83da1be166ef8cb2e441b19_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_alarm_set_timestamp + + +Node1 + + +ds3231_alarm_set_timestamp + + + + + +Node2 + + +ds3231_set_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga1ccc3862a65d8b7ed3b4f2a1602ceda3_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga1ccc3862a65d8b7ed3b4f2a1602ceda3_cgraph.md5 new file mode 100644 index 0000000..72e8725 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga1ccc3862a65d8b7ed3b4f2a1602ceda3_cgraph.md5 @@ -0,0 +1 @@ +93a93566425965e56f9db92934260a53 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga1ccc3862a65d8b7ed3b4f2a1602ceda3_cgraph.svg b/doc/html/group__ds3231__example__driver_ga1ccc3862a65d8b7ed3b4f2a1602ceda3_cgraph.svg new file mode 100644 index 0000000..dec9097 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga1ccc3862a65d8b7ed3b4f2a1602ceda3_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_alarm_get_temperature + + +Node1 + + +ds3231_alarm_get_temperature + + + + + +Node2 + + +ds3231_get_temperature + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga28af0cf30c18eaca95191c71b69eed9a_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga28af0cf30c18eaca95191c71b69eed9a_cgraph.md5 new file mode 100644 index 0000000..925f99d --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga28af0cf30c18eaca95191c71b69eed9a_cgraph.md5 @@ -0,0 +1 @@ +c9b11fc97ec8bae60d1b5a32b634765c \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga28af0cf30c18eaca95191c71b69eed9a_cgraph.svg b/doc/html/group__ds3231__example__driver_ga28af0cf30c18eaca95191c71b69eed9a_cgraph.svg new file mode 100644 index 0000000..327eaf5 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga28af0cf30c18eaca95191c71b69eed9a_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_output_set_square_wave + + +Node1 + + +ds3231_output_set_square_wave + + + + + +Node2 + + +ds3231_set_square_wave + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga2b1daa32b3dddecc530247cba289f31c_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga2b1daa32b3dddecc530247cba289f31c_cgraph.md5 new file mode 100644 index 0000000..3fc5632 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga2b1daa32b3dddecc530247cba289f31c_cgraph.md5 @@ -0,0 +1 @@ +93679015bfd7e1b1b2746540363c8afc \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga2b1daa32b3dddecc530247cba289f31c_cgraph.svg b/doc/html/group__ds3231__example__driver_ga2b1daa32b3dddecc530247cba289f31c_cgraph.svg new file mode 100644 index 0000000..81ae5e3 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga2b1daa32b3dddecc530247cba289f31c_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_basic_set_timestamp + + +Node1 + + +ds3231_basic_set_timestamp + + + + + +Node2 + + +ds3231_set_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga2d3274a762b580f5b4a992bca2b7dad7_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga2d3274a762b580f5b4a992bca2b7dad7_cgraph.md5 new file mode 100644 index 0000000..53c3f7c --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga2d3274a762b580f5b4a992bca2b7dad7_cgraph.md5 @@ -0,0 +1 @@ +bfbaa2ebc21298253294c6742d7e4cd9 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga2d3274a762b580f5b4a992bca2b7dad7_cgraph.svg b/doc/html/group__ds3231__example__driver_ga2d3274a762b580f5b4a992bca2b7dad7_cgraph.svg new file mode 100644 index 0000000..804e75c --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga2d3274a762b580f5b4a992bca2b7dad7_cgraph.svg @@ -0,0 +1,277 @@ + + + + + + +ds3231_alarm_init + + +Node1 + + +ds3231_alarm_init + + + + + +Node2 + + +ds3231_aging_offset +_convert_to_register + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ds3231_deinit + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +ds3231_init + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +ds3231_interface_debug +_print + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +ds3231_interface_delay_ms + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +ds3231_interface_iic +_deinit + + + + + +Node1->Node7 + + + + + + + + +Node8 + + +ds3231_interface_iic_init + + + + + +Node1->Node8 + + + + + + + + +Node9 + + +ds3231_interface_iic_read + + + + + +Node1->Node9 + + + + + + + + +Node10 + + +ds3231_interface_iic +_write + + + + + +Node1->Node10 + + + + + + + + +Node11 + + +ds3231_set_32khz_output + + + + + +Node1->Node11 + + + + + + + + +Node12 + + +ds3231_set_aging_offset + + + + + +Node1->Node12 + + + + + + + + +Node13 + + +ds3231_set_oscillator + + + + + +Node1->Node13 + + + + + + + + +Node14 + + +ds3231_set_pin + + + + + +Node1->Node14 + + + + + + + + +Node15 + + +ds3231_set_square_wave + + + + + +Node1->Node15 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga3f65254fd8744113ba0c30ab0717b7fd_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga3f65254fd8744113ba0c30ab0717b7fd_cgraph.md5 new file mode 100644 index 0000000..2313c01 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga3f65254fd8744113ba0c30ab0717b7fd_cgraph.md5 @@ -0,0 +1 @@ +d87bebfbea0cda400109746d5bbd0b6d \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga3f65254fd8744113ba0c30ab0717b7fd_cgraph.svg b/doc/html/group__ds3231__example__driver_ga3f65254fd8744113ba0c30ab0717b7fd_cgraph.svg new file mode 100644 index 0000000..f95412e --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga3f65254fd8744113ba0c30ab0717b7fd_cgraph.svg @@ -0,0 +1,40 @@ + + + + + + +ds3231_output_set_32khz_output + + +Node1 + + +ds3231_output_set_32khz +_output + + + + + +Node2 + + +ds3231_set_32khz_output + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga41897575ca7f69921c55559f5d8027dc_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga41897575ca7f69921c55559f5d8027dc_cgraph.md5 new file mode 100644 index 0000000..3b239f1 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga41897575ca7f69921c55559f5d8027dc_cgraph.md5 @@ -0,0 +1 @@ +7a45582c82c2771b7f2c08b8efac631e \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga41897575ca7f69921c55559f5d8027dc_cgraph.svg b/doc/html/group__ds3231__example__driver_ga41897575ca7f69921c55559f5d8027dc_cgraph.svg new file mode 100644 index 0000000..4605fad --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga41897575ca7f69921c55559f5d8027dc_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_alarm_disable + + +Node1 + + +ds3231_alarm_disable + + + + + +Node2 + + +ds3231_set_alarm_interrupt + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga4f40336af58b0d9b187d4d66538ee4aa_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga4f40336af58b0d9b187d4d66538ee4aa_cgraph.md5 new file mode 100644 index 0000000..3e92522 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga4f40336af58b0d9b187d4d66538ee4aa_cgraph.md5 @@ -0,0 +1 @@ +185b19bb7ec85bcf670b2252744d9e50 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga4f40336af58b0d9b187d4d66538ee4aa_cgraph.svg b/doc/html/group__ds3231__example__driver_ga4f40336af58b0d9b187d4d66538ee4aa_cgraph.svg new file mode 100644 index 0000000..bf70339 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga4f40336af58b0d9b187d4d66538ee4aa_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_alarm_clear_flag + + +Node1 + + +ds3231_alarm_clear_flag + + + + + +Node2 + + +ds3231_alarm_clear + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga50d41abb82afa8ca696a1666dad76144_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga50d41abb82afa8ca696a1666dad76144_cgraph.md5 new file mode 100644 index 0000000..035deb9 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga50d41abb82afa8ca696a1666dad76144_cgraph.md5 @@ -0,0 +1 @@ +8f3697cf1ece19771c5878d3e942b57d \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga50d41abb82afa8ca696a1666dad76144_cgraph.svg b/doc/html/group__ds3231__example__driver_ga50d41abb82afa8ca696a1666dad76144_cgraph.svg new file mode 100644 index 0000000..a66f345 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga50d41abb82afa8ca696a1666dad76144_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_output_set_time + + +Node1 + + +ds3231_output_set_time + + + + + +Node2 + + +ds3231_set_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga5c9a7cd1c6466cb3d7e4b8b780db66f1_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga5c9a7cd1c6466cb3d7e4b8b780db66f1_cgraph.md5 new file mode 100644 index 0000000..c471330 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga5c9a7cd1c6466cb3d7e4b8b780db66f1_cgraph.md5 @@ -0,0 +1 @@ +4442ffaae7d13e5a8e9420704c49ffbb \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga5c9a7cd1c6466cb3d7e4b8b780db66f1_cgraph.svg b/doc/html/group__ds3231__example__driver_ga5c9a7cd1c6466cb3d7e4b8b780db66f1_cgraph.svg new file mode 100644 index 0000000..1ee6858 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga5c9a7cd1c6466cb3d7e4b8b780db66f1_cgraph.svg @@ -0,0 +1,323 @@ + + + + + + +ds3231_basic_init + + +Node1 + + +ds3231_basic_init + + + + + +Node2 + + +ds3231_aging_offset +_convert_to_register + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ds3231_deinit + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +ds3231_init + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +ds3231_interface_debug +_print + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +ds3231_interface_delay_ms + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +ds3231_interface_iic +_deinit + + + + + +Node1->Node7 + + + + + + + + +Node8 + + +ds3231_interface_iic_init + + + + + +Node1->Node8 + + + + + + + + +Node9 + + +ds3231_interface_iic_read + + + + + +Node1->Node9 + + + + + + + + +Node10 + + +ds3231_interface_iic +_write + + + + + +Node1->Node10 + + + + + + + + +Node11 + + +ds3231_interface_receive +_callback + + + + + +Node1->Node11 + + + + + + + + +Node12 + + +ds3231_set_32khz_output + + + + + +Node1->Node12 + + + + + + + + +Node13 + + +ds3231_set_aging_offset + + + + + +Node1->Node13 + + + + + + + + +Node14 + + +ds3231_set_alarm_interrupt + + + + + +Node1->Node14 + + + + + + + + +Node15 + + +ds3231_set_oscillator + + + + + +Node1->Node15 + + + + + + + + +Node16 + + +ds3231_set_pin + + + + + +Node1->Node16 + + + + + + + + +Node17 + + +ds3231_set_square_wave + + + + + +Node1->Node17 + + + + + + + + +Node11->Node5 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga6a874e7ec22199b50328d5d3b413bfa4_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga6a874e7ec22199b50328d5d3b413bfa4_cgraph.md5 new file mode 100644 index 0000000..7dc6265 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga6a874e7ec22199b50328d5d3b413bfa4_cgraph.md5 @@ -0,0 +1 @@ +a73590dd5e5aebfdd08f408d1498bbac \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga6a874e7ec22199b50328d5d3b413bfa4_cgraph.svg b/doc/html/group__ds3231__example__driver_ga6a874e7ec22199b50328d5d3b413bfa4_cgraph.svg new file mode 100644 index 0000000..227262f --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga6a874e7ec22199b50328d5d3b413bfa4_cgraph.svg @@ -0,0 +1,40 @@ + + + + + + +ds3231_output_get_32khz_output + + +Node1 + + +ds3231_output_get_32khz +_output + + + + + +Node2 + + +ds3231_get_32khz_output + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga7b5ff4f26b10484a343fd7f1bf79fff4_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga7b5ff4f26b10484a343fd7f1bf79fff4_cgraph.md5 new file mode 100644 index 0000000..1f54dba --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga7b5ff4f26b10484a343fd7f1bf79fff4_cgraph.md5 @@ -0,0 +1 @@ +257c9f917c0645837e5e4a5627c0773a \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga7b5ff4f26b10484a343fd7f1bf79fff4_cgraph.svg b/doc/html/group__ds3231__example__driver_ga7b5ff4f26b10484a343fd7f1bf79fff4_cgraph.svg new file mode 100644 index 0000000..d58a6f9 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga7b5ff4f26b10484a343fd7f1bf79fff4_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_basic_get_time + + +Node1 + + +ds3231_basic_get_time + + + + + +Node2 + + +ds3231_get_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga7e5a1f573daf38378dd48524ad88f05e_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga7e5a1f573daf38378dd48524ad88f05e_cgraph.md5 new file mode 100644 index 0000000..b4f6e02 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga7e5a1f573daf38378dd48524ad88f05e_cgraph.md5 @@ -0,0 +1 @@ +f2b2ff7f8c75ea54d75856182c54e10b \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga7e5a1f573daf38378dd48524ad88f05e_cgraph.svg b/doc/html/group__ds3231__example__driver_ga7e5a1f573daf38378dd48524ad88f05e_cgraph.svg new file mode 100644 index 0000000..308792d --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga7e5a1f573daf38378dd48524ad88f05e_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_basic_get_ascii_time + + +Node1 + + +ds3231_basic_get_ascii_time + + + + + +Node2 + + +ds3231_get_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga84689f1ad5d7c921a088f8a26c355039_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga84689f1ad5d7c921a088f8a26c355039_cgraph.md5 new file mode 100644 index 0000000..69ede54 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga84689f1ad5d7c921a088f8a26c355039_cgraph.md5 @@ -0,0 +1 @@ +5769a22e8db6fe3c8943705a163cf336 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga84689f1ad5d7c921a088f8a26c355039_cgraph.svg b/doc/html/group__ds3231__example__driver_ga84689f1ad5d7c921a088f8a26c355039_cgraph.svg new file mode 100644 index 0000000..a50e5fc --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga84689f1ad5d7c921a088f8a26c355039_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_basic_get_timestamp + + +Node1 + + +ds3231_basic_get_timestamp + + + + + +Node2 + + +ds3231_get_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga8b59f2f35bd0e6be28372c7b048f6fca_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga8b59f2f35bd0e6be28372c7b048f6fca_cgraph.md5 new file mode 100644 index 0000000..b722508 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga8b59f2f35bd0e6be28372c7b048f6fca_cgraph.md5 @@ -0,0 +1 @@ +3381bcd97d1d246fd73c7c5b238a7f31 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga8b59f2f35bd0e6be28372c7b048f6fca_cgraph.svg b/doc/html/group__ds3231__example__driver_ga8b59f2f35bd0e6be28372c7b048f6fca_cgraph.svg new file mode 100644 index 0000000..d439497 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga8b59f2f35bd0e6be28372c7b048f6fca_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_alarm_set_time + + +Node1 + + +ds3231_alarm_set_time + + + + + +Node2 + + +ds3231_set_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_ga8c80d9f1ada1dbd53d29a23bec86e622_cgraph.md5 b/doc/html/group__ds3231__example__driver_ga8c80d9f1ada1dbd53d29a23bec86e622_cgraph.md5 new file mode 100644 index 0000000..bd880da --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga8c80d9f1ada1dbd53d29a23bec86e622_cgraph.md5 @@ -0,0 +1 @@ +5337d829b96396390e7a6a1286db7d8f \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_ga8c80d9f1ada1dbd53d29a23bec86e622_cgraph.svg b/doc/html/group__ds3231__example__driver_ga8c80d9f1ada1dbd53d29a23bec86e622_cgraph.svg new file mode 100644 index 0000000..14e11a7 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_ga8c80d9f1ada1dbd53d29a23bec86e622_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_output_get_temperature + + +Node1 + + +ds3231_output_get_temperature + + + + + +Node2 + + +ds3231_get_temperature + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_gabad89eb25bce3e14b962e6a6bdbe851a_cgraph.md5 b/doc/html/group__ds3231__example__driver_gabad89eb25bce3e14b962e6a6bdbe851a_cgraph.md5 new file mode 100644 index 0000000..b774587 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gabad89eb25bce3e14b962e6a6bdbe851a_cgraph.md5 @@ -0,0 +1 @@ +af7b11f7524f5873bbab3c5590f286ab \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_gabad89eb25bce3e14b962e6a6bdbe851a_cgraph.svg b/doc/html/group__ds3231__example__driver_gabad89eb25bce3e14b962e6a6bdbe851a_cgraph.svg new file mode 100644 index 0000000..526c31c --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gabad89eb25bce3e14b962e6a6bdbe851a_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_alarm_get_alarm1 + + +Node1 + + +ds3231_alarm_get_alarm1 + + + + + +Node2 + + +ds3231_get_alarm1 + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_gabc18d9424f81c150e884fdd9e643ccc1_cgraph.md5 b/doc/html/group__ds3231__example__driver_gabc18d9424f81c150e884fdd9e643ccc1_cgraph.md5 new file mode 100644 index 0000000..90922ed --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gabc18d9424f81c150e884fdd9e643ccc1_cgraph.md5 @@ -0,0 +1 @@ +acb8ae6fa68fdff5eb8c5abff57066fa \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_gabc18d9424f81c150e884fdd9e643ccc1_cgraph.svg b/doc/html/group__ds3231__example__driver_gabc18d9424f81c150e884fdd9e643ccc1_cgraph.svg new file mode 100644 index 0000000..e94f103 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gabc18d9424f81c150e884fdd9e643ccc1_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_alarm_irq_handler + + +Node1 + + +ds3231_alarm_irq_handler + + + + + +Node2 + + +ds3231_irq_handler + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_gabe1f3d92dbc9803a5093ec75eddb84db_cgraph.md5 b/doc/html/group__ds3231__example__driver_gabe1f3d92dbc9803a5093ec75eddb84db_cgraph.md5 new file mode 100644 index 0000000..2fcc15e --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gabe1f3d92dbc9803a5093ec75eddb84db_cgraph.md5 @@ -0,0 +1 @@ +917a49ce9228d32bea11bd061679871f \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_gabe1f3d92dbc9803a5093ec75eddb84db_cgraph.svg b/doc/html/group__ds3231__example__driver_gabe1f3d92dbc9803a5093ec75eddb84db_cgraph.svg new file mode 100644 index 0000000..056b150 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gabe1f3d92dbc9803a5093ec75eddb84db_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_output_get_timestamp + + +Node1 + + +ds3231_output_get_timestamp + + + + + +Node2 + + +ds3231_get_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_gabe3460a5f6446d9ee65303764702ca58_cgraph.md5 b/doc/html/group__ds3231__example__driver_gabe3460a5f6446d9ee65303764702ca58_cgraph.md5 new file mode 100644 index 0000000..441438c --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gabe3460a5f6446d9ee65303764702ca58_cgraph.md5 @@ -0,0 +1 @@ +e7d286a4592332e26aca9efac42c54f0 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_gabe3460a5f6446d9ee65303764702ca58_cgraph.svg b/doc/html/group__ds3231__example__driver_gabe3460a5f6446d9ee65303764702ca58_cgraph.svg new file mode 100644 index 0000000..92cd1c3 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gabe3460a5f6446d9ee65303764702ca58_cgraph.svg @@ -0,0 +1,287 @@ + + + + + + +ds3231_output_init + + +Node1 + + +ds3231_output_init + + + + + +Node2 + + +ds3231_aging_offset +_convert_to_register + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ds3231_deinit + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +ds3231_init + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +ds3231_interface_debug +_print + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +ds3231_interface_delay_ms + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +ds3231_interface_iic +_deinit + + + + + +Node1->Node7 + + + + + + + + +Node8 + + +ds3231_interface_iic_init + + + + + +Node1->Node8 + + + + + + + + +Node9 + + +ds3231_interface_iic_read + + + + + +Node1->Node9 + + + + + + + + +Node10 + + +ds3231_interface_iic +_write + + + + + +Node1->Node10 + + + + + + + + +Node11 + + +ds3231_interface_receive +_callback + + + + + +Node1->Node11 + + + + + + + + +Node12 + + +ds3231_set_aging_offset + + + + + +Node1->Node12 + + + + + + + + +Node13 + + +ds3231_set_alarm_interrupt + + + + + +Node1->Node13 + + + + + + + + +Node14 + + +ds3231_set_oscillator + + + + + +Node1->Node14 + + + + + + + + +Node15 + + +ds3231_set_pin + + + + + +Node1->Node15 + + + + + + + + +Node11->Node5 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_gac0249dc4707f4377a36382b6d7aa9962_cgraph.md5 b/doc/html/group__ds3231__example__driver_gac0249dc4707f4377a36382b6d7aa9962_cgraph.md5 new file mode 100644 index 0000000..6817ea4 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gac0249dc4707f4377a36382b6d7aa9962_cgraph.md5 @@ -0,0 +1 @@ +4ec75648bfce469e8fac087668dfffef \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_gac0249dc4707f4377a36382b6d7aa9962_cgraph.svg b/doc/html/group__ds3231__example__driver_gac0249dc4707f4377a36382b6d7aa9962_cgraph.svg new file mode 100644 index 0000000..be30528 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gac0249dc4707f4377a36382b6d7aa9962_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_alarm_get_timestamp + + +Node1 + + +ds3231_alarm_get_timestamp + + + + + +Node2 + + +ds3231_get_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_gad26c4834db6fe58e60b876d28fe494ac_cgraph.md5 b/doc/html/group__ds3231__example__driver_gad26c4834db6fe58e60b876d28fe494ac_cgraph.md5 new file mode 100644 index 0000000..069be5e --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gad26c4834db6fe58e60b876d28fe494ac_cgraph.md5 @@ -0,0 +1 @@ +2cde8d4fc603c412edfb074f0574a7a0 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_gad26c4834db6fe58e60b876d28fe494ac_cgraph.svg b/doc/html/group__ds3231__example__driver_gad26c4834db6fe58e60b876d28fe494ac_cgraph.svg new file mode 100644 index 0000000..2e7a0d2 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gad26c4834db6fe58e60b876d28fe494ac_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_alarm_get_alarm2 + + +Node1 + + +ds3231_alarm_get_alarm2 + + + + + +Node2 + + +ds3231_get_alarm2 + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_gaddc7467d6f6044742ef885741b92cdc2_cgraph.md5 b/doc/html/group__ds3231__example__driver_gaddc7467d6f6044742ef885741b92cdc2_cgraph.md5 new file mode 100644 index 0000000..5d83b84 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gaddc7467d6f6044742ef885741b92cdc2_cgraph.md5 @@ -0,0 +1 @@ +99e2a8efe9266b2d2d916fd19ec312ab \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_gaddc7467d6f6044742ef885741b92cdc2_cgraph.svg b/doc/html/group__ds3231__example__driver_gaddc7467d6f6044742ef885741b92cdc2_cgraph.svg new file mode 100644 index 0000000..caec562 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gaddc7467d6f6044742ef885741b92cdc2_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_basic_deinit + + +Node1 + + +ds3231_basic_deinit + + + + + +Node2 + + +ds3231_deinit + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_gae42070188e38b7dfbb6808a46519d793_cgraph.md5 b/doc/html/group__ds3231__example__driver_gae42070188e38b7dfbb6808a46519d793_cgraph.md5 new file mode 100644 index 0000000..336bb0a --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gae42070188e38b7dfbb6808a46519d793_cgraph.md5 @@ -0,0 +1 @@ +167ee02c2555d59be464aa9b53d10c76 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_gae42070188e38b7dfbb6808a46519d793_cgraph.svg b/doc/html/group__ds3231__example__driver_gae42070188e38b7dfbb6808a46519d793_cgraph.svg new file mode 100644 index 0000000..ca3e5b5 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gae42070188e38b7dfbb6808a46519d793_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_output_get_ascii_time + + +Node1 + + +ds3231_output_get_ascii_time + + + + + +Node2 + + +ds3231_get_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_gae7316b4143616e4c9abba4cb49f988c9_cgraph.md5 b/doc/html/group__ds3231__example__driver_gae7316b4143616e4c9abba4cb49f988c9_cgraph.md5 new file mode 100644 index 0000000..84a8016 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gae7316b4143616e4c9abba4cb49f988c9_cgraph.md5 @@ -0,0 +1 @@ +3ada3fb3aa1bfe6dcfa2e55315fe8ab1 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_gae7316b4143616e4c9abba4cb49f988c9_cgraph.svg b/doc/html/group__ds3231__example__driver_gae7316b4143616e4c9abba4cb49f988c9_cgraph.svg new file mode 100644 index 0000000..f191880 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gae7316b4143616e4c9abba4cb49f988c9_cgraph.svg @@ -0,0 +1,40 @@ + + + + + + +ds3231_alarm_alarm_ascii_time + + +Node1 + + +ds3231_alarm_alarm +_ascii_time + + + + + +Node2 + + +ds3231_get_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_gae7f7b8ac3f5078395af2991f353dd2a7_cgraph.md5 b/doc/html/group__ds3231__example__driver_gae7f7b8ac3f5078395af2991f353dd2a7_cgraph.md5 new file mode 100644 index 0000000..352af60 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gae7f7b8ac3f5078395af2991f353dd2a7_cgraph.md5 @@ -0,0 +1 @@ +3920dc4ff61d6c53d948a42d29249be8 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_gae7f7b8ac3f5078395af2991f353dd2a7_cgraph.svg b/doc/html/group__ds3231__example__driver_gae7f7b8ac3f5078395af2991f353dd2a7_cgraph.svg new file mode 100644 index 0000000..5ca677f --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gae7f7b8ac3f5078395af2991f353dd2a7_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_output_get_time + + +Node1 + + +ds3231_output_get_time + + + + + +Node2 + + +ds3231_get_time + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_gaf1465eb300d6c5cffa1b14bb87f8f5a2_cgraph.md5 b/doc/html/group__ds3231__example__driver_gaf1465eb300d6c5cffa1b14bb87f8f5a2_cgraph.md5 new file mode 100644 index 0000000..36ed156 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gaf1465eb300d6c5cffa1b14bb87f8f5a2_cgraph.md5 @@ -0,0 +1 @@ +3a16393843e09f42f7bedf6effa51cca \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_gaf1465eb300d6c5cffa1b14bb87f8f5a2_cgraph.svg b/doc/html/group__ds3231__example__driver_gaf1465eb300d6c5cffa1b14bb87f8f5a2_cgraph.svg new file mode 100644 index 0000000..22bc9ff --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gaf1465eb300d6c5cffa1b14bb87f8f5a2_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_alarm_deinit + + +Node1 + + +ds3231_alarm_deinit + + + + + +Node2 + + +ds3231_deinit + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_gaf26f75d82419eac5cc31efb3ddbe63fe_cgraph.md5 b/doc/html/group__ds3231__example__driver_gaf26f75d82419eac5cc31efb3ddbe63fe_cgraph.md5 new file mode 100644 index 0000000..c20e878 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gaf26f75d82419eac5cc31efb3ddbe63fe_cgraph.md5 @@ -0,0 +1 @@ +429e9028b2be4eb47c7e56d8abd9397b \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_gaf26f75d82419eac5cc31efb3ddbe63fe_cgraph.svg b/doc/html/group__ds3231__example__driver_gaf26f75d82419eac5cc31efb3ddbe63fe_cgraph.svg new file mode 100644 index 0000000..dae1635 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gaf26f75d82419eac5cc31efb3ddbe63fe_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_output_get_square_wave + + +Node1 + + +ds3231_output_get_square_wave + + + + + +Node2 + + +ds3231_get_square_wave + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__example__driver_gaf9f50c436960ae86df51696cae7355c2_cgraph.md5 b/doc/html/group__ds3231__example__driver_gaf9f50c436960ae86df51696cae7355c2_cgraph.md5 new file mode 100644 index 0000000..ce97201 --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gaf9f50c436960ae86df51696cae7355c2_cgraph.md5 @@ -0,0 +1 @@ +704468a038dd8cfddec0588979f3c0d8 \ No newline at end of file diff --git a/doc/html/group__ds3231__example__driver_gaf9f50c436960ae86df51696cae7355c2_cgraph.svg b/doc/html/group__ds3231__example__driver_gaf9f50c436960ae86df51696cae7355c2_cgraph.svg new file mode 100644 index 0000000..a01654f --- /dev/null +++ b/doc/html/group__ds3231__example__driver_gaf9f50c436960ae86df51696cae7355c2_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ds3231_output_deinit + + +Node1 + + +ds3231_output_deinit + + + + + +Node2 + + +ds3231_deinit + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__extern__driver.html b/doc/html/group__ds3231__extern__driver.html index 21f9595..f8d15a3 100644 --- a/doc/html/group__ds3231__extern__driver.html +++ b/doc/html/group__ds3231__extern__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: ds3231 extern driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +

@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
ds3231 extern driver function
+
ds3231 extern driver function

ds3231 extern driver modules More...

+
+Collaboration diagram for ds3231 extern driver function:
+
+
+
- - - - - - - + + + +

+

Functions

uint8_t ds3231_set_reg (ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 set the chip register More...
 
uint8_t ds3231_get_reg (ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 get the chip register More...
 
uint8_t ds3231_set_reg (ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 set the chip register
uint8_t ds3231_get_reg (ds3231_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
 get the chip register
-

Detailed Description

+

Detailed Description

ds3231 extern driver modules

-

Function Documentation

- -

◆ ds3231_get_reg()

+

Function Documentation

+ +

◆ ds3231_get_reg()

@@ -115,31 +122,22 @@

uint8_t ds3231_get_reg ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - uint8_t  - reg, + uint8_t reg, - uint8_t *  - buf, + uint8_t * buf, - uint16_t  - len  - - - - ) - + uint16_t len )

@@ -167,8 +165,8 @@

-

◆ ds3231_set_reg()

+ +

◆ ds3231_set_reg()

@@ -176,31 +174,22 @@

uint8_t ds3231_set_reg ( - ds3231_handle_t *  - handle, + ds3231_handle_t * handle, - uint8_t  - reg, + uint8_t reg, - uint8_t *  - buf, + uint8_t * buf, - uint16_t  - len  - - - - ) - + uint16_t len )

@@ -230,10 +219,18 @@

+ + +

+
diff --git a/doc/html/group__ds3231__extern__driver.md5 b/doc/html/group__ds3231__extern__driver.md5 new file mode 100644 index 0000000..7e6ff2b --- /dev/null +++ b/doc/html/group__ds3231__extern__driver.md5 @@ -0,0 +1 @@ +4278e4bdd94f513bf3f122b76abd4ecd \ No newline at end of file diff --git a/doc/html/group__ds3231__extern__driver.svg b/doc/html/group__ds3231__extern__driver.svg new file mode 100644 index 0000000..6411224 --- /dev/null +++ b/doc/html/group__ds3231__extern__driver.svg @@ -0,0 +1,37 @@ + + + + + + +ds3231 extern driver function + + +Node2 + + +ds3231 driver function + + + + + +Node1 + + +ds3231 extern driver + function + + + + + +Node2->Node1 + + + + + diff --git a/doc/html/group__ds3231__interface__driver.html b/doc/html/group__ds3231__interface__driver.html index b1e10d2..d5f5a11 100644 --- a/doc/html/group__ds3231__interface__driver.html +++ b/doc/html/group__ds3231__interface__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: ds3231 interface driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +

@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
ds3231 interface driver function
+
ds3231 interface driver function

ds3231 interface driver modules More...

+
+Collaboration diagram for ds3231 interface driver function:
+
+
+
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + +

+

Functions

uint8_t ds3231_interface_iic_init (void)
 interface iic bus init More...
 
uint8_t ds3231_interface_iic_deinit (void)
 interface iic bus deinit More...
 
uint8_t ds3231_interface_iic_read (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus read More...
 
uint8_t ds3231_interface_iic_write (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus write More...
 
void ds3231_interface_delay_ms (uint32_t ms)
 interface delay ms More...
 
void ds3231_interface_debug_print (const char *const fmt,...)
 interface print format data More...
 
void ds3231_interface_receive_callback (uint8_t type)
 interface receive callback More...
 
uint8_t ds3231_interface_iic_init (void)
 interface iic bus init
uint8_t ds3231_interface_iic_deinit (void)
 interface iic bus deinit
uint8_t ds3231_interface_iic_read (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus read
uint8_t ds3231_interface_iic_write (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus write
void ds3231_interface_delay_ms (uint32_t ms)
 interface delay ms
void ds3231_interface_debug_print (const char *const fmt,...)
 interface print format data
void ds3231_interface_receive_callback (uint8_t type)
 interface receive callback
-

Detailed Description

+

Detailed Description

ds3231 interface driver modules

-

Function Documentation

- -

◆ ds3231_interface_debug_print()

+

Function Documentation

+ +

◆ ds3231_interface_debug_print()

@@ -160,8 +155,8 @@

-

◆ ds3231_interface_delay_ms()

+ +

◆ ds3231_interface_delay_ms()

@@ -169,8 +164,7 @@

void ds3231_interface_delay_ms ( - uint32_t  - ms) + uint32_t ms) @@ -189,8 +183,8 @@

-

◆ ds3231_interface_iic_deinit()

+ +

◆ ds3231_interface_iic_deinit()

@@ -198,8 +192,7 @@

uint8_t ds3231_interface_iic_deinit ( - void  - ) + void ) @@ -217,8 +210,8 @@

-

◆ ds3231_interface_iic_init()

+ +

◆ ds3231_interface_iic_init()

@@ -226,8 +219,7 @@

uint8_t ds3231_interface_iic_init ( - void  - ) + void ) @@ -245,8 +237,8 @@

-

◆ ds3231_interface_iic_read()

+ +

◆ ds3231_interface_iic_read()

@@ -304,8 +287,8 @@

-

◆ ds3231_interface_iic_write()

+ +

◆ ds3231_interface_iic_write()

@@ -363,8 +337,8 @@

-

◆ ds3231_interface_receive_callback()

+ +

◆ ds3231_interface_receive_callback()

@@ -372,8 +346,7 @@

void ds3231_interface_receive_callback ( - uint8_t  - type) + uint8_t type) @@ -389,15 +362,28 @@

Note
none

Definition at line 121 of file driver_ds3231_interface_template.c.

+
+Here is the call graph for this function:
+
+
+

+ +
diff --git a/doc/html/group__ds3231__interface__driver.md5 b/doc/html/group__ds3231__interface__driver.md5 new file mode 100644 index 0000000..4634d0f --- /dev/null +++ b/doc/html/group__ds3231__interface__driver.md5 @@ -0,0 +1 @@ +1f743699fd0dd45d6cef1b24e7d3c974 \ No newline at end of file diff --git a/doc/html/group__ds3231__interface__driver.svg b/doc/html/group__ds3231__interface__driver.svg new file mode 100644 index 0000000..e9c37fe --- /dev/null +++ b/doc/html/group__ds3231__interface__driver.svg @@ -0,0 +1,37 @@ + + + + + + +ds3231 interface driver function + + +Node2 + + +ds3231 driver function + + + + + +Node1 + + +ds3231 interface driver + function + + + + + +Node2->Node1 + + + + + diff --git a/doc/html/group__ds3231__interface__driver_gac9d5e54b603ed63e2e7505468d544dae_cgraph.md5 b/doc/html/group__ds3231__interface__driver_gac9d5e54b603ed63e2e7505468d544dae_cgraph.md5 new file mode 100644 index 0000000..c117511 --- /dev/null +++ b/doc/html/group__ds3231__interface__driver_gac9d5e54b603ed63e2e7505468d544dae_cgraph.md5 @@ -0,0 +1 @@ +04a1f9ebcf070309ed2b1ea588d23f52 \ No newline at end of file diff --git a/doc/html/group__ds3231__interface__driver_gac9d5e54b603ed63e2e7505468d544dae_cgraph.svg b/doc/html/group__ds3231__interface__driver_gac9d5e54b603ed63e2e7505468d544dae_cgraph.svg new file mode 100644 index 0000000..9cead8d --- /dev/null +++ b/doc/html/group__ds3231__interface__driver_gac9d5e54b603ed63e2e7505468d544dae_cgraph.svg @@ -0,0 +1,41 @@ + + + + + + +ds3231_interface_receive_callback + + +Node1 + + +ds3231_interface_receive +_callback + + + + + +Node2 + + +ds3231_interface_debug +_print + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ds3231__link__driver.html b/doc/html/group__ds3231__link__driver.html index 39d15f3..aca3ba6 100644 --- a/doc/html/group__ds3231__link__driver.html +++ b/doc/html/group__ds3231__link__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: ds3231 link driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
ds3231 link driver function
+
ds3231 link driver function

ds3231 link driver modules More...

+
+Collaboration diagram for ds3231 link driver function:
+
+
+
- - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +

+

Macros

#define DRIVER_DS3231_LINK_INIT(HANDLE, STRUCTURE)   memset(HANDLE, 0, sizeof(STRUCTURE))
 initialize ds3231_handle_t structure More...
 
#define DRIVER_DS3231_LINK_IIC_INIT(HANDLE, FUC)   (HANDLE)->iic_init = FUC
 link iic_init function More...
 
#define DRIVER_DS3231_LINK_IIC_DEINIT(HANDLE, FUC)   (HANDLE)->iic_deinit = FUC
 link iic_deinit function More...
 
#define DRIVER_DS3231_LINK_IIC_READ(HANDLE, FUC)   (HANDLE)->iic_read = FUC
 link iic_read function More...
 
#define DRIVER_DS3231_LINK_IIC_WRITE(HANDLE, FUC)   (HANDLE)->iic_write = FUC
 link iic_write function More...
 
#define DRIVER_DS3231_LINK_DELAY_MS(HANDLE, FUC)   (HANDLE)->delay_ms = FUC
 link delay_ms function More...
 
#define DRIVER_DS3231_LINK_DEBUG_PRINT(HANDLE, FUC)   (HANDLE)->debug_print = FUC
 link debug_print function More...
 
#define DRIVER_DS3231_LINK_RECEIVE_CALLBACK(HANDLE, FUC)   (HANDLE)->receive_callback = FUC
 link receive_callback function More...
 
#define DRIVER_DS3231_LINK_INIT(HANDLE, STRUCTURE)
 initialize ds3231_handle_t structure
#define DRIVER_DS3231_LINK_IIC_INIT(HANDLE, FUC)
 link iic_init function
#define DRIVER_DS3231_LINK_IIC_DEINIT(HANDLE, FUC)
 link iic_deinit function
#define DRIVER_DS3231_LINK_IIC_READ(HANDLE, FUC)
 link iic_read function
#define DRIVER_DS3231_LINK_IIC_WRITE(HANDLE, FUC)
 link iic_write function
#define DRIVER_DS3231_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_DS3231_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function
#define DRIVER_DS3231_LINK_RECEIVE_CALLBACK(HANDLE, FUC)
 link receive_callback function
-

Detailed Description

+

Detailed Description

ds3231 link driver modules

-

Macro Definition Documentation

- -

◆ DRIVER_DS3231_LINK_DEBUG_PRINT

+

Macro Definition Documentation

+ +

◆ DRIVER_DS3231_LINK_DEBUG_PRINT

- -

initialize ds3231_handle_t structure

+Value:
memset(HANDLE, 0, sizeof(STRUCTURE))
+
+

initialize ds3231_handle_t structure

Parameters
- +
[in]HANDLEpointer to a ds3231 handle structure
[in]STRUCTUREds3231_handle_t
[in]STRUCTUREds3231_handle_t
@@ -404,8 +363,8 @@

-

◆ DRIVER_DS3231_LINK_RECEIVE_CALLBACK

+ +

◆ DRIVER_DS3231_LINK_RECEIVE_CALLBACK

- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
ds3231 test driver function
+
ds3231 test driver function

ds3231 test driver modules More...

+
+Collaboration diagram for ds3231 test driver function:
+
+
+
- - - - - - - - - - - - - + + + + + + + +

+

Functions

uint8_t ds3231_alarm_test (void)
 alarm test More...
 
uint8_t ds3231_output_test (uint32_t times)
 output test More...
 
uint8_t ds3231_readwrite_test (uint32_t times)
 readwrite test More...
 
uint8_t ds3231_register_test (void)
 register test More...
 
uint8_t ds3231_alarm_test (void)
 alarm test
uint8_t ds3231_output_test (uint32_t times)
 output test
uint8_t ds3231_readwrite_test (uint32_t times)
 readwrite test
uint8_t ds3231_register_test (void)
 register test
-

Detailed Description

+

Detailed Description

ds3231 test driver modules

-

Function Documentation

- -

◆ ds3231_alarm_test()

+

Function Documentation

+ +

◆ ds3231_alarm_test()

@@ -121,8 +126,7 @@

uint8_t ds3231_alarm_test ( - void  - ) + void ) @@ -137,11 +141,16 @@

Note
none

Definition at line 50 of file driver_ds3231_alarm_test.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_output_test()

+ +

◆ ds3231_output_test()

@@ -149,8 +158,7 @@

uint8_t ds3231_output_test ( - uint32_t  - times) + uint32_t times) @@ -171,11 +179,16 @@

Note
none

Definition at line 51 of file driver_ds3231_output_test.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_readwrite_test()

+ +

◆ ds3231_readwrite_test()

@@ -183,8 +196,7 @@

uint8_t ds3231_readwrite_test ( - uint32_t  - times) + uint32_t times) @@ -205,11 +217,16 @@

Note
none

Definition at line 51 of file driver_ds3231_readwrite_test.c.

+
+Here is the call graph for this function:
+
+
+

- -

◆ ds3231_register_test()

+ +

◆ ds3231_register_test()

@@ -217,8 +234,7 @@

uint8_t ds3231_register_test ( - void  - ) + void ) @@ -233,15 +249,28 @@

Note
none

Definition at line 50 of file driver_ds3231_register_test.c.

+
+Here is the call graph for this function:
+
+
+

+ +
diff --git a/doc/html/group__ds3231__test__driver.md5 b/doc/html/group__ds3231__test__driver.md5 new file mode 100644 index 0000000..124f669 --- /dev/null +++ b/doc/html/group__ds3231__test__driver.md5 @@ -0,0 +1 @@ +1ac35fdf3a4fc33471b657841fded87a \ No newline at end of file diff --git a/doc/html/group__ds3231__test__driver.svg b/doc/html/group__ds3231__test__driver.svg new file mode 100644 index 0000000..2d9448c --- /dev/null +++ b/doc/html/group__ds3231__test__driver.svg @@ -0,0 +1,37 @@ + + + + + + +ds3231 test driver function + + +Node2 + + +ds3231 driver function + + + + + +Node1 + + +ds3231 test driver + function + + + + + +Node2->Node1 + + + + + diff --git a/doc/html/group__ds3231__test__driver_ga1f4116717d48a4a94e96f808b85d6fce_cgraph.md5 b/doc/html/group__ds3231__test__driver_ga1f4116717d48a4a94e96f808b85d6fce_cgraph.md5 new file mode 100644 index 0000000..a229592 --- /dev/null +++ b/doc/html/group__ds3231__test__driver_ga1f4116717d48a4a94e96f808b85d6fce_cgraph.md5 @@ -0,0 +1 @@ +ed3585e5a4215662c1e253f17d56052b \ No newline at end of file diff --git a/doc/html/group__ds3231__test__driver_ga1f4116717d48a4a94e96f808b85d6fce_cgraph.svg b/doc/html/group__ds3231__test__driver_ga1f4116717d48a4a94e96f808b85d6fce_cgraph.svg new file mode 100644 index 0000000..00998da --- /dev/null +++ b/doc/html/group__ds3231__test__driver_ga1f4116717d48a4a94e96f808b85d6fce_cgraph.svg @@ -0,0 +1,341 @@ + + + + + + +ds3231_output_test + + +Node1 + + +ds3231_output_test + + + + + +Node2 + + +ds3231_aging_offset +_convert_to_register + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ds3231_deinit + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +ds3231_info + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +ds3231_init + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +ds3231_interface_debug +_print + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +ds3231_interface_delay_ms + + + + + +Node1->Node7 + + + + + + + + +Node8 + + +ds3231_interface_iic +_deinit + + + + + +Node1->Node8 + + + + + + + + +Node9 + + +ds3231_interface_iic_init + + + + + +Node1->Node9 + + + + + + + + +Node10 + + +ds3231_interface_iic_read + + + + + +Node1->Node10 + + + + + + + + +Node11 + + +ds3231_interface_iic +_write + + + + + +Node1->Node11 + + + + + + + + +Node12 + + +ds3231_interface_receive +_callback + + + + + +Node1->Node12 + + + + + + + + +Node13 + + +ds3231_set_32khz_output + + + + + +Node1->Node13 + + + + + + + + +Node14 + + +ds3231_set_aging_offset + + + + + +Node1->Node14 + + + + + + + + +Node15 + + +ds3231_set_alarm_interrupt + + + + + +Node1->Node15 + + + + + + + + +Node16 + + +ds3231_set_oscillator + + + + + +Node1->Node16 + + + + + + + + +Node17 + + +ds3231_set_pin + + + + + +Node1->Node17 + + + + + + + + +Node18 + + +ds3231_set_square_wave + + + + + +Node1->Node18 + + + + + + + + +Node12->Node6 + + + + + + + + diff --git a/doc/html/group__ds3231__test__driver_ga2f90512438d9acba89262e7a8cbe3de4_cgraph.md5 b/doc/html/group__ds3231__test__driver_ga2f90512438d9acba89262e7a8cbe3de4_cgraph.md5 new file mode 100644 index 0000000..efea780 --- /dev/null +++ b/doc/html/group__ds3231__test__driver_ga2f90512438d9acba89262e7a8cbe3de4_cgraph.md5 @@ -0,0 +1 @@ +69c8dccef62d3fdd05d7e96f16a7682e \ No newline at end of file diff --git a/doc/html/group__ds3231__test__driver_ga2f90512438d9acba89262e7a8cbe3de4_cgraph.svg b/doc/html/group__ds3231__test__driver_ga2f90512438d9acba89262e7a8cbe3de4_cgraph.svg new file mode 100644 index 0000000..42faf6b --- /dev/null +++ b/doc/html/group__ds3231__test__driver_ga2f90512438d9acba89262e7a8cbe3de4_cgraph.svg @@ -0,0 +1,594 @@ + + + + + + +ds3231_register_test + + +Node1 + + +ds3231_register_test + + + + + +Node2 + + +ds3231_aging_offset +_convert_to_data + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ds3231_aging_offset +_convert_to_register + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +ds3231_deinit + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +ds3231_get_32khz_output + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +ds3231_get_aging_offset + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +ds3231_get_alarm1 + + + + + +Node1->Node7 + + + + + + + + +Node8 + + +ds3231_get_alarm2 + + + + + +Node1->Node8 + + + + + + + + +Node9 + + +ds3231_get_alarm_interrupt + + + + + +Node1->Node9 + + + + + + + + +Node10 + + +ds3231_get_oscillator + + + + + +Node1->Node10 + + + + + + + + +Node11 + + +ds3231_get_pin + + + + + +Node1->Node11 + + + + + + + + +Node12 + + +ds3231_get_square_wave + + + + + +Node1->Node12 + + + + + + + + +Node13 + + +ds3231_get_status + + + + + +Node1->Node13 + + + + + + + + +Node14 + + +ds3231_get_time + + + + + +Node1->Node14 + + + + + + + + +Node15 + + +ds3231_info + + + + + +Node1->Node15 + + + + + + + + +Node16 + + +ds3231_init + + + + + +Node1->Node16 + + + + + + + + +Node17 + + +ds3231_interface_debug +_print + + + + + +Node1->Node17 + + + + + + + + +Node18 + + +ds3231_interface_delay_ms + + + + + +Node1->Node18 + + + + + + + + +Node19 + + +ds3231_interface_iic +_deinit + + + + + +Node1->Node19 + + + + + + + + +Node20 + + +ds3231_interface_iic_init + + + + + +Node1->Node20 + + + + + + + + +Node21 + + +ds3231_interface_iic_read + + + + + +Node1->Node21 + + + + + + + + +Node22 + + +ds3231_interface_iic +_write + + + + + +Node1->Node22 + + + + + + + + +Node23 + + +ds3231_interface_receive +_callback + + + + + +Node1->Node23 + + + + + + + + +Node24 + + +ds3231_set_32khz_output + + + + + +Node1->Node24 + + + + + + + + +Node25 + + +ds3231_set_aging_offset + + + + + +Node1->Node25 + + + + + + + + +Node26 + + +ds3231_set_alarm1 + + + + + +Node1->Node26 + + + + + + + + +Node27 + + +ds3231_set_alarm2 + + + + + +Node1->Node27 + + + + + + + + +Node28 + + +ds3231_set_alarm_interrupt + + + + + +Node1->Node28 + + + + + + + + +Node29 + + +ds3231_set_oscillator + + + + + +Node1->Node29 + + + + + + + + +Node30 + + +ds3231_set_pin + + + + + +Node1->Node30 + + + + + + + + +Node31 + + +ds3231_set_square_wave + + + + + +Node1->Node31 + + + + + + + + +Node32 + + +ds3231_set_time + + + + + +Node1->Node32 + + + + + + + + +Node23->Node17 + + + + + + + + diff --git a/doc/html/group__ds3231__test__driver_ga6760df81c47653d9e0d6d3367ef49a50_cgraph.md5 b/doc/html/group__ds3231__test__driver_ga6760df81c47653d9e0d6d3367ef49a50_cgraph.md5 new file mode 100644 index 0000000..893cd46 --- /dev/null +++ b/doc/html/group__ds3231__test__driver_ga6760df81c47653d9e0d6d3367ef49a50_cgraph.md5 @@ -0,0 +1 @@ +c8b38059489611f426c86e201b95a376 \ No newline at end of file diff --git a/doc/html/group__ds3231__test__driver_ga6760df81c47653d9e0d6d3367ef49a50_cgraph.svg b/doc/html/group__ds3231__test__driver_ga6760df81c47653d9e0d6d3367ef49a50_cgraph.svg new file mode 100644 index 0000000..da3ef2f --- /dev/null +++ b/doc/html/group__ds3231__test__driver_ga6760df81c47653d9e0d6d3367ef49a50_cgraph.svg @@ -0,0 +1,431 @@ + + + + + + +ds3231_alarm_test + + +Node1 + + +ds3231_alarm_test + + + + + +Node2 + + +ds3231_aging_offset +_convert_to_register + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ds3231_alarm_clear + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +ds3231_deinit + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +ds3231_get_status + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +ds3231_info + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +ds3231_init + + + + + +Node1->Node7 + + + + + + + + +Node8 + + +ds3231_interface_debug +_print + + + + + +Node1->Node8 + + + + + + + + +Node9 + + +ds3231_interface_delay_ms + + + + + +Node1->Node9 + + + + + + + + +Node10 + + +ds3231_interface_iic +_deinit + + + + + +Node1->Node10 + + + + + + + + +Node11 + + +ds3231_interface_iic_init + + + + + +Node1->Node11 + + + + + + + + +Node12 + + +ds3231_interface_iic_read + + + + + +Node1->Node12 + + + + + + + + +Node13 + + +ds3231_interface_iic +_write + + + + + +Node1->Node13 + + + + + + + + +Node14 + + +ds3231_interface_receive +_callback + + + + + +Node1->Node14 + + + + + + + + +Node15 + + +ds3231_set_32khz_output + + + + + +Node1->Node15 + + + + + + + + +Node16 + + +ds3231_set_aging_offset + + + + + +Node1->Node16 + + + + + + + + +Node17 + + +ds3231_set_alarm1 + + + + + +Node1->Node17 + + + + + + + + +Node18 + + +ds3231_set_alarm2 + + + + + +Node1->Node18 + + + + + + + + +Node19 + + +ds3231_set_alarm_interrupt + + + + + +Node1->Node19 + + + + + + + + +Node20 + + +ds3231_set_oscillator + + + + + +Node1->Node20 + + + + + + + + +Node21 + + +ds3231_set_pin + + + + + +Node1->Node21 + + + + + + + + +Node22 + + +ds3231_set_square_wave + + + + + +Node1->Node22 + + + + + + + + +Node23 + + +ds3231_set_time + + + + + +Node1->Node23 + + + + + + + + +Node14->Node8 + + + + + + + + diff --git a/doc/html/group__ds3231__test__driver_gaf250ed054aca1b485cca2925e20910ae_cgraph.md5 b/doc/html/group__ds3231__test__driver_gaf250ed054aca1b485cca2925e20910ae_cgraph.md5 new file mode 100644 index 0000000..e09b02a --- /dev/null +++ b/doc/html/group__ds3231__test__driver_gaf250ed054aca1b485cca2925e20910ae_cgraph.md5 @@ -0,0 +1 @@ +47f483501e31f4b4592325c633a00c0c \ No newline at end of file diff --git a/doc/html/group__ds3231__test__driver_gaf250ed054aca1b485cca2925e20910ae_cgraph.svg b/doc/html/group__ds3231__test__driver_gaf250ed054aca1b485cca2925e20910ae_cgraph.svg new file mode 100644 index 0000000..e4751fc --- /dev/null +++ b/doc/html/group__ds3231__test__driver_gaf250ed054aca1b485cca2925e20910ae_cgraph.svg @@ -0,0 +1,395 @@ + + + + + + +ds3231_readwrite_test + + +Node1 + + +ds3231_readwrite_test + + + + + +Node2 + + +ds3231_aging_offset +_convert_to_register + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ds3231_deinit + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +ds3231_get_temperature + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +ds3231_get_time + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +ds3231_info + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +ds3231_init + + + + + +Node1->Node7 + + + + + + + + +Node8 + + +ds3231_interface_debug +_print + + + + + +Node1->Node8 + + + + + + + + +Node9 + + +ds3231_interface_delay_ms + + + + + +Node1->Node9 + + + + + + + + +Node10 + + +ds3231_interface_iic +_deinit + + + + + +Node1->Node10 + + + + + + + + +Node11 + + +ds3231_interface_iic_init + + + + + +Node1->Node11 + + + + + + + + +Node12 + + +ds3231_interface_iic_read + + + + + +Node1->Node12 + + + + + + + + +Node13 + + +ds3231_interface_iic +_write + + + + + +Node1->Node13 + + + + + + + + +Node14 + + +ds3231_interface_receive +_callback + + + + + +Node1->Node14 + + + + + + + + +Node15 + + +ds3231_set_32khz_output + + + + + +Node1->Node15 + + + + + + + + +Node16 + + +ds3231_set_aging_offset + + + + + +Node1->Node16 + + + + + + + + +Node17 + + +ds3231_set_alarm_interrupt + + + + + +Node1->Node17 + + + + + + + + +Node18 + + +ds3231_set_oscillator + + + + + +Node1->Node18 + + + + + + + + +Node19 + + +ds3231_set_pin + + + + + +Node1->Node19 + + + + + + + + +Node20 + + +ds3231_set_square_wave + + + + + +Node1->Node20 + + + + + + + + +Node21 + + +ds3231_set_time + + + + + +Node1->Node21 + + + + + + + + +Node14->Node8 + + + + + + + + diff --git a/doc/html/index.html b/doc/html/index.html index fff792c..e03da8b 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: LibDriver DS3231 + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
-
LibDriver DS3231
+
+
LibDriver DS3231
-

LibDriver DS3231 is a full-featured driver of DS3231 and it can run in both MCU and Linux platform.

Version
2.0.0
+

LibDriver DS3231 is a full-featured driver of DS3231 and it can run in both MCU and Linux platform.

+
Version
2.0.0
Author
Shifeng Li

History

@@ -105,12 +112,14 @@

Copyright (c) LibDriver All rights reserved.

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.

+ + diff --git a/doc/html/jquery.js b/doc/html/jquery.js index 103c32d..875ada7 100644 --- a/doc/html/jquery.js +++ b/doc/html/jquery.js @@ -1,18 +1,143 @@ -/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"
","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp( +"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType +}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c +)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){ +return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll( +":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id") +)&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push( +"\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test( +a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null, +null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne +).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for( +var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n; +return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0, +r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r] +,C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each( +function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r, +"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})} +),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each( +"blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element -},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/** +* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/resizable.js, widgets/mouse.js +* Copyright jQuery Foundation and other contributors; Licensed MIT */!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(y){"use strict";y.ui=y.ui||{};y.ui.version="1.13.2";var n,i=0,h=Array.prototype.hasOwnProperty,a=Array.prototype.slice;y.cleanData=(n=y.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=y._data(i,"events"))&&e.remove&&y(i).triggerHandler("remove");n(t)}),y.widget=function(t,i,e){var s,n,o,h={},a=t.split(".")[0],r=a+"-"+(t=t.split(".")[1]);return e||(e=i,i=y.Widget),Array.isArray(e)&&(e=y.extend.apply(null,[{}].concat(e))),y.expr.pseudos[r.toLowerCase()]=function(t){return!!y.data(t,r)},y[a]=y[a]||{},s=y[a][t],n=y[a][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},y.extend(n,s,{version:e.version,_proto:y.extend({},e),_childConstructors:[]}),(o=new i).options=y.widget.extend({},o.options),y.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)} +function o(t){return i.prototype[e].apply(this,t)}h[e]="function"==typeof s?function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:s}),n.prototype=y.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},h,{constructor:n,namespace:a,widgetName:t,widgetFullName:r}),s?(y.each(s._childConstructors,function(t,e){var i=e.prototype;y.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),y.widget.bridge(t,n),n},y.widget.extend=function(t){for(var e,i,s=a.call(arguments,1),n=0,o=s.length;n",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t +){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t +]=y.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return y("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i}, +getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),h.offset(y.extend(l,{using:t}))})},y.ui.position={fit:{left:function(t,e){var i=e.within, +s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,h=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),y.ui.plugin={add:function(t,e,i){var s,n=y.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n
").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})), +this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&y(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){y(t +).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,h=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this._addedHandles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split( +","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=y(this.handles[e]),this._on(this.handles[e],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=y(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add( +this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=y(this.handles[e])[0])!==t.target&&!y.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=y(s.containment).scrollLeft()||0,i+=y(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{ +width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(), +!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(y.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){ +this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,h=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,r=this.originalPosition.top+this.originalSize.height +,l=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),h&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),h&&i&&(t.top=r-e.minHeight),n&&i&&(t.top=r-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e
").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e, +i){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){y.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(e){var i=y(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=n?0:i.sizeDiff.width,n={width:i.size.width-h,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left +)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(y.extend(n,o&&h?{top:o,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&y(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=y(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,h=o instanceof y?o.get(0):/parent/.test(o)?e.parent().get(0):o;h&&(n.containerElement=y(h),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(i=y(h),s=[],y(["Top","Right","Left","Bottom"]).each(function(t,e +){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(h,"left")?h.scrollWidth:o,e=n._hasScroll(h)?h.scrollHeight:e,n.parentData={element:h,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=y(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,h={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(h=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-h.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0), +i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-h.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-h.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=y(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=y(t.helper),h=o.offset(),a=o.outerWidth( +)-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var t=y(this).resizable("instance").options;y(t.alsoResize).each(function(){var t=y(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=y(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,h={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};y(s.alsoResize).each(function(){var t=y(this),s=y(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(e, +function(t,e){var i=(s[e]||0)+(h[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var t=y(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=y(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=y(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var t,e=y(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,h=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,r=a[0 +]||1,l=a[1]||1,u=Math.round((s.width-n.width)/r)*r,p=Math.round((s.height-n.height)/l)*l,d=n.width+u,c=n.height+p,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>c;i.grid=a,m&&(d+=r),s&&(c+=l),f&&(d-=r),g&&(c-=l),/^(se|s|e)$/.test(h)?(e.size.width=d,e.size.height=c):/^(ne)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.top=o.top-p):/^(sw)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.left=o.left-u):((c-l<=0||d-r<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0=f[g]?0:Math.min(f[g],n));!a&&1=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right-1){ +targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se", +"n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if( +session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)} +closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if( +session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE, +function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset); +tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList, +finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight())); +return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")} +function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(), +elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight, +viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + */!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b, +"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery); +/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 * http://www.smartmenus.org/ - * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)), +mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend( +$.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy( +this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData( +"smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id" +).indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?( +this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for( +var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){ +return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if(( +!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&( +this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0 +]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass( +"highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){ +t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]" +)||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){ +t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"), +a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i, +downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2) +)&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t +)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0), +canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}}, +rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})} +return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1, +bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); diff --git a/doc/html/mainpage_8h.html b/doc/html/mainpage_8h.html index 386f452..93eebf0 100644 --- a/doc/html/mainpage_8h.html +++ b/doc/html/mainpage_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: doc/mainpage/mainpage.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
mainpage.h File Reference
+
mainpage.h File Reference
+ +
diff --git a/doc/html/mainpage_8h_source.html b/doc/html/mainpage_8h_source.html index 9bfa547..eef1554 100644 --- a/doc/html/mainpage_8h_source.html +++ b/doc/html/mainpage_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver DS3231: doc/mainpage/mainpage.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver DS3231 -  2.0.0
-
DS3231 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
mainpage.h
+
mainpage.h
+
diff --git a/doc/html/menu.js b/doc/html/menu.js index 2fe2214..15f9c52 100644 --- a/doc/html/menu.js +++ b/doc/html/menu.js @@ -22,13 +22,20 @@ @licend The above is the entire license notice for the JavaScript code in this file */ -function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { +function initMenu(relPath,searchEnabled,serverSide,searchPage,search,treeview) { function makeTree(data,relPath) { - var result=''; + let result=''; if ('children' in data) { result+='