Skip to content

Commit 705702b

Browse files
committed
3. Party libs
1 parent ebaf9fe commit 705702b

File tree

6 files changed

+417
-137
lines changed

6 files changed

+417
-137
lines changed

.github/workflows/TestCompile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
- '**TestCompile.yml'
2020
jobs:
2121
build:
22-
name: Test compiling examples for UNO
22+
name: Test compiling examples for Uno
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout

LICENSE.txt

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GNU GENERAL PUBLIC LICENSE
22
Version 3, 29 June 2007
33

4-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
55
Everyone is permitted to copy and distribute verbatim copies
66
of this license document, but changing it is not allowed.
77

@@ -618,4 +618,57 @@ an absolute waiver of all civil liability in connection with the
618618
Program, unless a warranty or assumption of liability accompanies a
619619
copy of the Program in return for a fee.
620620

621-
END OF TERMS AND CONDITIONS
621+
END OF TERMS AND CONDITIONS
622+
623+
How to Apply These Terms to Your New Programs
624+
625+
If you develop a new program, and you want it to be of the greatest
626+
possible use to the public, the best way to achieve this is to make it
627+
free software which everyone can redistribute and change under these terms.
628+
629+
To do so, attach the following notices to the program. It is safest
630+
to attach them to the start of each source file to most effectively
631+
state the exclusion of warranty; and each file should have at least
632+
the "copyright" line and a pointer to where the full notice is found.
633+
634+
<one line to give the program's name and a brief idea of what it does.>
635+
Copyright (C) <year> <name of author>
636+
637+
This program is free software: you can redistribute it and/or modify
638+
it under the terms of the GNU General Public License as published by
639+
the Free Software Foundation, either version 3 of the License, or
640+
(at your option) any later version.
641+
642+
This program is distributed in the hope that it will be useful,
643+
but WITHOUT ANY WARRANTY; without even the implied warranty of
644+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645+
GNU General Public License for more details.
646+
647+
You should have received a copy of the GNU General Public License
648+
along with this program. If not, see <https://www.gnu.org/licenses/>.
649+
650+
Also add information on how to contact you by electronic and paper mail.
651+
652+
If the program does terminal interaction, make it output a short
653+
notice like this when it starts in an interactive mode:
654+
655+
<program> Copyright (C) <year> <name of author>
656+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657+
This is free software, and you are welcome to redistribute it
658+
under certain conditions; type `show c' for details.
659+
660+
The hypothetical commands `show w' and `show c' should show the appropriate
661+
parts of the General Public License. Of course, your program's commands
662+
might be different; for a GUI interface, you would use an "about box".
663+
664+
You should also get your employer (if you work as a programmer) or school,
665+
if any, to sign a "copyright disclaimer" for the program, if necessary.
666+
For more information on this, and how to apply and follow the GNU GPL, see
667+
<https://www.gnu.org/licenses/>.
668+
669+
The GNU General Public License does not permit incorporating your program
670+
into proprietary programs. If your program is a subroutine library, you
671+
may consider it more useful to permit linking proprietary applications with
672+
the library. If this is what you want to do, use the GNU Lesser General
673+
Public License instead of this License. But first, please read
674+
<https://www.gnu.org/licenses/why-not-lgpl.html>.

SBMInfo/ADCUtils.h

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -115,24 +115,24 @@
115115
extern float sVCCVoltage;
116116
extern uint16_t sVCCVoltageMillivolt;
117117

118-
extern long sLastVoltageCheckMillis;
119-
extern uint8_t sVoltageTooLowCounter;
120-
121-
uint16_t readADCChannel(uint8_t aChannelNumber);
122-
uint16_t readADCChannelWithReference(uint8_t aChannelNumber, uint8_t aReference);
123-
uint16_t waitAndReadADCChannelWithReference(uint8_t aChannelNumber, uint8_t aReference);
124-
uint16_t waitAndReadADCChannelWithReferenceAndRestoreADMUXAndReference(uint8_t aChannelNumber, uint8_t aReference);
125-
uint16_t readADCChannelWithOversample(uint8_t aChannelNumber, uint8_t aOversampleExponent);
126-
void setADCMultiplexerAndReferenceForNextConversion(uint8_t aChannelNumber, uint8_t aReference);
127-
uint16_t readADCChannelWithReferenceOversample(uint8_t aChannelNumber, uint8_t aReference, uint8_t aOversampleExponent);
128-
uint16_t readADCChannelWithReferenceOversampleFast(uint8_t aChannelNumber, uint8_t aReference, uint8_t aOversampleExponent);
129-
uint16_t readADCChannelWithReferenceMultiSamples(uint8_t aChannelNumber, uint8_t aReference, uint8_t aNumberOfSamples);
130-
uint16_t readADCChannelWithReferenceMax(uint8_t aChannelNumber, uint8_t aReference, uint16_t aNumberOfSamples);
131-
uint16_t readADCChannelWithReferenceMaxMicros(uint8_t aChannelNumber, uint8_t aReference, uint16_t aMicrosecondsToAquire);
132-
uint16_t readUntil4ConsecutiveValuesAreEqual(uint8_t aChannelNumber, uint8_t aDelay, uint8_t aAllowedDifference,
118+
extern long sLastVCCCheckMillis;
119+
extern uint8_t sVCCTooLowCounter;
120+
121+
uint16_t readADCChannel(uint8_t aADCChannelNumber);
122+
uint16_t readADCChannelWithReference(uint8_t aADCChannelNumber, uint8_t aReference);
123+
uint16_t waitAndReadADCChannelWithReference(uint8_t aADCChannelNumber, uint8_t aReference);
124+
uint16_t waitAndReadADCChannelWithReferenceAndRestoreADMUXAndReference(uint8_t aADCChannelNumber, uint8_t aReference);
125+
uint16_t readADCChannelWithOversample(uint8_t aADCChannelNumber, uint8_t aOversampleExponent);
126+
void setADCChannelAndReferenceForNextConversion(uint8_t aADCChannelNumber, uint8_t aReference);
127+
uint16_t readADCChannelWithReferenceOversample(uint8_t aADCChannelNumber, uint8_t aReference, uint8_t aOversampleExponent);
128+
uint16_t readADCChannelWithReferenceOversampleFast(uint8_t aADCChannelNumber, uint8_t aReference, uint8_t aOversampleExponent);
129+
uint16_t readADCChannelWithReferenceMultiSamples(uint8_t aADCChannelNumber, uint8_t aReference, uint8_t aNumberOfSamples);
130+
uint16_t readADCChannelWithReferenceMax(uint8_t aADCChannelNumber, uint8_t aReference, uint16_t aNumberOfSamples);
131+
uint16_t readADCChannelWithReferenceMaxMicros(uint8_t aADCChannelNumber, uint8_t aReference, uint16_t aMicrosecondsToAquire);
132+
uint16_t readUntil4ConsecutiveValuesAreEqual(uint8_t aADCChannelNumber, uint8_t aReference, uint8_t aDelay, uint8_t aAllowedDifference,
133133
uint8_t aMaxRetries);
134134

135-
uint8_t checkAndWaitForReferenceAndChannelToSwitch(uint8_t aChannelNumber, uint8_t aReference);
135+
uint8_t checkAndWaitForReferenceAndChannelToSwitch(uint8_t aADCChannelNumber, uint8_t aReference);
136136

137137
/*
138138
* readVCC*() functions store the result in sVCCVoltageMillivolt or sVCCVoltage
@@ -157,7 +157,9 @@ float getTemperature(void);
157157

158158
bool isVCCTooLowMultipleTimes();
159159
void resetVCCTooLowMultipleTimes();
160-
bool isVoltageTooLow();
160+
bool isVCCTooLow();
161+
bool isVCCTooHigh();
162+
bool isVCCTooHighSimple();
161163

162164
#endif // defined(__AVR__) ...
163165
#endif // _ADC_UTILS_H

0 commit comments

Comments
 (0)