-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee85033
commit 5efeb29
Showing
20 changed files
with
1,235 additions
and
255 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version='1.0' encoding='UTF-8' standalone='no'?> | ||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="__arduino_s_m_bus_8cpp" xml:lang="en-US"> | ||
<title>C:/Users/Chris Lee/Sync/Personal Projects/p2024-005 - ArduinoSMBus/ArduinoSMBus/src/ArduinoSMBus.cpp File Reference</title> | ||
<indexterm><primary>C:/Users/Chris Lee/Sync/Personal Projects/p2024-005 - ArduinoSMBus/ArduinoSMBus/src/ArduinoSMBus.cpp</primary></indexterm> | ||
<para> | ||
|
||
<para>Function definitions for the <link linkend="_class_arduino_s_m_bus">ArduinoSMBus</link> class. </para> | ||
|
||
</para> | ||
<programlisting linenumbering="unnumbered">#include "ArduinoSMBus.h"<?linebreak?></programlisting><section> | ||
<title>Detailed Description</title> | ||
|
||
<para>Function definitions for the <link linkend="_class_arduino_s_m_bus">ArduinoSMBus</link> class. </para> | ||
|
||
<para><formalpara><title>Author</title> | ||
|
||
<para>Christopher Lee (<link xlink:href="mailto:[email protected]">[email protected]</link>) </para> | ||
</formalpara> | ||
<formalpara><title>Version</title> | ||
|
||
<para>1.0 </para> | ||
</formalpara> | ||
<formalpara><title>Date</title> | ||
|
||
<para>2024-02-29</para> | ||
</formalpara> | ||
<formalpara><title>Copyright</title> | ||
|
||
<para>Copyright (c) 2024 </para> | ||
</formalpara> | ||
</para> | ||
</section> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?xml version='1.0' encoding='UTF-8' standalone='no'?> | ||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="__arduino_s_m_bus_8h" xml:lang="en-US"> | ||
<title>C:/Users/Chris Lee/Sync/Personal Projects/p2024-005 - ArduinoSMBus/ArduinoSMBus/src/ArduinoSMBus.h File Reference</title> | ||
<indexterm><primary>C:/Users/Chris Lee/Sync/Personal Projects/p2024-005 - ArduinoSMBus/ArduinoSMBus/src/ArduinoSMBus.h</primary></indexterm> | ||
<para> | ||
|
||
<para>Function declarations for the <link linkend="_class_arduino_s_m_bus">ArduinoSMBus</link> class. </para> | ||
|
||
</para> | ||
<programlisting linenumbering="unnumbered">#include <Arduino.h><?linebreak?>#include <Wire.h><?linebreak?></programlisting><simplesect> | ||
<title>Classes </title> | ||
<itemizedlist> | ||
<listitem><para>class <link linkend="_class_arduino_s_m_bus">ArduinoSMBus</link></para> | ||
</listitem> | ||
</itemizedlist> | ||
</simplesect> | ||
<simplesect> | ||
<title>Macros </title> | ||
<itemizedlist> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1af4e8dcb1c210baad2e179d49669eabff"/>#define <emphasis role="strong">TEMPERATURE</emphasis>   0x08</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a95f77a4b46f8270143622e8f7de8faa7"/>#define <emphasis role="strong">VOLTAGE</emphasis>   0x09</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a1f957b762e025dae67967a36c86dcfc1"/>#define <emphasis role="strong">CURRENT</emphasis>   0x0a</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a8d24230bdc95e50c4dd4fef7b5f4e9de"/>#define <emphasis role="strong">AVERAGE_CURRENT</emphasis>   0x0b</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a7c213cc89d01ec9cdbaa3356698a86ce"/>#define <emphasis role="strong">MAX_ERROR</emphasis>   0x0c</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1aab8f4fde9e70ea334461ea62e20daf77"/>#define <emphasis role="strong">REL_STATE_OF_CHARGE</emphasis>   0x0d</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1ac4fd3fc6ebbdb7ac3dd5f6a56892749b"/>#define <emphasis role="strong">ABS_STATE_OF_CHARGE</emphasis>   0x0e</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1ae515b72c006eed82f98c12d9ed2bb9b4"/>#define <emphasis role="strong">REM_CAPACITY</emphasis>   0x0f</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a122460bd7a072c047502477f3f29a774"/>#define <emphasis role="strong">FULL_CAPACITY</emphasis>   0x10</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a1fabcfc728c5118c2274740581ce221f"/>#define <emphasis role="strong">RUN_TIME_TO_EMPTY</emphasis>   0x11</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a7745720878cc676df4614f9bdf304b68"/>#define <emphasis role="strong">AVG_TIME_TO_EMPTY</emphasis>   0x12</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1aa39eb3f9710c9b5e983d8ae6a2016505"/>#define <emphasis role="strong">AVG_TIME_TO_FULL</emphasis>   0x13</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a9a6c3907fadc1d18f56ff4698040d868"/>#define <emphasis role="strong">BATTERY_STATUS</emphasis>   0x16</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a1a424b42533330855cf2dab5406c8262"/>#define <emphasis role="strong">CHARGING_CURRENT</emphasis>   0x14</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1ad691eda20d24c071782f014b11740108"/>#define <emphasis role="strong">CHARGING_VOLTAGE</emphasis>   0x15</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a0e115f49dba66626f975b86a6b14c0d4"/>#define <emphasis role="strong">CYCLE_COUNT</emphasis>   0x17</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a4dac5091f64b395a5b38c7db91e800ea"/>#define <emphasis role="strong">DESIGN_CAPACITY</emphasis>   0x18</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a4e7cca5488e8858e0d3dd4422bab8f27"/>#define <emphasis role="strong">DESIGN_VOLTAGE</emphasis>   0x19</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1ac004449d61ab0cf1fbbc555033c32ce6"/>#define <emphasis role="strong">MANUFACTURE_DATE</emphasis>   0x1b</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1ad8a20d143f6a7579ed227578aeddec21"/>#define <emphasis role="strong">SERIAL_NUMBER</emphasis>   0x1c</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1aaa2b8f5b105c3019df0cb346f472e803"/>#define <emphasis role="strong">MANUFACTURER_NAME</emphasis>   0x20</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a5f5a2c9450ebc584b4fe743c6b1a280b"/>#define <emphasis role="strong">DEVICE_NAME</emphasis>   0x21</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1a682a3a903e94136fce2c6afb59424443"/>#define <emphasis role="strong">DEVICE_CHEMISTRY</emphasis>   0x22</para> | ||
</listitem> | ||
<listitem><para><anchor xml:id="__arduino_s_m_bus_8h_1abde71717f4b1532d0faa50e0af224695"/>#define <emphasis role="strong">STATE_OF_HEALTH</emphasis>   0x4f</para> | ||
</listitem> | ||
</itemizedlist> | ||
</simplesect> | ||
<section> | ||
<title>Detailed Description</title> | ||
|
||
<para>Function declarations for the <link linkend="_class_arduino_s_m_bus">ArduinoSMBus</link> class. </para> | ||
|
||
<para><formalpara><title>Author</title> | ||
|
||
<para>Christopher Lee (<link xlink:href="mailto:[email protected]">[email protected]</link>) </para> | ||
</formalpara> | ||
<formalpara><title>Version</title> | ||
|
||
<para>1.0 </para> | ||
</formalpara> | ||
<formalpara><title>Date</title> | ||
|
||
<para>2024-02-29</para> | ||
</formalpara> | ||
<formalpara><title>Copyright</title> | ||
|
||
<para>Copyright (c) 2024 </para> | ||
</formalpara> | ||
</para> | ||
</section> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version='1.0' encoding='UTF-8' standalone='no'?> | ||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="__arduino_s_m_bus_8h_source" xml:lang="en-US"> | ||
<title>ArduinoSMBus.h</title> | ||
<indexterm><primary>C:/Users/Chris Lee/Sync/Personal Projects/p2024-005 - ArduinoSMBus/ArduinoSMBus/src/ArduinoSMBus.h</primary></indexterm> | ||
Go to the documentation of this file.<programlisting linenumbering="unnumbered">1 | ||
12 <emphasis role="preprocessor">#ifndef ArduinoSMBus_h</emphasis> | ||
13 <emphasis role="preprocessor">#define ArduinoSMBus_h</emphasis> | ||
14 | ||
15 <emphasis role="preprocessor">#include <Arduino.h></emphasis> | ||
16 <emphasis role="preprocessor">#include <Wire.h></emphasis> | ||
17 | ||
18 <emphasis role="comment">//Usable Commands</emphasis> | ||
19 <emphasis role="preprocessor">#define TEMPERATURE 0x08</emphasis> | ||
20 <emphasis role="preprocessor">#define VOLTAGE 0x09</emphasis> | ||
21 <emphasis role="preprocessor">#define CURRENT 0x0a</emphasis> | ||
22 <emphasis role="preprocessor">#define AVERAGE_CURRENT 0x0b</emphasis> | ||
23 <emphasis role="preprocessor">#define MAX_ERROR 0x0c</emphasis> | ||
24 <emphasis role="preprocessor">#define REL_STATE_OF_CHARGE 0x0d</emphasis> | ||
25 <emphasis role="preprocessor">#define ABS_STATE_OF_CHARGE 0x0e</emphasis> | ||
26 <emphasis role="preprocessor">#define REM_CAPACITY 0x0f</emphasis> | ||
27 <emphasis role="preprocessor">#define FULL_CAPACITY 0x10</emphasis> | ||
28 <emphasis role="preprocessor">#define RUN_TIME_TO_EMPTY 0x11</emphasis> | ||
29 <emphasis role="preprocessor">#define AVG_TIME_TO_EMPTY 0x12</emphasis> | ||
30 <emphasis role="preprocessor">#define AVG_TIME_TO_FULL 0x13</emphasis> | ||
31 <emphasis role="preprocessor">#define BATTERY_STATUS 0x16</emphasis> | ||
32 <emphasis role="preprocessor">#define CHARGING_CURRENT 0x14</emphasis> | ||
33 <emphasis role="preprocessor">#define CHARGING_VOLTAGE 0x15</emphasis> | ||
34 <emphasis role="preprocessor">#define CYCLE_COUNT 0x17</emphasis> | ||
35 <emphasis role="preprocessor">#define DESIGN_CAPACITY 0x18</emphasis> | ||
36 <emphasis role="preprocessor">#define DESIGN_VOLTAGE 0x19</emphasis> | ||
37 <emphasis role="preprocessor">#define MANUFACTURE_DATE 0x1b</emphasis> | ||
38 <emphasis role="preprocessor">#define SERIAL_NUMBER 0x1c</emphasis> | ||
39 <emphasis role="preprocessor">#define MANUFACTURER_NAME 0x20</emphasis> | ||
40 <emphasis role="preprocessor">#define DEVICE_NAME 0x21</emphasis> | ||
41 <emphasis role="preprocessor">#define DEVICE_CHEMISTRY 0x22</emphasis> | ||
42 <emphasis role="preprocessor">#define STATE_OF_HEALTH 0x4f</emphasis> | ||
43 | ||
44 <emphasis role="keyword">class </emphasis><link linkend="_class_arduino_s_m_bus">ArduinoSMBus</link> { | ||
45 <emphasis role="keyword">public</emphasis>: | ||
46   <link linkend="_class_arduino_s_m_bus_1a13842e9dd3dc931348a6d1e0f3bdf18d">ArduinoSMBus</link>(uint8_t batteryAddress); | ||
47   <emphasis role="keywordtype">void</emphasis> <link linkend="_class_arduino_s_m_bus_1ad1db22e3ec3012246671080b7b7f2b82">setBatteryAddress</link>(uint8_t batteryAddress); | ||
48 | ||
49   uint16_t <link linkend="_class_arduino_s_m_bus_1aec60bb3f821b326148553e3deaf9a429">temperature</link>(); | ||
50   uint16_t <link linkend="_class_arduino_s_m_bus_1ae37c41c3a9fe958330d9315e49bf553c">temperatureC</link>(); | ||
51   uint16_t <link linkend="_class_arduino_s_m_bus_1ab49bf0449e3086fd6b87c1b47d58d9f4">temperatureF</link>(); | ||
52   uint16_t <link linkend="_class_arduino_s_m_bus_1abc3178c7be648042be5f021ad8354130">voltage</link>(); | ||
53   uint16_t <link linkend="_class_arduino_s_m_bus_1a462f1d5694330563db84584b17015192">current</link>(); | ||
54   uint16_t <link linkend="_class_arduino_s_m_bus_1ab5b72566c5de066997c05876e024ffb7">averageCurrent</link>(); | ||
55   uint16_t <link linkend="_class_arduino_s_m_bus_1af26a153705c7b40d3178ffbfdc2bf50e">maxError</link>(); | ||
56   uint16_t <link linkend="_class_arduino_s_m_bus_1a7ff27611b0d03d3294cae80c040e3ec9">relativeStateOfCharge</link>(); | ||
57   uint16_t <link linkend="_class_arduino_s_m_bus_1a04e6cfb92ff6ddfb88e88f3361d11798">absoluteStateOfCharge</link>(); | ||
58   uint16_t <link linkend="_class_arduino_s_m_bus_1a8827accf4409366aada7d23d32f1710e">remainingCapacity</link>(); | ||
59   uint16_t <link linkend="_class_arduino_s_m_bus_1a3f145f4f0e2a1179c04b9063246e1ced">fullCapacity</link>(); | ||
60   uint16_t <link linkend="_class_arduino_s_m_bus_1a7790a2ea29a71581c281d4412d1b3ba0">runTimeToEmpty</link>(); | ||
61   uint16_t <link linkend="_class_arduino_s_m_bus_1adc9d08f9990010a04f9177aa028df317">avgTimeToEmpty</link>(); | ||
62   uint16_t <link linkend="_class_arduino_s_m_bus_1a60fa6bb8760b6566ddfea77676698315">avgTimeToFull</link>(); | ||
63   uint16_t <link linkend="_class_arduino_s_m_bus_1acd57a2ac31ad790559e77613c175a3ab">batteryStatus</link>(); | ||
64   uint16_t <link linkend="_class_arduino_s_m_bus_1acc351199470160724c42a55a04b37a94">chargingCurrent</link>(); | ||
65   uint16_t <link linkend="_class_arduino_s_m_bus_1a037a1afa15af04f562756592e09354d3">chargingVoltage</link>(); | ||
66   <emphasis role="keywordtype">bool</emphasis> <link linkend="_class_arduino_s_m_bus_1a177ded928cfe6c73eb98e14afef31762">statusOK</link>(); | ||
67   <emphasis role="keywordtype">bool</emphasis> <link linkend="_class_arduino_s_m_bus_1ad2639dce48c82982c2e7a5258f96ef7e">isCharging</link>(); | ||
68   <emphasis role="keywordtype">bool</emphasis> <link linkend="_class_arduino_s_m_bus_1a42bff30e23029750c49e45f24f395d1b">isFullyCharged</link>(); | ||
69   uint16_t <link linkend="_class_arduino_s_m_bus_1a6f1f77681f39bf2b119820fb4dca7112">cycleCount</link>(); | ||
70   uint16_t <link linkend="_class_arduino_s_m_bus_1a905028ef538fcf6b505d906339f59cf8">designCapacity</link>(); | ||
71   uint16_t <link linkend="_class_arduino_s_m_bus_1a39dc028dd468ec0ec1b980b276006101">designVoltage</link>(); | ||
72   uint16_t <link linkend="_class_arduino_s_m_bus_1a6ef1675a70f80131484dbbc3fa0dbb45">manufactureDate</link>(); | ||
73   <emphasis role="keywordtype">int</emphasis> <link linkend="_class_arduino_s_m_bus_1a716d79d59c632851b84719bafa57a47f">manufactureYear</link>(); | ||
74   uint16_t <link linkend="_class_arduino_s_m_bus_1aeed8722d27576cce6ab7b52990a983b3">serialNumber</link>(); | ||
75   <emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">char</emphasis>* <link linkend="_class_arduino_s_m_bus_1a75bc281cbb7d438da06e7880b304876b">manufacturerName</link>(); | ||
76   <emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">char</emphasis>* <link linkend="_class_arduino_s_m_bus_1ad0b0f70cbad233652eead2e81214b255">deviceName</link>(); | ||
77   <emphasis role="keyword">const</emphasis> <emphasis role="keywordtype">char</emphasis>* <link linkend="_class_arduino_s_m_bus_1a57fc6f298ae2fea71e1fda22d04f8f9b">deviceChemistry</link>(); | ||
78   uint16_t <link linkend="_class_arduino_s_m_bus_1aa2b6bd959a7a1ee0b40ae0be14387c49">stateOfHealth</link>(); | ||
79 | ||
80 <emphasis role="keyword">private</emphasis>: | ||
81   uint8_t _batteryAddress; | ||
82   uint16_t readRegister(uint8_t reg); | ||
83   <emphasis role="keywordtype">void</emphasis> readBlock(uint8_t reg, uint8_t* data, uint8_t len); | ||
84 }; | ||
85 | ||
86 <emphasis role="preprocessor">#endif</emphasis> | ||
</programlisting></section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version='1.0' encoding='UTF-8' standalone='no'?> | ||
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_annotated" xml:lang="en-US"> | ||
<title>Class List</title> | ||
Here are the classes, structs, unions and interfaces with brief descriptions:<link linkend="_class_arduino_s_m_bus">ArduinoSMBus</link></section> |
Oops, something went wrong.