Skip to content

Commit b1d8484

Browse files
committed
Housekeeping
1 parent f0a0a72 commit b1d8484

18 files changed

+153
-65
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ If you are using PlatformIO, you can define the macros in the *[platformio.ini](
181181
If you are using [Sloeber](https://eclipse.baeyens.it) as your IDE, you can easily define global symbols with *Properties > Arduino > CompileOptions*.<br/>
182182
![Sloeber settings](https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/pictures/SloeberDefineSymbols.png)
183183

184-
WOKWI online simulation of the AllPatternOnOneBar example.<br/>
185-
[![WOKWI online simulation of the AllPatternOnOneBar example](https://github.com/ArminJo/NeoPatterns/blob/master/pictures/Wokwi_AllPatternOnOneBar.png)](https://wokwi.com/arduino/projects/299556508969992714).
184+
[WOKWI online simulation of the AllPatternOnOneBar example](https://wokwi.com/arduino/projects/299556508969992714)
185+
![Screenshot of WOKWI online simulation of the AllPatternOnOneBar example](https://github.com/ArminJo/NeoPatterns/blob/master/pictures/Wokwi_AllPatternOnOneBar.png)
186186

187-
WOKWI online simulation of the MatrixDemo example.<br/>
188-
[![WOKWI online simulation of the MatrixDemo example](https://github.com/ArminJo/NeoPatterns/blob/master/pictures/Wokwi_MatrixDemo.png)](https://wokwi.com/arduino/projects/299560666027524617).
187+
[WOKWI online simulation of the MatrixDemo example](https://wokwi.com/arduino/projects/299560666027524617)
188+
![Screenshot of WOKWI online simulation of the MatrixDemo example](https://github.com/ArminJo/NeoPatterns/blob/master/pictures/Wokwi_MatrixDemo.png)
189189

190190
<br/>
191191

@@ -217,8 +217,8 @@ AllPatternsOnMultiDevices on breadboard
217217
Extended version of the OpenLedRace "version Basic for PCB Rome Edition. 2 Player, without Boxes Track".<br/>
218218
See also the [dedicated repository for OpenLedRace](https://github.com/ArminJo/OpenledRace).
219219

220-
OpenLedRace at the Cologne public library MINTkln-Festival
221-
![OpenLedRace at the Cologne public library MINTkln-Festival](https://github.com/ArminJo/OpenledRace/blob/master/pictures/OpenLedRaceAtMintFestival.jpg)
220+
OpenLedRace at the Cologne public library MINTk&ouml;ln-Festival
221+
![OpenLedRace at the Cologne public library MINTk&ouml;ln-Festival](https://github.com/ArminJo/OpenledRace/blob/master/pictures/OpenLedRaceAtMintFestival.jpg)
222222

223223
## TwoPatternsOnOneStrip
224224
This example renders a slow "background pattern" and a fast "foreground pattern" on the same strip.<br/>
@@ -228,8 +228,7 @@ It also shows, how to dynamically **determine the length of the attached strip**
228228

229229
# Revision History
230230
### Version 3.1.2 - work in progress
231-
- Added function `getActualNeopixelLenghtSimple()`.
232-
- Added function `clearAndShow()`.
231+
- Added functions `getActualNeopixelLenghtSimple()`, `clearAndShow()`, `setMatrixPixelColorAndShow()` and `testMapping()`.
233232

234233
### Version 3.1.1
235234
- Added parameter `aRepetitions` to pattern `RainbowCycle`.

examples/MatrixPatternsTest/AVRUtils.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ uint16_t getStackUnusedAndUsedBytes(uint16_t *aStackUsedBytesPointer) {
8686
tHeapPtr++;
8787
tStackUnused++;
8888
}
89-
*aStackUsedBytesPointer = (RAMEND - (uint16_t) tHeapPtr) + 1;
89+
*aStackUsedBytesPointer = ((RAMEND + 1) - (uint16_t) tHeapPtr);
9090

9191
return tStackUnused;
9292
}
@@ -95,8 +95,9 @@ uint16_t getStackUnusedAndUsedBytes(uint16_t *aStackUsedBytesPointer) {
9595
* Returns the amount of stack/heap touched since the last call to initStackFreeMeasurement()
9696
* by check for first non touched pattern on the stack/heap, starting the DOWNWARD search at current stack pointer.
9797
*
98-
* This returns too big value, if the end of former malloced and written memory was higher than current stackpointer,
99-
* which nevertheless looks like a potential programming problem.
98+
* If the end of former malloced and written memory was higher than current stackpointer,
99+
* the memory area is taken as overwritten stack. Therefore we may return values, which are too big.
100+
* But nevertheless, this constellation is likely a potential programming problem!
100101
*/
101102
uint16_t getStackUsedBytes() {
102103
uint8_t tDummyVariableOnStack;
@@ -108,7 +109,7 @@ uint16_t getStackUsedBytes() {
108109
tSearchPtr--;
109110
}
110111

111-
return (RAMEND + 1) - (uint16_t)tSearchPtr;
112+
return (RAMEND + 1) - (uint16_t) tSearchPtr;
112113
}
113114

114115
/*
@@ -217,7 +218,9 @@ void printStackUnusedAndUsedBytesIfChanged(Print *aSerial) {
217218
*/
218219
void printRAMInfo(Print *aSerial) {
219220
uint16_t tHeapStart = (uint16_t) getHeapStart();
220-
aSerial->print(F("Size of Data + BSS, Heap start, Stack end="));
221+
aSerial->print(F("Size of Data + BSS, Heap start, Stack end=0x"));
222+
aSerial->print(tHeapStart - RAMSTART, HEX);
223+
aSerial->print(F(" | "));
221224
aSerial->println(tHeapStart - RAMSTART);
222225

223226
printStackUsedBytes(aSerial);

examples/MatrixPatternsTest/AVRUtils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <stdint.h>
2828
#include <avr/sleep.h>
2929
#include <avr/wdt.h>
30+
#include "avr/boot.h"
3031

3132
/*
3233
* storage for millis value to enable compensation for interrupt disable at signal acquisition etc.

examples/MatrixPatternsTest/EasyButtonAtInt01.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,14 +450,15 @@ uint16_t EasyButton::updateButtonPressDuration() {
450450
*/
451451
uint8_t EasyButton::checkForLongPress(uint16_t aLongPressThresholdMillis) {
452452
uint8_t tRetvale = EASY_BUTTON_LONG_PRESS_ABORT;
453-
if (readDebouncedButtonState()) {
453+
// noInterrupts() is required, since otherwise we may get wrong results if interrupted during processing by button ISR
454+
noInterrupts();
455+
if (readDebouncedButtonState() != BUTTON_IS_INACTIVE) {
454456
// Button still active -> update current ButtonPressDurationMillis
455-
// noInterrupts() is required, since otherwise we may get wrong results if interrupted during load of long value by button ISR
456-
noInterrupts();
457+
457458
ButtonPressDurationMillis = millis() - ButtonLastChangeMillis;
458-
interrupts();
459459
tRetvale = EASY_BUTTON_LONG_PRESS_STILL_POSSIBLE; // if not detected, you may try again
460460
}
461+
interrupts();
461462
if (ButtonPressDurationMillis >= aLongPressThresholdMillis) {
462463
// long press detected
463464
return EASY_BUTTON_LONG_PRESS_DETECTED;

examples/MatrixSnow/AVRUtils.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ uint16_t getStackUnusedAndUsedBytes(uint16_t *aStackUsedBytesPointer) {
8686
tHeapPtr++;
8787
tStackUnused++;
8888
}
89-
*aStackUsedBytesPointer = (RAMEND - (uint16_t) tHeapPtr) + 1;
89+
*aStackUsedBytesPointer = ((RAMEND + 1) - (uint16_t) tHeapPtr);
9090

9191
return tStackUnused;
9292
}
@@ -95,8 +95,9 @@ uint16_t getStackUnusedAndUsedBytes(uint16_t *aStackUsedBytesPointer) {
9595
* Returns the amount of stack/heap touched since the last call to initStackFreeMeasurement()
9696
* by check for first non touched pattern on the stack/heap, starting the DOWNWARD search at current stack pointer.
9797
*
98-
* This returns too big value, if the end of former malloced and written memory was higher than current stackpointer,
99-
* which nevertheless looks like a potential programming problem.
98+
* If the end of former malloced and written memory was higher than current stackpointer,
99+
* the memory area is taken as overwritten stack. Therefore we may return values, which are too big.
100+
* But nevertheless, this constellation is likely a potential programming problem!
100101
*/
101102
uint16_t getStackUsedBytes() {
102103
uint8_t tDummyVariableOnStack;
@@ -108,7 +109,7 @@ uint16_t getStackUsedBytes() {
108109
tSearchPtr--;
109110
}
110111

111-
return (RAMEND + 1) - (uint16_t)tSearchPtr;
112+
return (RAMEND + 1) - (uint16_t) tSearchPtr;
112113
}
113114

114115
/*
@@ -217,7 +218,9 @@ void printStackUnusedAndUsedBytesIfChanged(Print *aSerial) {
217218
*/
218219
void printRAMInfo(Print *aSerial) {
219220
uint16_t tHeapStart = (uint16_t) getHeapStart();
220-
aSerial->print(F("Size of Data + BSS, Heap start, Stack end="));
221+
aSerial->print(F("Size of Data + BSS, Heap start, Stack end=0x"));
222+
aSerial->print(tHeapStart - RAMSTART, HEX);
223+
aSerial->print(F(" | "));
221224
aSerial->println(tHeapStart - RAMSTART);
222225

223226
printStackUsedBytes(aSerial);

examples/MatrixSnow/AVRUtils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <stdint.h>
2828
#include <avr/sleep.h>
2929
#include <avr/wdt.h>
30+
#include "avr/boot.h"
3031

3132
/*
3233
* storage for millis value to enable compensation for interrupt disable at signal acquisition etc.

examples/MatrixSnow/MatrixSnow.ino

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* MatrixSnow.cpp
33
*
4-
* For testing the MatrixNeoPatterns Snow pattern
4+
* For testing the MatrixNeoPatterns Snow pattern on a 16 x 16 or on a 8 x 8 matrix
55
*
66
* You need to install "Adafruit NeoPixel" library under "Tools -> Manage Libraries..." or "Ctrl+Shift+I" -> use "neoPixel" as filter string
77
*
@@ -32,36 +32,33 @@
3232
//#define DO_NOT_SUPPORT_BRIGHTNESS // saves up to 428 bytes additional program memory for the AllPatternsOnMultiDevices() example.
3333
//#define DO_NOT_SUPPORT_NO_ZERO_BRIGHTNESS // If activated, disables writing of zero only if brightness or color is zero. Saves up to 144 bytes ...
3434

35+
//#define DEBUG
36+
#define INFO
3537
#include <MatrixNeoPatterns.hpp>
3638

3739
#if defined(__AVR__)
3840
#include "AVRUtils.h" // for printRAMInfo()
3941
#endif
4042

41-
#define USE_16_X_16_MATRIX
42-
#if defined(USE_16_X_16_MATRIX)
43+
//#define USE_16_X_16_MATRIX // else 8x8 matrix
44+
4345
#define PIN_NEOPIXEL_MATRIX 8
46+
#if defined(USE_16_X_16_MATRIX)
4447
#define MATRIX_NUMBER_OF_COLUMNS 16
4548
#define MATRIX_NUMBER_OF_ROWS 16
46-
/*
47-
* Specify your matrix geometry as 4th parameter.
48-
* ....BOTTOM ....RIGHT specify the position of the zeroth pixel.
49-
* See MatrixNeoPatterns.h for further explanation.
50-
*/
51-
MatrixNeoPatterns NeoPixelMatrix = MatrixNeoPatterns(MATRIX_NUMBER_OF_COLUMNS, MATRIX_NUMBER_OF_ROWS, PIN_NEOPIXEL_MATRIX,
52-
NEO_MATRIX_BOTTOM | NEO_MATRIX_RIGHT | NEO_MATRIX_ROWS | NEO_MATRIX_ZIGZAG, NEO_GRB + NEO_KHZ800, NULL);
49+
#define MATRIX_GEOMETRY (NEO_MATRIX_BOTTOM | NEO_MATRIX_RIGHT | NEO_MATRIX_ROWS | NEO_MATRIX_ZIGZAG)
5350
#else
54-
#define PIN_NEOPIXEL_MATRIX 8
5551
#define MATRIX_NUMBER_OF_COLUMNS 8
5652
#define MATRIX_NUMBER_OF_ROWS 8
53+
#define MATRIX_GEOMETRY (NEO_MATRIX_BOTTOM | NEO_MATRIX_RIGHT | NEO_MATRIX_ROWS | NEO_MATRIX_PROGRESSIVE)
54+
#endif
5755
/*
5856
* Specify your matrix geometry as 4th parameter.
5957
* ....BOTTOM ....RIGHT specify the position of the zeroth pixel.
6058
* See MatrixNeoPatterns.h for further explanation.
6159
*/
6260
MatrixNeoPatterns NeoPixelMatrix = MatrixNeoPatterns(MATRIX_NUMBER_OF_COLUMNS, MATRIX_NUMBER_OF_ROWS, PIN_NEOPIXEL_MATRIX,
63-
NEO_MATRIX_BOTTOM | NEO_MATRIX_RIGHT | NEO_MATRIX_ROWS | NEO_MATRIX_PROGRESSIVE, NEO_GRB + NEO_KHZ800, NULL);
64-
#endif
61+
MATRIX_GEOMETRY, NEO_GRB + NEO_KHZ800, NULL);
6562

6663
void setup() {
6764
pinMode(LED_BUILTIN, OUTPUT);
@@ -95,7 +92,6 @@ void setup() {
9592
}
9693

9794
void loop() {
98-
9995
NeoPixelMatrix.SnowUpdate();
10096
NeoPixelMatrix.show();
10197
NeoPixelMatrix.TotalStepCounter = 42; // set to any value > 1

examples/OpenLedRace/AVRUtils.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ uint16_t getStackUnusedAndUsedBytes(uint16_t *aStackUsedBytesPointer) {
8686
tHeapPtr++;
8787
tStackUnused++;
8888
}
89-
*aStackUsedBytesPointer = (RAMEND - (uint16_t) tHeapPtr) + 1;
89+
*aStackUsedBytesPointer = ((RAMEND + 1) - (uint16_t) tHeapPtr);
9090

9191
return tStackUnused;
9292
}
@@ -95,8 +95,9 @@ uint16_t getStackUnusedAndUsedBytes(uint16_t *aStackUsedBytesPointer) {
9595
* Returns the amount of stack/heap touched since the last call to initStackFreeMeasurement()
9696
* by check for first non touched pattern on the stack/heap, starting the DOWNWARD search at current stack pointer.
9797
*
98-
* This returns too big value, if the end of former malloced and written memory was higher than current stackpointer,
99-
* which nevertheless looks like a potential programming problem.
98+
* If the end of former malloced and written memory was higher than current stackpointer,
99+
* the memory area is taken as overwritten stack. Therefore we may return values, which are too big.
100+
* But nevertheless, this constellation is likely a potential programming problem!
100101
*/
101102
uint16_t getStackUsedBytes() {
102103
uint8_t tDummyVariableOnStack;
@@ -108,7 +109,7 @@ uint16_t getStackUsedBytes() {
108109
tSearchPtr--;
109110
}
110111

111-
return (RAMEND + 1) - (uint16_t)tSearchPtr;
112+
return (RAMEND + 1) - (uint16_t) tSearchPtr;
112113
}
113114

114115
/*
@@ -217,7 +218,9 @@ void printStackUnusedAndUsedBytesIfChanged(Print *aSerial) {
217218
*/
218219
void printRAMInfo(Print *aSerial) {
219220
uint16_t tHeapStart = (uint16_t) getHeapStart();
220-
aSerial->print(F("Size of Data + BSS, Heap start, Stack end="));
221+
aSerial->print(F("Size of Data + BSS, Heap start, Stack end=0x"));
222+
aSerial->print(tHeapStart - RAMSTART, HEX);
223+
aSerial->print(F(" | "));
221224
aSerial->println(tHeapStart - RAMSTART);
222225

223226
printStackUsedBytes(aSerial);

examples/OpenLedRace/AVRUtils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <stdint.h>
2828
#include <avr/sleep.h>
2929
#include <avr/wdt.h>
30+
#include "avr/boot.h"
3031

3132
/*
3233
* storage for millis value to enable compensation for interrupt disable at signal acquisition etc.

examples/OpenLedRace/OpenLedRace.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@
8585
//#include "AvrTracing.hpp"
8686

8787
#define VERSION_EXAMPLE "1.3"
88-
// 1.3 VU Bar animations - work in progress
88+
// 1.4 - work in progress
89+
// 1.3 Moved Bridge and loop, VU Bar animations
8990
// 1.2 Improvements from Hannover Maker Faire
9091
// 1.1 Hannover Maker Faire version
9192

examples/OpenLedRace/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ Formula is: **NewSpeed = OldSpeed + Gravity + Friction + (OldSpeed * Drag)**
5858
<br/>
5959

6060
# Pictures
61-
| At the Hannover MakerFaire 2022 | At the Cologne public library MINTkln-Festival 2021 |
61+
| At the Hannover MakerFaire 2022 | At the Cologne public library MINTk&ouml;ln-Festival 2021 |
6262
| :-: | :-: |
63-
| ![Accelerometer version from MakerFaire 2022](https://github.com/ArminJo/OpenledRace/blob/master/pictures/Overview.jpg) | ![OpenLedRace at the Cologne public library MINTkln-Festival](https://github.com/ArminJo/OpenledRace/blob/master/pictures/OpenLedRaceAtMintFestival.jpg) |
63+
| ![Accelerometer version from MakerFaire 2022](https://github.com/ArminJo/OpenledRace/blob/master/pictures/Overview.jpg) | ![OpenLedRace at the Cologne public library MINTk&ouml;ln-Festival](https://github.com/ArminJo/OpenledRace/blob/master/pictures/OpenLedRaceAtMintFestival.jpg) |
6464

6565
<br/>
6666

6767
# YouTube Videos
68-
| At the Hannover MakerFaire 2022 | At the Cologne public library MINTkln-Festival 2021 |
68+
| At the Hannover MakerFaire 2022 | At the Cologne public library MINTk&ouml;ln-Festival 2021 |
6969
| :-: | :-: |
7070
| [![OpenLedRace at the Hannover MakerFaire 2022](https://i.ytimg.com/vi/lYzYpFYJfWI/hqdefault.jpg)](https://www.youtube.com/watch?v=lYzYpFYJfWI) | [![OpenLedRace in action](https://i.ytimg.com/vi/y25rjRkDg0g/hqdefault.jpg)](https://www.youtube.com/watch?v=y25rjRkDg0g) |
7171

examples/OpenLedRace/SoftI2CMaster.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,11 @@ bool i2c_init(void)
401401
TWSR = (1<<TWPS0); // prescaler is 4
402402
TWBR = ((I2C_CPUFREQ/SCL_CLOCK)-16)/8;
403403
#endif
404+
#if defined(digitalReadFast)
405+
return (digitalReadFast(SDA) != 0 && digitalReadFast(SCL) != 0);
406+
#else
404407
return (digitalRead(SDA) != 0 && digitalRead(SCL) != 0);
408+
#endif
405409
}
406410
#else // I2C_HARDWARE
407411
{

examples/TwoPatternsOnOneStrip/EasyButtonAtInt01.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,14 +450,15 @@ uint16_t EasyButton::updateButtonPressDuration() {
450450
*/
451451
uint8_t EasyButton::checkForLongPress(uint16_t aLongPressThresholdMillis) {
452452
uint8_t tRetvale = EASY_BUTTON_LONG_PRESS_ABORT;
453-
if (readDebouncedButtonState()) {
453+
// noInterrupts() is required, since otherwise we may get wrong results if interrupted during processing by button ISR
454+
noInterrupts();
455+
if (readDebouncedButtonState() != BUTTON_IS_INACTIVE) {
454456
// Button still active -> update current ButtonPressDurationMillis
455-
// noInterrupts() is required, since otherwise we may get wrong results if interrupted during load of long value by button ISR
456-
noInterrupts();
457+
457458
ButtonPressDurationMillis = millis() - ButtonLastChangeMillis;
458-
interrupts();
459459
tRetvale = EASY_BUTTON_LONG_PRESS_STILL_POSSIBLE; // if not detected, you may try again
460460
}
461+
interrupts();
461462
if (ButtonPressDurationMillis >= aLongPressThresholdMillis) {
462463
// long press detected
463464
return EASY_BUTTON_LONG_PRESS_DETECTED;

src/ADCUtils.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,27 +85,33 @@
8585
#define ADC_TEMPERATURE_CHANNEL_MUX 15
8686
#define ADC_1_1_VOLT_CHANNEL_MUX 12
8787
#define ADC_GND_CHANNEL_MUX 13
88+
#define ADC_CHANNEL_MUX_MASK 0x0F
8889

8990
#elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__)
9091
#define ADC_ISCR_CHANNEL_MUX 3
9192
#define ADC_TEMPERATURE_CHANNEL_MUX 11
9293
#define ADC_1_1_VOLT_CHANNEL_MUX 12
9394
#define ADC_GND_CHANNEL_MUX 14
9495
#define ADC_VCC_4TH_CHANNEL_MUX 13
96+
#define ADC_CHANNEL_MUX_MASK 0x1F
9597

9698
#elif defined(__AVR_ATmega328P__)
9799
#define ADC_TEMPERATURE_CHANNEL_MUX 8
98100
#define ADC_1_1_VOLT_CHANNEL_MUX 14
99101
#define ADC_GND_CHANNEL_MUX 15
102+
#define ADC_CHANNEL_MUX_MASK 0x0F
100103

101104
#elif defined(__AVR_ATmega32U4__)
102105
#define ADC_TEMPERATURE_CHANNEL_MUX 0x27
103106
#define ADC_1_1_VOLT_CHANNEL_MUX 0x1E
104107
#define ADC_GND_CHANNEL_MUX 0x1F
108+
#define ADC_CHANNEL_MUX_MASK 0x3F
105109

106110
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega644A__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__)
107111
#define ADC_1_1_VOLT_CHANNEL_MUX 0x1E
108112
#define ADC_GND_CHANNEL_MUX 0x1F
113+
#define ADC_CHANNEL_MUX_MASK 0x1F
114+
109115
#define INTERNAL INTERNAL1V1
110116

111117
#else
@@ -164,7 +170,10 @@ uint16_t waitAndReadADCChannelWithReferenceAndRestoreADMUXAndReference(uint8_t a
164170
uint16_t readADCChannelWithOversample(uint8_t aADCChannelNumber, uint8_t aOversampleExponent);
165171
void setADCChannelAndReferenceForNextConversion(uint8_t aADCChannelNumber, uint8_t aReference);
166172
uint16_t readADCChannelWithReferenceOversampleFast(uint8_t aADCChannelNumber, uint8_t aReference, uint8_t aOversampleExponent);
167-
uint16_t readADCChannelWithReferenceMultiSamples(uint8_t aADCChannelNumber, uint8_t aReference, uint8_t aNumberOfSamples);
173+
uint32_t readADCChannelMultiSamples(uint8_t aPrescale, uint16_t aNumberOfSamples);
174+
uint16_t readADCChannelMultiSamplesWithReference(uint8_t aADCChannelNumber, uint8_t aReference, uint8_t aNumberOfSamples);
175+
uint32_t readADCChannelMultiSamplesWithReferenceAndPrescaler(uint8_t aADCChannelNumber, uint8_t aReference, uint8_t aPrescale,
176+
uint16_t aNumberOfSamples);
168177
uint16_t readADCChannelWithReferenceMax(uint8_t aADCChannelNumber, uint8_t aReference, uint16_t aNumberOfSamples);
169178
uint16_t readADCChannelWithReferenceMaxMicros(uint8_t aADCChannelNumber, uint8_t aReference, uint16_t aMicrosecondsToAquire);
170179
uint16_t readUntil4ConsecutiveValuesAreEqual(uint8_t aADCChannelNumber, uint8_t aReference, uint8_t aDelay,

0 commit comments

Comments
 (0)