From 5e2ac5cd1965424b81368b0991157d81391dbf01 Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Wed, 27 Nov 2024 09:09:16 +0000 Subject: [PATCH] deploy: 17b471b1686d23a6f8a204a1682f76ed39fde4e5 --- AudioRadioRelay_8ino-example.html | 14 +- AutoAnalogAudio_8cpp.html | 4 +- AutoAnalogAudio_8cpp_source.html | 22 +- AutoAnalogAudio_8h.html | 4 +- AutoAnalogAudio_8h_source.html | 368 +++++++++++----------- MultiChannelAdcStream_8ino-example.html | 16 +- NRF52_PDM_PWMTest_8ino-example.html | 44 +-- SdAudioAuto_8ino-example.html | 16 +- SdAudioBasic_8ino-example.html | 14 +- SdAudioRecording_8ino-example.html | 12 +- SdAudioWavPlayer_8ino-example.html | 12 +- SimpleAdcStream_8ino-example.html | 14 +- SimpleSine12Bit_8ino-example.html | 14 +- SimpleSine_8ino-example.html | 12 +- WirelessMicrophone_8ino-example.html | 14 +- WirelessSpeaker_8ino-example.html | 14 +- annotated.html | 4 +- classAutoAnalog-members.html | 7 +- classAutoAnalog.html | 134 ++++---- classes.html | 4 +- dir_68267d1309a1af8e8297ef4c3efbcdba.html | 4 +- dir_d35e8d9c847c512a0480f8070ffef7ed.html | 4 +- examples.html | 4 +- files.html | 4 +- functions.html | 11 +- functions_func.html | 6 +- functions_vars.html | 5 +- globals.html | 4 +- globals_defs.html | 4 +- index.html | 4 +- menudata.js | 3 +- search/all_1.js | 2 +- search/all_e.js | 4 - search/functions_1.js | 2 +- search/searchdata.js | 4 +- search/variables_7.js | 4 - 36 files changed, 393 insertions(+), 419 deletions(-) delete mode 100644 search/all_e.js delete mode 100644 search/variables_7.js diff --git a/AudioRadioRelay_8ino-example.html b/AudioRadioRelay_8ino-example.html index 99f4715..02bbb70 100644 --- a/AudioRadioRelay_8ino-example.html +++ b/AudioRadioRelay_8ino-example.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -153,7 +153,7 @@
Serial.begin(115200);
Serial.println("Analog Audio Begin");
-
aaAudio.begin(1, 1); //Setup aaAudio using both DAC and ADC
+
aaAudio.begin(1, 1); //Setup aaAudio using both DAC and ADC
#if defined (ARDUINO_AVR)
aaAudio.autoAdjust = 0;
#endif
@@ -230,16 +230,16 @@
void dacHandler(void)
void setSampleRate(uint32_t sampRate=0, bool stereo=false)
-
uint8_t adcBuffer[MAX_BUFFER_SIZE]
- -
uint8_t dacBuffer[MAX_BUFFER_SIZE]
+
uint8_t adcBuffer[MAX_BUFFER_SIZE]
+ +
uint8_t dacBuffer[MAX_BUFFER_SIZE]
void getADC(uint32_t samples=MAX_BUFFER_SIZE)
+
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
void feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)
-
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
diff --git a/AutoAnalogAudio_8cpp.html b/AutoAnalogAudio_8cpp.html index 69c4e95..50c8522 100644 --- a/AutoAnalogAudio_8cpp.html +++ b/AutoAnalogAudio_8cpp.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -91,7 +91,7 @@
diff --git a/AutoAnalogAudio_8cpp_source.html b/AutoAnalogAudio_8cpp_source.html index 7b50978..8d18ce0 100644 --- a/AutoAnalogAudio_8cpp_source.html +++ b/AutoAnalogAudio_8cpp_source.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -175,7 +175,7 @@
110
111/****************************************************************************/
112
-
113void AutoAnalog::begin(bool enADC, bool enDAC, uint8_t _useI2S){
+
113void AutoAnalog::begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S){
114
115 i2s_mode_t myMode = (i2s_mode_t)I2S_MODE_MASTER;
116
@@ -511,29 +511,29 @@
446#endif //#if defined (ESP32)
void adcInterrupts(bool enabled=true)
void dacHandler(void)
-
uint8_t dacBitsPerSample
+
uint8_t dacBitsPerSample
void setSampleRate(uint32_t sampRate=0, bool stereo=false)
void rampIn(uint8_t sample)
-
uint8_t adcBuffer[MAX_BUFFER_SIZE]
+
uint8_t adcBuffer[MAX_BUFFER_SIZE]
-
uint8_t dacBuffer[MAX_BUFFER_SIZE]
-
TaskHandle_t dacTaskHandle
+
uint8_t dacBuffer[MAX_BUFFER_SIZE]
+
TaskHandle_t dacTaskHandle
void getADC(uint32_t samples=MAX_BUFFER_SIZE)
-
uint16_t adcBuffer16[MAX_BUFFER_SIZE]
+
uint16_t adcBuffer16[MAX_BUFFER_SIZE]
void rampOut(uint8_t sample)
void disableDAC(bool withinTask=false)
-
uint16_t dacBuffer16[MAX_BUFFER_SIZE]
+
uint16_t dacBuffer16[MAX_BUFFER_SIZE]
+
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
void dacInterrupts(bool enabled=true, bool withinTask=false)
void enableAdcChannel(uint8_t pinAx)
void feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)
-
uint8_t adcBitsPerSample
+
uint8_t adcBitsPerSample
void triggerADC()
void disableAdcChannel(uint8_t pinAx)
-
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
diff --git a/AutoAnalogAudio_8h.html b/AutoAnalogAudio_8h.html index 2786d72..6605085 100644 --- a/AutoAnalogAudio_8h.html +++ b/AutoAnalogAudio_8h.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -155,7 +155,7 @@

diff --git a/AutoAnalogAudio_8h_source.html b/AutoAnalogAudio_8h_source.html index 3f1652d..0b0b6af 100644 --- a/AutoAnalogAudio_8h_source.html +++ b/AutoAnalogAudio_8h_source.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -85,7 +85,7 @@
Go to the documentation of this file.
1 /*
2 AutoAnalogAudio streaming via DAC & ADC by TMRh20
-
3 Copyright (C) 2016-2020 TMRh20 - tmrh20@gmail.com, github.com/TMRh20
+
3 Copyright (C) 2016-2024 TMRh20 - tmrh20@gmail.com, github.com/TMRh20
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
@@ -121,214 +121,218 @@
41
50
-
58 void begin(bool enADC, bool enDAC, uint8_t _useI2S = false);
-
59
-
63 void triggerADC();
-
64
-
73 void getADC(uint32_t samples = MAX_BUFFER_SIZE);
-
74
-
81 void feedDAC(uint8_t dacChannel = 0, uint32_t samples = MAX_BUFFER_SIZE, bool startInterrupts = false);
-
82
-
88 uint8_t dacBuffer[MAX_BUFFER_SIZE];
+
65 void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S = 0);
+
66
+
70 void triggerADC();
+
71
+
80 void getADC(uint32_t samples = MAX_BUFFER_SIZE);
+
81
+
88 void feedDAC(uint8_t dacChannel = 0, uint32_t samples = MAX_BUFFER_SIZE, bool startInterrupts = false);
89
-
95 uint8_t adcBuffer[MAX_BUFFER_SIZE];
+
95 uint8_t dacBuffer[MAX_BUFFER_SIZE];
96
-
102 uint16_t dacBuffer16[MAX_BUFFER_SIZE];
+
102 uint8_t adcBuffer[MAX_BUFFER_SIZE];
103
-
109 #if !defined (ARDUINO_ARCH_NRF52840) && !defined (ARDUINO_ARCH_NRF52) && !defined ARDUINO_NRF52840_FEATHER
-
110 uint16_t adcBuffer16[MAX_BUFFER_SIZE];
-
111 #elif defined __MBED__
-
112 inline static uint16_t adcBuffer16[MAX_BUFFER_SIZE];
-
113 #else
-
114 static uint16_t adcBuffer16[MAX_BUFFER_SIZE];
-
115 #endif
-
116
-
121 void setSampleRate(uint32_t sampRate = 0, bool stereo = false);
-
122
-
124 void dacHandler(void);
-
125
- -
131
+
109 uint16_t dacBuffer16[MAX_BUFFER_SIZE];
+
110
+
116 #if !defined (ARDUINO_ARCH_NRF52840) && !defined (ARDUINO_ARCH_NRF52) && !defined ARDUINO_NRF52840_FEATHER
+
117 uint16_t adcBuffer16[MAX_BUFFER_SIZE];
+
118 #elif defined __MBED__
+
119 inline static uint16_t adcBuffer16[MAX_BUFFER_SIZE];
+
120 #else
+
121 static uint16_t adcBuffer16[MAX_BUFFER_SIZE];
+
122 #endif
+
123
+
128 void setSampleRate(uint32_t sampRate = 0, bool stereo = false);
+
129
+
131 void dacHandler(void);
132
- -
142
- -
153
-
161 void enableAdcChannel(uint8_t pinAx);
-
162
-
167 void disableAdcChannel(uint8_t pinAx);
-
168
-
173 void disableDAC(bool withinTask = false);
-
174
-
185 void adcInterrupts(bool enabled = true);
-
186
-
187 void dacInterrupts(bool enabled = true, bool withinTask = false);
-
188
-
189 #if defined (ESP32) || defined (DOXYGEN_FORCED)
-
193 void rampOut(uint8_t sample);
-
194 void rampIn(uint8_t sample);
-
195 TaskHandle_t dacTaskHandle;
-
196 #endif
-
197
-
198
-
199#if defined (ARDUINO_ARCH_NRF52840) || defined (ARDUINO_ARCH_NRF52) && !defined ARDUINO_NRF52840_FEATHER && defined __MBED__
-
200 inline static uint8_t aCtr;
-
201 inline static uint32_t aSize;
-
202 inline static uint16_t *adcBuf0 = NULL;
-
203 inline static uint16_t *adcBuf1 = NULL;
-
204 inline static void (*_onReceive)(uint16_t *buf, uint32_t buf_len) = NULL;
-
205 inline static void adcCallback(uint16_t *buf, uint32_t buf_len);
-
206 inline static void set_callback(void(*function)(uint16_t *buf, uint32_t buf_len));
-
207 inline static bool adcReady;
-
208 inline static uint16_t *dacBuf0;
-
209 inline static uint16_t *dacBuf1;
-
210 inline static uint32_t sampleCounter;
-
211
-
212#elif defined (ARDUINO_ARCH_NRF52840) || defined (ARDUINO_ARCH_NRF52) || defined (ARDUINO_NRF52840_FEATHER) && !defined __MBED__
-
213 uint16_t *dacBuf0;
-
214 uint16_t *dacBuf1;
-
215 static uint8_t aCtr;
-
216 static uint32_t aSize;
-
217 static uint16_t *adcBuf0;
-
218 static uint16_t *adcBuf1;
-
219 static void (*_onReceive)(uint16_t *buf, uint32_t buf_len);
-
220 static void adcCallback(uint16_t *buf, uint32_t buf_len);
-
221 void set_callback(void(*function)(uint16_t *buf, uint32_t buf_len));
-
222 static bool adcReady;
-
223 uint32_t sampleCounter;
-
224 //void DACC_Handler();
-
225#endif
-
226
-
227#if defined (ARDUINO_ARCH_NRF52840) || defined (ARDUINO_ARCH_NRF52) || defined (DOXYGEN_FORCED)
- -
245
- -
253
- -
261
-
267 int8_t gain;
-
268
-
278 uint8_t useI2S;
-
279
-
294 uint16_t I2S_PIN_MCK;
- -
296 uint16_t I2S_PIN_SCK;
- -
298 uint16_t I2S_PIN_LRCK;
- - - -
302 uint16_t I2S_PIN_SDIN;
- -
304
- -
312#endif
-
313
-
315private:
-
324#if defined (ARDUINO_ARCH_SAM)
-
325 bool whichDma = 0;
-
326 bool whichDac;
-
327 bool dacChan;
-
328
-
329 uint8_t aCtr = 0; /* Internal counter for ADC data */
-
330 uint16_t realBuf[MAX_BUFFER_SIZE]; /* Internal DAC buffer */
-
331 uint16_t adcDma[MAX_BUFFER_SIZE]; /* Buffers for ADC DMA transfers */
-
332 uint16_t dataReady; /* Internal indicator for DAC data */
-
333
-
334 uint32_t dataTimer; /* Internal timer tracks timing of incoming data */
-
335 uint32_t sampleCount; /* Internal counter for delaying analysis of timing */
-
336 uint32_t tcTicks; /* Stores the current TC0 Ch0 counter value */
-
337 uint32_t tcTicks2; /* Stores the current TC0 Ch1 counter value */
-
338 uint32_t adjustDivider; /* Internal variables for adjusting timers on-the-fly */
-
339
-
340 uint32_t dacNumSamples; /* Internal variable for number of samples sent to the DAC */
-
341 uint32_t adcNumSamples;
-
342 uint16_t adjustCtr; /* Internal variables for adjusting timers on-the-fly */
-
343 uint16_t adjustCtr2; /* Internal variables for adjusting timers on-the-fly */
-
344 uint32_t adcLastAdjust;
-
345#endif
-
346 void adcSetup(void); /* Enable the ADC */
-
347 void dacSetup(void); /* Enable the DAC */
-
348
-
349 void dacBufferStereo(uint8_t dacChannel);
-
350
-
351 void tcSetup(uint32_t sampRate = 0); /* Sets up Timer TC0 Channel 0 */
-
352 void tc2Setup(uint32_t sampRate = 0); /* Sets up Timer TC0 Channel 1 */
+ +
138
+
139
+ +
149
+ +
160
+
168 void enableAdcChannel(uint8_t pinAx);
+
169
+
174 void disableAdcChannel(uint8_t pinAx);
+
175
+
180 void disableDAC(bool withinTask = false);
+
181
+
192 void adcInterrupts(bool enabled = true);
+
193
+
194 void dacInterrupts(bool enabled = true, bool withinTask = false);
+
195
+
196 #if defined (ESP32) || defined (DOXYGEN_FORCED)
+
200 void rampOut(uint8_t sample);
+
201 void rampIn(uint8_t sample);
+
202 TaskHandle_t dacTaskHandle;
+
203 #endif
+
204
+
205
+
206#if defined (ARDUINO_ARCH_NRF52840) || defined (ARDUINO_ARCH_NRF52) && !defined ARDUINO_NRF52840_FEATHER && defined __MBED__
+
207 inline static uint8_t aCtr;
+
208 inline static uint32_t aSize;
+
209 inline static uint16_t *adcBuf0 = NULL;
+
210 inline static uint16_t *adcBuf1 = NULL;
+
211 inline static void (*_onReceive)(uint16_t *buf, uint32_t buf_len) = NULL;
+
212 inline static void adcCallback(uint16_t *buf, uint32_t buf_len);
+
213 inline static void set_callback(void(*function)(uint16_t *buf, uint32_t buf_len));
+
214 inline static bool adcReady;
+
215 inline static uint16_t *dacBuf0;
+
216 inline static uint16_t *dacBuf1;
+
217 inline static uint32_t sampleCounter;
+
218 uint8_t enableADC;
+
219 uint8_t enableDAC;
+
220 bool whichBuf;
+
221 bool adcWhichBuf;
+
222
+
223#elif defined (ARDUINO_ARCH_NRF52840) || defined (ARDUINO_ARCH_NRF52) || defined (ARDUINO_NRF52840_FEATHER) && !defined __MBED__
+
224 uint16_t *dacBuf0;
+
225 uint16_t *dacBuf1;
+
226 static uint8_t aCtr;
+
227 static uint32_t aSize;
+
228 static uint16_t *adcBuf0;
+
229 static uint16_t *adcBuf1;
+
230 static void (*_onReceive)(uint16_t *buf, uint32_t buf_len);
+
231 static void adcCallback(uint16_t *buf, uint32_t buf_len);
+
232 void set_callback(void(*function)(uint16_t *buf, uint32_t buf_len));
+
233 static bool adcReady;
+
234 uint32_t sampleCounter;
+
235 uint8_t enableADC;
+
236 uint8_t enableDAC;
+
237 bool whichBuf;
+
238 bool adcWhichBuf;
+
239#endif
+
240
+
241#if defined (ARDUINO_ARCH_NRF52840) || defined (ARDUINO_ARCH_NRF52) || defined (DOXYGEN_FORCED)
+ +
259
+ +
267
+ +
275
+
281 int8_t gain;
+
282
+
297 uint16_t I2S_PIN_MCK;
+ +
299 uint16_t I2S_PIN_SCK;
+ +
301 uint16_t I2S_PIN_LRCK;
+ + + +
305 uint16_t I2S_PIN_SDIN;
+ +
307
+ +
315#endif
+
316
+
318private:
+
327#if defined (ARDUINO_ARCH_SAM)
+
328 bool whichDma = 0;
+
329 bool whichDac;
+
330 bool dacChan;
+
331
+
332 uint8_t aCtr = 0; /* Internal counter for ADC data */
+
333 uint16_t realBuf[MAX_BUFFER_SIZE]; /* Internal DAC buffer */
+
334 uint16_t adcDma[MAX_BUFFER_SIZE]; /* Buffers for ADC DMA transfers */
+
335 uint16_t dataReady; /* Internal indicator for DAC data */
+
336
+
337 uint32_t dataTimer; /* Internal timer tracks timing of incoming data */
+
338 uint32_t sampleCount; /* Internal counter for delaying analysis of timing */
+
339 uint32_t tcTicks; /* Stores the current TC0 Ch0 counter value */
+
340 uint32_t tcTicks2; /* Stores the current TC0 Ch1 counter value */
+
341 uint32_t adjustDivider; /* Internal variables for adjusting timers on-the-fly */
+
342
+
343 uint32_t dacNumSamples; /* Internal variable for number of samples sent to the DAC */
+
344 uint32_t adcNumSamples;
+
345 uint16_t adjustCtr; /* Internal variables for adjusting timers on-the-fly */
+
346 uint16_t adjustCtr2; /* Internal variables for adjusting timers on-the-fly */
+
347 uint32_t adcLastAdjust;
+
348#endif
+
349 void adcSetup(void); /* Enable the ADC */
+
350 void dacSetup(void); /* Enable the DAC */
+
351
+
352 void dacBufferStereo(uint8_t dacChannel);
353
-
354 uint32_t frequencyToTimerCount(uint32_t Frequency); /* Function to calculate timer counters */
-
355
-
356#if defined ESP32
-
357
-
358 uint32_t sampleRate;
-
359 i2s_config_t i2s_cfg;
+
354 void tcSetup(uint32_t sampRate = 0); /* Sets up Timer TC0 Channel 0 */
+
355 void tc2Setup(uint32_t sampRate = 0); /* Sets up Timer TC0 Channel 1 */
+
356
+
357 uint32_t frequencyToTimerCount(uint32_t Frequency); /* Function to calculate timer counters */
+
358
+
359#if defined ESP32
360
-
361 bool i2sStopped;
-
362 adc1_channel_t adcChannel;
+
361 uint32_t sampleRate;
+
362 i2s_config_t i2s_cfg;
363
-
364 bool taskCreated;
-
365
-
366 bool dacEnabled;
-
367 uint8_t lastDacSample;
-
368 i2s_event_t myI2SQueue[5];
-
369 //void dacTask(void *args);
-
370
-
371 bool adcTaskCreated;
-
372 bool adcDisabled;
+
364 bool i2sStopped;
+
365 adc1_channel_t adcChannel;
+
366
+
367 bool taskCreated;
+
368
+
369 bool dacEnabled;
+
370 uint8_t lastDacSample;
+
371 i2s_event_t myI2SQueue[5];
+
372 //void dacTask(void *args);
373
-
374 #define DELAY_250MS (250 / portTICK_PERIOD_MS)
-
375
-
376#endif
-
378};
+
374 bool adcTaskCreated;
+
375 bool adcDisabled;
+
376
+
377 #define DELAY_250MS (250 / portTICK_PERIOD_MS)
+
378
+
379#endif
+
381};
-
379
-
380
-
381
-
382#endif
+
382
383
384
+
385#endif
+
386
+
387
void adcInterrupts(bool enabled=true)
void dacHandler(void)
-
uint8_t dacBitsPerSample
+
uint8_t dacBitsPerSample
void setSampleRate(uint32_t sampRate=0, bool stereo=false)
void rampIn(uint8_t sample)
-
uint8_t adcBuffer[MAX_BUFFER_SIZE]
-
uint8_t I2S_PORT_SDIN
-
uint16_t I2S_PIN_LRCK
- - +
uint8_t adcBuffer[MAX_BUFFER_SIZE]
+
uint8_t I2S_PORT_SDIN
+
uint16_t I2S_PIN_LRCK
+ + -
uint8_t I2S_PORT_LRCK
-
uint8_t dacBuffer[MAX_BUFFER_SIZE]
- -
TaskHandle_t dacTaskHandle
+
uint8_t I2S_PORT_LRCK
+
uint8_t dacBuffer[MAX_BUFFER_SIZE]
+ +
TaskHandle_t dacTaskHandle
void getADC(uint32_t samples=MAX_BUFFER_SIZE)
-
uint16_t adcBuffer16[MAX_BUFFER_SIZE]
+
uint16_t adcBuffer16[MAX_BUFFER_SIZE]
void rampOut(uint8_t sample)
-
uint8_t I2S_PORT_SCK
+
uint8_t I2S_PORT_SCK
void disableDAC(bool withinTask=false)
-
uint16_t I2S_PIN_SCK
- -
uint16_t dacBuffer16[MAX_BUFFER_SIZE]
-
uint8_t I2S_PORT_SDOUT
-
uint16_t I2S_PIN_MCK
+
uint16_t I2S_PIN_SCK
+ +
uint16_t dacBuffer16[MAX_BUFFER_SIZE]
+
uint8_t I2S_PORT_SDOUT
+
uint16_t I2S_PIN_MCK
+
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
void dacInterrupts(bool enabled=true, bool withinTask=false)
- +
void enableAdcChannel(uint8_t pinAx)
-
uint8_t I2S_PORT_MCK
- +
uint8_t I2S_PORT_MCK
void feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)
-
uint16_t I2S_PIN_SDOUT
-
uint16_t I2S_PIN_SDIN
-
uint8_t adcBitsPerSample
+
uint16_t I2S_PIN_SDOUT
+
uint16_t I2S_PIN_SDIN
+
uint8_t adcBitsPerSample
void triggerADC()
-
uint32_t maxBufferSize
+
uint32_t maxBufferSize
void disableAdcChannel(uint8_t pinAx)
-
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
diff --git a/MultiChannelAdcStream_8ino-example.html b/MultiChannelAdcStream_8ino-example.html index 1a41960..b16fe05 100644 --- a/MultiChannelAdcStream_8ino-example.html +++ b/MultiChannelAdcStream_8ino-example.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -128,10 +128,10 @@
void setup() {
-
Serial.begin(115200);
+
Serial.begin(115200);
Serial.println("Analog Audio Begin");
-
aaAudio.begin(1, 0); //Setup aaAudio using ADC only
+
aaAudio.begin(1, 0); //Setup aaAudio using ADC only
aaAudio.autoAdjust = 0; //Disable auto adjust of timers
aaAudio.adcBitsPerSample = 12; //Sample at 12-bits
aaAudio.setSampleRate(32); //Get 32 samples every second
@@ -181,16 +181,16 @@
void setSampleRate(uint32_t sampRate=0, bool stereo=false)
- +
void getADC(uint32_t samples=MAX_BUFFER_SIZE)
-
uint16_t adcBuffer16[MAX_BUFFER_SIZE]
+
uint16_t adcBuffer16[MAX_BUFFER_SIZE]
+
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
void enableAdcChannel(uint8_t pinAx)
-
uint8_t adcBitsPerSample
-
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
+
uint8_t adcBitsPerSample

diff --git a/NRF52_PDM_PWMTest_8ino-example.html b/NRF52_PDM_PWMTest_8ino-example.html index b987bf9..c8dd97d 100644 --- a/NRF52_PDM_PWMTest_8ino-example.html +++ b/NRF52_PDM_PWMTest_8ino-example.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -81,42 +81,44 @@
AutoAnalog aaAudio;
-
// REQUIRES MBed Enabled Core for NRF52 (XIAO 52840 Sense)
+
#if defined(USE_TINYUSB)
+
// Needed for Serial.print on non-MBED enabled or adafruit-based nRF52 cores
+
#include "Adafruit_TinyUSB.h"
+
#endif
void setup() {
-
-
//Startup the PDM Microphone and PWM(pseudo DAC) on pin 5
-
aaAudio.begin(1, 1);
-
aaAudio.autoAdjust = 0;
-
aaAudio.adcBitsPerSample = 16; // 16-bit audio at 16khz is the default on NRF52 and cannot be modified currently (in progress)
-
aaAudio.dacBitsPerSample = 16;
-
aaAudio.setSampleRate(16000);
-
+
Serial.begin(115200);
+
aaAudio.begin(1, 1); //Startup the PDM Microphone and PWM(pseudo DAC) on pin 5
+
aaAudio.adcBitsPerSample = 16; // 16-bit audio at 16khz is the default on NRF52 and cannot be modified currently (in progress)
+
aaAudio.dacBitsPerSample = 16;
+
aaAudio.setSampleRate(16000);
}
void loop() {
-
aaAudio.getADC(320); // Get 320 Samples from the ADC
-
for (int i = 0; i < 320; i++) { // Copy them into the DAC Buffer
-
aaAudio.dacBuffer16[i] = (uint16_t)(aaAudio.adcBuffer16[i]);
+
aaAudio.getADC(320); // Get 320 16-bit signed samples from the ADC
+
for (int i = 0; i < 320; i++) { // Copy them into the DAC Buffer. The dac buffer is 16-bits unsigned
+
int16_t sample = aaAudio.adcBuffer16[i]; // Copy to signed 16-bit
+
sample += 0x8000; // Convert to unsigned 16-bit
+
aaAudio.dacBuffer16[i] = sample; // Copy back to unsigned 16-bit buffer
+
aaAudio.dacBuffer16[i] >>= 6; // Downsample to 10-bits for PWM output. With higher sample rates PWM can only handle 8-bits
}
-
aaAudio.feedDAC(0,320); // Feed the DAC with the ADC data
+
aaAudio.feedDAC(0, 320); // Feed the DAC with the ADC data
}
-
uint8_t dacBitsPerSample
+
uint8_t dacBitsPerSample
void setSampleRate(uint32_t sampRate=0, bool stereo=false)
-
void getADC(uint32_t samples=MAX_BUFFER_SIZE)
-
uint16_t adcBuffer16[MAX_BUFFER_SIZE]
-
uint16_t dacBuffer16[MAX_BUFFER_SIZE]
+
uint16_t adcBuffer16[MAX_BUFFER_SIZE]
+
uint16_t dacBuffer16[MAX_BUFFER_SIZE]
+
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
void feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)
-
uint8_t adcBitsPerSample
-
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
+
uint8_t adcBitsPerSample
diff --git a/SdAudioAuto_8ino-example.html b/SdAudioAuto_8ino-example.html index 14a426d..41a002a 100644 --- a/SdAudioAuto_8ino-example.html +++ b/SdAudioAuto_8ino-example.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -137,7 +137,7 @@
Serial.println("SD ok");
Serial.println("Analog Audio Begin");
-
aaAudio.begin(0, 1); //Setup aaAudio using DAC
+
aaAudio.begin(0, 1); //Setup aaAudio using DAC
aaAudio.autoAdjust = 0;
}
@@ -212,18 +212,18 @@
void dacHandler(void)
-
uint8_t dacBitsPerSample
+
uint8_t dacBitsPerSample
void setSampleRate(uint32_t sampRate=0, bool stereo=false)
- -
uint8_t dacBuffer[MAX_BUFFER_SIZE]
+ +
uint8_t dacBuffer[MAX_BUFFER_SIZE]
void disableDAC(bool withinTask=false)
-
uint16_t dacBuffer16[MAX_BUFFER_SIZE]
+
uint16_t dacBuffer16[MAX_BUFFER_SIZE]
+
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
void feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)
-
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
diff --git a/SdAudioBasic_8ino-example.html b/SdAudioBasic_8ino-example.html index 787cd19..059bcf7 100644 --- a/SdAudioBasic_8ino-example.html +++ b/SdAudioBasic_8ino-example.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -128,7 +128,7 @@
Serial.println("init ok");
Serial.println("Analog Audio Begin");
-
aaAudio.begin(0, 1); //Setup aaAudio using DAC
+
aaAudio.begin(0, 1); //Setup aaAudio using DAC
aaAudio.autoAdjust = 0;
//Setup for audio at 8-bit, 16khz, mono
@@ -186,16 +186,16 @@
void dacHandler(void)
-
uint8_t dacBitsPerSample
+
uint8_t dacBitsPerSample
void setSampleRate(uint32_t sampRate=0, bool stereo=false)
- -
uint8_t dacBuffer[MAX_BUFFER_SIZE]
+ +
uint8_t dacBuffer[MAX_BUFFER_SIZE]
+
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
void feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)
-
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
diff --git a/SdAudioRecording_8ino-example.html b/SdAudioRecording_8ino-example.html index 6b97f94..314fbe7 100644 --- a/SdAudioRecording_8ino-example.html +++ b/SdAudioRecording_8ino-example.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -130,7 +130,7 @@
void setup() {
-
Serial.begin(115200);
+
Serial.begin(115200);
if (!SD.begin(SD_CS_PIN)) {
Serial.println("SD init failed!");
@@ -138,7 +138,7 @@
}
Serial.println("SD ok\nAnalog Audio Begin");
-
aaAudio.begin(1, 1); // Start AAAudio with ADC & DAC
+
aaAudio.begin(1, 1); // Start AAAudio with ADC & DAC
aaAudio.autoAdjust = 0; // Disable automatic timer adjustment
}
@@ -188,12 +188,12 @@
/*********************************************************/
- -
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
+ +
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
diff --git a/SdAudioWavPlayer_8ino-example.html b/SdAudioWavPlayer_8ino-example.html index b7b432d..4635fa9 100644 --- a/SdAudioWavPlayer_8ino-example.html +++ b/SdAudioWavPlayer_8ino-example.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -126,7 +126,7 @@
void setup() {
-
Serial.begin(115200);
+
Serial.begin(115200);
if (!SD.begin(SD_CS_PIN)) {
Serial.println("SD init failed!");
@@ -134,7 +134,7 @@
}
Serial.println("SD ok\nAnalog Audio Begin");
-
aaAudio.begin(0, 1); // Start AAAudio with only the DAC
+
aaAudio.begin(0, 1); // Start AAAudio with only the DAC
aaAudio.autoAdjust = 0; // Disable automatic timer adjustment
}
@@ -164,12 +164,12 @@
- -
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
+ +
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
diff --git a/SimpleAdcStream_8ino-example.html b/SimpleAdcStream_8ino-example.html index c0644f7..48f109a 100644 --- a/SimpleAdcStream_8ino-example.html +++ b/SimpleAdcStream_8ino-example.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -132,7 +132,7 @@
Serial.begin(115200);
Serial.println("Analog Audio Begin");
-
aaAudio.begin(1, 0); //Setup aaAudio using ADC only
+
aaAudio.begin(1, 0); //Setup aaAudio using ADC only
aaAudio.autoAdjust = 0; //Disable auto adjust of timers
aaAudio.adcBitsPerSample = 12; //Sample at 12-bits
aaAudio.setSampleRate(32); //Get 32 samples every second
@@ -171,15 +171,15 @@
void setSampleRate(uint32_t sampRate=0, bool stereo=false)
- +
void getADC(uint32_t samples=MAX_BUFFER_SIZE)
-
uint16_t adcBuffer16[MAX_BUFFER_SIZE]
-
uint8_t adcBitsPerSample
-
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
+
uint16_t adcBuffer16[MAX_BUFFER_SIZE]
+
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
+
uint8_t adcBitsPerSample
diff --git a/SimpleSine12Bit_8ino-example.html b/SimpleSine12Bit_8ino-example.html index 7ab92ad..6ed98ce 100644 --- a/SimpleSine12Bit_8ino-example.html +++ b/SimpleSine12Bit_8ino-example.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -119,7 +119,7 @@
Serial.begin(115200);
Serial.println("Analog Audio Begin");
-
aaAudio.begin(0, 1); //Setup aaAudio using DAC
+
aaAudio.begin(0, 1); //Setup aaAudio using DAC
aaAudio.autoAdjust = 0; //Disable automatic timer adjustment
aaAudio.setSampleRate(16000); //Set the sample rate to 16khz
aaAudio.dacBitsPerSample = 12; //Use 12-bit samples for the DAC
@@ -232,16 +232,16 @@
void dacHandler(void)
-
uint8_t dacBitsPerSample
+
uint8_t dacBitsPerSample
void setSampleRate(uint32_t sampRate=0, bool stereo=false)
- -
uint16_t dacBuffer16[MAX_BUFFER_SIZE]
+ +
uint16_t dacBuffer16[MAX_BUFFER_SIZE]
+
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
void feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)
-
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
diff --git a/SimpleSine_8ino-example.html b/SimpleSine_8ino-example.html index b9698f9..18d7e80 100644 --- a/SimpleSine_8ino-example.html +++ b/SimpleSine_8ino-example.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -125,7 +125,7 @@
//Optional: Setup the radio to broadcast the generated audio
//setupRadio();
-
aaAudio.begin(0, 1); //Setup aaAudio using DAC
+
aaAudio.begin(0, 1); //Setup aaAudio using DAC
aaAudio.autoAdjust = 0; //Disable automatic timer adjustment
aaAudio.setSampleRate(16050); //Set the sample rate to 16khz
arraysetup(); //Load the DAC buffer using a 32-step sine wave
@@ -242,14 +242,14 @@
void dacHandler(void)
void setSampleRate(uint32_t sampRate=0, bool stereo=false)
- -
uint8_t dacBuffer[MAX_BUFFER_SIZE]
+ +
uint8_t dacBuffer[MAX_BUFFER_SIZE]
+
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
void feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)
-
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
diff --git a/WirelessMicrophone_8ino-example.html b/WirelessMicrophone_8ino-example.html index e986ea5..505fc5a 100644 --- a/WirelessMicrophone_8ino-example.html +++ b/WirelessMicrophone_8ino-example.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -144,7 +144,7 @@
Serial.begin(115200);
Serial.println("Analog Audio Begin");
-
aaAudio.begin(1, 0); //Setup aaAudio using ADC only
+
aaAudio.begin(1, 0); //Setup aaAudio using ADC only
aaAudio.autoAdjust = 0;
aaAudio.adcBitsPerSample = 8;
aaAudio.setSampleRate(16050);
@@ -182,15 +182,15 @@
void dacHandler(void)
void setSampleRate(uint32_t sampRate=0, bool stereo=false)
-
uint8_t adcBuffer[MAX_BUFFER_SIZE]
- +
uint8_t adcBuffer[MAX_BUFFER_SIZE]
+
void getADC(uint32_t samples=MAX_BUFFER_SIZE)
-
uint8_t adcBitsPerSample
-
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
+
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
+
uint8_t adcBitsPerSample
diff --git a/WirelessSpeaker_8ino-example.html b/WirelessSpeaker_8ino-example.html index 56c4b46..f025ac7 100644 --- a/WirelessSpeaker_8ino-example.html +++ b/WirelessSpeaker_8ino-example.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -143,7 +143,7 @@
Serial.begin(115200);
Serial.println("Analog Audio Begin");
-
aaAudio.begin(0, 1); //Setup aaAudio using both DAC and ADC
+
aaAudio.begin(0, 1); //Setup aaAudio using both DAC and ADC
aaAudio.autoAdjust = 1;
aaAudio.dacBitsPerSample = 12;
setupRadio();
@@ -215,16 +215,16 @@
void dacHandler(void)
-
uint8_t dacBitsPerSample
+
uint8_t dacBitsPerSample
void setSampleRate(uint32_t sampRate=0, bool stereo=false)
- -
uint16_t dacBuffer16[MAX_BUFFER_SIZE]
+ +
uint16_t dacBuffer16[MAX_BUFFER_SIZE]
+
void begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)
void feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)
-
void begin(bool enADC, bool enDAC, uint8_t _useI2S=false)
diff --git a/annotated.html b/annotated.html index 7045bae..d609abb 100644 --- a/annotated.html +++ b/annotated.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -82,7 +82,7 @@
diff --git a/classAutoAnalog-members.html b/classAutoAnalog-members.html index 049cbab..7806b4c 100644 --- a/classAutoAnalog-members.html +++ b/classAutoAnalog-members.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -83,7 +83,7 @@ adcInterrupts(bool enabled=true)AutoAnalog autoAdjustAutoAnalog AutoAnalog()AutoAnalog - begin(bool enADC, bool enDAC, uint8_t _useI2S=false)AutoAnalog + begin(uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0)AutoAnalog clkPinAutoAnalog dacBitsPerSampleAutoAnalog dacBufferAutoAnalog @@ -114,11 +114,10 @@ rampOut(uint8_t sample)AutoAnalog setSampleRate(uint32_t sampRate=0, bool stereo=false)AutoAnalog triggerADC()AutoAnalog - useI2SAutoAnalog
diff --git a/classAutoAnalog.html b/classAutoAnalog.html index da2642c..c21bda1 100644 --- a/classAutoAnalog.html +++ b/classAutoAnalog.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -93,8 +93,6 @@   int8_t gain   -uint8_t useI2S -  uint16_t I2S_PIN_MCK   uint8_t I2S_PORT_MCK @@ -139,8 +137,8 @@    AutoAnalog ()   -void begin (bool enADC, bool enDAC, uint8_t _useI2S=false) -  +void begin (uint8_t enADC, uint8_t enDAC, uint8_t _useI2S=0) +  void triggerADC ()   void getADC (uint32_t samples=MAX_BUFFER_SIZE) @@ -190,8 +188,8 @@

Member Function Documentation

- -

◆ begin()

+ +

◆ begin()

@@ -199,20 +197,20 @@

void AutoAnalog::begin ( - bool  + uint8_t  enADC, - bool  + uint8_t  enDAC, uint8_t  - _useI2S = false  + _useI2S = 0  @@ -222,8 +220,19 @@

Setup the timer(s)

-

NRF52 Only: Call the below code prior to begin() to limit memory usage/buffer sizes:

aaAudio.maxBufferSize = YOUR_AUDIO_BUFFER_SIZE;
-
Examples
AudioRadioRelay.ino, MultiChannelAdcStream.ino, NRF52_PDM_PWMTest.ino, SdAudioAuto.ino, SdAudioBasic.ino, SdAudioRecording.ino, SdAudioWavPlayer.ino, SimpleAdcStream.ino, SimpleSine.ino, SimpleSine12Bit.ino, WirelessMicrophone.ino, and WirelessSpeaker.ino.
+

Make sure to define your chosen pins before calling begin();
+

+

NRF52 Only: Call the below code prior to begin() to limit memory usage/buffer sizes:
+

aaAudio.maxBufferSize = YOUR_AUDIO_BUFFER_SIZE;
+

Third option:

Parameters
+ + + + +
enADC0 = Disabled, 1 = PDM input, 2 = I2S input, 3 = SAADC input
enDAC0 = Disabled, 1 = PWM output, 2 = I2S output
_useI2SThis is deprecated, use enADC and enDAC to control inputs/outputs
+
+
+
Examples
AudioRadioRelay.ino, MultiChannelAdcStream.ino, NRF52_PDM_PWMTest.ino, SdAudioAuto.ino, SdAudioBasic.ino, SdAudioRecording.ino, SdAudioWavPlayer.ino, SimpleAdcStream.ino, SimpleSine.ino, SimpleSine12Bit.ino, WirelessMicrophone.ino, and WirelessSpeaker.ino.

@@ -269,7 +278,7 @@

Note
Changes to the number of samples will not take place until one buffer has been returned with the previous number of samples
-
Examples
AudioRadioRelay.ino, MultiChannelAdcStream.ino, NRF52_PDM_PWMTest.ino, SimpleAdcStream.ino, and WirelessMicrophone.ino.
+
Examples
AudioRadioRelay.ino, MultiChannelAdcStream.ino, NRF52_PDM_PWMTest.ino, SimpleAdcStream.ino, and WirelessMicrophone.ino.

@@ -314,7 +323,7 @@

Examples
AudioRadioRelay.ino, NRF52_PDM_PWMTest.ino, SdAudioAuto.ino, SdAudioBasic.ino, SimpleSine.ino, SimpleSine12Bit.ino, and WirelessSpeaker.ino.
+
Examples
AudioRadioRelay.ino, NRF52_PDM_PWMTest.ino, SdAudioAuto.ino, SdAudioBasic.ino, SimpleSine.ino, SimpleSine12Bit.ino, and WirelessSpeaker.ino.

@@ -351,7 +360,7 @@

Examples
AudioRadioRelay.ino, MultiChannelAdcStream.ino, NRF52_PDM_PWMTest.ino, SdAudioAuto.ino, SdAudioBasic.ino, SimpleAdcStream.ino, SimpleSine.ino, SimpleSine12Bit.ino, WirelessMicrophone.ino, and WirelessSpeaker.ino.
+
Examples
AudioRadioRelay.ino, MultiChannelAdcStream.ino, NRF52_PDM_PWMTest.ino, SdAudioAuto.ino, SdAudioBasic.ino, SimpleAdcStream.ino, SimpleSine.ino, SimpleSine12Bit.ino, WirelessMicrophone.ino, and WirelessSpeaker.ino.
@@ -555,7 +564,7 @@

Examples
AudioRadioRelay.ino, SdAudioAuto.ino, SdAudioBasic.ino, and SimpleSine.ino.
-

Definition at line 88 of file AutoAnalogAudio.h.

+

Definition at line 95 of file AutoAnalogAudio.h.

@@ -576,7 +585,7 @@

Examples
AudioRadioRelay.ino, and WirelessMicrophone.ino.
-

Definition at line 95 of file AutoAnalogAudio.h.

+

Definition at line 102 of file AutoAnalogAudio.h.

@@ -597,7 +606,7 @@

Examples
NRF52_PDM_PWMTest.ino, SdAudioAuto.ino, SimpleSine12Bit.ino, and WirelessSpeaker.ino.
-

Definition at line 102 of file AutoAnalogAudio.h.

+

Definition at line 109 of file AutoAnalogAudio.h.

@@ -615,10 +624,10 @@

getADC()

See also
adcBitsPerSample
-
Examples
MultiChannelAdcStream.ino, NRF52_PDM_PWMTest.ino, and SimpleAdcStream.ino.
+
Examples
MultiChannelAdcStream.ino, NRF52_PDM_PWMTest.ino, and SimpleAdcStream.ino.
-

Definition at line 110 of file AutoAnalogAudio.h.

+

Definition at line 117 of file AutoAnalogAudio.h.

@@ -635,10 +644,10 @@

Auto & Manual sample rates. En/Disables automatic adjustment of timers

Default: true

-
Examples
AudioRadioRelay.ino, MultiChannelAdcStream.ino, NRF52_PDM_PWMTest.ino, SdAudioAuto.ino, SdAudioBasic.ino, SdAudioRecording.ino, SdAudioWavPlayer.ino, SimpleAdcStream.ino, SimpleSine.ino, SimpleSine12Bit.ino, WirelessMicrophone.ino, and WirelessSpeaker.ino.
+
Examples
AudioRadioRelay.ino, MultiChannelAdcStream.ino, SdAudioAuto.ino, SdAudioBasic.ino, SdAudioRecording.ino, SdAudioWavPlayer.ino, SimpleAdcStream.ino, SimpleSine.ino, SimpleSine12Bit.ino, WirelessMicrophone.ino, and WirelessSpeaker.ino.
-

Definition at line 130 of file AutoAnalogAudio.h.

+

Definition at line 137 of file AutoAnalogAudio.h.

@@ -661,10 +670,10 @@

Examples
MultiChannelAdcStream.ino, NRF52_PDM_PWMTest.ino, SimpleAdcStream.ino, and WirelessMicrophone.ino.
+
Examples
MultiChannelAdcStream.ino, NRF52_PDM_PWMTest.ino, SimpleAdcStream.ino, and WirelessMicrophone.ino.
-

Definition at line 141 of file AutoAnalogAudio.h.

+

Definition at line 148 of file AutoAnalogAudio.h.

@@ -687,10 +696,10 @@

Examples
NRF52_PDM_PWMTest.ino, SdAudioAuto.ino, SdAudioBasic.ino, SimpleSine12Bit.ino, and WirelessSpeaker.ino.
+
Examples
NRF52_PDM_PWMTest.ino, SdAudioAuto.ino, SdAudioBasic.ino, SimpleSine12Bit.ino, and WirelessSpeaker.ino.
-

Definition at line 152 of file AutoAnalogAudio.h.

+

Definition at line 159 of file AutoAnalogAudio.h.

@@ -706,7 +715,7 @@

-

Definition at line 195 of file AutoAnalogAudio.h.

+

Definition at line 202 of file AutoAnalogAudio.h.

@@ -724,10 +733,10 @@

begin()
+ Configure this before calling begin()

-

Definition at line 244 of file AutoAnalogAudio.h.

+

Definition at line 258 of file AutoAnalogAudio.h.

@@ -742,13 +751,12 @@

-

Set the Input Pin for PDM
- By default this is PIN_PDM_DIN
+

Set the Input Pin for PDM or SAADC. With SAADC AIN0 is 1, AIN1 is 2 etc. By default this is PIN_PDM_DIN
If PIN_PDM_DIN is not defined, it is set to 35 by default
- Configure this before calling
begin()
+ Configure this before calling begin()

-

Definition at line 252 of file AutoAnalogAudio.h.

+

Definition at line 266 of file AutoAnalogAudio.h.

@@ -766,10 +774,10 @@

begin()
+ Configure this before calling begin()

-

Definition at line 260 of file AutoAnalogAudio.h.

+

Definition at line 274 of file AutoAnalogAudio.h.

@@ -786,34 +794,10 @@

Set the Gain for PDM
By default this is set to 40
- Configure this before calling
begin()
+ Configure this before calling begin()

-

Definition at line 267 of file AutoAnalogAudio.h.

- - - - -

◆ useI2S

- -
-
- - - - -
uint8_t AutoAnalog::useI2S
-
-

Enable I2S on nRF52 By default this is disabled (analog output using PWM)

-
aaAudio.begin(1,1,3);
-
Parameters
- - -
Setto 1 for I2S DAC, 2 for I2S ADC, 3 for both
-
-
- -

Definition at line 278 of file AutoAnalogAudio.h.

+

Definition at line 281 of file AutoAnalogAudio.h.

@@ -828,7 +812,7 @@

-

Configure the pins and ports for nRF52 using GPIO numbers before calling begin()
+

Configure the pins and ports for nRF52 using GPIO numbers before calling begin()
Defaults:
I2S_PIN_MCK = 2;
I2S_PORT_MCK = 0;
@@ -842,7 +826,7 @@

Definition at line 294 of file AutoAnalogAudio.h.

+

Definition at line 297 of file AutoAnalogAudio.h.

@@ -858,7 +842,7 @@

-

Definition at line 295 of file AutoAnalogAudio.h.

+

Definition at line 298 of file AutoAnalogAudio.h.

@@ -874,7 +858,7 @@

-

Definition at line 296 of file AutoAnalogAudio.h.

+

Definition at line 299 of file AutoAnalogAudio.h.

@@ -890,7 +874,7 @@

-

Definition at line 297 of file AutoAnalogAudio.h.

+

Definition at line 300 of file AutoAnalogAudio.h.

@@ -906,7 +890,7 @@

-

Definition at line 298 of file AutoAnalogAudio.h.

+

Definition at line 301 of file AutoAnalogAudio.h.

@@ -922,7 +906,7 @@

-

Definition at line 299 of file AutoAnalogAudio.h.

+

Definition at line 302 of file AutoAnalogAudio.h.

@@ -938,7 +922,7 @@

-

Definition at line 300 of file AutoAnalogAudio.h.

+

Definition at line 303 of file AutoAnalogAudio.h.

@@ -954,7 +938,7 @@

-

Definition at line 301 of file AutoAnalogAudio.h.

+

Definition at line 304 of file AutoAnalogAudio.h.

@@ -970,7 +954,7 @@

-

Definition at line 302 of file AutoAnalogAudio.h.

+

Definition at line 305 of file AutoAnalogAudio.h.

@@ -986,7 +970,7 @@

-

Definition at line 303 of file AutoAnalogAudio.h.

+

Definition at line 306 of file AutoAnalogAudio.h.

@@ -1004,10 +988,10 @@

begin()
+ Override that value for internal buffers by setting this before calling begin()

-

Definition at line 311 of file AutoAnalogAudio.h.

+

Definition at line 314 of file AutoAnalogAudio.h.

@@ -1017,7 +1001,7 @@

diff --git a/classes.html b/classes.html index 0b432da..e3555bd 100644 --- a/classes.html +++ b/classes.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -83,7 +83,7 @@
diff --git a/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/dir_68267d1309a1af8e8297ef4c3efbcdba.html index 3f20f70..93faadf 100644 --- a/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -92,7 +92,7 @@
diff --git a/dir_d35e8d9c847c512a0480f8070ffef7ed.html b/dir_d35e8d9c847c512a0480f8070ffef7ed.html index 364f064..c9e1629 100644 --- a/dir_d35e8d9c847c512a0480f8070ffef7ed.html +++ b/dir_d35e8d9c847c512a0480f8070ffef7ed.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -87,7 +87,7 @@
diff --git a/examples.html b/examples.html index b6801cd..754f8ff 100644 --- a/examples.html +++ b/examples.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -91,7 +91,7 @@
diff --git a/files.html b/files.html index 3ae4978..3cecbf2 100644 --- a/files.html +++ b/files.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -85,7 +85,7 @@
diff --git a/functions.html b/functions.html index 657a48d..a742ca2 100644 --- a/functions.html +++ b/functions.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -84,7 +84,7 @@

- a -

diff --git a/functions_func.html b/functions_func.html index 6d2f335..8fb6d6a 100644 --- a/functions_func.html +++ b/functions_func.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -74,7 +74,7 @@
Here is a list of all functions with links to the classes they belong to:
diff --git a/functions_vars.html b/functions_vars.html index 2b33818..d5e56ce 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -22,7 +22,7 @@ -
Auto Analog Audio v1.52.0 +
Auto Analog Audio v1.53.0
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -95,12 +95,11 @@
  • I2S_PORT_SDOUT : AutoAnalog
  • maxBufferSize : AutoAnalog
  • pwrPin : AutoAnalog
  • -
  • useI2S : AutoAnalog
  • diff --git a/globals.html b/globals.html index 3776a50..9ba4640 100644 --- a/globals.html +++ b/globals.html @@ -22,7 +22,7 @@ -
    Auto Analog Audio v1.52.0 +
    Auto Analog Audio v1.53.0
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    @@ -79,7 +79,7 @@
    diff --git a/globals_defs.html b/globals_defs.html index aaa62c6..b087c76 100644 --- a/globals_defs.html +++ b/globals_defs.html @@ -22,7 +22,7 @@ -
    Auto Analog Audio v1.52.0 +
    Auto Analog Audio v1.53.0
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    @@ -79,7 +79,7 @@
    diff --git a/index.html b/index.html index 536d815..d53655d 100644 --- a/index.html +++ b/index.html @@ -22,7 +22,7 @@ -
    Auto Analog Audio v1.52.0 +
    Auto Analog Audio v1.53.0
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    @@ -101,7 +101,7 @@
    diff --git a/menudata.js b/menudata.js index f7be70d..af603f1 100644 --- a/menudata.js +++ b/menudata.js @@ -41,8 +41,7 @@ var menudata={children:[ {text:"p",url:"functions.html#index_p"}, {text:"r",url:"functions.html#index_r"}, {text:"s",url:"functions.html#index_s"}, -{text:"t",url:"functions.html#index_t"}, -{text:"u",url:"functions.html#index_u"}]}, +{text:"t",url:"functions.html#index_t"}]}, {text:"Functions",url:"functions_func.html"}, {text:"Variables",url:"functions_vars.html"}]}]}, {text:"Files",url:"files.html",children:[ diff --git a/search/all_1.js b/search/all_1.js index 1c7cf1a..931e265 100644 --- a/search/all_1.js +++ b/search/all_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['begin_0',['begin',['../classAutoAnalog.html#af69f1daa5b60c4bfde9264d8dc880215',1,'AutoAnalog']]] + ['begin_0',['begin',['../classAutoAnalog.html#a9b1656a78a2c5501017ec11d8d00f286',1,'AutoAnalog']]] ]; diff --git a/search/all_e.js b/search/all_e.js deleted file mode 100644 index e85fd01..0000000 --- a/search/all_e.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['usei2s_0',['useI2S',['../classAutoAnalog.html#ac6750ae27adc5c22f142e24e71b9e50c',1,'AutoAnalog']]] -]; diff --git a/search/functions_1.js b/search/functions_1.js index 1c7cf1a..931e265 100644 --- a/search/functions_1.js +++ b/search/functions_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['begin_0',['begin',['../classAutoAnalog.html#af69f1daa5b60c4bfde9264d8dc880215',1,'AutoAnalog']]] + ['begin_0',['begin',['../classAutoAnalog.html#a9b1656a78a2c5501017ec11d8d00f286',1,'AutoAnalog']]] ]; diff --git a/search/searchdata.js b/search/searchdata.js index c907da9..4d42207 100644 --- a/search/searchdata.js +++ b/search/searchdata.js @@ -1,10 +1,10 @@ var indexSectionsWithContent = { - 0: "abcdefgilmprstu", + 0: "abcdefgilmprst", 1: "a", 2: "a", 3: "abdefgrst", - 4: "acdgimpu", + 4: "acdgimp", 5: "a", 6: "afl" }; diff --git a/search/variables_7.js b/search/variables_7.js deleted file mode 100644 index e85fd01..0000000 --- a/search/variables_7.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['usei2s_0',['useI2S',['../classAutoAnalog.html#ac6750ae27adc5c22f142e24e71b9e50c',1,'AutoAnalog']]] -];