From b9e6141cf29da68e7f649b1cf08f505878ad5b7f Mon Sep 17 00:00:00 2001 From: lishifeng Date: Sun, 26 Oct 2025 01:08:52 +0800 Subject: [PATCH] feat: update doxygen --- CHANGELOG.md | 6 + Doxyfile | 1222 +++++--- README.md | 2 +- doc/html/Doxygen.png | Bin 2049 -> 6015 bytes doc/html/annotated.html | 61 +- doc/html/bc_s.png | Bin 676 -> 0 bytes doc/html/bdwn.png | Bin 147 -> 0 bytes doc/html/classes.html | 61 +- doc/html/clipboard.js | 61 + doc/html/closed.png | Bin 132 -> 0 bytes doc/html/cookie.js | 58 + doc/html/darkmode_toggle.js | 228 ++ doc/html/dir_000001_000002.html | 112 + doc/html/dir_000002_000004.html | 112 + doc/html/dir_000005_000002.html | 112 + .../dir_11ec664f88f5f079ad4de1adb8458c37.html | 78 +- ...r_11ec664f88f5f079ad4de1adb8458c37_dep.md5 | 1 + ...r_11ec664f88f5f079ad4de1adb8458c37_dep.svg | 29 + .../dir_13e138d54eb8818da29c3992edef070a.html | 87 +- ...r_13e138d54eb8818da29c3992edef070a_dep.md5 | 1 + ...r_13e138d54eb8818da29c3992edef070a_dep.svg | 43 + .../dir_68267d1309a1af8e8297ef4c3efbcdba.html | 76 +- .../dir_b31d54d5631803016a26f28213a41162.html | 81 +- ...r_b31d54d5631803016a26f28213a41162_dep.md5 | 1 + ...r_b31d54d5631803016a26f28213a41162_dep.svg | 43 + .../dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html | 87 +- ...r_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.md5 | 1 + ...r_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.svg | 43 + .../dir_e68e8157741866f444e17edd764ebbae.html | 73 +- doc/html/doc.png | Bin 746 -> 0 bytes doc/html/doxygen.css | 2238 +++++++++----- doc/html/doxygen.svg | 4 +- doc/html/doxygen_crawl.html | 208 ++ doc/html/driver__ina219_8c.html | 321 +- doc/html/driver__ina219_8c__incl.md5 | 1 + doc/html/driver__ina219_8c__incl.svg | 111 + doc/html/driver__ina219_8c_source.html | 1962 ++++++------ doc/html/driver__ina219_8h.html | 297 +- doc/html/driver__ina219_8h__dep__incl.md5 | 1 + doc/html/driver__ina219_8h__dep__incl.svg | 229 ++ doc/html/driver__ina219_8h__incl.md5 | 1 + doc/html/driver__ina219_8h__incl.svg | 75 + doc/html/driver__ina219_8h_source.html | 620 ++-- doc/html/driver__ina219__basic_8c.html | 94 +- doc/html/driver__ina219__basic_8c__incl.md5 | 1 + doc/html/driver__ina219__basic_8c__incl.svg | 130 + doc/html/driver__ina219__basic_8c_source.html | 463 +-- doc/html/driver__ina219__basic_8h.html | 114 +- .../driver__ina219__basic_8h__dep__incl.md5 | 1 + .../driver__ina219__basic_8h__dep__incl.svg | 41 + doc/html/driver__ina219__basic_8h__incl.md5 | 1 + doc/html/driver__ina219__basic_8h__incl.svg | 112 + doc/html/driver__ina219__basic_8h_source.html | 123 +- doc/html/driver__ina219__interface_8h.html | 114 +- ...river__ina219__interface_8h__dep__incl.md5 | 1 + ...river__ina219__interface_8h__dep__incl.svg | 193 ++ .../driver__ina219__interface_8h__incl.md5 | 1 + .../driver__ina219__interface_8h__incl.svg | 94 + .../driver__ina219__interface_8h_source.html | 130 +- ...river__ina219__interface__template_8c.html | 109 +- ...__ina219__interface__template_8c__incl.md5 | 1 + ...__ina219__interface__template_8c__incl.svg | 112 + ...ina219__interface__template_8c_source.html | 150 +- doc/html/driver__ina219__read__test_8c.html | 84 +- .../driver__ina219__read__test_8c__incl.md5 | 1 + .../driver__ina219__read__test_8c__incl.svg | 131 + .../driver__ina219__read__test_8c_source.html | 1171 +++---- doc/html/driver__ina219__read__test_8h.html | 87 +- ...iver__ina219__read__test_8h__dep__incl.md5 | 1 + ...iver__ina219__read__test_8h__dep__incl.svg | 41 + .../driver__ina219__read__test_8h__incl.md5 | 1 + .../driver__ina219__read__test_8h__incl.svg | 112 + .../driver__ina219__read__test_8h_source.html | 102 +- .../driver__ina219__register__test_8c.html | 84 +- ...river__ina219__register__test_8c__incl.md5 | 1 + ...river__ina219__register__test_8c__incl.svg | 149 + ...ver__ina219__register__test_8c_source.html | 2731 +++++++++-------- .../driver__ina219__register__test_8h.html | 87 +- ...__ina219__register__test_8h__dep__incl.md5 | 1 + ...__ina219__register__test_8h__dep__incl.svg | 41 + ...river__ina219__register__test_8h__incl.md5 | 1 + ...river__ina219__register__test_8h__incl.svg | 112 + ...ver__ina219__register__test_8h_source.html | 102 +- doc/html/driver__ina219__shot_8c.html | 94 +- doc/html/driver__ina219__shot_8c__incl.md5 | 1 + doc/html/driver__ina219__shot_8c__incl.svg | 130 + doc/html/driver__ina219__shot_8c_source.html | 457 +-- doc/html/driver__ina219__shot_8h.html | 114 +- .../driver__ina219__shot_8h__dep__incl.md5 | 1 + .../driver__ina219__shot_8h__dep__incl.svg | 41 + doc/html/driver__ina219__shot_8h__incl.md5 | 1 + doc/html/driver__ina219__shot_8h__incl.svg | 112 + doc/html/driver__ina219__shot_8h_source.html | 123 +- doc/html/dynsections.js | 250 +- doc/html/favicon.svg | 20 + doc/html/files.html | 99 +- doc/html/folderclosed.png | Bin 616 -> 0 bytes doc/html/folderopen.png | Bin 597 -> 0 bytes doc/html/functions.html | 132 +- doc/html/functions_vars.html | 134 +- doc/html/globals.html | 581 +--- doc/html/globals_defs.html | 174 +- doc/html/globals_enum.html | 78 +- doc/html/globals_eval.html | 224 +- doc/html/globals_func.html | 265 +- doc/html/globals_type.html | 66 +- doc/html/graph_legend.html | 167 + doc/html/graph_legend.md5 | 1 + doc/html/graph_legend.svg | 167 + doc/html/group__ina219__basic__driver.html | 815 ++--- doc/html/group__ina219__basic__driver.md5 | 1 + doc/html/group__ina219__basic__driver.svg | 37 + doc/html/group__ina219__driver.html | 97 +- doc/html/group__ina219__driver.md5 | 1 + doc/html/group__ina219__driver.svg | 117 + doc/html/group__ina219__example__driver.html | 284 +- doc/html/group__ina219__example__driver.md5 | 1 + doc/html/group__ina219__example__driver.svg | 37 + ...83ceadd9ba0525f034b5f3b9aa80058_cgraph.md5 | 1 + ...83ceadd9ba0525f034b5f3b9aa80058_cgraph.svg | 39 + ...e812a052aa6bc8e73aff5ff1310210e_cgraph.md5 | 1 + ...e812a052aa6bc8e73aff5ff1310210e_cgraph.svg | 93 + ...ceea32b188cca0c2fb5e3391947946c_cgraph.md5 | 1 + ...ceea32b188cca0c2fb5e3391947946c_cgraph.svg | 315 ++ ...87b67aed8b0171c67ec0db171ec8085_cgraph.md5 | 1 + ...87b67aed8b0171c67ec0db171ec8085_cgraph.svg | 75 + ...2ddc7fe5d3e24cbd20eaa6957b2fecf_cgraph.md5 | 1 + ...2ddc7fe5d3e24cbd20eaa6957b2fecf_cgraph.svg | 39 + ...d4ee6c678f7f9a35cc582d8541497ae_cgraph.md5 | 1 + ...d4ee6c678f7f9a35cc582d8541497ae_cgraph.svg | 333 ++ doc/html/group__ina219__extern__driver.html | 125 +- doc/html/group__ina219__extern__driver.md5 | 1 + doc/html/group__ina219__extern__driver.svg | 37 + .../group__ina219__interface__driver.html | 187 +- doc/html/group__ina219__interface__driver.md5 | 1 + doc/html/group__ina219__interface__driver.svg | 37 + doc/html/group__ina219__link__driver.html | 244 +- doc/html/group__ina219__link__driver.md5 | 1 + doc/html/group__ina219__link__driver.svg | 37 + doc/html/group__ina219__test__driver.html | 124 +- doc/html/group__ina219__test__driver.md5 | 1 + doc/html/group__ina219__test__driver.svg | 37 + ...38f2304682f048f17519f4c88d4449c_cgraph.md5 | 1 + ...38f2304682f048f17519f4c88d4449c_cgraph.svg | 516 ++++ ...adaf875601015be4418d9a876c28a80_cgraph.md5 | 1 + ...adaf875601015be4418d9a876c28a80_cgraph.svg | 423 +++ doc/html/index.html | 65 +- doc/html/jquery.js | 197 +- doc/html/mainpage_8h.html | 68 +- doc/html/mainpage_8h_source.html | 63 +- doc/html/menu.js | 98 +- doc/html/menudata.js | 2 +- doc/html/nav_f.png | Bin 153 -> 0 bytes doc/html/nav_g.png | Bin 95 -> 0 bytes doc/html/nav_h.png | Bin 98 -> 0 bytes doc/html/navtree.css | 233 +- doc/html/navtree.js | 1245 +++++--- doc/html/navtreedata.js | 10 +- doc/html/navtreeindex0.js | 162 +- doc/html/navtreeindex1.js | 90 - doc/html/open.png | Bin 123 -> 0 bytes doc/html/resize.js | 140 - doc/html/search/all_0.html | 37 - doc/html/search/all_0.js | 4 +- doc/html/search/all_1.html | 37 - doc/html/search/all_1.js | 26 +- doc/html/search/all_2.html | 37 - doc/html/search/all_2.js | 143 +- doc/html/search/all_3.html | 37 - doc/html/search/all_3.js | 3 +- doc/html/search/all_4.html | 37 - doc/html/search/all_4.js | 6 +- doc/html/search/all_5.html | 37 - doc/html/search/all_5.js | 122 +- doc/html/search/all_6.html | 37 - doc/html/search/all_6.js | 6 +- doc/html/search/all_7.html | 37 - doc/html/search/all_7.js | 9 +- doc/html/search/all_8.js | 4 + doc/html/search/all_9.js | 7 + doc/html/search/all_a.js | 8 + doc/html/search/classes_0.html | 37 - doc/html/search/classes_0.js | 4 +- doc/html/search/close.svg | 31 - doc/html/search/defines_0.html | 37 - doc/html/search/defines_0.js | 2 +- doc/html/search/defines_1.html | 37 - doc/html/search/defines_1.js | 2 +- doc/html/search/defines_2.html | 37 - doc/html/search/defines_2.js | 12 +- doc/html/search/defines_3.html | 37 - doc/html/search/defines_3.js | 4 +- doc/html/search/defines_4.html | 37 - doc/html/search/defines_4.js | 4 +- doc/html/search/defines_5.html | 37 - doc/html/search/defines_5.js | 4 +- doc/html/search/enums_0.html | 37 - doc/html/search/enums_0.js | 10 +- doc/html/search/enumvalues_0.html | 37 - doc/html/search/enumvalues_0.js | 82 +- doc/html/search/files_0.html | 37 - doc/html/search/files_0.js | 24 +- doc/html/search/files_1.html | 37 - doc/html/search/files_1.js | 2 +- doc/html/search/functions_0.html | 37 - doc/html/search/functions_0.js | 82 +- doc/html/search/groups_0.html | 37 - doc/html/search/groups_0.js | 8 +- doc/html/search/groups_1.js | 4 + doc/html/search/groups_2.js | 5 + doc/html/search/groups_3.js | 4 + doc/html/search/groups_4.js | 11 + doc/html/search/groups_5.js | 4 + doc/html/search/groups_6.js | 4 + doc/html/search/mag_sel.svg | 74 - doc/html/search/nomatches.html | 13 - doc/html/search/pages_0.html | 37 - doc/html/search/pages_0.js | 2 +- doc/html/search/pages_1.js | 4 + doc/html/search/search.css | 253 +- doc/html/search/search.js | 1032 +++---- doc/html/search/search_l.png | Bin 567 -> 0 bytes doc/html/search/search_m.png | Bin 158 -> 0 bytes doc/html/search/search_r.png | Bin 553 -> 0 bytes doc/html/search/searchdata.js | 6 +- doc/html/search/typedefs_0.html | 37 - doc/html/search/typedefs_0.js | 4 +- doc/html/search/variables_0.html | 37 - doc/html/search/variables_0.js | 4 +- doc/html/search/variables_1.html | 37 - doc/html/search/variables_1.js | 6 +- doc/html/search/variables_2.html | 37 - doc/html/search/variables_2.js | 14 +- doc/html/search/variables_3.html | 37 - doc/html/search/variables_3.js | 4 +- doc/html/search/variables_4.html | 37 - doc/html/search/variables_4.js | 2 +- doc/html/search/variables_5.html | 37 - doc/html/search/variables_5.js | 4 +- doc/html/search/variables_6.html | 37 - doc/html/search/variables_6.js | 4 +- doc/html/splitbar.png | Bin 314 -> 0 bytes doc/html/structina219__handle__s.html | 148 +- doc/html/structina219__info__s.html | 141 +- doc/html/sync_off.png | Bin 853 -> 0 bytes doc/html/sync_on.png | Bin 845 -> 0 bytes doc/html/tab_a.png | Bin 142 -> 0 bytes doc/html/tab_b.png | Bin 169 -> 0 bytes doc/html/tab_h.png | Bin 177 -> 0 bytes doc/html/tab_s.png | Bin 184 -> 0 bytes doc/html/tabs.css | 2 +- doc/html/{modules.html => topics.html} | 73 +- doc/html/{modules.js => topics.js} | 2 +- doc/image/doxygen.png | Bin 2049 -> 6015 bytes doc/image/favicon.svg | 20 + .../raspberrypi4b_driver_ina219_interface.c | 4 +- 256 files changed, 17491 insertions(+), 11716 deletions(-) delete mode 100644 doc/html/bc_s.png delete mode 100644 doc/html/bdwn.png create mode 100644 doc/html/clipboard.js delete mode 100644 doc/html/closed.png create mode 100644 doc/html/cookie.js create mode 100644 doc/html/darkmode_toggle.js create mode 100644 doc/html/dir_000001_000002.html create mode 100644 doc/html/dir_000002_000004.html create mode 100644 doc/html/dir_000005_000002.html create mode 100644 doc/html/dir_11ec664f88f5f079ad4de1adb8458c37_dep.md5 create mode 100644 doc/html/dir_11ec664f88f5f079ad4de1adb8458c37_dep.svg create mode 100644 doc/html/dir_13e138d54eb8818da29c3992edef070a_dep.md5 create mode 100644 doc/html/dir_13e138d54eb8818da29c3992edef070a_dep.svg create mode 100644 doc/html/dir_b31d54d5631803016a26f28213a41162_dep.md5 create mode 100644 doc/html/dir_b31d54d5631803016a26f28213a41162_dep.svg create mode 100644 doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.md5 create mode 100644 doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.svg delete mode 100644 doc/html/doc.png create mode 100644 doc/html/doxygen_crawl.html create mode 100644 doc/html/driver__ina219_8c__incl.md5 create mode 100644 doc/html/driver__ina219_8c__incl.svg create mode 100644 doc/html/driver__ina219_8h__dep__incl.md5 create mode 100644 doc/html/driver__ina219_8h__dep__incl.svg create mode 100644 doc/html/driver__ina219_8h__incl.md5 create mode 100644 doc/html/driver__ina219_8h__incl.svg create mode 100644 doc/html/driver__ina219__basic_8c__incl.md5 create mode 100644 doc/html/driver__ina219__basic_8c__incl.svg create mode 100644 doc/html/driver__ina219__basic_8h__dep__incl.md5 create mode 100644 doc/html/driver__ina219__basic_8h__dep__incl.svg create mode 100644 doc/html/driver__ina219__basic_8h__incl.md5 create mode 100644 doc/html/driver__ina219__basic_8h__incl.svg create mode 100644 doc/html/driver__ina219__interface_8h__dep__incl.md5 create mode 100644 doc/html/driver__ina219__interface_8h__dep__incl.svg create mode 100644 doc/html/driver__ina219__interface_8h__incl.md5 create mode 100644 doc/html/driver__ina219__interface_8h__incl.svg create mode 100644 doc/html/driver__ina219__interface__template_8c__incl.md5 create mode 100644 doc/html/driver__ina219__interface__template_8c__incl.svg create mode 100644 doc/html/driver__ina219__read__test_8c__incl.md5 create mode 100644 doc/html/driver__ina219__read__test_8c__incl.svg create mode 100644 doc/html/driver__ina219__read__test_8h__dep__incl.md5 create mode 100644 doc/html/driver__ina219__read__test_8h__dep__incl.svg create mode 100644 doc/html/driver__ina219__read__test_8h__incl.md5 create mode 100644 doc/html/driver__ina219__read__test_8h__incl.svg create mode 100644 doc/html/driver__ina219__register__test_8c__incl.md5 create mode 100644 doc/html/driver__ina219__register__test_8c__incl.svg create mode 100644 doc/html/driver__ina219__register__test_8h__dep__incl.md5 create mode 100644 doc/html/driver__ina219__register__test_8h__dep__incl.svg create mode 100644 doc/html/driver__ina219__register__test_8h__incl.md5 create mode 100644 doc/html/driver__ina219__register__test_8h__incl.svg create mode 100644 doc/html/driver__ina219__shot_8c__incl.md5 create mode 100644 doc/html/driver__ina219__shot_8c__incl.svg create mode 100644 doc/html/driver__ina219__shot_8h__dep__incl.md5 create mode 100644 doc/html/driver__ina219__shot_8h__dep__incl.svg create mode 100644 doc/html/driver__ina219__shot_8h__incl.md5 create mode 100644 doc/html/driver__ina219__shot_8h__incl.svg create mode 100644 doc/html/favicon.svg delete mode 100644 doc/html/folderclosed.png delete mode 100644 doc/html/folderopen.png create mode 100644 doc/html/graph_legend.html create mode 100644 doc/html/graph_legend.md5 create mode 100644 doc/html/graph_legend.svg create mode 100644 doc/html/group__ina219__basic__driver.md5 create mode 100644 doc/html/group__ina219__basic__driver.svg create mode 100644 doc/html/group__ina219__driver.md5 create mode 100644 doc/html/group__ina219__driver.svg create mode 100644 doc/html/group__ina219__example__driver.md5 create mode 100644 doc/html/group__ina219__example__driver.svg create mode 100644 doc/html/group__ina219__example__driver_ga183ceadd9ba0525f034b5f3b9aa80058_cgraph.md5 create mode 100644 doc/html/group__ina219__example__driver_ga183ceadd9ba0525f034b5f3b9aa80058_cgraph.svg create mode 100644 doc/html/group__ina219__example__driver_ga3e812a052aa6bc8e73aff5ff1310210e_cgraph.md5 create mode 100644 doc/html/group__ina219__example__driver_ga3e812a052aa6bc8e73aff5ff1310210e_cgraph.svg create mode 100644 doc/html/group__ina219__example__driver_ga5ceea32b188cca0c2fb5e3391947946c_cgraph.md5 create mode 100644 doc/html/group__ina219__example__driver_ga5ceea32b188cca0c2fb5e3391947946c_cgraph.svg create mode 100644 doc/html/group__ina219__example__driver_gaa87b67aed8b0171c67ec0db171ec8085_cgraph.md5 create mode 100644 doc/html/group__ina219__example__driver_gaa87b67aed8b0171c67ec0db171ec8085_cgraph.svg create mode 100644 doc/html/group__ina219__example__driver_gae2ddc7fe5d3e24cbd20eaa6957b2fecf_cgraph.md5 create mode 100644 doc/html/group__ina219__example__driver_gae2ddc7fe5d3e24cbd20eaa6957b2fecf_cgraph.svg create mode 100644 doc/html/group__ina219__example__driver_gaed4ee6c678f7f9a35cc582d8541497ae_cgraph.md5 create mode 100644 doc/html/group__ina219__example__driver_gaed4ee6c678f7f9a35cc582d8541497ae_cgraph.svg create mode 100644 doc/html/group__ina219__extern__driver.md5 create mode 100644 doc/html/group__ina219__extern__driver.svg create mode 100644 doc/html/group__ina219__interface__driver.md5 create mode 100644 doc/html/group__ina219__interface__driver.svg create mode 100644 doc/html/group__ina219__link__driver.md5 create mode 100644 doc/html/group__ina219__link__driver.svg create mode 100644 doc/html/group__ina219__test__driver.md5 create mode 100644 doc/html/group__ina219__test__driver.svg create mode 100644 doc/html/group__ina219__test__driver_ga138f2304682f048f17519f4c88d4449c_cgraph.md5 create mode 100644 doc/html/group__ina219__test__driver_ga138f2304682f048f17519f4c88d4449c_cgraph.svg create mode 100644 doc/html/group__ina219__test__driver_gadadaf875601015be4418d9a876c28a80_cgraph.md5 create mode 100644 doc/html/group__ina219__test__driver_gadadaf875601015be4418d9a876c28a80_cgraph.svg delete mode 100644 doc/html/nav_f.png delete mode 100644 doc/html/nav_g.png delete mode 100644 doc/html/nav_h.png delete mode 100644 doc/html/navtreeindex1.js delete mode 100644 doc/html/open.png delete mode 100644 doc/html/resize.js delete mode 100644 doc/html/search/all_0.html delete mode 100644 doc/html/search/all_1.html delete mode 100644 doc/html/search/all_2.html delete mode 100644 doc/html/search/all_3.html delete mode 100644 doc/html/search/all_4.html delete mode 100644 doc/html/search/all_5.html delete mode 100644 doc/html/search/all_6.html delete mode 100644 doc/html/search/all_7.html create mode 100644 doc/html/search/all_8.js create mode 100644 doc/html/search/all_9.js create mode 100644 doc/html/search/all_a.js delete mode 100644 doc/html/search/classes_0.html delete mode 100644 doc/html/search/close.svg delete mode 100644 doc/html/search/defines_0.html delete mode 100644 doc/html/search/defines_1.html delete mode 100644 doc/html/search/defines_2.html delete mode 100644 doc/html/search/defines_3.html delete mode 100644 doc/html/search/defines_4.html delete mode 100644 doc/html/search/defines_5.html delete mode 100644 doc/html/search/enums_0.html delete mode 100644 doc/html/search/enumvalues_0.html delete mode 100644 doc/html/search/files_0.html delete mode 100644 doc/html/search/files_1.html delete mode 100644 doc/html/search/functions_0.html delete mode 100644 doc/html/search/groups_0.html create mode 100644 doc/html/search/groups_1.js create mode 100644 doc/html/search/groups_2.js create mode 100644 doc/html/search/groups_3.js create mode 100644 doc/html/search/groups_4.js create mode 100644 doc/html/search/groups_5.js create mode 100644 doc/html/search/groups_6.js delete mode 100644 doc/html/search/mag_sel.svg delete mode 100644 doc/html/search/nomatches.html delete mode 100644 doc/html/search/pages_0.html create mode 100644 doc/html/search/pages_1.js delete mode 100644 doc/html/search/search_l.png delete mode 100644 doc/html/search/search_m.png delete mode 100644 doc/html/search/search_r.png delete mode 100644 doc/html/search/typedefs_0.html delete mode 100644 doc/html/search/variables_0.html delete mode 100644 doc/html/search/variables_1.html delete mode 100644 doc/html/search/variables_2.html delete mode 100644 doc/html/search/variables_3.html delete mode 100644 doc/html/search/variables_4.html delete mode 100644 doc/html/search/variables_5.html delete mode 100644 doc/html/search/variables_6.html delete mode 100644 doc/html/splitbar.png delete mode 100644 doc/html/sync_off.png delete mode 100644 doc/html/sync_on.png delete mode 100644 doc/html/tab_a.png delete mode 100644 doc/html/tab_b.png delete mode 100644 doc/html/tab_h.png delete mode 100644 doc/html/tab_s.png rename doc/html/{modules.html => topics.html} (56%) rename doc/html/{modules.js => topics.js} (86%) create mode 100644 doc/image/favicon.svg diff --git a/CHANGELOG.md b/CHANGELOG.md index 60c8928..318fac9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.0.6 (2025-10-26) + +## Features + +- update doxygen + ## 1.0.5 (2025-04-16) ## Bug Fixes diff --git a/Doxyfile b/Doxyfile index 82654f1..00c9020 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 INA219" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.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 = "INA219 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 23bff96..d45c234 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The INA219 is a current shunt and power monitor with an I2C- or SMBUS-compatible interface. The device monitors both shunt voltage drop and bus supply voltage, with programmable conversion times and filtering. A programmable calibration value, combined with an internal multiplier, enables direct readouts of current in amperes. An additional multiplying register calculates power in watts. The I2C- or SMBUS-compatible interface features 16 programmable addresses.The INA219 senses across shunts on buses that can vary from 0 to 26 V. The device uses a single 3- to 5.5-V supply, drawing a maximum of 1 mA of supply current.This chip can be used in servers,telecom equipment,notebook computers,power management,battery chargers,welding equipment,power supplies,test equipment and so on. -LibDriver INA219 is a full-featured driver of INA219 launched by LibDriver.It provides continuous mode reading, single mode reading, current acquisition, voltage acquisition and power acquisition.LibDriver is MISRA compliant. +LibDriver INA219 is a full-featured driver for INA219, launched by LibDriver.It provides continuous reading, single reading, current acquisition, voltage acquisition, power acquisition and additional features. LibDriver is MISRA compliant. ### Table of Contents diff --git a/doc/html/Doxygen.png b/doc/html/Doxygen.png index 94a300ab28944b01433531cdd823a7508963ce94..786d7ac74881bd34b9f9c5a6434a19fe94e04375 100644 GIT binary patch literal 6015 zcmbVP2UJtr(mqIUVxfv?2%r>`kN}|ukRl+2j#R-ALN6f+9chAqil|fp=^dnq(m@3Q z>AfQzK}3q6!Ug3IUa#xDf8AHs%UUPd=j?B0zL{_KtdmGxZ8c_wGYkL#Fl(r*=#zit zjxIVH0H8qce^>+n1{nusWnH4ani5DuRT&AFMj{~yC>#LPBcB*}nHYF+$bXw&dwn$` z=w4ZZb1(qrTjMo|&wsxS&1nenz!S3vZ#~uj9Yw&$<7IceZ9pSEM;M zMzOg&{-{szr9BX&Xa$v(9hl+%5t=|5BsgvS^jOol^X_4KM}j&IP?rLv=t9T+0siv< zf`B`v>VFnUWE@~S+agpg4wa_>hIKb%d;KT!QhKKhUQ<7|rT_}7D^wl`>27KRCTV;e z3_#flK=AEJdLl)c6L2Gzx0jXTMk(8i$4Zt+;C^mIXXt?;kOBevvil!e08>oBDaaCI z<18ceH1v^B(!8w(yQZp80iu#?CdFlWz6nE1M-&T1JT{VwPV0$b7@I2AqSvYCoF(?A zrRVm=^Q?4wJR`ajo;|Co+*is!^xb92*!(KycW$d)EOhw0+SX<+QVf;D3Y zh1uva`>8+pY@c&0N}o^9`F1zJm?*iEB91gs8v&9-W0 zmN5HtF+QJ}xXd%S6-4+np*TBDZ-3s&)l%hyQpUp{=LW%H?Mel@T^!G_Doqv-rNX+q zPcf<>^x_jCrw%WkKE#b%ZTgf@1nKQlByK;woRdI5*8469t4pCdm4pB8HKX(vo<3G@ z($L>aJfu&n-0M}m%NFgd*O4dVY9pQuOL*@uZ%`~S8+@$e6&1RVT3M7*q>R=MPpPvR z2BN!V9}({JD%|ibmC#}n!i1Sxmns<}Yp5tOq{JiMgs~69;?MNF7N}~HD1!4LU*`h}^^^J`h9JKOGK=Pm zf`l_QK|8#X4|#2v_Sk&xS_?AcGG+4V9d8kIVd9)oSC%t{R+LEeNztxKoqcC^KocRU zS6~_6S3rMoK6wRXSzppRU(qDR$-&rss?0{~&eK;6<@&`mPH!g4p=-j(2-NH8Svo12 z`%x85HFL-C74H61N>dC|S1hR4ffDM`$hte+O;HQ-vmd-&>IJ6R&PPNy=gktgsCV@b z5ZO7{Pyet3pN<4f# z5u4&z-(20f8y8uiQQR&Qb1f!3_e^eZuBH~Z)<$A~w_F!{(s1H+v5SesuEB1vB&$kA z$XSR!L>S@=(bK%B`EW_Qv(aJK0Xq0*&@uOVRi>$r>5_?r3A1TMv2yWtvH8=q3C?l; zG3W9R&-QM7v`@yEJNZp&cSGModrRJ}8~ZW(HQvnmEfrVv5)6I`6t-lJxt}t;6j`?|sL< za7c<&k*a*F!o{@g=kqy zP)q%tFOiT)o_iIM=I6YGEJZ9?XW|vLA~ePlMB!~-Jzu5yBJW31M^X~e%g`i0OzKGe zJ)gE^k>2HQg-4+}chH48zHN*P!y*AG?%27{JVU@fvk$CZOR1NIX zOM9cQ58|>|sm1R%xjU4RtdNgTl6C0TSPh$Z1hGA{J>8zJl#Z0q8hDKwdja$mY}L}a z+`DHSfFTzzxiaccJ)j3m&`9H?z6~Pw_RO9!Fm%Lb3?No zSH8f7meRFG;r-Qx+(k61MZ2XAc^Y|FlEryzjF7JK!bYQgbENMnWO8hhp{ij_K5##5 z;6u)^tf1_oEKR3U$3#a|hh)ObBK4;$r8_0gg##rMx?ddgZY;-LPpvys*&iVMQ zk)e^-mAjRVS(nvhC*DmYzpVNZa0vg7jcXf@=15CVd8@FswfHFJbRK_RYKpcrY6|{x z;p^jSu~8X58NVKyG*n>E#?)hIX-UlTyWaD4v%YgHsy!_un%W6wwLEpnf%t=rnzn+x zoY9)9PtQ7+zBY2*yjbFGA$@ard9}tVcoh1jcXfk15rtpyo&WNhJA|9X&34M)Q)GE$ z@sp9)rWeCT;S{7H?`G+Hwe9oCG*4)vS@xJbW}<5Y{Sp-pcJtQKrlS@W(iH@GhPj{m z*&l9>CC-d3sS(db$;Hd1`s;62to9n|bf*S*Idg-#(oWQJC6G+}m1k`xd&r-;y7x zM1G~D$E%wX0RYN(bWwQcD0l(@b)$o!3CRSlC4+TyfnsdjtZ`6p7d#nFeg#$V#$&Kf zI1Et+WPgU7-2aYQ!{0v4z0 zNv6qnlnq`+nSjHP+z5tlZq9!xrTZ6U5CRE>!$E?^4z4zCUPPgPu)wKcNH`SuNHz#u z6oL>pL?C3~5;6#B5m6}_QPDr4Xg3=NTc5v!ii?s({wFB8X>2eg%zp&iU}bFG2rd|M z#ttqRI~)w}Y6k}WuA_{yo3k5%9GJ{b>?aE}T1LZ_NW!>caT+QpFga9D4PjBsXK3%{Xe<+#TUa?I50(-k-YceI$loenR#j5gc}&*Y!~p_~=s&VlF4 z=VWEmEmD%;)MHY*T3<_0G0!W(X?u*Gs(r zF6l#ER#E?kS>ljgcdW%Vb?`1d?0m!9`X)T=u*5Q{Nz7A2I zgIt_=7eJwC#c$xx{7Musc7J)iFE%jbJjzs~Y&_SWRn1#!=1`p4FkzI^o8#3(&n4zH zc72*pbn)mZP7V7Cp|y_M;FBmYKDUP&t8>Zca5q4Ie@?Q0&X+h58OA8ec=@p|{3LiY$fQ5jPuQL8O0 zYNnsjtBj&u6L0&$Frl;kc-?V{#e-DVvzp$oPO@ZM`lt!C?!GrsX}odznetAy)2`KG znLL%+M3_s{w+n1cih)2y?9j=z(#6Z4DVjblCM_5V(XO(0Ts9A?tYkBvY|q2C4Yk^s z^8`7c__X9hOIfgQ!mx1}tu0f=jkc#7)le14|HHctn)YoqfODj0T)i3oX&nMg6Iid&6>zJh-IU*%87p9c} zB!;Y2GrcN0IK0f>)F$kdXPEM4=Yeihw2AP88w$dH;AG|tz;0-7p2aZsY!S}{#k{!% zvzC>ikCEZmLZj3J1@(rzUwzIVCab=9`#LlRYZ_GksDshWVpuCswGD%%n|q-}>j|1`P^Oa<8@9dEYTFiA4rcB;o0j`|HHJN3_S3YS19F+F@ zd#y={YfDls9OewCo%+%0#Ehm2#6%-W>(_h?#?peH zyxz2LZO?F)j1L>*esnxcLN8}S^tPH=MrhOUxfbQ~`0kwW zQu?vd`~0R>Uq-^B<27xMYgKjZrC#Y>Y4p`4l)RGrIX?u)4}(!$VoOZm?$Su)sZ=hR>d!RMyiTthnYdGpEC=eFgGw zyd(6B1?Za(?B8*6D^X|b=Vvs!l!X=9Xwo%@#cqJDys8X4<5uT&Yv9e+o?@_dTBm@p zSA_37)YqrG5^~(xJ8rpWU(C&WecJE=!iSfUt3!LiK54QxBu@i>zby#HHc+)c_T!jH z=!mSSX#a6jRkRrT+4{Y!+*(Fe9}~8&hZ`#QC0{wzudImcN8Iv~%DTB-9gvv$npP) zZLA(e6@VXT0hJ2YV2i{AN0L?oKOmPH3??94O{0;ZLTKf~POv2iL_!d21hf)kE7;WU z(Eb<_V}M?WiBM@u3pIg+pf~b^QhLEo2;b$i_9{wRFuOZ9-oBZ$`|i%{zHiGs$(x(Z ze$3f9JG1AUIWw0;B9TZW5{X12kw_#Gi9{liNF>_lkfCm4V`l)z1M`6sfMb9U1G9i5 zfZf2P`#lFd1w4&byN5vfz8EeA82bU>bHG{dw*WZ2!JRT?`~}zoJcL%ywjga32Co2P z4+YKyE&?t9j%uNn$AI4h>(Odg3-@o#;1p22?Mr~`-0;!`dx1NEm1y9WXS1O0mhyU{2Dm1(|TpH9jp~wXvpr!L+XcV;AHf zKlo%HXJ?JN8TbRR39VjkSm#XObl^PT8^Fi=yz=L6SlZjD-UhU*0Anu&*7adZz7G5n zSlhVKWf?MGVifo;a84grWajJF(CUq-atO4i0Ap_gR#cqzRzCg~4gas!Wcj~Lp8a%WJhXWA4cz5#jp#7_4*7pTzUPXVL2Uw#1050AsHJep_-zX3<=TRxd`aHw0rZcNW@V z!dQzD8&$_q0Nf7D5sr-kSD@9tNOiS?R^z~zfVYMF zuW&w1RKgWtY!*;kC>-7DhMnPV{3*10B=4zyX5^Neu}#9`B4G+Jb~f-c;pi*CVzhcE znzUV@)xFMF@Np7wO-w05dq8IEf6P;!MH?4I_iDT2ht4DRaU;ea6HAij3MhoQN;tX> zt+qD4_n;|;%w@oTJ(6UW($%pf4Cw*a2@%I#xrck8qt!${apUJZ82gbJPuNTW#(og^ zws7>PX!T~0RKvq6z&DI$Ui8u!QqF96-B(?9LNA%HxAk=gV|@X!ooKbQ;k6R|-P4Cw zZ)5Blp(kkImPYrTMpFeW5z1HRLib1JHTSaIy>(Uiu9Y#_JPzaTw;8R*YFzyr=Y$>I zQ+{IZ7ijg@TC(&|e+V*mju6h>=Q0n5l@a%0U5~MEU~E;iwm_>%=jHoY9Qv$Hz5!Pbh!9sQ{gj`6XIq*41exy|VUoKQPg0Y_}5oL#qarH7kMEtr6kn(FLLWJm)!UvGPSMvOD zF`4AcvM!t0ucWR5q|D_`a%dtVIbu~Nsc-m_rZM}Xt^#_!!6~GvykSM^0V5Ui`kr&9 z%k*wUT?HH=l>fV_00W_EY)F35I#YlzK8{P0eLo-#!Hts*>MB6WjcH?5OMCPee(>RY z&b=Yo9(5HUb-|A|6<|O}V||r3?^E1l$RpHMz)M28$2 zAT8$^mK8766vL0?^_KO3`9c(UM~FCe6(BiWr-TU6F)M|kWURtEI#nnSiUQPAK#{}$ z56_W#7#rjfc7n0DmAw6BfjHbeh>s^iL~jy~meNh?%+q#DHivBN10{{W$`eWLMOs}G zlz!7>PB;_vGEe#WB{N6;GV11UV_iGqeq}+n@ydB(aTiZLQWb*sK!Pt2vNyfj3(f9-@K&#i>#v4ACVr)>l#y}}n*RK`kKPKI($|!^` z&{*Zx{q}N5p3Z0Npthq4Wrf>B%E!&_<%>d?0*Z0|dg18Y+)RtSrmA&}{R;2{p_*;6 z4U9PJgpIwwWTD=eTPrsF3-ydW!#P(zQ+l6UH6LtxPAAqf)g{jQ@sXu^{LYQ5!;7(5 z$l}jJy&~=_$?w^g@95aVHU*^JQVzD=Ql?1z1@%qZG0V>ZzGK!DY0tPy(yod7 zbCB(tI7QkwR3z=3`@YyYcRFeB=>15$rw^F){{se0`VSfdCjAeYL?V$$Boc{4B9TZW f5{X2j3xNLtYfLWC+4bhf00000NkvXXu0mjfov-KK diff --git a/doc/html/annotated.html b/doc/html/annotated.html index d34babd..5646a23 100644 --- a/doc/html/annotated.html +++ b/doc/html/annotated.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: Data Structures + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
Data Structures
+
Data Structures
Here are the data structures with brief descriptions:
- +
 Cina219_handle_sIna219 handle structure definition
 Cina219_info_sIna219 information structure definition
 Cina219_info_sIna219 information structure definition
+
diff --git a/doc/html/bc_s.png b/doc/html/bc_s.png deleted file mode 100644 index 224b29aa9847d5a4b3902efd602b7ddf7d33e6c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 676 zcmV;V0$crwP)y__>=_9%My z{n931IS})GlGUF8K#6VIbs%684A^L3@%PlP2>_sk`UWPq@f;rU*V%rPy_ekbhXT&s z(GN{DxFv}*vZp`F>S!r||M`I*nOwwKX+BC~3P5N3-)Y{65c;ywYiAh-1*hZcToLHK ztpl1xomJ+Yb}K(cfbJr2=GNOnT!UFA7Vy~fBz8?J>XHsbZoDad^8PxfSa0GDgENZS zuLCEqzb*xWX2CG*b&5IiO#NzrW*;`VC9455M`o1NBh+(k8~`XCEEoC1Ybwf;vr4K3 zg|EB<07?SOqHp9DhLpS&bzgo70I+ghB_#)K7H%AMU3v}xuyQq9&Bm~++VYhF09a+U zl7>n7Jjm$K#b*FONz~fj;I->Bf;ule1prFN9FovcDGBkpg>)O*-}eLnC{6oZHZ$o% zXKW$;0_{8hxHQ>l;_*HATI(`7t#^{$(zLe}h*mqwOc*nRY9=?Sx4OOeVIfI|0V(V2 zBrW#G7Ss9wvzr@>H*`r>zE z+e8bOBgqIgldUJlG(YUDviMB`9+DH8n-s9SXRLyJHO1!=wY^79WYZMTa(wiZ!zP66 zA~!21vmF3H2{ngD;+`6j#~6j;$*f*G_2ZD1E;9(yaw7d-QnSCpK(cR1zU3qU0000< KMNUMnLSTYoA~SLT diff --git a/doc/html/bdwn.png b/doc/html/bdwn.png deleted file mode 100644 index 940a0b950443a0bb1b216ac03c45b8a16c955452..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H!3HEvS)PKZC{Gv1kP61Pb5HX&C2wk~_T - + - - + + LibDriver INA219: Data Structure Index + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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 98cc2c909da37a6df914fbf67780eebd99c597f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{V-kvUwAr*{o@8{^CZMh(5KoB^r_<4^zF@3)Cp&&t3hdujKf f*?bjBoY!V+E))@{xMcbjXe@)LtDnm{r-UW|*e5JT 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..8ce262a --- /dev/null +++ b/doc/html/dir_000001_000002.html @@ -0,0 +1,112 @@ + + + + + + + +LibDriver INA219: example -> interface Relation + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
LibDriver INA219 +
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+

example → interface Relation

File in exampleIncludes file in interface
driver_ina219_basic.hdriver_ina219_interface.h
driver_ina219_shot.hdriver_ina219_interface.h
+
+ +
+ + + + diff --git a/doc/html/dir_000002_000004.html b/doc/html/dir_000002_000004.html new file mode 100644 index 0000000..8b03b72 --- /dev/null +++ b/doc/html/dir_000002_000004.html @@ -0,0 +1,112 @@ + + + + + + + +LibDriver INA219: interface -> src Relation + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
LibDriver INA219 +
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+

interface → src Relation

File in interfaceIncludes file in src
driver_ina219_interface.hdriver_ina219.h
+
+ +
+ + + + diff --git a/doc/html/dir_000005_000002.html b/doc/html/dir_000005_000002.html new file mode 100644 index 0000000..4f26ec9 --- /dev/null +++ b/doc/html/dir_000005_000002.html @@ -0,0 +1,112 @@ + + + + + + + +LibDriver INA219: test -> interface Relation + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
LibDriver INA219 +
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ + +
+ +
+ + + + diff --git a/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37.html b/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37.html index 0649767..642c5ad 100644 --- a/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37.html +++ b/doc/html/dir_11ec664f88f5f079ad4de1adb8458c37.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: doc/mainpage Directory Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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 e4f1f6c..dc02dcb 100644 --- a/doc/html/dir_13e138d54eb8818da29c3992edef070a.html +++ b/doc/html/dir_13e138d54eb8818da29c3992edef070a.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: test Directory Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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_ina219_read_test.c [code]
 
driver_ina219_read_test.c
 driver ina219 read test source file
 
file  driver_ina219_read_test.h [code]
 
file  driver_ina219_register_test.c [code]
 
driver_ina219_read_test.h
 
driver_ina219_register_test.c
 driver ina219 register test source file
 
file  driver_ina219_register_test.h [code]
 
 
driver_ina219_register_test.h
+ +
diff --git a/doc/html/dir_13e138d54eb8818da29c3992edef070a_dep.md5 b/doc/html/dir_13e138d54eb8818da29c3992edef070a_dep.md5 new file mode 100644 index 0000000..a034518 --- /dev/null +++ b/doc/html/dir_13e138d54eb8818da29c3992edef070a_dep.md5 @@ -0,0 +1 @@ +561255dfe2ca9677cc33aa8cae3ba90d \ 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..27abe99 --- /dev/null +++ b/doc/html/dir_13e138d54eb8818da29c3992edef070a_dep.svg @@ -0,0 +1,43 @@ + + + + + + +test + + +dir_13e138d54eb8818da29c3992edef070a + + +test + + + + + +dir_b31d54d5631803016a26f28213a41162 + + +interface + + + + + +dir_13e138d54eb8818da29c3992edef070a->dir_b31d54d5631803016a26f28213a41162 + + + + + + +2 + + + + + diff --git a/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html index c994487..51bdba5 100644 --- a/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: src Directory Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
src Directory Reference
+
src Directory Reference
- - + - - + -

+

Files

file  driver_ina219.c [code]
 
driver_ina219.c
 driver ina219 source file
 
file  driver_ina219.h [code]
 
driver_ina219.h
 driver ina219 header file
 
+ +
diff --git a/doc/html/dir_b31d54d5631803016a26f28213a41162.html b/doc/html/dir_b31d54d5631803016a26f28213a41162.html index d783e60..f60e196 100644 --- a/doc/html/dir_b31d54d5631803016a26f28213a41162.html +++ b/doc/html/dir_b31d54d5631803016a26f28213a41162.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: interface Directory Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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_ina219_interface.h [code]
 
driver_ina219_interface.h
 driver ina219 interface header file
 
file  driver_ina219_interface_template.c [code]
 
driver_ina219_interface_template.c
 driver ina219 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 b56c258..f96e75e 100644 --- a/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html +++ b/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: example Directory Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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_ina219_basic.c [code]
 
driver_ina219_basic.c
 driver ina219 basic source file
 
file  driver_ina219_basic.h [code]
 
file  driver_ina219_shot.c [code]
 
driver_ina219_basic.h
 
driver_ina219_shot.c
 driver ina219 shot source file
 
file  driver_ina219_shot.h [code]
 
 
driver_ina219_shot.h
+ +
diff --git a/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.md5 b/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.md5 new file mode 100644 index 0000000..e4347ec --- /dev/null +++ b/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.md5 @@ -0,0 +1 @@ +56b6c1f9362904fe68ca8b4446bc7db9 \ 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..fee1c8e --- /dev/null +++ b/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0_dep.svg @@ -0,0 +1,43 @@ + + + + + + +example + + +dir_cfafba98a580ce4b62f8a6fa96d7cbb0 + + +example + + + + + +dir_b31d54d5631803016a26f28213a41162 + + +interface + + + + + +dir_cfafba98a580ce4b62f8a6fa96d7cbb0->dir_b31d54d5631803016a26f28213a41162 + + + + + + +2 + + + + + diff --git a/doc/html/dir_e68e8157741866f444e17edd764ebbae.html b/doc/html/dir_e68e8157741866f444e17edd764ebbae.html index 7d3d74e..0ae0032 100644 --- a/doc/html/dir_e68e8157741866f444e17edd764ebbae.html +++ b/doc/html/dir_e68e8157741866f444e17edd764ebbae.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: doc Directory Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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 17edabff95f7b8da13c9516a04efe05493c29501..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 746 zcmV7=@pnbNXRFEm&G8P!&WHG=d)>K?YZ1bzou)2{$)) zumDct!>4SyxL;zgaG>wy`^Hv*+}0kUfCrz~BCOViSb$_*&;{TGGn2^x9K*!Sf0=lV zpP=7O;GA0*Jm*tTYj$IoXvimpnV4S1Z5f$p*f$Db2iq2zrVGQUz~yq`ahn7ck(|CE z7Gz;%OP~J6)tEZWDzjhL9h2hdfoU2)Nd%T<5Kt;Y0XLt&<@6pQx!nw*5`@bq#?l*?3z{Hlzoc=Pr>oB5(9i6~_&-}A(4{Q$>c>%rV&E|a(r&;?i5cQB=} zYSDU5nXG)NS4HEs0it2AHe2>shCyr7`6@4*6{r@8fXRbTA?=IFVWAQJL&H5H{)DpM#{W(GL+Idzf^)uRV@oB8u$ z8v{MfJbTiiRg4bza<41NAzrl{=3fl_D+$t+^!xlQ8S}{UtY`e z;;&9UhyZqQRN%2pot{*Ei0*4~hSF_3AH2@fKU!$NSflS>{@tZpDT4`M2WRTTVH+D? z)GFlEGGHe?koB}i|1w45!BF}N_q&^HJ&-tyR{(afC6H7|aml|tBBbv}55C5DNP8p3 z)~jLEO4Z&2hZmP^i-e%(@d!(E|KRafiU8Q5u(wU((j8un3OR*Hvj+t 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..0fbc767 --- /dev/null +++ b/doc/html/doxygen_crawl.html @@ -0,0 +1,208 @@ + + + +Validator / crawler helper + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/html/driver__ina219_8c.html b/doc/html/driver__ina219_8c.html index e4fcffa..ee6514e 100644 --- a/doc/html/driver__ina219_8c.html +++ b/doc/html/driver__ina219_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: src/driver_ina219.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ina219.c File Reference
+
driver_ina219.c File Reference
@@ -96,127 +99,91 @@ More...

#include "driver_ina219.h"
#include <math.h>
+
+Include dependency graph for driver_ina219.c:
+
+
+

Go to the source code of this file.

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

+

Macros

#define CHIP_NAME   "Texas Instruments INA219"
 chip information definition More...
 
#define MANUFACTURER_NAME   "Texas Instruments"
 
#define SUPPLY_VOLTAGE_MIN   3.0f
 
#define SUPPLY_VOLTAGE_MAX   5.5f
 
#define MAX_CURRENT   1.0f
 
#define TEMPERATURE_MIN   -25.0f
 
#define TEMPERATURE_MAX   85.0f
 
#define DRIVER_VERSION   1000
 
#define INA219_REG_CONF   0x00
 chip register definition More...
 
#define INA219_REG_SHUNT_VOLTAGE   0x01
 
#define INA219_REG_BUS_VOLTAGE   0x02
 
#define INA219_REG_POWER   0x03
 
#define INA219_REG_CURRENT   0x04
 
#define INA219_REG_CALIBRATION   0x05
 
#define CHIP_NAME   "Texas Instruments INA219"
 chip information definition
#define MANUFACTURER_NAME   "Texas Instruments"
#define SUPPLY_VOLTAGE_MIN   3.0f
#define SUPPLY_VOLTAGE_MAX   5.5f
#define MAX_CURRENT   1.0f
#define TEMPERATURE_MIN   -25.0f
#define TEMPERATURE_MAX   85.0f
#define DRIVER_VERSION   1000
#define INA219_REG_CONF   0x00
 chip register definition
#define INA219_REG_SHUNT_VOLTAGE   0x01
#define INA219_REG_BUS_VOLTAGE   0x02
#define INA219_REG_POWER   0x03
#define INA219_REG_CURRENT   0x04
#define INA219_REG_CALIBRATION   0x05
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ina219_set_resistance (ina219_handle_t *handle, double resistance)
 set the resistance More...
 
uint8_t ina219_get_resistance (ina219_handle_t *handle, double *resistance)
 get the resistance More...
 
uint8_t ina219_set_addr_pin (ina219_handle_t *handle, ina219_address_t addr_pin)
 set the iic address pin More...
 
uint8_t ina219_get_addr_pin (ina219_handle_t *handle, ina219_address_t *addr_pin)
 get the iic address pin More...
 
uint8_t ina219_soft_reset (ina219_handle_t *handle)
 soft reset the chip More...
 
uint8_t ina219_set_bus_voltage_range (ina219_handle_t *handle, ina219_bus_voltage_range_t range)
 set the bus voltage range More...
 
uint8_t ina219_get_bus_voltage_range (ina219_handle_t *handle, ina219_bus_voltage_range_t *range)
 get the bus voltage range More...
 
uint8_t ina219_set_pga (ina219_handle_t *handle, ina219_pga_t pga)
 set the pga More...
 
uint8_t ina219_get_pga (ina219_handle_t *handle, ina219_pga_t *pga)
 get the pga More...
 
uint8_t ina219_set_bus_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t mode)
 set the bus voltage adc mode More...
 
uint8_t ina219_get_bus_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t *mode)
 get the bus voltage adc mode More...
 
uint8_t ina219_set_shunt_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t mode)
 set the shunt voltage adc mode More...
 
uint8_t ina219_get_shunt_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t *mode)
 get the shunt voltage adc mode More...
 
uint8_t ina219_set_mode (ina219_handle_t *handle, ina219_mode_t mode)
 set the mode More...
 
uint8_t ina219_get_mode (ina219_handle_t *handle, ina219_mode_t *mode)
 get the mode More...
 
uint8_t ina219_read_shunt_voltage (ina219_handle_t *handle, int16_t *raw, float *mV)
 read the shunt voltage More...
 
uint8_t ina219_read_bus_voltage (ina219_handle_t *handle, uint16_t *raw, float *mV)
 read the bus voltage More...
 
uint8_t ina219_read_current (ina219_handle_t *handle, int16_t *raw, float *mA)
 read the current More...
 
uint8_t ina219_read_power (ina219_handle_t *handle, uint16_t *raw, float *mW)
 read the power More...
 
uint8_t ina219_get_calibration (ina219_handle_t *handle, uint16_t *data)
 get the calibration More...
 
uint8_t ina219_calculate_calibration (ina219_handle_t *handle, uint16_t *calibration)
 calculate the calibration More...
 
uint8_t ina219_set_calibration (ina219_handle_t *handle, uint16_t data)
 set the calibration More...
 
uint8_t ina219_init (ina219_handle_t *handle)
 initialize the chip More...
 
uint8_t ina219_deinit (ina219_handle_t *handle)
 close the chip More...
 
uint8_t ina219_set_reg (ina219_handle_t *handle, uint8_t reg, uint16_t data)
 set the chip register More...
 
uint8_t ina219_get_reg (ina219_handle_t *handle, uint8_t reg, uint16_t *data)
 get the chip register More...
 
uint8_t ina219_info (ina219_info_t *info)
 get chip's information More...
 
uint8_t ina219_set_resistance (ina219_handle_t *handle, double resistance)
 set the resistance
uint8_t ina219_get_resistance (ina219_handle_t *handle, double *resistance)
 get the resistance
uint8_t ina219_set_addr_pin (ina219_handle_t *handle, ina219_address_t addr_pin)
 set the iic address pin
uint8_t ina219_get_addr_pin (ina219_handle_t *handle, ina219_address_t *addr_pin)
 get the iic address pin
uint8_t ina219_soft_reset (ina219_handle_t *handle)
 soft reset the chip
uint8_t ina219_set_bus_voltage_range (ina219_handle_t *handle, ina219_bus_voltage_range_t range)
 set the bus voltage range
uint8_t ina219_get_bus_voltage_range (ina219_handle_t *handle, ina219_bus_voltage_range_t *range)
 get the bus voltage range
uint8_t ina219_set_pga (ina219_handle_t *handle, ina219_pga_t pga)
 set the pga
uint8_t ina219_get_pga (ina219_handle_t *handle, ina219_pga_t *pga)
 get the pga
uint8_t ina219_set_bus_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t mode)
 set the bus voltage adc mode
uint8_t ina219_get_bus_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t *mode)
 get the bus voltage adc mode
uint8_t ina219_set_shunt_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t mode)
 set the shunt voltage adc mode
uint8_t ina219_get_shunt_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t *mode)
 get the shunt voltage adc mode
uint8_t ina219_set_mode (ina219_handle_t *handle, ina219_mode_t mode)
 set the mode
uint8_t ina219_get_mode (ina219_handle_t *handle, ina219_mode_t *mode)
 get the mode
uint8_t ina219_read_shunt_voltage (ina219_handle_t *handle, int16_t *raw, float *mV)
 read the shunt voltage
uint8_t ina219_read_bus_voltage (ina219_handle_t *handle, uint16_t *raw, float *mV)
 read the bus voltage
uint8_t ina219_read_current (ina219_handle_t *handle, int16_t *raw, float *mA)
 read the current
uint8_t ina219_read_power (ina219_handle_t *handle, uint16_t *raw, float *mW)
 read the power
uint8_t ina219_get_calibration (ina219_handle_t *handle, uint16_t *data)
 get the calibration
uint8_t ina219_calculate_calibration (ina219_handle_t *handle, uint16_t *calibration)
 calculate the calibration
uint8_t ina219_set_calibration (ina219_handle_t *handle, uint16_t data)
 set the calibration
uint8_t ina219_init (ina219_handle_t *handle)
 initialize the chip
uint8_t ina219_deinit (ina219_handle_t *handle)
 close the chip
uint8_t ina219_set_reg (ina219_handle_t *handle, uint8_t reg, uint16_t data)
 set the chip register
uint8_t ina219_get_reg (ina219_handle_t *handle, uint8_t reg, uint16_t *data)
 get the chip register
uint8_t ina219_info (ina219_info_t *info)
 get chip's information
-

Detailed Description

+

Detailed Description

driver ina219 source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -235,9 +202,9 @@

history

Definition in file driver_ina219.c.

-

Macro Definition Documentation

- -

◆ CHIP_NAME

+

Macro Definition Documentation

+ +

◆ CHIP_NAME

@@ -255,8 +222,8 @@

-

◆ DRIVER_VERSION

+ +

◆ DRIVER_VERSION

@@ -272,8 +239,8 @@

-

◆ INA219_REG_BUS_VOLTAGE

+ +

◆ INA219_REG_BUS_VOLTAGE

@@ -289,8 +256,8 @@

-

◆ INA219_REG_CALIBRATION

+ +

◆ INA219_REG_CALIBRATION

@@ -306,8 +273,8 @@

-

◆ INA219_REG_CONF

+ +

◆ INA219_REG_CONF

@@ -325,8 +292,8 @@

-

◆ INA219_REG_CURRENT

+ +

◆ INA219_REG_CURRENT

@@ -342,8 +309,8 @@

-

◆ INA219_REG_POWER

+ +

◆ INA219_REG_POWER

@@ -359,8 +326,8 @@

-

◆ INA219_REG_SHUNT_VOLTAGE

+ +

◆ INA219_REG_SHUNT_VOLTAGE

@@ -376,8 +343,8 @@

-

◆ MANUFACTURER_NAME

+ +

◆ MANUFACTURER_NAME

@@ -393,8 +360,8 @@

-

◆ MAX_CURRENT

+ +

◆ MAX_CURRENT

@@ -410,8 +377,8 @@

-

◆ SUPPLY_VOLTAGE_MAX

+ +

◆ SUPPLY_VOLTAGE_MAX

@@ -427,8 +394,8 @@

-

◆ SUPPLY_VOLTAGE_MIN

+ +

◆ SUPPLY_VOLTAGE_MIN

@@ -444,8 +411,8 @@

-

◆ TEMPERATURE_MAX

+ +

◆ TEMPERATURE_MAX

@@ -461,8 +428,8 @@

-

◆ TEMPERATURE_MIN

+ +

◆ TEMPERATURE_MIN

@@ -480,11 +447,19 @@

+ + +

+
diff --git a/doc/html/driver__ina219_8c__incl.md5 b/doc/html/driver__ina219_8c__incl.md5 new file mode 100644 index 0000000..2ddca2c --- /dev/null +++ b/doc/html/driver__ina219_8c__incl.md5 @@ -0,0 +1 @@ +f031fc544ec520e1cbaa13688b4c85dd \ No newline at end of file diff --git a/doc/html/driver__ina219_8c__incl.svg b/doc/html/driver__ina219_8c__incl.svg new file mode 100644 index 0000000..4507bf4 --- /dev/null +++ b/doc/html/driver__ina219_8c__incl.svg @@ -0,0 +1,111 @@ + + + + + + +src/driver_ina219.c + + +Node1 + + +src/driver_ina219.c + + + + + +Node2 + + +driver_ina219.h + + + + + +Node1->Node2 + + + + + + + + +Node6 + + +math.h + + + + + +Node1->Node6 + + + + + + + + +Node3 + + +stdio.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdint.h + + + + + +Node2->Node4 + + + + + + + + +Node5 + + +string.h + + + + + +Node2->Node5 + + + + + + + + diff --git a/doc/html/driver__ina219_8c_source.html b/doc/html/driver__ina219_8c_source.html index f8894f7..b6a92df 100644 --- a/doc/html/driver__ina219_8c_source.html +++ b/doc/html/driver__ina219_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: src/driver_ina219.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +

@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ina219.c
+
driver_ina219.c
-Go to the documentation of this file.
1 
-
37 #include "driver_ina219.h"
-
38 #include <math.h>
-
39 
-
43 #define CHIP_NAME "Texas Instruments INA219"
-
44 #define MANUFACTURER_NAME "Texas Instruments"
-
45 #define SUPPLY_VOLTAGE_MIN 3.0f
-
46 #define SUPPLY_VOLTAGE_MAX 5.5f
-
47 #define MAX_CURRENT 1.0f
-
48 #define TEMPERATURE_MIN -25.0f
-
49 #define TEMPERATURE_MAX 85.0f
-
50 #define DRIVER_VERSION 1000
-
55 #define INA219_REG_CONF 0x00
-
56 #define INA219_REG_SHUNT_VOLTAGE 0x01
-
57 #define INA219_REG_BUS_VOLTAGE 0x02
-
58 #define INA219_REG_POWER 0x03
-
59 #define INA219_REG_CURRENT 0x04
-
60 #define INA219_REG_CALIBRATION 0x05
-
72 static uint8_t a_ina219_iic_read(ina219_handle_t *handle, uint8_t reg, uint16_t *data)
-
73 {
-
74  uint8_t buf[2];
-
75 
-
76  memset(buf, 0, sizeof(uint8_t) * 2); /* clear the buffer */
-
77  if (handle->iic_read(handle->iic_addr, reg, (uint8_t *)buf, 2) != 0) /* read data */
-
78  {
-
79  return 1; /* return error */
-
80  }
-
81  else
-
82  {
-
83  *data = (uint16_t)buf[0] << 8 | buf[1]; /* get data */
-
84 
-
85  return 0; /* success return 0 */
-
86  }
-
87 }
-
88 
-
99 static uint8_t a_ina219_iic_write(ina219_handle_t *handle, uint8_t reg, uint16_t data)
-
100 {
-
101  uint8_t buf[2];
-
102 
-
103  buf[0] = (uint8_t)((data >> 8) & 0xFF); /* get MSB */
-
104  buf[1] = (uint8_t)((data >> 0) & 0xFF); /* get LSB */
-
105  if (handle->iic_write(handle->iic_addr, reg, (uint8_t *)buf, 2) != 0) /* write data */
-
106  {
-
107  return 1; /* return error */
-
108  }
-
109  else
-
110  {
-
111  return 0; /* success return 0 */
-
112  }
-
113 }
-
114 
-
124 uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
-
125 {
-
126  if (handle == NULL) /* check handle */
-
127  {
-
128  return 2; /* return error */
-
129  }
-
130 
-
131  handle->r = resistance; /* set resistance */
-
132 
-
133  return 0; /* success return 0 */
-
134 }
-
135 
-
145 uint8_t ina219_get_resistance(ina219_handle_t *handle, double *resistance)
-
146 {
-
147  if (handle == NULL) /* check handle */
-
148  {
-
149  return 2; /* return error */
-
150  }
-
151 
-
152  *resistance = handle->r; /* get resistance */
-
153 
-
154  return 0; /* success return 0 */
-
155 }
-
156 
- -
167 {
-
168  if (handle == NULL) /* check handle */
-
169  {
-
170  return 2; /* return error */
-
171  }
-
172 
-
173  handle->iic_addr = (uint8_t)addr_pin; /* set pin */
-
174 
-
175  return 0; /* success return 0 */
-
176 }
-
177 
- -
188 {
-
189  if (handle == NULL) /* check handle */
-
190  {
-
191  return 2; /* return error */
-
192  }
-
193 
-
194  *addr_pin = (ina219_address_t)(handle->iic_addr); /* get pin */
-
195 
-
196  return 0; /* success return 0 */
-
197 }
-
198 
- -
210 {
-
211  uint8_t res;
-
212  uint16_t prev;
-
213 
-
214  if (handle == NULL) /* check handle */
-
215  {
-
216  return 2; /* return error */
-
217  }
-
218  if (handle->inited != 1) /* check handle initialization */
-
219  {
-
220  return 3; /* return error */
-
221  }
-
222 
-
223  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
-
224  if (res != 0) /* check result */
-
225  {
-
226  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
227 
-
228  return 1; /* return error */
-
229  }
-
230  prev &= ~(1 << 15); /* clear soft reset */
-
231  prev |= 1 << 15; /* set soft reset */
-
232 
-
233  return a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
-
234 }
-
235 
- -
248 {
-
249  uint8_t res;
-
250  uint16_t prev;
-
251 
-
252  if (handle == NULL) /* check handle */
-
253  {
-
254  return 2; /* return error */
-
255  }
-
256  if (handle->inited != 1) /* check handle initialization */
-
257  {
-
258  return 3; /* return error */
-
259  }
-
260 
-
261  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
-
262  if (res != 0) /* check result */
-
263  {
-
264  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
265 
-
266  return 1; /* return error */
-
267  }
-
268  prev &= ~(1 << 13); /* clear range bit */
-
269  prev |= range << 13; /* set range bit */
-
270 
-
271  return a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
-
272 }
-
273 
- -
286 {
-
287  uint8_t res;
-
288  uint16_t prev;
-
289 
-
290  if (handle == NULL) /* check handle */
-
291  {
-
292  return 2; /* return error */
-
293  }
-
294  if (handle->inited != 1) /* check handle initialization */
-
295  {
-
296  return 3; /* return error */
-
297  }
-
298 
-
299  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
-
300  if (res != 0) /* check result */
-
301  {
-
302  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
303 
-
304  return 1; /* return error */
-
305  }
-
306  *range = (ina219_bus_voltage_range_t)((prev >> 13) & 0x01); /* get range */
-
307 
-
308  return 0; /* success return 0 */
-
309 }
-
310 
- -
323 {
-
324  uint8_t res;
-
325  uint16_t prev;
-
326 
-
327  if (handle == NULL) /* check handle */
-
328  {
-
329  return 2; /* return error */
-
330  }
-
331  if (handle->inited != 1) /* check handle initialization */
-
332  {
-
333  return 3; /* return error */
-
334  }
-
335 
-
336  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
-
337  if (res != 0) /* check result */
-
338  {
-
339  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
340 
-
341  return 1; /* return error */
-
342  }
-
343  prev &= ~(3 << 11); /* clear pga bit */
-
344  prev |= pga << 11; /* set pga bit */
-
345 
-
346  return a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
-
347 }
-
348 
- -
361 {
-
362  uint8_t res;
-
363  uint16_t prev;
-
364 
-
365  if (handle == NULL) /* check handle */
-
366  {
-
367  return 2; /* return error */
-
368  }
-
369  if (handle->inited != 1) /* check handle initialization */
-
370  {
-
371  return 3; /* return error */
-
372  }
-
373 
-
374  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
-
375  if (res != 0) /* check result */
-
376  {
-
377  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
378 
-
379  return 1; /* return error */
-
380  }
-
381  *pga = (ina219_pga_t)((prev >> 11) & 0x03); /* get pga */
-
382 
-
383  return 0; /* success return 0 */
-
384 }
-
385 
- -
398 {
-
399  uint8_t res;
-
400  uint16_t prev;
-
401 
-
402  if (handle == NULL) /* check handle */
-
403  {
-
404  return 2; /* return error */
-
405  }
-
406  if (handle->inited != 1) /* check handle initialization */
-
407  {
-
408  return 3; /* return error */
-
409  }
-
410 
-
411  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
-
412  if (res != 0) /* check result */
-
413  {
-
414  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
415 
-
416  return 1; /* return error */
-
417  }
-
418  prev &= ~(0xF << 7); /* clear mode bit */
-
419  prev |= mode << 7; /* set mode bit */
-
420 
-
421  return a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
-
422 }
-
423 
- -
436 {
-
437  uint8_t res;
-
438  uint16_t prev;
-
439 
-
440  if (handle == NULL) /* check handle */
-
441  {
-
442  return 2; /* return error */
-
443  }
-
444  if (handle->inited != 1) /* check handle initialization */
-
445  {
-
446  return 3; /* return error */
-
447  }
-
448 
-
449  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
-
450  if (res != 0) /* check result */
-
451  {
-
452  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
453 
-
454  return 1; /* return error */
-
455  }
-
456  *mode = (ina219_adc_mode_t)((prev >> 7) & 0xF); /* get mode */
-
457 
-
458  return 0; /* success return 0 */
-
459 }
-
460 
- -
473 {
-
474  uint8_t res;
-
475  uint16_t prev;
-
476 
-
477  if (handle == NULL) /* check handle */
-
478  {
-
479  return 2; /* return error */
-
480  }
-
481  if (handle->inited != 1) /* check handle initialization */
-
482  {
-
483  return 3; /* return error */
-
484  }
-
485 
-
486  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
-
487  if (res != 0) /* check result */
-
488  {
-
489  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
490 
-
491  return 1; /* return error */
-
492  }
-
493  prev &= ~(0xF << 3); /* clear mode bit */
-
494  prev |= mode << 3; /* set mode bit */
-
495 
-
496  return a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
-
497 }
-
498 
- -
511 {
-
512  uint8_t res;
-
513  uint16_t prev;
-
514 
-
515  if (handle == NULL) /* check handle */
-
516  {
-
517  return 2; /* return error */
-
518  }
-
519  if (handle->inited != 1) /* check handle initialization */
-
520  {
-
521  return 3; /* return error */
-
522  }
-
523 
-
524  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
-
525  if (res != 0) /* check result */
-
526  {
-
527  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
528 
-
529  return 1; /* return error */
-
530  }
-
531  *mode = (ina219_adc_mode_t)((prev >> 3) & 0xF); /* get mode */
-
532 
-
533  return 0; /* success return 0 */
-
534 }
-
535 
- -
548 {
-
549  uint8_t res;
-
550  uint16_t prev;
-
551 
-
552  if (handle == NULL) /* check handle */
-
553  {
-
554  return 2; /* return error */
-
555  }
-
556  if (handle->inited != 1) /* check handle initialization */
-
557  {
-
558  return 3; /* return error */
-
559  }
-
560 
-
561  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
-
562  if (res != 0) /* check result */
-
563  {
-
564  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
565 
-
566  return 1; /* return error */
-
567  }
-
568  prev &= ~(0x7 << 0); /* clear mode bit */
-
569  prev |= mode << 0; /* set mode bit */
-
570  res = a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
-
571  if (res != 0) /* check result */
-
572  {
-
573  handle->debug_print("ina219: write conf register failed.\n"); /* write conf register failed */
-
574 
-
575  return 1; /* return error */
-
576  }
-
577  if ((mode >= INA219_MODE_SHUNT_VOLTAGE_TRIGGERED) && /* check mode */
- -
579  {
-
580  uint8_t m, mode1, mode2, t;
-
581 
-
582  mode1 = (prev >> 3) & 0xF; /* get shunt adc mode */
-
583  mode2 = (prev >> 7) & 0xF; /* get bus adc mode */
-
584  m = (mode1 > mode2) ? mode1 : mode2; /* get max mode */
-
585  if (m <= 8) /* check mode */
-
586  {
-
587  handle->delay_ms(1); /* delay 1 ms */
-
588  }
-
589  else
-
590  {
-
591  t = (uint8_t)(0.532 * pow(2, m - 8)) + 1; /* get time */
-
592  handle->delay_ms(t); /* delay time */
-
593  }
-
594 
-
595  return 0; /* success return 0 */
-
596  }
-
597  else
-
598  {
-
599  return 0; /* success return 0 */
-
600  }
-
601 }
-
602 
- -
615 {
-
616  uint8_t res;
-
617  uint16_t prev;
-
618 
-
619  if (handle == NULL) /* check handle */
-
620  {
-
621  return 2; /* return error */
-
622  }
-
623  if (handle->inited != 1) /* check handle initialization */
-
624  {
-
625  return 3; /* return error */
-
626  }
-
627 
-
628  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
-
629  if (res != 0) /* check result */
-
630  {
-
631  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
632 
-
633  return 1; /* return error */
-
634  }
-
635  *mode = (ina219_mode_t)((prev >> 0) & 0x7); /* get mode */
-
636 
-
637  return 0; /* success return 0 */
-
638 }
-
639 
-
652 uint8_t ina219_read_shunt_voltage(ina219_handle_t *handle, int16_t *raw, float *mV)
-
653 {
-
654  uint8_t res;
-
655  union
-
656  {
-
657  uint16_t u;
-
658  int16_t s;
-
659  } u;
-
660 
-
661  if (handle == NULL) /* check handle */
-
662  {
-
663  return 2; /* return error */
-
664  }
-
665  if (handle->inited != 1) /* check handle initialization */
-
666  {
-
667  return 3; /* return error */
-
668  }
-
669 
-
670  res = a_ina219_iic_read(handle, INA219_REG_SHUNT_VOLTAGE, (uint16_t *)&u.u); /* read shunt voltage */
-
671  if (res != 0) /* check result */
-
672  {
-
673  handle->debug_print("ina219: read shunt voltage register failed.\n"); /* read shunt voltage register failed */
-
674 
-
675  return 1; /* return error */
-
676  }
-
677  *raw = u.s; /* set the raw */
-
678  *mV = (float)(*raw) / 100.0f; /* set the converted data */
-
679 
-
680  return 0; /* success return 0 */
-
681 }
-
682 
-
697 uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV)
-
698 {
-
699  uint8_t res;
-
700 
-
701  if (handle == NULL) /* check handle */
-
702  {
-
703  return 2; /* return error */
-
704  }
-
705  if (handle->inited != 1) /* check handle initialization */
-
706  {
-
707  return 3; /* return error */
-
708  }
-
709 
-
710  res = a_ina219_iic_read(handle, INA219_REG_BUS_VOLTAGE, (uint16_t *)raw); /* read bus voltage */
-
711  if (res != 0) /* check result */
-
712  {
-
713  handle->debug_print("ina219: read bus voltage register failed.\n"); /* read bus voltage register failed */
-
714 
-
715  return 1; /* return error */
-
716  }
-
717  if (((*raw) & (1 << 0)) != 0)
-
718  {
-
719  handle->debug_print("ina219: math overflow.\n"); /* math overflow */
-
720 
-
721  return 4; /* return error */
-
722  }
-
723  if (((*raw) & (1 << 1)) == 0)
-
724  {
-
725  handle->debug_print("ina219: conversion not ready.\n"); /* math overflow */
-
726 
-
727  return 5; /* return error */
-
728  }
-
729  *raw = (*raw) >> 3; /* right shift 3 */
-
730  *mV = (float)(*raw) * 4.0f; /* set the converted data */
-
731 
-
732  return 0; /* success return 0 */
-
733 }
-
734 
-
747 uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA)
-
748 {
-
749  uint8_t res;
-
750  union
-
751  {
-
752  uint16_t u;
-
753  int16_t s;
-
754  } u;
-
755 
-
756  if (handle == NULL) /* check handle */
-
757  {
-
758  return 2; /* return error */
-
759  }
-
760  if (handle->inited != 1) /* check handle initialization */
-
761  {
-
762  return 3; /* return error */
-
763  }
-
764 
-
765  res = a_ina219_iic_read(handle, INA219_REG_CURRENT, (uint16_t *)&u.u); /* read current */
-
766  if (res != 0) /* check result */
-
767  {
-
768  handle->debug_print("ina219: read current register failed.\n"); /* read current register failed */
-
769 
-
770  return 1; /* return error */
-
771  }
-
772  *raw = u.s; /* set the raw */
-
773  *mA = (float)((double)(*raw) * handle->current_lsb * 1000); /* set the converted data */
-
774 
-
775  return 0; /* success return 0 */
-
776 }
-
777 
-
790 uint8_t ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW)
-
791 {
-
792  uint8_t res;
-
793 
-
794  if (handle == NULL) /* check handle */
-
795  {
-
796  return 2; /* return error */
-
797  }
-
798  if (handle->inited != 1) /* check handle initialization */
-
799  {
-
800  return 3; /* return error */
-
801  }
-
802 
-
803  res = a_ina219_iic_read(handle, INA219_REG_POWER, (uint16_t *)raw); /* read power */
-
804  if (res != 0) /* check result */
-
805  {
-
806  handle->debug_print("ina219: read power register failed.\n"); /* read power register failed */
-
807 
-
808  return 1; /* return error */
-
809  }
-
810  *mW = (float)((double)(*raw) * handle->current_lsb * 20.0 * 1000.0); /* set the converted data */
-
811 
-
812  return 0; /* success return 0 */
-
813 }
-
814 
-
826 uint8_t ina219_get_calibration(ina219_handle_t *handle, uint16_t *data)
-
827 {
-
828  uint8_t res;
-
829 
-
830  if (handle == NULL) /* check handle */
-
831  {
-
832  return 2; /* return error */
-
833  }
-
834  if (handle->inited != 1) /* check handle initialization */
-
835  {
-
836  return 3; /* return error */
-
837  }
-
838 
-
839  res = a_ina219_iic_read(handle, INA219_REG_CALIBRATION, (uint16_t *)data); /* read calibration */
-
840  if (res != 0) /* check result */
-
841  {
-
842  handle->debug_print("ina219: read calibration register failed.\n"); /* read calibration register failed */
-
843 
-
844  return 1; /* return error */
-
845  }
-
846 
-
847  return 0; /* success return 0 */
-
848 }
-
849 
-
863 uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
-
864 {
-
865  uint8_t res;
-
866  uint16_t prev;
-
867  uint8_t pga;
-
868  double v;
-
869 
-
870  if (handle == NULL) /* check handle */
-
871  {
-
872  return 2; /* return error */
-
873  }
-
874  if (handle->inited != 1) /* check handle initialization */
-
875  {
-
876  return 3; /* return error */
-
877  }
-
878  if ((handle->r >= -0.000001f) && (handle->r <= 0.000001f)) /* check the r */
-
879  {
-
880  handle->debug_print("ina219: r can't be zero.\n"); /* r can't be zero */
-
881 
-
882  return 4; /* return error */
-
883  }
-
884 
-
885  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read conf */
-
886  if (res != 0) /* check result */
-
887  {
-
888  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
889 
-
890  return 1; /* return error */
-
891  }
-
892  pga = (prev >> 11) & 0x3; /* get pga */
-
893  switch (pga) /* select the pga */
-
894  {
-
895  case 0 :
-
896  {
-
897  v = 0.04; /* 0.04 V */
-
898  res = 0; /* set ok */
-
899 
-
900  break;
-
901  }
-
902  case 1 :
-
903  {
-
904  v = 0.08; /* 0.08 V */
-
905  res = 0; /* set ok */
-
906 
-
907  break;
-
908  }
-
909  case 2 :
-
910  {
-
911  v = 0.16; /* 0.16 V */
-
912  res = 0; /* set ok */
-
913 
-
914  break;
-
915  }
-
916  case 3 :
-
917  {
-
918  v = 0.32; /* 0.32 V */
-
919  res = 0; /* set ok */
-
920 
-
921  break;
-
922  }
-
923  default :
-
924  {
-
925  v = 0.0; /* 0.0 V */
-
926  res = 1; /* set failed */
-
927 
-
928  break;
-
929  }
-
930  }
-
931  if (res == 1)
-
932  {
-
933  handle->debug_print("ina219: pga is invalid.\n"); /* pga is invalid*/
-
934 
-
935  return 5; /* return error */
-
936  }
-
937  else
-
938  {
-
939  handle->current_lsb = v / handle->r / pow(2.0, 15.0); /* current lsb */
-
940  *calibration = (uint16_t)(0.04096 / (v / pow(2.0, 15.0))); /* set calibration */
-
941 
-
942  return 0; /* success return 0 */
-
943  }
-
944 }
-
945 
-
957 uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
-
958 {
-
959  uint8_t res;
-
960 
-
961  if (handle == NULL) /* check handle */
-
962  {
-
963  return 2; /* return error */
-
964  }
-
965  if (handle->inited != 1) /* check handle initialization */
-
966  {
-
967  return 3; /* return error */
-
968  }
-
969 
-
970  res = a_ina219_iic_write(handle, INA219_REG_CALIBRATION, data); /* write calibration */
-
971  if (res != 0) /* check result */
-
972  {
-
973  handle->debug_print("ina219: write calibration register failed.\n"); /* write calibration register failed */
-
974 
-
975  return 1; /* return error */
-
976  }
-
977 
-
978  return 0; /* success return 0 */
-
979 }
-
980 
-
992 uint8_t ina219_init(ina219_handle_t *handle)
-
993 {
-
994  uint8_t res;
-
995  uint16_t prev;
-
996 
-
997  if (handle == NULL) /* check handle */
-
998  {
-
999  return 2; /* return error */
-
1000  }
-
1001  if (handle->debug_print == NULL) /* check debug_print */
-
1002  {
-
1003  return 3; /* return error */
-
1004  }
-
1005  if (handle->iic_init == NULL) /* check iic_init */
-
1006  {
-
1007  handle->debug_print("ina219: iic_init is null.\n"); /* iic_init is null */
-
1008 
-
1009  return 3; /* return error */
-
1010  }
-
1011  if (handle->iic_deinit == NULL) /* check iic_deinit */
-
1012  {
-
1013  handle->debug_print("ina219: iic_deinit is null.\n"); /* iic_deinit is null */
-
1014 
-
1015  return 3; /* return error */
-
1016  }
-
1017  if (handle->iic_read == NULL) /* check iic_read */
-
1018  {
-
1019  handle->debug_print("ina219: iic_read is null.\n"); /* iic_read is null */
-
1020 
-
1021  return 3; /* return error */
-
1022  }
-
1023  if (handle->iic_write == NULL) /* check iic_write */
-
1024  {
-
1025  handle->debug_print("ina219: iic_write is null.\n"); /* iic_write is null */
-
1026 
-
1027  return 3; /* return error */
-
1028  }
-
1029  if (handle->delay_ms == NULL) /* check delay_ms */
-
1030  {
-
1031  handle->debug_print("ina219: delay_ms is null.\n"); /* delay_ms is null */
-
1032 
-
1033  return 3; /* return error */
-
1034  }
-
1035 
-
1036  if (handle->iic_init() != 0) /* iic init */
-
1037  {
-
1038  handle->debug_print("ina219: iic init failed.\n"); /* iic init failed */
-
1039 
-
1040  return 1; /* return error */
-
1041  }
-
1042  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read conf */
-
1043  if (res != 0) /* check result */
-
1044  {
-
1045  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
1046  (void)handle->iic_deinit(); /* iic deinit */
-
1047 
-
1048  return 4; /* return error */
-
1049  }
-
1050  prev |= 1 << 15;
-
1051  res = a_ina219_iic_write(handle, INA219_REG_CONF, prev); /* write conf */
-
1052  if (res != 0) /* check result */
-
1053  {
-
1054  handle->debug_print("ina219: write conf register failed.\n"); /* write conf register failed */
-
1055  (void)handle->iic_deinit(); /* iic deinit */
-
1056 
-
1057  return 4; /* return error */
-
1058  }
-
1059  handle->delay_ms(10); /* delay 10 ms */
-
1060  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read conf */
-
1061  if (res != 0) /* check result */
-
1062  {
-
1063  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
1064  (void)handle->iic_deinit(); /* iic deinit */
-
1065 
-
1066  return 4; /* return error */
-
1067  }
-
1068  if ((prev & (1 << 15)) != 0) /* check the result */
-
1069  {
-
1070  handle->debug_print("ina219: soft reset failed.\n"); /* soft reset failed */
-
1071  (void)handle->iic_deinit(); /* iic deinit */
-
1072 
-
1073  return 4; /* return error */
-
1074  }
-
1075 
-
1076  handle->inited = 1; /* flag inited */
-
1077 
-
1078  return 0; /* success return 0 */
-
1079 }
-
1080 
- -
1093 {
-
1094  uint8_t res;
-
1095  uint16_t prev;
-
1096 
-
1097  if (handle == NULL) /* check handle */
-
1098  {
-
1099  return 2; /* return error */
-
1100  }
-
1101  if (handle->inited != 1) /* check handle initialization */
-
1102  {
-
1103  return 3; /* return error */
-
1104  }
-
1105 
-
1106  res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
-
1107  if (res != 0) /* check result */
-
1108  {
-
1109  handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
-
1110 
-
1111  return 4; /* return error */
-
1112  }
-
1113  prev &= ~(0x07); /* clear mode */
-
1114  res = a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
-
1115  if (res != 0) /* check result */
-
1116  {
-
1117  handle->debug_print("ina219: write conf register failed.\n"); /* write conf register failed */
-
1118 
-
1119  return 4; /* return error */
-
1120  }
-
1121  res = handle->iic_deinit(); /* iic deinit */
-
1122  if (res != 0) /* check result */
-
1123  {
-
1124  handle->debug_print("ina219: iic deinit failed.\n"); /* iic deinit failed */
-
1125 
-
1126  return 1; /* return error */
-
1127  }
-
1128 
-
1129  return 0; /* success return 0 */
-
1130 }
-
1131 
-
1144 uint8_t ina219_set_reg(ina219_handle_t *handle, uint8_t reg, uint16_t data)
-
1145 {
-
1146  if (handle == NULL) /* check handle */
-
1147  {
-
1148  return 2; /* return error */
-
1149  }
-
1150  if (handle->inited != 1) /* check handle initialization */
-
1151  {
-
1152  return 3; /* return error */
-
1153  }
-
1154 
-
1155  return a_ina219_iic_write(handle, reg, data); /* write data */
-
1156 }
-
1157 
-
1170 uint8_t ina219_get_reg(ina219_handle_t *handle, uint8_t reg, uint16_t *data)
-
1171 {
-
1172  if (handle == NULL) /* check handle */
-
1173  {
-
1174  return 2; /* return error */
-
1175  }
-
1176  if (handle->inited != 1) /* check handle initialization */
-
1177  {
-
1178  return 3; /* return error */
-
1179  }
-
1180 
-
1181  return a_ina219_iic_read(handle, reg, data); /* read data */
-
1182 }
-
1183 
- -
1193 {
-
1194  if (info == NULL) /* check handle */
-
1195  {
-
1196  return 2; /* return error */
-
1197  }
-
1198 
-
1199  memset(info, 0, sizeof(ina219_info_t)); /* initialize ina219 info structure */
-
1200  strncpy(info->chip_name, CHIP_NAME, 32); /* copy chip name */
-
1201  strncpy(info->manufacturer_name, MANUFACTURER_NAME, 32); /* copy manufacturer name */
-
1202  strncpy(info->interface, "IIC", 8); /* copy interface name */
-
1203  info->supply_voltage_min_v = SUPPLY_VOLTAGE_MIN; /* set minimal supply voltage */
-
1204  info->supply_voltage_max_v = SUPPLY_VOLTAGE_MAX; /* set maximum supply voltage */
-
1205  info->max_current_ma = MAX_CURRENT; /* set maximum current */
-
1206  info->temperature_max = TEMPERATURE_MAX; /* set minimal temperature */
-
1207  info->temperature_min = TEMPERATURE_MIN; /* set maximum temperature */
-
1208  info->driver_version = DRIVER_VERSION; /* set driver version */
-
1209 
-
1210  return 0; /* success return 0 */
-
1211 }
-
#define MAX_CURRENT
Definition: driver_ina219.c:47
-
#define INA219_REG_BUS_VOLTAGE
Definition: driver_ina219.c:57
-
#define INA219_REG_CONF
chip register definition
Definition: driver_ina219.c:55
-
#define SUPPLY_VOLTAGE_MAX
Definition: driver_ina219.c:46
-
#define INA219_REG_CALIBRATION
Definition: driver_ina219.c:60
-
#define TEMPERATURE_MAX
Definition: driver_ina219.c:49
-
#define MANUFACTURER_NAME
Definition: driver_ina219.c:44
-
#define TEMPERATURE_MIN
Definition: driver_ina219.c:48
-
#define SUPPLY_VOLTAGE_MIN
Definition: driver_ina219.c:45
-
#define CHIP_NAME
chip information definition
Definition: driver_ina219.c:43
-
#define INA219_REG_POWER
Definition: driver_ina219.c:58
-
#define DRIVER_VERSION
Definition: driver_ina219.c:50
-
#define INA219_REG_CURRENT
Definition: driver_ina219.c:59
-
#define INA219_REG_SHUNT_VOLTAGE
Definition: driver_ina219.c:56
+Go to the documentation of this file.
1
+
36
+
37#include "driver_ina219.h"
+
38#include <math.h>
+
39
+
43#define CHIP_NAME "Texas Instruments INA219"
+
44#define MANUFACTURER_NAME "Texas Instruments"
+
45#define SUPPLY_VOLTAGE_MIN 3.0f
+
46#define SUPPLY_VOLTAGE_MAX 5.5f
+
47#define MAX_CURRENT 1.0f
+
48#define TEMPERATURE_MIN -25.0f
+
49#define TEMPERATURE_MAX 85.0f
+
50#define DRIVER_VERSION 1000
+
51
+
55#define INA219_REG_CONF 0x00
+
56#define INA219_REG_SHUNT_VOLTAGE 0x01
+
57#define INA219_REG_BUS_VOLTAGE 0x02
+
58#define INA219_REG_POWER 0x03
+
59#define INA219_REG_CURRENT 0x04
+
60#define INA219_REG_CALIBRATION 0x05
+
61
+
72static uint8_t a_ina219_iic_read(ina219_handle_t *handle, uint8_t reg, uint16_t *data)
+
73{
+
74 uint8_t buf[2];
+
75
+
76 memset(buf, 0, sizeof(uint8_t) * 2); /* clear the buffer */
+
77 if (handle->iic_read(handle->iic_addr, reg, (uint8_t *)buf, 2) != 0) /* read data */
+
78 {
+
79 return 1; /* return error */
+
80 }
+
81 else
+
82 {
+
83 *data = (uint16_t)buf[0] << 8 | buf[1]; /* get data */
+
84
+
85 return 0; /* success return 0 */
+
86 }
+
87}
+
88
+
99static uint8_t a_ina219_iic_write(ina219_handle_t *handle, uint8_t reg, uint16_t data)
+
100{
+
101 uint8_t buf[2];
+
102
+
103 buf[0] = (uint8_t)((data >> 8) & 0xFF); /* get MSB */
+
104 buf[1] = (uint8_t)((data >> 0) & 0xFF); /* get LSB */
+
105 if (handle->iic_write(handle->iic_addr, reg, (uint8_t *)buf, 2) != 0) /* write data */
+
106 {
+
107 return 1; /* return error */
+
108 }
+
109 else
+
110 {
+
111 return 0; /* success return 0 */
+
112 }
+
113}
+
114
+
+
124uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
+
125{
+
126 if (handle == NULL) /* check handle */
+
127 {
+
128 return 2; /* return error */
+
129 }
+
130
+
131 handle->r = resistance; /* set resistance */
+
132
+
133 return 0; /* success return 0 */
+
134}
+
+
135
+
+
145uint8_t ina219_get_resistance(ina219_handle_t *handle, double *resistance)
+
146{
+
147 if (handle == NULL) /* check handle */
+
148 {
+
149 return 2; /* return error */
+
150 }
+
151
+
152 *resistance = handle->r; /* get resistance */
+
153
+
154 return 0; /* success return 0 */
+
155}
+
+
156
+
+ +
167{
+
168 if (handle == NULL) /* check handle */
+
169 {
+
170 return 2; /* return error */
+
171 }
+
172
+
173 handle->iic_addr = (uint8_t)addr_pin; /* set pin */
+
174
+
175 return 0; /* success return 0 */
+
176}
+
+
177
+
+ +
188{
+
189 if (handle == NULL) /* check handle */
+
190 {
+
191 return 2; /* return error */
+
192 }
+
193
+
194 *addr_pin = (ina219_address_t)(handle->iic_addr); /* get pin */
+
195
+
196 return 0; /* success return 0 */
+
197}
+
+
198
+
+ +
210{
+
211 uint8_t res;
+
212 uint16_t prev;
+
213
+
214 if (handle == NULL) /* check handle */
+
215 {
+
216 return 2; /* return error */
+
217 }
+
218 if (handle->inited != 1) /* check handle initialization */
+
219 {
+
220 return 3; /* return error */
+
221 }
+
222
+
223 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
+
224 if (res != 0) /* check result */
+
225 {
+
226 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
227
+
228 return 1; /* return error */
+
229 }
+
230 prev &= ~(1 << 15); /* clear soft reset */
+
231 prev |= 1 << 15; /* set soft reset */
+
232
+
233 return a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
+
234}
+
+
235
+
+ +
248{
+
249 uint8_t res;
+
250 uint16_t prev;
+
251
+
252 if (handle == NULL) /* check handle */
+
253 {
+
254 return 2; /* return error */
+
255 }
+
256 if (handle->inited != 1) /* check handle initialization */
+
257 {
+
258 return 3; /* return error */
+
259 }
+
260
+
261 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
+
262 if (res != 0) /* check result */
+
263 {
+
264 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
265
+
266 return 1; /* return error */
+
267 }
+
268 prev &= ~(1 << 13); /* clear range bit */
+
269 prev |= range << 13; /* set range bit */
+
270
+
271 return a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
+
272}
+
+
273
+
+ +
286{
+
287 uint8_t res;
+
288 uint16_t prev;
+
289
+
290 if (handle == NULL) /* check handle */
+
291 {
+
292 return 2; /* return error */
+
293 }
+
294 if (handle->inited != 1) /* check handle initialization */
+
295 {
+
296 return 3; /* return error */
+
297 }
+
298
+
299 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
+
300 if (res != 0) /* check result */
+
301 {
+
302 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
303
+
304 return 1; /* return error */
+
305 }
+
306 *range = (ina219_bus_voltage_range_t)((prev >> 13) & 0x01); /* get range */
+
307
+
308 return 0; /* success return 0 */
+
309}
+
+
310
+
+ +
323{
+
324 uint8_t res;
+
325 uint16_t prev;
+
326
+
327 if (handle == NULL) /* check handle */
+
328 {
+
329 return 2; /* return error */
+
330 }
+
331 if (handle->inited != 1) /* check handle initialization */
+
332 {
+
333 return 3; /* return error */
+
334 }
+
335
+
336 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
+
337 if (res != 0) /* check result */
+
338 {
+
339 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
340
+
341 return 1; /* return error */
+
342 }
+
343 prev &= ~(3 << 11); /* clear pga bit */
+
344 prev |= pga << 11; /* set pga bit */
+
345
+
346 return a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
+
347}
+
+
348
+
+ +
361{
+
362 uint8_t res;
+
363 uint16_t prev;
+
364
+
365 if (handle == NULL) /* check handle */
+
366 {
+
367 return 2; /* return error */
+
368 }
+
369 if (handle->inited != 1) /* check handle initialization */
+
370 {
+
371 return 3; /* return error */
+
372 }
+
373
+
374 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
+
375 if (res != 0) /* check result */
+
376 {
+
377 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
378
+
379 return 1; /* return error */
+
380 }
+
381 *pga = (ina219_pga_t)((prev >> 11) & 0x03); /* get pga */
+
382
+
383 return 0; /* success return 0 */
+
384}
+
+
385
+
+ +
398{
+
399 uint8_t res;
+
400 uint16_t prev;
+
401
+
402 if (handle == NULL) /* check handle */
+
403 {
+
404 return 2; /* return error */
+
405 }
+
406 if (handle->inited != 1) /* check handle initialization */
+
407 {
+
408 return 3; /* return error */
+
409 }
+
410
+
411 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
+
412 if (res != 0) /* check result */
+
413 {
+
414 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
415
+
416 return 1; /* return error */
+
417 }
+
418 prev &= ~(0xF << 7); /* clear mode bit */
+
419 prev |= mode << 7; /* set mode bit */
+
420
+
421 return a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
+
422}
+
+
423
+
+ +
436{
+
437 uint8_t res;
+
438 uint16_t prev;
+
439
+
440 if (handle == NULL) /* check handle */
+
441 {
+
442 return 2; /* return error */
+
443 }
+
444 if (handle->inited != 1) /* check handle initialization */
+
445 {
+
446 return 3; /* return error */
+
447 }
+
448
+
449 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
+
450 if (res != 0) /* check result */
+
451 {
+
452 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
453
+
454 return 1; /* return error */
+
455 }
+
456 *mode = (ina219_adc_mode_t)((prev >> 7) & 0xF); /* get mode */
+
457
+
458 return 0; /* success return 0 */
+
459}
+
+
460
+
+ +
473{
+
474 uint8_t res;
+
475 uint16_t prev;
+
476
+
477 if (handle == NULL) /* check handle */
+
478 {
+
479 return 2; /* return error */
+
480 }
+
481 if (handle->inited != 1) /* check handle initialization */
+
482 {
+
483 return 3; /* return error */
+
484 }
+
485
+
486 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
+
487 if (res != 0) /* check result */
+
488 {
+
489 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
490
+
491 return 1; /* return error */
+
492 }
+
493 prev &= ~(0xF << 3); /* clear mode bit */
+
494 prev |= mode << 3; /* set mode bit */
+
495
+
496 return a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
+
497}
+
+
498
+
+ +
511{
+
512 uint8_t res;
+
513 uint16_t prev;
+
514
+
515 if (handle == NULL) /* check handle */
+
516 {
+
517 return 2; /* return error */
+
518 }
+
519 if (handle->inited != 1) /* check handle initialization */
+
520 {
+
521 return 3; /* return error */
+
522 }
+
523
+
524 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
+
525 if (res != 0) /* check result */
+
526 {
+
527 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
528
+
529 return 1; /* return error */
+
530 }
+
531 *mode = (ina219_adc_mode_t)((prev >> 3) & 0xF); /* get mode */
+
532
+
533 return 0; /* success return 0 */
+
534}
+
+
535
+
+ +
548{
+
549 uint8_t res;
+
550 uint16_t prev;
+
551
+
552 if (handle == NULL) /* check handle */
+
553 {
+
554 return 2; /* return error */
+
555 }
+
556 if (handle->inited != 1) /* check handle initialization */
+
557 {
+
558 return 3; /* return error */
+
559 }
+
560
+
561 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
+
562 if (res != 0) /* check result */
+
563 {
+
564 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
565
+
566 return 1; /* return error */
+
567 }
+
568 prev &= ~(0x7 << 0); /* clear mode bit */
+
569 prev |= mode << 0; /* set mode bit */
+
570 res = a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
+
571 if (res != 0) /* check result */
+
572 {
+
573 handle->debug_print("ina219: write conf register failed.\n"); /* write conf register failed */
+
574
+
575 return 1; /* return error */
+
576 }
+
577 if ((mode >= INA219_MODE_SHUNT_VOLTAGE_TRIGGERED) && /* check mode */
+ +
579 {
+
580 uint8_t m, mode1, mode2, t;
+
581
+
582 mode1 = (prev >> 3) & 0xF; /* get shunt adc mode */
+
583 mode2 = (prev >> 7) & 0xF; /* get bus adc mode */
+
584 m = (mode1 > mode2) ? mode1 : mode2; /* get max mode */
+
585 if (m <= 8) /* check mode */
+
586 {
+
587 handle->delay_ms(1); /* delay 1 ms */
+
588 }
+
589 else
+
590 {
+
591 t = (uint8_t)(0.532 * pow(2, m - 8)) + 1; /* get time */
+
592 handle->delay_ms(t); /* delay time */
+
593 }
+
594
+
595 return 0; /* success return 0 */
+
596 }
+
597 else
+
598 {
+
599 return 0; /* success return 0 */
+
600 }
+
601}
+
+
602
+
+ +
615{
+
616 uint8_t res;
+
617 uint16_t prev;
+
618
+
619 if (handle == NULL) /* check handle */
+
620 {
+
621 return 2; /* return error */
+
622 }
+
623 if (handle->inited != 1) /* check handle initialization */
+
624 {
+
625 return 3; /* return error */
+
626 }
+
627
+
628 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
+
629 if (res != 0) /* check result */
+
630 {
+
631 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
632
+
633 return 1; /* return error */
+
634 }
+
635 *mode = (ina219_mode_t)((prev >> 0) & 0x7); /* get mode */
+
636
+
637 return 0; /* success return 0 */
+
638}
+
+
639
+
+
652uint8_t ina219_read_shunt_voltage(ina219_handle_t *handle, int16_t *raw, float *mV)
+
653{
+
654 uint8_t res;
+
655 union
+
656 {
+
657 uint16_t u;
+
658 int16_t s;
+
659 } u;
+
660
+
661 if (handle == NULL) /* check handle */
+
662 {
+
663 return 2; /* return error */
+
664 }
+
665 if (handle->inited != 1) /* check handle initialization */
+
666 {
+
667 return 3; /* return error */
+
668 }
+
669
+
670 res = a_ina219_iic_read(handle, INA219_REG_SHUNT_VOLTAGE, (uint16_t *)&u.u); /* read shunt voltage */
+
671 if (res != 0) /* check result */
+
672 {
+
673 handle->debug_print("ina219: read shunt voltage register failed.\n"); /* read shunt voltage register failed */
+
674
+
675 return 1; /* return error */
+
676 }
+
677 *raw = u.s; /* set the raw */
+
678 *mV = (float)(*raw) / 100.0f; /* set the converted data */
+
679
+
680 return 0; /* success return 0 */
+
681}
+
+
682
+
+
697uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV)
+
698{
+
699 uint8_t res;
+
700
+
701 if (handle == NULL) /* check handle */
+
702 {
+
703 return 2; /* return error */
+
704 }
+
705 if (handle->inited != 1) /* check handle initialization */
+
706 {
+
707 return 3; /* return error */
+
708 }
+
709
+
710 res = a_ina219_iic_read(handle, INA219_REG_BUS_VOLTAGE, (uint16_t *)raw); /* read bus voltage */
+
711 if (res != 0) /* check result */
+
712 {
+
713 handle->debug_print("ina219: read bus voltage register failed.\n"); /* read bus voltage register failed */
+
714
+
715 return 1; /* return error */
+
716 }
+
717 if (((*raw) & (1 << 0)) != 0)
+
718 {
+
719 handle->debug_print("ina219: math overflow.\n"); /* math overflow */
+
720
+
721 return 4; /* return error */
+
722 }
+
723 if (((*raw) & (1 << 1)) == 0)
+
724 {
+
725 handle->debug_print("ina219: conversion not ready.\n"); /* math overflow */
+
726
+
727 return 5; /* return error */
+
728 }
+
729 *raw = (*raw) >> 3; /* right shift 3 */
+
730 *mV = (float)(*raw) * 4.0f; /* set the converted data */
+
731
+
732 return 0; /* success return 0 */
+
733}
+
+
734
+
+
747uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA)
+
748{
+
749 uint8_t res;
+
750 union
+
751 {
+
752 uint16_t u;
+
753 int16_t s;
+
754 } u;
+
755
+
756 if (handle == NULL) /* check handle */
+
757 {
+
758 return 2; /* return error */
+
759 }
+
760 if (handle->inited != 1) /* check handle initialization */
+
761 {
+
762 return 3; /* return error */
+
763 }
+
764
+
765 res = a_ina219_iic_read(handle, INA219_REG_CURRENT, (uint16_t *)&u.u); /* read current */
+
766 if (res != 0) /* check result */
+
767 {
+
768 handle->debug_print("ina219: read current register failed.\n"); /* read current register failed */
+
769
+
770 return 1; /* return error */
+
771 }
+
772 *raw = u.s; /* set the raw */
+
773 *mA = (float)((double)(*raw) * handle->current_lsb * 1000); /* set the converted data */
+
774
+
775 return 0; /* success return 0 */
+
776}
+
+
777
+
+
790uint8_t ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW)
+
791{
+
792 uint8_t res;
+
793
+
794 if (handle == NULL) /* check handle */
+
795 {
+
796 return 2; /* return error */
+
797 }
+
798 if (handle->inited != 1) /* check handle initialization */
+
799 {
+
800 return 3; /* return error */
+
801 }
+
802
+
803 res = a_ina219_iic_read(handle, INA219_REG_POWER, (uint16_t *)raw); /* read power */
+
804 if (res != 0) /* check result */
+
805 {
+
806 handle->debug_print("ina219: read power register failed.\n"); /* read power register failed */
+
807
+
808 return 1; /* return error */
+
809 }
+
810 *mW = (float)((double)(*raw) * handle->current_lsb * 20.0 * 1000.0); /* set the converted data */
+
811
+
812 return 0; /* success return 0 */
+
813}
+
+
814
+
+
826uint8_t ina219_get_calibration(ina219_handle_t *handle, uint16_t *data)
+
827{
+
828 uint8_t res;
+
829
+
830 if (handle == NULL) /* check handle */
+
831 {
+
832 return 2; /* return error */
+
833 }
+
834 if (handle->inited != 1) /* check handle initialization */
+
835 {
+
836 return 3; /* return error */
+
837 }
+
838
+
839 res = a_ina219_iic_read(handle, INA219_REG_CALIBRATION, (uint16_t *)data); /* read calibration */
+
840 if (res != 0) /* check result */
+
841 {
+
842 handle->debug_print("ina219: read calibration register failed.\n"); /* read calibration register failed */
+
843
+
844 return 1; /* return error */
+
845 }
+
846
+
847 return 0; /* success return 0 */
+
848}
+
+
849
+
+
863uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
+
864{
+
865 uint8_t res;
+
866 uint16_t prev;
+
867 uint8_t pga;
+
868 double v;
+
869
+
870 if (handle == NULL) /* check handle */
+
871 {
+
872 return 2; /* return error */
+
873 }
+
874 if (handle->inited != 1) /* check handle initialization */
+
875 {
+
876 return 3; /* return error */
+
877 }
+
878 if ((handle->r >= -0.000001f) && (handle->r <= 0.000001f)) /* check the r */
+
879 {
+
880 handle->debug_print("ina219: r can't be zero.\n"); /* r can't be zero */
+
881
+
882 return 4; /* return error */
+
883 }
+
884
+
885 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read conf */
+
886 if (res != 0) /* check result */
+
887 {
+
888 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
889
+
890 return 1; /* return error */
+
891 }
+
892 pga = (prev >> 11) & 0x3; /* get pga */
+
893 switch (pga) /* select the pga */
+
894 {
+
895 case 0 :
+
896 {
+
897 v = 0.04; /* 0.04 V */
+
898 res = 0; /* set ok */
+
899
+
900 break;
+
901 }
+
902 case 1 :
+
903 {
+
904 v = 0.08; /* 0.08 V */
+
905 res = 0; /* set ok */
+
906
+
907 break;
+
908 }
+
909 case 2 :
+
910 {
+
911 v = 0.16; /* 0.16 V */
+
912 res = 0; /* set ok */
+
913
+
914 break;
+
915 }
+
916 case 3 :
+
917 {
+
918 v = 0.32; /* 0.32 V */
+
919 res = 0; /* set ok */
+
920
+
921 break;
+
922 }
+
923 default :
+
924 {
+
925 v = 0.0; /* 0.0 V */
+
926 res = 1; /* set failed */
+
927
+
928 break;
+
929 }
+
930 }
+
931 if (res == 1)
+
932 {
+
933 handle->debug_print("ina219: pga is invalid.\n"); /* pga is invalid*/
+
934
+
935 return 5; /* return error */
+
936 }
+
937 else
+
938 {
+
939 handle->current_lsb = v / handle->r / pow(2.0, 15.0); /* current lsb */
+
940 *calibration = (uint16_t)(0.04096 / (v / pow(2.0, 15.0))); /* set calibration */
+
941
+
942 return 0; /* success return 0 */
+
943 }
+
944}
+
+
945
+
+
957uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
+
958{
+
959 uint8_t res;
+
960
+
961 if (handle == NULL) /* check handle */
+
962 {
+
963 return 2; /* return error */
+
964 }
+
965 if (handle->inited != 1) /* check handle initialization */
+
966 {
+
967 return 3; /* return error */
+
968 }
+
969
+
970 res = a_ina219_iic_write(handle, INA219_REG_CALIBRATION, data); /* write calibration */
+
971 if (res != 0) /* check result */
+
972 {
+
973 handle->debug_print("ina219: write calibration register failed.\n"); /* write calibration register failed */
+
974
+
975 return 1; /* return error */
+
976 }
+
977
+
978 return 0; /* success return 0 */
+
979}
+
+
980
+
+ +
993{
+
994 uint8_t res;
+
995 uint16_t prev;
+
996
+
997 if (handle == NULL) /* check handle */
+
998 {
+
999 return 2; /* return error */
+
1000 }
+
1001 if (handle->debug_print == NULL) /* check debug_print */
+
1002 {
+
1003 return 3; /* return error */
+
1004 }
+
1005 if (handle->iic_init == NULL) /* check iic_init */
+
1006 {
+
1007 handle->debug_print("ina219: iic_init is null.\n"); /* iic_init is null */
+
1008
+
1009 return 3; /* return error */
+
1010 }
+
1011 if (handle->iic_deinit == NULL) /* check iic_deinit */
+
1012 {
+
1013 handle->debug_print("ina219: iic_deinit is null.\n"); /* iic_deinit is null */
+
1014
+
1015 return 3; /* return error */
+
1016 }
+
1017 if (handle->iic_read == NULL) /* check iic_read */
+
1018 {
+
1019 handle->debug_print("ina219: iic_read is null.\n"); /* iic_read is null */
+
1020
+
1021 return 3; /* return error */
+
1022 }
+
1023 if (handle->iic_write == NULL) /* check iic_write */
+
1024 {
+
1025 handle->debug_print("ina219: iic_write is null.\n"); /* iic_write is null */
+
1026
+
1027 return 3; /* return error */
+
1028 }
+
1029 if (handle->delay_ms == NULL) /* check delay_ms */
+
1030 {
+
1031 handle->debug_print("ina219: delay_ms is null.\n"); /* delay_ms is null */
+
1032
+
1033 return 3; /* return error */
+
1034 }
+
1035
+
1036 if (handle->iic_init() != 0) /* iic init */
+
1037 {
+
1038 handle->debug_print("ina219: iic init failed.\n"); /* iic init failed */
+
1039
+
1040 return 1; /* return error */
+
1041 }
+
1042 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read conf */
+
1043 if (res != 0) /* check result */
+
1044 {
+
1045 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
1046 (void)handle->iic_deinit(); /* iic deinit */
+
1047
+
1048 return 4; /* return error */
+
1049 }
+
1050 prev |= 1 << 15;
+
1051 res = a_ina219_iic_write(handle, INA219_REG_CONF, prev); /* write conf */
+
1052 if (res != 0) /* check result */
+
1053 {
+
1054 handle->debug_print("ina219: write conf register failed.\n"); /* write conf register failed */
+
1055 (void)handle->iic_deinit(); /* iic deinit */
+
1056
+
1057 return 4; /* return error */
+
1058 }
+
1059 handle->delay_ms(10); /* delay 10 ms */
+
1060 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read conf */
+
1061 if (res != 0) /* check result */
+
1062 {
+
1063 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
1064 (void)handle->iic_deinit(); /* iic deinit */
+
1065
+
1066 return 4; /* return error */
+
1067 }
+
1068 if ((prev & (1 << 15)) != 0) /* check the result */
+
1069 {
+
1070 handle->debug_print("ina219: soft reset failed.\n"); /* soft reset failed */
+
1071 (void)handle->iic_deinit(); /* iic deinit */
+
1072
+
1073 return 4; /* return error */
+
1074 }
+
1075
+
1076 handle->inited = 1; /* flag inited */
+
1077
+
1078 return 0; /* success return 0 */
+
1079}
+
+
1080
+
+ +
1093{
+
1094 uint8_t res;
+
1095 uint16_t prev;
+
1096
+
1097 if (handle == NULL) /* check handle */
+
1098 {
+
1099 return 2; /* return error */
+
1100 }
+
1101 if (handle->inited != 1) /* check handle initialization */
+
1102 {
+
1103 return 3; /* return error */
+
1104 }
+
1105
+
1106 res = a_ina219_iic_read(handle, INA219_REG_CONF, (uint16_t *)&prev); /* read config */
+
1107 if (res != 0) /* check result */
+
1108 {
+
1109 handle->debug_print("ina219: read conf register failed.\n"); /* read conf register failed */
+
1110
+
1111 return 4; /* return error */
+
1112 }
+
1113 prev &= ~(0x07); /* clear mode */
+
1114 res = a_ina219_iic_write(handle, INA219_REG_CONF, (uint16_t )prev); /* write config */
+
1115 if (res != 0) /* check result */
+
1116 {
+
1117 handle->debug_print("ina219: write conf register failed.\n"); /* write conf register failed */
+
1118
+
1119 return 4; /* return error */
+
1120 }
+
1121 res = handle->iic_deinit(); /* iic deinit */
+
1122 if (res != 0) /* check result */
+
1123 {
+
1124 handle->debug_print("ina219: iic deinit failed.\n"); /* iic deinit failed */
+
1125
+
1126 return 1; /* return error */
+
1127 }
+
1128
+
1129 return 0; /* success return 0 */
+
1130}
+
+
1131
+
+
1144uint8_t ina219_set_reg(ina219_handle_t *handle, uint8_t reg, uint16_t data)
+
1145{
+
1146 if (handle == NULL) /* check handle */
+
1147 {
+
1148 return 2; /* return error */
+
1149 }
+
1150 if (handle->inited != 1) /* check handle initialization */
+
1151 {
+
1152 return 3; /* return error */
+
1153 }
+
1154
+
1155 return a_ina219_iic_write(handle, reg, data); /* write data */
+
1156}
+
+
1157
+
+
1170uint8_t ina219_get_reg(ina219_handle_t *handle, uint8_t reg, uint16_t *data)
+
1171{
+
1172 if (handle == NULL) /* check handle */
+
1173 {
+
1174 return 2; /* return error */
+
1175 }
+
1176 if (handle->inited != 1) /* check handle initialization */
+
1177 {
+
1178 return 3; /* return error */
+
1179 }
+
1180
+
1181 return a_ina219_iic_read(handle, reg, data); /* read data */
+
1182}
+
+
1183
+
+ +
1193{
+
1194 if (info == NULL) /* check handle */
+
1195 {
+
1196 return 2; /* return error */
+
1197 }
+
1198
+
1199 memset(info, 0, sizeof(ina219_info_t)); /* initialize ina219 info structure */
+
1200 strncpy(info->chip_name, CHIP_NAME, 32); /* copy chip name */
+
1201 strncpy(info->manufacturer_name, MANUFACTURER_NAME, 32); /* copy manufacturer name */
+
1202 strncpy(info->interface, "IIC", 8); /* copy interface name */
+
1203 info->supply_voltage_min_v = SUPPLY_VOLTAGE_MIN; /* set minimal supply voltage */
+
1204 info->supply_voltage_max_v = SUPPLY_VOLTAGE_MAX; /* set maximum supply voltage */
+
1205 info->max_current_ma = MAX_CURRENT; /* set maximum current */
+
1206 info->temperature_max = TEMPERATURE_MAX; /* set minimal temperature */
+
1207 info->temperature_min = TEMPERATURE_MIN; /* set maximum temperature */
+
1208 info->driver_version = DRIVER_VERSION; /* set driver version */
+
1209
+
1210 return 0; /* success return 0 */
+
1211}
+
+
#define MAX_CURRENT
+
#define INA219_REG_BUS_VOLTAGE
+
#define INA219_REG_CONF
chip register definition
+
#define SUPPLY_VOLTAGE_MAX
+
#define INA219_REG_CALIBRATION
+
#define TEMPERATURE_MAX
+
#define MANUFACTURER_NAME
+
#define TEMPERATURE_MIN
+
#define SUPPLY_VOLTAGE_MIN
+
#define CHIP_NAME
chip information definition
+
#define INA219_REG_POWER
+
#define DRIVER_VERSION
+
#define INA219_REG_CURRENT
+
#define INA219_REG_SHUNT_VOLTAGE
driver ina219 header file
-
uint8_t ina219_get_pga(ina219_handle_t *handle, ina219_pga_t *pga)
get the pga
-
uint8_t ina219_get_resistance(ina219_handle_t *handle, double *resistance)
get the resistance
-
uint8_t ina219_get_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t *range)
get the bus voltage range
-
uint8_t ina219_soft_reset(ina219_handle_t *handle)
soft reset the chip
-
uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin)
set the iic address pin
-
uint8_t ina219_info(ina219_info_t *info)
get chip's information
-
uint8_t ina219_set_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the shunt voltage adc mode
-
uint8_t ina219_get_mode(ina219_handle_t *handle, ina219_mode_t *mode)
get the mode
-
uint8_t ina219_get_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t *mode)
get the bus voltage adc mode
-
ina219_adc_mode_t
ina219 adc mode enumeration definition
-
ina219_pga_t
ina219 pga enumeration definition
Definition: driver_ina219.h:95
-
uint8_t ina219_get_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t *mode)
get the shunt voltage adc mode
-
uint8_t ina219_get_addr_pin(ina219_handle_t *handle, ina219_address_t *addr_pin)
get the iic address pin
-
uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
set the calibration
-
ina219_bus_voltage_range_t
ina219 bus voltage enumeration definition
Definition: driver_ina219.h:86
-
uint8_t ina219_deinit(ina219_handle_t *handle)
close the chip
-
uint8_t ina219_get_calibration(ina219_handle_t *handle, uint16_t *data)
get the calibration
-
uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode)
set the mode
-
uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga)
set the pga
-
uint8_t ina219_set_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t range)
set the bus voltage range
-
uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV)
read the bus voltage
-
uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA)
read the current
-
uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
calculate the calibration
-
uint8_t ina219_init(ina219_handle_t *handle)
initialize the chip
-
uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
set the resistance
-
ina219_mode_t
ina219 mode enumeration definition
-
ina219_address_t
ina219 address enumeration definition
Definition: driver_ina219.h:63
-
uint8_t ina219_set_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the bus voltage adc mode
-
uint8_t ina219_read_shunt_voltage(ina219_handle_t *handle, int16_t *raw, float *mV)
read the shunt voltage
-
uint8_t ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW)
read the power
-
@ INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED
-
@ INA219_MODE_SHUNT_VOLTAGE_TRIGGERED
-
uint8_t ina219_get_reg(ina219_handle_t *handle, uint8_t reg, uint16_t *data)
get the chip register
-
uint8_t ina219_set_reg(ina219_handle_t *handle, uint8_t reg, uint16_t data)
set the chip register
-
ina219 handle structure definition
- -
void(* delay_ms)(uint32_t ms)
-
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)
-
ina219 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 ina219_get_pga(ina219_handle_t *handle, ina219_pga_t *pga)
get the pga
+
uint8_t ina219_get_resistance(ina219_handle_t *handle, double *resistance)
get the resistance
+
uint8_t ina219_get_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t *range)
get the bus voltage range
+
uint8_t ina219_soft_reset(ina219_handle_t *handle)
soft reset the chip
+
struct ina219_info_s ina219_info_t
ina219 information structure definition
+
uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin)
set the iic address pin
+
uint8_t ina219_info(ina219_info_t *info)
get chip's information
+
uint8_t ina219_set_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the shunt voltage adc mode
+
uint8_t ina219_get_mode(ina219_handle_t *handle, ina219_mode_t *mode)
get the mode
+
uint8_t ina219_get_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t *mode)
get the bus voltage adc mode
+
ina219_adc_mode_t
ina219 adc mode enumeration definition
+
ina219_pga_t
ina219 pga enumeration definition
+
uint8_t ina219_get_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t *mode)
get the shunt voltage adc mode
+
uint8_t ina219_get_addr_pin(ina219_handle_t *handle, ina219_address_t *addr_pin)
get the iic address pin
+
uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
set the calibration
+
ina219_bus_voltage_range_t
ina219 bus voltage enumeration definition
+
uint8_t ina219_deinit(ina219_handle_t *handle)
close the chip
+
uint8_t ina219_get_calibration(ina219_handle_t *handle, uint16_t *data)
get the calibration
+
uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode)
set the mode
+
uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga)
set the pga
+
uint8_t ina219_set_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t range)
set the bus voltage range
+
uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV)
read the bus voltage
+
uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA)
read the current
+
uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
calculate the calibration
+
uint8_t ina219_init(ina219_handle_t *handle)
initialize the chip
+
uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
set the resistance
+
ina219_mode_t
ina219 mode enumeration definition
+
ina219_address_t
ina219 address enumeration definition
+
uint8_t ina219_set_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the bus voltage adc mode
+
uint8_t ina219_read_shunt_voltage(ina219_handle_t *handle, int16_t *raw, float *mV)
read the shunt voltage
+
struct ina219_handle_s ina219_handle_t
ina219 handle structure definition
+
uint8_t ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW)
read the power
+
@ INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED
+
@ INA219_MODE_SHUNT_VOLTAGE_TRIGGERED
+
uint8_t ina219_get_reg(ina219_handle_t *handle, uint8_t reg, uint16_t *data)
get the chip register
+
uint8_t ina219_set_reg(ina219_handle_t *handle, uint8_t reg, uint16_t data)
set the chip register
+ +
void(* delay_ms)(uint32_t ms)
+
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]
+
diff --git a/doc/html/driver__ina219_8h.html b/doc/html/driver__ina219_8h.html index ef68d5b..82d9254 100644 --- a/doc/html/driver__ina219_8h.html +++ b/doc/html/driver__ina219_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: src/driver_ina219.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ina219.h File Reference
+
driver_ina219.h File Reference
@@ -100,54 +100,53 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
+
+Include dependency graph for driver_ina219.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+

Go to the source code of this file.

- - + - - + -

+

Data Structures

struct  ina219_handle_s
struct  ina219_handle_s
 ina219 handle structure definition More...
 
struct  ina219_info_s
struct  ina219_info_s
 ina219 information structure definition More...
 
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + +

+

Macros

#define DRIVER_INA219_LINK_INIT(HANDLE, STRUCTURE)   memset(HANDLE, 0, sizeof(STRUCTURE))
 initialize ina219_handle_t structure More...
 
#define DRIVER_INA219_LINK_IIC_INIT(HANDLE, FUC)   (HANDLE)->iic_init = FUC
 link iic_init function More...
 
#define DRIVER_INA219_LINK_IIC_DEINIT(HANDLE, FUC)   (HANDLE)->iic_deinit = FUC
 link iic_deinit function More...
 
#define DRIVER_INA219_LINK_IIC_READ(HANDLE, FUC)   (HANDLE)->iic_read = FUC
 link iic_read function More...
 
#define DRIVER_INA219_LINK_IIC_WRITE(HANDLE, FUC)   (HANDLE)->iic_write = FUC
 link iic_write function More...
 
#define DRIVER_INA219_LINK_DELAY_MS(HANDLE, FUC)   (HANDLE)->delay_ms = FUC
 link delay_ms function More...
 
#define DRIVER_INA219_LINK_DEBUG_PRINT(HANDLE, FUC)   (HANDLE)->debug_print = FUC
 link debug_print function More...
 
#define DRIVER_INA219_LINK_INIT(HANDLE, STRUCTURE)
 initialize ina219_handle_t structure
#define DRIVER_INA219_LINK_IIC_INIT(HANDLE, FUC)
 link iic_init function
#define DRIVER_INA219_LINK_IIC_DEINIT(HANDLE, FUC)
 link iic_deinit function
#define DRIVER_INA219_LINK_IIC_READ(HANDLE, FUC)
 link iic_read function
#define DRIVER_INA219_LINK_IIC_WRITE(HANDLE, FUC)
 link iic_write function
#define DRIVER_INA219_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_INA219_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function
- - - - - - - + + + +

+

Typedefs

typedef struct ina219_handle_s ina219_handle_t
 ina219 handle structure definition More...
 
typedef struct ina219_info_s ina219_info_t
 ina219 information structure definition More...
 
typedef struct ina219_handle_s ina219_handle_t
 ina219 handle structure definition
typedef struct ina219_info_s ina219_info_t
 ina219 information structure definition
- - - - - - - - - - -

+

Enumerations

enum  ina219_address_t {
+
enum  ina219_address_t {
  INA219_ADDRESS_0 = (0x40 << 1) , INA219_ADDRESS_1 = (0x41 << 1) , INA219_ADDRESS_2 = (0x42 << 1) @@ -170,20 +169,17 @@
}
 ina219 address enumeration definition More...
 
enum  ina219_bus_voltage_range_t { INA219_BUS_VOLTAGE_RANGE_16V = 0 +
enum  ina219_bus_voltage_range_t { INA219_BUS_VOLTAGE_RANGE_16V = 0 , INA219_BUS_VOLTAGE_RANGE_32V = 1 }
 ina219 bus voltage enumeration definition More...
 
enum  ina219_pga_t { INA219_PGA_40_MV = 0 +
enum  ina219_pga_t { INA219_PGA_40_MV = 0 , INA219_PGA_80_MV = 1 , INA219_PGA_160_MV = 2 , INA219_PGA_320_MV = 3 }
 ina219 pga enumeration definition More...
 
enum  ina219_adc_mode_t {
+
enum  ina219_adc_mode_t {
  INA219_ADC_MODE_9_BIT_1_SAMPLES = 0x0 , INA219_ADC_MODE_10_BIT_1_SAMPLES = 0x1 , INA219_ADC_MODE_11_BIT_1_SAMPLES = 0x2 @@ -200,8 +196,7 @@
}
 ina219 adc mode enumeration definition More...
 
enum  ina219_mode_t {
+
enum  ina219_mode_t {
  INA219_MODE_POWER_DOWN = 0x0 , INA219_MODE_SHUNT_VOLTAGE_TRIGGERED = 0x1 , INA219_MODE_BUS_VOLTAGE_TRIGGERED = 0x2 @@ -214,93 +209,65 @@
}
 ina219 mode enumeration definition More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ina219_info (ina219_info_t *info)
 get chip's information More...
 
uint8_t ina219_set_addr_pin (ina219_handle_t *handle, ina219_address_t addr_pin)
 set the iic address pin More...
 
uint8_t ina219_get_addr_pin (ina219_handle_t *handle, ina219_address_t *addr_pin)
 get the iic address pin More...
 
uint8_t ina219_set_resistance (ina219_handle_t *handle, double resistance)
 set the resistance More...
 
uint8_t ina219_get_resistance (ina219_handle_t *handle, double *resistance)
 get the resistance More...
 
uint8_t ina219_init (ina219_handle_t *handle)
 initialize the chip More...
 
uint8_t ina219_deinit (ina219_handle_t *handle)
 close the chip More...
 
uint8_t ina219_read_shunt_voltage (ina219_handle_t *handle, int16_t *raw, float *mV)
 read the shunt voltage More...
 
uint8_t ina219_read_bus_voltage (ina219_handle_t *handle, uint16_t *raw, float *mV)
 read the bus voltage More...
 
uint8_t ina219_read_current (ina219_handle_t *handle, int16_t *raw, float *mA)
 read the current More...
 
uint8_t ina219_read_power (ina219_handle_t *handle, uint16_t *raw, float *mW)
 read the power More...
 
uint8_t ina219_soft_reset (ina219_handle_t *handle)
 soft reset the chip More...
 
uint8_t ina219_set_bus_voltage_range (ina219_handle_t *handle, ina219_bus_voltage_range_t range)
 set the bus voltage range More...
 
uint8_t ina219_get_bus_voltage_range (ina219_handle_t *handle, ina219_bus_voltage_range_t *range)
 get the bus voltage range More...
 
uint8_t ina219_set_pga (ina219_handle_t *handle, ina219_pga_t pga)
 set the pga More...
 
uint8_t ina219_get_pga (ina219_handle_t *handle, ina219_pga_t *pga)
 get the pga More...
 
uint8_t ina219_set_bus_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t mode)
 set the bus voltage adc mode More...
 
uint8_t ina219_get_bus_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t *mode)
 get the bus voltage adc mode More...
 
uint8_t ina219_set_shunt_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t mode)
 set the shunt voltage adc mode More...
 
uint8_t ina219_get_shunt_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t *mode)
 get the shunt voltage adc mode More...
 
uint8_t ina219_set_mode (ina219_handle_t *handle, ina219_mode_t mode)
 set the mode More...
 
uint8_t ina219_get_mode (ina219_handle_t *handle, ina219_mode_t *mode)
 get the mode More...
 
uint8_t ina219_set_calibration (ina219_handle_t *handle, uint16_t data)
 set the calibration More...
 
uint8_t ina219_get_calibration (ina219_handle_t *handle, uint16_t *data)
 get the calibration More...
 
uint8_t ina219_calculate_calibration (ina219_handle_t *handle, uint16_t *calibration)
 calculate the calibration More...
 
uint8_t ina219_set_reg (ina219_handle_t *handle, uint8_t reg, uint16_t data)
 set the chip register More...
 
uint8_t ina219_get_reg (ina219_handle_t *handle, uint8_t reg, uint16_t *data)
 get the chip register More...
 
uint8_t ina219_info (ina219_info_t *info)
 get chip's information
uint8_t ina219_set_addr_pin (ina219_handle_t *handle, ina219_address_t addr_pin)
 set the iic address pin
uint8_t ina219_get_addr_pin (ina219_handle_t *handle, ina219_address_t *addr_pin)
 get the iic address pin
uint8_t ina219_set_resistance (ina219_handle_t *handle, double resistance)
 set the resistance
uint8_t ina219_get_resistance (ina219_handle_t *handle, double *resistance)
 get the resistance
uint8_t ina219_init (ina219_handle_t *handle)
 initialize the chip
uint8_t ina219_deinit (ina219_handle_t *handle)
 close the chip
uint8_t ina219_read_shunt_voltage (ina219_handle_t *handle, int16_t *raw, float *mV)
 read the shunt voltage
uint8_t ina219_read_bus_voltage (ina219_handle_t *handle, uint16_t *raw, float *mV)
 read the bus voltage
uint8_t ina219_read_current (ina219_handle_t *handle, int16_t *raw, float *mA)
 read the current
uint8_t ina219_read_power (ina219_handle_t *handle, uint16_t *raw, float *mW)
 read the power
uint8_t ina219_soft_reset (ina219_handle_t *handle)
 soft reset the chip
uint8_t ina219_set_bus_voltage_range (ina219_handle_t *handle, ina219_bus_voltage_range_t range)
 set the bus voltage range
uint8_t ina219_get_bus_voltage_range (ina219_handle_t *handle, ina219_bus_voltage_range_t *range)
 get the bus voltage range
uint8_t ina219_set_pga (ina219_handle_t *handle, ina219_pga_t pga)
 set the pga
uint8_t ina219_get_pga (ina219_handle_t *handle, ina219_pga_t *pga)
 get the pga
uint8_t ina219_set_bus_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t mode)
 set the bus voltage adc mode
uint8_t ina219_get_bus_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t *mode)
 get the bus voltage adc mode
uint8_t ina219_set_shunt_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t mode)
 set the shunt voltage adc mode
uint8_t ina219_get_shunt_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t *mode)
 get the shunt voltage adc mode
uint8_t ina219_set_mode (ina219_handle_t *handle, ina219_mode_t mode)
 set the mode
uint8_t ina219_get_mode (ina219_handle_t *handle, ina219_mode_t *mode)
 get the mode
uint8_t ina219_set_calibration (ina219_handle_t *handle, uint16_t data)
 set the calibration
uint8_t ina219_get_calibration (ina219_handle_t *handle, uint16_t *data)
 get the calibration
uint8_t ina219_calculate_calibration (ina219_handle_t *handle, uint16_t *calibration)
 calculate the calibration
uint8_t ina219_set_reg (ina219_handle_t *handle, uint8_t reg, uint16_t data)
 set the chip register
uint8_t ina219_get_reg (ina219_handle_t *handle, uint8_t reg, uint16_t *data)
 get the chip register
-

Detailed Description

+

Detailed Description

driver ina219 header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -321,11 +288,19 @@

history

Definition in file driver_ina219.h.

+ +
diff --git a/doc/html/driver__ina219_8h__dep__incl.md5 b/doc/html/driver__ina219_8h__dep__incl.md5 new file mode 100644 index 0000000..7cf1140 --- /dev/null +++ b/doc/html/driver__ina219_8h__dep__incl.md5 @@ -0,0 +1 @@ +d1b52574172331f2ea80ee7947b3b05b \ No newline at end of file diff --git a/doc/html/driver__ina219_8h__dep__incl.svg b/doc/html/driver__ina219_8h__dep__incl.svg new file mode 100644 index 0000000..63d3944 --- /dev/null +++ b/doc/html/driver__ina219_8h__dep__incl.svg @@ -0,0 +1,229 @@ + + + + + + +src/driver_ina219.h + + +Node1 + + +src/driver_ina219.h + + + + + +Node2 + + +interface/driver_ina219 +_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node12 + + +src/driver_ina219.c + + + + + +Node1->Node12 + + + + + + + + +Node3 + + +example/driver_ina219 +_basic.h + + + + + +Node2->Node3 + + + + + + + + +Node5 + + +example/driver_ina219 +_shot.h + + + + + +Node2->Node5 + + + + + + + + +Node7 + + +interface/driver_ina219 +_interface_template.c + + + + + +Node2->Node7 + + + + + + + + +Node8 + + +test/driver_ina219 +_read_test.h + + + + + +Node2->Node8 + + + + + + + + +Node10 + + +test/driver_ina219 +_register_test.h + + + + + +Node2->Node10 + + + + + + + + +Node4 + + +example/driver_ina219 +_basic.c + + + + + +Node3->Node4 + + + + + + + + +Node6 + + +example/driver_ina219 +_shot.c + + + + + +Node5->Node6 + + + + + + + + +Node9 + + +test/driver_ina219 +_read_test.c + + + + + +Node8->Node9 + + + + + + + + +Node11 + + +test/driver_ina219 +_register_test.c + + + + + +Node10->Node11 + + + + + + + + diff --git a/doc/html/driver__ina219_8h__incl.md5 b/doc/html/driver__ina219_8h__incl.md5 new file mode 100644 index 0000000..d24f514 --- /dev/null +++ b/doc/html/driver__ina219_8h__incl.md5 @@ -0,0 +1 @@ +ad71588102313c70cc43bfe5ca1e7f38 \ No newline at end of file diff --git a/doc/html/driver__ina219_8h__incl.svg b/doc/html/driver__ina219_8h__incl.svg new file mode 100644 index 0000000..9c4d3bd --- /dev/null +++ b/doc/html/driver__ina219_8h__incl.svg @@ -0,0 +1,75 @@ + + + + + + +src/driver_ina219.h + + +Node1 + + +src/driver_ina219.h + + + + + +Node2 + + +stdio.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +stdint.h + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +string.h + + + + + +Node1->Node4 + + + + + + + + diff --git a/doc/html/driver__ina219_8h_source.html b/doc/html/driver__ina219_8h_source.html index b120059..6d0e1f0 100644 --- a/doc/html/driver__ina219_8h_source.html +++ b/doc/html/driver__ina219_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: src/driver_ina219.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ina219.h
+
driver_ina219.h
-Go to the documentation of this file.
1 
-
37 #ifndef DRIVER_INA219_H
-
38 #define DRIVER_INA219_H
-
39 
-
40 #include <stdio.h>
-
41 #include <stdint.h>
-
42 #include <string.h>
-
43 
-
44 #ifdef __cplusplus
-
45 extern "C"{
-
46 #endif
-
47 
-
62 typedef enum
-
63 {
-
64  INA219_ADDRESS_0 = (0x40 << 1),
-
65  INA219_ADDRESS_1 = (0x41 << 1),
-
66  INA219_ADDRESS_2 = (0x42 << 1),
-
67  INA219_ADDRESS_3 = (0x43 << 1),
-
68  INA219_ADDRESS_4 = (0x44 << 1),
-
69  INA219_ADDRESS_5 = (0x45 << 1),
-
70  INA219_ADDRESS_6 = (0x46 << 1),
-
71  INA219_ADDRESS_7 = (0x47 << 1),
-
72  INA219_ADDRESS_8 = (0x48 << 1),
-
73  INA219_ADDRESS_9 = (0x49 << 1),
-
74  INA219_ADDRESS_A = (0x4A << 1),
-
75  INA219_ADDRESS_B = (0x4B << 1),
-
76  INA219_ADDRESS_C = (0x4C << 1),
-
77  INA219_ADDRESS_D = (0x4D << 1),
-
78  INA219_ADDRESS_E = (0x4E << 1),
-
79  INA219_ADDRESS_F = (0x4F << 1)
- -
81 
-
85 typedef enum
-
86 {
- - - -
90 
-
94 typedef enum
-
95 {
- - - - -
100 } ina219_pga_t;
-
101 
-
105 typedef enum
-
106 {
- - - - - - - - - - - - -
119 
-
123 typedef enum
-
124 {
- - - - - - - - -
133 } ina219_mode_t;
-
134 
-
138 typedef struct ina219_handle_s
-
139 {
-
140  uint8_t iic_addr;
-
141  uint8_t (*iic_init)(void);
-
142  uint8_t (*iic_deinit)(void);
-
143  uint8_t (*iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
-
144  uint8_t (*iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
-
145  void (*delay_ms)(uint32_t ms);
-
146  void (*debug_print)(const char *const fmt, ...);
-
147  double r;
-
148  double current_lsb;
-
149  uint8_t inited;
- -
151 
-
155 typedef struct ina219_info_s
-
156 {
-
157  char chip_name[32];
-
158  char manufacturer_name[32];
-
159  char interface[8];
- - - - - -
165  uint32_t driver_version;
- -
167 
-
185 #define DRIVER_INA219_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
-
186 
-
193 #define DRIVER_INA219_LINK_IIC_INIT(HANDLE, FUC) (HANDLE)->iic_init = FUC
-
194 
-
201 #define DRIVER_INA219_LINK_IIC_DEINIT(HANDLE, FUC) (HANDLE)->iic_deinit = FUC
-
202 
-
209 #define DRIVER_INA219_LINK_IIC_READ(HANDLE, FUC) (HANDLE)->iic_read = FUC
-
210 
-
217 #define DRIVER_INA219_LINK_IIC_WRITE(HANDLE, FUC) (HANDLE)->iic_write = FUC
-
218 
-
225 #define DRIVER_INA219_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
-
226 
-
233 #define DRIVER_INA219_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
-
234 
-
254 uint8_t ina219_info(ina219_info_t *info);
-
255 
-
265 uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin);
-
266 
-
276 uint8_t ina219_get_addr_pin(ina219_handle_t *handle, ina219_address_t *addr_pin);
-
277 
-
287 uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance);
-
288 
-
298 uint8_t ina219_get_resistance(ina219_handle_t *handle, double *resistance);
-
299 
-
311 uint8_t ina219_init(ina219_handle_t *handle);
-
312 
-
324 uint8_t ina219_deinit(ina219_handle_t *handle);
-
325 
-
338 uint8_t ina219_read_shunt_voltage(ina219_handle_t *handle, int16_t *raw, float *mV);
-
339 
-
354 uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV);
-
355 
-
368 uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA);
-
369 
-
382 uint8_t ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW);
-
383 
-
394 uint8_t ina219_soft_reset(ina219_handle_t *handle);
-
395 
- -
408 
- -
421 
-
433 uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga);
-
434 
-
446 uint8_t ina219_get_pga(ina219_handle_t *handle, ina219_pga_t *pga);
-
447 
- -
460 
- -
473 
- -
486 
- -
499 
-
511 uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode);
-
512 
-
524 uint8_t ina219_get_mode(ina219_handle_t *handle, ina219_mode_t *mode);
-
525 
-
537 uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data);
-
538 
-
550 uint8_t ina219_get_calibration(ina219_handle_t *handle, uint16_t *data);
-
551 
-
565 uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration);
-
566 
-
590 uint8_t ina219_set_reg(ina219_handle_t *handle, uint8_t reg, uint16_t data);
-
591 
-
604 uint8_t ina219_get_reg(ina219_handle_t *handle, uint8_t reg, uint16_t *data);
-
605 
-
614 #ifdef __cplusplus
-
615 }
-
616 #endif
-
617 
-
618 #endif
-
uint8_t ina219_get_pga(ina219_handle_t *handle, ina219_pga_t *pga)
get the pga
-
uint8_t ina219_get_resistance(ina219_handle_t *handle, double *resistance)
get the resistance
-
uint8_t ina219_get_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t *range)
get the bus voltage range
-
uint8_t ina219_soft_reset(ina219_handle_t *handle)
soft reset the chip
+Go to the documentation of this file.
1
+
36
+
37#ifndef DRIVER_INA219_H
+
38#define DRIVER_INA219_H
+
39
+
40#include <stdio.h>
+
41#include <stdint.h>
+
42#include <string.h>
+
43
+
44#ifdef __cplusplus
+
45extern "C"{
+
46#endif
+
47
+
53
+
58
+
+
62typedef enum
+
63{
+
64 INA219_ADDRESS_0 = (0x40 << 1),
+
65 INA219_ADDRESS_1 = (0x41 << 1),
+
66 INA219_ADDRESS_2 = (0x42 << 1),
+
67 INA219_ADDRESS_3 = (0x43 << 1),
+
68 INA219_ADDRESS_4 = (0x44 << 1),
+
69 INA219_ADDRESS_5 = (0x45 << 1),
+
70 INA219_ADDRESS_6 = (0x46 << 1),
+
71 INA219_ADDRESS_7 = (0x47 << 1),
+
72 INA219_ADDRESS_8 = (0x48 << 1),
+
73 INA219_ADDRESS_9 = (0x49 << 1),
+
74 INA219_ADDRESS_A = (0x4A << 1),
+
75 INA219_ADDRESS_B = (0x4B << 1),
+
76 INA219_ADDRESS_C = (0x4C << 1),
+
77 INA219_ADDRESS_D = (0x4D << 1),
+
78 INA219_ADDRESS_E = (0x4E << 1),
+
79 INA219_ADDRESS_F = (0x4F << 1)
+ +
+
81
+ +
90
+
+
94typedef enum
+
95{
+ + + + + +
+
101
+ +
119
+ +
134
+
+
138typedef struct ina219_handle_s
+
139{
+
140 uint8_t iic_addr;
+
141 uint8_t (*iic_init)(void);
+
142 uint8_t (*iic_deinit)(void);
+
143 uint8_t (*iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
+
144 uint8_t (*iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
+
145 void (*delay_ms)(uint32_t ms);
+
146 void (*debug_print)(const char *const fmt, ...);
+
147 double r;
+
148 double current_lsb;
+
149 uint8_t inited;
+ +
+
151
+ +
167
+
171
+
178
+
185#define DRIVER_INA219_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
+
186
+
193#define DRIVER_INA219_LINK_IIC_INIT(HANDLE, FUC) (HANDLE)->iic_init = FUC
+
194
+
201#define DRIVER_INA219_LINK_IIC_DEINIT(HANDLE, FUC) (HANDLE)->iic_deinit = FUC
+
202
+
209#define DRIVER_INA219_LINK_IIC_READ(HANDLE, FUC) (HANDLE)->iic_read = FUC
+
210
+
217#define DRIVER_INA219_LINK_IIC_WRITE(HANDLE, FUC) (HANDLE)->iic_write = FUC
+
218
+
225#define DRIVER_INA219_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
+
226
+
233#define DRIVER_INA219_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
+
234
+
238
+
245
+
254uint8_t ina219_info(ina219_info_t *info);
+
255
+
265uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin);
+
266
+
276uint8_t ina219_get_addr_pin(ina219_handle_t *handle, ina219_address_t *addr_pin);
+
277
+
287uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance);
+
288
+
298uint8_t ina219_get_resistance(ina219_handle_t *handle, double *resistance);
+
299
+
311uint8_t ina219_init(ina219_handle_t *handle);
+
312
+
324uint8_t ina219_deinit(ina219_handle_t *handle);
+
325
+
338uint8_t ina219_read_shunt_voltage(ina219_handle_t *handle, int16_t *raw, float *mV);
+
339
+
354uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV);
+
355
+
368uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA);
+
369
+
382uint8_t ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW);
+
383
+
394uint8_t ina219_soft_reset(ina219_handle_t *handle);
+
395
+ +
408
+ +
421
+
433uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga);
+
434
+
446uint8_t ina219_get_pga(ina219_handle_t *handle, ina219_pga_t *pga);
+
447
+ +
460
+ +
473
+ +
486
+ +
499
+
511uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode);
+
512
+
524uint8_t ina219_get_mode(ina219_handle_t *handle, ina219_mode_t *mode);
+
525
+
537uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data);
+
538
+
550uint8_t ina219_get_calibration(ina219_handle_t *handle, uint16_t *data);
+
551
+
565uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration);
+
566
+
570
+
577
+
590uint8_t ina219_set_reg(ina219_handle_t *handle, uint8_t reg, uint16_t data);
+
591
+
604uint8_t ina219_get_reg(ina219_handle_t *handle, uint8_t reg, uint16_t *data);
+
605
+
609
+
613
+
614#ifdef __cplusplus
+
615}
+
616#endif
+
617
+
618#endif
+
uint8_t ina219_get_pga(ina219_handle_t *handle, ina219_pga_t *pga)
get the pga
+
uint8_t ina219_get_resistance(ina219_handle_t *handle, double *resistance)
get the resistance
+
uint8_t ina219_get_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t *range)
get the bus voltage range
+
uint8_t ina219_soft_reset(ina219_handle_t *handle)
soft reset the chip
struct ina219_info_s ina219_info_t
ina219 information structure definition
-
uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin)
set the iic address pin
-
uint8_t ina219_info(ina219_info_t *info)
get chip's information
-
uint8_t ina219_set_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the shunt voltage adc mode
-
uint8_t ina219_get_mode(ina219_handle_t *handle, ina219_mode_t *mode)
get the mode
-
uint8_t ina219_get_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t *mode)
get the bus voltage adc mode
-
ina219_adc_mode_t
ina219 adc mode enumeration definition
-
ina219_pga_t
ina219 pga enumeration definition
Definition: driver_ina219.h:95
-
uint8_t ina219_get_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t *mode)
get the shunt voltage adc mode
-
uint8_t ina219_get_addr_pin(ina219_handle_t *handle, ina219_address_t *addr_pin)
get the iic address pin
-
uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
set the calibration
-
ina219_bus_voltage_range_t
ina219 bus voltage enumeration definition
Definition: driver_ina219.h:86
-
uint8_t ina219_deinit(ina219_handle_t *handle)
close the chip
-
uint8_t ina219_get_calibration(ina219_handle_t *handle, uint16_t *data)
get the calibration
-
uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode)
set the mode
-
uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga)
set the pga
-
uint8_t ina219_set_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t range)
set the bus voltage range
-
uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV)
read the bus voltage
-
uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA)
read the current
-
uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
calculate the calibration
-
uint8_t ina219_init(ina219_handle_t *handle)
initialize the chip
-
uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
set the resistance
-
ina219_mode_t
ina219 mode enumeration definition
-
ina219_address_t
ina219 address enumeration definition
Definition: driver_ina219.h:63
-
uint8_t ina219_set_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the bus voltage adc mode
-
uint8_t ina219_read_shunt_voltage(ina219_handle_t *handle, int16_t *raw, float *mV)
read the shunt voltage
+
uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin)
set the iic address pin
+
uint8_t ina219_info(ina219_info_t *info)
get chip's information
+
uint8_t ina219_set_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the shunt voltage adc mode
+
uint8_t ina219_get_mode(ina219_handle_t *handle, ina219_mode_t *mode)
get the mode
+
uint8_t ina219_get_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t *mode)
get the bus voltage adc mode
+
ina219_adc_mode_t
ina219 adc mode enumeration definition
+
ina219_pga_t
ina219 pga enumeration definition
+
uint8_t ina219_get_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t *mode)
get the shunt voltage adc mode
+
uint8_t ina219_get_addr_pin(ina219_handle_t *handle, ina219_address_t *addr_pin)
get the iic address pin
+
uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
set the calibration
+
ina219_bus_voltage_range_t
ina219 bus voltage enumeration definition
+
uint8_t ina219_deinit(ina219_handle_t *handle)
close the chip
+
uint8_t ina219_get_calibration(ina219_handle_t *handle, uint16_t *data)
get the calibration
+
uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode)
set the mode
+
uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga)
set the pga
+
uint8_t ina219_set_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t range)
set the bus voltage range
+
uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV)
read the bus voltage
+
uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA)
read the current
+
uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
calculate the calibration
+
uint8_t ina219_init(ina219_handle_t *handle)
initialize the chip
+
uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
set the resistance
+
ina219_mode_t
ina219 mode enumeration definition
+
ina219_address_t
ina219 address enumeration definition
+
uint8_t ina219_set_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the bus voltage adc mode
+
uint8_t ina219_read_shunt_voltage(ina219_handle_t *handle, int16_t *raw, float *mV)
read the shunt voltage
struct ina219_handle_s ina219_handle_t
ina219 handle structure definition
-
uint8_t ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW)
read the power
-
@ INA219_ADC_MODE_12_BIT_128_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_8_SAMPLES
-
@ INA219_ADC_MODE_10_BIT_1_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_1_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_4_SAMPLES
-
@ INA219_ADC_MODE_9_BIT_1_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_2_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_16_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_32_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_64_SAMPLES
-
@ INA219_ADC_MODE_11_BIT_1_SAMPLES
-
@ INA219_PGA_320_MV
Definition: driver_ina219.h:99
-
@ INA219_PGA_40_MV
Definition: driver_ina219.h:96
-
@ INA219_PGA_80_MV
Definition: driver_ina219.h:97
-
@ INA219_PGA_160_MV
Definition: driver_ina219.h:98
-
@ INA219_BUS_VOLTAGE_RANGE_16V
Definition: driver_ina219.h:87
-
@ INA219_BUS_VOLTAGE_RANGE_32V
Definition: driver_ina219.h:88
-
@ INA219_MODE_POWER_DOWN
-
@ INA219_MODE_ADC_OFF
-
@ INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS
-
@ INA219_MODE_SHUNT_VOLTAGE_CONTINUOUS
-
@ INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED
-
@ INA219_MODE_SHUNT_VOLTAGE_TRIGGERED
-
@ INA219_MODE_BUS_VOLTAGE_TRIGGERED
-
@ INA219_MODE_BUS_VOLTAGE_CONTINUOUS
-
@ INA219_ADDRESS_D
Definition: driver_ina219.h:77
-
@ INA219_ADDRESS_0
Definition: driver_ina219.h:64
-
@ INA219_ADDRESS_6
Definition: driver_ina219.h:70
-
@ INA219_ADDRESS_2
Definition: driver_ina219.h:66
-
@ INA219_ADDRESS_3
Definition: driver_ina219.h:67
-
@ INA219_ADDRESS_8
Definition: driver_ina219.h:72
-
@ INA219_ADDRESS_E
Definition: driver_ina219.h:78
-
@ INA219_ADDRESS_7
Definition: driver_ina219.h:71
-
@ INA219_ADDRESS_9
Definition: driver_ina219.h:73
-
@ INA219_ADDRESS_1
Definition: driver_ina219.h:65
-
@ INA219_ADDRESS_4
Definition: driver_ina219.h:68
-
@ INA219_ADDRESS_B
Definition: driver_ina219.h:75
-
@ INA219_ADDRESS_C
Definition: driver_ina219.h:76
-
@ INA219_ADDRESS_A
Definition: driver_ina219.h:74
-
@ INA219_ADDRESS_5
Definition: driver_ina219.h:69
-
@ INA219_ADDRESS_F
Definition: driver_ina219.h:79
-
uint8_t ina219_get_reg(ina219_handle_t *handle, uint8_t reg, uint16_t *data)
get the chip register
-
uint8_t ina219_set_reg(ina219_handle_t *handle, uint8_t reg, uint16_t data)
set the chip register
-
ina219 handle structure definition
- -
void(* delay_ms)(uint32_t ms)
-
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)
-
ina219 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 ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW)
read the power
+
@ INA219_ADC_MODE_12_BIT_128_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_8_SAMPLES
+
@ INA219_ADC_MODE_10_BIT_1_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_1_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_4_SAMPLES
+
@ INA219_ADC_MODE_9_BIT_1_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_2_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_16_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_32_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_64_SAMPLES
+
@ INA219_ADC_MODE_11_BIT_1_SAMPLES
+
@ INA219_PGA_320_MV
+
@ INA219_PGA_40_MV
+
@ INA219_PGA_80_MV
+
@ INA219_PGA_160_MV
+
@ INA219_BUS_VOLTAGE_RANGE_16V
+
@ INA219_BUS_VOLTAGE_RANGE_32V
+
@ INA219_MODE_POWER_DOWN
+
@ INA219_MODE_ADC_OFF
+
@ INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS
+
@ INA219_MODE_SHUNT_VOLTAGE_CONTINUOUS
+
@ INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED
+
@ INA219_MODE_SHUNT_VOLTAGE_TRIGGERED
+
@ INA219_MODE_BUS_VOLTAGE_TRIGGERED
+
@ INA219_MODE_BUS_VOLTAGE_CONTINUOUS
+
@ INA219_ADDRESS_D
+
@ INA219_ADDRESS_0
+
@ INA219_ADDRESS_6
+
@ INA219_ADDRESS_2
+
@ INA219_ADDRESS_3
+
@ INA219_ADDRESS_8
+
@ INA219_ADDRESS_E
+
@ INA219_ADDRESS_7
+
@ INA219_ADDRESS_9
+
@ INA219_ADDRESS_1
+
@ INA219_ADDRESS_4
+
@ INA219_ADDRESS_B
+
@ INA219_ADDRESS_C
+
@ INA219_ADDRESS_A
+
@ INA219_ADDRESS_5
+
@ INA219_ADDRESS_F
+
uint8_t ina219_get_reg(ina219_handle_t *handle, uint8_t reg, uint16_t *data)
get the chip register
+
uint8_t ina219_set_reg(ina219_handle_t *handle, uint8_t reg, uint16_t data)
set the chip register
+
ina219 handle structure definition
+ +
void(* delay_ms)(uint32_t ms)
+
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)
+
ina219 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]
+
diff --git a/doc/html/driver__ina219__basic_8c.html b/doc/html/driver__ina219__basic_8c.html index 1f3dde1..6932417 100644 --- a/doc/html/driver__ina219__basic_8c.html +++ b/doc/html/driver__ina219__basic_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: example/driver_ina219_basic.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ina219_basic.c File Reference
+
driver_ina219_basic.c File Reference

driver ina219 basic source file More...

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

Go to the source code of this file.

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

+

Functions

uint8_t ina219_basic_init (ina219_address_t addr_pin, double r)
 basic example init More...
 
uint8_t ina219_basic_read (float *mV, float *mA, float *mW)
 basic example read More...
 
uint8_t ina219_basic_deinit (void)
 basic example deinit More...
 
uint8_t ina219_basic_init (ina219_address_t addr_pin, double r)
 basic example init
uint8_t ina219_basic_read (float *mV, float *mA, float *mW)
 basic example read
uint8_t ina219_basic_deinit (void)
 basic example deinit
-

Detailed Description

+

Detailed Description

driver ina219 basic source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -130,11 +136,19 @@

history

Definition in file driver_ina219_basic.c.

+ +
diff --git a/doc/html/driver__ina219__basic_8c__incl.md5 b/doc/html/driver__ina219__basic_8c__incl.md5 new file mode 100644 index 0000000..ae09e34 --- /dev/null +++ b/doc/html/driver__ina219__basic_8c__incl.md5 @@ -0,0 +1 @@ +06b25dd15e2e39d42a3578299070ff8c \ No newline at end of file diff --git a/doc/html/driver__ina219__basic_8c__incl.svg b/doc/html/driver__ina219__basic_8c__incl.svg new file mode 100644 index 0000000..bf6713a --- /dev/null +++ b/doc/html/driver__ina219__basic_8c__incl.svg @@ -0,0 +1,130 @@ + + + + + + +example/driver_ina219_basic.c + + +Node1 + + +example/driver_ina219 +_basic.c + + + + + +Node2 + + +driver_ina219_basic.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ina219_interface.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +driver_ina219.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdio.h + + + + + +Node4->Node5 + + + + + + + + +Node6 + + +stdint.h + + + + + +Node4->Node6 + + + + + + + + +Node7 + + +string.h + + + + + +Node4->Node7 + + + + + + + + diff --git a/doc/html/driver__ina219__basic_8c_source.html b/doc/html/driver__ina219__basic_8c_source.html index d4ceb57..2484c2f 100644 --- a/doc/html/driver__ina219__basic_8c_source.html +++ b/doc/html/driver__ina219__basic_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: example/driver_ina219_basic.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ina219_basic.c
+
driver_ina219_basic.c
-Go to the documentation of this file.
1 
-
37 #include "driver_ina219_basic.h"
-
38 
-
39 static ina219_handle_t gs_handle;
-
50 uint8_t ina219_basic_init(ina219_address_t addr_pin, double r)
-
51 {
-
52  uint8_t res;
-
53  uint16_t calibration;
-
54 
-
55  /* link interface function */
- - - - - - - -
63 
-
64  /* set addr pin */
-
65  res = ina219_set_addr_pin(&gs_handle, addr_pin);
-
66  if (res != 0)
-
67  {
-
68  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
69 
-
70  return 1;
-
71  }
-
72 
-
73  /* set the r */
-
74  res = ina219_set_resistance(&gs_handle, r);
-
75  if (res != 0)
-
76  {
-
77  ina219_interface_debug_print("ina219: set resistance failed.\n");
-
78 
-
79  return 1;
-
80  }
-
81 
-
82  /* init */
-
83  res = ina219_init(&gs_handle);
-
84  if (res != 0)
-
85  {
-
86  ina219_interface_debug_print("ina219: init failed.\n");
-
87 
-
88  return 1;
-
89  }
-
90 
-
91  /* set bus voltage range */
- -
93  if (res != 0)
-
94  {
-
95  ina219_interface_debug_print("ina219: set bus voltage range failed.\n");
-
96  (void)ina219_deinit(&gs_handle);
-
97 
-
98  return 1;
-
99  }
-
100 
-
101  /* set bus voltage adc mode */
- -
103  if (res != 0)
-
104  {
-
105  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
106  (void)ina219_deinit(&gs_handle);
-
107 
-
108  return 1;
-
109  }
-
110 
-
111  /* set shunt voltage adc mode */
- -
113  if (res != 0)
-
114  {
-
115  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
116  (void)ina219_deinit(&gs_handle);
-
117 
-
118  return 1;
-
119  }
-
120 
-
121  /* set shunt bus voltage continuous */
- -
123  if (res != 0)
-
124  {
-
125  ina219_interface_debug_print("ina219: set mode failed.\n");
-
126  (void)ina219_deinit(&gs_handle);
-
127 
-
128  return 1;
-
129  }
-
130 
-
131  /* set pga */
-
132  res = ina219_set_pga(&gs_handle, INA219_BASIC_DEFAULT_PGA);
-
133  if (res != 0)
-
134  {
-
135  ina219_interface_debug_print("ina219: set pga failed.\n");
-
136  (void)ina219_deinit(&gs_handle);
-
137 
-
138  return 1;
-
139  }
-
140 
-
141  /* calculate calibration */
-
142  res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&calibration);
-
143  if (res != 0)
-
144  {
-
145  ina219_interface_debug_print("ina219: calculate calibration failed.\n");
-
146  (void)ina219_deinit(&gs_handle);
-
147 
-
148  return 1;
-
149  }
-
150 
-
151  /* set calibration */
-
152  res = ina219_set_calibration(&gs_handle, calibration);
-
153  if (res != 0)
-
154  {
-
155  ina219_interface_debug_print("ina219: set calibration failed.\n");
-
156  (void)ina219_deinit(&gs_handle);
-
157 
-
158  return 1;
-
159  }
-
160 
-
161  return 0;
-
162 }
-
163 
-
174 uint8_t ina219_basic_read(float *mV, float *mA, float *mW)
-
175 {
-
176  uint8_t res;
-
177  int16_t s_raw;
-
178  uint16_t u_raw;
-
179 
-
180  /* read bus voltage */
-
181  res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, mV);
-
182  if (res != 0)
-
183  {
-
184  return 1;
-
185  }
-
186 
-
187  /* read current */
-
188  res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, mA);
-
189  if (res != 0)
-
190  {
-
191  return 1;
-
192  }
-
193 
-
194  /* read power */
-
195  res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, mW);
-
196  if (res != 0)
-
197  {
-
198  return 1;
-
199  }
-
200 
-
201  return 0;
-
202 }
-
203 
-
211 uint8_t ina219_basic_deinit(void)
-
212 {
-
213  uint8_t res;
-
214 
-
215  res = ina219_deinit(&gs_handle);
-
216  if (res != 0)
-
217  {
-
218  return 1;
-
219  }
-
220 
-
221  return 0;
-
222 }
+Go to the documentation of this file.
1
+
36
+
37#include "driver_ina219_basic.h"
+
38
+
39static ina219_handle_t gs_handle;
+
40
+
+
50uint8_t ina219_basic_init(ina219_address_t addr_pin, double r)
+
51{
+
52 uint8_t res;
+
53 uint16_t calibration;
+
54
+
55 /* link interface function */
+ + + + + + + +
63
+
64 /* set addr pin */
+
65 res = ina219_set_addr_pin(&gs_handle, addr_pin);
+
66 if (res != 0)
+
67 {
+
68 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
69
+
70 return 1;
+
71 }
+
72
+
73 /* set the r */
+
74 res = ina219_set_resistance(&gs_handle, r);
+
75 if (res != 0)
+
76 {
+
77 ina219_interface_debug_print("ina219: set resistance failed.\n");
+
78
+
79 return 1;
+
80 }
+
81
+
82 /* init */
+
83 res = ina219_init(&gs_handle);
+
84 if (res != 0)
+
85 {
+
86 ina219_interface_debug_print("ina219: init failed.\n");
+
87
+
88 return 1;
+
89 }
+
90
+
91 /* set bus voltage range */
+ +
93 if (res != 0)
+
94 {
+
95 ina219_interface_debug_print("ina219: set bus voltage range failed.\n");
+
96 (void)ina219_deinit(&gs_handle);
+
97
+
98 return 1;
+
99 }
+
100
+
101 /* set bus voltage adc mode */
+ +
103 if (res != 0)
+
104 {
+
105 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
106 (void)ina219_deinit(&gs_handle);
+
107
+
108 return 1;
+
109 }
+
110
+
111 /* set shunt voltage adc mode */
+ +
113 if (res != 0)
+
114 {
+
115 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
116 (void)ina219_deinit(&gs_handle);
+
117
+
118 return 1;
+
119 }
+
120
+
121 /* set shunt bus voltage continuous */
+ +
123 if (res != 0)
+
124 {
+
125 ina219_interface_debug_print("ina219: set mode failed.\n");
+
126 (void)ina219_deinit(&gs_handle);
+
127
+
128 return 1;
+
129 }
+
130
+
131 /* set pga */
+
132 res = ina219_set_pga(&gs_handle, INA219_BASIC_DEFAULT_PGA);
+
133 if (res != 0)
+
134 {
+
135 ina219_interface_debug_print("ina219: set pga failed.\n");
+
136 (void)ina219_deinit(&gs_handle);
+
137
+
138 return 1;
+
139 }
+
140
+
141 /* calculate calibration */
+
142 res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&calibration);
+
143 if (res != 0)
+
144 {
+
145 ina219_interface_debug_print("ina219: calculate calibration failed.\n");
+
146 (void)ina219_deinit(&gs_handle);
+
147
+
148 return 1;
+
149 }
+
150
+
151 /* set calibration */
+
152 res = ina219_set_calibration(&gs_handle, calibration);
+
153 if (res != 0)
+
154 {
+
155 ina219_interface_debug_print("ina219: set calibration failed.\n");
+
156 (void)ina219_deinit(&gs_handle);
+
157
+
158 return 1;
+
159 }
+
160
+
161 return 0;
+
162}
+
+
163
+
+
174uint8_t ina219_basic_read(float *mV, float *mA, float *mW)
+
175{
+
176 uint8_t res;
+
177 int16_t s_raw;
+
178 uint16_t u_raw;
+
179
+
180 /* read bus voltage */
+
181 res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, mV);
+
182 if (res != 0)
+
183 {
+
184 return 1;
+
185 }
+
186
+
187 /* read current */
+
188 res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, mA);
+
189 if (res != 0)
+
190 {
+
191 return 1;
+
192 }
+
193
+
194 /* read power */
+
195 res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, mW);
+
196 if (res != 0)
+
197 {
+
198 return 1;
+
199 }
+
200
+
201 return 0;
+
202}
+
+
203
+
+ +
212{
+
213 uint8_t res;
+
214
+
215 res = ina219_deinit(&gs_handle);
+
216 if (res != 0)
+
217 {
+
218 return 1;
+
219 }
+
220
+
221 return 0;
+
222}
+
-
uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin)
set the iic address pin
-
uint8_t ina219_set_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the shunt voltage adc mode
-
uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
set the calibration
-
uint8_t ina219_deinit(ina219_handle_t *handle)
close the chip
-
uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode)
set the mode
-
uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga)
set the pga
-
uint8_t ina219_set_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t range)
set the bus voltage range
-
uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV)
read the bus voltage
-
uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA)
read the current
-
uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
calculate the calibration
-
uint8_t ina219_init(ina219_handle_t *handle)
initialize the chip
-
uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
set the resistance
-
ina219_address_t
ina219 address enumeration definition
Definition: driver_ina219.h:63
-
uint8_t ina219_set_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the bus voltage adc mode
-
uint8_t ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW)
read the power
-
@ INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS
-
#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_RANGE
ina219 basic example default definition
-
uint8_t ina219_basic_deinit(void)
basic example deinit
-
#define INA219_BASIC_DEFAULT_PGA
-
#define INA219_BASIC_DEFAULT_SHUNT_VOLTAGE_ADC_MODE
-
#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_ADC_MODE
-
uint8_t ina219_basic_read(float *mV, float *mA, float *mW)
basic example read
-
uint8_t ina219_basic_init(ina219_address_t addr_pin, double r)
basic example init
-
uint8_t ina219_interface_iic_init(void)
interface iic bus init
-
uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
-
void ina219_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ina219_interface_debug_print(const char *const fmt,...)
interface print format data
-
uint8_t ina219_interface_iic_deinit(void)
interface iic bus deinit
- - - - - - - -
ina219 handle structure definition
+
uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin)
set the iic address pin
+
uint8_t ina219_set_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the shunt voltage adc mode
+
uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
set the calibration
+
uint8_t ina219_deinit(ina219_handle_t *handle)
close the chip
+
uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode)
set the mode
+
uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga)
set the pga
+
uint8_t ina219_set_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t range)
set the bus voltage range
+
uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV)
read the bus voltage
+
uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA)
read the current
+
uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
calculate the calibration
+
uint8_t ina219_init(ina219_handle_t *handle)
initialize the chip
+
uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
set the resistance
+
ina219_address_t
ina219 address enumeration definition
+
uint8_t ina219_set_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the bus voltage adc mode
+
struct ina219_handle_s ina219_handle_t
ina219 handle structure definition
+
uint8_t ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW)
read the power
+
@ INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS
+
#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_RANGE
ina219 basic example default definition
+
uint8_t ina219_basic_deinit(void)
basic example deinit
+
#define INA219_BASIC_DEFAULT_PGA
+
#define INA219_BASIC_DEFAULT_SHUNT_VOLTAGE_ADC_MODE
+
#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_ADC_MODE
+
uint8_t ina219_basic_read(float *mV, float *mA, float *mW)
basic example read
+
uint8_t ina219_basic_init(ina219_address_t addr_pin, double r)
basic example init
+
uint8_t ina219_interface_iic_init(void)
interface iic bus init
+
uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+
void ina219_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ina219_interface_debug_print(const char *const fmt,...)
interface print format data
+
uint8_t ina219_interface_iic_deinit(void)
interface iic bus deinit
+ + + + + + +
+
diff --git a/doc/html/driver__ina219__basic_8h.html b/doc/html/driver__ina219__basic_8h.html index eedfd47..c7d3138 100644 --- a/doc/html/driver__ina219__basic_8h.html +++ b/doc/html/driver__ina219__basic_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: example/driver_ina219_basic.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ina219_basic.h File Reference
+
driver_ina219_basic.h File Reference
+Include dependency graph for driver_ina219_basic.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+

Go to the source code of this file.

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

+

Macros

#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_RANGE   INA219_BUS_VOLTAGE_RANGE_32V
 ina219 basic example default definition More...
 
#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
 
#define INA219_BASIC_DEFAULT_SHUNT_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
 
#define INA219_BASIC_DEFAULT_PGA   INA219_PGA_320_MV
 
#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_RANGE   INA219_BUS_VOLTAGE_RANGE_32V
 ina219 basic example default definition
#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
#define INA219_BASIC_DEFAULT_SHUNT_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
#define INA219_BASIC_DEFAULT_PGA   INA219_PGA_320_MV
- - - - - - - - - - + + + + + +

+

Functions

uint8_t ina219_basic_init (ina219_address_t addr_pin, double r)
 basic example init More...
 
uint8_t ina219_basic_deinit (void)
 basic example deinit More...
 
uint8_t ina219_basic_read (float *mV, float *mA, float *mW)
 basic example read More...
 
uint8_t ina219_basic_init (ina219_address_t addr_pin, double r)
 basic example init
uint8_t ina219_basic_deinit (void)
 basic example deinit
uint8_t ina219_basic_read (float *mV, float *mA, float *mW)
 basic example read
+ +
diff --git a/doc/html/driver__ina219__basic_8h__dep__incl.md5 b/doc/html/driver__ina219__basic_8h__dep__incl.md5 new file mode 100644 index 0000000..75d4ddf --- /dev/null +++ b/doc/html/driver__ina219__basic_8h__dep__incl.md5 @@ -0,0 +1 @@ +d09e55acffe572461511ecfe8bd5126d \ No newline at end of file diff --git a/doc/html/driver__ina219__basic_8h__dep__incl.svg b/doc/html/driver__ina219__basic_8h__dep__incl.svg new file mode 100644 index 0000000..9083a42 --- /dev/null +++ b/doc/html/driver__ina219__basic_8h__dep__incl.svg @@ -0,0 +1,41 @@ + + + + + + +example/driver_ina219_basic.h + + +Node1 + + +example/driver_ina219 +_basic.h + + + + + +Node2 + + +example/driver_ina219 +_basic.c + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/driver__ina219__basic_8h__incl.md5 b/doc/html/driver__ina219__basic_8h__incl.md5 new file mode 100644 index 0000000..d1423ae --- /dev/null +++ b/doc/html/driver__ina219__basic_8h__incl.md5 @@ -0,0 +1 @@ +989e27c57e26f95a1226862064b1181d \ No newline at end of file diff --git a/doc/html/driver__ina219__basic_8h__incl.svg b/doc/html/driver__ina219__basic_8h__incl.svg new file mode 100644 index 0000000..4cedfc5 --- /dev/null +++ b/doc/html/driver__ina219__basic_8h__incl.svg @@ -0,0 +1,112 @@ + + + + + + +example/driver_ina219_basic.h + + +Node1 + + +example/driver_ina219 +_basic.h + + + + + +Node2 + + +driver_ina219_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ina219.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdio.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdint.h + + + + + +Node3->Node5 + + + + + + + + +Node6 + + +string.h + + + + + +Node3->Node6 + + + + + + + + diff --git a/doc/html/driver__ina219__basic_8h_source.html b/doc/html/driver__ina219__basic_8h_source.html index bc70326..76059dc 100644 --- a/doc/html/driver__ina219__basic_8h_source.html +++ b/doc/html/driver__ina219__basic_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: example/driver_ina219_basic.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ina219_basic.h
+
driver_ina219_basic.h
-Go to the documentation of this file.
1 
-
37 #ifndef DRIVER_INA219_BASIC_H
-
38 #define DRIVER_INA219_BASIC_H
-
39 
- -
41 
-
42 #ifdef __cplusplus
-
43 extern "C"{
-
44 #endif
-
45 
-
56 #define INA219_BASIC_DEFAULT_BUS_VOLTAGE_RANGE INA219_BUS_VOLTAGE_RANGE_32V
-
57 #define INA219_BASIC_DEFAULT_BUS_VOLTAGE_ADC_MODE INA219_ADC_MODE_12_BIT_1_SAMPLES
-
58 #define INA219_BASIC_DEFAULT_SHUNT_VOLTAGE_ADC_MODE INA219_ADC_MODE_12_BIT_1_SAMPLES
-
59 #define INA219_BASIC_DEFAULT_PGA INA219_PGA_320_MV
-
70 uint8_t ina219_basic_init(ina219_address_t addr_pin, double r);
-
71 
-
79 uint8_t ina219_basic_deinit(void);
-
80 
-
91 uint8_t ina219_basic_read(float *mV, float *mA, float *mW);
-
92 
-
97 #ifdef __cplusplus
-
98 }
-
99 #endif
-
100 
-
101 #endif
+Go to the documentation of this file.
1
+
36
+
37#ifndef DRIVER_INA219_BASIC_H
+
38#define DRIVER_INA219_BASIC_H
+
39
+ +
41
+
42#ifdef __cplusplus
+
43extern "C"{
+
44#endif
+
45
+
52
+
56#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_RANGE INA219_BUS_VOLTAGE_RANGE_32V
+
57#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_ADC_MODE INA219_ADC_MODE_12_BIT_1_SAMPLES
+
58#define INA219_BASIC_DEFAULT_SHUNT_VOLTAGE_ADC_MODE INA219_ADC_MODE_12_BIT_1_SAMPLES
+
59#define INA219_BASIC_DEFAULT_PGA INA219_PGA_320_MV
+
60
+
70uint8_t ina219_basic_init(ina219_address_t addr_pin, double r);
+
71
+
79uint8_t ina219_basic_deinit(void);
+
80
+
91uint8_t ina219_basic_read(float *mV, float *mA, float *mW);
+
92
+
96
+
97#ifdef __cplusplus
+
98}
+
99#endif
+
100
+
101#endif
driver ina219 interface header file
-
ina219_address_t
ina219 address enumeration definition
Definition: driver_ina219.h:63
-
uint8_t ina219_basic_deinit(void)
basic example deinit
-
uint8_t ina219_basic_read(float *mV, float *mA, float *mW)
basic example read
-
uint8_t ina219_basic_init(ina219_address_t addr_pin, double r)
basic example init
+
ina219_address_t
ina219 address enumeration definition
+
uint8_t ina219_basic_deinit(void)
basic example deinit
+
uint8_t ina219_basic_read(float *mV, float *mA, float *mW)
basic example read
+
uint8_t ina219_basic_init(ina219_address_t addr_pin, double r)
basic example init
+
diff --git a/doc/html/driver__ina219__interface_8h.html b/doc/html/driver__ina219__interface_8h.html index 330466f..eb23792 100644 --- a/doc/html/driver__ina219__interface_8h.html +++ b/doc/html/driver__ina219__interface_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: interface/driver_ina219_interface.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ina219_interface.h File Reference
+
driver_ina219_interface.h File Reference

driver ina219 interface header file More...

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

Go to the source code of this file.

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

+

Functions

uint8_t ina219_interface_iic_init (void)
 interface iic bus init More...
 
uint8_t ina219_interface_iic_deinit (void)
 interface iic bus deinit More...
 
uint8_t ina219_interface_iic_read (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus read More...
 
uint8_t ina219_interface_iic_write (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus write More...
 
void ina219_interface_delay_ms (uint32_t ms)
 interface delay ms More...
 
void ina219_interface_debug_print (const char *const fmt,...)
 interface print format data More...
 
uint8_t ina219_interface_iic_init (void)
 interface iic bus init
uint8_t ina219_interface_iic_deinit (void)
 interface iic bus deinit
uint8_t ina219_interface_iic_read (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus read
uint8_t ina219_interface_iic_write (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus write
void ina219_interface_delay_ms (uint32_t ms)
 interface delay ms
void ina219_interface_debug_print (const char *const fmt,...)
 interface print format data
-

Detailed Description

+

Detailed Description

driver ina219 interface header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -139,11 +147,19 @@

history

Definition in file driver_ina219_interface.h.

+ +
diff --git a/doc/html/driver__ina219__interface_8h__dep__incl.md5 b/doc/html/driver__ina219__interface_8h__dep__incl.md5 new file mode 100644 index 0000000..6a7005d --- /dev/null +++ b/doc/html/driver__ina219__interface_8h__dep__incl.md5 @@ -0,0 +1 @@ +47f9f8152d27b598ee140af4c2f419ee \ No newline at end of file diff --git a/doc/html/driver__ina219__interface_8h__dep__incl.svg b/doc/html/driver__ina219__interface_8h__dep__incl.svg new file mode 100644 index 0000000..4ecb6a0 --- /dev/null +++ b/doc/html/driver__ina219__interface_8h__dep__incl.svg @@ -0,0 +1,193 @@ + + + + + + +interface/driver_ina219_interface.h + + +Node1 + + +interface/driver_ina219 +_interface.h + + + + + +Node2 + + +example/driver_ina219 +_basic.h + + + + + +Node1->Node2 + + + + + + + + +Node4 + + +example/driver_ina219 +_shot.h + + + + + +Node1->Node4 + + + + + + + + +Node6 + + +interface/driver_ina219 +_interface_template.c + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +test/driver_ina219 +_read_test.h + + + + + +Node1->Node7 + + + + + + + + +Node9 + + +test/driver_ina219 +_register_test.h + + + + + +Node1->Node9 + + + + + + + + +Node3 + + +example/driver_ina219 +_basic.c + + + + + +Node2->Node3 + + + + + + + + +Node5 + + +example/driver_ina219 +_shot.c + + + + + +Node4->Node5 + + + + + + + + +Node8 + + +test/driver_ina219 +_read_test.c + + + + + +Node7->Node8 + + + + + + + + +Node10 + + +test/driver_ina219 +_register_test.c + + + + + +Node9->Node10 + + + + + + + + diff --git a/doc/html/driver__ina219__interface_8h__incl.md5 b/doc/html/driver__ina219__interface_8h__incl.md5 new file mode 100644 index 0000000..0927a40 --- /dev/null +++ b/doc/html/driver__ina219__interface_8h__incl.md5 @@ -0,0 +1 @@ +2298c2b630f07cc07b778606c40ddf03 \ No newline at end of file diff --git a/doc/html/driver__ina219__interface_8h__incl.svg b/doc/html/driver__ina219__interface_8h__incl.svg new file mode 100644 index 0000000..a91719c --- /dev/null +++ b/doc/html/driver__ina219__interface_8h__incl.svg @@ -0,0 +1,94 @@ + + + + + + +interface/driver_ina219_interface.h + + +Node1 + + +interface/driver_ina219 +_interface.h + + + + + +Node2 + + +driver_ina219.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +stdio.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdint.h + + + + + +Node2->Node4 + + + + + + + + +Node5 + + +string.h + + + + + +Node2->Node5 + + + + + + + + diff --git a/doc/html/driver__ina219__interface_8h_source.html b/doc/html/driver__ina219__interface_8h_source.html index 71c81a6..d44e64e 100644 --- a/doc/html/driver__ina219__interface_8h_source.html +++ b/doc/html/driver__ina219__interface_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: interface/driver_ina219_interface.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ina219_interface.h
+
driver_ina219_interface.h
-Go to the documentation of this file.
1 
-
37 #ifndef DRIVER_INA219_INTERFACE_H
-
38 #define DRIVER_INA219_INTERFACE_H
-
39 
-
40 #include "driver_ina219.h"
-
41 
-
42 #ifdef __cplusplus
-
43 extern "C"{
-
44 #endif
-
45 
-
60 uint8_t ina219_interface_iic_init(void);
-
61 
-
69 uint8_t ina219_interface_iic_deinit(void);
-
70 
-
82 uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
-
83 
-
95 uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
-
96 
-
102 void ina219_interface_delay_ms(uint32_t ms);
-
103 
-
109 void ina219_interface_debug_print(const char *const fmt, ...);
-
110 
-
115 #ifdef __cplusplus
-
116 }
-
117 #endif
-
118 
-
119 #endif
+Go to the documentation of this file.
1
+
36
+
37#ifndef DRIVER_INA219_INTERFACE_H
+
38#define DRIVER_INA219_INTERFACE_H
+
39
+
40#include "driver_ina219.h"
+
41
+
42#ifdef __cplusplus
+
43extern "C"{
+
44#endif
+
45
+
52
+
60uint8_t ina219_interface_iic_init(void);
+
61
+
69uint8_t ina219_interface_iic_deinit(void);
+
70
+
82uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
+
83
+
95uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
+
96
+
102void ina219_interface_delay_ms(uint32_t ms);
+
103
+
109void ina219_interface_debug_print(const char *const fmt, ...);
+
110
+
114
+
115#ifdef __cplusplus
+
116}
+
117#endif
+
118
+
119#endif
driver ina219 header file
-
uint8_t ina219_interface_iic_init(void)
interface iic bus init
-
uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
-
void ina219_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ina219_interface_debug_print(const char *const fmt,...)
interface print format data
-
uint8_t ina219_interface_iic_deinit(void)
interface iic bus deinit
+
uint8_t ina219_interface_iic_init(void)
interface iic bus init
+
uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+
void ina219_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ina219_interface_debug_print(const char *const fmt,...)
interface print format data
+
uint8_t ina219_interface_iic_deinit(void)
interface iic bus deinit
+
diff --git a/doc/html/driver__ina219__interface__template_8c.html b/doc/html/driver__ina219__interface__template_8c.html index 8c50f59..bda3aa7 100644 --- a/doc/html/driver__ina219__interface__template_8c.html +++ b/doc/html/driver__ina219__interface__template_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: interface/driver_ina219_interface_template.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ina219_interface_template.c File Reference
+
driver_ina219_interface_template.c File Reference

driver ina219 interface template source file More...

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

Go to the source code of this file.

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

+

Functions

uint8_t ina219_interface_iic_init (void)
 interface iic bus init More...
 
uint8_t ina219_interface_iic_deinit (void)
 interface iic bus deinit More...
 
uint8_t ina219_interface_iic_read (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus read More...
 
uint8_t ina219_interface_iic_write (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus write More...
 
void ina219_interface_delay_ms (uint32_t ms)
 interface delay ms More...
 
void ina219_interface_debug_print (const char *const fmt,...)
 interface print format data More...
 
uint8_t ina219_interface_iic_init (void)
 interface iic bus init
uint8_t ina219_interface_iic_deinit (void)
 interface iic bus deinit
uint8_t ina219_interface_iic_read (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus read
uint8_t ina219_interface_iic_write (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus write
void ina219_interface_delay_ms (uint32_t ms)
 interface delay ms
void ina219_interface_debug_print (const char *const fmt,...)
 interface print format data
-

Detailed Description

+

Detailed Description

driver ina219 interface template source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -139,11 +142,19 @@

history

Definition in file driver_ina219_interface_template.c.

+ +
diff --git a/doc/html/driver__ina219__interface__template_8c__incl.md5 b/doc/html/driver__ina219__interface__template_8c__incl.md5 new file mode 100644 index 0000000..c42293b --- /dev/null +++ b/doc/html/driver__ina219__interface__template_8c__incl.md5 @@ -0,0 +1 @@ +25a89834fd82b951fa48ee1b9f0f77ef \ No newline at end of file diff --git a/doc/html/driver__ina219__interface__template_8c__incl.svg b/doc/html/driver__ina219__interface__template_8c__incl.svg new file mode 100644 index 0000000..ad3961b --- /dev/null +++ b/doc/html/driver__ina219__interface__template_8c__incl.svg @@ -0,0 +1,112 @@ + + + + + + +interface/driver_ina219_interface_template.c + + +Node1 + + +interface/driver_ina219 +_interface_template.c + + + + + +Node2 + + +driver_ina219_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ina219.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdio.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdint.h + + + + + +Node3->Node5 + + + + + + + + +Node6 + + +string.h + + + + + +Node3->Node6 + + + + + + + + diff --git a/doc/html/driver__ina219__interface__template_8c_source.html b/doc/html/driver__ina219__interface__template_8c_source.html index 16d723f..896582c 100644 --- a/doc/html/driver__ina219__interface__template_8c_source.html +++ b/doc/html/driver__ina219__interface__template_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: interface/driver_ina219_interface_template.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ina219_interface_template.c
+
driver_ina219_interface_template.c
-Go to the documentation of this file.
1 
- -
38 
- -
47 {
-
48  return 0;
-
49 }
-
50 
- -
59 {
-
60  return 0;
-
61 }
-
62 
-
74 uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
-
75 {
-
76  return 0;
-
77 }
-
78 
-
90 uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
-
91 {
-
92  return 0;
-
93 }
-
94 
-
100 void ina219_interface_delay_ms(uint32_t ms)
-
101 {
-
102 
-
103 }
-
104 
-
110 void ina219_interface_debug_print(const char *const fmt, ...)
-
111 {
-
112 
-
113 }
+Go to the documentation of this file.
1
+
36
+ +
38
+
+ +
47{
+
48 return 0;
+
49}
+
+
50
+
+ +
59{
+
60 return 0;
+
61}
+
+
62
+
+
74uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
+
75{
+
76 return 0;
+
77}
+
+
78
+
+
90uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
+
91{
+
92 return 0;
+
93}
+
+
94
+
+ +
101{
+
102
+
103}
+
+
104
+
+
110void ina219_interface_debug_print(const char *const fmt, ...)
+
111{
+
112
+
113}
+
driver ina219 interface header file
-
uint8_t ina219_interface_iic_init(void)
interface iic bus init
-
uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
-
void ina219_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ina219_interface_debug_print(const char *const fmt,...)
interface print format data
-
uint8_t ina219_interface_iic_deinit(void)
interface iic bus deinit
+
uint8_t ina219_interface_iic_init(void)
interface iic bus init
+
uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+
void ina219_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ina219_interface_debug_print(const char *const fmt,...)
interface print format data
+
uint8_t ina219_interface_iic_deinit(void)
interface iic bus deinit
+
diff --git a/doc/html/driver__ina219__read__test_8c.html b/doc/html/driver__ina219__read__test_8c.html index 4c932d9..a0f5053 100644 --- a/doc/html/driver__ina219__read__test_8c.html +++ b/doc/html/driver__ina219__read__test_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: test/driver_ina219_read_test.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ina219_read_test.c File Reference
+
driver_ina219_read_test.c File Reference

driver ina219 read test source file More...

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

Go to the source code of this file.

- - - - + +

+

Functions

uint8_t ina219_read_test (ina219_address_t addr_pin, double r, uint32_t times)
 read test More...
 
uint8_t ina219_read_test (ina219_address_t addr_pin, double r, uint32_t times)
 read test
-

Detailed Description

+

Detailed Description

driver ina219 read test source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -124,11 +132,19 @@

history

Definition in file driver_ina219_read_test.c.

+ +
diff --git a/doc/html/driver__ina219__read__test_8c__incl.md5 b/doc/html/driver__ina219__read__test_8c__incl.md5 new file mode 100644 index 0000000..5dcb168 --- /dev/null +++ b/doc/html/driver__ina219__read__test_8c__incl.md5 @@ -0,0 +1 @@ +d83260e7bbfbca9461b94ad32ce0db84 \ No newline at end of file diff --git a/doc/html/driver__ina219__read__test_8c__incl.svg b/doc/html/driver__ina219__read__test_8c__incl.svg new file mode 100644 index 0000000..c5a24e7 --- /dev/null +++ b/doc/html/driver__ina219__read__test_8c__incl.svg @@ -0,0 +1,131 @@ + + + + + + +test/driver_ina219_read_test.c + + +Node1 + + +test/driver_ina219 +_read_test.c + + + + + +Node2 + + +driver_ina219_read +_test.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ina219_interface.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +driver_ina219.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdio.h + + + + + +Node4->Node5 + + + + + + + + +Node6 + + +stdint.h + + + + + +Node4->Node6 + + + + + + + + +Node7 + + +string.h + + + + + +Node4->Node7 + + + + + + + + diff --git a/doc/html/driver__ina219__read__test_8c_source.html b/doc/html/driver__ina219__read__test_8c_source.html index 4cce2e0..9ca4a8a 100644 --- a/doc/html/driver__ina219__read__test_8c_source.html +++ b/doc/html/driver__ina219__read__test_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: test/driver_ina219_read_test.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ina219_read_test.c
+
driver_ina219_read_test.c
-Go to the documentation of this file.
1 
- -
38 
-
39 static ina219_handle_t gs_handle;
-
51 uint8_t ina219_read_test(ina219_address_t addr_pin, double r, uint32_t times)
-
52 {
-
53  uint8_t res;
-
54  uint32_t i;
-
55  uint16_t calibration;
-
56  ina219_info_t info;
-
57 
-
58  /* link interface function */
- - - - - - - -
66 
-
67  /* get information */
-
68  res = ina219_info(&info);
-
69  if (res != 0)
-
70  {
-
71  ina219_interface_debug_print("ina219: get info failed.\n");
-
72 
-
73  return 1;
-
74  }
-
75  else
-
76  {
-
77  /* print chip info */
-
78  ina219_interface_debug_print("ina219: chip is %s.\n", info.chip_name);
-
79  ina219_interface_debug_print("ina219: manufacturer is %s.\n", info.manufacturer_name);
-
80  ina219_interface_debug_print("ina219: interface is %s.\n", info.interface);
-
81  ina219_interface_debug_print("ina219: driver version is %d.%d.\n", info.driver_version / 1000, (info.driver_version % 1000) / 100);
-
82  ina219_interface_debug_print("ina219: min supply voltage is %0.1fV.\n", info.supply_voltage_min_v);
-
83  ina219_interface_debug_print("ina219: max supply voltage is %0.1fV.\n", info.supply_voltage_max_v);
-
84  ina219_interface_debug_print("ina219: max current is %0.2fmA.\n", info.max_current_ma);
-
85  ina219_interface_debug_print("ina219: max temperature is %0.1fC.\n", info.temperature_max);
-
86  ina219_interface_debug_print("ina219: min temperature is %0.1fC.\n", info.temperature_min);
-
87  }
-
88 
-
89  /* start read test */
-
90  ina219_interface_debug_print("ina219: start read test.\n");
-
91 
-
92  /* set addr pin */
-
93  res = ina219_set_addr_pin(&gs_handle, addr_pin);
-
94  if (res != 0)
-
95  {
-
96  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
97 
-
98  return 1;
-
99  }
-
100 
-
101  /* set the r */
-
102  res = ina219_set_resistance(&gs_handle, r);
-
103  if (res != 0)
-
104  {
-
105  ina219_interface_debug_print("ina219: set resistance failed.\n");
-
106 
-
107  return 1;
-
108  }
-
109 
-
110  /* init */
-
111  res = ina219_init(&gs_handle);
-
112  if (res != 0)
-
113  {
-
114  ina219_interface_debug_print("ina219: init failed.\n");
-
115 
-
116  return 1;
-
117  }
-
118 
-
119  /* set bus voltage range 32V */
- -
121  if (res != 0)
-
122  {
-
123  ina219_interface_debug_print("ina219: set bus voltage range failed.\n");
-
124  (void)ina219_deinit(&gs_handle);
-
125 
-
126  return 1;
-
127  }
-
128 
-
129  /* set bus voltage adc mode 12 bit 1 sample */
- -
131  if (res != 0)
-
132  {
-
133  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
134  (void)ina219_deinit(&gs_handle);
-
135 
-
136  return 1;
-
137  }
-
138 
-
139  /* set shunt voltage adc mode 12 bit 1 sample */
- -
141  if (res != 0)
-
142  {
-
143  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
144  (void)ina219_deinit(&gs_handle);
-
145 
-
146  return 1;
-
147  }
-
148 
-
149  /* set shunt bus voltage continuous */
- -
151  if (res != 0)
-
152  {
-
153  ina219_interface_debug_print("ina219: set mode failed.\n");
-
154  (void)ina219_deinit(&gs_handle);
-
155 
-
156  return 1;
-
157  }
-
158 
-
159  ina219_interface_debug_print("ina219: set pga 40 mV.\n");
-
160 
-
161  /* set pga 40 mV */
-
162  res = ina219_set_pga(&gs_handle, INA219_PGA_40_MV);
-
163  if (res != 0)
-
164  {
-
165  ina219_interface_debug_print("ina219: set pga failed.\n");
-
166  (void)ina219_deinit(&gs_handle);
-
167 
-
168  return 1;
-
169  }
-
170  res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&calibration);
-
171  if (res != 0)
-
172  {
-
173  ina219_interface_debug_print("ina219: calculate calibration failed.\n");
-
174  (void)ina219_deinit(&gs_handle);
-
175 
-
176  return 1;
-
177  }
-
178  res = ina219_set_calibration(&gs_handle, calibration);
-
179  if (res != 0)
-
180  {
-
181  ina219_interface_debug_print("ina219: set calibration failed.\n");
-
182  (void)ina219_deinit(&gs_handle);
-
183 
-
184  return 1;
-
185  }
-
186  for (i = 0; i < times; i++)
-
187  {
-
188  int16_t s_raw;
-
189  uint16_t u_raw;
-
190  float m;
-
191 
-
192  /* read shunt voltage */
-
193  res = ina219_read_shunt_voltage(&gs_handle, (int16_t *)&s_raw, (float *)&m);
-
194  if (res != 0)
-
195  {
-
196  ina219_interface_debug_print("ina219: read shunt voltage failed.\n");
-
197  (void)ina219_deinit(&gs_handle);
-
198 
-
199  return 1;
-
200  }
-
201  ina219_interface_debug_print("ina219: shunt voltage is %0.3fmV.\n", m);
-
202 
-
203  /* read bus voltage */
-
204  res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
-
205  if (res != 0)
-
206  {
-
207  ina219_interface_debug_print("ina219: read bus voltage failed.\n");
-
208  (void)ina219_deinit(&gs_handle);
-
209 
-
210  return 1;
-
211  }
-
212  ina219_interface_debug_print("ina219: bus voltage is %0.3fmV.\n", m);
-
213 
-
214  /* read current */
-
215  res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, (float *)&m);
-
216  if (res != 0)
-
217  {
-
218  ina219_interface_debug_print("ina219: read current failed.\n");
-
219  (void)ina219_deinit(&gs_handle);
-
220 
-
221  return 1;
-
222  }
-
223  ina219_interface_debug_print("ina219: current is %0.3fmA.\n", m);
-
224 
-
225  /* read power */
-
226  res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
-
227  if (res != 0)
-
228  {
-
229  ina219_interface_debug_print("ina219: read power failed.\n");
-
230  (void)ina219_deinit(&gs_handle);
-
231 
-
232  return 1;
-
233  }
-
234  ina219_interface_debug_print("ina219: power is %0.3fmW.\n", m);
-
235 
- -
237  }
-
238 
-
239  ina219_interface_debug_print("ina219: set pga 80 mV.\n");
-
240 
-
241  /* set pga 80 mV */
-
242  res = ina219_set_pga(&gs_handle, INA219_PGA_80_MV);
-
243  if (res != 0)
-
244  {
-
245  ina219_interface_debug_print("ina219: set pga failed.\n");
-
246  (void)ina219_deinit(&gs_handle);
-
247 
-
248  return 1;
-
249  }
-
250  res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&calibration);
-
251  if (res != 0)
-
252  {
-
253  ina219_interface_debug_print("ina219: calculate calibration failed.\n");
-
254  (void)ina219_deinit(&gs_handle);
-
255 
-
256  return 1;
-
257  }
-
258  res = ina219_set_calibration(&gs_handle, calibration);
-
259  if (res != 0)
-
260  {
-
261  ina219_interface_debug_print("ina219: set calibration failed.\n");
-
262  (void)ina219_deinit(&gs_handle);
-
263 
-
264  return 1;
-
265  }
-
266  for (i = 0; i < times; i++)
-
267  {
-
268  int16_t s_raw;
-
269  uint16_t u_raw;
-
270  float m;
-
271 
-
272  /* read shunt voltage */
-
273  res = ina219_read_shunt_voltage(&gs_handle, (int16_t *)&s_raw, (float *)&m);
-
274  if (res != 0)
-
275  {
-
276  ina219_interface_debug_print("ina219: read shunt voltage failed.\n");
-
277  (void)ina219_deinit(&gs_handle);
-
278 
-
279  return 1;
-
280  }
-
281  ina219_interface_debug_print("ina219: shunt voltage is %0.3fmV.\n", m);
-
282 
-
283  /* read bus voltage */
-
284  res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
-
285  if (res != 0)
-
286  {
-
287  ina219_interface_debug_print("ina219: read bus voltage failed.\n");
-
288  (void)ina219_deinit(&gs_handle);
-
289 
-
290  return 1;
-
291  }
-
292  ina219_interface_debug_print("ina219: bus voltage is %0.3fmV.\n", m);
-
293 
-
294  /* read current */
-
295  res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, (float *)&m);
-
296  if (res != 0)
-
297  {
-
298  ina219_interface_debug_print("ina219: read current failed.\n");
-
299  (void)ina219_deinit(&gs_handle);
-
300 
-
301  return 1;
-
302  }
-
303  ina219_interface_debug_print("ina219: current is %0.3fmA.\n", m);
-
304 
-
305  /* read power */
-
306  res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
-
307  if (res != 0)
-
308  {
-
309  ina219_interface_debug_print("ina219: read power failed.\n");
-
310  (void)ina219_deinit(&gs_handle);
-
311 
-
312  return 1;
-
313  }
-
314  ina219_interface_debug_print("ina219: power is %0.3fmW.\n", m);
-
315 
- -
317  }
-
318 
-
319  ina219_interface_debug_print("ina219: set pga 160 mV.\n");
-
320 
-
321  /* set pga 160 mV */
-
322  res = ina219_set_pga(&gs_handle, INA219_PGA_160_MV);
-
323  if (res != 0)
-
324  {
-
325  ina219_interface_debug_print("ina219: set pga failed.\n");
-
326  (void)ina219_deinit(&gs_handle);
-
327 
-
328  return 1;
-
329  }
-
330  res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&calibration);
-
331  if (res != 0)
-
332  {
-
333  ina219_interface_debug_print("ina219: calculate calibration failed.\n");
-
334  (void)ina219_deinit(&gs_handle);
-
335 
-
336  return 1;
-
337  }
-
338  res = ina219_set_calibration(&gs_handle, calibration);
-
339  if (res != 0)
-
340  {
-
341  ina219_interface_debug_print("ina219: set calibration failed.\n");
-
342  (void)ina219_deinit(&gs_handle);
-
343 
-
344  return 1;
-
345  }
-
346  for (i = 0; i < times; i++)
-
347  {
-
348  int16_t s_raw;
-
349  uint16_t u_raw;
-
350  float m;
-
351 
-
352  /* read shunt voltage */
-
353  res = ina219_read_shunt_voltage(&gs_handle, (int16_t *)&s_raw, (float *)&m);
-
354  if (res != 0)
-
355  {
-
356  ina219_interface_debug_print("ina219: read shunt voltage failed.\n");
-
357  (void)ina219_deinit(&gs_handle);
-
358 
-
359  return 1;
-
360  }
-
361  ina219_interface_debug_print("ina219: shunt voltage is %0.3fmV.\n", m);
-
362 
-
363  /* read bus voltage */
-
364  res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
-
365  if (res != 0)
-
366  {
-
367  ina219_interface_debug_print("ina219: read bus voltage failed.\n");
-
368  (void)ina219_deinit(&gs_handle);
-
369 
-
370  return 1;
-
371  }
-
372  ina219_interface_debug_print("ina219: bus voltage is %0.3fmV.\n", m);
-
373 
-
374  /* read current */
-
375  res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, (float *)&m);
-
376  if (res != 0)
-
377  {
-
378  ina219_interface_debug_print("ina219: read current failed.\n");
-
379  (void)ina219_deinit(&gs_handle);
-
380 
-
381  return 1;
-
382  }
-
383  ina219_interface_debug_print("ina219: current is %0.3fmA.\n", m);
-
384 
-
385  /* read power */
-
386  res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
-
387  if (res != 0)
-
388  {
-
389  ina219_interface_debug_print("ina219: read power failed.\n");
-
390  (void)ina219_deinit(&gs_handle);
-
391 
-
392  return 1;
-
393  }
-
394  ina219_interface_debug_print("ina219: power is %0.3fmW.\n", m);
-
395 
- -
397  }
-
398 
-
399  ina219_interface_debug_print("ina219: set pga 320 mV.\n");
-
400 
-
401  /* set pga 320 mV */
-
402  res = ina219_set_pga(&gs_handle, INA219_PGA_320_MV);
-
403  if (res != 0)
-
404  {
-
405  ina219_interface_debug_print("ina219: set pga failed.\n");
-
406  (void)ina219_deinit(&gs_handle);
-
407 
-
408  return 1;
-
409  }
-
410  res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&calibration);
-
411  if (res != 0)
-
412  {
-
413  ina219_interface_debug_print("ina219: calculate calibration failed.\n");
-
414  (void)ina219_deinit(&gs_handle);
-
415 
-
416  return 1;
-
417  }
-
418  res = ina219_set_calibration(&gs_handle, calibration);
-
419  if (res != 0)
-
420  {
-
421  ina219_interface_debug_print("ina219: set calibration failed.\n");
-
422  (void)ina219_deinit(&gs_handle);
-
423 
-
424  return 1;
-
425  }
-
426  for (i = 0; i < times; i++)
-
427  {
-
428  int16_t s_raw;
-
429  uint16_t u_raw;
-
430  float m;
-
431 
-
432  /* read shunt voltage */
-
433  res = ina219_read_shunt_voltage(&gs_handle, (int16_t *)&s_raw, (float *)&m);
-
434  if (res != 0)
-
435  {
-
436  ina219_interface_debug_print("ina219: read shunt voltage failed.\n");
-
437  (void)ina219_deinit(&gs_handle);
-
438 
-
439  return 1;
-
440  }
-
441  ina219_interface_debug_print("ina219: shunt voltage is %0.3fmV.\n", m);
-
442 
-
443  /* read bus voltage */
-
444  res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
-
445  if (res != 0)
-
446  {
-
447  ina219_interface_debug_print("ina219: read bus voltage failed.\n");
-
448  (void)ina219_deinit(&gs_handle);
-
449 
-
450  return 1;
-
451  }
-
452  ina219_interface_debug_print("ina219: bus voltage is %0.3fmV.\n", m);
-
453 
-
454  /* read current */
-
455  res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, (float *)&m);
-
456  if (res != 0)
-
457  {
-
458  ina219_interface_debug_print("ina219: read current failed.\n");
-
459  (void)ina219_deinit(&gs_handle);
-
460 
-
461  return 1;
-
462  }
-
463  ina219_interface_debug_print("ina219: current is %0.3fmA.\n", m);
-
464 
-
465  /* read power */
-
466  res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
-
467  if (res != 0)
-
468  {
-
469  ina219_interface_debug_print("ina219: read power failed.\n");
-
470  (void)ina219_deinit(&gs_handle);
-
471 
-
472  return 1;
-
473  }
-
474  ina219_interface_debug_print("ina219: power is %0.3fmW.\n", m);
-
475 
- -
477  }
-
478 
-
479  ina219_interface_debug_print("ina219: set triggered mode.\n");
-
480 
-
481  for (i = 0; i < times; i++)
-
482  {
-
483  int16_t s_raw;
-
484  uint16_t u_raw;
-
485  float m;
-
486 
-
487  /* set shunt bus voltage triggered */
- -
489  if (res != 0)
-
490  {
-
491  ina219_interface_debug_print("ina219: set mode failed.\n");
-
492  (void)ina219_deinit(&gs_handle);
-
493 
-
494  return 1;
-
495  }
-
496 
-
497  /* read shunt voltage */
-
498  res = ina219_read_shunt_voltage(&gs_handle, (int16_t *)&s_raw, (float *)&m);
-
499  if (res != 0)
-
500  {
-
501  ina219_interface_debug_print("ina219: read shunt voltage failed.\n");
-
502  (void)ina219_deinit(&gs_handle);
-
503 
-
504  return 1;
-
505  }
-
506  ina219_interface_debug_print("ina219: shunt voltage is %0.3fmV.\n", m);
-
507 
-
508  /* read bus voltage */
-
509  res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
-
510  if (res != 0)
-
511  {
-
512  ina219_interface_debug_print("ina219: read bus voltage failed.\n");
-
513  (void)ina219_deinit(&gs_handle);
-
514 
-
515  return 1;
-
516  }
-
517  ina219_interface_debug_print("ina219: bus voltage is %0.3fmV.\n", m);
-
518 
-
519  /* read current */
-
520  res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, (float *)&m);
-
521  if (res != 0)
-
522  {
-
523  ina219_interface_debug_print("ina219: read current failed.\n");
-
524  (void)ina219_deinit(&gs_handle);
-
525 
-
526  return 1;
-
527  }
-
528  ina219_interface_debug_print("ina219: current is %0.3fmA.\n", m);
-
529 
-
530  /* read power */
-
531  res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
-
532  if (res != 0)
-
533  {
-
534  ina219_interface_debug_print("ina219: read power failed.\n");
-
535  (void)ina219_deinit(&gs_handle);
-
536 
-
537  return 1;
-
538  }
-
539  ina219_interface_debug_print("ina219: power is %0.3fmW.\n", m);
-
540 
- -
542  }
-
543 
-
544  /* finish read test */
-
545  (void)ina219_deinit(&gs_handle);
-
546  ina219_interface_debug_print("ina219: finish read test.\n");
-
547 
-
548  return 0;
-
549 }
+Go to the documentation of this file.
1
+
36
+ +
38
+
39static ina219_handle_t gs_handle;
+
40
+
+
51uint8_t ina219_read_test(ina219_address_t addr_pin, double r, uint32_t times)
+
52{
+
53 uint8_t res;
+
54 uint32_t i;
+
55 uint16_t calibration;
+
56 ina219_info_t info;
+
57
+
58 /* link interface function */
+ + + + + + + +
66
+
67 /* get information */
+
68 res = ina219_info(&info);
+
69 if (res != 0)
+
70 {
+
71 ina219_interface_debug_print("ina219: get info failed.\n");
+
72
+
73 return 1;
+
74 }
+
75 else
+
76 {
+
77 /* print chip info */
+
78 ina219_interface_debug_print("ina219: chip is %s.\n", info.chip_name);
+
79 ina219_interface_debug_print("ina219: manufacturer is %s.\n", info.manufacturer_name);
+
80 ina219_interface_debug_print("ina219: interface is %s.\n", info.interface);
+
81 ina219_interface_debug_print("ina219: driver version is %d.%d.\n", info.driver_version / 1000, (info.driver_version % 1000) / 100);
+
82 ina219_interface_debug_print("ina219: min supply voltage is %0.1fV.\n", info.supply_voltage_min_v);
+
83 ina219_interface_debug_print("ina219: max supply voltage is %0.1fV.\n", info.supply_voltage_max_v);
+
84 ina219_interface_debug_print("ina219: max current is %0.2fmA.\n", info.max_current_ma);
+
85 ina219_interface_debug_print("ina219: max temperature is %0.1fC.\n", info.temperature_max);
+
86 ina219_interface_debug_print("ina219: min temperature is %0.1fC.\n", info.temperature_min);
+
87 }
+
88
+
89 /* start read test */
+
90 ina219_interface_debug_print("ina219: start read test.\n");
+
91
+
92 /* set addr pin */
+
93 res = ina219_set_addr_pin(&gs_handle, addr_pin);
+
94 if (res != 0)
+
95 {
+
96 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
97
+
98 return 1;
+
99 }
+
100
+
101 /* set the r */
+
102 res = ina219_set_resistance(&gs_handle, r);
+
103 if (res != 0)
+
104 {
+
105 ina219_interface_debug_print("ina219: set resistance failed.\n");
+
106
+
107 return 1;
+
108 }
+
109
+
110 /* init */
+
111 res = ina219_init(&gs_handle);
+
112 if (res != 0)
+
113 {
+
114 ina219_interface_debug_print("ina219: init failed.\n");
+
115
+
116 return 1;
+
117 }
+
118
+
119 /* set bus voltage range 32V */
+ +
121 if (res != 0)
+
122 {
+
123 ina219_interface_debug_print("ina219: set bus voltage range failed.\n");
+
124 (void)ina219_deinit(&gs_handle);
+
125
+
126 return 1;
+
127 }
+
128
+
129 /* set bus voltage adc mode 12 bit 1 sample */
+ +
131 if (res != 0)
+
132 {
+
133 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
134 (void)ina219_deinit(&gs_handle);
+
135
+
136 return 1;
+
137 }
+
138
+
139 /* set shunt voltage adc mode 12 bit 1 sample */
+ +
141 if (res != 0)
+
142 {
+
143 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
144 (void)ina219_deinit(&gs_handle);
+
145
+
146 return 1;
+
147 }
+
148
+
149 /* set shunt bus voltage continuous */
+ +
151 if (res != 0)
+
152 {
+
153 ina219_interface_debug_print("ina219: set mode failed.\n");
+
154 (void)ina219_deinit(&gs_handle);
+
155
+
156 return 1;
+
157 }
+
158
+
159 ina219_interface_debug_print("ina219: set pga 40 mV.\n");
+
160
+
161 /* set pga 40 mV */
+
162 res = ina219_set_pga(&gs_handle, INA219_PGA_40_MV);
+
163 if (res != 0)
+
164 {
+
165 ina219_interface_debug_print("ina219: set pga failed.\n");
+
166 (void)ina219_deinit(&gs_handle);
+
167
+
168 return 1;
+
169 }
+
170 res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&calibration);
+
171 if (res != 0)
+
172 {
+
173 ina219_interface_debug_print("ina219: calculate calibration failed.\n");
+
174 (void)ina219_deinit(&gs_handle);
+
175
+
176 return 1;
+
177 }
+
178 res = ina219_set_calibration(&gs_handle, calibration);
+
179 if (res != 0)
+
180 {
+
181 ina219_interface_debug_print("ina219: set calibration failed.\n");
+
182 (void)ina219_deinit(&gs_handle);
+
183
+
184 return 1;
+
185 }
+
186 for (i = 0; i < times; i++)
+
187 {
+
188 int16_t s_raw;
+
189 uint16_t u_raw;
+
190 float m;
+
191
+
192 /* read shunt voltage */
+
193 res = ina219_read_shunt_voltage(&gs_handle, (int16_t *)&s_raw, (float *)&m);
+
194 if (res != 0)
+
195 {
+
196 ina219_interface_debug_print("ina219: read shunt voltage failed.\n");
+
197 (void)ina219_deinit(&gs_handle);
+
198
+
199 return 1;
+
200 }
+
201 ina219_interface_debug_print("ina219: shunt voltage is %0.3fmV.\n", m);
+
202
+
203 /* read bus voltage */
+
204 res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
+
205 if (res != 0)
+
206 {
+
207 ina219_interface_debug_print("ina219: read bus voltage failed.\n");
+
208 (void)ina219_deinit(&gs_handle);
+
209
+
210 return 1;
+
211 }
+
212 ina219_interface_debug_print("ina219: bus voltage is %0.3fmV.\n", m);
+
213
+
214 /* read current */
+
215 res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, (float *)&m);
+
216 if (res != 0)
+
217 {
+
218 ina219_interface_debug_print("ina219: read current failed.\n");
+
219 (void)ina219_deinit(&gs_handle);
+
220
+
221 return 1;
+
222 }
+
223 ina219_interface_debug_print("ina219: current is %0.3fmA.\n", m);
+
224
+
225 /* read power */
+
226 res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
+
227 if (res != 0)
+
228 {
+
229 ina219_interface_debug_print("ina219: read power failed.\n");
+
230 (void)ina219_deinit(&gs_handle);
+
231
+
232 return 1;
+
233 }
+
234 ina219_interface_debug_print("ina219: power is %0.3fmW.\n", m);
+
235
+ +
237 }
+
238
+
239 ina219_interface_debug_print("ina219: set pga 80 mV.\n");
+
240
+
241 /* set pga 80 mV */
+
242 res = ina219_set_pga(&gs_handle, INA219_PGA_80_MV);
+
243 if (res != 0)
+
244 {
+
245 ina219_interface_debug_print("ina219: set pga failed.\n");
+
246 (void)ina219_deinit(&gs_handle);
+
247
+
248 return 1;
+
249 }
+
250 res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&calibration);
+
251 if (res != 0)
+
252 {
+
253 ina219_interface_debug_print("ina219: calculate calibration failed.\n");
+
254 (void)ina219_deinit(&gs_handle);
+
255
+
256 return 1;
+
257 }
+
258 res = ina219_set_calibration(&gs_handle, calibration);
+
259 if (res != 0)
+
260 {
+
261 ina219_interface_debug_print("ina219: set calibration failed.\n");
+
262 (void)ina219_deinit(&gs_handle);
+
263
+
264 return 1;
+
265 }
+
266 for (i = 0; i < times; i++)
+
267 {
+
268 int16_t s_raw;
+
269 uint16_t u_raw;
+
270 float m;
+
271
+
272 /* read shunt voltage */
+
273 res = ina219_read_shunt_voltage(&gs_handle, (int16_t *)&s_raw, (float *)&m);
+
274 if (res != 0)
+
275 {
+
276 ina219_interface_debug_print("ina219: read shunt voltage failed.\n");
+
277 (void)ina219_deinit(&gs_handle);
+
278
+
279 return 1;
+
280 }
+
281 ina219_interface_debug_print("ina219: shunt voltage is %0.3fmV.\n", m);
+
282
+
283 /* read bus voltage */
+
284 res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
+
285 if (res != 0)
+
286 {
+
287 ina219_interface_debug_print("ina219: read bus voltage failed.\n");
+
288 (void)ina219_deinit(&gs_handle);
+
289
+
290 return 1;
+
291 }
+
292 ina219_interface_debug_print("ina219: bus voltage is %0.3fmV.\n", m);
+
293
+
294 /* read current */
+
295 res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, (float *)&m);
+
296 if (res != 0)
+
297 {
+
298 ina219_interface_debug_print("ina219: read current failed.\n");
+
299 (void)ina219_deinit(&gs_handle);
+
300
+
301 return 1;
+
302 }
+
303 ina219_interface_debug_print("ina219: current is %0.3fmA.\n", m);
+
304
+
305 /* read power */
+
306 res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
+
307 if (res != 0)
+
308 {
+
309 ina219_interface_debug_print("ina219: read power failed.\n");
+
310 (void)ina219_deinit(&gs_handle);
+
311
+
312 return 1;
+
313 }
+
314 ina219_interface_debug_print("ina219: power is %0.3fmW.\n", m);
+
315
+ +
317 }
+
318
+
319 ina219_interface_debug_print("ina219: set pga 160 mV.\n");
+
320
+
321 /* set pga 160 mV */
+
322 res = ina219_set_pga(&gs_handle, INA219_PGA_160_MV);
+
323 if (res != 0)
+
324 {
+
325 ina219_interface_debug_print("ina219: set pga failed.\n");
+
326 (void)ina219_deinit(&gs_handle);
+
327
+
328 return 1;
+
329 }
+
330 res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&calibration);
+
331 if (res != 0)
+
332 {
+
333 ina219_interface_debug_print("ina219: calculate calibration failed.\n");
+
334 (void)ina219_deinit(&gs_handle);
+
335
+
336 return 1;
+
337 }
+
338 res = ina219_set_calibration(&gs_handle, calibration);
+
339 if (res != 0)
+
340 {
+
341 ina219_interface_debug_print("ina219: set calibration failed.\n");
+
342 (void)ina219_deinit(&gs_handle);
+
343
+
344 return 1;
+
345 }
+
346 for (i = 0; i < times; i++)
+
347 {
+
348 int16_t s_raw;
+
349 uint16_t u_raw;
+
350 float m;
+
351
+
352 /* read shunt voltage */
+
353 res = ina219_read_shunt_voltage(&gs_handle, (int16_t *)&s_raw, (float *)&m);
+
354 if (res != 0)
+
355 {
+
356 ina219_interface_debug_print("ina219: read shunt voltage failed.\n");
+
357 (void)ina219_deinit(&gs_handle);
+
358
+
359 return 1;
+
360 }
+
361 ina219_interface_debug_print("ina219: shunt voltage is %0.3fmV.\n", m);
+
362
+
363 /* read bus voltage */
+
364 res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
+
365 if (res != 0)
+
366 {
+
367 ina219_interface_debug_print("ina219: read bus voltage failed.\n");
+
368 (void)ina219_deinit(&gs_handle);
+
369
+
370 return 1;
+
371 }
+
372 ina219_interface_debug_print("ina219: bus voltage is %0.3fmV.\n", m);
+
373
+
374 /* read current */
+
375 res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, (float *)&m);
+
376 if (res != 0)
+
377 {
+
378 ina219_interface_debug_print("ina219: read current failed.\n");
+
379 (void)ina219_deinit(&gs_handle);
+
380
+
381 return 1;
+
382 }
+
383 ina219_interface_debug_print("ina219: current is %0.3fmA.\n", m);
+
384
+
385 /* read power */
+
386 res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
+
387 if (res != 0)
+
388 {
+
389 ina219_interface_debug_print("ina219: read power failed.\n");
+
390 (void)ina219_deinit(&gs_handle);
+
391
+
392 return 1;
+
393 }
+
394 ina219_interface_debug_print("ina219: power is %0.3fmW.\n", m);
+
395
+ +
397 }
+
398
+
399 ina219_interface_debug_print("ina219: set pga 320 mV.\n");
+
400
+
401 /* set pga 320 mV */
+
402 res = ina219_set_pga(&gs_handle, INA219_PGA_320_MV);
+
403 if (res != 0)
+
404 {
+
405 ina219_interface_debug_print("ina219: set pga failed.\n");
+
406 (void)ina219_deinit(&gs_handle);
+
407
+
408 return 1;
+
409 }
+
410 res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&calibration);
+
411 if (res != 0)
+
412 {
+
413 ina219_interface_debug_print("ina219: calculate calibration failed.\n");
+
414 (void)ina219_deinit(&gs_handle);
+
415
+
416 return 1;
+
417 }
+
418 res = ina219_set_calibration(&gs_handle, calibration);
+
419 if (res != 0)
+
420 {
+
421 ina219_interface_debug_print("ina219: set calibration failed.\n");
+
422 (void)ina219_deinit(&gs_handle);
+
423
+
424 return 1;
+
425 }
+
426 for (i = 0; i < times; i++)
+
427 {
+
428 int16_t s_raw;
+
429 uint16_t u_raw;
+
430 float m;
+
431
+
432 /* read shunt voltage */
+
433 res = ina219_read_shunt_voltage(&gs_handle, (int16_t *)&s_raw, (float *)&m);
+
434 if (res != 0)
+
435 {
+
436 ina219_interface_debug_print("ina219: read shunt voltage failed.\n");
+
437 (void)ina219_deinit(&gs_handle);
+
438
+
439 return 1;
+
440 }
+
441 ina219_interface_debug_print("ina219: shunt voltage is %0.3fmV.\n", m);
+
442
+
443 /* read bus voltage */
+
444 res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
+
445 if (res != 0)
+
446 {
+
447 ina219_interface_debug_print("ina219: read bus voltage failed.\n");
+
448 (void)ina219_deinit(&gs_handle);
+
449
+
450 return 1;
+
451 }
+
452 ina219_interface_debug_print("ina219: bus voltage is %0.3fmV.\n", m);
+
453
+
454 /* read current */
+
455 res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, (float *)&m);
+
456 if (res != 0)
+
457 {
+
458 ina219_interface_debug_print("ina219: read current failed.\n");
+
459 (void)ina219_deinit(&gs_handle);
+
460
+
461 return 1;
+
462 }
+
463 ina219_interface_debug_print("ina219: current is %0.3fmA.\n", m);
+
464
+
465 /* read power */
+
466 res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
+
467 if (res != 0)
+
468 {
+
469 ina219_interface_debug_print("ina219: read power failed.\n");
+
470 (void)ina219_deinit(&gs_handle);
+
471
+
472 return 1;
+
473 }
+
474 ina219_interface_debug_print("ina219: power is %0.3fmW.\n", m);
+
475
+ +
477 }
+
478
+
479 ina219_interface_debug_print("ina219: set triggered mode.\n");
+
480
+
481 for (i = 0; i < times; i++)
+
482 {
+
483 int16_t s_raw;
+
484 uint16_t u_raw;
+
485 float m;
+
486
+
487 /* set shunt bus voltage triggered */
+ +
489 if (res != 0)
+
490 {
+
491 ina219_interface_debug_print("ina219: set mode failed.\n");
+
492 (void)ina219_deinit(&gs_handle);
+
493
+
494 return 1;
+
495 }
+
496
+
497 /* read shunt voltage */
+
498 res = ina219_read_shunt_voltage(&gs_handle, (int16_t *)&s_raw, (float *)&m);
+
499 if (res != 0)
+
500 {
+
501 ina219_interface_debug_print("ina219: read shunt voltage failed.\n");
+
502 (void)ina219_deinit(&gs_handle);
+
503
+
504 return 1;
+
505 }
+
506 ina219_interface_debug_print("ina219: shunt voltage is %0.3fmV.\n", m);
+
507
+
508 /* read bus voltage */
+
509 res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
+
510 if (res != 0)
+
511 {
+
512 ina219_interface_debug_print("ina219: read bus voltage failed.\n");
+
513 (void)ina219_deinit(&gs_handle);
+
514
+
515 return 1;
+
516 }
+
517 ina219_interface_debug_print("ina219: bus voltage is %0.3fmV.\n", m);
+
518
+
519 /* read current */
+
520 res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, (float *)&m);
+
521 if (res != 0)
+
522 {
+
523 ina219_interface_debug_print("ina219: read current failed.\n");
+
524 (void)ina219_deinit(&gs_handle);
+
525
+
526 return 1;
+
527 }
+
528 ina219_interface_debug_print("ina219: current is %0.3fmA.\n", m);
+
529
+
530 /* read power */
+
531 res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, (float *)&m);
+
532 if (res != 0)
+
533 {
+
534 ina219_interface_debug_print("ina219: read power failed.\n");
+
535 (void)ina219_deinit(&gs_handle);
+
536
+
537 return 1;
+
538 }
+
539 ina219_interface_debug_print("ina219: power is %0.3fmW.\n", m);
+
540
+ +
542 }
+
543
+
544 /* finish read test */
+
545 (void)ina219_deinit(&gs_handle);
+
546 ina219_interface_debug_print("ina219: finish read test.\n");
+
547
+
548 return 0;
+
549}
+
-
uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin)
set the iic address pin
-
uint8_t ina219_info(ina219_info_t *info)
get chip's information
-
uint8_t ina219_set_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the shunt voltage adc mode
-
uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
set the calibration
-
uint8_t ina219_deinit(ina219_handle_t *handle)
close the chip
-
uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode)
set the mode
-
uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga)
set the pga
-
uint8_t ina219_set_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t range)
set the bus voltage range
-
uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV)
read the bus voltage
-
uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA)
read the current
-
uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
calculate the calibration
-
uint8_t ina219_init(ina219_handle_t *handle)
initialize the chip
-
uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
set the resistance
-
ina219_address_t
ina219 address enumeration definition
Definition: driver_ina219.h:63
-
uint8_t ina219_set_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the bus voltage adc mode
-
uint8_t ina219_read_shunt_voltage(ina219_handle_t *handle, int16_t *raw, float *mV)
read the shunt voltage
-
uint8_t ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW)
read the power
-
@ INA219_ADC_MODE_12_BIT_1_SAMPLES
-
@ INA219_PGA_320_MV
Definition: driver_ina219.h:99
-
@ INA219_PGA_40_MV
Definition: driver_ina219.h:96
-
@ INA219_PGA_80_MV
Definition: driver_ina219.h:97
-
@ INA219_PGA_160_MV
Definition: driver_ina219.h:98
-
@ INA219_BUS_VOLTAGE_RANGE_32V
Definition: driver_ina219.h:88
-
@ INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS
-
@ INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED
-
uint8_t ina219_interface_iic_init(void)
interface iic bus init
-
uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
-
void ina219_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ina219_interface_debug_print(const char *const fmt,...)
interface print format data
-
uint8_t ina219_interface_iic_deinit(void)
interface iic bus deinit
- - - - - - - -
uint8_t ina219_read_test(ina219_address_t addr_pin, double r, uint32_t times)
read test
-
ina219 handle structure definition
-
ina219 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]
+
struct ina219_info_s ina219_info_t
ina219 information structure definition
+
uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin)
set the iic address pin
+
uint8_t ina219_info(ina219_info_t *info)
get chip's information
+
uint8_t ina219_set_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the shunt voltage adc mode
+
uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
set the calibration
+
uint8_t ina219_deinit(ina219_handle_t *handle)
close the chip
+
uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode)
set the mode
+
uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga)
set the pga
+
uint8_t ina219_set_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t range)
set the bus voltage range
+
uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV)
read the bus voltage
+
uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA)
read the current
+
uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
calculate the calibration
+
uint8_t ina219_init(ina219_handle_t *handle)
initialize the chip
+
uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
set the resistance
+
ina219_address_t
ina219 address enumeration definition
+
uint8_t ina219_set_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the bus voltage adc mode
+
uint8_t ina219_read_shunt_voltage(ina219_handle_t *handle, int16_t *raw, float *mV)
read the shunt voltage
+
struct ina219_handle_s ina219_handle_t
ina219 handle structure definition
+
uint8_t ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW)
read the power
+
@ INA219_ADC_MODE_12_BIT_1_SAMPLES
+
@ INA219_PGA_320_MV
+
@ INA219_PGA_40_MV
+
@ INA219_PGA_80_MV
+
@ INA219_PGA_160_MV
+
@ INA219_BUS_VOLTAGE_RANGE_32V
+
@ INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS
+
@ INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED
+
uint8_t ina219_interface_iic_init(void)
interface iic bus init
+
uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+
void ina219_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ina219_interface_debug_print(const char *const fmt,...)
interface print format data
+
uint8_t ina219_interface_iic_deinit(void)
interface iic bus deinit
+ + + + + + + +
uint8_t ina219_read_test(ina219_address_t addr_pin, double r, uint32_t times)
read 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__ina219__read__test_8h.html b/doc/html/driver__ina219__read__test_8h.html index b18cf4a..28ba19d 100644 --- a/doc/html/driver__ina219__read__test_8h.html +++ b/doc/html/driver__ina219__read__test_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: test/driver_ina219_read_test.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ina219_read_test.h File Reference
+
driver_ina219_read_test.h File Reference
+Include dependency graph for driver_ina219_read_test.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+

Go to the source code of this file.

- - - - + +

+

Functions

uint8_t ina219_read_test (ina219_address_t addr_pin, double r, uint32_t times)
 read test More...
 
uint8_t ina219_read_test (ina219_address_t addr_pin, double r, uint32_t times)
 read test
+ +
diff --git a/doc/html/driver__ina219__read__test_8h__dep__incl.md5 b/doc/html/driver__ina219__read__test_8h__dep__incl.md5 new file mode 100644 index 0000000..b9287e2 --- /dev/null +++ b/doc/html/driver__ina219__read__test_8h__dep__incl.md5 @@ -0,0 +1 @@ +1c9d0d678bf9c1f490ef794cfc0178b9 \ No newline at end of file diff --git a/doc/html/driver__ina219__read__test_8h__dep__incl.svg b/doc/html/driver__ina219__read__test_8h__dep__incl.svg new file mode 100644 index 0000000..7fc12e3 --- /dev/null +++ b/doc/html/driver__ina219__read__test_8h__dep__incl.svg @@ -0,0 +1,41 @@ + + + + + + +test/driver_ina219_read_test.h + + +Node1 + + +test/driver_ina219 +_read_test.h + + + + + +Node2 + + +test/driver_ina219 +_read_test.c + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/driver__ina219__read__test_8h__incl.md5 b/doc/html/driver__ina219__read__test_8h__incl.md5 new file mode 100644 index 0000000..f82b395 --- /dev/null +++ b/doc/html/driver__ina219__read__test_8h__incl.md5 @@ -0,0 +1 @@ +3d82f7090b9d1141632678f6f549d2ae \ No newline at end of file diff --git a/doc/html/driver__ina219__read__test_8h__incl.svg b/doc/html/driver__ina219__read__test_8h__incl.svg new file mode 100644 index 0000000..5c4b559 --- /dev/null +++ b/doc/html/driver__ina219__read__test_8h__incl.svg @@ -0,0 +1,112 @@ + + + + + + +test/driver_ina219_read_test.h + + +Node1 + + +test/driver_ina219 +_read_test.h + + + + + +Node2 + + +driver_ina219_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ina219.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdio.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdint.h + + + + + +Node3->Node5 + + + + + + + + +Node6 + + +string.h + + + + + +Node3->Node6 + + + + + + + + diff --git a/doc/html/driver__ina219__read__test_8h_source.html b/doc/html/driver__ina219__read__test_8h_source.html index 76712d2..6e54a2b 100644 --- a/doc/html/driver__ina219__read__test_8h_source.html +++ b/doc/html/driver__ina219__read__test_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: test/driver_ina219_read_test.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ina219_read_test.h
+
driver_ina219_read_test.h
-Go to the documentation of this file.
1 
-
37 #ifndef DRIVER_INA219_READ_TEST_H
-
38 #define DRIVER_INA219_READ_TEST_H
-
39 
- -
41 
-
42 #ifdef __cplusplus
-
43 extern "C"{
-
44 #endif
-
45 
-
61 uint8_t ina219_read_test(ina219_address_t addr_pin, double r, uint32_t times);
-
62 
-
67 #ifdef __cplusplus
-
68 }
-
69 #endif
-
70 
-
71 #endif
+Go to the documentation of this file.
1
+
36
+
37#ifndef DRIVER_INA219_READ_TEST_H
+
38#define DRIVER_INA219_READ_TEST_H
+
39
+ +
41
+
42#ifdef __cplusplus
+
43extern "C"{
+
44#endif
+
45
+
50
+
61uint8_t ina219_read_test(ina219_address_t addr_pin, double r, uint32_t times);
+
62
+
66
+
67#ifdef __cplusplus
+
68}
+
69#endif
+
70
+
71#endif
driver ina219 interface header file
-
ina219_address_t
ina219 address enumeration definition
Definition: driver_ina219.h:63
-
uint8_t ina219_read_test(ina219_address_t addr_pin, double r, uint32_t times)
read test
+
ina219_address_t
ina219 address enumeration definition
+
uint8_t ina219_read_test(ina219_address_t addr_pin, double r, uint32_t times)
read test
+
diff --git a/doc/html/driver__ina219__register__test_8c.html b/doc/html/driver__ina219__register__test_8c.html index cfa20b5..85b3933 100644 --- a/doc/html/driver__ina219__register__test_8c.html +++ b/doc/html/driver__ina219__register__test_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: test/driver_ina219_register_test.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ina219_register_test.c File Reference
+
driver_ina219_register_test.c File Reference
@@ -95,16 +99,20 @@ More...

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

Go to the source code of this file.

- - - - + +

+

Functions

uint8_t ina219_register_test (ina219_address_t addr_pin)
 register test More...
 
uint8_t ina219_register_test (ina219_address_t addr_pin)
 register test
-

Detailed Description

+

Detailed Description

driver ina219 register test source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -125,11 +133,19 @@

history

Definition in file driver_ina219_register_test.c.

+ +
diff --git a/doc/html/driver__ina219__register__test_8c__incl.md5 b/doc/html/driver__ina219__register__test_8c__incl.md5 new file mode 100644 index 0000000..82b00b7 --- /dev/null +++ b/doc/html/driver__ina219__register__test_8c__incl.md5 @@ -0,0 +1 @@ +79048406121f4a4ead9655fed843d2e8 \ No newline at end of file diff --git a/doc/html/driver__ina219__register__test_8c__incl.svg b/doc/html/driver__ina219__register__test_8c__incl.svg new file mode 100644 index 0000000..fb15989 --- /dev/null +++ b/doc/html/driver__ina219__register__test_8c__incl.svg @@ -0,0 +1,149 @@ + + + + + + +test/driver_ina219_register_test.c + + +Node1 + + +test/driver_ina219 +_register_test.c + + + + + +Node2 + + +driver_ina219_register +_test.h + + + + + +Node1->Node2 + + + + + + + + +Node8 + + +stdlib.h + + + + + +Node1->Node8 + + + + + + + + +Node3 + + +driver_ina219_interface.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +driver_ina219.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdio.h + + + + + +Node4->Node5 + + + + + + + + +Node6 + + +stdint.h + + + + + +Node4->Node6 + + + + + + + + +Node7 + + +string.h + + + + + +Node4->Node7 + + + + + + + + diff --git a/doc/html/driver__ina219__register__test_8c_source.html b/doc/html/driver__ina219__register__test_8c_source.html index bd3569b..8a8e0ab 100644 --- a/doc/html/driver__ina219__register__test_8c_source.html +++ b/doc/html/driver__ina219__register__test_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: test/driver_ina219_register_test.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ina219_register_test.c
+
driver_ina219_register_test.c
-Go to the documentation of this file.
1 
- -
38 #include <stdlib.h>
-
39 
-
40 static ina219_handle_t gs_handle;
- -
51 {
-
52  uint8_t res;
-
53  double r, r_check;
-
54  uint16_t data, data_check;
-
55  ina219_info_t info;
-
56  ina219_address_t addr;
- -
58  ina219_pga_t pga;
-
59  ina219_adc_mode_t mode;
-
60  ina219_mode_t chip_mode;
-
61 
-
62  /* link interface function */
- - - - - - - -
70 
-
71  /* get information */
-
72  res = ina219_info(&info);
-
73  if (res != 0)
-
74  {
-
75  ina219_interface_debug_print("ina219: get info failed.\n");
-
76 
-
77  return 1;
-
78  }
-
79  else
-
80  {
-
81  /* print chip info */
-
82  ina219_interface_debug_print("ina219: chip is %s.\n", info.chip_name);
-
83  ina219_interface_debug_print("ina219: manufacturer is %s.\n", info.manufacturer_name);
-
84  ina219_interface_debug_print("ina219: interface is %s.\n", info.interface);
-
85  ina219_interface_debug_print("ina219: driver version is %d.%d.\n", info.driver_version / 1000, (info.driver_version % 1000) / 100);
-
86  ina219_interface_debug_print("ina219: min supply voltage is %0.1fV.\n", info.supply_voltage_min_v);
-
87  ina219_interface_debug_print("ina219: max supply voltage is %0.1fV.\n", info.supply_voltage_max_v);
-
88  ina219_interface_debug_print("ina219: max current is %0.2fmA.\n", info.max_current_ma);
-
89  ina219_interface_debug_print("ina219: max temperature is %0.1fC.\n", info.temperature_max);
-
90  ina219_interface_debug_print("ina219: min temperature is %0.1fC.\n", info.temperature_min);
-
91  }
-
92 
-
93  /* start register test */
-
94  ina219_interface_debug_print("ina219: start register test.\n");
-
95 
-
96  /* ina219_set_addr_pin/ina219_get_addr_pin test */
-
97  ina219_interface_debug_print("ina219: ina219_set_addr_pin/ina219_get_addr_pin test.\n");
-
98 
-
99  /* set address 0 */
-
100  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_0);
-
101  if (res != 0)
-
102  {
-
103  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
104 
-
105  return 1;
-
106  }
-
107  ina219_interface_debug_print("ina219: set addr pin 0.\n");
-
108  res = ina219_get_addr_pin(&gs_handle, &addr);
-
109  if (res != 0)
-
110  {
-
111  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
112 
-
113  return 1;
-
114  }
-
115  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_0 ? "ok" : "error");
-
116 
-
117  /* set address 1 */
-
118  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_1);
-
119  if (res != 0)
-
120  {
-
121  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
122 
-
123  return 1;
-
124  }
-
125  ina219_interface_debug_print("ina219: set addr pin 1.\n");
-
126  res = ina219_get_addr_pin(&gs_handle, &addr);
-
127  if (res != 0)
-
128  {
-
129  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
130 
-
131  return 1;
-
132  }
-
133  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_1 ? "ok" : "error");
-
134 
-
135  /* set address 2 */
-
136  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_2);
-
137  if (res != 0)
-
138  {
-
139  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
140 
-
141  return 1;
-
142  }
-
143  ina219_interface_debug_print("ina219: set addr pin 2.\n");
-
144  res = ina219_get_addr_pin(&gs_handle, &addr);
-
145  if (res != 0)
-
146  {
-
147  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
148 
-
149  return 1;
-
150  }
-
151  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_2 ? "ok" : "error");
-
152 
-
153  /* set address 3 */
-
154  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_3);
-
155  if (res != 0)
-
156  {
-
157  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
158 
-
159  return 1;
-
160  }
-
161  ina219_interface_debug_print("ina219: set addr pin 3.\n");
-
162  res = ina219_get_addr_pin(&gs_handle, &addr);
-
163  if (res != 0)
-
164  {
-
165  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
166 
-
167  return 1;
-
168  }
-
169  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_3 ? "ok" : "error");
-
170 
-
171  /* set address 4 */
-
172  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_4);
-
173  if (res != 0)
-
174  {
-
175  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
176 
-
177  return 1;
-
178  }
-
179  ina219_interface_debug_print("ina219: set addr pin 4.\n");
-
180  res = ina219_get_addr_pin(&gs_handle, &addr);
-
181  if (res != 0)
-
182  {
-
183  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
184 
-
185  return 1;
-
186  }
-
187  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_4 ? "ok" : "error");
-
188 
-
189  /* set address 5 */
-
190  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_5);
-
191  if (res != 0)
-
192  {
-
193  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
194 
-
195  return 1;
-
196  }
-
197  ina219_interface_debug_print("ina219: set addr pin 5.\n");
-
198  res = ina219_get_addr_pin(&gs_handle, &addr);
-
199  if (res != 0)
-
200  {
-
201  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
202 
-
203  return 1;
-
204  }
-
205  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_5 ? "ok" : "error");
-
206 
-
207  /* set address 6 */
-
208  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_6);
-
209  if (res != 0)
-
210  {
-
211  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
212 
-
213  return 1;
-
214  }
-
215  ina219_interface_debug_print("ina219: set addr pin 6.\n");
-
216  res = ina219_get_addr_pin(&gs_handle, &addr);
-
217  if (res != 0)
-
218  {
-
219  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
220 
-
221  return 1;
-
222  }
-
223  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_6 ? "ok" : "error");
-
224 
-
225  /* set address 7 */
-
226  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_7);
-
227  if (res != 0)
-
228  {
-
229  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
230 
-
231  return 1;
-
232  }
-
233  ina219_interface_debug_print("ina219: set addr pin 7.\n");
-
234  res = ina219_get_addr_pin(&gs_handle, &addr);
-
235  if (res != 0)
-
236  {
-
237  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
238 
-
239  return 1;
-
240  }
-
241  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_7 ? "ok" : "error");
-
242 
-
243  /* set address 8 */
-
244  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_8);
-
245  if (res != 0)
-
246  {
-
247  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
248 
-
249  return 1;
-
250  }
-
251  ina219_interface_debug_print("ina219: set addr pin 8.\n");
-
252  res = ina219_get_addr_pin(&gs_handle, &addr);
-
253  if (res != 0)
-
254  {
-
255  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
256 
-
257  return 1;
-
258  }
-
259  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_8 ? "ok" : "error");
-
260 
-
261  /* set address 9 */
-
262  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_9);
-
263  if (res != 0)
-
264  {
-
265  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
266 
-
267  return 1;
-
268  }
-
269  ina219_interface_debug_print("ina219: set addr pin 9.\n");
-
270  res = ina219_get_addr_pin(&gs_handle, &addr);
-
271  if (res != 0)
-
272  {
-
273  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
274 
-
275  return 1;
-
276  }
-
277  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_9 ? "ok" : "error");
-
278 
-
279  /* set address 10 */
-
280  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_A);
-
281  if (res != 0)
-
282  {
-
283  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
284 
-
285  return 1;
-
286  }
-
287  ina219_interface_debug_print("ina219: set addr pin 10.\n");
-
288  res = ina219_get_addr_pin(&gs_handle, &addr);
-
289  if (res != 0)
-
290  {
-
291  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
292 
-
293  return 1;
-
294  }
-
295  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_A ? "ok" : "error");
-
296 
-
297  /* set address 11 */
-
298  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_B);
-
299  if (res != 0)
-
300  {
-
301  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
302 
-
303  return 1;
-
304  }
-
305  ina219_interface_debug_print("ina219: set addr pin 11.\n");
-
306  res = ina219_get_addr_pin(&gs_handle, &addr);
-
307  if (res != 0)
-
308  {
-
309  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
310 
-
311  return 1;
-
312  }
-
313  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_B ? "ok" : "error");
-
314 
-
315  /* set address 12 */
-
316  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_C);
-
317  if (res != 0)
-
318  {
-
319  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
320 
-
321  return 1;
-
322  }
-
323  ina219_interface_debug_print("ina219: set addr pin 12.\n");
-
324  res = ina219_get_addr_pin(&gs_handle, &addr);
-
325  if (res != 0)
-
326  {
-
327  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
328 
-
329  return 1;
-
330  }
-
331  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_C ? "ok" : "error");
-
332 
-
333  /* set address 13 */
-
334  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_D);
-
335  if (res != 0)
-
336  {
-
337  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
338 
-
339  return 1;
-
340  }
-
341  ina219_interface_debug_print("ina219: set addr pin 13.\n");
-
342  res = ina219_get_addr_pin(&gs_handle, &addr);
-
343  if (res != 0)
-
344  {
-
345  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
346 
-
347  return 1;
-
348  }
-
349  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_D ? "ok" : "error");
-
350 
-
351  /* set address 14 */
-
352  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_E);
-
353  if (res != 0)
-
354  {
-
355  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
356 
-
357  return 1;
-
358  }
-
359  ina219_interface_debug_print("ina219: set addr pin 14.\n");
-
360  res = ina219_get_addr_pin(&gs_handle, &addr);
-
361  if (res != 0)
-
362  {
-
363  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
364 
-
365  return 1;
-
366  }
-
367  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_E ? "ok" : "error");
-
368 
-
369  /* set address 15 */
-
370  res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_F);
-
371  if (res != 0)
-
372  {
-
373  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
374 
-
375  return 1;
-
376  }
-
377  ina219_interface_debug_print("ina219: set addr pin 15.\n");
-
378  res = ina219_get_addr_pin(&gs_handle, &addr);
-
379  if (res != 0)
-
380  {
-
381  ina219_interface_debug_print("ina219: get addr pin failed.\n");
-
382 
-
383  return 1;
-
384  }
-
385  ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_F ? "ok" : "error");
-
386 
-
387  /* ina219_set_resistance/ina219_get_resistance test */
-
388  ina219_interface_debug_print("ina219: ina219_set_resistance/ina219_get_resistance test.\n");
-
389 
-
390  /* generate the r */
-
391  r = (double)(rand() % 100) / 1000.0;
-
392  res = ina219_set_resistance(&gs_handle, r);
-
393  if (res != 0)
-
394  {
-
395  ina219_interface_debug_print("ina219: set resistance failed.\n");
-
396 
-
397  return 1;
-
398  }
-
399  ina219_interface_debug_print("ina219: set resistance %f.\n", r);
-
400  res = ina219_get_resistance(&gs_handle, (double *)&r_check);
-
401  if (res != 0)
-
402  {
-
403  ina219_interface_debug_print("ina219: get resistance failed.\n");
-
404 
-
405  return 1;
-
406  }
-
407  ina219_interface_debug_print("ina219: check resistance %f.\n", r_check);
-
408 
-
409  /* set addr pin */
-
410  res = ina219_set_addr_pin(&gs_handle, addr_pin);
-
411  if (res != 0)
-
412  {
-
413  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
414 
-
415  return 1;
-
416  }
-
417 
-
418  /* init */
-
419  res = ina219_init(&gs_handle);
-
420  if (res != 0)
-
421  {
-
422  ina219_interface_debug_print("ina219: init failed.\n");
-
423 
-
424  return 1;
-
425  }
-
426 
-
427  /* ina219_set_bus_voltage_range/ina219_get_bus_voltage_range test */
-
428  ina219_interface_debug_print("ina219: ina219_set_bus_voltage_range/ina219_get_bus_voltage_range test.\n");
-
429 
-
430  /* set bus voltage range 16V */
- -
432  if (res != 0)
-
433  {
-
434  ina219_interface_debug_print("ina219: set bus voltage range failed.\n");
-
435  (void)ina219_deinit(&gs_handle);
-
436 
-
437  return 1;
-
438  }
-
439  ina219_interface_debug_print("ina219: set bus voltage range 16V.\n");
-
440  res = ina219_get_bus_voltage_range(&gs_handle, &range);
-
441  if (res != 0)
-
442  {
-
443  ina219_interface_debug_print("ina219: get bus voltage range failed.\n");
-
444  (void)ina219_deinit(&gs_handle);
-
445 
-
446  return 1;
-
447  }
-
448  ina219_interface_debug_print("ina219: check bus voltage range %s.\n", range == INA219_BUS_VOLTAGE_RANGE_16V ? "ok" : "error");
-
449 
-
450  /* set bus voltage range 32V */
- -
452  if (res != 0)
-
453  {
-
454  ina219_interface_debug_print("ina219: set bus voltage range failed.\n");
-
455  (void)ina219_deinit(&gs_handle);
-
456 
-
457  return 1;
-
458  }
-
459  ina219_interface_debug_print("ina219: set bus voltage range 32V.\n");
-
460  res = ina219_get_bus_voltage_range(&gs_handle, &range);
-
461  if (res != 0)
-
462  {
-
463  ina219_interface_debug_print("ina219: get bus voltage range failed.\n");
-
464  (void)ina219_deinit(&gs_handle);
-
465 
-
466  return 1;
-
467  }
-
468  ina219_interface_debug_print("ina219: check bus voltage range %s.\n", range == INA219_BUS_VOLTAGE_RANGE_32V ? "ok" : "error");
-
469 
-
470  /* ina219_set_pga/ina219_get_pga test */
-
471  ina219_interface_debug_print("ina219: ina219_set_pga/ina219_get_pga test.\n");
-
472 
-
473  /* set 40 mV */
-
474  res = ina219_set_pga(&gs_handle, INA219_PGA_40_MV);
-
475  if (res != 0)
-
476  {
-
477  ina219_interface_debug_print("ina219: set pga failed.\n");
-
478  (void)ina219_deinit(&gs_handle);
-
479 
-
480  return 1;
-
481  }
-
482  ina219_interface_debug_print("ina219: set pga 40 mV.\n");
-
483  res = ina219_get_pga(&gs_handle, &pga);
-
484  if (res != 0)
-
485  {
-
486  ina219_interface_debug_print("ina219: get pga failed.\n");
-
487  (void)ina219_deinit(&gs_handle);
-
488 
-
489  return 1;
-
490  }
-
491  ina219_interface_debug_print("ina219: check pga %s.\n", pga == INA219_PGA_40_MV ? "ok" : "error");
-
492 
-
493  /* set 80 mV */
-
494  res = ina219_set_pga(&gs_handle, INA219_PGA_80_MV);
-
495  if (res != 0)
-
496  {
-
497  ina219_interface_debug_print("ina219: set pga failed.\n");
-
498  (void)ina219_deinit(&gs_handle);
-
499 
-
500  return 1;
-
501  }
-
502  ina219_interface_debug_print("ina219: set pga 80 mV.\n");
-
503  res = ina219_get_pga(&gs_handle, &pga);
-
504  if (res != 0)
-
505  {
-
506  ina219_interface_debug_print("ina219: get pga failed.\n");
-
507  (void)ina219_deinit(&gs_handle);
-
508 
-
509  return 1;
-
510  }
-
511  ina219_interface_debug_print("ina219: check pga %s.\n", pga == INA219_PGA_80_MV ? "ok" : "error");
-
512 
-
513  /* set 160 mV */
-
514  res = ina219_set_pga(&gs_handle, INA219_PGA_160_MV);
-
515  if (res != 0)
-
516  {
-
517  ina219_interface_debug_print("ina219: set pga failed.\n");
-
518  (void)ina219_deinit(&gs_handle);
-
519 
-
520  return 1;
-
521  }
-
522  ina219_interface_debug_print("ina219: set pga 160 mV.\n");
-
523  res = ina219_get_pga(&gs_handle, &pga);
-
524  if (res != 0)
-
525  {
-
526  ina219_interface_debug_print("ina219: get pga failed.\n");
-
527  (void)ina219_deinit(&gs_handle);
-
528 
-
529  return 1;
-
530  }
-
531  ina219_interface_debug_print("ina219: check pga %s.\n", pga == INA219_PGA_160_MV ? "ok" : "error");
-
532 
-
533  /* set 320 mV */
-
534  res = ina219_set_pga(&gs_handle, INA219_PGA_320_MV);
-
535  if (res != 0)
-
536  {
-
537  ina219_interface_debug_print("ina219: set pga failed.\n");
-
538  (void)ina219_deinit(&gs_handle);
-
539 
-
540  return 1;
-
541  }
-
542  ina219_interface_debug_print("ina219: set pga 320 mV.\n");
-
543  res = ina219_get_pga(&gs_handle, &pga);
-
544  if (res != 0)
-
545  {
-
546  ina219_interface_debug_print("ina219: get pga failed.\n");
-
547  (void)ina219_deinit(&gs_handle);
-
548 
-
549  return 1;
-
550  }
-
551  ina219_interface_debug_print("ina219: check pga %s.\n", pga == INA219_PGA_320_MV ? "ok" : "error");
-
552 
-
553  /* ina219_set_bus_voltage_adc_mode/ina219_get_bus_voltage_adc_mode test */
-
554  ina219_interface_debug_print("ina219: ina219_set_bus_voltage_adc_mode/ina219_get_bus_voltage_adc_mode test.\n");
-
555 
-
556  /* 9 bit 1 sample */
- -
558  if (res != 0)
-
559  {
-
560  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
561  (void)ina219_deinit(&gs_handle);
-
562 
-
563  return 1;
-
564  }
-
565  ina219_interface_debug_print("ina219: set bus voltage adc mode 9 bit 1 sample.\n");
-
566  res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
-
567  if (res != 0)
-
568  {
-
569  ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
-
570  (void)ina219_deinit(&gs_handle);
-
571 
-
572  return 1;
-
573  }
-
574  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_9_BIT_1_SAMPLES ? "ok" : "error");
-
575 
-
576  /* 10 bit 1 sample */
- -
578  if (res != 0)
-
579  {
-
580  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
581  (void)ina219_deinit(&gs_handle);
-
582 
-
583  return 1;
-
584  }
-
585  ina219_interface_debug_print("ina219: set bus voltage adc mode 10 bit 1 sample.\n");
-
586  res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
-
587  if (res != 0)
-
588  {
-
589  ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
-
590  (void)ina219_deinit(&gs_handle);
-
591 
-
592  return 1;
-
593  }
-
594  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_10_BIT_1_SAMPLES ? "ok" : "error");
-
595 
-
596  /* 11 bit 1 sample */
- -
598  if (res != 0)
-
599  {
-
600  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
601  (void)ina219_deinit(&gs_handle);
-
602 
-
603  return 1;
-
604  }
-
605  ina219_interface_debug_print("ina219: set bus voltage adc mode 11 bit 1 sample.\n");
-
606  res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
-
607  if (res != 0)
-
608  {
-
609  ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
-
610  (void)ina219_deinit(&gs_handle);
-
611 
-
612  return 1;
-
613  }
-
614  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_11_BIT_1_SAMPLES ? "ok" : "error");
-
615 
-
616  /* 12 bit 1 sample */
- -
618  if (res != 0)
-
619  {
-
620  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
621  (void)ina219_deinit(&gs_handle);
-
622 
-
623  return 1;
-
624  }
-
625  ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 1 sample.\n");
-
626  res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
-
627  if (res != 0)
-
628  {
-
629  ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
-
630  (void)ina219_deinit(&gs_handle);
-
631 
-
632  return 1;
-
633  }
-
634  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_1_SAMPLES ? "ok" : "error");
-
635 
-
636  /* 12 bit 2 sample */
- -
638  if (res != 0)
-
639  {
-
640  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
641  (void)ina219_deinit(&gs_handle);
-
642 
-
643  return 1;
-
644  }
-
645  ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 2 sample.\n");
-
646  res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
-
647  if (res != 0)
-
648  {
-
649  ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
-
650  (void)ina219_deinit(&gs_handle);
-
651 
-
652  return 1;
-
653  }
-
654  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_2_SAMPLES ? "ok" : "error");
-
655 
-
656  /* 12 bit 4 sample */
- -
658  if (res != 0)
-
659  {
-
660  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
661  (void)ina219_deinit(&gs_handle);
-
662 
-
663  return 1;
-
664  }
-
665  ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 4 sample.\n");
-
666  res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
-
667  if (res != 0)
-
668  {
-
669  ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
-
670  (void)ina219_deinit(&gs_handle);
-
671 
-
672  return 1;
-
673  }
-
674  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_4_SAMPLES ? "ok" : "error");
-
675 
-
676  /* 12 bit 8 sample */
- -
678  if (res != 0)
-
679  {
-
680  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
681  (void)ina219_deinit(&gs_handle);
-
682 
-
683  return 1;
-
684  }
-
685  ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 8 sample.\n");
-
686  res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
-
687  if (res != 0)
-
688  {
-
689  ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
-
690  (void)ina219_deinit(&gs_handle);
-
691 
-
692  return 1;
-
693  }
-
694  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_8_SAMPLES ? "ok" : "error");
-
695 
-
696  /* 12 bit 16 sample */
- -
698  if (res != 0)
-
699  {
-
700  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
701  (void)ina219_deinit(&gs_handle);
-
702 
-
703  return 1;
-
704  }
-
705  ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 16 sample.\n");
-
706  res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
-
707  if (res != 0)
-
708  {
-
709  ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
-
710  (void)ina219_deinit(&gs_handle);
-
711 
-
712  return 1;
-
713  }
-
714  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_16_SAMPLES ? "ok" : "error");
-
715 
-
716  /* 12 bit 32 sample */
- -
718  if (res != 0)
-
719  {
-
720  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
721  (void)ina219_deinit(&gs_handle);
-
722 
-
723  return 1;
-
724  }
-
725  ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 32 sample.\n");
-
726  res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
-
727  if (res != 0)
-
728  {
-
729  ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
-
730  (void)ina219_deinit(&gs_handle);
-
731 
-
732  return 1;
-
733  }
-
734  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_32_SAMPLES ? "ok" : "error");
-
735 
-
736  /* 12 bit 64 sample */
- -
738  if (res != 0)
-
739  {
-
740  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
741  (void)ina219_deinit(&gs_handle);
-
742 
-
743  return 1;
-
744  }
-
745  ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 64 sample.\n");
-
746  res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
-
747  if (res != 0)
-
748  {
-
749  ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
-
750  (void)ina219_deinit(&gs_handle);
-
751 
-
752  return 1;
-
753  }
-
754  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_64_SAMPLES ? "ok" : "error");
-
755 
-
756  /* 12 bit 128 sample */
- -
758  if (res != 0)
-
759  {
-
760  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
761  (void)ina219_deinit(&gs_handle);
-
762 
-
763  return 1;
-
764  }
-
765  ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 128 sample.\n");
-
766  res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
-
767  if (res != 0)
-
768  {
-
769  ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
-
770  (void)ina219_deinit(&gs_handle);
-
771 
-
772  return 1;
-
773  }
-
774  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_128_SAMPLES ? "ok" : "error");
-
775 
-
776  /* ina219_set_shunt_voltage_adc_mode/ina219_get_shunt_voltage_adc_mode test */
-
777  ina219_interface_debug_print("ina219: ina219_set_shunt_voltage_adc_mode/ina219_get_shunt_voltage_adc_mode test.\n");
-
778 
-
779  /* 9 bit 1 sample */
- -
781  if (res != 0)
-
782  {
-
783  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
784  (void)ina219_deinit(&gs_handle);
-
785 
-
786  return 1;
-
787  }
-
788  ina219_interface_debug_print("ina219: set shunt voltage adc mode 9 bit 1 sample.\n");
-
789  res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
-
790  if (res != 0)
-
791  {
-
792  ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
-
793  (void)ina219_deinit(&gs_handle);
-
794 
-
795  return 1;
-
796  }
-
797  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_9_BIT_1_SAMPLES ? "ok" : "error");
-
798 
-
799  /* 10 bit 1 sample */
- -
801  if (res != 0)
-
802  {
-
803  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
804  (void)ina219_deinit(&gs_handle);
-
805 
-
806  return 1;
-
807  }
-
808  ina219_interface_debug_print("ina219: set shunt voltage adc mode 10 bit 1 sample.\n");
-
809  res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
-
810  if (res != 0)
-
811  {
-
812  ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
-
813  (void)ina219_deinit(&gs_handle);
-
814 
-
815  return 1;
-
816  }
-
817  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_10_BIT_1_SAMPLES ? "ok" : "error");
-
818 
-
819  /* 11 bit 1 sample */
- -
821  if (res != 0)
-
822  {
-
823  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
824  (void)ina219_deinit(&gs_handle);
-
825 
-
826  return 1;
-
827  }
-
828  ina219_interface_debug_print("ina219: set shunt voltage adc mode 11 bit 1 sample.\n");
-
829  res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
-
830  if (res != 0)
-
831  {
-
832  ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
-
833  (void)ina219_deinit(&gs_handle);
-
834 
-
835  return 1;
-
836  }
-
837  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_11_BIT_1_SAMPLES ? "ok" : "error");
-
838 
-
839  /* 12 bit 1 sample */
- -
841  if (res != 0)
-
842  {
-
843  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
844  (void)ina219_deinit(&gs_handle);
-
845 
-
846  return 1;
-
847  }
-
848  ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 1 sample.\n");
-
849  res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
-
850  if (res != 0)
-
851  {
-
852  ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
-
853  (void)ina219_deinit(&gs_handle);
-
854 
-
855  return 1;
-
856  }
-
857  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_1_SAMPLES ? "ok" : "error");
-
858 
-
859  /* 12 bit 2 sample */
- -
861  if (res != 0)
-
862  {
-
863  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
864  (void)ina219_deinit(&gs_handle);
-
865 
-
866  return 1;
-
867  }
-
868  ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 2 sample.\n");
-
869  res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
-
870  if (res != 0)
-
871  {
-
872  ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
-
873  (void)ina219_deinit(&gs_handle);
-
874 
-
875  return 1;
-
876  }
-
877  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_2_SAMPLES ? "ok" : "error");
-
878 
-
879  /* 12 bit 4 sample */
- -
881  if (res != 0)
-
882  {
-
883  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
884  (void)ina219_deinit(&gs_handle);
-
885 
-
886  return 1;
-
887  }
-
888  ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 4 sample.\n");
-
889  res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
-
890  if (res != 0)
-
891  {
-
892  ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
-
893  (void)ina219_deinit(&gs_handle);
-
894 
-
895  return 1;
-
896  }
-
897  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_4_SAMPLES ? "ok" : "error");
-
898 
-
899  /* 12 bit 8 sample */
- -
901  if (res != 0)
-
902  {
-
903  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
904  (void)ina219_deinit(&gs_handle);
-
905 
-
906  return 1;
-
907  }
-
908  ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 8 sample.\n");
-
909  res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
-
910  if (res != 0)
-
911  {
-
912  ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
-
913  (void)ina219_deinit(&gs_handle);
-
914 
-
915  return 1;
-
916  }
-
917  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_8_SAMPLES ? "ok" : "error");
-
918 
-
919  /* 12 bit 16 sample */
- -
921  if (res != 0)
-
922  {
-
923  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
924  (void)ina219_deinit(&gs_handle);
-
925 
-
926  return 1;
-
927  }
-
928  ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 16 sample.\n");
-
929  res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
-
930  if (res != 0)
-
931  {
-
932  ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
-
933  (void)ina219_deinit(&gs_handle);
-
934 
-
935  return 1;
-
936  }
-
937  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_16_SAMPLES ? "ok" : "error");
-
938 
-
939  /* 12 bit 32 sample */
- -
941  if (res != 0)
-
942  {
-
943  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
944  (void)ina219_deinit(&gs_handle);
-
945 
-
946  return 1;
-
947  }
-
948  ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 32 sample.\n");
-
949  res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
-
950  if (res != 0)
-
951  {
-
952  ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
-
953  (void)ina219_deinit(&gs_handle);
-
954 
-
955  return 1;
-
956  }
-
957  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_32_SAMPLES ? "ok" : "error");
-
958 
-
959  /* 12 bit 64 sample */
- -
961  if (res != 0)
-
962  {
-
963  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
964  (void)ina219_deinit(&gs_handle);
-
965 
-
966  return 1;
-
967  }
-
968  ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 64 sample.\n");
-
969  res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
-
970  if (res != 0)
-
971  {
-
972  ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
-
973  (void)ina219_deinit(&gs_handle);
-
974 
-
975  return 1;
-
976  }
-
977  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_64_SAMPLES ? "ok" : "error");
-
978 
-
979  /* 12 bit 128 sample */
- -
981  if (res != 0)
-
982  {
-
983  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
984  (void)ina219_deinit(&gs_handle);
-
985 
-
986  return 1;
-
987  }
-
988  ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 128 sample.\n");
-
989  res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
-
990  if (res != 0)
-
991  {
-
992  ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
-
993  (void)ina219_deinit(&gs_handle);
-
994 
-
995  return 1;
-
996  }
-
997  ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_128_SAMPLES ? "ok" : "error");
-
998 
-
999  /* ina219_set_mode/ina219_get_mode test */
-
1000  ina219_interface_debug_print("ina219: ina219_set_mode/ina219_get_mode test.\n");
-
1001 
-
1002  /* set power down */
-
1003  res = ina219_set_mode(&gs_handle, INA219_MODE_POWER_DOWN);
-
1004  if (res != 0)
-
1005  {
-
1006  ina219_interface_debug_print("ina219: set mode failed.\n");
-
1007  (void)ina219_deinit(&gs_handle);
-
1008 
-
1009  return 1;
-
1010  }
-
1011  ina219_interface_debug_print("ina219: set power down mode.\n");
-
1012  res = ina219_get_mode(&gs_handle, &chip_mode);
-
1013  if (res != 0)
-
1014  {
-
1015  ina219_interface_debug_print("ina219: get mode failed.\n");
-
1016  (void)ina219_deinit(&gs_handle);
-
1017 
-
1018  return 1;
-
1019  }
-
1020  ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_POWER_DOWN ? "ok" : "error");
-
1021 
-
1022  /* set adc off */
-
1023  res = ina219_set_mode(&gs_handle, INA219_MODE_ADC_OFF);
-
1024  if (res != 0)
-
1025  {
-
1026  ina219_interface_debug_print("ina219: set mode failed.\n");
-
1027  (void)ina219_deinit(&gs_handle);
-
1028 
-
1029  return 1;
-
1030  }
-
1031  ina219_interface_debug_print("ina219: set adc off mode.\n");
-
1032  res = ina219_get_mode(&gs_handle, &chip_mode);
-
1033  if (res != 0)
-
1034  {
-
1035  ina219_interface_debug_print("ina219: get mode failed.\n");
-
1036  (void)ina219_deinit(&gs_handle);
-
1037 
-
1038  return 1;
-
1039  }
-
1040  ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_ADC_OFF ? "ok" : "error");
-
1041 
-
1042  /* set shunt voltage continuous */
- -
1044  if (res != 0)
-
1045  {
-
1046  ina219_interface_debug_print("ina219: set mode failed.\n");
-
1047  (void)ina219_deinit(&gs_handle);
-
1048 
-
1049  return 1;
-
1050  }
-
1051  ina219_interface_debug_print("ina219: set shunt voltage continuous mode.\n");
-
1052  res = ina219_get_mode(&gs_handle, &chip_mode);
-
1053  if (res != 0)
-
1054  {
-
1055  ina219_interface_debug_print("ina219: get mode failed.\n");
-
1056  (void)ina219_deinit(&gs_handle);
-
1057 
-
1058  return 1;
-
1059  }
-
1060  ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_SHUNT_VOLTAGE_CONTINUOUS ? "ok" : "error");
-
1061 
-
1062  /* set bus voltage continuous */
- -
1064  if (res != 0)
-
1065  {
-
1066  ina219_interface_debug_print("ina219: set mode failed.\n");
-
1067  (void)ina219_deinit(&gs_handle);
-
1068 
-
1069  return 1;
-
1070  }
-
1071  ina219_interface_debug_print("ina219: set bus voltage continuous mode.\n");
-
1072  res = ina219_get_mode(&gs_handle, &chip_mode);
-
1073  if (res != 0)
-
1074  {
-
1075  ina219_interface_debug_print("ina219: get mode failed.\n");
-
1076  (void)ina219_deinit(&gs_handle);
-
1077 
-
1078  return 1;
-
1079  }
-
1080  ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_BUS_VOLTAGE_CONTINUOUS ? "ok" : "error");
-
1081 
-
1082  /* set shunt bus voltage continuous */
- -
1084  if (res != 0)
-
1085  {
-
1086  ina219_interface_debug_print("ina219: set mode failed.\n");
-
1087  (void)ina219_deinit(&gs_handle);
-
1088 
-
1089  return 1;
-
1090  }
-
1091  ina219_interface_debug_print("ina219: set shunt bus voltage continuous mode.\n");
-
1092  res = ina219_get_mode(&gs_handle, &chip_mode);
-
1093  if (res != 0)
-
1094  {
-
1095  ina219_interface_debug_print("ina219: get mode failed.\n");
-
1096  (void)ina219_deinit(&gs_handle);
-
1097 
-
1098  return 1;
-
1099  }
-
1100  ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS ? "ok" : "error");
-
1101 
-
1102  /* set shunt voltage triggered */
- -
1104  if (res != 0)
-
1105  {
-
1106  ina219_interface_debug_print("ina219: set mode failed.\n");
-
1107  (void)ina219_deinit(&gs_handle);
-
1108 
-
1109  return 1;
-
1110  }
-
1111  ina219_interface_debug_print("ina219: set shunt voltage triggered mode.\n");
-
1112  res = ina219_get_mode(&gs_handle, &chip_mode);
-
1113  if (res != 0)
-
1114  {
-
1115  ina219_interface_debug_print("ina219: get mode failed.\n");
-
1116  (void)ina219_deinit(&gs_handle);
-
1117 
-
1118  return 1;
-
1119  }
-
1120  ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_SHUNT_VOLTAGE_TRIGGERED ? "ok" : "error");
-
1121 
-
1122  /* set bus voltage triggered */
- -
1124  if (res != 0)
-
1125  {
-
1126  ina219_interface_debug_print("ina219: set mode failed.\n");
-
1127  (void)ina219_deinit(&gs_handle);
-
1128 
-
1129  return 1;
-
1130  }
-
1131  ina219_interface_debug_print("ina219: set bus voltage triggered mode.\n");
-
1132  res = ina219_get_mode(&gs_handle, &chip_mode);
-
1133  if (res != 0)
-
1134  {
-
1135  ina219_interface_debug_print("ina219: get mode failed.\n");
-
1136  (void)ina219_deinit(&gs_handle);
-
1137 
-
1138  return 1;
-
1139  }
-
1140  ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_BUS_VOLTAGE_TRIGGERED ? "ok" : "error");
-
1141 
-
1142  /* set shunt bus voltage triggered */
- -
1144  if (res != 0)
-
1145  {
-
1146  ina219_interface_debug_print("ina219: set mode failed.\n");
-
1147  (void)ina219_deinit(&gs_handle);
-
1148 
-
1149  return 1;
-
1150  }
-
1151  ina219_interface_debug_print("ina219: set shunt bus voltage triggered mode.\n");
-
1152  res = ina219_get_mode(&gs_handle, &chip_mode);
-
1153  if (res != 0)
-
1154  {
-
1155  ina219_interface_debug_print("ina219: get mode failed.\n");
-
1156  (void)ina219_deinit(&gs_handle);
-
1157 
-
1158  return 1;
-
1159  }
-
1160  ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED ? "ok" : "error");
-
1161 
-
1162  /* ina219_calculate_calibration test */
-
1163  ina219_interface_debug_print("ina219: ina219_calculate_calibration test.\n");
-
1164 
-
1165  /* set pga 40 mV */
-
1166  res = ina219_set_pga(&gs_handle, INA219_PGA_40_MV);
-
1167  if (res != 0)
-
1168  {
-
1169  ina219_interface_debug_print("ina219: set pga failed.\n");
-
1170  (void)ina219_deinit(&gs_handle);
-
1171 
-
1172  return 1;
-
1173  }
-
1174  ina219_interface_debug_print("ina219: set pga 40 mV.\n");
-
1175  res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&data_check);
-
1176  if (res != 0)
-
1177  {
-
1178  ina219_interface_debug_print("ina219: calculate calibration failed.\n");
-
1179  (void)ina219_deinit(&gs_handle);
-
1180 
-
1181  return 1;
-
1182  }
-
1183  ina219_interface_debug_print("ina219: calculate calibration %d.\n", data_check);
-
1184 
-
1185  /* set pga 80 mV */
-
1186  res = ina219_set_pga(&gs_handle, INA219_PGA_80_MV);
-
1187  if (res != 0)
-
1188  {
-
1189  ina219_interface_debug_print("ina219: set pga failed.\n");
-
1190  (void)ina219_deinit(&gs_handle);
-
1191 
-
1192  return 1;
-
1193  }
-
1194  ina219_interface_debug_print("ina219: set pga 80 mV.\n");
-
1195  res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&data_check);
-
1196  if (res != 0)
-
1197  {
-
1198  ina219_interface_debug_print("ina219: calculate calibration failed.\n");
-
1199  (void)ina219_deinit(&gs_handle);
-
1200 
-
1201  return 1;
-
1202  }
-
1203  ina219_interface_debug_print("ina219: calculate calibration %d.\n", data_check);
-
1204 
-
1205  /* set pga 160 mV */
-
1206  res = ina219_set_pga(&gs_handle, INA219_PGA_160_MV);
-
1207  if (res != 0)
-
1208  {
-
1209  ina219_interface_debug_print("ina219: set pga failed.\n");
-
1210  (void)ina219_deinit(&gs_handle);
-
1211 
-
1212  return 1;
-
1213  }
-
1214  ina219_interface_debug_print("ina219: set pga 160 mV.\n");
-
1215  res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&data_check);
-
1216  if (res != 0)
-
1217  {
-
1218  ina219_interface_debug_print("ina219: calculate calibration failed.\n");
-
1219  (void)ina219_deinit(&gs_handle);
-
1220 
-
1221  return 1;
-
1222  }
-
1223  ina219_interface_debug_print("ina219: calculate calibration %d.\n", data_check);
-
1224 
-
1225  /* set pga 320 mV */
-
1226  res = ina219_set_pga(&gs_handle, INA219_PGA_320_MV);
-
1227  if (res != 0)
-
1228  {
-
1229  ina219_interface_debug_print("ina219: set pga failed.\n");
-
1230  (void)ina219_deinit(&gs_handle);
-
1231 
-
1232  return 1;
-
1233  }
-
1234  ina219_interface_debug_print("ina219: set pga 320 mV.\n");
-
1235  res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&data_check);
-
1236  if (res != 0)
-
1237  {
-
1238  ina219_interface_debug_print("ina219: calculate calibration failed.\n");
-
1239  (void)ina219_deinit(&gs_handle);
-
1240 
-
1241  return 1;
-
1242  }
-
1243  ina219_interface_debug_print("ina219: calculate calibration %d.\n", data_check);
-
1244 
-
1245  /* ina219_set_calibration/ina219_get_calibration test */
-
1246  ina219_interface_debug_print("ina219: ina219_set_calibration/ina219_get_calibration test.\n");
-
1247 
-
1248  data = rand() % 65536;
-
1249  res = ina219_set_calibration(&gs_handle, data);
-
1250  if (res != 0)
-
1251  {
-
1252  ina219_interface_debug_print("ina219: set calibration failed.\n");
-
1253  (void)ina219_deinit(&gs_handle);
-
1254 
-
1255  return 1;
-
1256  }
-
1257  ina219_interface_debug_print("ina219: set calibration %d.\n", data);
-
1258  res = ina219_get_calibration(&gs_handle, (uint16_t *)&data_check);
-
1259  if (res != 0)
-
1260  {
-
1261  ina219_interface_debug_print("ina219: get calibration failed.\n");
-
1262  (void)ina219_deinit(&gs_handle);
-
1263 
-
1264  return 1;
-
1265  }
-
1266  ina219_interface_debug_print("ina219: check calibration %s.\n", data == data_check ? "ok" : "error");
-
1267 
-
1268  /* ina219_soft_reset test */
-
1269  ina219_interface_debug_print("ina219: ina219_soft_reset test.\n");
-
1270 
-
1271  res = ina219_soft_reset(&gs_handle);
-
1272  if (res != 0)
-
1273  {
-
1274  ina219_interface_debug_print("ina219: soft reset failed.\n");
-
1275  (void)ina219_deinit(&gs_handle);
-
1276 
-
1277  return 1;
-
1278  }
-
1279 
-
1280  /* finish register test */
-
1281  (void)ina219_deinit(&gs_handle);
-
1282  ina219_interface_debug_print("ina219: finish register test.\n");
-
1283 
-
1284  return 0;
-
1285 }
+Go to the documentation of this file.
1
+
36
+ +
38#include <stdlib.h>
+
39
+
40static ina219_handle_t gs_handle;
+
41
+
+ +
51{
+
52 uint8_t res;
+
53 double r, r_check;
+
54 uint16_t data, data_check;
+
55 ina219_info_t info;
+ + +
58 ina219_pga_t pga;
+ +
60 ina219_mode_t chip_mode;
+
61
+
62 /* link interface function */
+ + + + + + + +
70
+
71 /* get information */
+
72 res = ina219_info(&info);
+
73 if (res != 0)
+
74 {
+
75 ina219_interface_debug_print("ina219: get info failed.\n");
+
76
+
77 return 1;
+
78 }
+
79 else
+
80 {
+
81 /* print chip info */
+
82 ina219_interface_debug_print("ina219: chip is %s.\n", info.chip_name);
+
83 ina219_interface_debug_print("ina219: manufacturer is %s.\n", info.manufacturer_name);
+
84 ina219_interface_debug_print("ina219: interface is %s.\n", info.interface);
+
85 ina219_interface_debug_print("ina219: driver version is %d.%d.\n", info.driver_version / 1000, (info.driver_version % 1000) / 100);
+
86 ina219_interface_debug_print("ina219: min supply voltage is %0.1fV.\n", info.supply_voltage_min_v);
+
87 ina219_interface_debug_print("ina219: max supply voltage is %0.1fV.\n", info.supply_voltage_max_v);
+
88 ina219_interface_debug_print("ina219: max current is %0.2fmA.\n", info.max_current_ma);
+
89 ina219_interface_debug_print("ina219: max temperature is %0.1fC.\n", info.temperature_max);
+
90 ina219_interface_debug_print("ina219: min temperature is %0.1fC.\n", info.temperature_min);
+
91 }
+
92
+
93 /* start register test */
+
94 ina219_interface_debug_print("ina219: start register test.\n");
+
95
+
96 /* ina219_set_addr_pin/ina219_get_addr_pin test */
+
97 ina219_interface_debug_print("ina219: ina219_set_addr_pin/ina219_get_addr_pin test.\n");
+
98
+
99 /* set address 0 */
+
100 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_0);
+
101 if (res != 0)
+
102 {
+
103 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
104
+
105 return 1;
+
106 }
+
107 ina219_interface_debug_print("ina219: set addr pin 0.\n");
+
108 res = ina219_get_addr_pin(&gs_handle, &addr);
+
109 if (res != 0)
+
110 {
+
111 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
112
+
113 return 1;
+
114 }
+
115 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_0 ? "ok" : "error");
+
116
+
117 /* set address 1 */
+
118 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_1);
+
119 if (res != 0)
+
120 {
+
121 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
122
+
123 return 1;
+
124 }
+
125 ina219_interface_debug_print("ina219: set addr pin 1.\n");
+
126 res = ina219_get_addr_pin(&gs_handle, &addr);
+
127 if (res != 0)
+
128 {
+
129 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
130
+
131 return 1;
+
132 }
+
133 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_1 ? "ok" : "error");
+
134
+
135 /* set address 2 */
+
136 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_2);
+
137 if (res != 0)
+
138 {
+
139 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
140
+
141 return 1;
+
142 }
+
143 ina219_interface_debug_print("ina219: set addr pin 2.\n");
+
144 res = ina219_get_addr_pin(&gs_handle, &addr);
+
145 if (res != 0)
+
146 {
+
147 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
148
+
149 return 1;
+
150 }
+
151 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_2 ? "ok" : "error");
+
152
+
153 /* set address 3 */
+
154 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_3);
+
155 if (res != 0)
+
156 {
+
157 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
158
+
159 return 1;
+
160 }
+
161 ina219_interface_debug_print("ina219: set addr pin 3.\n");
+
162 res = ina219_get_addr_pin(&gs_handle, &addr);
+
163 if (res != 0)
+
164 {
+
165 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
166
+
167 return 1;
+
168 }
+
169 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_3 ? "ok" : "error");
+
170
+
171 /* set address 4 */
+
172 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_4);
+
173 if (res != 0)
+
174 {
+
175 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
176
+
177 return 1;
+
178 }
+
179 ina219_interface_debug_print("ina219: set addr pin 4.\n");
+
180 res = ina219_get_addr_pin(&gs_handle, &addr);
+
181 if (res != 0)
+
182 {
+
183 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
184
+
185 return 1;
+
186 }
+
187 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_4 ? "ok" : "error");
+
188
+
189 /* set address 5 */
+
190 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_5);
+
191 if (res != 0)
+
192 {
+
193 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
194
+
195 return 1;
+
196 }
+
197 ina219_interface_debug_print("ina219: set addr pin 5.\n");
+
198 res = ina219_get_addr_pin(&gs_handle, &addr);
+
199 if (res != 0)
+
200 {
+
201 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
202
+
203 return 1;
+
204 }
+
205 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_5 ? "ok" : "error");
+
206
+
207 /* set address 6 */
+
208 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_6);
+
209 if (res != 0)
+
210 {
+
211 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
212
+
213 return 1;
+
214 }
+
215 ina219_interface_debug_print("ina219: set addr pin 6.\n");
+
216 res = ina219_get_addr_pin(&gs_handle, &addr);
+
217 if (res != 0)
+
218 {
+
219 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
220
+
221 return 1;
+
222 }
+
223 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_6 ? "ok" : "error");
+
224
+
225 /* set address 7 */
+
226 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_7);
+
227 if (res != 0)
+
228 {
+
229 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
230
+
231 return 1;
+
232 }
+
233 ina219_interface_debug_print("ina219: set addr pin 7.\n");
+
234 res = ina219_get_addr_pin(&gs_handle, &addr);
+
235 if (res != 0)
+
236 {
+
237 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
238
+
239 return 1;
+
240 }
+
241 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_7 ? "ok" : "error");
+
242
+
243 /* set address 8 */
+
244 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_8);
+
245 if (res != 0)
+
246 {
+
247 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
248
+
249 return 1;
+
250 }
+
251 ina219_interface_debug_print("ina219: set addr pin 8.\n");
+
252 res = ina219_get_addr_pin(&gs_handle, &addr);
+
253 if (res != 0)
+
254 {
+
255 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
256
+
257 return 1;
+
258 }
+
259 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_8 ? "ok" : "error");
+
260
+
261 /* set address 9 */
+
262 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_9);
+
263 if (res != 0)
+
264 {
+
265 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
266
+
267 return 1;
+
268 }
+
269 ina219_interface_debug_print("ina219: set addr pin 9.\n");
+
270 res = ina219_get_addr_pin(&gs_handle, &addr);
+
271 if (res != 0)
+
272 {
+
273 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
274
+
275 return 1;
+
276 }
+
277 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_9 ? "ok" : "error");
+
278
+
279 /* set address 10 */
+
280 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_A);
+
281 if (res != 0)
+
282 {
+
283 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
284
+
285 return 1;
+
286 }
+
287 ina219_interface_debug_print("ina219: set addr pin 10.\n");
+
288 res = ina219_get_addr_pin(&gs_handle, &addr);
+
289 if (res != 0)
+
290 {
+
291 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
292
+
293 return 1;
+
294 }
+
295 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_A ? "ok" : "error");
+
296
+
297 /* set address 11 */
+
298 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_B);
+
299 if (res != 0)
+
300 {
+
301 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
302
+
303 return 1;
+
304 }
+
305 ina219_interface_debug_print("ina219: set addr pin 11.\n");
+
306 res = ina219_get_addr_pin(&gs_handle, &addr);
+
307 if (res != 0)
+
308 {
+
309 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
310
+
311 return 1;
+
312 }
+
313 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_B ? "ok" : "error");
+
314
+
315 /* set address 12 */
+
316 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_C);
+
317 if (res != 0)
+
318 {
+
319 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
320
+
321 return 1;
+
322 }
+
323 ina219_interface_debug_print("ina219: set addr pin 12.\n");
+
324 res = ina219_get_addr_pin(&gs_handle, &addr);
+
325 if (res != 0)
+
326 {
+
327 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
328
+
329 return 1;
+
330 }
+
331 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_C ? "ok" : "error");
+
332
+
333 /* set address 13 */
+
334 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_D);
+
335 if (res != 0)
+
336 {
+
337 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
338
+
339 return 1;
+
340 }
+
341 ina219_interface_debug_print("ina219: set addr pin 13.\n");
+
342 res = ina219_get_addr_pin(&gs_handle, &addr);
+
343 if (res != 0)
+
344 {
+
345 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
346
+
347 return 1;
+
348 }
+
349 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_D ? "ok" : "error");
+
350
+
351 /* set address 14 */
+
352 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_E);
+
353 if (res != 0)
+
354 {
+
355 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
356
+
357 return 1;
+
358 }
+
359 ina219_interface_debug_print("ina219: set addr pin 14.\n");
+
360 res = ina219_get_addr_pin(&gs_handle, &addr);
+
361 if (res != 0)
+
362 {
+
363 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
364
+
365 return 1;
+
366 }
+
367 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_E ? "ok" : "error");
+
368
+
369 /* set address 15 */
+
370 res = ina219_set_addr_pin(&gs_handle, INA219_ADDRESS_F);
+
371 if (res != 0)
+
372 {
+
373 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
374
+
375 return 1;
+
376 }
+
377 ina219_interface_debug_print("ina219: set addr pin 15.\n");
+
378 res = ina219_get_addr_pin(&gs_handle, &addr);
+
379 if (res != 0)
+
380 {
+
381 ina219_interface_debug_print("ina219: get addr pin failed.\n");
+
382
+
383 return 1;
+
384 }
+
385 ina219_interface_debug_print("ina219: check addr pin %s.\n", addr == INA219_ADDRESS_F ? "ok" : "error");
+
386
+
387 /* ina219_set_resistance/ina219_get_resistance test */
+
388 ina219_interface_debug_print("ina219: ina219_set_resistance/ina219_get_resistance test.\n");
+
389
+
390 /* generate the r */
+
391 r = (double)(rand() % 100) / 1000.0;
+
392 res = ina219_set_resistance(&gs_handle, r);
+
393 if (res != 0)
+
394 {
+
395 ina219_interface_debug_print("ina219: set resistance failed.\n");
+
396
+
397 return 1;
+
398 }
+
399 ina219_interface_debug_print("ina219: set resistance %f.\n", r);
+
400 res = ina219_get_resistance(&gs_handle, (double *)&r_check);
+
401 if (res != 0)
+
402 {
+
403 ina219_interface_debug_print("ina219: get resistance failed.\n");
+
404
+
405 return 1;
+
406 }
+
407 ina219_interface_debug_print("ina219: check resistance %f.\n", r_check);
+
408
+
409 /* set addr pin */
+
410 res = ina219_set_addr_pin(&gs_handle, addr_pin);
+
411 if (res != 0)
+
412 {
+
413 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
414
+
415 return 1;
+
416 }
+
417
+
418 /* init */
+
419 res = ina219_init(&gs_handle);
+
420 if (res != 0)
+
421 {
+
422 ina219_interface_debug_print("ina219: init failed.\n");
+
423
+
424 return 1;
+
425 }
+
426
+
427 /* ina219_set_bus_voltage_range/ina219_get_bus_voltage_range test */
+
428 ina219_interface_debug_print("ina219: ina219_set_bus_voltage_range/ina219_get_bus_voltage_range test.\n");
+
429
+
430 /* set bus voltage range 16V */
+ +
432 if (res != 0)
+
433 {
+
434 ina219_interface_debug_print("ina219: set bus voltage range failed.\n");
+
435 (void)ina219_deinit(&gs_handle);
+
436
+
437 return 1;
+
438 }
+
439 ina219_interface_debug_print("ina219: set bus voltage range 16V.\n");
+
440 res = ina219_get_bus_voltage_range(&gs_handle, &range);
+
441 if (res != 0)
+
442 {
+
443 ina219_interface_debug_print("ina219: get bus voltage range failed.\n");
+
444 (void)ina219_deinit(&gs_handle);
+
445
+
446 return 1;
+
447 }
+
448 ina219_interface_debug_print("ina219: check bus voltage range %s.\n", range == INA219_BUS_VOLTAGE_RANGE_16V ? "ok" : "error");
+
449
+
450 /* set bus voltage range 32V */
+ +
452 if (res != 0)
+
453 {
+
454 ina219_interface_debug_print("ina219: set bus voltage range failed.\n");
+
455 (void)ina219_deinit(&gs_handle);
+
456
+
457 return 1;
+
458 }
+
459 ina219_interface_debug_print("ina219: set bus voltage range 32V.\n");
+
460 res = ina219_get_bus_voltage_range(&gs_handle, &range);
+
461 if (res != 0)
+
462 {
+
463 ina219_interface_debug_print("ina219: get bus voltage range failed.\n");
+
464 (void)ina219_deinit(&gs_handle);
+
465
+
466 return 1;
+
467 }
+
468 ina219_interface_debug_print("ina219: check bus voltage range %s.\n", range == INA219_BUS_VOLTAGE_RANGE_32V ? "ok" : "error");
+
469
+
470 /* ina219_set_pga/ina219_get_pga test */
+
471 ina219_interface_debug_print("ina219: ina219_set_pga/ina219_get_pga test.\n");
+
472
+
473 /* set 40 mV */
+
474 res = ina219_set_pga(&gs_handle, INA219_PGA_40_MV);
+
475 if (res != 0)
+
476 {
+
477 ina219_interface_debug_print("ina219: set pga failed.\n");
+
478 (void)ina219_deinit(&gs_handle);
+
479
+
480 return 1;
+
481 }
+
482 ina219_interface_debug_print("ina219: set pga 40 mV.\n");
+
483 res = ina219_get_pga(&gs_handle, &pga);
+
484 if (res != 0)
+
485 {
+
486 ina219_interface_debug_print("ina219: get pga failed.\n");
+
487 (void)ina219_deinit(&gs_handle);
+
488
+
489 return 1;
+
490 }
+
491 ina219_interface_debug_print("ina219: check pga %s.\n", pga == INA219_PGA_40_MV ? "ok" : "error");
+
492
+
493 /* set 80 mV */
+
494 res = ina219_set_pga(&gs_handle, INA219_PGA_80_MV);
+
495 if (res != 0)
+
496 {
+
497 ina219_interface_debug_print("ina219: set pga failed.\n");
+
498 (void)ina219_deinit(&gs_handle);
+
499
+
500 return 1;
+
501 }
+
502 ina219_interface_debug_print("ina219: set pga 80 mV.\n");
+
503 res = ina219_get_pga(&gs_handle, &pga);
+
504 if (res != 0)
+
505 {
+
506 ina219_interface_debug_print("ina219: get pga failed.\n");
+
507 (void)ina219_deinit(&gs_handle);
+
508
+
509 return 1;
+
510 }
+
511 ina219_interface_debug_print("ina219: check pga %s.\n", pga == INA219_PGA_80_MV ? "ok" : "error");
+
512
+
513 /* set 160 mV */
+
514 res = ina219_set_pga(&gs_handle, INA219_PGA_160_MV);
+
515 if (res != 0)
+
516 {
+
517 ina219_interface_debug_print("ina219: set pga failed.\n");
+
518 (void)ina219_deinit(&gs_handle);
+
519
+
520 return 1;
+
521 }
+
522 ina219_interface_debug_print("ina219: set pga 160 mV.\n");
+
523 res = ina219_get_pga(&gs_handle, &pga);
+
524 if (res != 0)
+
525 {
+
526 ina219_interface_debug_print("ina219: get pga failed.\n");
+
527 (void)ina219_deinit(&gs_handle);
+
528
+
529 return 1;
+
530 }
+
531 ina219_interface_debug_print("ina219: check pga %s.\n", pga == INA219_PGA_160_MV ? "ok" : "error");
+
532
+
533 /* set 320 mV */
+
534 res = ina219_set_pga(&gs_handle, INA219_PGA_320_MV);
+
535 if (res != 0)
+
536 {
+
537 ina219_interface_debug_print("ina219: set pga failed.\n");
+
538 (void)ina219_deinit(&gs_handle);
+
539
+
540 return 1;
+
541 }
+
542 ina219_interface_debug_print("ina219: set pga 320 mV.\n");
+
543 res = ina219_get_pga(&gs_handle, &pga);
+
544 if (res != 0)
+
545 {
+
546 ina219_interface_debug_print("ina219: get pga failed.\n");
+
547 (void)ina219_deinit(&gs_handle);
+
548
+
549 return 1;
+
550 }
+
551 ina219_interface_debug_print("ina219: check pga %s.\n", pga == INA219_PGA_320_MV ? "ok" : "error");
+
552
+
553 /* ina219_set_bus_voltage_adc_mode/ina219_get_bus_voltage_adc_mode test */
+
554 ina219_interface_debug_print("ina219: ina219_set_bus_voltage_adc_mode/ina219_get_bus_voltage_adc_mode test.\n");
+
555
+
556 /* 9 bit 1 sample */
+ +
558 if (res != 0)
+
559 {
+
560 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
561 (void)ina219_deinit(&gs_handle);
+
562
+
563 return 1;
+
564 }
+
565 ina219_interface_debug_print("ina219: set bus voltage adc mode 9 bit 1 sample.\n");
+
566 res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
+
567 if (res != 0)
+
568 {
+
569 ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
+
570 (void)ina219_deinit(&gs_handle);
+
571
+
572 return 1;
+
573 }
+
574 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_9_BIT_1_SAMPLES ? "ok" : "error");
+
575
+
576 /* 10 bit 1 sample */
+ +
578 if (res != 0)
+
579 {
+
580 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
581 (void)ina219_deinit(&gs_handle);
+
582
+
583 return 1;
+
584 }
+
585 ina219_interface_debug_print("ina219: set bus voltage adc mode 10 bit 1 sample.\n");
+
586 res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
+
587 if (res != 0)
+
588 {
+
589 ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
+
590 (void)ina219_deinit(&gs_handle);
+
591
+
592 return 1;
+
593 }
+
594 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_10_BIT_1_SAMPLES ? "ok" : "error");
+
595
+
596 /* 11 bit 1 sample */
+ +
598 if (res != 0)
+
599 {
+
600 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
601 (void)ina219_deinit(&gs_handle);
+
602
+
603 return 1;
+
604 }
+
605 ina219_interface_debug_print("ina219: set bus voltage adc mode 11 bit 1 sample.\n");
+
606 res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
+
607 if (res != 0)
+
608 {
+
609 ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
+
610 (void)ina219_deinit(&gs_handle);
+
611
+
612 return 1;
+
613 }
+
614 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_11_BIT_1_SAMPLES ? "ok" : "error");
+
615
+
616 /* 12 bit 1 sample */
+ +
618 if (res != 0)
+
619 {
+
620 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
621 (void)ina219_deinit(&gs_handle);
+
622
+
623 return 1;
+
624 }
+
625 ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 1 sample.\n");
+
626 res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
+
627 if (res != 0)
+
628 {
+
629 ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
+
630 (void)ina219_deinit(&gs_handle);
+
631
+
632 return 1;
+
633 }
+
634 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_1_SAMPLES ? "ok" : "error");
+
635
+
636 /* 12 bit 2 sample */
+ +
638 if (res != 0)
+
639 {
+
640 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
641 (void)ina219_deinit(&gs_handle);
+
642
+
643 return 1;
+
644 }
+
645 ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 2 sample.\n");
+
646 res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
+
647 if (res != 0)
+
648 {
+
649 ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
+
650 (void)ina219_deinit(&gs_handle);
+
651
+
652 return 1;
+
653 }
+
654 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_2_SAMPLES ? "ok" : "error");
+
655
+
656 /* 12 bit 4 sample */
+ +
658 if (res != 0)
+
659 {
+
660 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
661 (void)ina219_deinit(&gs_handle);
+
662
+
663 return 1;
+
664 }
+
665 ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 4 sample.\n");
+
666 res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
+
667 if (res != 0)
+
668 {
+
669 ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
+
670 (void)ina219_deinit(&gs_handle);
+
671
+
672 return 1;
+
673 }
+
674 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_4_SAMPLES ? "ok" : "error");
+
675
+
676 /* 12 bit 8 sample */
+ +
678 if (res != 0)
+
679 {
+
680 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
681 (void)ina219_deinit(&gs_handle);
+
682
+
683 return 1;
+
684 }
+
685 ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 8 sample.\n");
+
686 res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
+
687 if (res != 0)
+
688 {
+
689 ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
+
690 (void)ina219_deinit(&gs_handle);
+
691
+
692 return 1;
+
693 }
+
694 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_8_SAMPLES ? "ok" : "error");
+
695
+
696 /* 12 bit 16 sample */
+ +
698 if (res != 0)
+
699 {
+
700 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
701 (void)ina219_deinit(&gs_handle);
+
702
+
703 return 1;
+
704 }
+
705 ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 16 sample.\n");
+
706 res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
+
707 if (res != 0)
+
708 {
+
709 ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
+
710 (void)ina219_deinit(&gs_handle);
+
711
+
712 return 1;
+
713 }
+
714 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_16_SAMPLES ? "ok" : "error");
+
715
+
716 /* 12 bit 32 sample */
+ +
718 if (res != 0)
+
719 {
+
720 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
721 (void)ina219_deinit(&gs_handle);
+
722
+
723 return 1;
+
724 }
+
725 ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 32 sample.\n");
+
726 res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
+
727 if (res != 0)
+
728 {
+
729 ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
+
730 (void)ina219_deinit(&gs_handle);
+
731
+
732 return 1;
+
733 }
+
734 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_32_SAMPLES ? "ok" : "error");
+
735
+
736 /* 12 bit 64 sample */
+ +
738 if (res != 0)
+
739 {
+
740 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
741 (void)ina219_deinit(&gs_handle);
+
742
+
743 return 1;
+
744 }
+
745 ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 64 sample.\n");
+
746 res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
+
747 if (res != 0)
+
748 {
+
749 ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
+
750 (void)ina219_deinit(&gs_handle);
+
751
+
752 return 1;
+
753 }
+
754 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_64_SAMPLES ? "ok" : "error");
+
755
+
756 /* 12 bit 128 sample */
+ +
758 if (res != 0)
+
759 {
+
760 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
761 (void)ina219_deinit(&gs_handle);
+
762
+
763 return 1;
+
764 }
+
765 ina219_interface_debug_print("ina219: set bus voltage adc mode 12 bit 128 sample.\n");
+
766 res = ina219_get_bus_voltage_adc_mode(&gs_handle, &mode);
+
767 if (res != 0)
+
768 {
+
769 ina219_interface_debug_print("ina219: get bus voltage adc mode failed.\n");
+
770 (void)ina219_deinit(&gs_handle);
+
771
+
772 return 1;
+
773 }
+
774 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_128_SAMPLES ? "ok" : "error");
+
775
+
776 /* ina219_set_shunt_voltage_adc_mode/ina219_get_shunt_voltage_adc_mode test */
+
777 ina219_interface_debug_print("ina219: ina219_set_shunt_voltage_adc_mode/ina219_get_shunt_voltage_adc_mode test.\n");
+
778
+
779 /* 9 bit 1 sample */
+ +
781 if (res != 0)
+
782 {
+
783 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
784 (void)ina219_deinit(&gs_handle);
+
785
+
786 return 1;
+
787 }
+
788 ina219_interface_debug_print("ina219: set shunt voltage adc mode 9 bit 1 sample.\n");
+
789 res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
+
790 if (res != 0)
+
791 {
+
792 ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
+
793 (void)ina219_deinit(&gs_handle);
+
794
+
795 return 1;
+
796 }
+
797 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_9_BIT_1_SAMPLES ? "ok" : "error");
+
798
+
799 /* 10 bit 1 sample */
+ +
801 if (res != 0)
+
802 {
+
803 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
804 (void)ina219_deinit(&gs_handle);
+
805
+
806 return 1;
+
807 }
+
808 ina219_interface_debug_print("ina219: set shunt voltage adc mode 10 bit 1 sample.\n");
+
809 res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
+
810 if (res != 0)
+
811 {
+
812 ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
+
813 (void)ina219_deinit(&gs_handle);
+
814
+
815 return 1;
+
816 }
+
817 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_10_BIT_1_SAMPLES ? "ok" : "error");
+
818
+
819 /* 11 bit 1 sample */
+ +
821 if (res != 0)
+
822 {
+
823 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
824 (void)ina219_deinit(&gs_handle);
+
825
+
826 return 1;
+
827 }
+
828 ina219_interface_debug_print("ina219: set shunt voltage adc mode 11 bit 1 sample.\n");
+
829 res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
+
830 if (res != 0)
+
831 {
+
832 ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
+
833 (void)ina219_deinit(&gs_handle);
+
834
+
835 return 1;
+
836 }
+
837 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_11_BIT_1_SAMPLES ? "ok" : "error");
+
838
+
839 /* 12 bit 1 sample */
+ +
841 if (res != 0)
+
842 {
+
843 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
844 (void)ina219_deinit(&gs_handle);
+
845
+
846 return 1;
+
847 }
+
848 ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 1 sample.\n");
+
849 res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
+
850 if (res != 0)
+
851 {
+
852 ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
+
853 (void)ina219_deinit(&gs_handle);
+
854
+
855 return 1;
+
856 }
+
857 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_1_SAMPLES ? "ok" : "error");
+
858
+
859 /* 12 bit 2 sample */
+ +
861 if (res != 0)
+
862 {
+
863 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
864 (void)ina219_deinit(&gs_handle);
+
865
+
866 return 1;
+
867 }
+
868 ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 2 sample.\n");
+
869 res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
+
870 if (res != 0)
+
871 {
+
872 ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
+
873 (void)ina219_deinit(&gs_handle);
+
874
+
875 return 1;
+
876 }
+
877 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_2_SAMPLES ? "ok" : "error");
+
878
+
879 /* 12 bit 4 sample */
+ +
881 if (res != 0)
+
882 {
+
883 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
884 (void)ina219_deinit(&gs_handle);
+
885
+
886 return 1;
+
887 }
+
888 ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 4 sample.\n");
+
889 res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
+
890 if (res != 0)
+
891 {
+
892 ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
+
893 (void)ina219_deinit(&gs_handle);
+
894
+
895 return 1;
+
896 }
+
897 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_4_SAMPLES ? "ok" : "error");
+
898
+
899 /* 12 bit 8 sample */
+ +
901 if (res != 0)
+
902 {
+
903 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
904 (void)ina219_deinit(&gs_handle);
+
905
+
906 return 1;
+
907 }
+
908 ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 8 sample.\n");
+
909 res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
+
910 if (res != 0)
+
911 {
+
912 ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
+
913 (void)ina219_deinit(&gs_handle);
+
914
+
915 return 1;
+
916 }
+
917 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_8_SAMPLES ? "ok" : "error");
+
918
+
919 /* 12 bit 16 sample */
+ +
921 if (res != 0)
+
922 {
+
923 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
924 (void)ina219_deinit(&gs_handle);
+
925
+
926 return 1;
+
927 }
+
928 ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 16 sample.\n");
+
929 res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
+
930 if (res != 0)
+
931 {
+
932 ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
+
933 (void)ina219_deinit(&gs_handle);
+
934
+
935 return 1;
+
936 }
+
937 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_16_SAMPLES ? "ok" : "error");
+
938
+
939 /* 12 bit 32 sample */
+ +
941 if (res != 0)
+
942 {
+
943 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
944 (void)ina219_deinit(&gs_handle);
+
945
+
946 return 1;
+
947 }
+
948 ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 32 sample.\n");
+
949 res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
+
950 if (res != 0)
+
951 {
+
952 ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
+
953 (void)ina219_deinit(&gs_handle);
+
954
+
955 return 1;
+
956 }
+
957 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_32_SAMPLES ? "ok" : "error");
+
958
+
959 /* 12 bit 64 sample */
+ +
961 if (res != 0)
+
962 {
+
963 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
964 (void)ina219_deinit(&gs_handle);
+
965
+
966 return 1;
+
967 }
+
968 ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 64 sample.\n");
+
969 res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
+
970 if (res != 0)
+
971 {
+
972 ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
+
973 (void)ina219_deinit(&gs_handle);
+
974
+
975 return 1;
+
976 }
+
977 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_64_SAMPLES ? "ok" : "error");
+
978
+
979 /* 12 bit 128 sample */
+ +
981 if (res != 0)
+
982 {
+
983 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
984 (void)ina219_deinit(&gs_handle);
+
985
+
986 return 1;
+
987 }
+
988 ina219_interface_debug_print("ina219: set shunt voltage adc mode 12 bit 128 sample.\n");
+
989 res = ina219_get_shunt_voltage_adc_mode(&gs_handle, &mode);
+
990 if (res != 0)
+
991 {
+
992 ina219_interface_debug_print("ina219: get shunt voltage adc mode failed.\n");
+
993 (void)ina219_deinit(&gs_handle);
+
994
+
995 return 1;
+
996 }
+
997 ina219_interface_debug_print("ina219: check adc mode %s.\n", mode == INA219_ADC_MODE_12_BIT_128_SAMPLES ? "ok" : "error");
+
998
+
999 /* ina219_set_mode/ina219_get_mode test */
+
1000 ina219_interface_debug_print("ina219: ina219_set_mode/ina219_get_mode test.\n");
+
1001
+
1002 /* set power down */
+
1003 res = ina219_set_mode(&gs_handle, INA219_MODE_POWER_DOWN);
+
1004 if (res != 0)
+
1005 {
+
1006 ina219_interface_debug_print("ina219: set mode failed.\n");
+
1007 (void)ina219_deinit(&gs_handle);
+
1008
+
1009 return 1;
+
1010 }
+
1011 ina219_interface_debug_print("ina219: set power down mode.\n");
+
1012 res = ina219_get_mode(&gs_handle, &chip_mode);
+
1013 if (res != 0)
+
1014 {
+
1015 ina219_interface_debug_print("ina219: get mode failed.\n");
+
1016 (void)ina219_deinit(&gs_handle);
+
1017
+
1018 return 1;
+
1019 }
+
1020 ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_POWER_DOWN ? "ok" : "error");
+
1021
+
1022 /* set adc off */
+
1023 res = ina219_set_mode(&gs_handle, INA219_MODE_ADC_OFF);
+
1024 if (res != 0)
+
1025 {
+
1026 ina219_interface_debug_print("ina219: set mode failed.\n");
+
1027 (void)ina219_deinit(&gs_handle);
+
1028
+
1029 return 1;
+
1030 }
+
1031 ina219_interface_debug_print("ina219: set adc off mode.\n");
+
1032 res = ina219_get_mode(&gs_handle, &chip_mode);
+
1033 if (res != 0)
+
1034 {
+
1035 ina219_interface_debug_print("ina219: get mode failed.\n");
+
1036 (void)ina219_deinit(&gs_handle);
+
1037
+
1038 return 1;
+
1039 }
+
1040 ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_ADC_OFF ? "ok" : "error");
+
1041
+
1042 /* set shunt voltage continuous */
+ +
1044 if (res != 0)
+
1045 {
+
1046 ina219_interface_debug_print("ina219: set mode failed.\n");
+
1047 (void)ina219_deinit(&gs_handle);
+
1048
+
1049 return 1;
+
1050 }
+
1051 ina219_interface_debug_print("ina219: set shunt voltage continuous mode.\n");
+
1052 res = ina219_get_mode(&gs_handle, &chip_mode);
+
1053 if (res != 0)
+
1054 {
+
1055 ina219_interface_debug_print("ina219: get mode failed.\n");
+
1056 (void)ina219_deinit(&gs_handle);
+
1057
+
1058 return 1;
+
1059 }
+
1060 ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_SHUNT_VOLTAGE_CONTINUOUS ? "ok" : "error");
+
1061
+
1062 /* set bus voltage continuous */
+ +
1064 if (res != 0)
+
1065 {
+
1066 ina219_interface_debug_print("ina219: set mode failed.\n");
+
1067 (void)ina219_deinit(&gs_handle);
+
1068
+
1069 return 1;
+
1070 }
+
1071 ina219_interface_debug_print("ina219: set bus voltage continuous mode.\n");
+
1072 res = ina219_get_mode(&gs_handle, &chip_mode);
+
1073 if (res != 0)
+
1074 {
+
1075 ina219_interface_debug_print("ina219: get mode failed.\n");
+
1076 (void)ina219_deinit(&gs_handle);
+
1077
+
1078 return 1;
+
1079 }
+
1080 ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_BUS_VOLTAGE_CONTINUOUS ? "ok" : "error");
+
1081
+
1082 /* set shunt bus voltage continuous */
+ +
1084 if (res != 0)
+
1085 {
+
1086 ina219_interface_debug_print("ina219: set mode failed.\n");
+
1087 (void)ina219_deinit(&gs_handle);
+
1088
+
1089 return 1;
+
1090 }
+
1091 ina219_interface_debug_print("ina219: set shunt bus voltage continuous mode.\n");
+
1092 res = ina219_get_mode(&gs_handle, &chip_mode);
+
1093 if (res != 0)
+
1094 {
+
1095 ina219_interface_debug_print("ina219: get mode failed.\n");
+
1096 (void)ina219_deinit(&gs_handle);
+
1097
+
1098 return 1;
+
1099 }
+
1100 ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS ? "ok" : "error");
+
1101
+
1102 /* set shunt voltage triggered */
+ +
1104 if (res != 0)
+
1105 {
+
1106 ina219_interface_debug_print("ina219: set mode failed.\n");
+
1107 (void)ina219_deinit(&gs_handle);
+
1108
+
1109 return 1;
+
1110 }
+
1111 ina219_interface_debug_print("ina219: set shunt voltage triggered mode.\n");
+
1112 res = ina219_get_mode(&gs_handle, &chip_mode);
+
1113 if (res != 0)
+
1114 {
+
1115 ina219_interface_debug_print("ina219: get mode failed.\n");
+
1116 (void)ina219_deinit(&gs_handle);
+
1117
+
1118 return 1;
+
1119 }
+
1120 ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_SHUNT_VOLTAGE_TRIGGERED ? "ok" : "error");
+
1121
+
1122 /* set bus voltage triggered */
+ +
1124 if (res != 0)
+
1125 {
+
1126 ina219_interface_debug_print("ina219: set mode failed.\n");
+
1127 (void)ina219_deinit(&gs_handle);
+
1128
+
1129 return 1;
+
1130 }
+
1131 ina219_interface_debug_print("ina219: set bus voltage triggered mode.\n");
+
1132 res = ina219_get_mode(&gs_handle, &chip_mode);
+
1133 if (res != 0)
+
1134 {
+
1135 ina219_interface_debug_print("ina219: get mode failed.\n");
+
1136 (void)ina219_deinit(&gs_handle);
+
1137
+
1138 return 1;
+
1139 }
+
1140 ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_BUS_VOLTAGE_TRIGGERED ? "ok" : "error");
+
1141
+
1142 /* set shunt bus voltage triggered */
+ +
1144 if (res != 0)
+
1145 {
+
1146 ina219_interface_debug_print("ina219: set mode failed.\n");
+
1147 (void)ina219_deinit(&gs_handle);
+
1148
+
1149 return 1;
+
1150 }
+
1151 ina219_interface_debug_print("ina219: set shunt bus voltage triggered mode.\n");
+
1152 res = ina219_get_mode(&gs_handle, &chip_mode);
+
1153 if (res != 0)
+
1154 {
+
1155 ina219_interface_debug_print("ina219: get mode failed.\n");
+
1156 (void)ina219_deinit(&gs_handle);
+
1157
+
1158 return 1;
+
1159 }
+
1160 ina219_interface_debug_print("ina219: check chip mode %s.\n", chip_mode == INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED ? "ok" : "error");
+
1161
+
1162 /* ina219_calculate_calibration test */
+
1163 ina219_interface_debug_print("ina219: ina219_calculate_calibration test.\n");
+
1164
+
1165 /* set pga 40 mV */
+
1166 res = ina219_set_pga(&gs_handle, INA219_PGA_40_MV);
+
1167 if (res != 0)
+
1168 {
+
1169 ina219_interface_debug_print("ina219: set pga failed.\n");
+
1170 (void)ina219_deinit(&gs_handle);
+
1171
+
1172 return 1;
+
1173 }
+
1174 ina219_interface_debug_print("ina219: set pga 40 mV.\n");
+
1175 res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&data_check);
+
1176 if (res != 0)
+
1177 {
+
1178 ina219_interface_debug_print("ina219: calculate calibration failed.\n");
+
1179 (void)ina219_deinit(&gs_handle);
+
1180
+
1181 return 1;
+
1182 }
+
1183 ina219_interface_debug_print("ina219: calculate calibration %d.\n", data_check);
+
1184
+
1185 /* set pga 80 mV */
+
1186 res = ina219_set_pga(&gs_handle, INA219_PGA_80_MV);
+
1187 if (res != 0)
+
1188 {
+
1189 ina219_interface_debug_print("ina219: set pga failed.\n");
+
1190 (void)ina219_deinit(&gs_handle);
+
1191
+
1192 return 1;
+
1193 }
+
1194 ina219_interface_debug_print("ina219: set pga 80 mV.\n");
+
1195 res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&data_check);
+
1196 if (res != 0)
+
1197 {
+
1198 ina219_interface_debug_print("ina219: calculate calibration failed.\n");
+
1199 (void)ina219_deinit(&gs_handle);
+
1200
+
1201 return 1;
+
1202 }
+
1203 ina219_interface_debug_print("ina219: calculate calibration %d.\n", data_check);
+
1204
+
1205 /* set pga 160 mV */
+
1206 res = ina219_set_pga(&gs_handle, INA219_PGA_160_MV);
+
1207 if (res != 0)
+
1208 {
+
1209 ina219_interface_debug_print("ina219: set pga failed.\n");
+
1210 (void)ina219_deinit(&gs_handle);
+
1211
+
1212 return 1;
+
1213 }
+
1214 ina219_interface_debug_print("ina219: set pga 160 mV.\n");
+
1215 res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&data_check);
+
1216 if (res != 0)
+
1217 {
+
1218 ina219_interface_debug_print("ina219: calculate calibration failed.\n");
+
1219 (void)ina219_deinit(&gs_handle);
+
1220
+
1221 return 1;
+
1222 }
+
1223 ina219_interface_debug_print("ina219: calculate calibration %d.\n", data_check);
+
1224
+
1225 /* set pga 320 mV */
+
1226 res = ina219_set_pga(&gs_handle, INA219_PGA_320_MV);
+
1227 if (res != 0)
+
1228 {
+
1229 ina219_interface_debug_print("ina219: set pga failed.\n");
+
1230 (void)ina219_deinit(&gs_handle);
+
1231
+
1232 return 1;
+
1233 }
+
1234 ina219_interface_debug_print("ina219: set pga 320 mV.\n");
+
1235 res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&data_check);
+
1236 if (res != 0)
+
1237 {
+
1238 ina219_interface_debug_print("ina219: calculate calibration failed.\n");
+
1239 (void)ina219_deinit(&gs_handle);
+
1240
+
1241 return 1;
+
1242 }
+
1243 ina219_interface_debug_print("ina219: calculate calibration %d.\n", data_check);
+
1244
+
1245 /* ina219_set_calibration/ina219_get_calibration test */
+
1246 ina219_interface_debug_print("ina219: ina219_set_calibration/ina219_get_calibration test.\n");
+
1247
+
1248 data = rand() % 65536;
+
1249 res = ina219_set_calibration(&gs_handle, data);
+
1250 if (res != 0)
+
1251 {
+
1252 ina219_interface_debug_print("ina219: set calibration failed.\n");
+
1253 (void)ina219_deinit(&gs_handle);
+
1254
+
1255 return 1;
+
1256 }
+
1257 ina219_interface_debug_print("ina219: set calibration %d.\n", data);
+
1258 res = ina219_get_calibration(&gs_handle, (uint16_t *)&data_check);
+
1259 if (res != 0)
+
1260 {
+
1261 ina219_interface_debug_print("ina219: get calibration failed.\n");
+
1262 (void)ina219_deinit(&gs_handle);
+
1263
+
1264 return 1;
+
1265 }
+
1266 ina219_interface_debug_print("ina219: check calibration %s.\n", data == data_check ? "ok" : "error");
+
1267
+
1268 /* ina219_soft_reset test */
+
1269 ina219_interface_debug_print("ina219: ina219_soft_reset test.\n");
+
1270
+
1271 res = ina219_soft_reset(&gs_handle);
+
1272 if (res != 0)
+
1273 {
+
1274 ina219_interface_debug_print("ina219: soft reset failed.\n");
+
1275 (void)ina219_deinit(&gs_handle);
+
1276
+
1277 return 1;
+
1278 }
+
1279
+
1280 /* finish register test */
+
1281 (void)ina219_deinit(&gs_handle);
+
1282 ina219_interface_debug_print("ina219: finish register test.\n");
+
1283
+
1284 return 0;
+
1285}
+
-
uint8_t ina219_get_pga(ina219_handle_t *handle, ina219_pga_t *pga)
get the pga
-
uint8_t ina219_get_resistance(ina219_handle_t *handle, double *resistance)
get the resistance
-
uint8_t ina219_get_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t *range)
get the bus voltage range
-
uint8_t ina219_soft_reset(ina219_handle_t *handle)
soft reset the chip
-
uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin)
set the iic address pin
-
uint8_t ina219_info(ina219_info_t *info)
get chip's information
-
uint8_t ina219_set_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the shunt voltage adc mode
-
uint8_t ina219_get_mode(ina219_handle_t *handle, ina219_mode_t *mode)
get the mode
-
uint8_t ina219_get_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t *mode)
get the bus voltage adc mode
-
ina219_adc_mode_t
ina219 adc mode enumeration definition
-
ina219_pga_t
ina219 pga enumeration definition
Definition: driver_ina219.h:95
-
uint8_t ina219_get_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t *mode)
get the shunt voltage adc mode
-
uint8_t ina219_get_addr_pin(ina219_handle_t *handle, ina219_address_t *addr_pin)
get the iic address pin
-
uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
set the calibration
-
ina219_bus_voltage_range_t
ina219 bus voltage enumeration definition
Definition: driver_ina219.h:86
-
uint8_t ina219_deinit(ina219_handle_t *handle)
close the chip
-
uint8_t ina219_get_calibration(ina219_handle_t *handle, uint16_t *data)
get the calibration
-
uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode)
set the mode
-
uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga)
set the pga
-
uint8_t ina219_set_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t range)
set the bus voltage range
-
uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
calculate the calibration
-
uint8_t ina219_init(ina219_handle_t *handle)
initialize the chip
-
uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
set the resistance
-
ina219_mode_t
ina219 mode enumeration definition
-
ina219_address_t
ina219 address enumeration definition
Definition: driver_ina219.h:63
-
uint8_t ina219_set_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the bus voltage adc mode
-
@ INA219_ADC_MODE_12_BIT_128_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_8_SAMPLES
-
@ INA219_ADC_MODE_10_BIT_1_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_1_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_4_SAMPLES
-
@ INA219_ADC_MODE_9_BIT_1_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_2_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_16_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_32_SAMPLES
-
@ INA219_ADC_MODE_12_BIT_64_SAMPLES
-
@ INA219_ADC_MODE_11_BIT_1_SAMPLES
-
@ INA219_PGA_320_MV
Definition: driver_ina219.h:99
-
@ INA219_PGA_40_MV
Definition: driver_ina219.h:96
-
@ INA219_PGA_80_MV
Definition: driver_ina219.h:97
-
@ INA219_PGA_160_MV
Definition: driver_ina219.h:98
-
@ INA219_BUS_VOLTAGE_RANGE_16V
Definition: driver_ina219.h:87
-
@ INA219_BUS_VOLTAGE_RANGE_32V
Definition: driver_ina219.h:88
-
@ INA219_MODE_POWER_DOWN
-
@ INA219_MODE_ADC_OFF
-
@ INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS
-
@ INA219_MODE_SHUNT_VOLTAGE_CONTINUOUS
-
@ INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED
-
@ INA219_MODE_SHUNT_VOLTAGE_TRIGGERED
-
@ INA219_MODE_BUS_VOLTAGE_TRIGGERED
-
@ INA219_MODE_BUS_VOLTAGE_CONTINUOUS
-
@ INA219_ADDRESS_D
Definition: driver_ina219.h:77
-
@ INA219_ADDRESS_0
Definition: driver_ina219.h:64
-
@ INA219_ADDRESS_6
Definition: driver_ina219.h:70
-
@ INA219_ADDRESS_2
Definition: driver_ina219.h:66
-
@ INA219_ADDRESS_3
Definition: driver_ina219.h:67
-
@ INA219_ADDRESS_8
Definition: driver_ina219.h:72
-
@ INA219_ADDRESS_E
Definition: driver_ina219.h:78
-
@ INA219_ADDRESS_7
Definition: driver_ina219.h:71
-
@ INA219_ADDRESS_9
Definition: driver_ina219.h:73
-
@ INA219_ADDRESS_1
Definition: driver_ina219.h:65
-
@ INA219_ADDRESS_4
Definition: driver_ina219.h:68
-
@ INA219_ADDRESS_B
Definition: driver_ina219.h:75
-
@ INA219_ADDRESS_C
Definition: driver_ina219.h:76
-
@ INA219_ADDRESS_A
Definition: driver_ina219.h:74
-
@ INA219_ADDRESS_5
Definition: driver_ina219.h:69
-
@ INA219_ADDRESS_F
Definition: driver_ina219.h:79
-
uint8_t ina219_interface_iic_init(void)
interface iic bus init
-
uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
-
void ina219_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ina219_interface_debug_print(const char *const fmt,...)
interface print format data
-
uint8_t ina219_interface_iic_deinit(void)
interface iic bus deinit
- - - - - - - -
uint8_t ina219_register_test(ina219_address_t addr_pin)
register test
-
ina219 handle structure definition
-
ina219 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 ina219_get_pga(ina219_handle_t *handle, ina219_pga_t *pga)
get the pga
+
uint8_t ina219_get_resistance(ina219_handle_t *handle, double *resistance)
get the resistance
+
uint8_t ina219_get_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t *range)
get the bus voltage range
+
uint8_t ina219_soft_reset(ina219_handle_t *handle)
soft reset the chip
+
struct ina219_info_s ina219_info_t
ina219 information structure definition
+
uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin)
set the iic address pin
+
uint8_t ina219_info(ina219_info_t *info)
get chip's information
+
uint8_t ina219_set_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the shunt voltage adc mode
+
uint8_t ina219_get_mode(ina219_handle_t *handle, ina219_mode_t *mode)
get the mode
+
uint8_t ina219_get_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t *mode)
get the bus voltage adc mode
+
ina219_adc_mode_t
ina219 adc mode enumeration definition
+
ina219_pga_t
ina219 pga enumeration definition
+
uint8_t ina219_get_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t *mode)
get the shunt voltage adc mode
+
uint8_t ina219_get_addr_pin(ina219_handle_t *handle, ina219_address_t *addr_pin)
get the iic address pin
+
uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
set the calibration
+
ina219_bus_voltage_range_t
ina219 bus voltage enumeration definition
+
uint8_t ina219_deinit(ina219_handle_t *handle)
close the chip
+
uint8_t ina219_get_calibration(ina219_handle_t *handle, uint16_t *data)
get the calibration
+
uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode)
set the mode
+
uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga)
set the pga
+
uint8_t ina219_set_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t range)
set the bus voltage range
+
uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
calculate the calibration
+
uint8_t ina219_init(ina219_handle_t *handle)
initialize the chip
+
uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
set the resistance
+
ina219_mode_t
ina219 mode enumeration definition
+
ina219_address_t
ina219 address enumeration definition
+
uint8_t ina219_set_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the bus voltage adc mode
+
struct ina219_handle_s ina219_handle_t
ina219 handle structure definition
+
@ INA219_ADC_MODE_12_BIT_128_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_8_SAMPLES
+
@ INA219_ADC_MODE_10_BIT_1_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_1_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_4_SAMPLES
+
@ INA219_ADC_MODE_9_BIT_1_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_2_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_16_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_32_SAMPLES
+
@ INA219_ADC_MODE_12_BIT_64_SAMPLES
+
@ INA219_ADC_MODE_11_BIT_1_SAMPLES
+
@ INA219_PGA_320_MV
+
@ INA219_PGA_40_MV
+
@ INA219_PGA_80_MV
+
@ INA219_PGA_160_MV
+
@ INA219_BUS_VOLTAGE_RANGE_16V
+
@ INA219_BUS_VOLTAGE_RANGE_32V
+
@ INA219_MODE_POWER_DOWN
+
@ INA219_MODE_ADC_OFF
+
@ INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS
+
@ INA219_MODE_SHUNT_VOLTAGE_CONTINUOUS
+
@ INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED
+
@ INA219_MODE_SHUNT_VOLTAGE_TRIGGERED
+
@ INA219_MODE_BUS_VOLTAGE_TRIGGERED
+
@ INA219_MODE_BUS_VOLTAGE_CONTINUOUS
+
@ INA219_ADDRESS_D
+
@ INA219_ADDRESS_0
+
@ INA219_ADDRESS_6
+
@ INA219_ADDRESS_2
+
@ INA219_ADDRESS_3
+
@ INA219_ADDRESS_8
+
@ INA219_ADDRESS_E
+
@ INA219_ADDRESS_7
+
@ INA219_ADDRESS_9
+
@ INA219_ADDRESS_1
+
@ INA219_ADDRESS_4
+
@ INA219_ADDRESS_B
+
@ INA219_ADDRESS_C
+
@ INA219_ADDRESS_A
+
@ INA219_ADDRESS_5
+
@ INA219_ADDRESS_F
+
uint8_t ina219_interface_iic_init(void)
interface iic bus init
+
uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+
void ina219_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ina219_interface_debug_print(const char *const fmt,...)
interface print format data
+
uint8_t ina219_interface_iic_deinit(void)
interface iic bus deinit
+ + + + + + + +
uint8_t ina219_register_test(ina219_address_t addr_pin)
register 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__ina219__register__test_8h.html b/doc/html/driver__ina219__register__test_8h.html index ed11dc7..cfaf936 100644 --- a/doc/html/driver__ina219__register__test_8h.html +++ b/doc/html/driver__ina219__register__test_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: test/driver_ina219_register_test.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ina219_register_test.h File Reference
+
driver_ina219_register_test.h File Reference
+Include dependency graph for driver_ina219_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 ina219_register_test (ina219_address_t addr_pin)
 register test More...
 
uint8_t ina219_register_test (ina219_address_t addr_pin)
 register test
+ +
diff --git a/doc/html/driver__ina219__register__test_8h__dep__incl.md5 b/doc/html/driver__ina219__register__test_8h__dep__incl.md5 new file mode 100644 index 0000000..1686f8e --- /dev/null +++ b/doc/html/driver__ina219__register__test_8h__dep__incl.md5 @@ -0,0 +1 @@ +49e277becb4af41e0662806a54904e45 \ No newline at end of file diff --git a/doc/html/driver__ina219__register__test_8h__dep__incl.svg b/doc/html/driver__ina219__register__test_8h__dep__incl.svg new file mode 100644 index 0000000..7837e3b --- /dev/null +++ b/doc/html/driver__ina219__register__test_8h__dep__incl.svg @@ -0,0 +1,41 @@ + + + + + + +test/driver_ina219_register_test.h + + +Node1 + + +test/driver_ina219 +_register_test.h + + + + + +Node2 + + +test/driver_ina219 +_register_test.c + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/driver__ina219__register__test_8h__incl.md5 b/doc/html/driver__ina219__register__test_8h__incl.md5 new file mode 100644 index 0000000..d583ea1 --- /dev/null +++ b/doc/html/driver__ina219__register__test_8h__incl.md5 @@ -0,0 +1 @@ +08d5040d52f37ad9eb2019502f51fd42 \ No newline at end of file diff --git a/doc/html/driver__ina219__register__test_8h__incl.svg b/doc/html/driver__ina219__register__test_8h__incl.svg new file mode 100644 index 0000000..4a65efc --- /dev/null +++ b/doc/html/driver__ina219__register__test_8h__incl.svg @@ -0,0 +1,112 @@ + + + + + + +test/driver_ina219_register_test.h + + +Node1 + + +test/driver_ina219 +_register_test.h + + + + + +Node2 + + +driver_ina219_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ina219.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdio.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdint.h + + + + + +Node3->Node5 + + + + + + + + +Node6 + + +string.h + + + + + +Node3->Node6 + + + + + + + + diff --git a/doc/html/driver__ina219__register__test_8h_source.html b/doc/html/driver__ina219__register__test_8h_source.html index eebfb11..aabeaaf 100644 --- a/doc/html/driver__ina219__register__test_8h_source.html +++ b/doc/html/driver__ina219__register__test_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: test/driver_ina219_register_test.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ina219_register_test.h
+
driver_ina219_register_test.h
-Go to the documentation of this file.
1 
-
37 #ifndef DRIVER_INA219_REGISTER_TEST_H
-
38 #define DRIVER_INA219_REGISTER_TEST_H
-
39 
- -
41 
-
42 #ifdef __cplusplus
-
43 extern "C"{
-
44 #endif
-
45 
-
61 uint8_t ina219_register_test(ina219_address_t addr_pin);
-
62 
-
67 #ifdef __cplusplus
-
68 }
-
69 #endif
-
70 
-
71 #endif
+Go to the documentation of this file.
1
+
36
+
37#ifndef DRIVER_INA219_REGISTER_TEST_H
+
38#define DRIVER_INA219_REGISTER_TEST_H
+
39
+ +
41
+
42#ifdef __cplusplus
+
43extern "C"{
+
44#endif
+
45
+
52
+ +
62
+
66
+
67#ifdef __cplusplus
+
68}
+
69#endif
+
70
+
71#endif
driver ina219 interface header file
-
ina219_address_t
ina219 address enumeration definition
Definition: driver_ina219.h:63
-
uint8_t ina219_register_test(ina219_address_t addr_pin)
register test
+
ina219_address_t
ina219 address enumeration definition
+
uint8_t ina219_register_test(ina219_address_t addr_pin)
register test
+
diff --git a/doc/html/driver__ina219__shot_8c.html b/doc/html/driver__ina219__shot_8c.html index 86657d0..34b99a4 100644 --- a/doc/html/driver__ina219__shot_8c.html +++ b/doc/html/driver__ina219__shot_8c.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: example/driver_ina219_shot.c File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ina219_shot.c File Reference
+
driver_ina219_shot.c File Reference

driver ina219 shot source file More...

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

Go to the source code of this file.

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

+

Functions

uint8_t ina219_shot_init (ina219_address_t addr_pin, double r)
 shot example init More...
 
uint8_t ina219_shot_read (float *mV, float *mA, float *mW)
 shot example read More...
 
uint8_t ina219_shot_deinit (void)
 shot example deinit More...
 
uint8_t ina219_shot_init (ina219_address_t addr_pin, double r)
 shot example init
uint8_t ina219_shot_read (float *mV, float *mA, float *mW)
 shot example read
uint8_t ina219_shot_deinit (void)
 shot example deinit
-

Detailed Description

+

Detailed Description

driver ina219 shot source file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

@@ -130,11 +136,19 @@

history

Definition in file driver_ina219_shot.c.

+ +
diff --git a/doc/html/driver__ina219__shot_8c__incl.md5 b/doc/html/driver__ina219__shot_8c__incl.md5 new file mode 100644 index 0000000..4d33565 --- /dev/null +++ b/doc/html/driver__ina219__shot_8c__incl.md5 @@ -0,0 +1 @@ +49ef9e1f36ee300322472e60161a03d7 \ No newline at end of file diff --git a/doc/html/driver__ina219__shot_8c__incl.svg b/doc/html/driver__ina219__shot_8c__incl.svg new file mode 100644 index 0000000..dd1f0b6 --- /dev/null +++ b/doc/html/driver__ina219__shot_8c__incl.svg @@ -0,0 +1,130 @@ + + + + + + +example/driver_ina219_shot.c + + +Node1 + + +example/driver_ina219 +_shot.c + + + + + +Node2 + + +driver_ina219_shot.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ina219_interface.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +driver_ina219.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdio.h + + + + + +Node4->Node5 + + + + + + + + +Node6 + + +stdint.h + + + + + +Node4->Node6 + + + + + + + + +Node7 + + +string.h + + + + + +Node4->Node7 + + + + + + + + diff --git a/doc/html/driver__ina219__shot_8c_source.html b/doc/html/driver__ina219__shot_8c_source.html index 767a1da..92add58 100644 --- a/doc/html/driver__ina219__shot_8c_source.html +++ b/doc/html/driver__ina219__shot_8c_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: example/driver_ina219_shot.c Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ina219_shot.c
+
driver_ina219_shot.c
-Go to the documentation of this file.
1 
-
37 #include "driver_ina219_shot.h"
-
38 
-
39 static ina219_handle_t gs_handle;
-
50 uint8_t ina219_shot_init(ina219_address_t addr_pin, double r)
-
51 {
-
52  uint8_t res;
-
53  uint16_t calibration;
-
54 
-
55  /* link interface function */
- - - - - - - -
63 
-
64  /* set addr pin */
-
65  res = ina219_set_addr_pin(&gs_handle, addr_pin);
-
66  if (res != 0)
-
67  {
-
68  ina219_interface_debug_print("ina219: set addr pin failed.\n");
-
69 
-
70  return 1;
-
71  }
-
72 
-
73  /* set the r */
-
74  res = ina219_set_resistance(&gs_handle, r);
-
75  if (res != 0)
-
76  {
-
77  ina219_interface_debug_print("ina219: set resistance failed.\n");
-
78 
-
79  return 1;
-
80  }
-
81 
-
82  /* init */
-
83  res = ina219_init(&gs_handle);
-
84  if (res != 0)
-
85  {
-
86  ina219_interface_debug_print("ina219: init failed.\n");
-
87 
-
88  return 1;
-
89  }
-
90 
-
91  /* set bus voltage range */
- -
93  if (res != 0)
-
94  {
-
95  ina219_interface_debug_print("ina219: set bus voltage range failed.\n");
-
96  (void)ina219_deinit(&gs_handle);
-
97 
-
98  return 1;
-
99  }
-
100 
-
101  /* set bus voltage adc mode */
- -
103  if (res != 0)
-
104  {
-
105  ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
-
106  (void)ina219_deinit(&gs_handle);
-
107 
-
108  return 1;
-
109  }
-
110 
-
111  /* set shunt voltage adc mode */
- -
113  if (res != 0)
-
114  {
-
115  ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
-
116  (void)ina219_deinit(&gs_handle);
-
117 
-
118  return 1;
-
119  }
-
120 
-
121  /* set pga */
-
122  res = ina219_set_pga(&gs_handle, INA219_SHOT_DEFAULT_PGA);
-
123  if (res != 0)
-
124  {
-
125  ina219_interface_debug_print("ina219: set pga failed.\n");
-
126  (void)ina219_deinit(&gs_handle);
-
127 
-
128  return 1;
-
129  }
-
130 
-
131  /* calculate calibration */
-
132  res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&calibration);
-
133  if (res != 0)
-
134  {
-
135  ina219_interface_debug_print("ina219: calculate calibration failed.\n");
-
136  (void)ina219_deinit(&gs_handle);
-
137 
-
138  return 1;
-
139  }
-
140 
-
141  /* set calibration */
-
142  res = ina219_set_calibration(&gs_handle, calibration);
-
143  if (res != 0)
-
144  {
-
145  ina219_interface_debug_print("ina219: set calibration failed.\n");
-
146  (void)ina219_deinit(&gs_handle);
-
147 
-
148  return 1;
-
149  }
-
150 
-
151  return 0;
-
152 }
-
153 
-
164 uint8_t ina219_shot_read(float *mV, float *mA, float *mW)
-
165 {
-
166  uint8_t res;
-
167  int16_t s_raw;
-
168  uint16_t u_raw;
-
169 
-
170  /* set shunt bus voltage triggered */
- -
172  if (res != 0)
-
173  {
-
174  return 1;
-
175  }
-
176 
-
177  /* read bus voltage */
-
178  res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, mV);
-
179  if (res != 0)
-
180  {
-
181  return 1;
-
182  }
-
183 
-
184  /* read current */
-
185  res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, mA);
-
186  if (res != 0)
-
187  {
-
188  return 1;
-
189  }
-
190 
-
191  /* read power */
-
192  res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, mW);
-
193  if (res != 0)
-
194  {
-
195  return 1;
-
196  }
-
197 
-
198  return 0;
-
199 }
-
200 
-
208 uint8_t ina219_shot_deinit(void)
-
209 {
-
210  uint8_t res;
-
211 
-
212  res = ina219_deinit(&gs_handle);
-
213  if (res != 0)
-
214  {
-
215  return 1;
-
216  }
-
217 
-
218  return 0;
-
219 }
+Go to the documentation of this file.
1
+
36
+
37#include "driver_ina219_shot.h"
+
38
+
39static ina219_handle_t gs_handle;
+
40
+
+
50uint8_t ina219_shot_init(ina219_address_t addr_pin, double r)
+
51{
+
52 uint8_t res;
+
53 uint16_t calibration;
+
54
+
55 /* link interface function */
+ + + + + + + +
63
+
64 /* set addr pin */
+
65 res = ina219_set_addr_pin(&gs_handle, addr_pin);
+
66 if (res != 0)
+
67 {
+
68 ina219_interface_debug_print("ina219: set addr pin failed.\n");
+
69
+
70 return 1;
+
71 }
+
72
+
73 /* set the r */
+
74 res = ina219_set_resistance(&gs_handle, r);
+
75 if (res != 0)
+
76 {
+
77 ina219_interface_debug_print("ina219: set resistance failed.\n");
+
78
+
79 return 1;
+
80 }
+
81
+
82 /* init */
+
83 res = ina219_init(&gs_handle);
+
84 if (res != 0)
+
85 {
+
86 ina219_interface_debug_print("ina219: init failed.\n");
+
87
+
88 return 1;
+
89 }
+
90
+
91 /* set bus voltage range */
+ +
93 if (res != 0)
+
94 {
+
95 ina219_interface_debug_print("ina219: set bus voltage range failed.\n");
+
96 (void)ina219_deinit(&gs_handle);
+
97
+
98 return 1;
+
99 }
+
100
+
101 /* set bus voltage adc mode */
+ +
103 if (res != 0)
+
104 {
+
105 ina219_interface_debug_print("ina219: set bus voltage adc mode failed.\n");
+
106 (void)ina219_deinit(&gs_handle);
+
107
+
108 return 1;
+
109 }
+
110
+
111 /* set shunt voltage adc mode */
+ +
113 if (res != 0)
+
114 {
+
115 ina219_interface_debug_print("ina219: set shunt voltage adc mode failed.\n");
+
116 (void)ina219_deinit(&gs_handle);
+
117
+
118 return 1;
+
119 }
+
120
+
121 /* set pga */
+
122 res = ina219_set_pga(&gs_handle, INA219_SHOT_DEFAULT_PGA);
+
123 if (res != 0)
+
124 {
+
125 ina219_interface_debug_print("ina219: set pga failed.\n");
+
126 (void)ina219_deinit(&gs_handle);
+
127
+
128 return 1;
+
129 }
+
130
+
131 /* calculate calibration */
+
132 res = ina219_calculate_calibration(&gs_handle, (uint16_t *)&calibration);
+
133 if (res != 0)
+
134 {
+
135 ina219_interface_debug_print("ina219: calculate calibration failed.\n");
+
136 (void)ina219_deinit(&gs_handle);
+
137
+
138 return 1;
+
139 }
+
140
+
141 /* set calibration */
+
142 res = ina219_set_calibration(&gs_handle, calibration);
+
143 if (res != 0)
+
144 {
+
145 ina219_interface_debug_print("ina219: set calibration failed.\n");
+
146 (void)ina219_deinit(&gs_handle);
+
147
+
148 return 1;
+
149 }
+
150
+
151 return 0;
+
152}
+
+
153
+
+
164uint8_t ina219_shot_read(float *mV, float *mA, float *mW)
+
165{
+
166 uint8_t res;
+
167 int16_t s_raw;
+
168 uint16_t u_raw;
+
169
+
170 /* set shunt bus voltage triggered */
+ +
172 if (res != 0)
+
173 {
+
174 return 1;
+
175 }
+
176
+
177 /* read bus voltage */
+
178 res = ina219_read_bus_voltage(&gs_handle, (uint16_t *)&u_raw, mV);
+
179 if (res != 0)
+
180 {
+
181 return 1;
+
182 }
+
183
+
184 /* read current */
+
185 res = ina219_read_current(&gs_handle, (int16_t *)&s_raw, mA);
+
186 if (res != 0)
+
187 {
+
188 return 1;
+
189 }
+
190
+
191 /* read power */
+
192 res = ina219_read_power(&gs_handle, (uint16_t *)&u_raw, mW);
+
193 if (res != 0)
+
194 {
+
195 return 1;
+
196 }
+
197
+
198 return 0;
+
199}
+
+
200
+
+ +
209{
+
210 uint8_t res;
+
211
+
212 res = ina219_deinit(&gs_handle);
+
213 if (res != 0)
+
214 {
+
215 return 1;
+
216 }
+
217
+
218 return 0;
+
219}
+
-
uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin)
set the iic address pin
-
uint8_t ina219_set_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the shunt voltage adc mode
-
uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
set the calibration
-
uint8_t ina219_deinit(ina219_handle_t *handle)
close the chip
-
uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode)
set the mode
-
uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga)
set the pga
-
uint8_t ina219_set_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t range)
set the bus voltage range
-
uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV)
read the bus voltage
-
uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA)
read the current
-
uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
calculate the calibration
-
uint8_t ina219_init(ina219_handle_t *handle)
initialize the chip
-
uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
set the resistance
-
ina219_address_t
ina219 address enumeration definition
Definition: driver_ina219.h:63
-
uint8_t ina219_set_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the bus voltage adc mode
-
uint8_t ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW)
read the power
-
@ INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED
-
#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_RANGE
ina219 shot example default definition
-
uint8_t ina219_shot_read(float *mV, float *mA, float *mW)
shot example read
-
uint8_t ina219_shot_init(ina219_address_t addr_pin, double r)
shot example init
-
#define INA219_SHOT_DEFAULT_PGA
-
#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_ADC_MODE
-
uint8_t ina219_shot_deinit(void)
shot example deinit
-
#define INA219_SHOT_DEFAULT_SHUNT_VOLTAGE_ADC_MODE
-
uint8_t ina219_interface_iic_init(void)
interface iic bus init
-
uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
-
uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
-
void ina219_interface_delay_ms(uint32_t ms)
interface delay ms
-
void ina219_interface_debug_print(const char *const fmt,...)
interface print format data
-
uint8_t ina219_interface_iic_deinit(void)
interface iic bus deinit
- - - - - - - -
ina219 handle structure definition
+
uint8_t ina219_set_addr_pin(ina219_handle_t *handle, ina219_address_t addr_pin)
set the iic address pin
+
uint8_t ina219_set_shunt_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the shunt voltage adc mode
+
uint8_t ina219_set_calibration(ina219_handle_t *handle, uint16_t data)
set the calibration
+
uint8_t ina219_deinit(ina219_handle_t *handle)
close the chip
+
uint8_t ina219_set_mode(ina219_handle_t *handle, ina219_mode_t mode)
set the mode
+
uint8_t ina219_set_pga(ina219_handle_t *handle, ina219_pga_t pga)
set the pga
+
uint8_t ina219_set_bus_voltage_range(ina219_handle_t *handle, ina219_bus_voltage_range_t range)
set the bus voltage range
+
uint8_t ina219_read_bus_voltage(ina219_handle_t *handle, uint16_t *raw, float *mV)
read the bus voltage
+
uint8_t ina219_read_current(ina219_handle_t *handle, int16_t *raw, float *mA)
read the current
+
uint8_t ina219_calculate_calibration(ina219_handle_t *handle, uint16_t *calibration)
calculate the calibration
+
uint8_t ina219_init(ina219_handle_t *handle)
initialize the chip
+
uint8_t ina219_set_resistance(ina219_handle_t *handle, double resistance)
set the resistance
+
ina219_address_t
ina219 address enumeration definition
+
uint8_t ina219_set_bus_voltage_adc_mode(ina219_handle_t *handle, ina219_adc_mode_t mode)
set the bus voltage adc mode
+
struct ina219_handle_s ina219_handle_t
ina219 handle structure definition
+
uint8_t ina219_read_power(ina219_handle_t *handle, uint16_t *raw, float *mW)
read the power
+
@ INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED
+
#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_RANGE
ina219 shot example default definition
+
uint8_t ina219_shot_read(float *mV, float *mA, float *mW)
shot example read
+
uint8_t ina219_shot_init(ina219_address_t addr_pin, double r)
shot example init
+
#define INA219_SHOT_DEFAULT_PGA
+
#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_ADC_MODE
+
uint8_t ina219_shot_deinit(void)
shot example deinit
+
#define INA219_SHOT_DEFAULT_SHUNT_VOLTAGE_ADC_MODE
+
uint8_t ina219_interface_iic_init(void)
interface iic bus init
+
uint8_t ina219_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
+
uint8_t ina219_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
+
void ina219_interface_delay_ms(uint32_t ms)
interface delay ms
+
void ina219_interface_debug_print(const char *const fmt,...)
interface print format data
+
uint8_t ina219_interface_iic_deinit(void)
interface iic bus deinit
+ + + + + + +
+
diff --git a/doc/html/driver__ina219__shot_8h.html b/doc/html/driver__ina219__shot_8h.html index 50b1772..d3c5a2c 100644 --- a/doc/html/driver__ina219__shot_8h.html +++ b/doc/html/driver__ina219__shot_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: example/driver_ina219_shot.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
driver_ina219_shot.h File Reference
+
driver_ina219_shot.h File Reference
+Include dependency graph for driver_ina219_shot.h:
+
+
+
+
+This graph shows which files directly or indirectly include this file:
+
+
+

Go to the source code of this file.

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

+

Macros

#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_RANGE   INA219_BUS_VOLTAGE_RANGE_32V
 ina219 shot example default definition More...
 
#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
 
#define INA219_SHOT_DEFAULT_SHUNT_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
 
#define INA219_SHOT_DEFAULT_PGA   INA219_PGA_320_MV
 
#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_RANGE   INA219_BUS_VOLTAGE_RANGE_32V
 ina219 shot example default definition
#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
#define INA219_SHOT_DEFAULT_SHUNT_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
#define INA219_SHOT_DEFAULT_PGA   INA219_PGA_320_MV
- - - - - - - - - - + + + + + +

+

Functions

uint8_t ina219_shot_init (ina219_address_t addr_pin, double r)
 shot example init More...
 
uint8_t ina219_shot_deinit (void)
 shot example deinit More...
 
uint8_t ina219_shot_read (float *mV, float *mA, float *mW)
 shot example read More...
 
uint8_t ina219_shot_init (ina219_address_t addr_pin, double r)
 shot example init
uint8_t ina219_shot_deinit (void)
 shot example deinit
uint8_t ina219_shot_read (float *mV, float *mA, float *mW)
 shot example read
+ +
diff --git a/doc/html/driver__ina219__shot_8h__dep__incl.md5 b/doc/html/driver__ina219__shot_8h__dep__incl.md5 new file mode 100644 index 0000000..d4950d3 --- /dev/null +++ b/doc/html/driver__ina219__shot_8h__dep__incl.md5 @@ -0,0 +1 @@ +aa465c7ef7c8d1d1ff5cf05c62d457d0 \ No newline at end of file diff --git a/doc/html/driver__ina219__shot_8h__dep__incl.svg b/doc/html/driver__ina219__shot_8h__dep__incl.svg new file mode 100644 index 0000000..78f6f32 --- /dev/null +++ b/doc/html/driver__ina219__shot_8h__dep__incl.svg @@ -0,0 +1,41 @@ + + + + + + +example/driver_ina219_shot.h + + +Node1 + + +example/driver_ina219 +_shot.h + + + + + +Node2 + + +example/driver_ina219 +_shot.c + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/driver__ina219__shot_8h__incl.md5 b/doc/html/driver__ina219__shot_8h__incl.md5 new file mode 100644 index 0000000..9f495fe --- /dev/null +++ b/doc/html/driver__ina219__shot_8h__incl.md5 @@ -0,0 +1 @@ +fec0e67f5de4c3d24ad3412e6bcc4061 \ No newline at end of file diff --git a/doc/html/driver__ina219__shot_8h__incl.svg b/doc/html/driver__ina219__shot_8h__incl.svg new file mode 100644 index 0000000..38a0f52 --- /dev/null +++ b/doc/html/driver__ina219__shot_8h__incl.svg @@ -0,0 +1,112 @@ + + + + + + +example/driver_ina219_shot.h + + +Node1 + + +example/driver_ina219 +_shot.h + + + + + +Node2 + + +driver_ina219_interface.h + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +driver_ina219.h + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +stdio.h + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +stdint.h + + + + + +Node3->Node5 + + + + + + + + +Node6 + + +string.h + + + + + +Node3->Node6 + + + + + + + + diff --git a/doc/html/driver__ina219__shot_8h_source.html b/doc/html/driver__ina219__shot_8h_source.html index c0c72a4..fb40895 100644 --- a/doc/html/driver__ina219__shot_8h_source.html +++ b/doc/html/driver__ina219__shot_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: example/driver_ina219_shot.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
driver_ina219_shot.h
+
driver_ina219_shot.h
-Go to the documentation of this file.
1 
-
37 #ifndef DRIVER_INA219_SHOT_H
-
38 #define DRIVER_INA219_SHOT_H
-
39 
- -
41 
-
42 #ifdef __cplusplus
-
43 extern "C"{
-
44 #endif
-
45 
-
54 #define INA219_SHOT_DEFAULT_BUS_VOLTAGE_RANGE INA219_BUS_VOLTAGE_RANGE_32V
-
55 #define INA219_SHOT_DEFAULT_BUS_VOLTAGE_ADC_MODE INA219_ADC_MODE_12_BIT_1_SAMPLES
-
56 #define INA219_SHOT_DEFAULT_SHUNT_VOLTAGE_ADC_MODE INA219_ADC_MODE_12_BIT_1_SAMPLES
-
57 #define INA219_SHOT_DEFAULT_PGA INA219_PGA_320_MV
-
68 uint8_t ina219_shot_init(ina219_address_t addr_pin, double r);
-
69 
-
77 uint8_t ina219_shot_deinit(void);
-
78 
-
89 uint8_t ina219_shot_read(float *mV, float *mA, float *mW);
-
90 
-
95 #ifdef __cplusplus
-
96 }
-
97 #endif
-
98 
-
99 #endif
+Go to the documentation of this file.
1
+
36
+
37#ifndef DRIVER_INA219_SHOT_H
+
38#define DRIVER_INA219_SHOT_H
+
39
+ +
41
+
42#ifdef __cplusplus
+
43extern "C"{
+
44#endif
+
45
+
50
+
54#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_RANGE INA219_BUS_VOLTAGE_RANGE_32V
+
55#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_ADC_MODE INA219_ADC_MODE_12_BIT_1_SAMPLES
+
56#define INA219_SHOT_DEFAULT_SHUNT_VOLTAGE_ADC_MODE INA219_ADC_MODE_12_BIT_1_SAMPLES
+
57#define INA219_SHOT_DEFAULT_PGA INA219_PGA_320_MV
+
58
+
68uint8_t ina219_shot_init(ina219_address_t addr_pin, double r);
+
69
+
77uint8_t ina219_shot_deinit(void);
+
78
+
89uint8_t ina219_shot_read(float *mV, float *mA, float *mW);
+
90
+
94
+
95#ifdef __cplusplus
+
96}
+
97#endif
+
98
+
99#endif
driver ina219 interface header file
-
ina219_address_t
ina219 address enumeration definition
Definition: driver_ina219.h:63
-
uint8_t ina219_shot_read(float *mV, float *mA, float *mW)
shot example read
-
uint8_t ina219_shot_init(ina219_address_t addr_pin, double r)
shot example init
-
uint8_t ina219_shot_deinit(void)
shot example deinit
+
ina219_address_t
ina219 address enumeration definition
+
uint8_t ina219_shot_read(float *mV, float *mA, float *mW)
shot example read
+
uint8_t ina219_shot_init(ina219_address_t addr_pin, double r)
shot example init
+
uint8_t ina219_shot_deinit(void)
shot example deinit
+
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 1e59355..12a59c5 100644 --- a/doc/html/files.html +++ b/doc/html/files.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: File List + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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_ina219_basic.cDriver ina219 basic source file
 driver_ina219_basic.h
 driver_ina219_shot.cDriver ina219 shot source file
 driver_ina219_shot.h
  interface
 driver_ina219_interface.hDriver ina219 interface header file
 driver_ina219_interface_template.cDriver ina219 interface template source file
  src
 driver_ina219.cDriver ina219 source file
 driver_ina219.hDriver ina219 header file
  test
 driver_ina219_read_test.cDriver ina219 read test source file
 driver_ina219_read_test.h
 driver_ina219_register_test.cDriver ina219 register test source file
 driver_ina219_register_test.h
+ + + + + + + + + + + + + + + + + + +
 
doc
 
mainpage
 
mainpage.h
 
example
 
driver_ina219_basic.c
Driver ina219 basic source file
 
driver_ina219_basic.h
 
driver_ina219_shot.c
Driver ina219 shot source file
 
driver_ina219_shot.h
 
interface
 
driver_ina219_interface.h
Driver ina219 interface header file
 
driver_ina219_interface_template.c
Driver ina219 interface template source file
 
src
 
driver_ina219.c
Driver ina219 source file
 
driver_ina219.h
Driver ina219 header file
 
test
 
driver_ina219_read_test.c
Driver ina219 read test source file
 
driver_ina219_read_test.h
 
driver_ina219_register_test.c
Driver ina219 register test source file
 
driver_ina219_register_test.h
+
diff --git a/doc/html/folderclosed.png b/doc/html/folderclosed.png deleted file mode 100644 index bb8ab35edce8e97554e360005ee9fc5bffb36e66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 616 zcmV-u0+;=XP)a9#ETzayK)T~Jw&MMH>OIr#&;dC}is*2Mqdf&akCc=O@`qC+4i z5Iu3w#1M@KqXCz8TIZd1wli&kkl2HVcAiZ8PUn5z_kG@-y;?yK06=cA0U%H0PH+kU zl6dp}OR(|r8-RG+YLu`zbI}5TlOU6ToR41{9=uz^?dGTNL;wIMf|V3`d1Wj3y!#6` zBLZ?xpKR~^2x}?~zA(_NUu3IaDB$tKma*XUdOZN~c=dLt_h_k!dbxm_*ibDM zlFX`g{k$X}yIe%$N)cn1LNu=q9_CS)*>A zsX_mM4L@`(cSNQKMFc$RtYbx{79#j-J7hk*>*+ZZhM4Hw?I?rsXCi#mRWJ=-0LGV5a-WR0Qgt<|Nqf)C-@80`5gIz45^_20000IqP)X=#(TiCT&PiIIVc55T}TU}EUh*{q$|`3@{d>{Tc9Bo>e= zfmF3!f>fbI9#GoEHh0f`i5)wkLpva0ztf%HpZneK?w-7AK@b4Itw{y|Zd3k!fH?q2 zlhckHd_V2M_X7+)U&_Xcfvtw60l;--DgZmLSw-Y?S>)zIqMyJ1#FwLU*%bl38ok+! zh78H87n`ZTS;uhzAR$M`zZ`bVhq=+%u9^$5jDplgxd44}9;IRqUH1YHH|@6oFe%z( zo4)_>E$F&^P-f(#)>(TrnbE>Pefs9~@iN=|)Rz|V`sGfHNrJ)0gJb8xx+SBmRf@1l zvuzt=vGfI)<-F9!o&3l?>9~0QbUDT(wFdnQPv%xdD)m*g%!20>Bc9iYmGAp<9YAa( z0QgYgTWqf1qN++Gqp z8@AYPTB3E|6s=WLG?xw0tm|U!o=&zd+H0oRYE;Dbx+Na9s^STqX|Gnq%H8s(nGDGJ j8vwW|`Ts`)fSK|Kx=IK@RG@g200000NkvXXu0mjfauFEA diff --git a/doc/html/functions.html b/doc/html/functions.html index 89b4cfe..9191cd0 100644 --- a/doc/html/functions.html +++ b/doc/html/functions.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: Data Fields + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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 4430642..5756832 100644 --- a/doc/html/functions_vars.html +++ b/doc/html/functions_vars.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: Data Fields - Variables + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
diff --git a/doc/html/globals.html b/doc/html/globals.html index d9cb42d..a7c6767 100644 --- a/doc/html/globals.html +++ b/doc/html/globals.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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_defs.html b/doc/html/globals_defs.html index 7e83387..1c342f2 100644 --- a/doc/html/globals_defs.html +++ b/doc/html/globals_defs.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
diff --git a/doc/html/globals_enum.html b/doc/html/globals_enum.html index e8c6ff2..cb8be20 100644 --- a/doc/html/globals_enum.html +++ b/doc/html/globals_enum.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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 b6bd775..038b585 100644 --- a/doc/html/globals_eval.html +++ b/doc/html/globals_eval.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@

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

- i -

+
diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html index f4de51e..2c34059 100644 --- a/doc/html/globals_func.html +++ b/doc/html/globals_func.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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:
-

- i -

+
diff --git a/doc/html/globals_type.html b/doc/html/globals_type.html index e76fce8..6e5fdfd 100644 --- a/doc/html/globals_type.html +++ b/doc/html/globals_type.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: Globals + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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..b6fb425 --- /dev/null +++ b/doc/html/graph_legend.html @@ -0,0 +1,167 @@ + + + + + + + +LibDriver INA219: Graph Legend + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
LibDriver INA219 +
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+
+ +
+
+ + +
+
+
+
+
+
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__ina219__basic__driver.html b/doc/html/group__ina219__basic__driver.html index a260916..ce4d2a6 100644 --- a/doc/html/group__ina219__basic__driver.html +++ b/doc/html/group__ina219__basic__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: ina219 basic driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
ina219 basic driver function
+
ina219 basic driver function

ina219 basic driver modules More...

+
+Collaboration diagram for ina219 basic driver function:
+
+
+
- - + - - + -

+

Data Structures

struct  ina219_handle_s
struct  ina219_handle_s
 ina219 handle structure definition More...
 
struct  ina219_info_s
struct  ina219_info_s
 ina219 information structure definition More...
 
- - - - - - - + + + +

+

Typedefs

typedef struct ina219_handle_s ina219_handle_t
 ina219 handle structure definition More...
 
typedef struct ina219_info_s ina219_info_t
 ina219 information structure definition More...
 
typedef struct ina219_handle_s ina219_handle_t
 ina219 handle structure definition
typedef struct ina219_info_s ina219_info_t
 ina219 information structure definition
- - - - - + - - - + - - - + - - - + - - +

+

Enumerations

enum  ina219_address_t {
-  INA219_ADDRESS_0 = (0x40 << 1) -, INA219_ADDRESS_1 = (0x41 << 1) -, INA219_ADDRESS_2 = (0x42 << 1) -, INA219_ADDRESS_3 = (0x43 << 1) +
enum  ina219_address_t {
+  INA219_ADDRESS_0 = (0x40 << 1) +, INA219_ADDRESS_1 = (0x41 << 1) +, INA219_ADDRESS_2 = (0x42 << 1) +, INA219_ADDRESS_3 = (0x43 << 1) ,
-  INA219_ADDRESS_4 = (0x44 << 1) -, INA219_ADDRESS_5 = (0x45 << 1) -, INA219_ADDRESS_6 = (0x46 << 1) -, INA219_ADDRESS_7 = (0x47 << 1) +  INA219_ADDRESS_4 = (0x44 << 1) +, INA219_ADDRESS_5 = (0x45 << 1) +, INA219_ADDRESS_6 = (0x46 << 1) +, INA219_ADDRESS_7 = (0x47 << 1) ,
-  INA219_ADDRESS_8 = (0x48 << 1) -, INA219_ADDRESS_9 = (0x49 << 1) -, INA219_ADDRESS_A = (0x4A << 1) -, INA219_ADDRESS_B = (0x4B << 1) +  INA219_ADDRESS_8 = (0x48 << 1) +, INA219_ADDRESS_9 = (0x49 << 1) +, INA219_ADDRESS_A = (0x4A << 1) +, INA219_ADDRESS_B = (0x4B << 1) ,
-  INA219_ADDRESS_C = (0x4C << 1) -, INA219_ADDRESS_D = (0x4D << 1) -, INA219_ADDRESS_E = (0x4E << 1) -, INA219_ADDRESS_F = (0x4F << 1) +  INA219_ADDRESS_C = (0x4C << 1) +, INA219_ADDRESS_D = (0x4D << 1) +, INA219_ADDRESS_E = (0x4E << 1) +, INA219_ADDRESS_F = (0x4F << 1)
}
 ina219 address enumeration definition More...
 
enum  ina219_bus_voltage_range_t { INA219_BUS_VOLTAGE_RANGE_16V = 0 -, INA219_BUS_VOLTAGE_RANGE_32V = 1 +
 ina219 address enumeration definition More...
enum  ina219_bus_voltage_range_t { INA219_BUS_VOLTAGE_RANGE_16V = 0 +, INA219_BUS_VOLTAGE_RANGE_32V = 1 }
 ina219 bus voltage enumeration definition More...
 
enum  ina219_pga_t { INA219_PGA_40_MV = 0 -, INA219_PGA_80_MV = 1 -, INA219_PGA_160_MV = 2 -, INA219_PGA_320_MV = 3 +
 ina219 bus voltage enumeration definition More...
enum  ina219_pga_t { INA219_PGA_40_MV = 0 +, INA219_PGA_80_MV = 1 +, INA219_PGA_160_MV = 2 +, INA219_PGA_320_MV = 3 }
 ina219 pga enumeration definition More...
 
enum  ina219_adc_mode_t {
-  INA219_ADC_MODE_9_BIT_1_SAMPLES = 0x0 -, INA219_ADC_MODE_10_BIT_1_SAMPLES = 0x1 -, INA219_ADC_MODE_11_BIT_1_SAMPLES = 0x2 -, INA219_ADC_MODE_12_BIT_1_SAMPLES = 0x3 +
 ina219 pga enumeration definition More...
enum  ina219_adc_mode_t {
+  INA219_ADC_MODE_9_BIT_1_SAMPLES = 0x0 +, INA219_ADC_MODE_10_BIT_1_SAMPLES = 0x1 +, INA219_ADC_MODE_11_BIT_1_SAMPLES = 0x2 +, INA219_ADC_MODE_12_BIT_1_SAMPLES = 0x3 ,
-  INA219_ADC_MODE_12_BIT_2_SAMPLES = 0x9 -, INA219_ADC_MODE_12_BIT_4_SAMPLES = 0xA -, INA219_ADC_MODE_12_BIT_8_SAMPLES = 0xB -, INA219_ADC_MODE_12_BIT_16_SAMPLES = 0xC +  INA219_ADC_MODE_12_BIT_2_SAMPLES = 0x9 +, INA219_ADC_MODE_12_BIT_4_SAMPLES = 0xA +, INA219_ADC_MODE_12_BIT_8_SAMPLES = 0xB +, INA219_ADC_MODE_12_BIT_16_SAMPLES = 0xC ,
-  INA219_ADC_MODE_12_BIT_32_SAMPLES = 0xD -, INA219_ADC_MODE_12_BIT_64_SAMPLES = 0xE -, INA219_ADC_MODE_12_BIT_128_SAMPLES = 0xF +  INA219_ADC_MODE_12_BIT_32_SAMPLES = 0xD +, INA219_ADC_MODE_12_BIT_64_SAMPLES = 0xE +, INA219_ADC_MODE_12_BIT_128_SAMPLES = 0xF
}
 ina219 adc mode enumeration definition More...
 
enum  ina219_mode_t {
-  INA219_MODE_POWER_DOWN = 0x0 -, INA219_MODE_SHUNT_VOLTAGE_TRIGGERED = 0x1 -, INA219_MODE_BUS_VOLTAGE_TRIGGERED = 0x2 -, INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED = 0x3 +
 ina219 adc mode enumeration definition More...
enum  ina219_mode_t {
+  INA219_MODE_POWER_DOWN = 0x0 +, INA219_MODE_SHUNT_VOLTAGE_TRIGGERED = 0x1 +, INA219_MODE_BUS_VOLTAGE_TRIGGERED = 0x2 +, INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED = 0x3 ,
-  INA219_MODE_ADC_OFF = 0x4 -, INA219_MODE_SHUNT_VOLTAGE_CONTINUOUS = 0x5 -, INA219_MODE_BUS_VOLTAGE_CONTINUOUS = 0x6 -, INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS = 0x7 +  INA219_MODE_ADC_OFF = 0x4 +, INA219_MODE_SHUNT_VOLTAGE_CONTINUOUS = 0x5 +, INA219_MODE_BUS_VOLTAGE_CONTINUOUS = 0x6 +, INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS = 0x7
}
 ina219 mode enumeration definition More...
 
 ina219 mode enumeration definition More...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+

Functions

uint8_t ina219_info (ina219_info_t *info)
 get chip's information More...
 
uint8_t ina219_set_addr_pin (ina219_handle_t *handle, ina219_address_t addr_pin)
 set the iic address pin More...
 
uint8_t ina219_get_addr_pin (ina219_handle_t *handle, ina219_address_t *addr_pin)
 get the iic address pin More...
 
uint8_t ina219_set_resistance (ina219_handle_t *handle, double resistance)
 set the resistance More...
 
uint8_t ina219_get_resistance (ina219_handle_t *handle, double *resistance)
 get the resistance More...
 
uint8_t ina219_init (ina219_handle_t *handle)
 initialize the chip More...
 
uint8_t ina219_deinit (ina219_handle_t *handle)
 close the chip More...
 
uint8_t ina219_read_shunt_voltage (ina219_handle_t *handle, int16_t *raw, float *mV)
 read the shunt voltage More...
 
uint8_t ina219_read_bus_voltage (ina219_handle_t *handle, uint16_t *raw, float *mV)
 read the bus voltage More...
 
uint8_t ina219_read_current (ina219_handle_t *handle, int16_t *raw, float *mA)
 read the current More...
 
uint8_t ina219_read_power (ina219_handle_t *handle, uint16_t *raw, float *mW)
 read the power More...
 
uint8_t ina219_soft_reset (ina219_handle_t *handle)
 soft reset the chip More...
 
uint8_t ina219_set_bus_voltage_range (ina219_handle_t *handle, ina219_bus_voltage_range_t range)
 set the bus voltage range More...
 
uint8_t ina219_get_bus_voltage_range (ina219_handle_t *handle, ina219_bus_voltage_range_t *range)
 get the bus voltage range More...
 
uint8_t ina219_set_pga (ina219_handle_t *handle, ina219_pga_t pga)
 set the pga More...
 
uint8_t ina219_get_pga (ina219_handle_t *handle, ina219_pga_t *pga)
 get the pga More...
 
uint8_t ina219_set_bus_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t mode)
 set the bus voltage adc mode More...
 
uint8_t ina219_get_bus_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t *mode)
 get the bus voltage adc mode More...
 
uint8_t ina219_set_shunt_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t mode)
 set the shunt voltage adc mode More...
 
uint8_t ina219_get_shunt_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t *mode)
 get the shunt voltage adc mode More...
 
uint8_t ina219_set_mode (ina219_handle_t *handle, ina219_mode_t mode)
 set the mode More...
 
uint8_t ina219_get_mode (ina219_handle_t *handle, ina219_mode_t *mode)
 get the mode More...
 
uint8_t ina219_set_calibration (ina219_handle_t *handle, uint16_t data)
 set the calibration More...
 
uint8_t ina219_get_calibration (ina219_handle_t *handle, uint16_t *data)
 get the calibration More...
 
uint8_t ina219_calculate_calibration (ina219_handle_t *handle, uint16_t *calibration)
 calculate the calibration More...
 
uint8_t ina219_info (ina219_info_t *info)
 get chip's information
uint8_t ina219_set_addr_pin (ina219_handle_t *handle, ina219_address_t addr_pin)
 set the iic address pin
uint8_t ina219_get_addr_pin (ina219_handle_t *handle, ina219_address_t *addr_pin)
 get the iic address pin
uint8_t ina219_set_resistance (ina219_handle_t *handle, double resistance)
 set the resistance
uint8_t ina219_get_resistance (ina219_handle_t *handle, double *resistance)
 get the resistance
uint8_t ina219_init (ina219_handle_t *handle)
 initialize the chip
uint8_t ina219_deinit (ina219_handle_t *handle)
 close the chip
uint8_t ina219_read_shunt_voltage (ina219_handle_t *handle, int16_t *raw, float *mV)
 read the shunt voltage
uint8_t ina219_read_bus_voltage (ina219_handle_t *handle, uint16_t *raw, float *mV)
 read the bus voltage
uint8_t ina219_read_current (ina219_handle_t *handle, int16_t *raw, float *mA)
 read the current
uint8_t ina219_read_power (ina219_handle_t *handle, uint16_t *raw, float *mW)
 read the power
uint8_t ina219_soft_reset (ina219_handle_t *handle)
 soft reset the chip
uint8_t ina219_set_bus_voltage_range (ina219_handle_t *handle, ina219_bus_voltage_range_t range)
 set the bus voltage range
uint8_t ina219_get_bus_voltage_range (ina219_handle_t *handle, ina219_bus_voltage_range_t *range)
 get the bus voltage range
uint8_t ina219_set_pga (ina219_handle_t *handle, ina219_pga_t pga)
 set the pga
uint8_t ina219_get_pga (ina219_handle_t *handle, ina219_pga_t *pga)
 get the pga
uint8_t ina219_set_bus_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t mode)
 set the bus voltage adc mode
uint8_t ina219_get_bus_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t *mode)
 get the bus voltage adc mode
uint8_t ina219_set_shunt_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t mode)
 set the shunt voltage adc mode
uint8_t ina219_get_shunt_voltage_adc_mode (ina219_handle_t *handle, ina219_adc_mode_t *mode)
 get the shunt voltage adc mode
uint8_t ina219_set_mode (ina219_handle_t *handle, ina219_mode_t mode)
 set the mode
uint8_t ina219_get_mode (ina219_handle_t *handle, ina219_mode_t *mode)
 get the mode
uint8_t ina219_set_calibration (ina219_handle_t *handle, uint16_t data)
 set the calibration
uint8_t ina219_get_calibration (ina219_handle_t *handle, uint16_t *data)
 get the calibration
uint8_t ina219_calculate_calibration (ina219_handle_t *handle, uint16_t *calibration)
 calculate the calibration
-

Detailed Description

+

Detailed Description

ina219 basic driver modules

-

Typedef Documentation

- -

◆ ina219_handle_t

+

Typedef Documentation

+ +

◆ ina219_handle_t

@@ -283,14 +255,14 @@

-

◆ ina219_info_t

+ +

◆ ina219_info_t

- +
typedef struct ina219_info_s ina219_info_ttypedef struct ina219_info_s ina219_info_t
@@ -299,42 +271,42 @@

Enumeration Type Documentation

- -

◆ ina219_adc_mode_t

+

Enumeration Type Documentation

+ +

◆ ina219_adc_mode_t

ina219 adc mode enumeration definition

- - - - - - - - - - -
Enumerator
INA219_ADC_MODE_9_BIT_1_SAMPLES 

9 bit / 1 samples

+
Enumerator
INA219_ADC_MODE_9_BIT_1_SAMPLES 

9 bit / 1 samples

INA219_ADC_MODE_10_BIT_1_SAMPLES 

10 bit / 1 samples

+
INA219_ADC_MODE_10_BIT_1_SAMPLES 

10 bit / 1 samples

INA219_ADC_MODE_11_BIT_1_SAMPLES 

11 bit / 1 samples

+
INA219_ADC_MODE_11_BIT_1_SAMPLES 

11 bit / 1 samples

INA219_ADC_MODE_12_BIT_1_SAMPLES 

12 bit / 1 samples

+
INA219_ADC_MODE_12_BIT_1_SAMPLES 

12 bit / 1 samples

INA219_ADC_MODE_12_BIT_2_SAMPLES 

12 bit / 2 samples

+
INA219_ADC_MODE_12_BIT_2_SAMPLES 

12 bit / 2 samples

INA219_ADC_MODE_12_BIT_4_SAMPLES 

12 bit / 4 samples

+
INA219_ADC_MODE_12_BIT_4_SAMPLES 

12 bit / 4 samples

INA219_ADC_MODE_12_BIT_8_SAMPLES 

12 bit / 8 samples

+
INA219_ADC_MODE_12_BIT_8_SAMPLES 

12 bit / 8 samples

INA219_ADC_MODE_12_BIT_16_SAMPLES 

12 bit / 16 samples

+
INA219_ADC_MODE_12_BIT_16_SAMPLES 

12 bit / 16 samples

INA219_ADC_MODE_12_BIT_32_SAMPLES 

12 bit / 32 samples

+
INA219_ADC_MODE_12_BIT_32_SAMPLES 

12 bit / 32 samples

INA219_ADC_MODE_12_BIT_64_SAMPLES 

12 bit / 64 samples

+
INA219_ADC_MODE_12_BIT_64_SAMPLES 

12 bit / 64 samples

INA219_ADC_MODE_12_BIT_128_SAMPLES 

12 bit / 128 samples

+
INA219_ADC_MODE_12_BIT_128_SAMPLES 

12 bit / 128 samples

@@ -342,51 +314,51 @@

-

◆ ina219_address_t

+ +

◆ ina219_address_t

ina219 address enumeration definition

- - - - - - - - - - - - - - - -
Enumerator
INA219_ADDRESS_0 

A0 = GND, A1 = GND

+
Enumerator
INA219_ADDRESS_0 

A0 = GND, A1 = GND

INA219_ADDRESS_1 

A0 = VS+, A1 = GND

+
INA219_ADDRESS_1 

A0 = VS+, A1 = GND

INA219_ADDRESS_2 

A0 = SDA, A1 = GND

+
INA219_ADDRESS_2 

A0 = SDA, A1 = GND

INA219_ADDRESS_3 

A0 = SCL, A1 = GND

+
INA219_ADDRESS_3 

A0 = SCL, A1 = GND

INA219_ADDRESS_4 

A0 = GND, A1 = VS+

+
INA219_ADDRESS_4 

A0 = GND, A1 = VS+

INA219_ADDRESS_5 

A0 = VS+, A1 = VS+

+
INA219_ADDRESS_5 

A0 = VS+, A1 = VS+

INA219_ADDRESS_6 

A0 = SDA, A1 = VS+

+
INA219_ADDRESS_6 

A0 = SDA, A1 = VS+

INA219_ADDRESS_7 

A0 = SCL, A1 = VS+

+
INA219_ADDRESS_7 

A0 = SCL, A1 = VS+

INA219_ADDRESS_8 

A0 = GND, A1 = SDA

+
INA219_ADDRESS_8 

A0 = GND, A1 = SDA

INA219_ADDRESS_9 

A0 = VS+, A1 = SDA

+
INA219_ADDRESS_9 

A0 = VS+, A1 = SDA

INA219_ADDRESS_A 

A0 = SDA, A1 = SDA

+
INA219_ADDRESS_A 

A0 = SDA, A1 = SDA

INA219_ADDRESS_B 

A0 = SCL, A1 = SDA

+
INA219_ADDRESS_B 

A0 = SCL, A1 = SDA

INA219_ADDRESS_C 

A0 = GND, A1 = SCL

+
INA219_ADDRESS_C 

A0 = GND, A1 = SCL

INA219_ADDRESS_D 

A0 = VS+, A1 = SCL

+
INA219_ADDRESS_D 

A0 = VS+, A1 = SCL

INA219_ADDRESS_E 

A0 = SDA, A1 = SCL

+
INA219_ADDRESS_E 

A0 = SDA, A1 = SCL

INA219_ADDRESS_F 

A0 = SCL, A1 = SCL

+
INA219_ADDRESS_F 

A0 = SCL, A1 = SCL

@@ -394,23 +366,23 @@

-

◆ ina219_bus_voltage_range_t

+ +

◆ ina219_bus_voltage_range_t

ina219 bus voltage enumeration definition

- -
Enumerator
INA219_BUS_VOLTAGE_RANGE_16V 

±16V

+
Enumerator
INA219_BUS_VOLTAGE_RANGE_16V 

±16V

INA219_BUS_VOLTAGE_RANGE_32V 

±32V

+
INA219_BUS_VOLTAGE_RANGE_32V 

±32V

@@ -418,35 +390,35 @@

-

◆ ina219_mode_t

+ +

◆ ina219_mode_t

ina219 mode enumeration definition

- - - - - - - -
Enumerator
INA219_MODE_POWER_DOWN 

power down

+
Enumerator
INA219_MODE_POWER_DOWN 

power down

INA219_MODE_SHUNT_VOLTAGE_TRIGGERED 

shunt voltage triggered

+
INA219_MODE_SHUNT_VOLTAGE_TRIGGERED 

shunt voltage triggered

INA219_MODE_BUS_VOLTAGE_TRIGGERED 

bus voltage triggered

+
INA219_MODE_BUS_VOLTAGE_TRIGGERED 

bus voltage triggered

INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED 

shunt and bus triggered

+
INA219_MODE_SHUNT_BUS_VOLTAGE_TRIGGERED 

shunt and bus triggered

INA219_MODE_ADC_OFF 

adc off

+
INA219_MODE_ADC_OFF 

adc off

INA219_MODE_SHUNT_VOLTAGE_CONTINUOUS 

shunt voltage continuous

+
INA219_MODE_SHUNT_VOLTAGE_CONTINUOUS 

shunt voltage continuous

INA219_MODE_BUS_VOLTAGE_CONTINUOUS 

bus voltage continuous

+
INA219_MODE_BUS_VOLTAGE_CONTINUOUS 

bus voltage continuous

INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS 

shunt and bus voltage continuous

+
INA219_MODE_SHUNT_BUS_VOLTAGE_CONTINUOUS 

shunt and bus voltage continuous

@@ -454,27 +426,27 @@

-

◆ ina219_pga_t

+ +

◆ ina219_pga_t

- +
enum ina219_pga_tenum ina219_pga_t

ina219 pga enumeration definition

- - - -
Enumerator
INA219_PGA_40_MV 

±40 mV

+
Enumerator
INA219_PGA_40_MV 

±40 mV

INA219_PGA_80_MV 

±80 mV

+
INA219_PGA_80_MV 

±80 mV

INA219_PGA_160_MV 

±160 mV

+
INA219_PGA_160_MV 

±160 mV

INA219_PGA_320_MV 

±320 mV

+
INA219_PGA_320_MV 

±320 mV

@@ -482,9 +454,9 @@

Function Documentation

- -

◆ ina219_calculate_calibration()

+

Function Documentation

+ +

◆ ina219_calculate_calibration()

@@ -492,19 +464,12 @@

uint8_t ina219_calculate_calibration ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - uint16_t *  - calibration  - - - - ) - + uint16_t * calibration )

@@ -532,8 +497,8 @@

-

◆ ina219_deinit()

+ +

◆ ina219_deinit()

@@ -541,8 +506,7 @@

uint8_t ina219_deinit ( - ina219_handle_t *  - handle) + ina219_handle_t * handle) @@ -569,8 +533,8 @@

-

◆ ina219_get_addr_pin()

+ +

◆ ina219_get_addr_pin()

@@ -578,19 +542,12 @@

uint8_t ina219_get_addr_pin ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - ina219_address_t *  - addr_pin  - - - - ) - + ina219_address_t * addr_pin )

@@ -614,8 +571,8 @@

-

◆ ina219_get_bus_voltage_adc_mode()

+ +

◆ ina219_get_bus_voltage_adc_mode()

@@ -623,19 +580,12 @@

uint8_t ina219_get_bus_voltage_adc_mode ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - ina219_adc_mode_t *  - mode  - - - - ) - + ina219_adc_mode_t * mode )

@@ -661,8 +611,8 @@

-

◆ ina219_get_bus_voltage_range()

+ +

◆ ina219_get_bus_voltage_range()

@@ -670,19 +620,12 @@

uint8_t ina219_get_bus_voltage_range ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - ina219_bus_voltage_range_t *  - range  - - - - ) - + ina219_bus_voltage_range_t * range )

@@ -708,8 +651,8 @@

-

◆ ina219_get_calibration()

+ +

◆ ina219_get_calibration()

@@ -717,19 +660,12 @@

uint8_t ina219_get_calibration ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - uint16_t *  - data  - - - - ) - + uint16_t * data )

@@ -755,8 +691,8 @@

-

◆ ina219_get_mode()

+ +

◆ ina219_get_mode()

@@ -764,19 +700,12 @@

uint8_t ina219_get_mode ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - ina219_mode_t *  - mode  - - - - ) - + ina219_mode_t * mode )

@@ -802,8 +731,8 @@

-

◆ ina219_get_pga()

+ +

◆ ina219_get_pga()

@@ -811,19 +740,12 @@

uint8_t ina219_get_pga ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - ina219_pga_t *  - pga  - - - - ) - + ina219_pga_t * pga )

@@ -849,8 +771,8 @@

-

◆ ina219_get_resistance()

+ +

◆ ina219_get_resistance()

@@ -858,19 +780,12 @@

uint8_t ina219_get_resistance ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - double *  - resistance  - - - - ) - + double * resistance )

@@ -894,8 +809,8 @@

-

◆ ina219_get_shunt_voltage_adc_mode()

+ +

◆ ina219_get_shunt_voltage_adc_mode()

@@ -903,19 +818,12 @@

uint8_t ina219_get_shunt_voltage_adc_mode ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - ina219_adc_mode_t *  - mode  - - - - ) - + ina219_adc_mode_t * mode )

@@ -941,8 +849,8 @@

-

◆ ina219_info()

+ +

◆ ina219_info()

@@ -950,8 +858,7 @@

uint8_t ina219_info ( - ina219_info_t *  - info) + ina219_info_t * info) @@ -975,8 +882,8 @@

-

◆ ina219_init()

+ +

◆ ina219_init()

@@ -984,8 +891,7 @@

uint8_t ina219_init ( - ina219_handle_t *  - handle) + ina219_handle_t * handle) @@ -1012,8 +918,8 @@

-

◆ ina219_read_bus_voltage()

+ +

◆ ina219_read_bus_voltage()

@@ -1021,25 +927,17 @@

uint8_t ina219_read_bus_voltage ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - uint16_t *  - raw, + uint16_t * raw, - float *  - mV  - - - - ) - + float * mV )

@@ -1068,8 +966,8 @@

-

◆ ina219_read_current()

+ +

◆ ina219_read_current()

@@ -1077,25 +975,17 @@

uint8_t ina219_read_current ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - int16_t *  - raw, + int16_t * raw, - float *  - mA  - - - - ) - + float * mA )

@@ -1122,8 +1012,8 @@

-

◆ ina219_read_power()

+ +

◆ ina219_read_power()

@@ -1131,25 +1021,17 @@

uint8_t ina219_read_power ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - uint16_t *  - raw, + uint16_t * raw, - float *  - mW  - - - - ) - + float * mW )

@@ -1176,8 +1058,8 @@

-

◆ ina219_read_shunt_voltage()

+ +

◆ ina219_read_shunt_voltage()

@@ -1185,25 +1067,17 @@

uint8_t ina219_read_shunt_voltage ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - int16_t *  - raw, + int16_t * raw, - float *  - mV  - - - - ) - + float * mV )

@@ -1230,8 +1104,8 @@

-

◆ ina219_set_addr_pin()

+ +

◆ ina219_set_addr_pin()

@@ -1239,19 +1113,12 @@

uint8_t ina219_set_addr_pin ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - ina219_address_t  - addr_pin  - - - - ) - + ina219_address_t addr_pin )

@@ -1275,8 +1142,8 @@

-

◆ ina219_set_bus_voltage_adc_mode()

+ +

◆ ina219_set_bus_voltage_adc_mode()

@@ -1284,19 +1151,12 @@

uint8_t ina219_set_bus_voltage_adc_mode ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - ina219_adc_mode_t  - mode  - - - - ) - + ina219_adc_mode_t mode )

@@ -1322,8 +1182,8 @@

-

◆ ina219_set_bus_voltage_range()

+ +

◆ ina219_set_bus_voltage_range()

@@ -1331,19 +1191,12 @@

uint8_t ina219_set_bus_voltage_range ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - ina219_bus_voltage_range_t  - range  - - - - ) - + ina219_bus_voltage_range_t range )

@@ -1369,8 +1222,8 @@

-

◆ ina219_set_calibration()

+ +

◆ ina219_set_calibration()

@@ -1378,19 +1231,12 @@

uint8_t ina219_set_calibration ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - uint16_t  - data  - - - - ) - + uint16_t data )

@@ -1416,8 +1262,8 @@

-

◆ ina219_set_mode()

+ +

◆ ina219_set_mode()

@@ -1425,19 +1271,12 @@

uint8_t ina219_set_mode ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - ina219_mode_t  - mode  - - - - ) - + ina219_mode_t mode )

@@ -1463,8 +1302,8 @@

-

◆ ina219_set_pga()

+ +

◆ ina219_set_pga()

@@ -1472,19 +1311,12 @@

uint8_t ina219_set_pga ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - ina219_pga_t  - pga  - - - - ) - + ina219_pga_t pga )

@@ -1510,8 +1342,8 @@

-

◆ ina219_set_resistance()

+ +

◆ ina219_set_resistance()

@@ -1519,19 +1351,12 @@

uint8_t ina219_set_resistance ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - double  - resistance  - - - - ) - + double resistance )

@@ -1555,8 +1380,8 @@

-

◆ ina219_set_shunt_voltage_adc_mode()

+ +

◆ ina219_set_shunt_voltage_adc_mode()

@@ -1564,19 +1389,12 @@

uint8_t ina219_set_shunt_voltage_adc_mode ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - ina219_adc_mode_t  - mode  - - - - ) - + ina219_adc_mode_t mode )

@@ -1602,8 +1420,8 @@

-

◆ ina219_soft_reset()

+ +

◆ ina219_soft_reset()

@@ -1611,8 +1429,7 @@

uint8_t ina219_soft_reset ( - ina219_handle_t *  - handle) + ina219_handle_t * handle) @@ -1640,10 +1457,18 @@

+ + +

+
diff --git a/doc/html/group__ina219__basic__driver.md5 b/doc/html/group__ina219__basic__driver.md5 new file mode 100644 index 0000000..ad9dce3 --- /dev/null +++ b/doc/html/group__ina219__basic__driver.md5 @@ -0,0 +1 @@ +375e9d639d828d25409ec3946a2a1c37 \ No newline at end of file diff --git a/doc/html/group__ina219__basic__driver.svg b/doc/html/group__ina219__basic__driver.svg new file mode 100644 index 0000000..ed5b158 --- /dev/null +++ b/doc/html/group__ina219__basic__driver.svg @@ -0,0 +1,37 @@ + + + + + + +ina219 basic driver function + + +Node1 + + +ina219 basic driver + function + + + + + +Node2 + + +ina219 driver function + + + + + +Node2->Node1 + + + + + diff --git a/doc/html/group__ina219__driver.html b/doc/html/group__ina219__driver.html index d68d036..dad4179 100644 --- a/doc/html/group__ina219__driver.html +++ b/doc/html/group__ina219__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: ina219 driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +

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

ina219 driver modules More...

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

-Modules

+Topics

 
 ina219 basic driver function
 ina219 basic driver function
 ina219 basic driver modules
 
 ina219 extern driver function
 ina219 extern driver function
 ina219 extern driver modules
 
 ina219 interface driver function
 ina219 interface driver function
 ina219 interface driver modules
 
 ina219 example driver function
 ina219 example driver function
 ina219 example driver modules
 
 ina219 test driver function
 ina219 test driver function
 ina219 test driver modules
 
-

Detailed Description

+

Detailed Description

ina219 driver modules

+ +
diff --git a/doc/html/group__ina219__driver.md5 b/doc/html/group__ina219__driver.md5 new file mode 100644 index 0000000..b0eeb0b --- /dev/null +++ b/doc/html/group__ina219__driver.md5 @@ -0,0 +1 @@ +debc6a7e5b3d2ad065fedba9c5048124 \ No newline at end of file diff --git a/doc/html/group__ina219__driver.svg b/doc/html/group__ina219__driver.svg new file mode 100644 index 0000000..6b99e5d --- /dev/null +++ b/doc/html/group__ina219__driver.svg @@ -0,0 +1,117 @@ + + + + + + +ina219 driver function + + +Node3 + + +ina219 basic driver + function + + + + + +Node1 + + +ina219 driver function + + + + + +Node1->Node3 + + + + + +Node6 + + +ina219 example driver + function + + + + + +Node1->Node6 + + + + + +Node4 + + +ina219 extern driver + function + + + + + +Node1->Node4 + + + + + +Node5 + + +ina219 interface driver + function + + + + + +Node1->Node5 + + + + + +Node2 + + +ina219 link driver + function + + + + + +Node1->Node2 + + + + + +Node7 + + +ina219 test driver + function + + + + + +Node1->Node7 + + + + + diff --git a/doc/html/group__ina219__example__driver.html b/doc/html/group__ina219__example__driver.html index d1c0368..44d3eca 100644 --- a/doc/html/group__ina219__example__driver.html +++ b/doc/html/group__ina219__example__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: ina219 example driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@

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

ina219 example driver modules More...

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

+

Macros

#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_RANGE   INA219_BUS_VOLTAGE_RANGE_32V
 ina219 basic example default definition More...
 
#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
 
#define INA219_BASIC_DEFAULT_SHUNT_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
 
#define INA219_BASIC_DEFAULT_PGA   INA219_PGA_320_MV
 
#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_RANGE   INA219_BUS_VOLTAGE_RANGE_32V
 ina219 shot example default definition More...
 
#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
 
#define INA219_SHOT_DEFAULT_SHUNT_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
 
#define INA219_SHOT_DEFAULT_PGA   INA219_PGA_320_MV
 
#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_RANGE   INA219_BUS_VOLTAGE_RANGE_32V
 ina219 basic example default definition
#define INA219_BASIC_DEFAULT_BUS_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
#define INA219_BASIC_DEFAULT_SHUNT_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
#define INA219_BASIC_DEFAULT_PGA   INA219_PGA_320_MV
#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_RANGE   INA219_BUS_VOLTAGE_RANGE_32V
 ina219 shot example default definition
#define INA219_SHOT_DEFAULT_BUS_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
#define INA219_SHOT_DEFAULT_SHUNT_VOLTAGE_ADC_MODE   INA219_ADC_MODE_12_BIT_1_SAMPLES
#define INA219_SHOT_DEFAULT_PGA   INA219_PGA_320_MV
- - - - - - - - - - - - - - - - - - - + + + + + + + + + + + +

+

Functions

uint8_t ina219_basic_init (ina219_address_t addr_pin, double r)
 basic example init More...
 
uint8_t ina219_basic_deinit (void)
 basic example deinit More...
 
uint8_t ina219_basic_read (float *mV, float *mA, float *mW)
 basic example read More...
 
uint8_t ina219_shot_init (ina219_address_t addr_pin, double r)
 shot example init More...
 
uint8_t ina219_shot_deinit (void)
 shot example deinit More...
 
uint8_t ina219_shot_read (float *mV, float *mA, float *mW)
 shot example read More...
 
uint8_t ina219_basic_init (ina219_address_t addr_pin, double r)
 basic example init
uint8_t ina219_basic_deinit (void)
 basic example deinit
uint8_t ina219_basic_read (float *mV, float *mA, float *mW)
 basic example read
uint8_t ina219_shot_init (ina219_address_t addr_pin, double r)
 shot example init
uint8_t ina219_shot_deinit (void)
 shot example deinit
uint8_t ina219_shot_read (float *mV, float *mA, float *mW)
 shot example read
-

Detailed Description

+

Detailed Description

ina219 example driver modules

-

Macro Definition Documentation

- -

◆ INA219_BASIC_DEFAULT_BUS_VOLTAGE_ADC_MODE

+

Macro Definition Documentation

+ +

◆ INA219_BASIC_DEFAULT_BUS_VOLTAGE_ADC_MODE

@@ -157,8 +151,8 @@

-

◆ INA219_BASIC_DEFAULT_BUS_VOLTAGE_RANGE

+ +

◆ INA219_BASIC_DEFAULT_BUS_VOLTAGE_RANGE

@@ -176,8 +170,8 @@

-

◆ INA219_BASIC_DEFAULT_PGA

+ +

◆ INA219_BASIC_DEFAULT_PGA

@@ -193,8 +187,8 @@

-

◆ INA219_BASIC_DEFAULT_SHUNT_VOLTAGE_ADC_MODE

+ +

◆ INA219_BASIC_DEFAULT_SHUNT_VOLTAGE_ADC_MODE

@@ -210,8 +204,8 @@

-

◆ INA219_SHOT_DEFAULT_BUS_VOLTAGE_ADC_MODE

+ +

◆ INA219_SHOT_DEFAULT_BUS_VOLTAGE_ADC_MODE

@@ -227,8 +221,8 @@

-

◆ INA219_SHOT_DEFAULT_BUS_VOLTAGE_RANGE

+ +

◆ INA219_SHOT_DEFAULT_BUS_VOLTAGE_RANGE

@@ -246,8 +240,8 @@

-

◆ INA219_SHOT_DEFAULT_PGA

+ +

◆ INA219_SHOT_DEFAULT_PGA

@@ -263,8 +257,8 @@

-

◆ INA219_SHOT_DEFAULT_SHUNT_VOLTAGE_ADC_MODE

+ +

◆ INA219_SHOT_DEFAULT_SHUNT_VOLTAGE_ADC_MODE

@@ -280,9 +274,9 @@

Function Documentation

- -

◆ ina219_basic_deinit()

+

Function Documentation

+ +

◆ ina219_basic_deinit()

@@ -290,8 +284,7 @@

uint8_t ina219_basic_deinit ( - void  - ) + void ) @@ -306,11 +299,16 @@

Note
none

Definition at line 211 of file driver_ina219_basic.c.

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

- -

◆ ina219_basic_init()

+ +

◆ ina219_basic_init()

@@ -318,19 +316,12 @@

uint8_t ina219_basic_init ( - ina219_address_t  - addr_pin, + ina219_address_t addr_pin, - double  - r  - - - - ) - + double r )

@@ -351,11 +342,16 @@

Note
none

Definition at line 50 of file driver_ina219_basic.c.

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

- -

◆ ina219_basic_read()

+ +

◆ ina219_basic_read()

@@ -403,11 +391,16 @@

Note
none

Definition at line 174 of file driver_ina219_basic.c.

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

- -

◆ ina219_shot_deinit()

+ +

◆ ina219_shot_deinit()

@@ -415,8 +408,7 @@

uint8_t ina219_shot_deinit ( - void  - ) + void ) @@ -431,11 +423,16 @@

Note
none

Definition at line 208 of file driver_ina219_shot.c.

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

- -

◆ ina219_shot_init()

+ +

◆ ina219_shot_init()

@@ -443,19 +440,12 @@

uint8_t ina219_shot_init ( - ina219_address_t  - addr_pin, + ina219_address_t addr_pin, - double  - r  - - - - ) - + double r )

@@ -476,11 +466,16 @@

Note
none

Definition at line 50 of file driver_ina219_shot.c.

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

- -

◆ ina219_shot_read()

+ +

◆ ina219_shot_read()

@@ -528,15 +515,28 @@

Note
none

Definition at line 164 of file driver_ina219_shot.c.

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

+ +

diff --git a/doc/html/group__ina219__example__driver.md5 b/doc/html/group__ina219__example__driver.md5 new file mode 100644 index 0000000..b58fdbf --- /dev/null +++ b/doc/html/group__ina219__example__driver.md5 @@ -0,0 +1 @@ +39091e40923b942dcda3153fa22fbd9c \ No newline at end of file diff --git a/doc/html/group__ina219__example__driver.svg b/doc/html/group__ina219__example__driver.svg new file mode 100644 index 0000000..663c056 --- /dev/null +++ b/doc/html/group__ina219__example__driver.svg @@ -0,0 +1,37 @@ + + + + + + +ina219 example driver function + + +Node2 + + +ina219 driver function + + + + + +Node1 + + +ina219 example driver + function + + + + + +Node2->Node1 + + + + + diff --git a/doc/html/group__ina219__example__driver_ga183ceadd9ba0525f034b5f3b9aa80058_cgraph.md5 b/doc/html/group__ina219__example__driver_ga183ceadd9ba0525f034b5f3b9aa80058_cgraph.md5 new file mode 100644 index 0000000..a4fcce2 --- /dev/null +++ b/doc/html/group__ina219__example__driver_ga183ceadd9ba0525f034b5f3b9aa80058_cgraph.md5 @@ -0,0 +1 @@ +2b75c2eb1bfb4535818c249d0c590aa6 \ No newline at end of file diff --git a/doc/html/group__ina219__example__driver_ga183ceadd9ba0525f034b5f3b9aa80058_cgraph.svg b/doc/html/group__ina219__example__driver_ga183ceadd9ba0525f034b5f3b9aa80058_cgraph.svg new file mode 100644 index 0000000..b6c39e3 --- /dev/null +++ b/doc/html/group__ina219__example__driver_ga183ceadd9ba0525f034b5f3b9aa80058_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ina219_basic_deinit + + +Node1 + + +ina219_basic_deinit + + + + + +Node2 + + +ina219_deinit + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ina219__example__driver_ga3e812a052aa6bc8e73aff5ff1310210e_cgraph.md5 b/doc/html/group__ina219__example__driver_ga3e812a052aa6bc8e73aff5ff1310210e_cgraph.md5 new file mode 100644 index 0000000..de51b6a --- /dev/null +++ b/doc/html/group__ina219__example__driver_ga3e812a052aa6bc8e73aff5ff1310210e_cgraph.md5 @@ -0,0 +1 @@ +ab2daeea4801b831b185e9f356039204 \ No newline at end of file diff --git a/doc/html/group__ina219__example__driver_ga3e812a052aa6bc8e73aff5ff1310210e_cgraph.svg b/doc/html/group__ina219__example__driver_ga3e812a052aa6bc8e73aff5ff1310210e_cgraph.svg new file mode 100644 index 0000000..cda1125 --- /dev/null +++ b/doc/html/group__ina219__example__driver_ga3e812a052aa6bc8e73aff5ff1310210e_cgraph.svg @@ -0,0 +1,93 @@ + + + + + + +ina219_shot_read + + +Node1 + + +ina219_shot_read + + + + + +Node2 + + +ina219_read_bus_voltage + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ina219_read_current + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +ina219_read_power + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +ina219_set_mode + + + + + +Node1->Node5 + + + + + + + + diff --git a/doc/html/group__ina219__example__driver_ga5ceea32b188cca0c2fb5e3391947946c_cgraph.md5 b/doc/html/group__ina219__example__driver_ga5ceea32b188cca0c2fb5e3391947946c_cgraph.md5 new file mode 100644 index 0000000..8214842 --- /dev/null +++ b/doc/html/group__ina219__example__driver_ga5ceea32b188cca0c2fb5e3391947946c_cgraph.md5 @@ -0,0 +1 @@ +1c970f327da94fb680b79d5b50b3d034 \ No newline at end of file diff --git a/doc/html/group__ina219__example__driver_ga5ceea32b188cca0c2fb5e3391947946c_cgraph.svg b/doc/html/group__ina219__example__driver_ga5ceea32b188cca0c2fb5e3391947946c_cgraph.svg new file mode 100644 index 0000000..61af16a --- /dev/null +++ b/doc/html/group__ina219__example__driver_ga5ceea32b188cca0c2fb5e3391947946c_cgraph.svg @@ -0,0 +1,315 @@ + + + + + + +ina219_shot_init + + +Node1 + + +ina219_shot_init + + + + + +Node2 + + +ina219_calculate_calibration + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ina219_deinit + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +ina219_init + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +ina219_interface_debug +_print + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +ina219_interface_delay_ms + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +ina219_interface_iic +_deinit + + + + + +Node1->Node7 + + + + + + + + +Node8 + + +ina219_interface_iic_init + + + + + +Node1->Node8 + + + + + + + + +Node9 + + +ina219_interface_iic_read + + + + + +Node1->Node9 + + + + + + + + +Node10 + + +ina219_interface_iic +_write + + + + + +Node1->Node10 + + + + + + + + +Node11 + + +ina219_set_addr_pin + + + + + +Node1->Node11 + + + + + + + + +Node12 + + +ina219_set_bus_voltage +_adc_mode + + + + + +Node1->Node12 + + + + + + + + +Node13 + + +ina219_set_bus_voltage +_range + + + + + +Node1->Node13 + + + + + + + + +Node14 + + +ina219_set_calibration + + + + + +Node1->Node14 + + + + + + + + +Node15 + + +ina219_set_pga + + + + + +Node1->Node15 + + + + + + + + +Node16 + + +ina219_set_resistance + + + + + +Node1->Node16 + + + + + + + + +Node17 + + +ina219_set_shunt_voltage +_adc_mode + + + + + +Node1->Node17 + + + + + + + + diff --git a/doc/html/group__ina219__example__driver_gaa87b67aed8b0171c67ec0db171ec8085_cgraph.md5 b/doc/html/group__ina219__example__driver_gaa87b67aed8b0171c67ec0db171ec8085_cgraph.md5 new file mode 100644 index 0000000..b491fd7 --- /dev/null +++ b/doc/html/group__ina219__example__driver_gaa87b67aed8b0171c67ec0db171ec8085_cgraph.md5 @@ -0,0 +1 @@ +85f56b568df1001b9697fbbb48746fae \ No newline at end of file diff --git a/doc/html/group__ina219__example__driver_gaa87b67aed8b0171c67ec0db171ec8085_cgraph.svg b/doc/html/group__ina219__example__driver_gaa87b67aed8b0171c67ec0db171ec8085_cgraph.svg new file mode 100644 index 0000000..9b8e7fa --- /dev/null +++ b/doc/html/group__ina219__example__driver_gaa87b67aed8b0171c67ec0db171ec8085_cgraph.svg @@ -0,0 +1,75 @@ + + + + + + +ina219_basic_read + + +Node1 + + +ina219_basic_read + + + + + +Node2 + + +ina219_read_bus_voltage + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ina219_read_current + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +ina219_read_power + + + + + +Node1->Node4 + + + + + + + + diff --git a/doc/html/group__ina219__example__driver_gae2ddc7fe5d3e24cbd20eaa6957b2fecf_cgraph.md5 b/doc/html/group__ina219__example__driver_gae2ddc7fe5d3e24cbd20eaa6957b2fecf_cgraph.md5 new file mode 100644 index 0000000..fda7731 --- /dev/null +++ b/doc/html/group__ina219__example__driver_gae2ddc7fe5d3e24cbd20eaa6957b2fecf_cgraph.md5 @@ -0,0 +1 @@ +e88188ab34b32f6ce193dc9a5ef7275f \ No newline at end of file diff --git a/doc/html/group__ina219__example__driver_gae2ddc7fe5d3e24cbd20eaa6957b2fecf_cgraph.svg b/doc/html/group__ina219__example__driver_gae2ddc7fe5d3e24cbd20eaa6957b2fecf_cgraph.svg new file mode 100644 index 0000000..ebde72e --- /dev/null +++ b/doc/html/group__ina219__example__driver_gae2ddc7fe5d3e24cbd20eaa6957b2fecf_cgraph.svg @@ -0,0 +1,39 @@ + + + + + + +ina219_shot_deinit + + +Node1 + + +ina219_shot_deinit + + + + + +Node2 + + +ina219_deinit + + + + + +Node1->Node2 + + + + + + + + diff --git a/doc/html/group__ina219__example__driver_gaed4ee6c678f7f9a35cc582d8541497ae_cgraph.md5 b/doc/html/group__ina219__example__driver_gaed4ee6c678f7f9a35cc582d8541497ae_cgraph.md5 new file mode 100644 index 0000000..e9239a9 --- /dev/null +++ b/doc/html/group__ina219__example__driver_gaed4ee6c678f7f9a35cc582d8541497ae_cgraph.md5 @@ -0,0 +1 @@ +c84ea4fdf7be4f39319a28fab691783c \ No newline at end of file diff --git a/doc/html/group__ina219__example__driver_gaed4ee6c678f7f9a35cc582d8541497ae_cgraph.svg b/doc/html/group__ina219__example__driver_gaed4ee6c678f7f9a35cc582d8541497ae_cgraph.svg new file mode 100644 index 0000000..d03833b --- /dev/null +++ b/doc/html/group__ina219__example__driver_gaed4ee6c678f7f9a35cc582d8541497ae_cgraph.svg @@ -0,0 +1,333 @@ + + + + + + +ina219_basic_init + + +Node1 + + +ina219_basic_init + + + + + +Node2 + + +ina219_calculate_calibration + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ina219_deinit + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +ina219_init + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +ina219_interface_debug +_print + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +ina219_interface_delay_ms + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +ina219_interface_iic +_deinit + + + + + +Node1->Node7 + + + + + + + + +Node8 + + +ina219_interface_iic_init + + + + + +Node1->Node8 + + + + + + + + +Node9 + + +ina219_interface_iic_read + + + + + +Node1->Node9 + + + + + + + + +Node10 + + +ina219_interface_iic +_write + + + + + +Node1->Node10 + + + + + + + + +Node11 + + +ina219_set_addr_pin + + + + + +Node1->Node11 + + + + + + + + +Node12 + + +ina219_set_bus_voltage +_adc_mode + + + + + +Node1->Node12 + + + + + + + + +Node13 + + +ina219_set_bus_voltage +_range + + + + + +Node1->Node13 + + + + + + + + +Node14 + + +ina219_set_calibration + + + + + +Node1->Node14 + + + + + + + + +Node15 + + +ina219_set_mode + + + + + +Node1->Node15 + + + + + + + + +Node16 + + +ina219_set_pga + + + + + +Node1->Node16 + + + + + + + + +Node17 + + +ina219_set_resistance + + + + + +Node1->Node17 + + + + + + + + +Node18 + + +ina219_set_shunt_voltage +_adc_mode + + + + + +Node1->Node18 + + + + + + + + diff --git a/doc/html/group__ina219__extern__driver.html b/doc/html/group__ina219__extern__driver.html index fa4047e..26efc4d 100644 --- a/doc/html/group__ina219__extern__driver.html +++ b/doc/html/group__ina219__extern__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: ina219 extern driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@

+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
ina219 extern driver function
+
ina219 extern driver function

ina219 extern driver modules More...

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

+

Functions

uint8_t ina219_set_reg (ina219_handle_t *handle, uint8_t reg, uint16_t data)
 set the chip register More...
 
uint8_t ina219_get_reg (ina219_handle_t *handle, uint8_t reg, uint16_t *data)
 get the chip register More...
 
uint8_t ina219_set_reg (ina219_handle_t *handle, uint8_t reg, uint16_t data)
 set the chip register
uint8_t ina219_get_reg (ina219_handle_t *handle, uint8_t reg, uint16_t *data)
 get the chip register
-

Detailed Description

+

Detailed Description

ina219 extern driver modules

-

Function Documentation

- -

◆ ina219_get_reg()

+

Function Documentation

+ +

◆ ina219_get_reg()

@@ -115,25 +122,17 @@

uint8_t ina219_get_reg ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - uint8_t  - reg, + uint8_t reg, - uint16_t *  - data  - - - - ) - + uint16_t * data )

@@ -160,8 +159,8 @@

-

◆ ina219_set_reg()

+ +

◆ ina219_set_reg()

@@ -169,25 +168,17 @@

uint8_t ina219_set_reg ( - ina219_handle_t *  - handle, + ina219_handle_t * handle, - uint8_t  - reg, + uint8_t reg, - uint16_t  - data  - - - - ) - + uint16_t data )

@@ -216,10 +207,18 @@

+ + +

+
diff --git a/doc/html/group__ina219__extern__driver.md5 b/doc/html/group__ina219__extern__driver.md5 new file mode 100644 index 0000000..73715cd --- /dev/null +++ b/doc/html/group__ina219__extern__driver.md5 @@ -0,0 +1 @@ +b03148d3193f8a03494ed86bb36ff986 \ No newline at end of file diff --git a/doc/html/group__ina219__extern__driver.svg b/doc/html/group__ina219__extern__driver.svg new file mode 100644 index 0000000..c3df8a3 --- /dev/null +++ b/doc/html/group__ina219__extern__driver.svg @@ -0,0 +1,37 @@ + + + + + + +ina219 extern driver function + + +Node2 + + +ina219 driver function + + + + + +Node1 + + +ina219 extern driver + function + + + + + +Node2->Node1 + + + + + diff --git a/doc/html/group__ina219__interface__driver.html b/doc/html/group__ina219__interface__driver.html index e32c323..90a6c3f 100644 --- a/doc/html/group__ina219__interface__driver.html +++ b/doc/html/group__ina219__interface__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: ina219 interface driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +

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

ina219 interface driver modules More...

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

+

Functions

uint8_t ina219_interface_iic_init (void)
 interface iic bus init More...
 
uint8_t ina219_interface_iic_deinit (void)
 interface iic bus deinit More...
 
uint8_t ina219_interface_iic_read (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus read More...
 
uint8_t ina219_interface_iic_write (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus write More...
 
void ina219_interface_delay_ms (uint32_t ms)
 interface delay ms More...
 
void ina219_interface_debug_print (const char *const fmt,...)
 interface print format data More...
 
uint8_t ina219_interface_iic_init (void)
 interface iic bus init
uint8_t ina219_interface_iic_deinit (void)
 interface iic bus deinit
uint8_t ina219_interface_iic_read (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus read
uint8_t ina219_interface_iic_write (uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
 interface iic bus write
void ina219_interface_delay_ms (uint32_t ms)
 interface delay ms
void ina219_interface_debug_print (const char *const fmt,...)
 interface print format data
-

Detailed Description

+

Detailed Description

ina219 interface driver modules

-

Function Documentation

- -

◆ ina219_interface_debug_print()

+

Function Documentation

+ +

◆ ina219_interface_debug_print()

@@ -157,8 +153,8 @@

-

◆ ina219_interface_delay_ms()

+ +

◆ ina219_interface_delay_ms()

@@ -166,8 +162,7 @@

void ina219_interface_delay_ms ( - uint32_t  - ms) + uint32_t ms) @@ -186,8 +181,8 @@

-

◆ ina219_interface_iic_deinit()

+ +

◆ ina219_interface_iic_deinit()

@@ -195,8 +190,7 @@

uint8_t ina219_interface_iic_deinit ( - void  - ) + void ) @@ -214,8 +208,8 @@

-

◆ ina219_interface_iic_init()

+ +

◆ ina219_interface_iic_init()

@@ -223,8 +217,7 @@

uint8_t ina219_interface_iic_init ( - void  - ) + void ) @@ -242,8 +235,8 @@

-

◆ ina219_interface_iic_read()

+ +

◆ ina219_interface_iic_read()

@@ -301,8 +285,8 @@

-

◆ ina219_interface_iic_write()

+ +

◆ ina219_interface_iic_write()

diff --git a/doc/html/group__ina219__interface__driver.md5 b/doc/html/group__ina219__interface__driver.md5 new file mode 100644 index 0000000..f9bd69a --- /dev/null +++ b/doc/html/group__ina219__interface__driver.md5 @@ -0,0 +1 @@ +52af7ead2f06e215e091cf8d24c996bf \ No newline at end of file diff --git a/doc/html/group__ina219__interface__driver.svg b/doc/html/group__ina219__interface__driver.svg new file mode 100644 index 0000000..3d510d1 --- /dev/null +++ b/doc/html/group__ina219__interface__driver.svg @@ -0,0 +1,37 @@ + + + + + + +ina219 interface driver function + + +Node2 + + +ina219 driver function + + + + + +Node1 + + +ina219 interface driver + function + + + + + +Node2->Node1 + + + + + diff --git a/doc/html/group__ina219__link__driver.html b/doc/html/group__ina219__link__driver.html index 3153664..557430a 100644 --- a/doc/html/group__ina219__link__driver.html +++ b/doc/html/group__ina219__link__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: ina219 link driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
ina219 link driver function
+
ina219 link driver function

ina219 link driver modules More...

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

+

Macros

#define DRIVER_INA219_LINK_INIT(HANDLE, STRUCTURE)   memset(HANDLE, 0, sizeof(STRUCTURE))
 initialize ina219_handle_t structure More...
 
#define DRIVER_INA219_LINK_IIC_INIT(HANDLE, FUC)   (HANDLE)->iic_init = FUC
 link iic_init function More...
 
#define DRIVER_INA219_LINK_IIC_DEINIT(HANDLE, FUC)   (HANDLE)->iic_deinit = FUC
 link iic_deinit function More...
 
#define DRIVER_INA219_LINK_IIC_READ(HANDLE, FUC)   (HANDLE)->iic_read = FUC
 link iic_read function More...
 
#define DRIVER_INA219_LINK_IIC_WRITE(HANDLE, FUC)   (HANDLE)->iic_write = FUC
 link iic_write function More...
 
#define DRIVER_INA219_LINK_DELAY_MS(HANDLE, FUC)   (HANDLE)->delay_ms = FUC
 link delay_ms function More...
 
#define DRIVER_INA219_LINK_DEBUG_PRINT(HANDLE, FUC)   (HANDLE)->debug_print = FUC
 link debug_print function More...
 
#define DRIVER_INA219_LINK_INIT(HANDLE, STRUCTURE)
 initialize ina219_handle_t structure
#define DRIVER_INA219_LINK_IIC_INIT(HANDLE, FUC)
 link iic_init function
#define DRIVER_INA219_LINK_IIC_DEINIT(HANDLE, FUC)
 link iic_deinit function
#define DRIVER_INA219_LINK_IIC_READ(HANDLE, FUC)
 link iic_read function
#define DRIVER_INA219_LINK_IIC_WRITE(HANDLE, FUC)
 link iic_write function
#define DRIVER_INA219_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_INA219_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function
-

Detailed Description

+

Detailed Description

ina219 link driver modules

-

Macro Definition Documentation

- -

◆ DRIVER_INA219_LINK_DEBUG_PRINT

+

Macro Definition Documentation

+ +

◆ DRIVER_INA219_LINK_DEBUG_PRINT

- -

initialize ina219_handle_t structure

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

initialize ina219_handle_t structure

Parameters
- +
[in]HANDLEpointer to an ina219 handle structure
[in]STRUCTUREina219_handle_t
[in]STRUCTUREina219_handle_t
@@ -403,10 +363,18 @@

+ + +

+
diff --git a/doc/html/group__ina219__link__driver.md5 b/doc/html/group__ina219__link__driver.md5 new file mode 100644 index 0000000..ffd6945 --- /dev/null +++ b/doc/html/group__ina219__link__driver.md5 @@ -0,0 +1 @@ +912ee7f947edb1d7f379ebb111adfbb2 \ No newline at end of file diff --git a/doc/html/group__ina219__link__driver.svg b/doc/html/group__ina219__link__driver.svg new file mode 100644 index 0000000..56232ed --- /dev/null +++ b/doc/html/group__ina219__link__driver.svg @@ -0,0 +1,37 @@ + + + + + + +ina219 link driver function + + +Node2 + + +ina219 driver function + + + + + +Node1 + + +ina219 link driver + function + + + + + +Node2->Node1 + + + + + diff --git a/doc/html/group__ina219__test__driver.html b/doc/html/group__ina219__test__driver.html index cad19ee..b8360ab 100644 --- a/doc/html/group__ina219__test__driver.html +++ b/doc/html/group__ina219__test__driver.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: ina219 test driver function + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
- -
-
ina219 test driver function
+
ina219 test driver function

ina219 test driver modules More...

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

+

Functions

uint8_t ina219_read_test (ina219_address_t addr_pin, double r, uint32_t times)
 read test More...
 
uint8_t ina219_register_test (ina219_address_t addr_pin)
 register test More...
 
uint8_t ina219_read_test (ina219_address_t addr_pin, double r, uint32_t times)
 read test
uint8_t ina219_register_test (ina219_address_t addr_pin)
 register test
-

Detailed Description

+

Detailed Description

ina219 test driver modules

-

Function Documentation

- -

◆ ina219_read_test()

+

Function Documentation

+ +

◆ ina219_read_test()

@@ -115,25 +122,17 @@

uint8_t ina219_read_test ( - ina219_address_t  - addr_pin, + ina219_address_t addr_pin, - double  - r, + double r, - uint32_t  - times  - - - - ) - + uint32_t times )

@@ -155,11 +154,16 @@

Note
none

Definition at line 51 of file driver_ina219_read_test.c.

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

- -

◆ ina219_register_test()

+ +

◆ ina219_register_test()

@@ -167,8 +171,7 @@

uint8_t ina219_register_test ( - ina219_address_t  - addr_pin) + ina219_address_t addr_pin) @@ -189,15 +192,28 @@

Note
none

Definition at line 50 of file driver_ina219_register_test.c.

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

+ +
diff --git a/doc/html/group__ina219__test__driver.md5 b/doc/html/group__ina219__test__driver.md5 new file mode 100644 index 0000000..622ed6f --- /dev/null +++ b/doc/html/group__ina219__test__driver.md5 @@ -0,0 +1 @@ +9e534de1a1e913fc89b74c7b0a2bcbc3 \ No newline at end of file diff --git a/doc/html/group__ina219__test__driver.svg b/doc/html/group__ina219__test__driver.svg new file mode 100644 index 0000000..bd90eb5 --- /dev/null +++ b/doc/html/group__ina219__test__driver.svg @@ -0,0 +1,37 @@ + + + + + + +ina219 test driver function + + +Node2 + + +ina219 driver function + + + + + +Node1 + + +ina219 test driver + function + + + + + +Node2->Node1 + + + + + diff --git a/doc/html/group__ina219__test__driver_ga138f2304682f048f17519f4c88d4449c_cgraph.md5 b/doc/html/group__ina219__test__driver_ga138f2304682f048f17519f4c88d4449c_cgraph.md5 new file mode 100644 index 0000000..69e9699 --- /dev/null +++ b/doc/html/group__ina219__test__driver_ga138f2304682f048f17519f4c88d4449c_cgraph.md5 @@ -0,0 +1 @@ +d6900a9a15d367f467e1d53e8a1d15ea \ No newline at end of file diff --git a/doc/html/group__ina219__test__driver_ga138f2304682f048f17519f4c88d4449c_cgraph.svg b/doc/html/group__ina219__test__driver_ga138f2304682f048f17519f4c88d4449c_cgraph.svg new file mode 100644 index 0000000..ab68957 --- /dev/null +++ b/doc/html/group__ina219__test__driver_ga138f2304682f048f17519f4c88d4449c_cgraph.svg @@ -0,0 +1,516 @@ + + + + + + +ina219_register_test + + +Node1 + + +ina219_register_test + + + + + +Node2 + + +ina219_calculate_calibration + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ina219_deinit + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +ina219_get_addr_pin + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +ina219_get_bus_voltage +_adc_mode + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +ina219_get_bus_voltage +_range + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +ina219_get_calibration + + + + + +Node1->Node7 + + + + + + + + +Node8 + + +ina219_get_mode + + + + + +Node1->Node8 + + + + + + + + +Node9 + + +ina219_get_pga + + + + + +Node1->Node9 + + + + + + + + +Node10 + + +ina219_get_resistance + + + + + +Node1->Node10 + + + + + + + + +Node11 + + +ina219_get_shunt_voltage +_adc_mode + + + + + +Node1->Node11 + + + + + + + + +Node12 + + +ina219_info + + + + + +Node1->Node12 + + + + + + + + +Node13 + + +ina219_init + + + + + +Node1->Node13 + + + + + + + + +Node14 + + +ina219_interface_debug +_print + + + + + +Node1->Node14 + + + + + + + + +Node15 + + +ina219_interface_delay_ms + + + + + +Node1->Node15 + + + + + + + + +Node16 + + +ina219_interface_iic +_deinit + + + + + +Node1->Node16 + + + + + + + + +Node17 + + +ina219_interface_iic_init + + + + + +Node1->Node17 + + + + + + + + +Node18 + + +ina219_interface_iic_read + + + + + +Node1->Node18 + + + + + + + + +Node19 + + +ina219_interface_iic +_write + + + + + +Node1->Node19 + + + + + + + + +Node20 + + +ina219_set_addr_pin + + + + + +Node1->Node20 + + + + + + + + +Node21 + + +ina219_set_bus_voltage +_adc_mode + + + + + +Node1->Node21 + + + + + + + + +Node22 + + +ina219_set_bus_voltage +_range + + + + + +Node1->Node22 + + + + + + + + +Node23 + + +ina219_set_calibration + + + + + +Node1->Node23 + + + + + + + + +Node24 + + +ina219_set_mode + + + + + +Node1->Node24 + + + + + + + + +Node25 + + +ina219_set_pga + + + + + +Node1->Node25 + + + + + + + + +Node26 + + +ina219_set_resistance + + + + + +Node1->Node26 + + + + + + + + +Node27 + + +ina219_set_shunt_voltage +_adc_mode + + + + + +Node1->Node27 + + + + + + + + +Node28 + + +ina219_soft_reset + + + + + +Node1->Node28 + + + + + + + + diff --git a/doc/html/group__ina219__test__driver_gadadaf875601015be4418d9a876c28a80_cgraph.md5 b/doc/html/group__ina219__test__driver_gadadaf875601015be4418d9a876c28a80_cgraph.md5 new file mode 100644 index 0000000..a10a8d2 --- /dev/null +++ b/doc/html/group__ina219__test__driver_gadadaf875601015be4418d9a876c28a80_cgraph.md5 @@ -0,0 +1 @@ +494395b3c479d3158cc426293695fb72 \ No newline at end of file diff --git a/doc/html/group__ina219__test__driver_gadadaf875601015be4418d9a876c28a80_cgraph.svg b/doc/html/group__ina219__test__driver_gadadaf875601015be4418d9a876c28a80_cgraph.svg new file mode 100644 index 0000000..f0567b5 --- /dev/null +++ b/doc/html/group__ina219__test__driver_gadadaf875601015be4418d9a876c28a80_cgraph.svg @@ -0,0 +1,423 @@ + + + + + + +ina219_read_test + + +Node1 + + +ina219_read_test + + + + + +Node2 + + +ina219_calculate_calibration + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +ina219_deinit + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +ina219_info + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +ina219_init + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +ina219_interface_debug +_print + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +ina219_interface_delay_ms + + + + + +Node1->Node7 + + + + + + + + +Node8 + + +ina219_interface_iic +_deinit + + + + + +Node1->Node8 + + + + + + + + +Node9 + + +ina219_interface_iic_init + + + + + +Node1->Node9 + + + + + + + + +Node10 + + +ina219_interface_iic_read + + + + + +Node1->Node10 + + + + + + + + +Node11 + + +ina219_interface_iic +_write + + + + + +Node1->Node11 + + + + + + + + +Node12 + + +ina219_read_bus_voltage + + + + + +Node1->Node12 + + + + + + + + +Node13 + + +ina219_read_current + + + + + +Node1->Node13 + + + + + + + + +Node14 + + +ina219_read_power + + + + + +Node1->Node14 + + + + + + + + +Node15 + + +ina219_read_shunt_voltage + + + + + +Node1->Node15 + + + + + + + + +Node16 + + +ina219_set_addr_pin + + + + + +Node1->Node16 + + + + + + + + +Node17 + + +ina219_set_bus_voltage +_adc_mode + + + + + +Node1->Node17 + + + + + + + + +Node18 + + +ina219_set_bus_voltage +_range + + + + + +Node1->Node18 + + + + + + + + +Node19 + + +ina219_set_calibration + + + + + +Node1->Node19 + + + + + + + + +Node20 + + +ina219_set_mode + + + + + +Node1->Node20 + + + + + + + + +Node21 + + +ina219_set_pga + + + + + +Node1->Node21 + + + + + + + + +Node22 + + +ina219_set_resistance + + + + + +Node1->Node22 + + + + + + + + +Node23 + + +ina219_set_shunt_voltage +_adc_mode + + + + + +Node1->Node23 + + + + + + + + diff --git a/doc/html/index.html b/doc/html/index.html index 6a74593..c48528a 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: LibDriver INA219 + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 full-featured driver
- + + +
@@ -64,10 +65,9 @@
+
- +
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
-
-
-
LibDriver INA219
+
+
LibDriver INA219
-

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

Version
1.0.0
+

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

+
Version
1.0.0
Author
Shifeng Li

History

@@ -103,12 +110,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 036962c..b97c38d 100644 --- a/doc/html/mainpage_8h.html +++ b/doc/html/mainpage_8h.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: doc/mainpage/mainpage.h File Reference + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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 28629c4..682cdaf 100644 --- a/doc/html/mainpage_8h_source.html +++ b/doc/html/mainpage_8h_source.html @@ -1,21 +1,24 @@ - + - - + + LibDriver INA219: doc/mainpage/mainpage.h Source File + + - + + @@ -23,34 +26,32 @@
- - - + +
+
LibDriver INA219 -  1.0.0
-
INA219 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+='