From 131178c4ecc566056bde3cae280ef774338dab56 Mon Sep 17 00:00:00 2001 From: TMRh20 Date: Mon, 12 Apr 2021 16:45:52 +0000 Subject: [PATCH] deploy: 7f81c29d1b3bd1b598adc046c088feaf0ff2ac00 --- AudioRadioRelay_2myRadio_8h.html | 264 ------ AudioRadioRelay_2myRadio_8h_source.html | 128 --- AudioRadioRelay_8ino-example.html | 48 +- ...dio_8cpp.html => AutoAnalogAudio_8cpp.html | 16 +- ...e.html => AutoAnalogAudio_8cpp_source.html | 825 +++++++++--------- AutoAnalogAudio_8h.html | 6 +- AutoAnalogAudio_8h_source.html | 37 +- AutoAnalog__config_8h.html | 165 ---- AutoAnalog__config_8h_source.html | 119 --- ESP32_2ESP32__AudioTest_2myWAV_8h.html | 204 ----- ESP32_2ESP32__AudioTest_2myWAV_8h_source.html | 313 ------- Makefile.html | 83 -- Makefile_source.html | 134 --- MultiChannelAdcStream_8ino-example.html | 13 +- SDAudio_2SdAudioRecording_2myWAV_8h.html | 178 ---- ...io_2SdAudioRecording_2myWAV_8h_source.html | 216 ----- SDAudio_2SdAudioWavPlayer_2myWAV_8h.html | 178 ---- ...io_2SdAudioWavPlayer_2myWAV_8h_source.html | 209 ----- SdAudioAuto_8ino-example.html | 57 +- SdAudioBasic_8ino-example.html | 47 +- SdAudioRecording_8ino-example.html | 46 +- SdAudioWavPlayer_8ino-example.html | 27 +- SimpleAdcStream_8ino-example.html | 13 +- SimpleSine12Bit_8ino-example.html | 30 +- SimpleSine_2myRadio_8h.html | 256 ------ SimpleSine_2myRadio_8h_source.html | 129 --- SimpleSine_8ino-example.html | 28 +- WirelessMicrophone_2myRadio_8h.html | 256 ------ WirelessMicrophone_2myRadio_8h_source.html | 129 --- WirelessMicrophone_8ino-example.html | 37 +- WirelessSpeaker_2myRadio_8h.html | 256 ------ WirelessSpeaker_2myRadio_8h_source.html | 129 --- WirelessSpeaker_8ino-example.html | 53 +- annotated.html | 5 +- avr_2AutoAnalogAudio_8cpp.html | 83 -- avr_2AutoAnalogAudio_8cpp_source.html | 392 --------- classAutoAnalog-members.html | 21 +- classAutoAnalog.html | 121 ++- classes.html | 9 +- dir_10e51624dba7b487205d9a97220e50b9.html | 87 -- dir_2f9d61fbd4a05e3d7f36be67b49effbc.html | 87 -- dir_4cfd5b5feff4e2a34d925e28eef36dcc.html | 91 -- dir_68267d1309a1af8e8297ef4c3efbcdba.html | 10 +- dir_77eab80029731c2d515254385c5f861e.html | 89 -- dir_8882ba4365322dddf27be4df3376e9bf.html | 87 -- dir_9b2e53ab1f261bc6abd9570b500042f4.html | 87 -- dir_9f441c5802732231d7e005c776c36284.html | 87 -- dir_ac6bea81eae251a7ca519e4aaadd682d.html | 87 -- dir_b39bb3e480321ec1e2c642be908497e6.html | 87 -- dir_bd4eff8f7e0deb59c3e388155e74b196.html | 87 -- dir_d28a4824dc47e487b107a5db32ef43c4.html | 99 --- dir_d35e8d9c847c512a0480f8070ffef7ed.html | 6 +- dir_df8dc0d4d39619e24101c77f93ee40af.html | 89 -- dir_f126658ef24dcddc772c858a9c8ccd44.html | 91 -- examples.html | 4 +- files.html | 43 +- functions.html | 88 +- functions_func.html | 10 +- functions_vars.html | 44 +- globals.html | 177 +--- globals_defs.html | 16 +- globals_func.html | 165 ---- globals_vars.html | 166 ---- index.html | 4 +- menudata.js | 52 +- myRecording_8h.html | 243 ------ myRecording_8h_source.html | 236 ----- mySine_8h.html | 132 --- mySine_8h_source.html | 158 ---- radioRelay_8cpp.html | 295 ------- radioRelay_8cpp_source.html | 247 ------ sam_2AutoAnalogAudio_8cpp.html | 83 -- sam_2AutoAnalogAudio_8cpp_source.html | 490 ----------- search/all_0.js | 22 +- search/all_1.js | 6 +- search/all_10.html | 37 - search/all_10.js | 6 - search/all_2.js | 13 +- search/all_3.js | 12 +- search/all_4.js | 3 +- search/all_5.js | 4 +- search/all_6.js | 3 +- search/all_7.js | 2 +- search/all_8.js | 2 +- search/all_9.html | 37 - search/all_9.js | 10 - search/all_a.html | 37 - search/all_a.js | 4 - search/all_b.html | 37 - search/all_b.js | 6 - search/all_c.html | 37 - search/all_c.js | 8 - search/all_d.html | 37 - search/all_d.js | 15 - search/all_e.html | 37 - search/all_e.js | 5 - search/all_f.html | 37 - search/all_f.js | 7 - search/classes_0.js | 2 +- search/classes_1.html | 37 - search/classes_1.js | 4 - search/defines_0.js | 6 +- search/defines_1.html | 37 - search/defines_1.js | 6 - search/defines_2.html | 37 - search/defines_2.js | 4 - search/files_0.js | 5 +- search/files_1.html | 37 - search/files_1.js | 8 - search/files_2.html | 37 - search/files_2.js | 4 - search/files_3.html | 37 - search/files_3.js | 4 - search/files_4.html | 37 - search/files_4.js | 4 - search/functions_0.js | 5 +- search/functions_1.js | 2 +- search/functions_2.js | 5 +- search/functions_3.js | 6 +- search/functions_4.js | 2 +- search/functions_5.js | 2 +- search/functions_6.js | 3 +- search/functions_7.js | 2 +- search/functions_8.js | 2 +- search/functions_9.html | 37 - search/functions_9.js | 4 - search/functions_a.html | 37 - search/functions_a.js | 4 - search/functions_b.html | 37 - search/functions_b.js | 5 - search/functions_c.html | 37 - search/functions_c.js | 9 - search/functions_d.html | 37 - search/functions_d.js | 4 - search/functions_e.html | 37 - search/functions_e.js | 5 - search/pages_0.js | 2 +- search/searchdata.js | 12 +- search/variables_0.js | 10 +- search/variables_1.js | 8 +- search/variables_2.html | 37 - search/variables_2.js | 7 - search/variables_3.html | 37 - search/variables_3.js | 6 - search/variables_4.html | 37 - search/variables_4.js | 4 - search/variables_5.html | 37 - search/variables_5.js | 5 - search/variables_6.html | 37 - search/variables_6.js | 4 - search/variables_7.html | 37 - search/variables_7.js | 5 - search/variables_8.html | 37 - search/variables_8.js | 5 - search/variables_9.html | 37 - search/variables_9.js | 9 - search/variables_a.html | 37 - search/variables_a.js | 4 - search/variables_b.html | 37 - search/variables_b.js | 4 - search/variables_c.html | 37 - search/variables_c.js | 4 - structwavStruct-members.html | 93 -- structwavStruct.html | 327 ------- volume_8h.html | 157 ---- volume_8h_source.html | 120 --- wirelessSpeaker_8cpp.html | 293 ------- wirelessSpeaker_8cpp_source.html | 229 ----- 168 files changed, 818 insertions(+), 10993 deletions(-) delete mode 100644 AudioRadioRelay_2myRadio_8h.html delete mode 100644 AudioRadioRelay_2myRadio_8h_source.html rename esp32_2AutoAnalogAudio_8cpp.html => AutoAnalogAudio_8cpp.html (65%) rename esp32_2AutoAnalogAudio_8cpp_source.html => AutoAnalogAudio_8cpp_source.html (68%) delete mode 100644 AutoAnalog__config_8h.html delete mode 100644 AutoAnalog__config_8h_source.html delete mode 100644 ESP32_2ESP32__AudioTest_2myWAV_8h.html delete mode 100644 ESP32_2ESP32__AudioTest_2myWAV_8h_source.html delete mode 100644 Makefile.html delete mode 100644 Makefile_source.html delete mode 100644 SDAudio_2SdAudioRecording_2myWAV_8h.html delete mode 100644 SDAudio_2SdAudioRecording_2myWAV_8h_source.html delete mode 100644 SDAudio_2SdAudioWavPlayer_2myWAV_8h.html delete mode 100644 SDAudio_2SdAudioWavPlayer_2myWAV_8h_source.html delete mode 100644 SimpleSine_2myRadio_8h.html delete mode 100644 SimpleSine_2myRadio_8h_source.html delete mode 100644 WirelessMicrophone_2myRadio_8h.html delete mode 100644 WirelessMicrophone_2myRadio_8h_source.html delete mode 100644 WirelessSpeaker_2myRadio_8h.html delete mode 100644 WirelessSpeaker_2myRadio_8h_source.html delete mode 100644 avr_2AutoAnalogAudio_8cpp.html delete mode 100644 avr_2AutoAnalogAudio_8cpp_source.html delete mode 100644 dir_10e51624dba7b487205d9a97220e50b9.html delete mode 100644 dir_2f9d61fbd4a05e3d7f36be67b49effbc.html delete mode 100644 dir_4cfd5b5feff4e2a34d925e28eef36dcc.html delete mode 100644 dir_77eab80029731c2d515254385c5f861e.html delete mode 100644 dir_8882ba4365322dddf27be4df3376e9bf.html delete mode 100644 dir_9b2e53ab1f261bc6abd9570b500042f4.html delete mode 100644 dir_9f441c5802732231d7e005c776c36284.html delete mode 100644 dir_ac6bea81eae251a7ca519e4aaadd682d.html delete mode 100644 dir_b39bb3e480321ec1e2c642be908497e6.html delete mode 100644 dir_bd4eff8f7e0deb59c3e388155e74b196.html delete mode 100644 dir_d28a4824dc47e487b107a5db32ef43c4.html delete mode 100644 dir_df8dc0d4d39619e24101c77f93ee40af.html delete mode 100644 dir_f126658ef24dcddc772c858a9c8ccd44.html delete mode 100644 globals_func.html delete mode 100644 globals_vars.html delete mode 100644 myRecording_8h.html delete mode 100644 myRecording_8h_source.html delete mode 100644 mySine_8h.html delete mode 100644 mySine_8h_source.html delete mode 100644 radioRelay_8cpp.html delete mode 100644 radioRelay_8cpp_source.html delete mode 100644 sam_2AutoAnalogAudio_8cpp.html delete mode 100644 sam_2AutoAnalogAudio_8cpp_source.html delete mode 100644 search/all_10.html delete mode 100644 search/all_10.js delete mode 100644 search/all_9.html delete mode 100644 search/all_9.js delete mode 100644 search/all_a.html delete mode 100644 search/all_a.js delete mode 100644 search/all_b.html delete mode 100644 search/all_b.js delete mode 100644 search/all_c.html delete mode 100644 search/all_c.js delete mode 100644 search/all_d.html delete mode 100644 search/all_d.js delete mode 100644 search/all_e.html delete mode 100644 search/all_e.js delete mode 100644 search/all_f.html delete mode 100644 search/all_f.js delete mode 100644 search/classes_1.html delete mode 100644 search/classes_1.js delete mode 100644 search/defines_1.html delete mode 100644 search/defines_1.js delete mode 100644 search/defines_2.html delete mode 100644 search/defines_2.js delete mode 100644 search/files_1.html delete mode 100644 search/files_1.js delete mode 100644 search/files_2.html delete mode 100644 search/files_2.js delete mode 100644 search/files_3.html delete mode 100644 search/files_3.js delete mode 100644 search/files_4.html delete mode 100644 search/files_4.js delete mode 100644 search/functions_9.html delete mode 100644 search/functions_9.js delete mode 100644 search/functions_a.html delete mode 100644 search/functions_a.js delete mode 100644 search/functions_b.html delete mode 100644 search/functions_b.js delete mode 100644 search/functions_c.html delete mode 100644 search/functions_c.js delete mode 100644 search/functions_d.html delete mode 100644 search/functions_d.js delete mode 100644 search/functions_e.html delete mode 100644 search/functions_e.js delete mode 100644 search/variables_2.html delete mode 100644 search/variables_2.js delete mode 100644 search/variables_3.html delete mode 100644 search/variables_3.js delete mode 100644 search/variables_4.html delete mode 100644 search/variables_4.js delete mode 100644 search/variables_5.html delete mode 100644 search/variables_5.js delete mode 100644 search/variables_6.html delete mode 100644 search/variables_6.js delete mode 100644 search/variables_7.html delete mode 100644 search/variables_7.js delete mode 100644 search/variables_8.html delete mode 100644 search/variables_8.js delete mode 100644 search/variables_9.html delete mode 100644 search/variables_9.js delete mode 100644 search/variables_a.html delete mode 100644 search/variables_a.js delete mode 100644 search/variables_b.html delete mode 100644 search/variables_b.js delete mode 100644 search/variables_c.html delete mode 100644 search/variables_c.js delete mode 100644 structwavStruct-members.html delete mode 100644 structwavStruct.html delete mode 100644 volume_8h.html delete mode 100644 volume_8h_source.html delete mode 100644 wirelessSpeaker_8cpp.html delete mode 100644 wirelessSpeaker_8cpp_source.html diff --git a/AudioRadioRelay_2myRadio_8h.html b/AudioRadioRelay_2myRadio_8h.html deleted file mode 100644 index 3904c4e..0000000 --- a/AudioRadioRelay_2myRadio_8h.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/AudioRadioRelay/myRadio.h File Reference - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
- -
-
myRadio.h File Reference
-
-
-
#include <RF24.h>
-
-

Go to the source code of this file.

- - - - - - - - -

-Functions

RF24 radio (radioCEPin, radioCSPin)
 
void RX ()
 
void setupRadio ()
 
- - - - - - - - - - - -

-Variables

const uint64_t pipes [14] = {0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL}
 
bool tx
 
bool fail
 
bool rx
 
uint8_t pipeNo = 0
 
-

Function Documentation

- -

◆ radio()

- -
-
- - - - - - - - - - - - - - - - - - -
RF24 radio (radioCEPin ,
radioCSPin  
)
-
-
- -

◆ RX()

- -
-
- - - - - - - -
void RX ()
-
-
- -

◆ setupRadio()

- -
-
- - - - - - - -
void setupRadio ()
-
-
Examples
AudioRadioRelay.ino, WirelessMicrophone.ino, and WirelessSpeaker.ino.
-
- -

Definition at line 14 of file myRadio.h.

- -
-
-

Variable Documentation

- -

◆ pipes

- -
-
- - - - -
const uint64_t pipes[14] = {0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL}
-
- -

Definition at line 7 of file myRadio.h.

- -
-
- -

◆ tx

- -
-
- - - - -
bool tx
-
- -

Definition at line 9 of file myRadio.h.

- -
-
- -

◆ fail

- -
-
- - - - -
bool fail
-
- -

Definition at line 9 of file myRadio.h.

- -
-
- -

◆ rx

- -
-
- - - - -
bool rx
-
- -

Definition at line 9 of file myRadio.h.

- -
-
- -

◆ pipeNo

- -
-
- - - - -
uint8_t pipeNo = 0
-
-
Examples
AudioRadioRelay.ino, and WirelessSpeaker.ino.
-
- -

Definition at line 10 of file myRadio.h.

- -
-
-
- - - - diff --git a/AudioRadioRelay_2myRadio_8h_source.html b/AudioRadioRelay_2myRadio_8h_source.html deleted file mode 100644 index 7bb7c28..0000000 --- a/AudioRadioRelay_2myRadio_8h_source.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/AudioRadioRelay/myRadio.h Source File - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
myRadio.h
-
-
-Go to the documentation of this file.
1 
-
2 
-
3 #include <RF24.h>
-
4 
-
5 RF24 radio(radioCEPin, radioCSPin);
-
6 
-
7 const uint64_t pipes[14] = {0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL};
-
8 
-
9 bool tx, fail, rx;
-
10 uint8_t pipeNo = 0;
-
11 
-
12 void RX();
-
13 
-
14 void setupRadio() {
-
15 
-
16  radio.begin();
-
17  radio.setChannel(1);
-
18  radio.setPALevel(RF24_PA_MAX);
-
19  radio.setDataRate(RF24_1MBPS);
-
20  radio.setAutoAck(0);
-
21  radio.setCRCLength(RF24_CRC_8);
-
22  radio.setAddressWidth(5);
-
23  radio.openReadingPipe(1, pipes[1]);
-
24  radio.openReadingPipe(2, pipes[2]);
-
25  radio.setAutoAck(2, 1);
-
26  radio.openWritingPipe(pipes[0]);
-
27  radio.txDelay = 0;
-
28  radio.csDelay = 0;
-
29  radio.maskIRQ(0, 1, 0);
-
30  radio.printDetails();
-
31 
-
32  radio.startListening();
-
33 
-
34  attachInterrupt(digitalPinToInterrupt(radioInterruptPin), RX, FALLING);
-
35 
-
36 }
-
37 
-
38 
-
39 
-
bool fail
Definition: myRadio.h:9
-
bool tx
Definition: myRadio.h:9
-
uint8_t pipeNo
Definition: myRadio.h:10
-
RF24 radio(radioCEPin, radioCSPin)
-
const uint64_t pipes[14]
Definition: myRadio.h:7
-
void RX()
-
void setupRadio()
Definition: myRadio.h:14
-
bool rx
Definition: myRadio.h:9
-
- - - - diff --git a/AudioRadioRelay_8ino-example.html b/AudioRadioRelay_8ino-example.html index 126760b..b7f496b 100644 --- a/AudioRadioRelay_8ino-example.html +++ b/AudioRadioRelay_8ino-example.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -70,9 +70,8 @@

For Arduino Due

- +

Audio Relay & Peripheral Test Example:

+

This example demonstrates how to manage incoming and outgoing audio streams using the AAAudio library and nrf24l01+ radio modules on Arduino Due.

  1. This example uses the onboard DAC to play the incoming audio data via DAC0
  2. The ADC is used to sample the DAC0 pin, and the data is made available
  3. @@ -137,8 +136,8 @@
    /*********************************************************/
    -
    void DACC_Handler(void) {
    -
    aaAudio.dacHandler(); //Link the DAC ISR/IRQ library. Called by the MCU when DAC is ready for data
    +
    void DACC_Handler(void) {
    +
    aaAudio.dacHandler(); //Link the DAC ISR/IRQ library. Called by the MCU when DAC is ready for data
    }
    /*********************************************************/
    @@ -148,11 +147,11 @@
    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;
    +
    aaAudio.autoAdjust = 0;
    #endif
    - +
    setupRadio();
    }
    @@ -186,27 +185,27 @@
    uint32_t dynSampleRate = 0;
    // See myRadio.h: Function is attached to an interrupt triggered by radio RX/TX
    -
    void RX() {
    +
    void RX() {
    -
    if (radio.available(&pipeNo)) { // Check for data and get the pipe number
    +
    if (radio.available(&pipeNo)) { // Check for data and get the pipe number
    -
    if (pipeNo == 2) {
    -
    radio.read(&dynSampleRate, 4); // Receive commands using pipe #2
    -
    aaAudio.setSampleRate(dynSampleRate); // Pipe 2 is being used for command data, pipe 1 & others for audio data
    +
    if (pipeNo == 2) {
    +
    radio.read(&dynSampleRate, 4); // Receive commands using pipe #2
    +
    aaAudio.setSampleRate(dynSampleRate); // Pipe 2 is being used for command data, pipe 1 & others for audio data
    } else {
    #if !defined (ARDUINO_ARCH_AVR) //AVR (Uno, Nano can't handle extra processing)
    -
    radio.stopListening(); // Prepare to send data out via radio
    +
    radio.stopListening(); // Prepare to send data out via radio
    #endif
    -
    radio.read(&aaAudio.dacBuffer, 32); // Read the available radio data
    +
    radio.read(&aaAudio.dacBuffer, 32); // Read the available radio data
    -
    aaAudio.feedDAC(0, 32); // Feed the DAC with the received data
    +
    aaAudio.feedDAC(0, 32); // Feed the DAC with the received data
    #if !defined (ARDUINO_ARCH_AVR)
    -
    aaAudio.getADC(32); // Grab the available data from the ADC
    +
    aaAudio.getADC(32); // Grab the available data from the ADC
    //Send the received ADC data via radio
    -
    radio.startFastWrite(&aaAudio.adcBuffer, 32, 1);
    +
    radio.startFastWrite(&aaAudio.adcBuffer, 32, 1);
    #endif
    /*Note: The data initially recieved can directly be sent via radio, but
    @@ -214,19 +213,14 @@
    }
    } else { //If not RX IRQ, must be TX complete
    -
    radio.txStandBy(); // Set the radio to standby mode from TX
    -
    radio.startListening(); // Put the radio into listening (RX) mode
    +
    radio.txStandBy(); // Set the radio to standby mode from TX
    +
    radio.startListening(); // Put the radio into listening (RX) mode
    }
    }
    /*********************************************************/
    -
    uint8_t pipeNo
    Definition: myRadio.h:10
    -
    RF24 radio(radioCEPin, radioCSPin)
    -
    void RX()
    -
    void setupRadio()
    Definition: myRadio.h:14
    -
    void DACC_Handler(void)
    Definition: myWAV.h:10
    void dacHandler(void)
    uint8_t adcBuffer[MAX_BUFFER_SIZE]
    @@ -239,7 +233,7 @@
diff --git a/esp32_2AutoAnalogAudio_8cpp.html b/AutoAnalogAudio_8cpp.html similarity index 65% rename from esp32_2AutoAnalogAudio_8cpp.html rename to AutoAnalogAudio_8cpp.html index 7c5ba82..fd47c0c 100644 --- a/esp32_2AutoAnalogAudio_8cpp.html +++ b/AutoAnalogAudio_8cpp.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -73,11 +73,19 @@
-

Go to the source code of this file.

-
+

Go to the source code of this file.

+

Detailed Description

+

AutoAnalogAudio streaming via DAC & ADC by TMRh20

+

Copyright (C) 2016-2020 TMRh20 - tmrh2.nosp@m.0@gm.nosp@m.ail.c.nosp@m.om, github.com/TMRh20

+

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

+

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

+

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

+ +

Definition in file AutoAnalogAudio.cpp.

+
diff --git a/esp32_2AutoAnalogAudio_8cpp_source.html b/AutoAnalogAudio_8cpp_source.html similarity index 68% rename from esp32_2AutoAnalogAudio_8cpp_source.html rename to AutoAnalogAudio_8cpp_source.html index f9750e0..a716754 100644 --- a/esp32_2AutoAnalogAudio_8cpp_source.html +++ b/AutoAnalogAudio_8cpp_source.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -72,459 +72,443 @@
AutoAnalogAudio.cpp
-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
-
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
-
7  the Free Software Foundation, either version 3 of the License, or
-
8  (at your option) any later version.
-
9 
-
10  This program is distributed in the hope that it will be useful,
-
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
-
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-
13  GNU General Public License for more details.
-
14 
-
15  You should have received a copy of the GNU General Public License
-
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
-
17  */
-
18 
-
19 /****************************************************************************/
-
20 
-
21 #if defined (ESP32)
-
22 
-
23 #include "../AutoAnalogAudio.h"
-
24 #include "driver/i2s.h"
-
25 #include "driver/adc.h"
-
26 #include "freertos/FreeRTOS.h"
-
27 #include "freertos/task.h"
-
28 #include "esp_event.h"
-
29 
-
30 
-
31 /****************************************************************************/
-
32 /* Public Functions */
-
33 /****************************************************************************/
-
34 
-
35  volatile bool dacTaskActive;
-
36  volatile bool dacTaskCreated;
-
37  uint32_t adcSamples;
-
38  uint16_t tmpADCBuffer16[MAX_BUFFER_SIZE];
-
39  volatile uint32_t lastAdcTime;
-
40  uint8_t *adcPtr = NULL;
-
41 
-
42  uint8_t dacVar;
-
43 
- -
45 
-
46  adcBitsPerSample = 16;
-
47  dacBitsPerSample = 16;
+Go to the documentation of this file.
1 
+
22 /****************************************************************************/
+
23 
+
24 #if defined (ESP32)
+
25 
+
26 #include "../AutoAnalogAudio.h"
+
27 #include "driver/i2s.h"
+
28 #include "driver/adc.h"
+
29 #include "freertos/FreeRTOS.h"
+
30 #include "freertos/task.h"
+
31 #include "esp_event.h"
+
32 
+
33 
+
34 /****************************************************************************/
+
35 /* Public Functions */
+
36 /****************************************************************************/
+
37 
+
38  volatile bool dacTaskActive;
+
39  volatile bool dacTaskCreated;
+
40  uint32_t adcSamples;
+
41  uint16_t tmpADCBuffer16[MAX_BUFFER_SIZE];
+
42  volatile uint32_t lastAdcTime;
+
43  uint8_t *adcPtr = NULL;
+
44 
+
45  uint8_t dacVar;
+
46 
+
48 
-
49  dacTaskActive = false;
-
50  dacTaskCreated = false;
-
51  dacEnabled = false;
-
52  dacTaskHandle = NULL;
-
53  i2sStopped = true;
-
54  dacVar = 1;
-
55  adcPtr = &adcBuffer[0];
-
56 
-
57  sampleRate = 0;
-
58  lastDacSample = 0;
-
59  adcChannel = (adc1_channel_t)0;
-
60 
-
61  for(int i=0; i<MAX_BUFFER_SIZE; i++){
-
62  dacBuffer[i] = 0;
-
63  dacBuffer16[i] = 0;
-
64  }
-
65  adcSamples = 0;
-
66  lastAdcTime = 0;
-
67 
-
68 }
-
69 
-
70 /****************************************************************************/
-
71 
-
72 void DACC_Handler();
-
73 
-
74 /****************************************************************************/
-
75 
-
76 void adcTask(void *args){
-
77  for( ;; ){
-
78  if(*(uint32_t*)args > 0){
-
79  size_t bytesRead = 0;
-
80  i2s_read(I2S_NUM_0, &tmpADCBuffer16, *(uint32_t*)args * 2, &bytesRead, 500 / portTICK_PERIOD_MS);
-
81  adcSamples = 0;
-
82  lastAdcTime = millis();
-
83  }else{
-
84  if(millis() - lastAdcTime > 150){
-
85  vTaskDelay( 5 / portTICK_PERIOD_MS);
-
86  }
-
87  }
-
88  }
-
89 }
-
90 
-
91 /****************************************************************************/
-
92 
-
93 uint32_t dacTTimer = 0;
-
94 
-
95 void dacTask(void *args){
-
96  for( ;; ){
-
97 
-
98  if(*(uint8_t*)args == 1 && dacTaskActive == true){
-
99  DACC_Handler();
-
100  }else{
-
101  *(uint8_t*)args = 3;
-
102  vTaskDelay( 10 / portTICK_PERIOD_MS);
-
103 
-
104  }
-
105  }
-
106 }
-
107 
-
108 /****************************************************************************/
-
109 
-
110 void AutoAnalog::begin(bool enADC, bool enDAC){
-
111 
-
112  i2s_mode_t myMode = (i2s_mode_t)I2S_MODE_MASTER;
-
113 
+
49  adcBitsPerSample = 16;
+
50  dacBitsPerSample = 16;
+
51 
+
52  dacTaskActive = false;
+
53  dacTaskCreated = false;
+
54  dacEnabled = false;
+
55  dacTaskHandle = NULL;
+
56  i2sStopped = true;
+
57  dacVar = 1;
+
58  adcPtr = &adcBuffer[0];
+
59 
+
60  sampleRate = 0;
+
61  lastDacSample = 0;
+
62  adcChannel = (adc1_channel_t)0;
+
63 
+
64  for(int i=0; i<MAX_BUFFER_SIZE; i++){
+
65  dacBuffer[i] = 0;
+
66  dacBuffer16[i] = 0;
+
67  }
+
68  adcSamples = 0;
+
69  lastAdcTime = 0;
+
70 
+
71 }
+
72 
+
73 /****************************************************************************/
+
74 
+
75 void DACC_Handler();
+
76 
+
77 /****************************************************************************/
+
78 
+
79 void adcTask(void *args){
+
80  for( ;; ){
+
81  if(*(uint32_t*)args > 0){
+
82  size_t bytesRead = 0;
+
83  i2s_read(I2S_NUM_0, &tmpADCBuffer16, *(uint32_t*)args * 2, &bytesRead, 500 / portTICK_PERIOD_MS);
+
84  adcSamples = 0;
+
85  lastAdcTime = millis();
+
86  }else{
+
87  if(millis() - lastAdcTime > 150){
+
88  vTaskDelay( 5 / portTICK_PERIOD_MS);
+
89  }
+
90  }
+
91  }
+
92 }
+
93 
+
94 /****************************************************************************/
+
95 
+
96 uint32_t dacTTimer = 0;
+
97 
+
98 void dacTask(void *args){
+
99  for( ;; ){
+
100 
+
101  if(*(uint8_t*)args == 1 && dacTaskActive == true){
+
102  DACC_Handler();
+
103  }else{
+
104  *(uint8_t*)args = 3;
+
105  vTaskDelay( 10 / portTICK_PERIOD_MS);
+
106 
+
107  }
+
108  }
+
109 }
+
110 
+
111 /****************************************************************************/
+
112 
+
113 void AutoAnalog::begin(bool enADC, bool enDAC){
114 
-
115  if(enADC){
-
116  myMode = (i2s_mode_t)(myMode | I2S_MODE_RX | I2S_MODE_ADC_BUILT_IN);
-
117  }
-
118  if(enDAC){
-
119  myMode = (i2s_mode_t)(myMode | I2S_MODE_TX | I2S_MODE_DAC_BUILT_IN);
+
115  i2s_mode_t myMode = (i2s_mode_t)I2S_MODE_MASTER;
+
116 
+
117 
+
118  if(enADC){
+
119  myMode = (i2s_mode_t)(myMode | I2S_MODE_RX | I2S_MODE_ADC_BUILT_IN);
120  }
-
121 
-
122  i2s_cfg = {
-
123  .mode = (i2s_mode_t)myMode,
-
124  .sample_rate = 16000, // The format of the signal using ADC_BUILT_IN
-
125  .bits_per_sample = I2S_BITS_PER_SAMPLE_16BIT, // is fixed at 12bit, stereo, MSB
-
126  .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
-
127  .communication_format = I2S_COMM_FORMAT_I2S_LSB,
-
128  .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1,
-
129  .dma_buf_count = 2,
-
130  .dma_buf_len = MAX_BUFFER_SIZE,
-
131  .use_apll = false,
-
132  .tx_desc_auto_clear = false,
-
133  .fixed_mclk = 0
-
134  };
-
135  i2s_driver_install(I2S_NUM_0, &i2s_cfg, 0, NULL);
-
136 
-
137 
-
138  if(enADC){
-
139  i2s_set_adc_mode(ADC_UNIT_1, adcChannel); //pin 32
-
140  adc1_config_channel_atten(adcChannel, ADC_ATTEN_DB_11);
-
141  i2s_adc_enable(I2S_NUM_0);
-
142  }
-
143  if(enDAC){
-
144  i2s_set_dac_mode(I2S_DAC_CHANNEL_BOTH_EN);
-
145  dacEnabled = true;
-
146  }
-
147 
-
148  sampleRate = 16000;
-
149 
-
150  setSampleRate(sampleRate,true);
-
151 
-
152 
-
153 }
+
121  if(enDAC){
+
122  myMode = (i2s_mode_t)(myMode | I2S_MODE_TX | I2S_MODE_DAC_BUILT_IN);
+
123  }
+
124 
+
125  i2s_cfg = {
+
126  .mode = (i2s_mode_t)myMode,
+
127  .sample_rate = 16000, // The format of the signal using ADC_BUILT_IN
+
128  .bits_per_sample = I2S_BITS_PER_SAMPLE_16BIT, // is fixed at 12bit, stereo, MSB
+
129  .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
+
130  .communication_format = I2S_COMM_FORMAT_I2S_LSB,
+
131  .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1,
+
132  .dma_buf_count = 2,
+
133  .dma_buf_len = MAX_BUFFER_SIZE,
+
134  .use_apll = false,
+
135  .tx_desc_auto_clear = false,
+
136  .fixed_mclk = 0
+
137  };
+
138  i2s_driver_install(I2S_NUM_0, &i2s_cfg, 0, NULL);
+
139 
+
140 
+
141  if(enADC){
+
142  i2s_set_adc_mode(ADC_UNIT_1, adcChannel); //pin 32
+
143  adc1_config_channel_atten(adcChannel, ADC_ATTEN_DB_11);
+
144  i2s_adc_enable(I2S_NUM_0);
+
145  }
+
146  if(enDAC){
+
147  i2s_set_dac_mode(I2S_DAC_CHANNEL_BOTH_EN);
+
148  dacEnabled = true;
+
149  }
+
150 
+
151  sampleRate = 16000;
+
152 
+
153  setSampleRate(sampleRate,true);
154 
-
155 /****************************************************************************/
-
156 
-
157 void AutoAnalog::dacInterrupts(bool enabled, bool withinTask){
-
158 
-
159  if(enabled){
-
160  if(dacTaskCreated == false){
-
161  dacTaskCreated = true;
-
162  //Serial.print("Cr Task ");
-
163  dacVar = 1;
-
164  dacTaskActive = true;
-
165  xTaskCreate(dacTask,"DAC Task",3062,&dacVar,tskIDLE_PRIORITY + 1,&dacTaskHandle);
-
166  }
-
167  }else{
-
168  if(dacTaskCreated == true){
-
169  dacTaskCreated = false;
-
170  dacTaskActive = false;
-
171  //Serial.println("Dac Int false");
-
172 
-
173  if(dacTaskHandle != NULL){
-
174  if(dacVar == 1 && !withinTask){
-
175  //Serial.println("Set Dac Var 2");
-
176  dacVar = 2;
-
177  while(dacVar != 3){ delay(3); }
-
178  }
-
179 
-
180  //Serial.println("Del Task");
-
181  vTaskDelete(dacTaskHandle);
-
182  }
-
183 
-
184  }
-
185  }
+
155 
+
156 }
+
157 
+
158 /****************************************************************************/
+
159 
+
160 void AutoAnalog::dacInterrupts(bool enabled, bool withinTask){
+
161 
+
162  if(enabled){
+
163  if(dacTaskCreated == false){
+
164  dacTaskCreated = true;
+
165  //Serial.print("Cr Task ");
+
166  dacVar = 1;
+
167  dacTaskActive = true;
+
168  xTaskCreate(dacTask,"DAC Task",3062,&dacVar,tskIDLE_PRIORITY + 1,&dacTaskHandle);
+
169  }
+
170  }else{
+
171  if(dacTaskCreated == true){
+
172  dacTaskCreated = false;
+
173  dacTaskActive = false;
+
174  //Serial.println("Dac Int false");
+
175 
+
176  if(dacTaskHandle != NULL){
+
177  if(dacVar == 1 && !withinTask){
+
178  //Serial.println("Set Dac Var 2");
+
179  dacVar = 2;
+
180  while(dacVar != 3){ delay(3); }
+
181  }
+
182 
+
183  //Serial.println("Del Task");
+
184  vTaskDelete(dacTaskHandle);
+
185  }
186 
-
187 }
-
188 
-
189 /****************************************************************************/
-
190 
-
191 void AutoAnalog::rampIn(uint8_t sample){
-
192 
-
193 
-
194  uint8_t tmpBuf[255];
-
195  uint8_t zeroBuff[MAX_BUFFER_SIZE];
-
196  memset(zeroBuff,0,MAX_BUFFER_SIZE);
-
197 
-
198  uint16_t counter = 0;
-
199  for(uint16_t i=0; i<sample; i++){
-
200  tmpBuf[i] = i;
-
201  counter++;
-
202  }
-
203 
-
204  size_t bytesWritten = 0;
-
205  size_t bytesWritten2 = 0;
-
206 
-
207  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
-
208  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
-
209  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
-
210 
-
211  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE-counter,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
-
212  i2s_write_expand(I2S_NUM_0,&tmpBuf[0],counter,8,16,&bytesWritten2, 500 / portTICK_PERIOD_MS);
-
213 }
-
214 
-
215 /****************************************************************************/
-
216 
-
217 void AutoAnalog::rampOut(uint8_t sample){
-
218 
+
187  }
+
188  }
+
189 
+
190 }
+
191 
+
192 /****************************************************************************/
+
193 
+
194 void AutoAnalog::rampIn(uint8_t sample){
+
195 
+
196 
+
197  uint8_t tmpBuf[255];
+
198  uint8_t zeroBuff[MAX_BUFFER_SIZE];
+
199  memset(zeroBuff,0,MAX_BUFFER_SIZE);
+
200 
+
201  uint16_t counter = 0;
+
202  for(uint16_t i=0; i<sample; i++){
+
203  tmpBuf[i] = i;
+
204  counter++;
+
205  }
+
206 
+
207  size_t bytesWritten = 0;
+
208  size_t bytesWritten2 = 0;
+
209 
+
210  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
+
211  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
+
212  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
+
213 
+
214  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE-counter,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
+
215  i2s_write_expand(I2S_NUM_0,&tmpBuf[0],counter,8,16,&bytesWritten2, 500 / portTICK_PERIOD_MS);
+
216 }
+
217 
+
218 /****************************************************************************/
219 
-
220  uint8_t tmpBuf[255];
-
221  uint8_t zeroBuff[MAX_BUFFER_SIZE];
-
222  memset(zeroBuff,0,MAX_BUFFER_SIZE);
-
223 
-
224  uint16_t counter = 0;
-
225  for(uint8_t i=lastDacSample; i > 0; i--){
-
226  tmpBuf[counter++] = i;
-
227  }
-
228  size_t bytesWritten = 0;
-
229 
-
230  i2s_write_expand(I2S_NUM_0,&tmpBuf[0],counter,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
-
231  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE-counter,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
-
232  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
-
233  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
-
234  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
-
235 
-
236 }
-
237 
-
238 /****************************************************************************/
-
239 
-
240 void AutoAnalog::setSampleRate(uint32_t sampRate, bool stereo){
-
241 
-
242  //if(sampRate == sampleRate){ return; }
-
243 
-
244  sampleRate = sampRate;
-
245  //i2s_stop(I2S_NUM_0);
-
246  //i2s_driver_uninstall(I2S_NUM_0);
-
247  //delay(5);
-
248  //i2s_driver_install(I2S_NUM_0, &i2s_cfg, 0, NULL);
-
249  if(stereo == false){
-
250  i2s_set_clk(I2S_NUM_0, sampRate, I2S_BITS_PER_SAMPLE_16BIT, I2S_CHANNEL_MONO);
-
251  }else{
-
252  i2s_set_clk(I2S_NUM_0, sampRate/2, I2S_BITS_PER_SAMPLE_16BIT, I2S_CHANNEL_STEREO);
-
253  }
-
254 
-
255 
-
256 }
+
220 void AutoAnalog::rampOut(uint8_t sample){
+
221 
+
222 
+
223  uint8_t tmpBuf[255];
+
224  uint8_t zeroBuff[MAX_BUFFER_SIZE];
+
225  memset(zeroBuff,0,MAX_BUFFER_SIZE);
+
226 
+
227  uint16_t counter = 0;
+
228  for(uint8_t i=lastDacSample; i > 0; i--){
+
229  tmpBuf[counter++] = i;
+
230  }
+
231  size_t bytesWritten = 0;
+
232 
+
233  i2s_write_expand(I2S_NUM_0,&tmpBuf[0],counter,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
+
234  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE-counter,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
+
235  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
+
236  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
+
237  i2s_write_expand(I2S_NUM_0,&zeroBuff[0],MAX_BUFFER_SIZE,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
+
238 
+
239 }
+
240 
+
241 /****************************************************************************/
+
242 
+
243 void AutoAnalog::setSampleRate(uint32_t sampRate, bool stereo){
+
244 
+
245  //if(sampRate == sampleRate){ return; }
+
246 
+
247  sampleRate = sampRate;
+
248  //i2s_stop(I2S_NUM_0);
+
249  //i2s_driver_uninstall(I2S_NUM_0);
+
250  //delay(5);
+
251  //i2s_driver_install(I2S_NUM_0, &i2s_cfg, 0, NULL);
+
252  if(stereo == false){
+
253  i2s_set_clk(I2S_NUM_0, sampRate, I2S_BITS_PER_SAMPLE_16BIT, I2S_CHANNEL_MONO);
+
254  }else{
+
255  i2s_set_clk(I2S_NUM_0, sampRate/2, I2S_BITS_PER_SAMPLE_16BIT, I2S_CHANNEL_STEREO);
+
256  }
257 
-
258 /****************************************************************************/
-
259 
- -
261 
+
258 
+
259 }
+
260 
+
261 /****************************************************************************/
262 
-
263 
-
264 }
+ +
264 
265 
-
266 /****************************************************************************/
-
267 
-
268 void AutoAnalog::enableAdcChannel(uint8_t pinAx){
-
269 
-
270  adcChannel = (adc1_channel_t)pinAx;
-
271 
-
272 }
-
273 
-
274 /****************************************************************************/
-
275 
-
276 void AutoAnalog::disableAdcChannel(uint8_t pinAx){
-
277 
-
278  /*if(pinAx > 6){ return; }
-
279  pinAx = 7 - pinAx;
-
280  ADC->ADC_CHDR |= 1<< pinAx;*/
-
281 
-
282 }
-
283 
-
284 /****************************************************************************/
-
285 
-
286 void AutoAnalog::getADC(uint32_t samples){
-
287 
-
288  if(!adcTaskCreated){
-
289  adcTaskCreated = true;
-
290  xTaskCreate(adcTask,"ADC Task",2048,&adcSamples,tskIDLE_PRIORITY + 1,NULL);
-
291  //Serial.println("Cr ADC");
-
292  }
-
293  while(adcSamples > 0){ delayMicroseconds(100); };
-
294  //Serial.println("Get ADC");
-
295  uint16_t offset = (int)adcChannel * 0x1000 + 0xFFF; // 4high bits == channel. Data is inverted.
-
296  for(uint32_t i=0; i<samples;i++){
-
297  tmpADCBuffer16[i] = offset - tmpADCBuffer16[i];
-
298  adcBuffer16[i] = tmpADCBuffer16[i];
-
299  }
-
300  //Serial.println("samps");
-
301  adcSamples = samples;
-
302 
-
303 
-
304 
+
266 
+
267 }
+
268 
+
269 /****************************************************************************/
+
270 
+
271 void AutoAnalog::enableAdcChannel(uint8_t pinAx){
+
272 
+
273  adcChannel = (adc1_channel_t)pinAx;
+
274 
+
275 }
+
276 
+
277 /****************************************************************************/
+
278 
+
279 void AutoAnalog::disableAdcChannel(uint8_t pinAx){
+
280 
+
281  /*if(pinAx > 6){ return; }
+
282  pinAx = 7 - pinAx;
+
283  ADC->ADC_CHDR |= 1<< pinAx;*/
+
284 
+
285 }
+
286 
+
287 /****************************************************************************/
+
288 
+
289 void AutoAnalog::getADC(uint32_t samples){
+
290 
+
291  if(!adcTaskCreated){
+
292  adcTaskCreated = true;
+
293  xTaskCreate(adcTask,"ADC Task",2048,&adcSamples,tskIDLE_PRIORITY + 1,NULL);
+
294  //Serial.println("Cr ADC");
+
295  }
+
296  while(adcSamples > 0){ delayMicroseconds(100); };
+
297  //Serial.println("Get ADC");
+
298  uint16_t offset = (int)adcChannel * 0x1000 + 0xFFF; // 4high bits == channel. Data is inverted.
+
299  for(uint32_t i=0; i<samples;i++){
+
300  tmpADCBuffer16[i] = offset - tmpADCBuffer16[i];
+
301  adcBuffer16[i] = tmpADCBuffer16[i];
+
302  }
+
303  //Serial.println("samps");
+
304  adcSamples = samples;
305 
-
306 }
+
306 
307 
-
308 /****************************************************************************/
-
309 
-
310 void AutoAnalog::feedDAC(uint8_t dacChannel, uint32_t samples, bool startInterrupts){
-
311 
-
312 
-
313  //uint8_t buf[MAX_BUFFER_SIZE * 2];
-
314  size_t bytesWritten = 0;
-
315 
-
316  if(dacBitsPerSample == 16){
-
317  for(int i=0; i<samples; i++){
-
318  dacBuffer[i] = (uint8_t)dacBuffer16[i];
-
319  }
-
320  }
-
321 
-
322  /*if(startInterrupts == true){
-
323 
-
324  //uint8_t zeroSample[MAX_BUFFER_SIZE ];
-
325  memset(buf,0,MAX_BUFFER_SIZE*2);
-
326  i2s_write_expand(I2S_NUM_0,&buf[0],(MAX_BUFFER_SIZE*2) - dacBuffer[0],8,16,&bytesWritten, 100 / portTICK_PERIOD_MS);
-
327  //i2s_write_expand(I2S_NUM_0,&zeroSample,(MAX_BUFFER_SIZE),8,16,&bytesWritten, 100 / portTICK_PERIOD_MS);
-
328 
-
329  for(uint i=0; i <= (dacBuffer[0] * 2); i++){
-
330  uint test = i / 2;
-
331  i2s_write_expand(I2S_NUM_0,&test,1,8,16,&bytesWritten, 100 / portTICK_PERIOD_MS);
-
332  }
-
333  }*/
-
334 
-
335  /*if(i2sStopped){
-
336  i2sStopped = false;
-
337  i2s_start(I2S_NUM_0);
-
338  }*/
-
339 
-
340  if(dacEnabled == false){
-
341  //dacEnabled = true;
-
342  //i2s_set_dac_mode(I2S_DAC_CHANNEL_BOTH_EN);
-
343  }
-
344 
-
345  i2s_write_expand(I2S_NUM_0,&dacBuffer[0],samples,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
-
346  lastDacSample = dacBuffer[bytesWritten-1];
-
347 
-
348 
-
349  if(startInterrupts == true){
-
350  dacTaskActive = true;
-
351  //i2s_set_dac_mode(I2S_DAC_CHANNEL_BOTH_EN);
-
352  dacInterrupts(true);
-
353 
-
354  }
-
355 
+
308 
+
309 }
+
310 
+
311 /****************************************************************************/
+
312 
+
313 void AutoAnalog::feedDAC(uint8_t dacChannel, uint32_t samples, bool startInterrupts){
+
314 
+
315 
+
316  //uint8_t buf[MAX_BUFFER_SIZE * 2];
+
317  size_t bytesWritten = 0;
+
318 
+
319  if(dacBitsPerSample == 16){
+
320  for(int i=0; i<samples; i++){
+
321  dacBuffer[i] = (uint8_t)dacBuffer16[i];
+
322  }
+
323  }
+
324 
+
325  /*if(startInterrupts == true){
+
326 
+
327  //uint8_t zeroSample[MAX_BUFFER_SIZE ];
+
328  memset(buf,0,MAX_BUFFER_SIZE*2);
+
329  i2s_write_expand(I2S_NUM_0,&buf[0],(MAX_BUFFER_SIZE*2) - dacBuffer[0],8,16,&bytesWritten, 100 / portTICK_PERIOD_MS);
+
330  //i2s_write_expand(I2S_NUM_0,&zeroSample,(MAX_BUFFER_SIZE),8,16,&bytesWritten, 100 / portTICK_PERIOD_MS);
+
331 
+
332  for(uint i=0; i <= (dacBuffer[0] * 2); i++){
+
333  uint test = i / 2;
+
334  i2s_write_expand(I2S_NUM_0,&test,1,8,16,&bytesWritten, 100 / portTICK_PERIOD_MS);
+
335  }
+
336  }*/
+
337 
+
338  /*if(i2sStopped){
+
339  i2sStopped = false;
+
340  i2s_start(I2S_NUM_0);
+
341  }*/
+
342 
+
343  if(dacEnabled == false){
+
344  //dacEnabled = true;
+
345  //i2s_set_dac_mode(I2S_DAC_CHANNEL_BOTH_EN);
+
346  }
+
347 
+
348  i2s_write_expand(I2S_NUM_0,&dacBuffer[0],samples,8,16,&bytesWritten, 500 / portTICK_PERIOD_MS);
+
349  lastDacSample = dacBuffer[bytesWritten-1];
+
350 
+
351 
+
352  if(startInterrupts == true){
+
353  dacTaskActive = true;
+
354  //i2s_set_dac_mode(I2S_DAC_CHANNEL_BOTH_EN);
+
355  dacInterrupts(true);
356 
-
357 
-
358 }
+
357  }
+
358 
359 
-
360 /****************************************************************************/
-
361 /* Private Functions */
-
362 /****************************************************************************/
-
363 
-
364 void AutoAnalog::dacBufferStereo(uint8_t dacChannel){
-
365 
+
360 
+
361 }
+
362 
+
363 /****************************************************************************/
+
364 /* Private Functions */
+
365 /****************************************************************************/
366 
-
367 
-
368 }
+
367 void AutoAnalog::dacBufferStereo(uint8_t dacChannel){
+
368 
369 
-
370 /****************************************************************************/
-
371 
-
372 uint32_t AutoAnalog::frequencyToTimerCount(uint32_t frequency){
-
373  //return VARIANT_MCK / 2UL / frequency;
-
374  return 0;
-
375 }
-
376 
-
377 /****************************************************************************/
-
378 
-
379 void AutoAnalog::adcSetup(void){
-
380 
+
370 
+
371 }
+
372 
+
373 /****************************************************************************/
+
374 
+
375 uint32_t AutoAnalog::frequencyToTimerCount(uint32_t frequency){
+
376  //return VARIANT_MCK / 2UL / frequency;
+
377  return 0;
+
378 }
+
379 
+
380 /****************************************************************************/
381 
-
382 }
+
382 void AutoAnalog::adcSetup(void){
383 
-
384 /****************************************************************************/
-
385 
-
386 void AutoAnalog::adcInterrupts(bool enabled){
-
387 
-
388 }
-
389 
-
390 /****************************************************************************/
-
391 
-
392 void AutoAnalog::dacSetup(void){
-
393 
+
384 
+
385 }
+
386 
+
387 /****************************************************************************/
+
388 
+
389 void AutoAnalog::adcInterrupts(bool enabled){
+
390 
+
391 }
+
392 
+
393 /****************************************************************************/
394 
-
395 }
+
395 void AutoAnalog::dacSetup(void){
396 
-
397 /****************************************************************************/
-
398 
+
397 
+
398 }
399 
-
400 void AutoAnalog::disableDAC(bool withinTask){
+
400 /****************************************************************************/
401 
-
402  dacTaskActive = false;
-
403  if(!withinTask){
-
404  dacInterrupts(false,false);
-
405  }
-
406 
-
407 
-
408  //i2s_set_dac_mode(I2S_DAC_CHANNEL_DISABLE);
-
409  i2s_zero_dma_buffer(I2S_NUM_0);
-
410  //dacEnabled = false;
-
411  if(withinTask){
-
412  dacInterrupts(false,true);
-
413  }
-
414 
-
415 }
-
416 
-
417 /****************************************************************************/
-
418 
-
419 void AutoAnalog::dacHandler(void){
-
420 
+
402 
+
403 void AutoAnalog::disableDAC(bool withinTask){
+
404 
+
405  dacTaskActive = false;
+
406  if(!withinTask){
+
407  dacInterrupts(false,false);
+
408  }
+
409 
+
410 
+
411  //i2s_set_dac_mode(I2S_DAC_CHANNEL_DISABLE);
+
412  i2s_zero_dma_buffer(I2S_NUM_0);
+
413  //dacEnabled = false;
+
414  if(withinTask){
+
415  dacInterrupts(false,true);
+
416  }
+
417 
+
418 }
+
419 
+
420 /****************************************************************************/
421 
-
422 }
+
422 void AutoAnalog::dacHandler(void){
423 
-
424 /****************************************************************************/
-
425 
-
426 void AutoAnalog::tcSetup (uint32_t sampRate){
-
427 
+
424 
+
425 }
+
426 
+
427 /****************************************************************************/
428 
-
429 
-
430 }
+
429 void AutoAnalog::tcSetup (uint32_t sampRate){
+
430 
431 
-
432 /****************************************************************************/
-
433 
-
434 void AutoAnalog::tc2Setup (uint32_t sampRate)
-
435 {
+
432 
+
433 }
+
434 
+
435 /****************************************************************************/
436 
-
437 }
-
438 
-
439 /****************************************************************************/
-
440 
+
437 void AutoAnalog::tc2Setup (uint32_t sampRate)
+
438 {
+
439 
+
440 }
441 
-
442 
-
443 #endif //#if defined (ESP32)
-
#define MAX_BUFFER_SIZE
-
void DACC_Handler(void)
Definition: myWAV.h:10
+
442 /****************************************************************************/
+
443 
+
444 
+
445 
+
446 #endif //#if defined (ESP32)
void adcInterrupts(bool enabled=true)
void dacHandler(void)
uint8_t dacBitsPerSample
+
void rampIn(uint8_t sample)
uint8_t adcBuffer[MAX_BUFFER_SIZE]
uint8_t dacBuffer[MAX_BUFFER_SIZE]
+
TaskHandle_t dacTaskHandle
void getADC(uint32_t samples=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]
void setSampleRate(uint32_t sampRate=0, bool stereo=true)
@@ -535,11 +519,10 @@
void triggerADC()
void begin(bool enADC, bool enDAC)
void disableAdcChannel(uint8_t pinAx)
-
uint32_t counter
Definition: myRecording.h:24
diff --git a/AutoAnalogAudio_8h.html b/AutoAnalogAudio_8h.html index e6a2eec..9e71315 100644 --- a/AutoAnalogAudio_8h.html +++ b/AutoAnalogAudio_8h.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -75,7 +75,7 @@
AutoAnalogAudio.h File Reference
-
#include "AutoAnalog_config.h"
+
#include "AutoAnalog_config.h"

Go to the source code of this file.

@@ -149,7 +149,7 @@

diff --git a/AutoAnalogAudio_8h_source.html b/AutoAnalogAudio_8h_source.html index a377b54..31a085d 100644 --- a/AutoAnalogAudio_8h_source.html +++ b/AutoAnalogAudio_8h_source.html @@ -23,7 +23,7 @@

@@ -92,7 +92,7 @@
24 #ifndef __AUTO_ANALOG_H__
25 #define __AUTO_ANALOG_H__
26 
-
27 #include "AutoAnalog_config.h"
+
27 #include "AutoAnalog_config.h"
28 #if defined (ESP32)
29  #include "driver/i2s.h"
30 #endif
@@ -112,17 +112,17 @@
52 
56  void triggerADC();
57 
-
66  void getADC(uint32_t samples = MAX_BUFFER_SIZE);
+
66  void getADC(uint32_t samples = MAX_BUFFER_SIZE);
67 
-
74  void feedDAC(uint8_t dacChannel = 0, uint32_t samples = MAX_BUFFER_SIZE, bool startInterrupts = false);
+
74  void feedDAC(uint8_t dacChannel = 0, uint32_t samples = MAX_BUFFER_SIZE, bool startInterrupts = false);
75 
- +
81  uint8_t dacBuffer[MAX_BUFFER_SIZE];
82 
- +
88  uint8_t adcBuffer[MAX_BUFFER_SIZE];
89 
- +
95  uint16_t dacBuffer16[MAX_BUFFER_SIZE];
96 
- +
102  uint16_t adcBuffer16[MAX_BUFFER_SIZE];
103 
108  void setSampleRate(uint32_t sampRate = 0, bool stereo = true);
109 
@@ -145,10 +145,10 @@
173 
174  void dacInterrupts(bool enabled = true, bool withinTask = false);
175 
-
176  #if defined ESP32
-
180  void rampOut(uint8_t sample);
-
181  void rampIn(uint8_t sample);
-
182  TaskHandle_t dacTaskHandle;
+
176  #if defined (ESP32) || defined (DOXYGEN_FORCED)
+
180  void rampOut(uint8_t sample);
+
181  void rampIn(uint8_t sample);
+
182  TaskHandle_t dacTaskHandle;
183  #endif
184 
187 private:
@@ -159,8 +159,8 @@
200  bool dacChan;
201 
202  uint8_t aCtr = 0; /* Internal counter for ADC data */
-
203  uint16_t realBuf[MAX_BUFFER_SIZE]; /* Internal DAC buffer */
-
204  uint16_t adcDma[MAX_BUFFER_SIZE]; /* Buffers for ADC DMA transfers */
+
203  uint16_t realBuf[MAX_BUFFER_SIZE]; /* Internal DAC buffer */
+
204  uint16_t adcDma[MAX_BUFFER_SIZE]; /* Buffers for ADC DMA transfers */
205  uint16_t dataReady; /* Internal indicator for DAC data */
206 
207  uint32_t dataTimer; /* Internal timer tracks timing of incoming data */
@@ -191,7 +191,7 @@
232  i2s_config_t i2s_cfg;
233 
234  bool i2sStopped;
-
235 
+
235  adc1_channel_t adcChannel;
236 
237  bool taskCreated;
238 
@@ -213,18 +213,19 @@
255 #endif
256 
257 
- -
#define MAX_BUFFER_SIZE
void adcInterrupts(bool enabled=true)
void dacHandler(void)
uint8_t dacBitsPerSample
+
void rampIn(uint8_t sample)
uint8_t adcBuffer[MAX_BUFFER_SIZE]
uint8_t dacBuffer[MAX_BUFFER_SIZE]
+
TaskHandle_t dacTaskHandle
void getADC(uint32_t samples=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]
void setSampleRate(uint32_t sampRate=0, bool stereo=true)
@@ -238,7 +239,7 @@ diff --git a/AutoAnalog__config_8h.html b/AutoAnalog__config_8h.html deleted file mode 100644 index 8fd37fc..0000000 --- a/AutoAnalog__config_8h.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - -Auto Analog Audio: src/AutoAnalog_config.h File Reference - - - - - - - - - - -
-
-
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
- - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
- -
-
AutoAnalog_config.h File Reference
-
-
-
#include <Arduino.h>
-
-

Go to the source code of this file.

- - - - - - - - - - -

-Macros

#define MAX_BUFFER_SIZE   32
 
#define DAC0_PIN   9
 
#define DAC1_PIN   10
 
#define DEFAULT_FREQUENCY   16000
 
-

Macro Definition Documentation

- -

◆ MAX_BUFFER_SIZE

- -
-
- - - - -
#define MAX_BUFFER_SIZE   32
-
-
Examples
SdAudioAuto.ino, and SdAudioRecording.ino.
-
- -

Definition at line 31 of file AutoAnalog_config.h.

- -
-
- -

◆ DAC0_PIN

- -
-
- - - - -
#define DAC0_PIN   9
-
- -

Definition at line 32 of file AutoAnalog_config.h.

- -
-
- -

◆ DAC1_PIN

- -
-
- - - - -
#define DAC1_PIN   10
-
- -

Definition at line 33 of file AutoAnalog_config.h.

- -
-
- -

◆ DEFAULT_FREQUENCY

- -
-
- - - - -
#define DEFAULT_FREQUENCY   16000
-
- -

Definition at line 37 of file AutoAnalog_config.h.

- -
-
-
- - - - diff --git a/AutoAnalog__config_8h_source.html b/AutoAnalog__config_8h_source.html deleted file mode 100644 index c969450..0000000 --- a/AutoAnalog__config_8h_source.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - -Auto Analog Audio: src/AutoAnalog_config.h Source File - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
AutoAnalog_config.h
-
-
-Go to the documentation of this file.
1  /*
-
2  AutoAnalogAudio streaming via DAC & ADC by TMRh20
-
3  Copyright (C) 2016 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
-
7  the Free Software Foundation, either version 3 of the License, or
-
8  (at your option) any later version.
-
9 
-
10  This program is distributed in the hope that it will be useful,
-
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
-
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-
13  GNU General Public License for more details.
-
14 
-
15  You should have received a copy of the GNU General Public License
-
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
-
17  */
-
18 
-
19  #include <Arduino.h>
-
20 
-
21  #if defined (ARDUINO_ARCH_SAM)
-
22 
-
23  #define MAX_BUFFER_SIZE 256
-
24 
-
25  #elif defined ESP32
-
26 
-
27  #define MAX_BUFFER_SIZE 512
-
28 
-
29  #else
-
30 
-
31  #define MAX_BUFFER_SIZE 32
-
32  #define DAC0_PIN 9
-
33  #define DAC1_PIN 10
-
34 
-
35  #endif
-
36 
-
37  #define DEFAULT_FREQUENCY 16000
-
38 
-
- - - - diff --git a/ESP32_2ESP32__AudioTest_2myWAV_8h.html b/ESP32_2ESP32__AudioTest_2myWAV_8h.html deleted file mode 100644 index d153f86..0000000 --- a/ESP32_2ESP32__AudioTest_2myWAV_8h.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/ESP32/ESP32_AudioTest/myWAV.h File Reference - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
- -
-
myWAV.h File Reference
-
-
- -

Go to the source code of this file.

- - - - - - - - -

-Functions

uint32_t loadBuffer ()
 
void DACC_Handler (void)
 
void playAudio (const char *audioFile)
 
- - - - - -

-Variables

uint8_t channelSelection = 2
 
uint32_t endPosition = 0
 
-

Function Documentation

- -

◆ loadBuffer()

- -
-
- - - - - - - -
void loadBuffer ()
-
-
Examples
SdAudioAuto.ino, and SdAudioBasic.ino.
-
- -

Definition at line 138 of file myWAV.h.

- -
-
- -

◆ DACC_Handler()

- -
-
- - - - - - - - -
void DACC_Handler (void )
-
-
- -

◆ playAudio()

- -
-
- - - - - - - - -
void playAudio (const char * audioFile)
-
-
Examples
SdAudioAuto.ino, SdAudioBasic.ino, SdAudioRecording.ino, and SdAudioWavPlayer.ino.
-
- -

Definition at line 24 of file myWAV.h.

- -
-
-

Variable Documentation

- -

◆ channelSelection

- -
-
- - - - -
uint8_t channelSelection = 2
-
-
- -

◆ endPosition

- -
-
- - - - -
uint32_t endPosition = 0
-
- -

Definition at line 22 of file myWAV.h.

- -
-
-
- - - - diff --git a/ESP32_2ESP32__AudioTest_2myWAV_8h_source.html b/ESP32_2ESP32__AudioTest_2myWAV_8h_source.html deleted file mode 100644 index fdb8928..0000000 --- a/ESP32_2ESP32__AudioTest_2myWAV_8h_source.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/ESP32/ESP32_AudioTest/myWAV.h Source File - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
myWAV.h
-
-
-Go to the documentation of this file.
1 
-
2 uint8_t channelSelection = 2;
-
3 uint32_t loadBuffer();
-
4 
-
5 /*********************************************************/
-
6 
-
7 
-
8 /*********************************************************/
-
9 
-
10 void DACC_Handler(void) {
-
11 
-
12  aaAudio.dacHandler(); //Link the DAC ISR/IRQ to the library. Called by the MCU when DAC is ready for data
-
13  uint32_t samples = loadBuffer();
-
14  if (samples) {
-
15  aaAudio.feedDAC(channelSelection, samples);
-
16  }
-
17 
-
18 }
-
19 
-
20 /*********************************************************/
-
21 /* Function to open the audio file, seek to starting position and enable the DAC */
-
22 uint32_t endPosition = 0;
-
23 
-
24 void playAudio(const char *audioFile) {
-
25 
-
26  uint32_t sampleRate = 16000;
-
27  uint16_t numChannels = 1;
-
28  uint16_t bitsPerSample = 8;
-
29  uint32_t dataSize = 0;
-
30  uint32_t startPosition = 44;
-
31 
-
32  Serial.println("Play");
-
33 
-
34  if (myFile) {
-
35  Serial.println("Close Current");
-
36  //Ramp in and ramp out functions prevent popping and clicking when starting/stopping playback
-
37  aaAudio.rampOut(0);
-
38  aaAudio.disableDAC();
-
39  myFile.close();
-
40 
-
41  /*if(aaAudio.dacBitsPerSample == 8){
-
42  aaAudio.rampOut(aaAudio.dacBuffer[MAX_BUFFER_SIZE-1]);
-
43  }else{
-
44  aaAudio.rampOut(aaAudio.dacBuffer16[MAX_BUFFER_SIZE-1]);
-
45  }*/
-
46  }
-
47 
-
48 
-
49  //Open the designated file
-
50  myFile = SD.open(audioFile);
-
51  if (myFile) {
-
52  myFile.seek(22);
-
53  myFile.read((byte*)&numChannels, 2);
-
54  myFile.read((byte*)&sampleRate, 4);
-
55  myFile.seek(34);
-
56  myFile.read((byte*)&bitsPerSample, 2);
-
57  myFile.seek(40);
-
58  myFile.read((byte*)&dataSize, 4);
-
59  endPosition = dataSize + 44;
-
60 
-
61 #if defined (AUDIO_DEBUG)
-
62  Serial.print("\nNow Playing ");
-
63  Serial.println(audioFile);
-
64  Serial.print("Channels ");
-
65  Serial.print(numChannels);
-
66  Serial.print(", SampleRate ");
-
67  Serial.print(sampleRate);
-
68  Serial.print(", BitsPerSample ");
-
69  Serial.println(bitsPerSample);
-
70 #endif
-
71 
-
72  if (myFile.size() > endPosition) {
-
73  //startPosition = myFile.size() - dataSize;
-
74  endPosition = dataSize + 44;
-
75  myFile.seek(endPosition);
-
76  uint8_t buf[myFile.size() - (endPosition)];
-
77  myFile.read(buf, myFile.size() - (endPosition));
-
78  Serial.println("Metadata:");
-
79  Serial.println(myFile.size() - (endPosition));
-
80  for (int i = 0; i < myFile.size() - (endPosition); i++) {
-
81  Serial.print((char)buf[i]);
-
82  }
-
83  Serial.println();
-
84  }
-
85 
-
86  if (bitsPerSample > 12) {
-
87  bitsPerSample = 16;
-
88  } else if (bitsPerSample > 10 ) {
-
89  bitsPerSample = 12;
-
90  } else if (bitsPerSample > 8) {
-
91  bitsPerSample = 10;
-
92  } else {
-
93  bitsPerSample = 8;
-
94  }
-
95 
-
96  sampleRate *= numChannels;
-
97  Serial.print("SampleRate ");
-
98  Serial.println(sampleRate);
-
99  Serial.println("Set smp rate");
-
100  bool stereo = numChannels > 1 ? true : false;
-
101  aaAudio.setSampleRate(sampleRate, stereo);
-
102  aaAudio.dacBitsPerSample = bitsPerSample;
-
103 
-
104 #if defined (AUDIO_DEBUG)
-
105  Serial.print("Timer Rate ");
-
106  Serial.print(sampleRate);
-
107  Serial.print(", DAC Bits Per Sample ");
-
108  Serial.println(bitsPerSample);
-
109 #endif
-
110 
-
111  //Skip past the WAV header
-
112  myFile.seek(startPosition);
-
113 
-
114 
-
115  //Load one buffer
-
116  loadBuffer();
-
117  //Feed the DAC to start playback
-
118 
-
119  if (aaAudio.dacBitsPerSample == 8) {
-
120  aaAudio.rampIn(aaAudio.dacBuffer[0]);
-
121  } else {
-
122  aaAudio.rampIn((uint8_t)aaAudio.dacBuffer16[0]);
-
123  }
-
124 
-
125  aaAudio.feedDAC(channelSelection, MAX_BUFFER_SIZE, useTasks);
-
126 
-
127  } else {
-
128 #if defined (AUDIO_DEBUG)
-
129  Serial.print("Failed to open ");
-
130  Serial.println(audioFile);
-
131 #endif
-
132  }
-
133 }
-
134 
-
135 /*********************************************************/
-
136 /* Function called from DAC interrupt after dacHandler(). Loads data into the dacBuffer */
-
137 
-
138 uint32_t loadBuffer() {
-
139 
-
140  uint32_t samplesToRead = 0;
-
141  uint32_t metaDataSize = myFile.size() - endPosition;
-
142 
-
143 
-
144  if (myFile) {
-
145  if (myFile.available() > metaDataSize + 1 ) {
-
146  samplesToRead = MAX_BUFFER_SIZE;
-
147  size_t availableBytes = 0;
-
148 
-
149  if (aaAudio.dacBitsPerSample == 8) {
-
150  //Load 32 samples into the 8-bit dacBuffer
-
151  if ( (availableBytes = (myFile.available() - metaDataSize)) <= samplesToRead) {
-
152  samplesToRead = availableBytes;
-
153  Serial.print("File Size ");
-
154  Serial.print(myFile.size());
-
155  Serial.print(" Bytes Read ");
-
156  Serial.println(myFile.position() + samplesToRead);
-
157  }
-
158  myFile.read(aaAudio.dacBuffer, samplesToRead);
-
159  for (int i = 0; i < samplesToRead; i++) {
-
160  int16_t tmpVar = (uint16_t)aaAudio.dacBuffer[i] - 0x80;
-
161  tmpVar = (tmpVar / volumeVar) + 0x80;
-
162  //int16_t tmpInt = ( ((int16_t)aaAudio.dacBuffer[i]) - 127) / volumeVar;
-
163  aaAudio.dacBuffer[i] = tmpVar;
-
164  }
-
165 
-
166  } else {
-
167  if ( (availableBytes = (myFile.available() - metaDataSize)) <= (samplesToRead * 2) ) {
-
168  samplesToRead = availableBytes / 2;
-
169  Serial.print("File Size16 ");
-
170  Serial.print(myFile.size());
-
171  Serial.print(" Bytes Read ");
-
172  Serial.println(myFile.position() + availableBytes);
-
173  }
-
174  //Load 32 samples (64 bytes) into the 16-bit dacBuffer
-
175  int16_t tmpBuffer[samplesToRead];
-
176  myFile.read((byte*)tmpBuffer, samplesToRead * 2);
-
177  //Convert the 16-bit samples to 12-bit
-
178  for (int i = 0; i < samplesToRead; i++) {
-
179  /*if(i&0x01){
-
180  uint16_t tmp = aaAudio.dacBuffer16[i] >> volumeVar;
-
181  aaAudio.dacBuffer16[i] = tmp + (tmp>>1);
-
182  }else{
-
183  aaAudio.dacBuffer16[i] >>= volumeVar;
-
184  }*/
-
185  tmpBuffer[i] /= volumeVar;
-
186  aaAudio.dacBuffer16[i] = (tmpBuffer[i] + 0x8000) >> 8;
-
187  //aaAudio.dacBuffer16[i] = aaAudio.dacBuffer16[i] >> volumeVar;
-
188  }
-
189  }
-
190  } else {
-
191 #if defined (AUDIO_DEBUG)
-
192  Serial.print("Close: ");
-
193 #endif
-
194  //aaAudio.disableDAC();
-
195  //aaAudio.dacInterrupts(false);
-
196 
-
197  Serial.println("File close");
-
198  myFile.close();
-
199  Serial.print("Dis DAC, ");
-
200  aaAudio.rampOut(0);
-
201  //If using tasks, disabling the active task and DAC will be done from within the task itself
-
202  //Need to let aaAudio know by setting the parameter to 'true'. Using useTasks variable
-
203  aaAudio.disableDAC(useTasks);
-
204 
-
205  /*if(useTasks){
-
206  Serial.println(" Task Del");
-
207  vTaskDelete(aaAudio.dacTaskHandle);
-
208  }*/
-
209 
-
210  /*if(aaAudio.dacBitsPerSample == 8){
-
211  aaAudio.rampOut(aaAudio.dacBuffer[MAX_BUFFER_SIZE-1]);
-
212  }else{
-
213  aaAudio.rampOut(aaAudio.dacBuffer16[MAX_BUFFER_SIZE-1]);
-
214  }*/
-
215 
-
216 
-
217 
-
218  }
-
219  }
-
220 
-
221  return samplesToRead;
-
222 }
-
223 
-
224 /*********************************************************/
-
#define MAX_BUFFER_SIZE
-
uint32_t endPosition
Definition: myWAV.h:22
-
void DACC_Handler(void)
Definition: myWAV.h:10
-
uint8_t channelSelection
Definition: myWAV.h:2
-
void playAudio(const char *audioFile)
Definition: myWAV.h:24
-
uint32_t loadBuffer()
Definition: myWAV.h:138
-
char audioFile[]
Definition: radioRelay.cpp:29
-
float volumeVar
Definition: volume.h:2
-
- - - - diff --git a/Makefile.html b/Makefile.html deleted file mode 100644 index e164312..0000000 --- a/Makefile.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/WirelessTx_RPi/Makefile File Reference - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
Makefile File Reference
-
-
- -

Go to the source code of this file.

-
- - - - diff --git a/Makefile_source.html b/Makefile_source.html deleted file mode 100644 index e13c839..0000000 --- a/Makefile_source.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/WirelessTx_RPi/Makefile Source File - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
Makefile
-
-
-Go to the documentation of this file.
1 #############################################################################
-
2 #
-
3 # Makefile for librf24 examples on Raspberry Pi
-
4 #
-
5 # License: GPL (General Public License)
-
6 # Author: gnulnulf <arco@appeltaart.mine.nu>
-
7 # Date: 2013/02/07 (version 1.0)
-
8 #
-
9 # Description:
-
10 # ------------
-
11 # use make all and make install to install the examples
-
12 # You can change the install directory by editing the prefix line
-
13 #
-
14 prefix := /usr/local
-
15 
-
16 ARCH=armv6zk
-
17 ifeq "$(shell uname -m)" "armv7l"
-
18 ARCH=armv7-a
-
19 endif
-
20 
-
21 # Detect the Raspberry Pi from cpuinfo
-
22 #Count the matches for BCM2708 or BCM2709 in cpuinfo
-
23 RPI=$(shell cat /proc/cpuinfo | grep Hardware | grep -c BCM2708)
-
24 ifneq "${RPI}" "1"
-
25 RPI=$(shell cat /proc/cpuinfo | grep Hardware | grep -c BCM2709)
-
26 endif
-
27 
-
28 ifeq "$(RPI)" "1"
-
29 # The recommended compiler flags for the Raspberry Pi
-
30 CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=$(ARCH) -mtune=arm1176jzf-s -std=c++0x
-
31 endif
-
32 
-
33 
-
34 # define all programs
-
35 PROGRAMS = wirelessSpeaker radioRelay
-
36 SOURCES = ${PROGRAMS:=.cpp}
-
37 
-
38 all: ${PROGRAMS}
-
39 
-
40 ${PROGRAMS}: ${SOURCES}
-
41  g++ ${CCFLAGS} -Wall -I../ $@.cpp -lrf24-bcm -lrf24network -o $@
-
42 
-
43 clean:
-
44  rm -rf $(PROGRAMS)
-
45 
-
46 install: all
-
47  test -d $(prefix) || mkdir $(prefix)
-
48  test -d $(prefix)/bin || mkdir $(prefix)/bin
-
49  for prog in $(PROGRAMS); do \
-
50  install -m 0755 $$prog $(prefix)/bin; \
-
51  done
-
52 
-
53 .PHONY: install
-
- - - - diff --git a/MultiChannelAdcStream_8ino-example.html b/MultiChannelAdcStream_8ino-example.html index 5863f4f..0cc0d31 100644 --- a/MultiChannelAdcStream_8ino-example.html +++ b/MultiChannelAdcStream_8ino-example.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -70,12 +70,9 @@

For Arduino Due

- +

Multi Channel ADC Sampling Example:

+

This example demonstrates how to capture a steady stream of ADC data on multiple channels. Currently pins A0-A6 are supported.

+

See AnalogAudio_config.h to change the MAX_BUFFER_SIZE allowing larger chunks of data

/*
AutoAnalogAudio streaming via DAC & ADC by TMRh20
Copyright (C) 2016 TMRh20 - tmrh20@gmail.com, github.com/TMRh20
@@ -187,7 +184,7 @@
diff --git a/SDAudio_2SdAudioRecording_2myWAV_8h.html b/SDAudio_2SdAudioRecording_2myWAV_8h.html deleted file mode 100644 index 20f930e..0000000 --- a/SDAudio_2SdAudioRecording_2myWAV_8h.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/SDAudio/SdAudioRecording/myWAV.h File Reference - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
- -
-
myWAV.h File Reference
-
-
- -

Go to the source code of this file.

- - - - - - - - -

-Functions

void loadBuffer ()
 
void DACC_Handler (void)
 
void playAudio (const char *audioFile)
 
- - - -

-Variables

uint8_t channelSelection = 0
 
-

Function Documentation

- -

◆ loadBuffer()

- -
-
- - - - - - - -
void loadBuffer ()
-
- -

Definition at line 104 of file myWAV.h.

- -
-
- -

◆ DACC_Handler()

- -
-
- - - - - - - - -
void DACC_Handler (void )
-
- -

Definition at line 8 of file myWAV.h.

- -
-
- -

◆ playAudio()

- -
-
- - - - - - - - -
void playAudio (const char * audioFile)
-
- -

Definition at line 17 of file myWAV.h.

- -
-
-

Variable Documentation

- -

◆ channelSelection

- -
-
- - - - -
uint8_t channelSelection = 0
-
- -

Definition at line 2 of file myWAV.h.

- -
-
-
- - - - diff --git a/SDAudio_2SdAudioRecording_2myWAV_8h_source.html b/SDAudio_2SdAudioRecording_2myWAV_8h_source.html deleted file mode 100644 index e69ecf9..0000000 --- a/SDAudio_2SdAudioRecording_2myWAV_8h_source.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/SDAudio/SdAudioRecording/myWAV.h Source File - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
myWAV.h
-
-
-Go to the documentation of this file.
1 
-
2 uint8_t channelSelection = 0;
-
3 
-
4 void loadBuffer();
-
5 
-
6 /*********************************************************/
-
7 
-
8 void DACC_Handler(void) {
-
9  aaAudio.feedDAC(channelSelection); //Feed the DAC with the data loaded into the dacBuffer
-
10  aaAudio.dacHandler(); //Link the DAC ISR/IRQ to the library. Called by the MCU when DAC is ready for data
-
11  loadBuffer();
-
12 }
-
13 
-
14 /*********************************************************/
-
15 /* Function to open the audio file, seek to starting position and enable the DAC */
-
16 
-
17 void playAudio(const char *audioFile) {
-
18 
-
19  uint32_t sampleRate = 16000;
-
20  uint16_t numChannels = 1;
-
21  uint16_t bitsPerSample = 8;
-
22  uint32_t dataSize = 0;
-
23  uint32_t startPosition = 44;
-
24 
-
25  if (recFile) {
-
26  aaAudio.adcInterrupts(false);
-
27  recFile.close();
-
28  }
-
29 
-
30  if (myFile) {
-
31  aaAudio.disableDAC();
-
32  myFile.close();
-
33  //delay(25);
-
34  }
-
35 
-
36 
-
37  //Open the designated file
-
38  myFile = SD.open(audioFile);
-
39 
-
40  if (myFile) {
-
41  myFile.seek(22);
-
42  myFile.read((byte*)&numChannels, 2);
-
43  myFile.read((byte*)&sampleRate, 4);
-
44  myFile.seek(34);
-
45  myFile.read((byte*)&bitsPerSample, 2);
-
46  myFile.seek(40);
-
47  myFile.read((byte*)&dataSize, 4);
-
48  dataSize += 44; //Set this variable to the total size of header + data
-
49 
-
50 #if defined (AUDIO_DEBUG)
-
51  Serial.print("\nNow Playing ");
-
52  Serial.println(audioFile);
-
53  Serial.print("Channels ");
-
54  Serial.print(numChannels);
-
55  Serial.print(", SampleRate ");
-
56  Serial.print(sampleRate);
-
57  Serial.print(", BitsPerSample ");
-
58  Serial.println(bitsPerSample);
-
59 #endif
-
60 
-
61  if (myFile.size() > dataSize) {
-
62  startPosition = myFile.size() - dataSize;
-
63 #if defined (AUDIO_DEBUG)
-
64  Serial.println("Skipping metadata");
-
65 #endif
-
66  }
-
67 
-
68  if (bitsPerSample > 10 ) {
-
69  bitsPerSample = 12;
-
70  } else if (bitsPerSample > 8) {
-
71  bitsPerSample = 10;
-
72  } else {
-
73  bitsPerSample = 8;
-
74  }
-
75 
-
76  sampleRate *= numChannels;
-
77  aaAudio.dacBitsPerSample = bitsPerSample;
-
78  aaAudio.setSampleRate(sampleRate);
-
79 
-
80 #if defined (AUDIO_DEBUG)
-
81  Serial.print("Timer Rate ");
-
82  Serial.print(sampleRate);
-
83  Serial.print(", DAC Bits Per Sample ");
-
84  Serial.println(bitsPerSample);
-
85 #endif
-
86 
-
87  //Skip past the WAV header
-
88  myFile.seek(startPosition);
-
89  //Load one buffer
-
90  loadBuffer();
-
91  //Feed the DAC to start playback
-
92  aaAudio.feedDAC();
-
93  } else {
-
94 #if defined (AUDIO_DEBUG)
-
95  Serial.print("Failed to open ");
-
96  Serial.println(audioFile);
-
97 #endif
-
98  }
-
99 }
-
100 
-
101 /*********************************************************/
-
102 /* Function called from DAC interrupt after dacHandler(). Loads data into the dacBuffer */
-
103 
-
104 void loadBuffer() {
-
105 
-
106  if (myFile) {
-
107  if (myFile.available()) {
-
108  if (aaAudio.dacBitsPerSample == 8) {
-
109  //Load 32 samples into the 8-bit dacBuffer
-
110  myFile.read((byte*)aaAudio.dacBuffer, MAX_BUFFER_SIZE);
-
111  } else {
-
112  //Load 32 samples (64 bytes) into the 16-bit dacBuffer
-
113  myFile.read((byte*)aaAudio.dacBuffer16, MAX_BUFFER_SIZE * 2);
-
114  //Convert the 16-bit samples to 12-bit
-
115  for (int i = 0; i < MAX_BUFFER_SIZE; i++) {
-
116  aaAudio.dacBuffer16[i] = (aaAudio.dacBuffer16[i] + 0x8000) >> 4;
-
117  }
-
118  }
-
119  } else {
-
120 #if defined (AUDIO_DEBUG)
-
121  Serial.println("File close");
-
122 #endif
-
123  myFile.close();
-
124  aaAudio.disableDAC();
-
125  }
-
126  }
-
127 }
-
128 
-
129 /*********************************************************/
-
#define MAX_BUFFER_SIZE
-
void DACC_Handler(void)
Definition: myWAV.h:10
-
uint8_t channelSelection
Definition: myWAV.h:2
-
void playAudio(const char *audioFile)
Definition: myWAV.h:24
-
uint32_t loadBuffer()
Definition: myWAV.h:138
-
char audioFile[]
Definition: radioRelay.cpp:29
-
- - - - diff --git a/SDAudio_2SdAudioWavPlayer_2myWAV_8h.html b/SDAudio_2SdAudioWavPlayer_2myWAV_8h.html deleted file mode 100644 index d386f03..0000000 --- a/SDAudio_2SdAudioWavPlayer_2myWAV_8h.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/SDAudio/SdAudioWavPlayer/myWAV.h File Reference - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
- -
-
myWAV.h File Reference
-
-
- -

Go to the source code of this file.

- - - - - - - - -

-Functions

void loadBuffer ()
 
void DACC_Handler (void)
 
void playAudio (char *audioFile)
 
- - - -

-Variables

uint8_t channelSelection = 2
 
-

Function Documentation

- -

◆ loadBuffer()

- -
-
- - - - - - - -
void loadBuffer ()
-
- -

Definition at line 97 of file myWAV.h.

- -
-
- -

◆ DACC_Handler()

- -
-
- - - - - - - - -
void DACC_Handler (void )
-
- -

Definition at line 8 of file myWAV.h.

- -
-
- -

◆ playAudio()

- -
-
- - - - - - - - -
void playAudio (char * audioFile)
-
- -

Definition at line 17 of file myWAV.h.

- -
-
-

Variable Documentation

- -

◆ channelSelection

- -
-
- - - - -
uint8_t channelSelection = 2
-
- -

Definition at line 2 of file myWAV.h.

- -
-
-
- - - - diff --git a/SDAudio_2SdAudioWavPlayer_2myWAV_8h_source.html b/SDAudio_2SdAudioWavPlayer_2myWAV_8h_source.html deleted file mode 100644 index 2d4d44d..0000000 --- a/SDAudio_2SdAudioWavPlayer_2myWAV_8h_source.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/SDAudio/SdAudioWavPlayer/myWAV.h Source File - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
myWAV.h
-
-
-Go to the documentation of this file.
1 
-
2 uint8_t channelSelection = 2;
-
3 
-
4 void loadBuffer();
-
5 
-
6 /*********************************************************/
-
7 
-
8 void DACC_Handler(void) {
-
9  aaAudio.feedDAC(channelSelection); //Feed the DAC with the data loaded into the dacBuffer
-
10  aaAudio.dacHandler(); //Link the DAC ISR/IRQ to the library. Called by the MCU when DAC is ready for data
-
11  loadBuffer();
-
12 }
-
13 
-
14 /*********************************************************/
-
15 /* Function to open the audio file, seek to starting position and enable the DAC */
-
16 
-
17 void playAudio(char *audioFile) {
-
18 
-
19  uint32_t sampleRate = 16000;
-
20  uint16_t numChannels = 1;
-
21  uint16_t bitsPerSample = 8;
-
22  uint32_t dataSize = 0;
-
23  uint32_t startPosition = 44;
-
24 
-
25  if (myFile) {
-
26  aaAudio.disableDAC();
-
27  myFile.close();
-
28  //delay(25);
-
29  }
-
30 
-
31 
-
32  //Open the designated file
-
33  myFile = SD.open(audioFile);
-
34 
-
35  if (myFile) {
-
36  myFile.seek(22);
-
37  myFile.read((byte*)&numChannels, 2);
-
38  myFile.read((byte*)&sampleRate, 4);
-
39  myFile.seek(34);
-
40  myFile.read((byte*)&bitsPerSample, 2);
-
41  myFile.seek(40);
-
42  myFile.read((byte*)&dataSize, 4);
-
43  dataSize += 44; //Set this variable to the total size of header + data
-
44 
-
45 #if defined (AUDIO_DEBUG)
-
46  Serial.print("\nNow Playing ");
-
47  Serial.println(audioFile);
-
48  Serial.print("Channels ");
-
49  Serial.print(numChannels);
-
50  Serial.print(", SampleRate ");
-
51  Serial.print(sampleRate);
-
52  Serial.print(", BitsPerSample ");
-
53  Serial.println(bitsPerSample);
-
54 #endif
-
55 
-
56  if (myFile.size() > dataSize) {
-
57  startPosition = myFile.size() - dataSize;
-
58  Serial.println("Skipping metadata");
-
59  }
-
60 
-
61  if (bitsPerSample > 10 ) {
-
62  bitsPerSample = 12;
-
63  } else if (bitsPerSample > 8) {
-
64  bitsPerSample = 10;
-
65  } else {
-
66  bitsPerSample = 8;
-
67  }
-
68 
-
69  sampleRate *= numChannels;
-
70  aaAudio.dacBitsPerSample = bitsPerSample;
-
71  aaAudio.setSampleRate(sampleRate);
-
72 
-
73 #if defined (AUDIO_DEBUG)
-
74  Serial.print("Timer Rate ");
-
75  Serial.print(sampleRate);
-
76  Serial.print(", DAC Bits Per Sample ");
-
77  Serial.println(bitsPerSample);
-
78 #endif
-
79 
-
80  //Skip past the WAV header
-
81  myFile.seek(startPosition);
-
82  //Load one buffer
-
83  loadBuffer();
-
84  //Feed the DAC to start playback
-
85  aaAudio.feedDAC();
-
86  } else {
-
87 #if defined (AUDIO_DEBUG)
-
88  Serial.print("Failed to open ");
-
89  Serial.println(audioFile);
-
90 #endif
-
91  }
-
92 }
-
93 
-
94 /*********************************************************/
-
95 /* Function called from DAC interrupt after dacHandler(). Loads data into the dacBuffer */
-
96 
-
97 void loadBuffer() {
-
98 
-
99  if (myFile) {
-
100  if (myFile.available()) {
-
101  if (aaAudio.dacBitsPerSample == 8) {
-
102  //Load 32 samples into the 8-bit dacBuffer
-
103  myFile.read((byte*)aaAudio.dacBuffer, MAX_BUFFER_SIZE);
-
104  } else {
-
105  //Load 32 samples (64 bytes) into the 16-bit dacBuffer
-
106  myFile.read((byte*)aaAudio.dacBuffer16, MAX_BUFFER_SIZE * 2);
-
107  //Convert the 16-bit samples to 12-bit
-
108  for (int i = 0; i < MAX_BUFFER_SIZE; i++) {
-
109  aaAudio.dacBuffer16[i] = (aaAudio.dacBuffer16[i] + 0x8000) >> 4;
-
110  }
-
111  }
-
112  } else {
-
113 #if defined (AUDIO_DEBUG)
-
114  Serial.println("File close");
-
115 #endif
-
116  myFile.close();
-
117  aaAudio.disableDAC();
-
118  }
-
119  }
-
120 }
-
121 
-
122 /*********************************************************/
-
#define MAX_BUFFER_SIZE
-
void DACC_Handler(void)
Definition: myWAV.h:10
-
uint8_t channelSelection
Definition: myWAV.h:2
-
void playAudio(const char *audioFile)
Definition: myWAV.h:24
-
uint32_t loadBuffer()
Definition: myWAV.h:138
-
char audioFile[]
Definition: radioRelay.cpp:29
-
- - - - diff --git a/SdAudioAuto_8ino-example.html b/SdAudioAuto_8ino-example.html index dd89621..20bc93b 100644 --- a/SdAudioAuto_8ino-example.html +++ b/SdAudioAuto_8ino-example.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -70,11 +70,8 @@

For Arduino Due

- +

Auto SDAudio Example:

+

This example demonstrates how to play *.wav files from SD Card using interrupts.

/*
AutoAnalogAudio streaming via DAC & ADC by TMRh20
Copyright (C) 2016 TMRh20 - tmrh20@gmail.com, github.com/TMRh20
@@ -112,14 +109,14 @@
File myFile;
-
uint8_t channelSelection = 2; //Play audio on both DAC0 and DAC1 by default
+
uint8_t channelSelection = 2; //Play audio on both DAC0 and DAC1 by default
/*********************************************************/
-
void DACC_Handler(void) {
-
aaAudio.feedDAC(channelSelection); //Feed the DAC with the data loaded into the dacBuffer
-
aaAudio.dacHandler(); //Link the DAC ISR/IRQ to the library. Called by the MCU when DAC is ready for data
-
loadBuffer(); //Call the loadBuffer() function defined below to buffer from SD Card
+
void DACC_Handler(void) {
+
aaAudio.feedDAC(channelSelection); //Feed the DAC with the data loaded into the dacBuffer
+
aaAudio.dacHandler(); //Link the DAC ISR/IRQ to the library. Called by the MCU when DAC is ready for data
+
loadBuffer(); //Call the loadBuffer() function defined below to buffer from SD Card
}
/*********************************************************/
@@ -134,8 +131,8 @@
Serial.println("SD ok");
Serial.println("Analog Audio Begin");
-
aaAudio.begin(0, 1); //Setup aaAudio using DAC
-
aaAudio.autoAdjust = 0;
+
aaAudio.begin(0, 1); //Setup aaAudio using DAC
+
aaAudio.autoAdjust = 0;
}
/*********************************************************/
@@ -146,12 +143,12 @@
char input = Serial.read();
switch (input) {
//Play an 8-bit, 22Khz, Stereo WAV file
-
case '1': aaAudio.dacBitsPerSample = 8; aaAudio.setSampleRate(24000); playAudio("M8b24kM.wav"); break;
+
case '1': aaAudio.dacBitsPerSample = 8; aaAudio.setSampleRate(24000); playAudio("M8b24kM.wav"); break;
//Play an 8-bit, 32Khz, Stereo WAV file
-
case '2': aaAudio.dacBitsPerSample = 8; aaAudio.setSampleRate(48000); playAudio("M8b24kS.wav"); break;
-
case '3': channelSelection = 0; break;
-
case '4': channelSelection = 1; break;
-
case '5': channelSelection = 2; break;
+
case '2': aaAudio.dacBitsPerSample = 8; aaAudio.setSampleRate(48000); playAudio("M8b24kS.wav"); break;
+
case '3': channelSelection = 0; break;
+
case '4': channelSelection = 1; break;
+
case '5': channelSelection = 2; break;
case '6': Serial.println("OK"); break;
}
}
@@ -160,21 +157,21 @@
/*********************************************************/
/* Function to open the audio file, seek to starting position and enable the DAC interrupt */
-
void playAudio(char *audioFile) {
+
void playAudio(char *audioFile) {
if (myFile) {
-
aaAudio.disableDAC();
+
aaAudio.disableDAC();
myFile.close();
}
//Open the designated file
-
myFile = SD.open(audioFile);
+
myFile = SD.open(audioFile);
if (myFile) {
//Skip past the WAV header
myFile.seek(44);
//Load one buffer
- +
loadBuffer();
//Feed the DAC to start playback
aaAudio.feedDAC();
}
@@ -183,18 +180,18 @@
/*********************************************************/
/* Function called from DAC interrupt after dacHandler(). Loads data into the dacBuffer */
-
void loadBuffer() {
+
void loadBuffer() {
if (myFile) {
if (myFile.available()) {
if (aaAudio.dacBitsPerSample == 8) {
//Load 32 samples into the 8-bit dacBuffer
-
myFile.read((byte*)aaAudio.dacBuffer, MAX_BUFFER_SIZE);
+
myFile.read((byte*)aaAudio.dacBuffer, MAX_BUFFER_SIZE);
} else {
//Load 32 samples (64 bytes) into the 16-bit dacBuffer
-
myFile.read((byte*)aaAudio.dacBuffer16, MAX_BUFFER_SIZE * 2);
+
myFile.read((byte*)aaAudio.dacBuffer16, MAX_BUFFER_SIZE * 2);
//Convert the 16-bit samples to 12-bit
-
for (int i = 0; i < MAX_BUFFER_SIZE; i++) {
+
for (int i = 0; i < MAX_BUFFER_SIZE; i++) {
aaAudio.dacBuffer16[i] = (aaAudio.dacBuffer16[i] + 0x8000) >> 4;
}
}
@@ -207,11 +204,6 @@
/*********************************************************/
-
#define MAX_BUFFER_SIZE
-
void DACC_Handler(void)
Definition: myWAV.h:10
-
uint8_t channelSelection
Definition: myWAV.h:2
-
void playAudio(const char *audioFile)
Definition: myWAV.h:24
-
uint32_t loadBuffer()
Definition: myWAV.h:138
void dacHandler(void)
uint8_t dacBitsPerSample
@@ -222,11 +214,10 @@
void setSampleRate(uint32_t sampRate=0, bool stereo=true)
void feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)
void begin(bool enADC, bool enDAC)
-
char audioFile[]
Definition: radioRelay.cpp:29
diff --git a/SdAudioBasic_8ino-example.html b/SdAudioBasic_8ino-example.html index 910a1b4..c44a9a1 100644 --- a/SdAudioBasic_8ino-example.html +++ b/SdAudioBasic_8ino-example.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -70,11 +70,8 @@

For Arduino Due

- +

Basic SDAudio Example:

+

This example demonstrates how to play *.wav files from SD Card.

/*
AutoAnalogAudio streaming via DAC & ADC by TMRh20
Copyright (C) 2016 TMRh20 - tmrh20@gmail.com, github.com/TMRh20
@@ -108,8 +105,8 @@
/*********************************************************/
-
void DACC_Handler(void) {
-
aaAudio.dacHandler(); //Link the DAC ISR/IRQ to the library. Called by the MCU when DAC is ready for data
+
void DACC_Handler(void) {
+
aaAudio.dacHandler(); //Link the DAC ISR/IRQ to the library. Called by the MCU when DAC is ready for data
}
/*********************************************************/
@@ -125,12 +122,12 @@
Serial.println("init ok");
Serial.println("Analog Audio Begin");
-
aaAudio.begin(0, 1); //Setup aaAudio using DAC
-
aaAudio.autoAdjust = 0;
+
aaAudio.begin(0, 1); //Setup aaAudio using DAC
+
aaAudio.autoAdjust = 0;
//Setup for audio at 8-bit, 16khz, mono
-
aaAudio.dacBitsPerSample = 8;
-
aaAudio.setSampleRate(16000);
+
aaAudio.dacBitsPerSample = 8;
+
aaAudio.setSampleRate(16000);
}
@@ -139,13 +136,13 @@
if (Serial.available()) {
char input = Serial.read();
switch (input) {
-
case '1': playAudio("M8b24kM.wav"); break; //Play a *.wav file by name - 8bit, 24khz, Mono
-
case '2': playAudio("M8b24kS.wav"); break; //Play 8bit, 24khz, Stereo
-
case '3': playAudio("audio.wav"); break; //Play a random file called audio.wav
+
case '1': playAudio("M8b24kM.wav"); break; //Play a *.wav file by name - 8bit, 24khz, Mono
+
case '2': playAudio("M8b24kS.wav"); break; //Play 8bit, 24khz, Stereo
+
case '3': playAudio("audio.wav"); break; //Play a random file called audio.wav
}
}
- +
loadBuffer();
}
/*********************************************************/
@@ -154,36 +151,33 @@
File myFile;
-
void playAudio(char *audioFile) {
+
void playAudio(char *audioFile) {
if (myFile) {
myFile.close();
}
//Open the designated file
-
myFile = SD.open(audioFile);
+
myFile = SD.open(audioFile);
//Skip past the WAV header
myFile.seek(44);
- +
loadBuffer();
}
-
void loadBuffer() {
+
void loadBuffer() {
//Load 32 samples into the 8-bit dacBuffer
if (myFile.available()) {
for (int i = 0; i < 32; i++) {
-
aaAudio.dacBuffer[i] = myFile.read();
+
aaAudio.dacBuffer[i] = myFile.read();
}
//Feed the dac with the buffer of data
-
aaAudio.feedDAC(0, 32);
+
aaAudio.feedDAC(0, 32);
}
}
-
void DACC_Handler(void)
Definition: myWAV.h:10
-
void playAudio(const char *audioFile)
Definition: myWAV.h:24
-
uint32_t loadBuffer()
Definition: myWAV.h:138
void dacHandler(void)
uint8_t dacBitsPerSample
@@ -192,11 +186,10 @@
void setSampleRate(uint32_t sampRate=0, bool stereo=true)
void feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)
void begin(bool enADC, bool enDAC)
-
char audioFile[]
Definition: radioRelay.cpp:29
diff --git a/SdAudioRecording_8ino-example.html b/SdAudioRecording_8ino-example.html index 614c908..1add66c 100644 --- a/SdAudioRecording_8ino-example.html +++ b/SdAudioRecording_8ino-example.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -70,11 +70,8 @@

For Arduino Due

- +

Wav Recording SDAudio Example:

+

This example demonstrates recording standard format *.wav files for playback on any PC or audio device.

/*
AutoAnalogAudio streaming via DAC & ADC by TMRh20
Copyright (C) 2016 TMRh20 - tmrh20@gmail.com, github.com/TMRh20
@@ -122,7 +119,7 @@
File recFile;
/*********************************************************/
#include "myWAV.h"
-
#include "myRecording.h"
+
#include "myRecording.h"
/*********************************************************/
void setup() {
@@ -147,28 +144,28 @@
if (millis() - displayTimer > 1000) {
displayTimer = millis();
-
if (counter) {
+
if (counter) {
Serial.print("Samples per Second: ");
-
Serial.println(counter * MAX_BUFFER_SIZE);
+
Serial.println(counter * MAX_BUFFER_SIZE);
}
-
counter = 0;
+
counter = 0;
}
if (Serial.available()) {
char input = Serial.read();
switch (input) {
-
case '1': playAudio("M8b24kM.wav"); break; //Play a *.wav file by name - 8bit, 24khz, Mono
-
case '2': playAudio("M8b24kS.wav"); break; //Play 8bit, 24khz, Stereo
-
case '3': playAudio("M16b24kS.wav"); break; //Play 16bit, 24khz, Stereo
-
case '4': playAudio("M8b44kST.wav"); break; //Play 8bit, 44khz, Stereo
-
case '5': channelSelection = 0; break; //Play the audio on DAC0
-
case '6': channelSelection = 1; break; //Play the audio on DAC1
-
case '7': channelSelection = 2; break; //Play the audio on DAC0 & DAC1
+
case '1': playAudio("M8b24kM.wav"); break; //Play a *.wav file by name - 8bit, 24khz, Mono
+
case '2': playAudio("M8b24kS.wav"); break; //Play 8bit, 24khz, Stereo
+
case '3': playAudio("M16b24kS.wav"); break; //Play 16bit, 24khz, Stereo
+
case '4': playAudio("M8b44kST.wav"); break; //Play 8bit, 44khz, Stereo
+
case '5': channelSelection = 0; break; //Play the audio on DAC0
+
case '6': channelSelection = 1; break; //Play the audio on DAC1
+
case '7': channelSelection = 2; break; //Play the audio on DAC0 & DAC1
case '8': Serial.println("OK"); break;
-
case '9': startRecording(newWavFile, 11000); break; //Start recording @11khz,8-bit,Mono
-
case '0': stopRecording(newWavFile, 11000); break; //Stop the recording and finalize the file
-
case 'p': playAudio(newWavFile); break; //Play back the recorded audio
+
case '9': startRecording(newWavFile, 11000); break; //Start recording @11khz,8-bit,Mono
+
case '0': stopRecording(newWavFile, 11000); break; //Stop the recording and finalize the file
+
case 'p': playAudio(newWavFile); break; //Play back the recorded audio
case 'D': SD.remove(newWavFile); break; //Delete the file and start fresh
}
}
@@ -178,20 +175,13 @@
-
#define MAX_BUFFER_SIZE
-
uint8_t channelSelection
Definition: myWAV.h:2
-
void playAudio(const char *audioFile)
Definition: myWAV.h:24
void begin(bool enADC, bool enDAC)
- -
void startRecording(const char *fileName, uint32_t sampleRate)
Definition: myRecording.h:37
-
uint32_t counter
Definition: myRecording.h:24
-
void stopRecording(const char *fileName, uint32_t sampleRate)
Definition: myRecording.h:123
diff --git a/SdAudioWavPlayer_8ino-example.html b/SdAudioWavPlayer_8ino-example.html index 33706ad..b0649ad 100644 --- a/SdAudioWavPlayer_8ino-example.html +++ b/SdAudioWavPlayer_8ino-example.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -70,11 +70,8 @@

For Arduino Due

- +

Wav Player SDAudio Example:

+

This example demonstrates a simple *.wav player with a few features

/*
AutoAnalogAudio streaming via DAC & ADC by TMRh20
Copyright (C) 2016 TMRh20 - tmrh20@gmail.com, github.com/TMRh20
@@ -144,13 +141,13 @@
char input = Serial.read();
switch (input) {
-
case '1': playAudio("M8b24kM.wav"); break; //Play a *.wav file by name - 8bit, 24khz, Mono
-
case '2': playAudio("M8b24kS.wav"); break; //Play 8bit, 24khz, Stereo
-
case '3': playAudio("M16b24kS.wav"); break; //Play 16bit, 24khz, Stereo
-
case '4': playAudio("M8b44kST.wav"); break; //Play 8bit, 44khz, Stereo
-
case '5': channelSelection = 0; break; //Play the audio on DAC0
-
case '6': channelSelection = 1; break; //Play the audio on DAC1
-
case '7': channelSelection = 2; break; //Play the audio on DAC0 & DAC1
+
case '1': playAudio("M8b24kM.wav"); break; //Play a *.wav file by name - 8bit, 24khz, Mono
+
case '2': playAudio("M8b24kS.wav"); break; //Play 8bit, 24khz, Stereo
+
case '3': playAudio("M16b24kS.wav"); break; //Play 16bit, 24khz, Stereo
+
case '4': playAudio("M8b44kST.wav"); break; //Play 8bit, 44khz, Stereo
+
case '5': channelSelection = 0; break; //Play the audio on DAC0
+
case '6': channelSelection = 1; break; //Play the audio on DAC1
+
case '7': channelSelection = 2; break; //Play the audio on DAC0 & DAC1
case '8': Serial.println("OK"); break;
}
}
@@ -160,15 +157,13 @@
-
uint8_t channelSelection
Definition: myWAV.h:2
-
void playAudio(const char *audioFile)
Definition: myWAV.h:24
void begin(bool enADC, bool enDAC)
diff --git a/SimpleAdcStream_8ino-example.html b/SimpleAdcStream_8ino-example.html index 8b96ef4..dfc74b5 100644 --- a/SimpleAdcStream_8ino-example.html +++ b/SimpleAdcStream_8ino-example.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -70,12 +70,9 @@

For Arduino Due

- +

Simple ADC capturing Example:

+

This example demonstrates how to capture a steady stream of ADC data

+

See AnalogAudio_config.h to change the MAX_BUFFER_SIZE allowing larger chunks

/*
AutoAnalogAudio streaming via DAC & ADC by TMRh20
Copyright (C) 2016 TMRh20 - tmrh20@gmail.com, github.com/TMRh20
@@ -176,7 +173,7 @@
diff --git a/SimpleSine12Bit_8ino-example.html b/SimpleSine12Bit_8ino-example.html index ade393a..ecb3d0e 100644 --- a/SimpleSine12Bit_8ino-example.html +++ b/SimpleSine12Bit_8ino-example.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -70,12 +70,9 @@

For Arduino Due

- +

Simple Sine Wave Generation Example:

+

This example demonstrates simple generation of a 12-bit sine wave

+

Send a number 1 or 2 over Serial to change frequency, +/- to adjust volume

/*
AutoAnalogAudio streaming via DAC & ADC by TMRh20
@@ -106,8 +103,8 @@
AutoAnalog aaAudio;
-
void DACC_Handler(void) {
-
aaAudio.dacHandler(); //Link the DAC ISR/IRQ to the library. Called by the MCU when DAC is ready for data
+
void DACC_Handler(void) {
+
aaAudio.dacHandler(); //Link the DAC ISR/IRQ to the library. Called by the MCU when DAC is ready for data
}
@@ -116,10 +113,10 @@
Serial.begin(115200);
Serial.println("Analog Audio Begin");
-
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
+
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
arraysetup(); //Load the DAC buffer using a 32-step sine wave
}
@@ -133,7 +130,7 @@
//AutoAdjust is disabled above, so this function will block until the DAC is ready for more data
//All other processing needs to be completed before the DAC is out of data
//In this example, the DAC is being fed data in chunks of 32 bytes or 32 8-bit samples
-
aaAudio.feedDAC(0, 32);
+
aaAudio.feedDAC(0, 32);
//Choose between two different frequencies via Serial command
//Adjust the volume by sending a '+' or '-' over Serial
@@ -155,7 +152,7 @@
//Load a 32-step sine wave into the dacBuffer
//Shift the values according to volume
void arraysetup(void) {
-
aaAudio.dacBuffer16[0] = 0x800 >> shiftVal;
+
aaAudio.dacBuffer16[0] = 0x800 >> shiftVal;
aaAudio.dacBuffer16[1] = 0x990 >> shiftVal;
aaAudio.dacBuffer16[2] = 0xB10 >> shiftVal;
aaAudio.dacBuffer16[3] = 0xC72 >> shiftVal;
@@ -227,7 +224,6 @@
aaAudio.dacBuffer16[31] = 0x4F0 >> shiftVal;
}
-
void DACC_Handler(void)
Definition: myWAV.h:10
void dacHandler(void)
uint8_t dacBitsPerSample
@@ -239,7 +235,7 @@
diff --git a/SimpleSine_2myRadio_8h.html b/SimpleSine_2myRadio_8h.html deleted file mode 100644 index e49564b..0000000 --- a/SimpleSine_2myRadio_8h.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/SimpleSine/myRadio.h File Reference - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
- -
-
myRadio.h File Reference
-
-
-
#include <RF24.h>
-
-

Go to the source code of this file.

- - - - - - - - -

-Functions

RF24 radio (46, 52)
 
void RX ()
 
void setupRadio ()
 
- - - - - - - - - - - -

-Variables

const uint64_t pipes [14] = {0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL}
 
bool tx
 
bool fail
 
bool rx
 
uint8_t pipeNo = 0
 
-

Function Documentation

- -

◆ radio()

- -
-
- - - - - - - - - - - - - - - - - - -
RF24 radio (46 ,
52  
)
-
- -
-
- -

◆ RX()

- -
-
- - - - - - - -
void RX ()
-
- -
-
- -

◆ setupRadio()

- -
-
- - - - - - - -
void setupRadio ()
-
- -

Definition at line 14 of file myRadio.h.

- -
-
-

Variable Documentation

- -

◆ pipes

- -
-
- - - - -
const uint64_t pipes[14] = {0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL}
-
- -

Definition at line 7 of file myRadio.h.

- -
-
- -

◆ tx

- -
-
- - - - -
bool tx
-
- -

Definition at line 9 of file myRadio.h.

- -
-
- -

◆ fail

- -
-
- - - - -
bool fail
-
- -

Definition at line 9 of file myRadio.h.

- -
-
- -

◆ rx

- -
-
- - - - -
bool rx
-
- -

Definition at line 9 of file myRadio.h.

- -
-
- -

◆ pipeNo

- -
-
- - - - -
uint8_t pipeNo = 0
-
- -

Definition at line 10 of file myRadio.h.

- -
-
-
- - - - diff --git a/SimpleSine_2myRadio_8h_source.html b/SimpleSine_2myRadio_8h_source.html deleted file mode 100644 index c480f79..0000000 --- a/SimpleSine_2myRadio_8h_source.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/SimpleSine/myRadio.h Source File - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
myRadio.h
-
-
-Go to the documentation of this file.
1 
-
2 
-
3 #include <RF24.h>
-
4 
-
5 RF24 radio(46, 52);
-
6 
-
7 const uint64_t pipes[14] = {0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL};
-
8 
-
9 bool tx, fail, rx;
-
10 uint8_t pipeNo = 0;
-
11 
-
12 void RX();
-
13 
-
14 void setupRadio() {
-
15 
-
16  radio.begin();
-
17  radio.setChannel(1);
-
18  radio.setPALevel(RF24_PA_MAX);
-
19  radio.setDataRate(RF24_1MBPS);
-
20  radio.setAutoAck(0);
-
21  radio.setCRCLength(RF24_CRC_8);
-
22  radio.setAddressWidth(5);
-
23  radio.openReadingPipe(1, pipes[1]);
-
24  radio.openReadingPipe(2, pipes[2]);
-
25  radio.setAutoAck(2, 1);
-
26  radio.openWritingPipe(pipes[0]);
-
27  radio.txDelay = 0;
-
28  radio.csDelay = 0;
-
29  radio.maskIRQ(0, 1, 0);
-
30  radio.printDetails();
-
31 
-
32  //radio.startListening();
-
33  radio.stopListening();
-
34  //attachInterrupt(digitalPinToInterrupt(4), RX, FALLING);
-
35 
-
36 }
-
37 
-
38 
-
39 
-
40 
-
bool fail
Definition: myRadio.h:9
-
bool tx
Definition: myRadio.h:9
-
uint8_t pipeNo
Definition: myRadio.h:10
-
RF24 radio(radioCEPin, radioCSPin)
-
const uint64_t pipes[14]
Definition: myRadio.h:7
-
void RX()
-
void setupRadio()
Definition: myRadio.h:14
-
bool rx
Definition: myRadio.h:9
-
- - - - diff --git a/SimpleSine_8ino-example.html b/SimpleSine_8ino-example.html index 7c32736..a9714d7 100644 --- a/SimpleSine_8ino-example.html +++ b/SimpleSine_8ino-example.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -70,12 +70,9 @@

For Arduino Due

- +

Simple Sine Wave Generation Example:

+

This example demonstrates simple generation of a sine wave & optionally broadcasting the audio via radio

+

Send a number 1 or 2 over Serial to change frequency, +/- to adjust volume

Note
This code depends on radio.h located in the same directory.
/*
@@ -109,8 +106,8 @@
AutoAnalog aaAudio;
-
void DACC_Handler(void) {
-
aaAudio.dacHandler(); //Link the DAC ISR/IRQ to the library. Called by the MCU when DAC is ready for data
+
void DACC_Handler(void) {
+
aaAudio.dacHandler(); //Link the DAC ISR/IRQ to the library. Called by the MCU when DAC is ready for data
}
@@ -122,9 +119,9 @@
//Optional: Setup the radio to broadcast the generated audio
//setupRadio();
-
aaAudio.begin(0, 1); //Setup aaAudio using DAC
-
aaAudio.autoAdjust = 0; //Disable automatic timer adjustment
-
aaAudio.setSampleRate(16050); //Set the sample rate to 16khz
+
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
}
@@ -139,7 +136,7 @@
//AutoAdjust is disabled above, so this function will block until the DAC is ready for more data
//All other processing needs to be completed before the DAC is out of data
//In this example, the DAC is being fed data in chunks of 32 bytes or 32 8-bit samples
-
aaAudio.feedDAC(0, 32);
+
aaAudio.feedDAC(0, 32);
//Optional: Broadcast the audio over radio
//radio.startFastWrite(&aaAudio.dacBuffer,32, 1);
@@ -165,7 +162,7 @@
//Load a 32-step sine wave into the dacBuffer
//Shift the values according to volume
void arraysetup(void) {
-
aaAudio.dacBuffer[0] = 127 >> shiftVal;
+
aaAudio.dacBuffer[0] = 127 >> shiftVal;
aaAudio.dacBuffer[1] = 152 >> shiftVal;
aaAudio.dacBuffer[2] = 176 >> shiftVal;
aaAudio.dacBuffer[3] = 198 >> shiftVal;
@@ -236,7 +233,6 @@
aaAudio.dacBuffer[31] = 79 >> shiftVal;
}
-
void DACC_Handler(void)
Definition: myWAV.h:10
void dacHandler(void)
@@ -247,7 +243,7 @@
diff --git a/WirelessMicrophone_2myRadio_8h.html b/WirelessMicrophone_2myRadio_8h.html deleted file mode 100644 index e7df260..0000000 --- a/WirelessMicrophone_2myRadio_8h.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/WirelessMicrophone/myRadio.h File Reference - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
- -
-
myRadio.h File Reference
-
-
-
#include <RF24.h>
-
-

Go to the source code of this file.

- - - - - - - - -

-Functions

RF24 radio (46, 52)
 
void RX ()
 
void setupRadio ()
 
- - - - - - - - - - - -

-Variables

const uint64_t pipes [14] = {0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL}
 
bool tx
 
bool fail
 
bool rx
 
uint8_t pipeNo = 0
 
-

Function Documentation

- -

◆ radio()

- -
-
- - - - - - - - - - - - - - - - - - -
RF24 radio (46 ,
52  
)
-
- -
-
- -

◆ RX()

- -
-
- - - - - - - -
void RX ()
-
- -
-
- -

◆ setupRadio()

- -
-
- - - - - - - -
void setupRadio ()
-
- -

Definition at line 14 of file myRadio.h.

- -
-
-

Variable Documentation

- -

◆ pipes

- -
-
- - - - -
const uint64_t pipes[14] = {0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL}
-
- -

Definition at line 7 of file myRadio.h.

- -
-
- -

◆ tx

- -
-
- - - - -
bool tx
-
- -

Definition at line 9 of file myRadio.h.

- -
-
- -

◆ fail

- -
-
- - - - -
bool fail
-
- -

Definition at line 9 of file myRadio.h.

- -
-
- -

◆ rx

- -
-
- - - - -
bool rx
-
- -

Definition at line 9 of file myRadio.h.

- -
-
- -

◆ pipeNo

- -
-
- - - - -
uint8_t pipeNo = 0
-
- -

Definition at line 10 of file myRadio.h.

- -
-
-
- - - - diff --git a/WirelessMicrophone_2myRadio_8h_source.html b/WirelessMicrophone_2myRadio_8h_source.html deleted file mode 100644 index 3336f9f..0000000 --- a/WirelessMicrophone_2myRadio_8h_source.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/WirelessMicrophone/myRadio.h Source File - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
myRadio.h
-
-
-Go to the documentation of this file.
1 
-
2 
-
3 #include <RF24.h>
-
4 
-
5 RF24 radio(46, 52);
-
6 
-
7 const uint64_t pipes[14] = {0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL};
-
8 
-
9 bool tx, fail, rx;
-
10 uint8_t pipeNo = 0;
-
11 
-
12 void RX();
-
13 
-
14 void setupRadio() {
-
15 
-
16  radio.begin();
-
17  radio.setChannel(1);
-
18  radio.setPALevel(RF24_PA_LOW);
-
19  radio.setDataRate(RF24_1MBPS);
-
20  radio.setAutoAck(0);
-
21  radio.setCRCLength(RF24_CRC_8);
-
22  radio.setAddressWidth(5);
-
23  radio.openReadingPipe(1, pipes[1]);
-
24  radio.openReadingPipe(2, pipes[2]);
-
25  radio.setAutoAck(2, 1);
-
26  radio.openWritingPipe(pipes[0]);
-
27  radio.txDelay = 0;
-
28  radio.csDelay = 0;
-
29  radio.maskIRQ(0, 1, 0);
-
30  radio.printDetails();
-
31 
-
32  radio.startListening();
-
33  radio.stopListening();
-
34  //attachInterrupt(digitalPinToInterrupt(4), RX, FALLING);
-
35 
-
36 }
-
37 
-
38 
-
39 
-
40 
-
bool fail
Definition: myRadio.h:9
-
bool tx
Definition: myRadio.h:9
-
uint8_t pipeNo
Definition: myRadio.h:10
-
RF24 radio(radioCEPin, radioCSPin)
-
const uint64_t pipes[14]
Definition: myRadio.h:7
-
void RX()
-
void setupRadio()
Definition: myRadio.h:14
-
bool rx
Definition: myRadio.h:9
-
- - - - diff --git a/WirelessMicrophone_8ino-example.html b/WirelessMicrophone_8ino-example.html index a3a394a..4636939 100644 --- a/WirelessMicrophone_8ino-example.html +++ b/WirelessMicrophone_8ino-example.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -70,13 +70,10 @@

For Arduino Due

-
Note
This code depends on radio.h located in the same directory.
/*
AutoAnalogAudio streaming via DAC & ADC by TMRh20
@@ -130,8 +127,8 @@
/*********************************************************/
-
void DACC_Handler(void) {
-
aaAudio.dacHandler(); //Link the DAC ISR/IRQ library. Called by the MCU when DAC is ready for data
+
void DACC_Handler(void) {
+
aaAudio.dacHandler(); //Link the DAC ISR/IRQ library. Called by the MCU when DAC is ready for data
}
/*********************************************************/
@@ -141,17 +138,17 @@
Serial.begin(115200);
Serial.println("Analog Audio Begin");
-
aaAudio.begin(1, 0); //Setup aaAudio using ADC only
-
aaAudio.autoAdjust = 0;
-
aaAudio.adcBitsPerSample = 8;
-
aaAudio.setSampleRate(16050);
- +
aaAudio.begin(1, 0); //Setup aaAudio using ADC only
+
aaAudio.autoAdjust = 0;
+
aaAudio.adcBitsPerSample = 8;
+
aaAudio.setSampleRate(16050);
+
setupRadio();
}
/*********************************************************/
uint32_t dispTimer = 0;
-
uint8_t channelSelection = 0;
+
uint8_t channelSelection = 0;
void loop() {
@@ -169,17 +166,13 @@
}
// With autoAdjust disabled, getADC() will block until the ADC data is ready
-
aaAudio.getADC(32);
-
radio.writeFast(&aaAudio.adcBuffer, 32);
+
aaAudio.getADC(32);
+
radio.writeFast(&aaAudio.adcBuffer, 32);
}
/*********************************************************/
-
RF24 radio(radioCEPin, radioCSPin)
-
void setupRadio()
Definition: myRadio.h:14
-
void DACC_Handler(void)
Definition: myWAV.h:10
-
uint8_t channelSelection
Definition: myWAV.h:2
void dacHandler(void)
uint8_t adcBuffer[MAX_BUFFER_SIZE]
@@ -191,7 +184,7 @@
diff --git a/WirelessSpeaker_2myRadio_8h.html b/WirelessSpeaker_2myRadio_8h.html deleted file mode 100644 index 34727bf..0000000 --- a/WirelessSpeaker_2myRadio_8h.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/WirelessSpeaker/myRadio.h File Reference - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
- -
-
myRadio.h File Reference
-
-
-
#include <RF24.h>
-
-

Go to the source code of this file.

- - - - - - - - -

-Functions

RF24 radio (46, 52)
 
void RX ()
 
void setupRadio ()
 
- - - - - - - - - - - -

-Variables

const uint64_t pipes [14] = {0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL}
 
bool tx
 
bool fail
 
bool rx
 
uint8_t pipeNo = 0
 
-

Function Documentation

- -

◆ radio()

- -
-
- - - - - - - - - - - - - - - - - - -
RF24 radio (46 ,
52  
)
-
- -
-
- -

◆ RX()

- -
-
- - - - - - - -
void RX ()
-
- -
-
- -

◆ setupRadio()

- -
-
- - - - - - - -
void setupRadio ()
-
- -

Definition at line 14 of file myRadio.h.

- -
-
-

Variable Documentation

- -

◆ pipes

- -
-
- - - - -
const uint64_t pipes[14] = {0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL}
-
- -

Definition at line 7 of file myRadio.h.

- -
-
- -

◆ tx

- -
-
- - - - -
bool tx
-
- -

Definition at line 9 of file myRadio.h.

- -
-
- -

◆ fail

- -
-
- - - - -
bool fail
-
- -

Definition at line 9 of file myRadio.h.

- -
-
- -

◆ rx

- -
-
- - - - -
bool rx
-
- -

Definition at line 9 of file myRadio.h.

- -
-
- -

◆ pipeNo

- -
-
- - - - -
uint8_t pipeNo = 0
-
- -

Definition at line 10 of file myRadio.h.

- -
-
-
- - - - diff --git a/WirelessSpeaker_2myRadio_8h_source.html b/WirelessSpeaker_2myRadio_8h_source.html deleted file mode 100644 index a07f984..0000000 --- a/WirelessSpeaker_2myRadio_8h_source.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/WirelessSpeaker/myRadio.h Source File - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
myRadio.h
-
-
-Go to the documentation of this file.
1 
-
2 
-
3 #include <RF24.h>
-
4 
-
5 RF24 radio(46, 52);
-
6 
-
7 const uint64_t pipes[14] = {0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL};
-
8 
-
9 bool tx, fail, rx;
-
10 uint8_t pipeNo = 0;
-
11 
-
12 void RX();
-
13 
-
14 void setupRadio() {
-
15 
-
16  radio.begin();
-
17  radio.setChannel(1);
-
18  radio.setPALevel(RF24_PA_LOW);
-
19  radio.setDataRate(RF24_1MBPS);
-
20  radio.setAutoAck(0);
-
21  radio.setCRCLength(RF24_CRC_8);
-
22  radio.setAddressWidth(5);
-
23  radio.openReadingPipe(1, pipes[1]);
-
24  radio.openReadingPipe(2, pipes[2]);
-
25  radio.setAutoAck(2, 1);
-
26  radio.openWritingPipe(pipes[0]);
-
27  radio.txDelay = 0;
-
28  radio.csDelay = 0;
-
29  radio.maskIRQ(0, 1, 0);
-
30  radio.printDetails();
-
31 
-
32  radio.startListening();
-
33 
-
34  attachInterrupt(digitalPinToInterrupt(4), RX, FALLING);
-
35 
-
36 }
-
37 
-
38 
-
39 
-
40 
-
bool fail
Definition: myRadio.h:9
-
bool tx
Definition: myRadio.h:9
-
uint8_t pipeNo
Definition: myRadio.h:10
-
RF24 radio(radioCEPin, radioCSPin)
-
const uint64_t pipes[14]
Definition: myRadio.h:7
-
void RX()
-
void setupRadio()
Definition: myRadio.h:14
-
bool rx
Definition: myRadio.h:9
-
- - - - diff --git a/WirelessSpeaker_8ino-example.html b/WirelessSpeaker_8ino-example.html index 8214863..4d769ef 100644 --- a/WirelessSpeaker_8ino-example.html +++ b/WirelessSpeaker_8ino-example.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -70,13 +70,10 @@

For Arduino Due

-
Note
This code depends on radio.h located in the same directory.
/*
AutoAnalogAudio streaming via DAC & ADC by TMRh20
@@ -129,8 +126,8 @@
/*********************************************************/
-
void DACC_Handler(void) {
-
aaAudio.dacHandler(); //Link the DAC ISR/IRQ library. Called by the MCU when DAC is ready for data
+
void DACC_Handler(void) {
+
aaAudio.dacHandler(); //Link the DAC ISR/IRQ library. Called by the MCU when DAC is ready for data
}
/*********************************************************/
@@ -140,16 +137,16 @@
Serial.begin(115200);
Serial.println("Analog Audio Begin");
-
aaAudio.begin(0, 1); //Setup aaAudio using both DAC and ADC
-
aaAudio.autoAdjust = 1;
-
aaAudio.dacBitsPerSample = 12;
- +
aaAudio.begin(0, 1); //Setup aaAudio using both DAC and ADC
+
aaAudio.autoAdjust = 1;
+
aaAudio.dacBitsPerSample = 12;
+
setupRadio();
}
/*********************************************************/
uint32_t dispTimer = 0;
-
uint8_t channelSelection = 0;
+
uint8_t channelSelection = 0;
void loop() {
@@ -171,9 +168,9 @@
if (Serial.available()) {
char dat = Serial.read();
switch (dat) {
-
case '0': channelSelection = 0; break; // Use DAC0 for output
-
case '1': channelSelection = 1; break; // Use DAC1 for output
-
case '2': channelSelection = 2; break; // Use both DAC0 and DAC1
+
case '0': channelSelection = 0; break; // Use DAC0 for output
+
case '1': channelSelection = 1; break; // Use DAC1 for output
+
case '2': channelSelection = 2; break; // Use both DAC0 and DAC1
}
}
@@ -184,16 +181,16 @@
uint32_t dynSampleRate = 0;
// See myRadio.h: Function is attached to an interrupt triggered by radio RX/TX
-
void RX() {
+
void RX() {
-
while (radio.available(&pipeNo)) { // Check for data and get the pipe number
+
while (radio.available(&pipeNo)) { // Check for data and get the pipe number
-
if (pipeNo == 2) {
-
radio.read(&dynSampleRate, 4); // Receive commands using pipe #2
-
aaAudio.setSampleRate(dynSampleRate); // Pipe 2 is being used for command data, pipe 1 & others for audio data
+
if (pipeNo == 2) {
+
radio.read(&dynSampleRate, 4); // Receive commands using pipe #2
+
aaAudio.setSampleRate(dynSampleRate); // Pipe 2 is being used for command data, pipe 1 & others for audio data
} else {
-
radio.read(&aaAudio.dacBuffer16, 32); // Read the available radio data
+
radio.read(&aaAudio.dacBuffer16, 32); // Read the available radio data
for (int i = 0; i < 16; i++) { //Convert signed 16-bit variables into unsigned 12-bit
aaAudio.dacBuffer16[i] += 0x8000;
@@ -202,20 +199,14 @@
//Received 32 bytes: 16 samples of 16-bits each
//Send them to the DAC using the channel selected via Serial command
-
aaAudio.feedDAC(channelSelection, 16);
+
aaAudio.feedDAC(channelSelection, 16);
}
}
}
/*********************************************************/
-
uint8_t pipeNo
Definition: myRadio.h:10
-
RF24 radio(radioCEPin, radioCSPin)
-
void RX()
-
void setupRadio()
Definition: myRadio.h:14
-
void DACC_Handler(void)
Definition: myWAV.h:10
-
uint8_t channelSelection
Definition: myWAV.h:2
void dacHandler(void)
uint8_t dacBitsPerSample
@@ -227,7 +218,7 @@
diff --git a/annotated.html b/annotated.html index e272060..50c5b33 100644 --- a/annotated.html +++ b/annotated.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -71,13 +71,12 @@
Here are the classes, structs, unions and interfaces with brief descriptions:
-
 CAutoAnalog
 CwavStruct
diff --git a/avr_2AutoAnalogAudio_8cpp.html b/avr_2AutoAnalogAudio_8cpp.html deleted file mode 100644 index 3964283..0000000 --- a/avr_2AutoAnalogAudio_8cpp.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -Auto Analog Audio: src/avr/AutoAnalogAudio.cpp File Reference - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
AutoAnalogAudio.cpp File Reference
-
-
- -

Go to the source code of this file.

-
- - - - diff --git a/avr_2AutoAnalogAudio_8cpp_source.html b/avr_2AutoAnalogAudio_8cpp_source.html deleted file mode 100644 index a72936c..0000000 --- a/avr_2AutoAnalogAudio_8cpp_source.html +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - - -Auto Analog Audio: src/avr/AutoAnalogAudio.cpp Source File - - - - - - - - - - -
-
- - - - - - -
-
Auto Analog Audio -  1.42 -
-
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
-
-
- - - - - - - - -
-
- - -
- -
- - -
-
-
-
AutoAnalogAudio.cpp
-
-
-Go to the documentation of this file.
1  /*
-
2  AutoAnalogAudio streaming via DAC & ADC by TMRh20
-
3  Copyright (C) 2016 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
-
7  the Free Software Foundation, either version 3 of the License, or
-
8  (at your option) any later version.
-
9 
-
10  This program is distributed in the hope that it will be useful,
-
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
-
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-
13  GNU General Public License for more details.
-
14 
-
15  You should have received a copy of the GNU General Public License
-
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
-
17  */
-
18 
-
19 /****************************************************************************/
-
20 #if defined (ARDUINO_ARCH_AVR)
-
21 
-
22 #include "../AutoAnalogAudio.h"
-
23 
-
24 //#include "AutoDAC.h"
-
25 //#include "AudoADC.h"
-
26 //#include "AutoTimer.h"
-
27 
-
28 #if !defined (ARDUINO_ARCH_SAM)
-
29  volatile uint32_t dacNumSamples = 0; /* Internal variable for number of samples sent to the DAC */
-
30  volatile uint32_t adcNumSamples = 0;
-
31  uint16_t adjustCtr = 0; /* Internal variables for adjusting timers on-the-fly */
-
32  uint16_t adjustCtr2 = 0; /* Internal variables for adjusting timers on-the-fly */
-
33  uint32_t adcLastAdjust = 0;
-
34  volatile uint16_t adcSampleCounter = 0;
-
35  volatile uint16_t dacSampleCounter = 0;
-
36  uint8_t aCtr = 0; /* Internal counter for ADC data */
-
37  uint16_t realBuf[MAX_BUFFER_SIZE]; /* Internal DAC buffer */
-
38  uint16_t adcDma[MAX_BUFFER_SIZE]; /* Buffers for ADC DMA transfers */
-
39  uint16_t dataReady; /* Internal indicator for DAC data */
-
40  uint16_t sampleCount = 0; /* Internal counter for delaying analysis of timing */
-
41  uint16_t tcTicks = 1000; /* Stores the current TC0 Ch0 counter value */
-
42  uint16_t tcTicks2; /* Stores the current TC0 Ch1 counter value */
-
43  bool dacChan = 0;
-
44  uint8_t defaultShift = 0;
-
45 #endif //ARDUINO_ARCH_SAM
-
46 
-
47 /****************************************************************************/
-
48 /* Public Functions */
-
49 /****************************************************************************/
-
50 
- -
52 
-
53  for(int i=0; i<MAX_BUFFER_SIZE; i++){
-
54  realBuf[i] = 0;
-
55  }
-
56  adcBitsPerSample = 8;
-
57  dacBitsPerSample = 8;
-
58  autoAdjust = true;
-
59  adcSampleCounter = 0;
-
60 }
-
61 
-
62 void AutoAnalog::begin(bool enADC, bool enDAC){
-
63 
-
64  if(enADC){
-
65  analogRead(A0);
-
66  adcSetup();
-
67  }
-
68  if(enDAC){
-
69  dacSetup();
-
70  }
-
71  tcSetup(DEFAULT_FREQUENCY);
-
72 }
-
73 
-
74 /****************************************************************************/
-
75 
-
76 void AutoAnalog::setSampleRate(uint32_t sampRate, bool stereo = true){
-
77 
-
78 
-
79  if(sampRate > 0){
-
80  tcTicks = max(5, frequencyToTimerCount(sampRate));
-
81  //sampleCount = 0;
-
82  ICR1 = tcTicks;
-
83  OCR1A = tcTicks/2;
-
84  OCR1B = tcTicks/2;
-
85 
-
86  //Based on the frequency chosen, figure out how many bits of precision are being used for the timer PWM
-
87  //Allows to shift 8-bit samples when the timer is running at >=10-bit pwm
-
88  uint16_t ticks = tcTicks;
-
89  uint8_t ctr = 0;
-
90 
-
91  while(ticks){
-
92  ticks >>= 1;
-
93  ctr++;
-
94  }
-
95  if(ctr >= 10){
-
96  defaultShift = ctr - 10;
-
97  }else{
-
98  defaultShift = 0;
-
99  }
-
100  }
-
101 
-
102 }
-
103 
-
104 /****************************************************************************/
-
105 void AutoAnalog::triggerADC(){}
-
106 /****************************************************************************/
-
107 
-
108 void AutoAnalog::enableAdcChannel(uint8_t pinAx){
-
109 
-
110  analogRead(pinAx);
-
111  adcSetup();
-
112 }
-
113 
-
114 /****************************************************************************/
-
115 
-
116 void AutoAnalog::disableAdcChannel(uint8_t pinAx){
-
117 
-
118  ADCSRA &= ~(_BV(ADIE));
-
119 }
-
120 
-
121 /****************************************************************************/
-
122 
-
123 void AutoAnalog::getADC(uint32_t samples){
-
124 
-
125  while(adcSampleCounter < adcNumSamples && !autoAdjust){}
-
126 
-
127  if(adcBitsPerSample == 8){
-
128  for(uint16_t i=0; i<adcNumSamples; i++){
-
129  adcBuffer[i] = adcDma[i];
-
130  }
-
131  }else{
-
132  memcpy(&adcBuffer16,&adcDma,adcNumSamples);
-
133  }
-
134 
-
135  noInterrupts();
-
136  adcSampleCounter = 0;
-
137  adcNumSamples = samples;
-
138  interrupts();
-
139 
-
140 }
-
141 
-
142 /****************************************************************************/
-
143 
-
144 void AutoAnalog::feedDAC(uint8_t dacChannel, uint32_t samples, bool startInterrupts){
-
145 
-
146  while(dacSampleCounter < dacNumSamples && !autoAdjust){}
-
147 
-
148  if(dacBitsPerSample == 8){
-
149  for(uint16_t i=0; i<samples; i++){
-
150  realBuf[i] = dacBuffer[i] << (defaultShift+2);
-
151  }
-
152  }else{
-
153  for(uint16_t i=0; i<samples; i++){
-
154  realBuf[i] = dacBuffer16[i] << defaultShift;
-
155  }
-
156  }
-
157 
-
158  noInterrupts();
-
159  dacChan = dacChannel;
-
160  dacSampleCounter = 0;
-
161  dacNumSamples = samples;
-
162  interrupts();
-
163 
-
164 
-
165 }
-
166 
-
167 /****************************************************************************/
-
168 /* Private Functions */
-
169 /****************************************************************************/
-
170 
-
171 uint32_t AutoAnalog::frequencyToTimerCount(uint32_t frequency){
-
172 
-
173  if(frequency < 5){
-
174  TCCR1B &= ~(_BV(CS11)) | ~(_BV(CS10));
-
175  TCCR1B |= _BV(CS12);
-
176  return F_CPU / 256UL / frequency;
-
177  }else
-
178  if(frequency < 35){
-
179  TCCR1B |= _BV(CS11) | _BV(CS10); //Prescaler F_CPU/64
-
180  return F_CPU / 64UL / frequency;
-
181  }else
-
182  if(frequency < 250){
-
183  TCCR1B |= _BV(CS11); //Prescaler F_CPU/8
-
184  TCCR1B &= ~(_BV(CS10));
-
185  return F_CPU / 8UL / frequency;
-
186  }else
-
187 
-
188  {
-
189  TCCR1B &= ~(_BV(CS11)); //Prescaler F_CPU
-
190  TCCR1B |= _BV(CS10);
-
191  return F_CPU / frequency;
-
192  }
-
193 
-
194 }
-
195 
-
196 /****************************************************************************/
-
197 
-
198 ISR(ADC_vect){
-
199 
-
200  if(adcSampleCounter < adcNumSamples){
-
201  adcDma[adcSampleCounter] = ADCH;
-
202  ++adcSampleCounter;
-
203  }
-
204 }
-
205 
-
206 /****************************************************************************/
-
207 extern void DACC_Handler();
-
208 /****************************************************************************/
-
209 
-
210 ISR(TIMER1_OVF_vect){
-
211 
-
212  DACC_Handler();
-
213 
-
214  if(dacSampleCounter < dacNumSamples){
-
215  if(dacChan == 2){
-
216  OCR1A = OCR1B = realBuf[dacSampleCounter];
-
217  }else
-
218  if(dacChan){
-
219  OCR1B = realBuf[dacSampleCounter];
-
220  }else{
-
221  OCR1A = realBuf[dacSampleCounter];
-
222  }
-
223  ++dacSampleCounter;
-
224  }
-
225 
-
226 }
-
227 
-
228 /****************************************************************************/
-
229 
-
230 void AutoAnalog::adcSetup(void){
-
231 
-
232  ADCSRA = _BV(ADEN) | _BV(ADATE) | _BV(ADPS2) ; // En ADC, En Auto Trigger, Prescaler 8 (16Mhz/13/8 = ~150Khz)
-
233  ADCSRB = _BV(ADTS2) | _BV(ADTS1);
-
234  ADMUX |= _BV(ADLAR); //Left adjust result for 8-bit
-
235 
-
236  TIMSK1 |= _BV(TOIE1);
-
237  ADCSRA |= _BV(ADIE);
-
238 }
-
239 
-
240 /****************************************************************************/
-
241 
-
242 void AutoAnalog::adcInterrupts(bool enabled){
-
243 
-
244  if(enabled){
-
245  ADCSRA |= _BV(ADIE);
-
246  }else{
-
247  ADCSRA &= ~(_BV(ADIE));
-
248  }
-
249 }
-
250 
-
251 /****************************************************************************/
-
252 
-
253 void AutoAnalog::dacSetup(void){
-
254 
-
255  pinMode(DAC0_PIN,OUTPUT);
-
256  pinMode(DAC1_PIN,OUTPUT);
-
257  TIMSK1 |= _BV(TOIE1);
-
258 }
-
259 
-
260 /****************************************************************************/
-
261 
-
262 void AutoAnalog::disableDAC(bool withinTask){ TIMSK1 |= _BV(TOIE1); }
-
263 
-
264 /****************************************************************************/
-
265 
-
266 void AutoAnalog::dacHandler(void){}
-
267 
-
268 /****************************************************************************/
-
269 
-
270 void AutoAnalog::tcSetup (uint32_t sampRate){
-
271 
-
272  TCCR1A = _BV(WGM11) | _BV(COM1A1) | _BV(COM1B0) | _BV(COM1B1); // Set WGM mode, opposite action for output mode
-
273  TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // Set WGM mode & no prescaling
-
274 
-
275  ICR1 = 1000; // Default 16Khz with 16Mhz CPU
-
276  OCR1A = 250; // Default 25%/75% duty cycle
-
277 
-
278 }
-
279 
-
280 /****************************************************************************/
-
281 
-
282 void AutoAnalog::tc2Setup (uint32_t sampRate){}
-
283 
-
284 /****************************************************************************/
-
285 
-
286 
-
287 
-
288 #endif //#if !defined (ARDUINO_ARCH_SAM)
-
#define DEFAULT_FREQUENCY
-
#define DAC0_PIN
-
#define DAC1_PIN
-
#define MAX_BUFFER_SIZE
-
void DACC_Handler(void)
Definition: myWAV.h:10
-
void adcInterrupts(bool enabled=true)
-
void dacHandler(void)
-
uint8_t dacBitsPerSample
-
uint8_t adcBuffer[MAX_BUFFER_SIZE]
- - -
uint8_t dacBuffer[MAX_BUFFER_SIZE]
-
void getADC(uint32_t samples=MAX_BUFFER_SIZE)
-
uint16_t adcBuffer16[MAX_BUFFER_SIZE]
-
void disableDAC(bool withinTask=false)
-
uint16_t dacBuffer16[MAX_BUFFER_SIZE]
-
void setSampleRate(uint32_t sampRate=0, bool stereo=true)
-
void enableAdcChannel(uint8_t pinAx)
-
void feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)
-
uint8_t adcBitsPerSample
-
void triggerADC()
-
void begin(bool enADC, bool enDAC)
-
void disableAdcChannel(uint8_t pinAx)
-
- - - - diff --git a/classAutoAnalog-members.html b/classAutoAnalog-members.html index 1f94630..1bdd586 100644 --- a/classAutoAnalog-members.html +++ b/classAutoAnalog-members.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -83,17 +83,20 @@ dacBuffer16AutoAnalog dacHandler(void)AutoAnalog dacInterrupts(bool enabled=true, bool withinTask=false)AutoAnalog - disableAdcChannel(uint8_t pinAx)AutoAnalog - disableDAC(bool withinTask=false)AutoAnalog - enableAdcChannel(uint8_t pinAx)AutoAnalog - feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)AutoAnalog - getADC(uint32_t samples=MAX_BUFFER_SIZE)AutoAnalog - setSampleRate(uint32_t sampRate=0, bool stereo=true)AutoAnalog - triggerADC()AutoAnalog + dacTaskHandleAutoAnalog + disableAdcChannel(uint8_t pinAx)AutoAnalog + disableDAC(bool withinTask=false)AutoAnalog + enableAdcChannel(uint8_t pinAx)AutoAnalog + feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)AutoAnalog + getADC(uint32_t samples=MAX_BUFFER_SIZE)AutoAnalog + rampIn(uint8_t sample)AutoAnalog + rampOut(uint8_t sample)AutoAnalog + setSampleRate(uint32_t sampRate=0, bool stereo=true)AutoAnalog + triggerADC()AutoAnalog diff --git a/classAutoAnalog.html b/classAutoAnalog.html index f11370d..6b55bde 100644 --- a/classAutoAnalog.html +++ b/classAutoAnalog.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -76,13 +76,13 @@

User Interface

Main methods to drive the library

-uint8_t dacBuffer [MAX_BUFFER_SIZE] +uint8_t dacBuffer [MAX_BUFFER_SIZE]   -uint8_t adcBuffer [MAX_BUFFER_SIZE] +uint8_t adcBuffer [MAX_BUFFER_SIZE]   -uint16_t dacBuffer16 [MAX_BUFFER_SIZE] +uint16_t dacBuffer16 [MAX_BUFFER_SIZE]   -uint16_t adcBuffer16 [MAX_BUFFER_SIZE] +uint16_t adcBuffer16 [MAX_BUFFER_SIZE]   bool autoAdjust   @@ -90,15 +90,17 @@   uint8_t dacBitsPerSample   +TaskHandle_t dacTaskHandle +   AutoAnalog ()   void begin (bool enADC, bool enDAC)   void triggerADC ()   -void getADC (uint32_t samples=MAX_BUFFER_SIZE) +void getADC (uint32_t samples=MAX_BUFFER_SIZE)   -void feedDAC (uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false) +void feedDAC (uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)   void setSampleRate (uint32_t sampRate=0, bool stereo=true)   @@ -114,6 +116,10 @@   void dacInterrupts (bool enabled=true, bool withinTask=false)   +void rampOut (uint8_t sample) +  +void rampIn (uint8_t sample) + 

Detailed Description

Examples
AudioRadioRelay.ino, MultiChannelAdcStream.ino, SdAudioAuto.ino, SdAudioBasic.ino, SdAudioRecording.ino, SdAudioWavPlayer.ino, SimpleAdcStream.ino, SimpleSine.ino, SimpleSine12Bit.ino, WirelessMicrophone.ino, and WirelessSpeaker.ino.
@@ -165,7 +171,7 @@

Setup the timer(s)

-
Examples
AudioRadioRelay.ino, MultiChannelAdcStream.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.

@@ -198,7 +204,7 @@

void AutoAnalog::getADC ( uint32_t  - samples = MAX_BUFFER_SIZE) + samples = MAX_BUFFER_SIZE) @@ -211,7 +217,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, SimpleAdcStream.ino, and WirelessMicrophone.ino.
+
Examples
AudioRadioRelay.ino, MultiChannelAdcStream.ino, SimpleAdcStream.ino, and WirelessMicrophone.ino.
@@ -232,7 +238,7 @@

uint32_t  - samples = MAX_BUFFER_SIZE, + samples = MAX_BUFFER_SIZE, @@ -256,7 +262,7 @@

Examples
AudioRadioRelay.ino, SdAudioAuto.ino, SdAudioBasic.ino, SimpleSine.ino, SimpleSine12Bit.ino, and WirelessSpeaker.ino.
+
Examples
AudioRadioRelay.ino, SdAudioAuto.ino, SdAudioBasic.ino, SimpleSine.ino, SimpleSine12Bit.ino, and WirelessSpeaker.ino.
@@ -286,14 +292,14 @@

-

Set sample rate. 0 enables the default rate specified in AutoAnalog_config.h

Parameters
+

Set sample rate. 0 enables the default rate specified in AutoAnalog_config.h

Parameters
sampRateThis sets the defined sample rate ie: 32000 is 32Khz
stereoOnly used for the ESP32, this sets stereo or mono output and affects the sample rate
-
Examples
AudioRadioRelay.ino, MultiChannelAdcStream.ino, SdAudioAuto.ino, SdAudioBasic.ino, SimpleAdcStream.ino, SimpleSine.ino, SimpleSine12Bit.ino, WirelessMicrophone.ino, and WirelessSpeaker.ino.
+
Examples
AudioRadioRelay.ino, MultiChannelAdcStream.ino, SdAudioAuto.ino, SdAudioBasic.ino, SimpleAdcStream.ino, SimpleSine.ino, SimpleSine12Bit.ino, WirelessMicrophone.ino, and WirelessSpeaker.ino.
@@ -314,7 +320,7 @@

Function called by DAC IRQ

-
Examples
AudioRadioRelay.ino, SdAudioAuto.ino, SdAudioBasic.ino, SimpleSine.ino, SimpleSine12Bit.ino, WirelessMicrophone.ino, and WirelessSpeaker.ino.
+
Examples
AudioRadioRelay.ino, SdAudioAuto.ino, SdAudioBasic.ino, SimpleSine.ino, SimpleSine12Bit.ino, WirelessMicrophone.ino, and WirelessSpeaker.ino.
@@ -382,7 +388,7 @@

Examples
SdAudioAuto.ino.
+
Examples
SdAudioAuto.ino.
@@ -403,10 +409,9 @@

En/Disable the interrupt for the ADC

-

If enabled, the following function needs to be added:

+

If enabled, the following function needs to be added:

void ADC_Handler(void){
-code here-
}
-
void ADC_Handler(void)
Definition: myRecording.h:27
@@ -436,6 +441,48 @@

+ + + +

◆ rampOut()

+ +
+
+ + + + + + + + +
void AutoAnalog::rampOut (uint8_t sample)
+
+

Rampout and RampIn functions ramp the signal in/out to minimize 'pop' sound made when en/disabling the DAC

Parameters
+ + +
sampleFor ESP32 only, provide the first or last sample to ramp the signal in/out
+
+
+ +
+
+ +

◆ rampIn()

+ +
+
+ + + + + + + + +
void AutoAnalog::rampIn (uint8_t sample)
+
+

Member Data Documentation

@@ -446,14 +493,14 @@

- +
uint8_t AutoAnalog::dacBuffer[MAX_BUFFER_SIZE]uint8_t AutoAnalog::dacBuffer[MAX_BUFFER_SIZE]
+ + +

◆ dacTaskHandle

+ +
+
+ + + + +
TaskHandle_t AutoAnalog::dacTaskHandle
+
+ +

Definition at line 182 of file AutoAnalogAudio.h.

+

The documentation for this class was generated from the following file:
    @@ -601,7 +664,7 @@

    diff --git a/classes.html b/classes.html index 432c68c..0138fc2 100644 --- a/classes.html +++ b/classes.html @@ -23,7 +23,7 @@
    Auto Analog Audio -  1.42 +  1.43
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    @@ -68,19 +68,16 @@
    Class Index
    -
    A | W
    +
    diff --git a/dir_10e51624dba7b487205d9a97220e50b9.html b/dir_10e51624dba7b487205d9a97220e50b9.html deleted file mode 100644 index 6843673..0000000 --- a/dir_10e51624dba7b487205d9a97220e50b9.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/WirelessSpeaker Directory Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    WirelessSpeaker Directory Reference
    -
    -
    - - - - -

    -Files

    file  myRadio.h [code]
     
    -
    - - - - diff --git a/dir_2f9d61fbd4a05e3d7f36be67b49effbc.html b/dir_2f9d61fbd4a05e3d7f36be67b49effbc.html deleted file mode 100644 index 992a666..0000000 --- a/dir_2f9d61fbd4a05e3d7f36be67b49effbc.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -Auto Analog Audio: src/sam Directory Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    sam Directory Reference
    -
    -
    - - - - -

    -Files

    file  AutoAnalogAudio.cpp [code]
     
    -
    - - - - diff --git a/dir_4cfd5b5feff4e2a34d925e28eef36dcc.html b/dir_4cfd5b5feff4e2a34d925e28eef36dcc.html deleted file mode 100644 index d2491e7..0000000 --- a/dir_4cfd5b5feff4e2a34d925e28eef36dcc.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/WirelessTx_RPi Directory Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    WirelessTx_RPi Directory Reference
    -
    -
    - - - - - - - - -

    -Files

    file  Makefile [code]
     
    file  radioRelay.cpp [code]
     
    file  wirelessSpeaker.cpp [code]
     
    -
    - - - - diff --git a/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/dir_68267d1309a1af8e8297ef4c3efbcdba.html index 94d6ac4..9f6602f 100644 --- a/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -23,7 +23,7 @@
    Auto Analog Audio -  1.42 +  1.43
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    @@ -75,24 +75,18 @@ - - - -

    Directories

    directory  avr
     
    directory  esp32
     
    directory  sam
     
    - -

    Files

    file  AutoAnalog_config.h [code]
     
    file  AutoAnalogAudio.h [code]
     
    diff --git a/dir_77eab80029731c2d515254385c5f861e.html b/dir_77eab80029731c2d515254385c5f861e.html deleted file mode 100644 index 10233cd..0000000 --- a/dir_77eab80029731c2d515254385c5f861e.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/SDAudio Directory Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    SDAudio Directory Reference
    -
    -
    - - - - - - -

    -Directories

    directory  SdAudioRecording
     
    directory  SdAudioWavPlayer
     
    -
    - - - - diff --git a/dir_8882ba4365322dddf27be4df3376e9bf.html b/dir_8882ba4365322dddf27be4df3376e9bf.html deleted file mode 100644 index ca8681e..0000000 --- a/dir_8882ba4365322dddf27be4df3376e9bf.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -Auto Analog Audio: src/avr Directory Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    avr Directory Reference
    -
    -
    - - - - -

    -Files

    file  AutoAnalogAudio.cpp [code]
     
    -
    - - - - diff --git a/dir_9b2e53ab1f261bc6abd9570b500042f4.html b/dir_9b2e53ab1f261bc6abd9570b500042f4.html deleted file mode 100644 index bbf2a10..0000000 --- a/dir_9b2e53ab1f261bc6abd9570b500042f4.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/AudioRadioRelay Directory Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    AudioRadioRelay Directory Reference
    -
    -
    - - - - -

    -Files

    file  myRadio.h [code]
     
    -
    - - - - diff --git a/dir_9f441c5802732231d7e005c776c36284.html b/dir_9f441c5802732231d7e005c776c36284.html deleted file mode 100644 index 7f5a825..0000000 --- a/dir_9f441c5802732231d7e005c776c36284.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/SDAudio/SdAudioWavPlayer Directory Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    SdAudioWavPlayer Directory Reference
    -
    -
    - - - - -

    -Files

    file  myWAV.h [code]
     
    -
    - - - - diff --git a/dir_ac6bea81eae251a7ca519e4aaadd682d.html b/dir_ac6bea81eae251a7ca519e4aaadd682d.html deleted file mode 100644 index 1e64ee3..0000000 --- a/dir_ac6bea81eae251a7ca519e4aaadd682d.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/WirelessMicrophone Directory Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    WirelessMicrophone Directory Reference
    -
    -
    - - - - -

    -Files

    file  myRadio.h [code]
     
    -
    - - - - diff --git a/dir_b39bb3e480321ec1e2c642be908497e6.html b/dir_b39bb3e480321ec1e2c642be908497e6.html deleted file mode 100644 index bb808db..0000000 --- a/dir_b39bb3e480321ec1e2c642be908497e6.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/ESP32 Directory Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    ESP32 Directory Reference
    -
    -
    - - - - -

    -Directories

    directory  ESP32_AudioTest
     
    -
    - - - - diff --git a/dir_bd4eff8f7e0deb59c3e388155e74b196.html b/dir_bd4eff8f7e0deb59c3e388155e74b196.html deleted file mode 100644 index 1c5a725..0000000 --- a/dir_bd4eff8f7e0deb59c3e388155e74b196.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/SimpleSine Directory Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    SimpleSine Directory Reference
    -
    -
    - - - - -

    -Files

    file  myRadio.h [code]
     
    -
    - - - - diff --git a/dir_d28a4824dc47e487b107a5db32ef43c4.html b/dir_d28a4824dc47e487b107a5db32ef43c4.html deleted file mode 100644 index c942913..0000000 --- a/dir_d28a4824dc47e487b107a5db32ef43c4.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - -Auto Analog Audio: examples Directory Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    examples Directory Reference
    -
    -
    - - - - - - - - - - - - - - - - -

    -Directories

    directory  AudioRadioRelay
     
    directory  ESP32
     
    directory  SDAudio
     
    directory  SimpleSine
     
    directory  WirelessMicrophone
     
    directory  WirelessSpeaker
     
    directory  WirelessTx_RPi
     
    -
    - - - - diff --git a/dir_d35e8d9c847c512a0480f8070ffef7ed.html b/dir_d35e8d9c847c512a0480f8070ffef7ed.html index c709c13..b9c7656 100644 --- a/dir_d35e8d9c847c512a0480f8070ffef7ed.html +++ b/dir_d35e8d9c847c512a0480f8070ffef7ed.html @@ -23,7 +23,7 @@
    Auto Analog Audio -  1.42 +  1.43
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    @@ -75,13 +75,13 @@ - +

    Files

    file  AutoAnalogAudio.cpp [code]
    file  AutoAnalogAudio.cpp [code]
     
    diff --git a/dir_df8dc0d4d39619e24101c77f93ee40af.html b/dir_df8dc0d4d39619e24101c77f93ee40af.html deleted file mode 100644 index 30641e3..0000000 --- a/dir_df8dc0d4d39619e24101c77f93ee40af.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/SDAudio/SdAudioRecording Directory Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    SdAudioRecording Directory Reference
    -
    -
    - - - - - - -

    -Files

    file  myRecording.h [code]
     
    file  myWAV.h [code]
     
    -
    - - - - diff --git a/dir_f126658ef24dcddc772c858a9c8ccd44.html b/dir_f126658ef24dcddc772c858a9c8ccd44.html deleted file mode 100644 index 40ec838..0000000 --- a/dir_f126658ef24dcddc772c858a9c8ccd44.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/ESP32/ESP32_AudioTest Directory Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    ESP32_AudioTest Directory Reference
    -
    -
    - - - - - - - - -

    -Files

    file  mySine.h [code]
     
    file  myWAV.h [code]
     
    file  volume.h [code]
     
    -
    - - - - diff --git a/examples.html b/examples.html index faa2e89..e14e1ed 100644 --- a/examples.html +++ b/examples.html @@ -23,7 +23,7 @@
    Auto Analog Audio -  1.42 +  1.43
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    @@ -95,7 +95,7 @@ diff --git a/files.html b/files.html index 0e8c7b4..71e7e38 100644 --- a/files.html +++ b/files.html @@ -23,7 +23,7 @@
    Auto Analog Audio -  1.42 +  1.43
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    @@ -69,46 +69,17 @@
    Here is a list of all files with brief descriptions:
    diff --git a/functions.html b/functions.html index 959ba48..66a7071 100644 --- a/functions.html +++ b/functions.html @@ -23,7 +23,7 @@
    Auto Analog Audio -  1.42 +  1.43
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    @@ -64,9 +64,7 @@
    -
    Here is a list of all class members with links to the classes they belong to:
    - -

    - a -

    diff --git a/functions_func.html b/functions_func.html index 2ba586f..d686520 100644 --- a/functions_func.html +++ b/functions_func.html @@ -23,7 +23,7 @@
    Auto Analog Audio -  1.42 +  1.43
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    @@ -95,6 +95,12 @@
  • getADC() : AutoAnalog
  • +
  • rampIn() +: AutoAnalog +
  • +
  • rampOut() +: AutoAnalog +
  • setSampleRate() : AutoAnalog
  • @@ -105,7 +111,7 @@ diff --git a/functions_vars.html b/functions_vars.html index 0289ec8..3118e2d 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -23,7 +23,7 @@
    Auto Analog Audio -  1.42 +  1.43
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    @@ -74,27 +74,9 @@
  • adcBuffer16 : AutoAnalog
  • -
  • audioFormat -: wavStruct -
  • autoAdjust : AutoAnalog
  • -
  • bitsPerSample -: wavStruct -
  • -
  • blockAlign -: wavStruct -
  • -
  • byteRate -: wavStruct -
  • -
  • chunkID -: wavStruct -
  • -
  • chunkSize -: wavStruct -
  • dacBitsPerSample : AutoAnalog
  • @@ -104,32 +86,14 @@
  • dacBuffer16 : AutoAnalog
  • -
  • format -: wavStruct -
  • -
  • numChannels -: wavStruct -
  • -
  • sampleRate -: wavStruct -
  • -
  • subChunk2ID -: wavStruct -
  • -
  • subChunk2Size -: wavStruct -
  • -
  • subchunkID -: wavStruct -
  • -
  • subchunkSize -: wavStruct +
  • dacTaskHandle +: AutoAnalog
diff --git a/globals.html b/globals.html index f48373c..baec904 100644 --- a/globals.html +++ b/globals.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -64,9 +64,7 @@
-
Here is a list of all file members with links to the files they belong to:
- -

- a -

diff --git a/globals_defs.html b/globals_defs.html index aa1699d..eafd35d 100644 --- a/globals_defs.html +++ b/globals_defs.html @@ -23,7 +23,7 @@
Auto Analog Audio -  1.42 +  1.43
TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
@@ -74,23 +74,11 @@
  • AAA_MODE_STEREO : AutoAnalogAudio.h
  • -
  • DAC0_PIN -: AutoAnalog_config.h -
  • -
  • DAC1_PIN -: AutoAnalog_config.h -
  • -
  • DEFAULT_FREQUENCY -: AutoAnalog_config.h -
  • -
  • MAX_BUFFER_SIZE -: AutoAnalog_config.h -
  • diff --git a/globals_func.html b/globals_func.html deleted file mode 100644 index 2919b59..0000000 --- a/globals_func.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - -Auto Analog Audio: File Members - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    - -
    - -
    -  - -

    - a -

    - - -

    - c -

    - - -

    - d -

    - - -

    - i -

    - - -

    - l -

    - - -

    - m -

    - - -

    - p -

    - - -

    - r -

    - - -

    - s -

    - - -

    - v -

    -
    - - - - diff --git a/globals_vars.html b/globals_vars.html deleted file mode 100644 index 5eadb9d..0000000 --- a/globals_vars.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - -Auto Analog Audio: File Members - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - -
    - -
    -
    - - -
    - -
    - -
    -  - -

    - a -

    - - -

    - b -

    - - -

    - c -

    - - -

    - e -

    - - -

    - f -

    - - -

    - p -

    - - -

    - r -

    - - -

    - s -

    - - -

    - t -

    - - -

    - v -

    - - -

    - w -

    -
    - - - - diff --git a/index.html b/index.html index 2609d53..f371aa1 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@
    Auto Analog Audio -  1.42 +  1.43
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    @@ -95,7 +95,7 @@ diff --git a/menudata.js b/menudata.js index a9b2edb..5c6f0f0 100644 --- a/menudata.js +++ b/menudata.js @@ -28,60 +28,12 @@ var menudata={children:[ {text:"Class List",url:"annotated.html"}, {text:"Class Index",url:"classes.html"}, {text:"Class Members",url:"functions.html",children:[ -{text:"All",url:"functions.html",children:[ -{text:"a",url:"functions.html#index_a"}, -{text:"b",url:"functions.html#index_b"}, -{text:"c",url:"functions.html#index_c"}, -{text:"d",url:"functions.html#index_d"}, -{text:"e",url:"functions.html#index_e"}, -{text:"f",url:"functions.html#index_f"}, -{text:"g",url:"functions.html#index_g"}, -{text:"n",url:"functions.html#index_n"}, -{text:"s",url:"functions.html#index_s"}, -{text:"t",url:"functions.html#index_t"}]}, +{text:"All",url:"functions.html"}, {text:"Functions",url:"functions_func.html"}, {text:"Variables",url:"functions_vars.html"}]}]}, {text:"Files",url:"files.html",children:[ {text:"File List",url:"files.html"}, {text:"File Members",url:"globals.html",children:[ -{text:"All",url:"globals.html",children:[ -{text:"a",url:"globals.html#index_a"}, -{text:"b",url:"globals.html#index_b"}, -{text:"c",url:"globals.html#index_c"}, -{text:"d",url:"globals.html#index_d"}, -{text:"e",url:"globals.html#index_e"}, -{text:"f",url:"globals.html#index_f"}, -{text:"i",url:"globals.html#index_i"}, -{text:"l",url:"globals.html#index_l"}, -{text:"m",url:"globals.html#index_m"}, -{text:"p",url:"globals.html#index_p"}, -{text:"r",url:"globals.html#index_r"}, -{text:"s",url:"globals.html#index_s"}, -{text:"t",url:"globals.html#index_t"}, -{text:"v",url:"globals.html#index_v"}, -{text:"w",url:"globals.html#index_w"}]}, -{text:"Functions",url:"globals_func.html",children:[ -{text:"a",url:"globals_func.html#index_a"}, -{text:"c",url:"globals_func.html#index_c"}, -{text:"d",url:"globals_func.html#index_d"}, -{text:"i",url:"globals_func.html#index_i"}, -{text:"l",url:"globals_func.html#index_l"}, -{text:"m",url:"globals_func.html#index_m"}, -{text:"p",url:"globals_func.html#index_p"}, -{text:"r",url:"globals_func.html#index_r"}, -{text:"s",url:"globals_func.html#index_s"}, -{text:"v",url:"globals_func.html#index_v"}]}, -{text:"Variables",url:"globals_vars.html",children:[ -{text:"a",url:"globals_vars.html#index_a"}, -{text:"b",url:"globals_vars.html#index_b"}, -{text:"c",url:"globals_vars.html#index_c"}, -{text:"e",url:"globals_vars.html#index_e"}, -{text:"f",url:"globals_vars.html#index_f"}, -{text:"p",url:"globals_vars.html#index_p"}, -{text:"r",url:"globals_vars.html#index_r"}, -{text:"s",url:"globals_vars.html#index_s"}, -{text:"t",url:"globals_vars.html#index_t"}, -{text:"v",url:"globals_vars.html#index_v"}, -{text:"w",url:"globals_vars.html#index_w"}]}, +{text:"All",url:"globals.html"}, {text:"Macros",url:"globals_defs.html"}]}]}, {text:"Examples",url:"examples.html"}]} diff --git a/myRecording_8h.html b/myRecording_8h.html deleted file mode 100644 index 1dce67a..0000000 --- a/myRecording_8h.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/SDAudio/SdAudioRecording/myRecording.h File Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    myRecording.h File Reference
    -
    -
    - -

    Go to the source code of this file.

    - - - - -

    -Classes

    struct  wavStruct
     
    - - - - - - - - - -

    -Functions

    void ADC_Handler (void)
     
    void startRecording (const char *fileName, uint32_t sampleRate)
     
    void createWavHeader (const char *fileName, uint32_t sampleRate)
     
    void stopRecording (const char *fileName, uint32_t sampleRate)
     
    - - - -

    -Variables

    uint32_t counter = 0
     
    -

    Function Documentation

    - -

    ◆ ADC_Handler()

    - -
    -
    - - - - - - - - -
    void ADC_Handler (void )
    -
    - -

    Definition at line 27 of file myRecording.h.

    - -
    -
    - -

    ◆ startRecording()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void startRecording (const char * fileName,
    uint32_t sampleRate 
    )
    -
    -
    Examples
    SdAudioRecording.ino.
    -
    - -

    Definition at line 37 of file myRecording.h.

    - -
    -
    - -

    ◆ createWavHeader()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void createWavHeader (const char * fileName,
    uint32_t sampleRate 
    )
    -
    - -

    Definition at line 78 of file myRecording.h.

    - -
    -
    - -

    ◆ stopRecording()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    void stopRecording (const char * fileName,
    uint32_t sampleRate 
    )
    -
    -
    Examples
    SdAudioRecording.ino.
    -
    - -

    Definition at line 123 of file myRecording.h.

    - -
    -
    -

    Variable Documentation

    - -

    ◆ counter

    - -
    -
    - - - - -
    uint32_t counter = 0
    -
    -
    Examples
    SdAudioRecording.ino.
    -
    - -

    Definition at line 24 of file myRecording.h.

    - -
    -
    -
    - - - - diff --git a/myRecording_8h_source.html b/myRecording_8h_source.html deleted file mode 100644 index a8a1614..0000000 --- a/myRecording_8h_source.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/SDAudio/SdAudioRecording/myRecording.h Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    myRecording.h
    -
    -
    -Go to the documentation of this file.
    1 
    -
    2 
    -
    3 /*********************************************************/
    -
    4 
    -
    5 /* WAV HEADER STRUCTURE */
    -
    6 struct wavStruct {
    -
    7  const char chunkID[4] = {'R', 'I', 'F', 'F'};
    -
    8  uint32_t chunkSize = 36; //Size of (entire file in bytes - 8 bytes) or (data size + 36)
    -
    9  const char format[4] = {'W', 'A', 'V', 'E'};
    -
    10  const char subchunkID[4] = {'f', 'm', 't', ' '};
    -
    11  const uint32_t subchunkSize = 16;
    -
    12  const uint16_t audioFormat = 1; //PCM == 1
    -
    13  uint16_t numChannels = 1; //1=Mono, 2=Stereo
    -
    14  uint32_t sampleRate = 11000;
    -
    15  uint32_t byteRate = 11000; //== SampleRate * NumChannels * BitsPerSample/8
    -
    16  uint16_t blockAlign = 1; //== NumChannels * BitsPerSample/8
    -
    17  uint16_t bitsPerSample = 8; //8,16,32...
    -
    18  const char subChunk2ID[4] = {'d', 'a', 't', 'a'};
    -
    19  uint32_t subChunk2Size = 0; //== NumSamples * NumChannels * BitsPerSample/8
    -
    20  //Data //The audio data
    -
    21 };
    -
    22 
    -
    23 /*********************************************************/
    -
    24 uint32_t counter = 0;
    -
    25 /*********************************************************/
    -
    26 
    -
    27 void ADC_Handler(void) { //ADC Interrupt triggered by ADC sampling completion
    -
    28  aaAudio.getADC();
    -
    29  if (recFile) {
    -
    30  recFile.write(aaAudio.adcBuffer, MAX_BUFFER_SIZE); //Write the data to SD as it is available
    -
    31  counter++;
    -
    32  }
    -
    33 }
    -
    34 
    -
    35 /*********************************************************/
    -
    36 
    -
    37 void startRecording(const char *fileName, uint32_t sampleRate) {
    -
    38 
    -
    39 #if defined (RECORD_DEBUG)
    -
    40  Serial.print("Start Recording: ");
    -
    41  Serial.println(fileName);
    -
    42 #endif
    -
    43 
    -
    44  if (recFile) {
    -
    45  aaAudio.adcInterrupts(false);
    -
    46  recFile.close();
    -
    47  }
    -
    48  if (myFile) { //Close any open playback files & disable the DAC
    -
    49  aaAudio.disableDAC();
    -
    50  myFile.close();
    -
    51  }
    -
    52  recFile = SD.open(fileName, FILE_WRITE); //Open the file for writing
    -
    53 
    -
    54  if (!recFile) {
    -
    55 #if defined (RECORD_DEBUG)
    -
    56  Serial.println("Failed to open file");
    -
    57 #endif
    -
    58  return;
    -
    59  }
    -
    60  recFile.seek(0); //Write a blank WAV header
    -
    61  uint8_t bb = 0;
    -
    62  for (int i = 0; i < 44; i++) {
    -
    63  recFile.write(bb);
    -
    64  }
    -
    65 
    -
    66  aaAudio.adcBitsPerSample = 8; //Configure AAAudio
    -
    67  aaAudio.setSampleRate(sampleRate);
    -
    68 
    -
    69  aaAudio.getADC();
    -
    70  aaAudio.getADC();
    -
    71  aaAudio.adcInterrupts(true);
    -
    72 
    -
    73 
    -
    74 }
    -
    75 
    -
    76 /*********************************************************/
    -
    77 
    -
    78 void createWavHeader(const char *fileName, uint32_t sampleRate ) {
    -
    79 
    -
    80  if (!SD.exists(fileName)) {
    -
    81 #if defined (RECORD_DEBUG)
    -
    82  Serial.println("File does not exist, please write WAV/PCM data starting at byte 44");
    -
    83 #endif
    -
    84  return;
    -
    85  }
    -
    86  recFile = SD.open(fileName, FILE_WRITE);
    -
    87 
    -
    88  if (recFile.size() <= 44) {
    -
    89 #if defined (RECORD_DEBUG)
    -
    90  Serial.println("File contains no data, exiting");
    -
    91 #endif
    -
    92  recFile.close();
    -
    93  return;
    -
    94  }
    -
    95 
    -
    96  wavStruct wavHeader;
    -
    97  wavHeader.chunkSize = recFile.size() - 8;
    -
    98  //wavHeader.numChannels = numChannels;
    -
    99  wavHeader.sampleRate = sampleRate;
    -
    100  wavHeader.byteRate = sampleRate * wavHeader.numChannels * wavHeader.bitsPerSample / 8;
    -
    101  wavHeader.blockAlign = wavHeader.numChannels * wavHeader.bitsPerSample / 8;
    -
    102  //wavHeader.bitsPerSample = bitsPerSample;
    -
    103  wavHeader.subChunk2Size = recFile.size() - 44;
    -
    104 
    -
    105 #if defined (RECORD_DEBUG)
    -
    106  Serial.print("WAV Header Write ");
    -
    107 #endif
    -
    108 
    -
    109  recFile.seek(0);
    -
    110  if ( recFile.write((byte*)&wavHeader, 44) > 0) {
    -
    111 #if defined (RECORD_DEBUG)
    -
    112  Serial.println("OK");
    -
    113  } else {
    -
    114  Serial.println("Failed");
    -
    115 #endif
    -
    116  }
    -
    117  recFile.close();
    -
    118 
    -
    119 }
    -
    120 
    -
    121 /*********************************************************/
    -
    122 
    -
    123 void stopRecording(const char *fileName, uint32_t sampleRate) {
    -
    124 
    -
    125  aaAudio.adcInterrupts(false); //Disable the ADC interrupt
    -
    126  recFile.close(); //Close the file
    -
    127  createWavHeader(fileName, sampleRate); //Add appropriate header info, to make it a valid *.wav file
    -
    128 #if defined (RECORD_DEBUG)
    -
    129  Serial.println("Recording Stopped");
    -
    130 #endif
    -
    131 }
    -
    132 
    -
    133 /*********************************************************/
    -
    134 
    -
    135 
    -
    #define MAX_BUFFER_SIZE
    -
    void createWavHeader(const char *fileName, uint32_t sampleRate)
    Definition: myRecording.h:78
    -
    void startRecording(const char *fileName, uint32_t sampleRate)
    Definition: myRecording.h:37
    -
    uint32_t counter
    Definition: myRecording.h:24
    -
    void stopRecording(const char *fileName, uint32_t sampleRate)
    Definition: myRecording.h:123
    -
    void ADC_Handler(void)
    Definition: myRecording.h:27
    - -
    uint32_t sampleRate
    Definition: myRecording.h:14
    -
    uint16_t numChannels
    Definition: myRecording.h:13
    -
    const char subChunk2ID[4]
    Definition: myRecording.h:18
    -
    const uint32_t subchunkSize
    Definition: myRecording.h:11
    -
    const char subchunkID[4]
    Definition: myRecording.h:10
    -
    const char chunkID[4]
    Definition: myRecording.h:7
    -
    uint32_t byteRate
    Definition: myRecording.h:15
    -
    uint16_t bitsPerSample
    Definition: myRecording.h:17
    -
    uint16_t blockAlign
    Definition: myRecording.h:16
    -
    const uint16_t audioFormat
    Definition: myRecording.h:12
    -
    const char format[4]
    Definition: myRecording.h:9
    -
    uint32_t chunkSize
    Definition: myRecording.h:8
    -
    uint32_t subChunk2Size
    Definition: myRecording.h:19
    -
    - - - - diff --git a/mySine_8h.html b/mySine_8h.html deleted file mode 100644 index 7c225bc..0000000 --- a/mySine_8h.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/ESP32/ESP32_AudioTest/mySine.h File Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    mySine.h File Reference
    -
    -
    - -

    Go to the source code of this file.

    - - - - - - -

    -Functions

    void sineSetup16 ()
     
    void sineSetup8 ()
     
    -

    Function Documentation

    - -

    ◆ sineSetup16()

    - -
    -
    - - - - - - - -
    void sineSetup16 ()
    -
    - -

    Definition at line 3 of file mySine.h.

    - -
    -
    - -

    ◆ sineSetup8()

    - -
    -
    - - - - - - - -
    void sineSetup8 ()
    -
    - -

    Definition at line 40 of file mySine.h.

    - -
    -
    -
    - - - - diff --git a/mySine_8h_source.html b/mySine_8h_source.html deleted file mode 100644 index e31ebbb..0000000 --- a/mySine_8h_source.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/ESP32/ESP32_AudioTest/mySine.h Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    mySine.h
    -
    -
    -Go to the documentation of this file.
    1 
    -
    2 
    -
    3 void sineSetup16() {
    -
    4 
    -
    5  aaAudio.dacBuffer16[0] = 0x4000 >> 8;
    -
    6  aaAudio.dacBuffer16[1] = 0x4c7c >> 8;
    -
    7  aaAudio.dacBuffer16[2] = 0x587d >> 8;
    -
    8  aaAudio.dacBuffer16[3] = 0x638e >> 8;
    -
    9  aaAudio.dacBuffer16[4] = 0x6d40 >> 8;
    -
    10  aaAudio.dacBuffer16[5] = 0x7536 >> 8;
    -
    11  aaAudio.dacBuffer16[6] = 0x7b20 >> 8;
    -
    12  aaAudio.dacBuffer16[7] = 0x7ec4 >> 8;
    -
    13  aaAudio.dacBuffer16[8] = 0x7fff >> 8;
    -
    14  aaAudio.dacBuffer16[9] = 0x7ec4 >> 8;
    -
    15  aaAudio.dacBuffer16[10] = 0x7b20 >> 8;
    -
    16  aaAudio.dacBuffer16[11] = 0x7536 >> 8;
    -
    17  aaAudio.dacBuffer16[12] = 0x6d40 >> 8;
    -
    18  aaAudio.dacBuffer16[13] = 0x638e >> 8;
    -
    19  aaAudio.dacBuffer16[14] = 0x587d >> 8;
    -
    20  aaAudio.dacBuffer16[15] = 0x4c7c >> 8;
    -
    21  aaAudio.dacBuffer16[16] = 0x4000 >> 8;
    -
    22  aaAudio.dacBuffer16[17] = 0x3383 >> 8;
    -
    23  aaAudio.dacBuffer16[18] = 0x2782 >> 8;
    -
    24  aaAudio.dacBuffer16[19] = 0x1c71 >> 8;
    -
    25  aaAudio.dacBuffer16[20] = 0x12bf >> 8;
    -
    26  aaAudio.dacBuffer16[21] = 0xac9 >> 8;
    -
    27  aaAudio.dacBuffer16[22] = 0x4df >> 8;
    -
    28  aaAudio.dacBuffer16[23] = 0x13b >> 8;
    -
    29  aaAudio.dacBuffer16[24] = 0x0 >> 8;
    -
    30  aaAudio.dacBuffer16[25] = 0x13b >> 8;
    -
    31  aaAudio.dacBuffer16[26] = 0x4df >> 8;
    -
    32  aaAudio.dacBuffer16[27] = 0xac9 >> 8;
    -
    33  aaAudio.dacBuffer16[28] = 0x12bf >> 8;
    -
    34  aaAudio.dacBuffer16[29] = 0x1c71 >> 8;
    -
    35  aaAudio.dacBuffer16[30] = 0x2782 >> 8;
    -
    36  aaAudio.dacBuffer16[31] = 0x3383 >> 8;
    -
    37 
    -
    38 }
    -
    39 
    -
    40 void sineSetup8() {
    -
    41 
    -
    42  aaAudio.dacBuffer[0] = 0x40;
    -
    43  aaAudio.dacBuffer[1] = 0x4c;
    -
    44  aaAudio.dacBuffer[2] = 0x58;
    -
    45  aaAudio.dacBuffer[3] = 0x63;
    -
    46  aaAudio.dacBuffer[4] = 0x6c;
    -
    47  aaAudio.dacBuffer[5] = 0x74;
    -
    48  aaAudio.dacBuffer[6] = 0x7a;
    -
    49  aaAudio.dacBuffer[7] = 0x7e;
    -
    50  aaAudio.dacBuffer[8] = 0x7f;
    -
    51  aaAudio.dacBuffer[9] = 0x7e;
    -
    52  aaAudio.dacBuffer[10] = 0x7a;
    -
    53  aaAudio.dacBuffer[11] = 0x74;
    -
    54  aaAudio.dacBuffer[12] = 0x6c;
    -
    55  aaAudio.dacBuffer[13] = 0x63;
    -
    56  aaAudio.dacBuffer[14] = 0x58;
    -
    57  aaAudio.dacBuffer[15] = 0x4c;
    -
    58  aaAudio.dacBuffer[16] = 0x40;
    -
    59  aaAudio.dacBuffer[17] = 0x33;
    -
    60  aaAudio.dacBuffer[18] = 0x27;
    -
    61  aaAudio.dacBuffer[19] = 0x1c;
    -
    62  aaAudio.dacBuffer[20] = 0x13;
    -
    63  aaAudio.dacBuffer[21] = 0xb;
    -
    64  aaAudio.dacBuffer[22] = 0x5;
    -
    65  aaAudio.dacBuffer[23] = 0x1;
    -
    66  aaAudio.dacBuffer[24] = 0x0;
    -
    67  aaAudio.dacBuffer[25] = 0x1;
    -
    68  aaAudio.dacBuffer[26] = 0x5;
    -
    69  aaAudio.dacBuffer[27] = 0xb;
    -
    70  aaAudio.dacBuffer[28] = 0x13;
    -
    71  aaAudio.dacBuffer[29] = 0x1c;
    -
    72  aaAudio.dacBuffer[30] = 0x27;
    -
    73  aaAudio.dacBuffer[31] = 0x33;
    -
    74 
    -
    75 }
    -
    void sineSetup16()
    Definition: mySine.h:3
    -
    void sineSetup8()
    Definition: mySine.h:40
    -
    - - - - diff --git a/radioRelay_8cpp.html b/radioRelay_8cpp.html deleted file mode 100644 index 36edbac..0000000 --- a/radioRelay_8cpp.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/WirelessTx_RPi/radioRelay.cpp File Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    radioRelay.cpp File Reference
    -
    -
    -
    #include <cstdlib>
    -#include <iostream>
    -#include <sstream>
    -#include <string>
    -#include <RF24/RF24.h>
    -#include <unistd.h>
    -#include <fstream>
    -
    -

    Go to the source code of this file.

    - - - - - - - - -

    -Functions

    RF24 radio (25, 0)
     
    void intHandler ()
     
    int main (int argc, char **argv)
     
    - - - - - - - - - - - - - -

    -Variables

    char audioFile [] = "Guitar8b16kMono.wav"
     
    const uint64_t pipes [14] = { 0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL, 0x544d52683CLL, 0x544d526846LL, 0x544d526850LL, 0x544d52685ALL, 0x544d526820LL, 0x544d52686ELL, 0x544d52684BLL, 0x544d526841LL, 0x544d526855LL, 0x544d52685FLL, 0x544d526869LL}
     
    unsigned int sz = 0
     
    uint32_t reads = 0
     
    uint32_t writes = 0
     
    uint8_t bufR [32]
     
    -

    Function Documentation

    - -

    ◆ radio()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    RF24 radio (25 ,
     
    )
    -
    - -
    -
    - -

    ◆ intHandler()

    - -
    -
    - - - - - - - -
    void intHandler ()
    -
    - -

    Definition at line 151 of file radioRelay.cpp.

    - -
    -
    - -

    ◆ main()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    int main (int argc,
    char ** argv 
    )
    -
    - -

    Definition at line 43 of file radioRelay.cpp.

    - -
    -
    -

    Variable Documentation

    - -

    ◆ audioFile

    - -
    -
    - - - - -
    char audioFile[] = "Guitar8b16kMono.wav"
    -
    -
    Examples
    SdAudioAuto.ino, and SdAudioBasic.ino.
    -
    - -

    Definition at line 29 of file radioRelay.cpp.

    - -
    -
    - -

    ◆ pipes

    - -
    -
    - - - - -
    const uint64_t pipes[14] = { 0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL, 0x544d52683CLL, 0x544d526846LL, 0x544d526850LL, 0x544d52685ALL, 0x544d526820LL, 0x544d52686ELL, 0x544d52684BLL, 0x544d526841LL, 0x544d526855LL, 0x544d52685FLL, 0x544d526869LL}
    -
    - -

    Definition at line 37 of file radioRelay.cpp.

    - -
    -
    - -

    ◆ sz

    - -
    -
    - - - - -
    unsigned int sz = 0
    -
    - -

    Definition at line 38 of file radioRelay.cpp.

    - -
    -
    - -

    ◆ reads

    - -
    -
    - - - - -
    uint32_t reads = 0
    -
    - -

    Definition at line 40 of file radioRelay.cpp.

    - -
    -
    - -

    ◆ writes

    - -
    -
    - - - - -
    uint32_t writes = 0
    -
    - -

    Definition at line 40 of file radioRelay.cpp.

    - -
    -
    - -

    ◆ bufR

    - -
    -
    - - - - -
    uint8_t bufR[32]
    -
    - -

    Definition at line 41 of file radioRelay.cpp.

    - -
    -
    -
    - - - - diff --git a/radioRelay_8cpp_source.html b/radioRelay_8cpp_source.html deleted file mode 100644 index 20aa371..0000000 --- a/radioRelay_8cpp_source.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/WirelessTx_RPi/radioRelay.cpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    radioRelay.cpp
    -
    -
    -Go to the documentation of this file.
    1 /*
    -
    2 TMRh20 2016
    -
    3 
    -
    4  This program is free software; you can redistribute it and/or
    -
    5  modify it under the terms of the GNU General Public License
    -
    6  version 2 as published by the Free Software Foundation.
    -
    7  */
    -
    8 
    -
    14 #include <cstdlib>
    -
    15 #include <iostream>
    -
    16 #include <sstream>
    -
    17 #include <string>
    -
    18 #include <RF24/RF24.h>
    -
    19 #include <unistd.h>
    -
    20 #include <fstream>
    -
    21 
    -
    22 using namespace std;
    -
    23 
    -
    24 /****************** Raspberry Pi ***********************/
    -
    25 
    -
    26 RF24 radio(25, 0);
    -
    27 
    -
    28 // File should be 16 khz sample rate, mono, wav format
    -
    29 char audioFile[] = "Guitar8b16kMono.wav";
    -
    30 
    -
    31 // *** Set the radio to RF24_2MBPS below and in the example to use this:
    -
    32 //char audioFile[] = "Guitar8b24kMono.wav";
    -
    33 
    -
    34 /**************************************************************/
    -
    35 
    -
    36 // The addresses used in RF24Audio
    -
    37 const uint64_t pipes[14] = { 0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL, 0x544d52683CLL, 0x544d526846LL, 0x544d526850LL, 0x544d52685ALL, 0x544d526820LL, 0x544d52686ELL, 0x544d52684BLL, 0x544d526841LL, 0x544d526855LL, 0x544d52685FLL, 0x544d526869LL};
    -
    38 unsigned int sz = 0;
    -
    39 void intHandler();
    -
    40 uint32_t reads = 0, writes = 0;
    -
    41 uint8_t bufR[32];
    -
    42 
    -
    43 int main(int argc, char** argv) {
    -
    44 
    -
    45  cout << "RF24Audio On Rpi\n";
    -
    46 
    -
    47  // Configure radio settings for RF24Audio
    -
    48  radio.begin();
    -
    49  radio.setChannel(1);
    -
    50  radio.setPALevel(RF24_PA_MAX);
    -
    51  radio.setDataRate(RF24_1MBPS);
    -
    52  radio.setAutoAck(0);
    -
    53  radio.setCRCLength(RF24_CRC_8);
    -
    54  radio.setAddressWidth(5);
    -
    55 
    -
    56  radio.openWritingPipe(pipes[1]);
    -
    57  radio.openReadingPipe(1, pipes[0]);
    -
    58  radio.startListening();
    -
    59  radio.txDelay = 0;
    -
    60  radio.printDetails();
    -
    61  radio.stopListening();
    -
    62 
    -
    63  radio.maskIRQ(0, 1, 0);
    -
    64  radio.stopListening();
    -
    65 
    -
    66  attachInterrupt(24, INT_EDGE_FALLING, intHandler);
    -
    67 
    -
    68  uint32_t sampleDelay = 2000;
    -
    69 
    -
    70  // Read the entire wav file into memory
    -
    71  streampos size;
    -
    72  char * memblock;
    -
    73 
    -
    74  ifstream file (audioFile, ios::in | ios::binary | ios::ate);
    -
    75  if (file.is_open()) {
    -
    76 
    -
    77  size = file.tellg();//file.tellg();
    -
    78  sz = file.tellg();
    -
    79  printf("%d\n", sz);
    -
    80  memblock = new char [sz];
    -
    81  file.seekg (0, ios::beg);
    -
    82  file.read (memblock, sz);
    -
    83  file.close();
    -
    84  cout << "the entire file content is in memory\n";
    -
    85 
    -
    86  } else {
    -
    87  exit(1);
    -
    88  }
    -
    89 
    -
    90  uint16_t numChannels = memblock[22];
    -
    91  numChannels |= memblock[23];
    -
    92 
    -
    93  // Get the sample rate of the wav file
    -
    94  uint32_t sampleRate = memblock[24];
    -
    95  sampleRate |= memblock[25] << 8;
    -
    96  sampleRate |= memblock[26] << 16;
    -
    97  sampleRate |= memblock[27] << 24;
    -
    98  cout << "Sample Rate " << sampleRate << "\n";
    -
    99 
    -
    100  // Calculate the required delay based on sample rate
    -
    101  sampleDelay = (1000000.0 / sampleRate * 32) - 1;
    -
    102  cout << "Sample Delay " << sampleDelay << "\n";
    -
    103 
    -
    104 
    -
    105  // Data starts at byte 44, after the .wav header as long as there is no metadata
    -
    106  int32_t filePos = 44;
    -
    107  cout << "Output via radio...\n";
    -
    108 
    -
    109  sampleDelay /= numChannels;
    -
    110  sampleRate *= numChannels;
    -
    111  sampleDelay -= 80; //620 for 2MBPS, 790 for 1MBPS
    -
    112 
    -
    113 
    -
    114  //radio.flush_tx();
    -
    115  radio.setAutoAck(0, 1);
    -
    116  radio.openWritingPipe(pipes[2]);
    -
    117  radio.writeFast(&sampleRate, 4);
    -
    118  radio.txStandBy();
    -
    119  radio.setAutoAck(0, 0);
    -
    120  radio.openWritingPipe(pipes[1]);
    -
    121  delay(50); //Give the recipient a ms or two to process and setup timers, DAC, ADC
    -
    122  uint32_t dTimer = 0;
    -
    123 
    -
    124  while (1) {
    -
    125 
    -
    126  radio.stopListening();
    -
    127  radio.writeFast(&memblock[filePos], 32, 1);
    -
    128  ++writes;
    -
    129 
    -
    130  delayMicroseconds(sampleDelay);
    -
    131  filePos += 32;
    -
    132  if (filePos >= sz) {
    -
    133  break;
    -
    134  }
    -
    135  if (millis() - dTimer > 1000) {
    -
    136  dTimer = millis();
    -
    137  printf("%d %d\n", reads, writes);
    -
    138  reads = writes = 0;
    -
    139  printf("%d %d %d %d\n", bufR[0], bufR[1], bufR[2], bufR[3]);
    -
    140  }
    -
    141  } // loop
    -
    142 
    -
    143  cout << "Complete, exit...\n";
    -
    144  delete[] memblock;
    -
    145 
    -
    146 } // main
    -
    147 
    -
    148 
    -
    149 
    -
    150 
    -
    151 void intHandler() {
    -
    152 
    -
    153  if (radio.available()) {
    -
    154  radio.read(&bufR, 32);
    -
    155  ++reads;
    -
    156  } else {
    -
    157  radio.txStandBy();
    -
    158  radio.startListening();
    -
    159  }
    -
    160 }
    -
    161 
    -
    162 
    -
    unsigned int sz
    Definition: radioRelay.cpp:38
    -
    int main(int argc, char **argv)
    Definition: radioRelay.cpp:43
    -
    uint32_t writes
    Definition: radioRelay.cpp:40
    -
    uint8_t bufR[32]
    Definition: radioRelay.cpp:41
    -
    RF24 radio(25, 0)
    -
    const uint64_t pipes[14]
    Definition: radioRelay.cpp:37
    -
    uint32_t reads
    Definition: radioRelay.cpp:40
    -
    char audioFile[]
    Definition: radioRelay.cpp:29
    -
    void intHandler()
    Definition: radioRelay.cpp:151
    -
    - - - - diff --git a/sam_2AutoAnalogAudio_8cpp.html b/sam_2AutoAnalogAudio_8cpp.html deleted file mode 100644 index f77af76..0000000 --- a/sam_2AutoAnalogAudio_8cpp.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - -Auto Analog Audio: src/sam/AutoAnalogAudio.cpp File Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    AutoAnalogAudio.cpp File Reference
    -
    - - - - - diff --git a/sam_2AutoAnalogAudio_8cpp_source.html b/sam_2AutoAnalogAudio_8cpp_source.html deleted file mode 100644 index 22d484f..0000000 --- a/sam_2AutoAnalogAudio_8cpp_source.html +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - -Auto Analog Audio: src/sam/AutoAnalogAudio.cpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    AutoAnalogAudio.cpp
    -
    -
    -Go to the documentation of this file.
    1  /*
    -
    2  AutoAnalogAudio streaming via DAC & ADC by TMRh20
    -
    3  Copyright (C) 2016 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
    -
    7  the Free Software Foundation, either version 3 of the License, or
    -
    8  (at your option) any later version.
    -
    9 
    -
    10  This program is distributed in the hope that it will be useful,
    -
    11  but WITHOUT ANY WARRANTY; without even the implied warranty of
    -
    12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    -
    13  GNU General Public License for more details.
    -
    14 
    -
    15  You should have received a copy of the GNU General Public License
    -
    16  along with this program. If not, see <http://www.gnu.org/licenses/>.
    -
    17  */
    -
    18 
    -
    19 /****************************************************************************/
    -
    20 
    -
    21 #if defined (ARDUINO_ARCH_SAM)
    -
    22 
    -
    23 #include "../AutoAnalogAudio.h"
    -
    24 
    -
    25 //#include "AutoDAC.h"
    -
    26 //#include "AudoADC.h"
    -
    27 //#include "AutoTimer.h"
    -
    28 
    -
    29 /****************************************************************************/
    -
    30 /* Public Functions */
    -
    31 /****************************************************************************/
    -
    32 
    - -
    34 
    -
    35  dataReady = 0;
    -
    36  dataTimer = 0;
    -
    37  sampleCount = 0;
    -
    38  tcTicks = 2625;
    -
    39  tcTicks2 = 2625;
    -
    40  adjustDivider = 2;
    -
    41  adjustCtr = 0;
    -
    42  adjustCtr2 = 0;
    -
    43  whichDma = 0;
    -
    44  aCtr = 0;
    -
    45  dacChan = 0;
    -
    46  whichDac = 0;
    -
    47  adcBitsPerSample = 8;
    -
    48  dacBitsPerSample = 8;
    -
    49  autoAdjust = true;
    -
    50  adcLastAdjust = 0;
    -
    51  for(int i=0; i<MAX_BUFFER_SIZE; i++){
    -
    52  dacBuffer[i] = 0;
    -
    53  }
    -
    54  adcNumSamples = 0;
    -
    55 }
    -
    56 
    -
    57 void AutoAnalog::begin(bool enADC, bool enDAC){
    -
    58 
    -
    59  if(enADC){
    -
    60  adcSetup();
    -
    61  }
    -
    62  if(enDAC){
    -
    63  dacSetup();
    -
    64  }
    -
    65  tc2Setup(DEFAULT_FREQUENCY);
    -
    66  tcSetup(DEFAULT_FREQUENCY);
    -
    67  tcSetup();
    -
    68 }
    -
    69 
    -
    70 /****************************************************************************/
    -
    71 
    -
    72 void AutoAnalog::setSampleRate(uint32_t sampRate, bool stereo){
    -
    73 
    -
    74  tc2Setup(sampRate);
    -
    75  tcSetup(sampRate);
    -
    76  tcSetup();
    -
    77 }
    -
    78 
    -
    79 /****************************************************************************/
    -
    80 
    - -
    82 
    -
    83 
    -
    84 
    -
    85 }
    -
    86 
    -
    87 /****************************************************************************/
    -
    88 
    -
    89 void AutoAnalog::enableAdcChannel(uint8_t pinAx){
    -
    90 
    -
    91  if(pinAx > 6){ return; }
    -
    92  pinAx = 7 - pinAx;
    -
    93  ADC->ADC_CHER |= 1<< pinAx;
    -
    94 
    -
    95 }
    -
    96 
    -
    97 /****************************************************************************/
    -
    98 
    -
    99 void AutoAnalog::disableAdcChannel(uint8_t pinAx){
    -
    100 
    -
    101  if(pinAx > 6){ return; }
    -
    102  pinAx = 7 - pinAx;
    -
    103  ADC->ADC_CHDR |= 1<< pinAx;
    -
    104 
    -
    105 }
    -
    106 
    -
    107 /****************************************************************************/
    -
    108 
    -
    109 void AutoAnalog::getADC(uint32_t samples){
    -
    110 
    -
    111 
    -
    112  if(sampleCount < 100){ ++sampleCount; }
    -
    113  if(sampleCount >= 100 && autoAdjust){
    -
    114 
    -
    115  TcChannel * t = &TC0->TC_CHANNEL[0];
    -
    116  TcChannel * tt = &TC0->TC_CHANNEL[1];
    -
    117 
    -
    118  ++adjustCtr2;
    -
    119  if(adjustCtr2 > 2){ adjustCtr2 = 0;}
    -
    120 
    -
    121  if( tt->TC_RC >= t->TC_RC - 25 && adjustCtr2 == 0){
    -
    122  tcTicks2--;
    -
    123  tc2Setup();
    -
    124  }else
    -
    125  if( (ADC->ADC_RNCR > 0 || ADC->ADC_RCR > 0 ) ){
    -
    126  tcTicks2-=10;
    -
    127  tc2Setup();
    -
    128  }else
    -
    129  if( (ADC->ADC_RNCR == 0 && ADC->ADC_RCR == 0 ) && millis() - adcLastAdjust > 500 && tt->TC_RC < t->TC_RC - 35){
    -
    130  adcLastAdjust = millis();
    -
    131  tcTicks2++;
    -
    132  tc2Setup();
    -
    133  }
    -
    134  }
    -
    135 
    -
    136  if(!autoAdjust){
    -
    137  while(ADC->ADC_RNCR > 0 || ADC->ADC_RCR > 0 ){;}
    -
    138  }
    -
    139 
    -
    140  for(int i=0; i<adcNumSamples; i++){
    -
    141  if(adcBitsPerSample == 8){
    -
    142  adcBuffer[i] = adcDma[i]>>4;
    -
    143  }else
    -
    144  if(adcBitsPerSample == 10){
    -
    145  adcBuffer16[i] = adcDma[i]>>2;
    -
    146  }else{
    -
    147  adcBuffer16[i] = adcDma[i];
    -
    148  }
    -
    149  }
    -
    150 
    -
    151  whichDma = !whichDma;
    -
    152  ADC->ADC_RNPR=(uint32_t) adcDma;
    -
    153  ADC->ADC_RNCR=samples;
    -
    154 
    -
    155  adcNumSamples = samples;
    -
    156 }
    -
    157 
    -
    158 /****************************************************************************/
    -
    159 
    -
    160 void AutoAnalog::feedDAC(uint8_t dacChannel, uint32_t samples, bool startInterrupts){
    -
    161 
    -
    162  // Adjusts the timer by comparing the rate of incoming data
    -
    163  // of data vs rate of the DACC
    -
    164  if(sampleCount < 100){ ++sampleCount; }
    -
    165  if(sampleCount >= 100 && autoAdjust){
    -
    166 
    -
    167  TcChannel * t = &TC0->TC_CHANNEL[0];
    -
    168  int tcr = DACC->DACC_TCR;
    -
    169  int tncr = DACC->DACC_TNCR;
    -
    170 
    -
    171  ++adjustCtr;
    -
    172  if(adjustCtr > 200){ adjustCtr = 0;}
    -
    173 
    -
    174  if( (DACC->DACC_TCR > 0 || DACC->DACC_TNCR > 0) && adjustCtr < 25){
    -
    175  tcTicks-=5;
    -
    176  tcSetup();
    -
    177  }
    -
    178  }
    -
    179 
    -
    180  if(!autoAdjust){
    -
    181  while((dacc_get_interrupt_status(DACC) & DACC_ISR_ENDTX) != DACC_ISR_ENDTX ){;}
    -
    182  }
    -
    183 
    -
    184  for(int i=0; i<samples; i++){
    -
    185  if(dacBitsPerSample == 12){
    -
    186  realBuf[i] = dacBuffer16[i];
    -
    187  }else
    -
    188  if(dacBitsPerSample == 10){
    -
    189  realBuf[i] = dacBuffer16[i] << 2;
    -
    190  }else{
    -
    191  realBuf[i] = dacBuffer[i] << 4;
    -
    192  }
    -
    193  if(dacChannel == 2){
    -
    194  dacChan = !dacChan;
    -
    195  }else{
    -
    196  dacChan = dacChannel;
    -
    197  }
    -
    198 
    -
    199  realBuf[i] = (realBuf[i]& ~0x3000) | dacChan << 12;
    -
    200  }
    -
    201 
    -
    202  dacNumSamples = samples;
    -
    203  dataReady = 0;
    -
    204  dacc_enable_interrupt(DACC, DACC_IER_ENDTX);
    -
    205 }
    -
    206 
    -
    207 /****************************************************************************/
    -
    208 /* Private Functions */
    -
    209 /****************************************************************************/
    -
    210 
    -
    211 void AutoAnalog::dacBufferStereo(uint8_t dacChannel){
    -
    212 
    -
    213 
    -
    214 
    -
    215 }
    -
    216 
    -
    217 /****************************************************************************/
    -
    218 
    -
    219 uint32_t AutoAnalog::frequencyToTimerCount(uint32_t frequency){
    -
    220  return VARIANT_MCK / 2UL / frequency;
    -
    221 }
    -
    222 
    -
    223 /****************************************************************************/
    -
    224 
    -
    225 void AutoAnalog::adcSetup(void){
    -
    226 
    -
    227  pmc_enable_periph_clk(ID_ADC); //power management controller told to turn on adc
    -
    228 
    -
    229  ADC->ADC_IDR = 0xFFFFFFFF ; // disable interrupts
    -
    230  ADC->ADC_IDR = 0xFFFFFFFF;
    -
    231  ADC->ADC_CHDR = 0xFFFF ; // disable all channels
    -
    232  ADC->ADC_CHER = 0x80 ; // enable just A0
    -
    233  ADC->ADC_CGR = 0x15555555 ; // All gains set to x1
    -
    234  ADC->ADC_COR = 0x00000000 ; // All offsets off
    -
    235 
    -
    236  ADC->ADC_MR = (ADC->ADC_MR & 0x0F00FF00) | 1 << 2 | ADC_MR_TRGEN;//& ~ADC_MR_SLEEP & ~ADC_MR_FWUP // 1 = trig source TIO from TC0
    -
    237  //ADC->ADC_MR = (ADC->ADC_MR & 0xFF00FF00);
    -
    238  //ADC->ADC_MR |= ADC_MR_LOWRES;
    -
    239  //MR Prescalar = 255 ADCClock == 84mhz / ( (256) * 2) == ?? MIN is 1Mhz
    -
    240  //ADC->ADC_MR |= 5 << 8; //Prescalar ? sets ADC Clock to 1,615,384.6 hz, 5 is 7mhz
    -
    241  //ADC->ADC_MR |= 3 << 20; //Settling time, full is 17ADC Clocks, 411,764.7hz, 9 is 179487.2, 5
    -
    242  //ADC->ADC_MR |= 1; //51470.6hz
    -
    243 
    -
    244  ADC->ADC_PTCR=ADC_PTCR_RXTEN;
    -
    245 }
    -
    246 
    -
    247 /****************************************************************************/
    -
    248 
    -
    249 void AutoAnalog::adcInterrupts(bool enabled){
    -
    250  NVIC_DisableIRQ(ADC_IRQn);
    -
    251  if(enabled){
    -
    252  NVIC_ClearPendingIRQ(ADC_IRQn);
    -
    253  NVIC_EnableIRQ(ADC_IRQn);
    -
    254  adc_enable_interrupt(ADC,ADC_IER_ENDRX);
    -
    255  }
    -
    256 }
    -
    257 
    -
    258 /****************************************************************************/
    -
    259 
    -
    260 void AutoAnalog::dacSetup(void){
    -
    261 
    -
    262  pmc_enable_periph_clk (DACC_INTERFACE_ID) ; // start clocking DAC
    -
    263  dacc_reset(DACC);
    -
    264  dacc_set_transfer_mode(DACC, 0);
    -
    265  dacc_set_power_save(DACC, 0, 0);
    -
    266  dacc_set_analog_control(DACC, DACC_ACR_IBCTLCH0(0x02) | DACC_ACR_IBCTLCH1(0x02) | DACC_ACR_IBCTLDACCORE(0x01));
    -
    267  dacc_set_trigger(DACC, 1);
    -
    268 
    -
    269  //dacc_set_channel_selection(DACC, 0);
    -
    270  dacc_enable_channel(DACC, 0);
    -
    271  dacc_enable_channel(DACC, 1);
    -
    272 
    -
    273  DACC->DACC_MR |= 1<<8; // Refresh period of 24.3uS (1024*REFRESH/DACC Clock)
    -
    274  DACC->DACC_MR |= 1<<21;// Max speed bit
    -
    275  DACC->DACC_MR |= 1<<20;// TAG mode
    -
    276  //DACC->DACC_MR |= 2 << 24;
    -
    277 
    -
    278 
    -
    279  //Serial.println(DACC->DACC_CDR,BIN);
    -
    280 
    -
    281  NVIC_DisableIRQ(DACC_IRQn);
    -
    282  NVIC_ClearPendingIRQ(DACC_IRQn);
    -
    283  NVIC_EnableIRQ(DACC_IRQn);
    -
    284  dacc_enable_interrupt(DACC, DACC_IER_ENDTX);
    -
    285 
    -
    286 
    -
    287  //dacc_enable_interrupt(DACC, DACC_IER_TXRDY);
    -
    288  //dacc_enable_interrupt(DACC, DACC_IER_EOC);
    -
    289 
    -
    290  //NVIC_SetPriority(TC0_IRQn,5);
    -
    291  //NVIC_SetPriority(DACC_IRQn,5);
    -
    292  //NVIC_SetPriority(ADC_IRQn,5);
    -
    293 }
    -
    294 
    -
    295 /****************************************************************************/
    -
    296 
    -
    297 void AutoAnalog::disableDAC(bool withinTask){dacc_disable_interrupt(DACC, DACC_IER_ENDTX);}
    -
    298 
    -
    299 /****************************************************************************/
    -
    300 
    -
    301 void AutoAnalog::dacHandler(void){
    -
    302 
    -
    303 
    -
    304  uint32_t status = dacc_get_interrupt_status(DACC);
    -
    305 
    -
    306  if((status & DACC_ISR_ENDTX) == DACC_ISR_ENDTX) {
    -
    307 
    -
    308  if(dataReady < 1){
    -
    309 
    -
    310  if(whichDac){
    -
    311  DACC->DACC_TPR = (uint32_t)realBuf;
    -
    312  DACC->DACC_TCR = dacNumSamples;
    -
    313  DACC->DACC_PTCR = DACC_PTCR_TXTEN;
    -
    314  }else{
    -
    315  DACC->DACC_TNPR = (uint32_t)realBuf;
    -
    316  DACC->DACC_TNCR = dacNumSamples;
    -
    317  DACC->DACC_PTCR = DACC_PTCR_TXTEN;
    -
    318  }
    -
    319 
    -
    320  whichDac = !whichDac;
    -
    321  dataReady = 1;
    -
    322 
    -
    323  }else{
    -
    324  dacc_disable_interrupt(DACC, DACC_IER_ENDTX);
    -
    325  if(autoAdjust && adjustCtr == 0){
    -
    326  TcChannel * t = &TC0->TC_CHANNEL[0];
    -
    327  tcTicks+=1;
    -
    328  tcSetup();
    -
    329  }
    -
    330  }
    -
    331  }
    -
    332 }
    -
    333 
    -
    334 /****************************************************************************/
    -
    335 
    -
    336 void AutoAnalog::tcSetup (uint32_t sampRate){
    -
    337 
    -
    338  if(sampRate > 0){
    -
    339  tcTicks = frequencyToTimerCount(sampRate);
    -
    340  sampleCount = 0;
    -
    341  }
    -
    342 
    -
    343  pmc_enable_periph_clk(TC_INTERFACE_ID);
    -
    344 
    -
    345  Tc * tc = TC0;
    -
    346  TcChannel * t = &tc->TC_CHANNEL[0];
    -
    347  t->TC_CCR = TC_CCR_CLKDIS;
    -
    348  t->TC_IDR = 0xFFFFFFFF;
    -
    349  t->TC_SR;
    -
    350  t->TC_RC = tcTicks;
    -
    351  t->TC_RA = tcTicks /2;
    -
    352  t->TC_CMR = TC_CMR_TCCLKS_TIMER_CLOCK1 |
    -
    353  TC_CMR_WAVE |
    -
    354  TC_CMR_WAVSEL_UP_RC;
    -
    355  t->TC_CMR = (t->TC_CMR & 0xFFF0FFFF) | TC_CMR_ACPA_CLEAR | TC_CMR_ACPC_SET;
    -
    356  t->TC_CCR = TC_CCR_CLKEN | TC_CCR_SWTRG;
    -
    357 
    -
    358 }
    -
    359 
    -
    360 /****************************************************************************/
    -
    361 
    -
    362 void AutoAnalog::tc2Setup (uint32_t sampRate)
    -
    363 {
    -
    364 
    -
    365  if(sampRate > 0){
    -
    366  tcTicks2 = frequencyToTimerCount(sampRate);
    -
    367  sampleCount = 0;
    -
    368  }
    -
    369 
    -
    370  pmc_enable_periph_clk(TC_INTERFACE_ID+1);
    -
    371 
    -
    372  Tc * tc = TC0;
    -
    373  TcChannel * tt = &tc->TC_CHANNEL[1];
    -
    374  tt->TC_CCR = TC_CCR_CLKDIS;
    -
    375  tt->TC_IDR = 0xFFFFFFFF;
    -
    376  tt->TC_SR;
    -
    377  tt->TC_RC = tcTicks2;
    -
    378  tt->TC_RA = tcTicks2 / 2;
    -
    379  tt->TC_CMR = TC_CMR_TCCLKS_TIMER_CLOCK1 | TC_CMR_WAVE | TC_CMR_WAVSEL_UP_RC;
    -
    380  tt->TC_CMR = (tt->TC_CMR & 0xFFF0FFFF) | TC_CMR_ACPA_CLEAR | TC_CMR_ACPC_SET;
    -
    381  tt->TC_CCR = TC_CCR_CLKEN | TC_CCR_SWTRG;
    -
    382 
    -
    383 }
    -
    384 
    -
    385 /****************************************************************************/
    -
    386 
    -
    387 
    -
    388 
    -
    389 #endif //#if defined (ARDUINO_ARCH_SAM)
    -
    #define DEFAULT_FREQUENCY
    -
    #define MAX_BUFFER_SIZE
    -
    void adcInterrupts(bool enabled=true)
    -
    void dacHandler(void)
    -
    uint8_t dacBitsPerSample
    -
    uint8_t adcBuffer[MAX_BUFFER_SIZE]
    - - -
    uint8_t dacBuffer[MAX_BUFFER_SIZE]
    -
    void getADC(uint32_t samples=MAX_BUFFER_SIZE)
    -
    uint16_t adcBuffer16[MAX_BUFFER_SIZE]
    -
    void disableDAC(bool withinTask=false)
    -
    uint16_t dacBuffer16[MAX_BUFFER_SIZE]
    -
    void setSampleRate(uint32_t sampRate=0, bool stereo=true)
    -
    void enableAdcChannel(uint8_t pinAx)
    -
    void feedDAC(uint8_t dacChannel=0, uint32_t samples=MAX_BUFFER_SIZE, bool startInterrupts=false)
    -
    uint8_t adcBitsPerSample
    -
    void triggerADC()
    -
    void begin(bool enADC, bool enDAC)
    -
    void disableAdcChannel(uint8_t pinAx)
    -
    - - - - diff --git a/search/all_0.js b/search/all_0.js index b3f9590..8ade544 100644 --- a/search/all_0.js +++ b/search/all_0.js @@ -3,17 +3,13 @@ var searchData= ['aaa_5fchannel0_0',['AAA_CHANNEL0',['../AutoAnalogAudio_8h.html#a97475d07967046efdeaea99d160d55cf',1,'AutoAnalogAudio.h']]], ['aaa_5fchannel1_1',['AAA_CHANNEL1',['../AutoAnalogAudio_8h.html#a6bb2eff4f0118bacdf5103cf97fcc125',1,'AutoAnalogAudio.h']]], ['aaa_5fmode_5fstereo_2',['AAA_MODE_STEREO',['../AutoAnalogAudio_8h.html#a96a94533ce3ba3de2eab562ba43883b3',1,'AutoAnalogAudio.h']]], - ['adc_5fhandler_3',['ADC_Handler',['../myRecording_8h.html#ada953331e0adc056867e918bc80ce8a5',1,'myRecording.h']]], - ['adcbitspersample_4',['adcBitsPerSample',['../classAutoAnalog.html#adf54b09207afbc94726a48642e3b611a',1,'AutoAnalog']]], - ['adcbuffer_5',['adcBuffer',['../classAutoAnalog.html#a257d95cf5a0b43deaef32b761fc25792',1,'AutoAnalog']]], - ['adcbuffer16_6',['adcBuffer16',['../classAutoAnalog.html#a64b99ccc41ac44398397f12c89d292f3',1,'AutoAnalog']]], - ['adcinterrupts_7',['adcInterrupts',['../classAutoAnalog.html#a04a015a15f13e2fdac6cc193d2818259',1,'AutoAnalog']]], - ['audiofile_8',['audioFile',['../wirelessSpeaker_8cpp.html#aeb55d028079e845b63a47487a559a265',1,'audioFile(): wirelessSpeaker.cpp'],['../radioRelay_8cpp.html#aeb55d028079e845b63a47487a559a265',1,'audioFile(): radioRelay.cpp']]], - ['audioformat_9',['audioFormat',['../structwavStruct.html#ab9930c579e2f3d5b4f87d8c7cb9216f2',1,'wavStruct']]], - ['autoadjust_10',['autoAdjust',['../classAutoAnalog.html#a34814ebff21d9b602f1f33503c070a54',1,'AutoAnalog']]], - ['autoanalog_11',['AutoAnalog',['../classAutoAnalog.html',1,'AutoAnalog'],['../classAutoAnalog.html#a3667d5820bc647c87517c1eaea8ff722',1,'AutoAnalog::AutoAnalog()']]], - ['autoanalog_5fconfig_2eh_12',['AutoAnalog_config.h',['../AutoAnalog__config_8h.html',1,'']]], - ['autoanalogaudio_2ecpp_13',['AutoAnalogAudio.cpp',['../sam_2AutoAnalogAudio_8cpp.html',1,'(Global Namespace)'],['../esp32_2AutoAnalogAudio_8cpp.html',1,'(Global Namespace)'],['../avr_2AutoAnalogAudio_8cpp.html',1,'(Global Namespace)']]], - ['autoanalogaudio_2eh_14',['AutoAnalogAudio.h',['../AutoAnalogAudio_8h.html',1,'']]], - ['automatic_20analog_20audio_20library_20for_20arduino_15',['Automatic Analog Audio Library for Arduino',['../index.html',1,'']]] + ['adcbitspersample_3',['adcBitsPerSample',['../classAutoAnalog.html#adf54b09207afbc94726a48642e3b611a',1,'AutoAnalog']]], + ['adcbuffer_4',['adcBuffer',['../classAutoAnalog.html#a257d95cf5a0b43deaef32b761fc25792',1,'AutoAnalog']]], + ['adcbuffer16_5',['adcBuffer16',['../classAutoAnalog.html#a64b99ccc41ac44398397f12c89d292f3',1,'AutoAnalog']]], + ['adcinterrupts_6',['adcInterrupts',['../classAutoAnalog.html#a04a015a15f13e2fdac6cc193d2818259',1,'AutoAnalog']]], + ['autoadjust_7',['autoAdjust',['../classAutoAnalog.html#a34814ebff21d9b602f1f33503c070a54',1,'AutoAnalog']]], + ['autoanalog_8',['AutoAnalog',['../classAutoAnalog.html',1,'AutoAnalog'],['../classAutoAnalog.html#a3667d5820bc647c87517c1eaea8ff722',1,'AutoAnalog::AutoAnalog()']]], + ['autoanalogaudio_2ecpp_9',['AutoAnalogAudio.cpp',['../AutoAnalogAudio_8cpp.html',1,'']]], + ['autoanalogaudio_2eh_10',['AutoAnalogAudio.h',['../AutoAnalogAudio_8h.html',1,'']]], + ['automatic_20analog_20audio_20library_20for_20arduino_11',['Automatic Analog Audio Library for Arduino',['../index.html',1,'']]] ]; diff --git a/search/all_1.js b/search/all_1.js index 4fbdcc4..4b1c464 100644 --- a/search/all_1.js +++ b/search/all_1.js @@ -1,8 +1,4 @@ var searchData= [ - ['begin_16',['begin',['../classAutoAnalog.html#af050f10f4589e38907f4776bb49b0e07',1,'AutoAnalog']]], - ['bitspersample_17',['bitsPerSample',['../structwavStruct.html#a649c279336b4d4e015d40843b171aca0',1,'wavStruct']]], - ['blockalign_18',['blockAlign',['../structwavStruct.html#a8f84ef76f9cda4505e663e6899756a72',1,'wavStruct']]], - ['bufr_19',['bufR',['../radioRelay_8cpp.html#a51ee633ac58c12ea248bbd19f56083a2',1,'bufR(): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#a51ee633ac58c12ea248bbd19f56083a2',1,'bufR(): wirelessSpeaker.cpp']]], - ['byterate_20',['byteRate',['../structwavStruct.html#a53216ad90372c322e87ef53a02c1ce77',1,'wavStruct']]] + ['begin_12',['begin',['../classAutoAnalog.html#af050f10f4589e38907f4776bb49b0e07',1,'AutoAnalog']]] ]; diff --git a/search/all_10.html b/search/all_10.html deleted file mode 100644 index 3bf1196..0000000 --- a/search/all_10.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_10.js b/search/all_10.js deleted file mode 100644 index d7d05f9..0000000 --- a/search/all_10.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['wavstruct_79',['wavStruct',['../structwavStruct.html',1,'']]], - ['wirelessspeaker_2ecpp_80',['wirelessSpeaker.cpp',['../wirelessSpeaker_8cpp.html',1,'']]], - ['writes_81',['writes',['../radioRelay_8cpp.html#a507ae215097affc6f14d232dcfd39db0',1,'writes(): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#a507ae215097affc6f14d232dcfd39db0',1,'writes(): wirelessSpeaker.cpp']]] -]; diff --git a/search/all_2.js b/search/all_2.js index c2dc569..4edb528 100644 --- a/search/all_2.js +++ b/search/all_2.js @@ -1,8 +1,11 @@ var searchData= [ - ['channelselection_21',['channelSelection',['../ESP32_2ESP32__AudioTest_2myWAV_8h.html#a8014c4ccf4648c5d80ea94067df04f63',1,'channelSelection(): myWAV.h'],['../SDAudio_2SdAudioRecording_2myWAV_8h.html#a8014c4ccf4648c5d80ea94067df04f63',1,'channelSelection(): myWAV.h'],['../SDAudio_2SdAudioWavPlayer_2myWAV_8h.html#a8014c4ccf4648c5d80ea94067df04f63',1,'channelSelection(): myWAV.h']]], - ['chunkid_22',['chunkID',['../structwavStruct.html#a346dee1d280bde886ebe0a7ced927447',1,'wavStruct']]], - ['chunksize_23',['chunkSize',['../structwavStruct.html#acdbd8eafa546e65f2a2dea3ef307048d',1,'wavStruct']]], - ['counter_24',['counter',['../myRecording_8h.html#a51322ddb267b4729d6b5f2bb05d49fff',1,'myRecording.h']]], - ['createwavheader_25',['createWavHeader',['../myRecording_8h.html#a3989c22db7ebadee5e79bf69bf3be25f',1,'myRecording.h']]] + ['dacbitspersample_13',['dacBitsPerSample',['../classAutoAnalog.html#a122737d7a251d9da00ecf02be72c2e18',1,'AutoAnalog']]], + ['dacbuffer_14',['dacBuffer',['../classAutoAnalog.html#a4b5f46afb8f50e9bc28431cd467ee8bf',1,'AutoAnalog']]], + ['dacbuffer16_15',['dacBuffer16',['../classAutoAnalog.html#a85377e5dc495fdbd129db30c6c88ca71',1,'AutoAnalog']]], + ['dachandler_16',['dacHandler',['../classAutoAnalog.html#a0bf0cb2ddbf79748887551f09a7932ec',1,'AutoAnalog']]], + ['dacinterrupts_17',['dacInterrupts',['../classAutoAnalog.html#aa689bffc34485c3fc6cddfdd01ca399b',1,'AutoAnalog']]], + ['dactaskhandle_18',['dacTaskHandle',['../classAutoAnalog.html#a58ffe6c35c52bf503720a89546ad6d61',1,'AutoAnalog']]], + ['disableadcchannel_19',['disableAdcChannel',['../classAutoAnalog.html#af23ab64cf3d4881f55ba1d5c0b1d607b',1,'AutoAnalog']]], + ['disabledac_20',['disableDAC',['../classAutoAnalog.html#a7936ca7efd99bb3a66ece6115893af94',1,'AutoAnalog']]] ]; diff --git a/search/all_3.js b/search/all_3.js index 1fc5139..c82711d 100644 --- a/search/all_3.js +++ b/search/all_3.js @@ -1,14 +1,4 @@ var searchData= [ - ['dac0_5fpin_26',['DAC0_PIN',['../AutoAnalog__config_8h.html#a431ff7ca78dcb48da953b539d76b67e9',1,'AutoAnalog_config.h']]], - ['dac1_5fpin_27',['DAC1_PIN',['../AutoAnalog__config_8h.html#aadce927c4d67b0d0e59b1c134ff3eb3d',1,'AutoAnalog_config.h']]], - ['dacbitspersample_28',['dacBitsPerSample',['../classAutoAnalog.html#a122737d7a251d9da00ecf02be72c2e18',1,'AutoAnalog']]], - ['dacbuffer_29',['dacBuffer',['../classAutoAnalog.html#a4b5f46afb8f50e9bc28431cd467ee8bf',1,'AutoAnalog']]], - ['dacbuffer16_30',['dacBuffer16',['../classAutoAnalog.html#a85377e5dc495fdbd129db30c6c88ca71',1,'AutoAnalog']]], - ['dacc_5fhandler_31',['DACC_Handler',['../ESP32_2ESP32__AudioTest_2myWAV_8h.html#a4e5ace3081c1889b911e460ec4a1dbd2',1,'DACC_Handler(void): myWAV.h'],['../SDAudio_2SdAudioRecording_2myWAV_8h.html#a4e5ace3081c1889b911e460ec4a1dbd2',1,'DACC_Handler(void): myWAV.h'],['../SDAudio_2SdAudioWavPlayer_2myWAV_8h.html#a4e5ace3081c1889b911e460ec4a1dbd2',1,'DACC_Handler(void): myWAV.h']]], - ['dachandler_32',['dacHandler',['../classAutoAnalog.html#a0bf0cb2ddbf79748887551f09a7932ec',1,'AutoAnalog']]], - ['dacinterrupts_33',['dacInterrupts',['../classAutoAnalog.html#aa689bffc34485c3fc6cddfdd01ca399b',1,'AutoAnalog']]], - ['default_5ffrequency_34',['DEFAULT_FREQUENCY',['../AutoAnalog__config_8h.html#a052b63090cda80236391c5fc0c1fe30c',1,'AutoAnalog_config.h']]], - ['disableadcchannel_35',['disableAdcChannel',['../classAutoAnalog.html#af23ab64cf3d4881f55ba1d5c0b1d607b',1,'AutoAnalog']]], - ['disabledac_36',['disableDAC',['../classAutoAnalog.html#a7936ca7efd99bb3a66ece6115893af94',1,'AutoAnalog']]] + ['enableadcchannel_21',['enableAdcChannel',['../classAutoAnalog.html#ab0f3ceccd76b77c0a6e407ba92f42346',1,'AutoAnalog']]] ]; diff --git a/search/all_4.js b/search/all_4.js index 76b9e8a..b456b55 100644 --- a/search/all_4.js +++ b/search/all_4.js @@ -1,5 +1,4 @@ var searchData= [ - ['enableadcchannel_37',['enableAdcChannel',['../classAutoAnalog.html#ab0f3ceccd76b77c0a6e407ba92f42346',1,'AutoAnalog']]], - ['endposition_38',['endPosition',['../ESP32_2ESP32__AudioTest_2myWAV_8h.html#a3fc7d72297512a5563c67a45a56a4153',1,'myWAV.h']]] + ['feeddac_22',['feedDAC',['../classAutoAnalog.html#ad6728b5d90528b5817c1b8aa661de5e5',1,'AutoAnalog']]] ]; diff --git a/search/all_5.js b/search/all_5.js index 005fa06..bf98917 100644 --- a/search/all_5.js +++ b/search/all_5.js @@ -1,6 +1,4 @@ var searchData= [ - ['fail_39',['fail',['../AudioRadioRelay_2myRadio_8h.html#a0a4001078da73398d49b9470fcccb48a',1,'fail(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#a0a4001078da73398d49b9470fcccb48a',1,'fail(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#a0a4001078da73398d49b9470fcccb48a',1,'fail(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#a0a4001078da73398d49b9470fcccb48a',1,'fail(): myRadio.h']]], - ['feeddac_40',['feedDAC',['../classAutoAnalog.html#ad6728b5d90528b5817c1b8aa661de5e5',1,'AutoAnalog']]], - ['format_41',['format',['../structwavStruct.html#acd9b4d0d807fc2a1d896ee0fc4aaecd3',1,'wavStruct']]] + ['getadc_23',['getADC',['../classAutoAnalog.html#a61f2ceee4ff61ec9323a30a6c44ab504',1,'AutoAnalog']]] ]; diff --git a/search/all_6.js b/search/all_6.js index d690dd8..cf18d20 100644 --- a/search/all_6.js +++ b/search/all_6.js @@ -1,4 +1,5 @@ var searchData= [ - ['getadc_42',['getADC',['../classAutoAnalog.html#a61f2ceee4ff61ec9323a30a6c44ab504',1,'AutoAnalog']]] + ['rampin_24',['rampIn',['../classAutoAnalog.html#a20472840f8cd85e9a41a5a968f522d23',1,'AutoAnalog']]], + ['rampout_25',['rampOut',['../classAutoAnalog.html#a6a49d5ac89bf8edbc8e91f9686099dbc',1,'AutoAnalog']]] ]; diff --git a/search/all_7.js b/search/all_7.js index e1d0aa9..bd11805 100644 --- a/search/all_7.js +++ b/search/all_7.js @@ -1,4 +1,4 @@ var searchData= [ - ['inthandler_43',['intHandler',['../radioRelay_8cpp.html#af7f8daedc0d0ef054185df4c8bd6e492',1,'intHandler(): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#af7f8daedc0d0ef054185df4c8bd6e492',1,'intHandler(): radioRelay.cpp']]] + ['setsamplerate_26',['setSampleRate',['../classAutoAnalog.html#a99cfa2255a20289a00274d3ead8d1f6e',1,'AutoAnalog']]] ]; diff --git a/search/all_8.js b/search/all_8.js index 1fdad2b..e7887e4 100644 --- a/search/all_8.js +++ b/search/all_8.js @@ -1,4 +1,4 @@ var searchData= [ - ['loadbuffer_44',['loadBuffer',['../ESP32_2ESP32__AudioTest_2myWAV_8h.html#ab2b78c4d809057c8fa3d4074d99a33e6',1,'loadBuffer(): myWAV.h'],['../SDAudio_2SdAudioRecording_2myWAV_8h.html#ab2b78c4d809057c8fa3d4074d99a33e6',1,'loadBuffer(): myWAV.h'],['../SDAudio_2SdAudioWavPlayer_2myWAV_8h.html#ab2b78c4d809057c8fa3d4074d99a33e6',1,'loadBuffer(): myWAV.h']]] + ['triggeradc_27',['triggerADC',['../classAutoAnalog.html#aedd70fc9f6f130c32ccb015b670f5318',1,'AutoAnalog']]] ]; diff --git a/search/all_9.html b/search/all_9.html deleted file mode 100644 index 1e263c1..0000000 --- a/search/all_9.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_9.js b/search/all_9.js deleted file mode 100644 index 6f7861c..0000000 --- a/search/all_9.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['main_45',['main',['../radioRelay_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): wirelessSpeaker.cpp']]], - ['makefile_46',['Makefile',['../Makefile.html',1,'']]], - ['max_5fbuffer_5fsize_47',['MAX_BUFFER_SIZE',['../AutoAnalog__config_8h.html#ad4d796b98c583d49e83adabd74a63bf6',1,'AutoAnalog_config.h']]], - ['myradio_2eh_48',['myRadio.h',['../AudioRadioRelay_2myRadio_8h.html',1,'(Global Namespace)'],['../SimpleSine_2myRadio_8h.html',1,'(Global Namespace)'],['../WirelessMicrophone_2myRadio_8h.html',1,'(Global Namespace)'],['../WirelessSpeaker_2myRadio_8h.html',1,'(Global Namespace)']]], - ['myrecording_2eh_49',['myRecording.h',['../myRecording_8h.html',1,'']]], - ['mysine_2eh_50',['mySine.h',['../mySine_8h.html',1,'']]], - ['mywav_2eh_51',['myWAV.h',['../ESP32_2ESP32__AudioTest_2myWAV_8h.html',1,'(Global Namespace)'],['../SDAudio_2SdAudioRecording_2myWAV_8h.html',1,'(Global Namespace)'],['../SDAudio_2SdAudioWavPlayer_2myWAV_8h.html',1,'(Global Namespace)']]] -]; diff --git a/search/all_a.html b/search/all_a.html deleted file mode 100644 index 3a6cac1..0000000 --- a/search/all_a.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_a.js b/search/all_a.js deleted file mode 100644 index 4305e99..0000000 --- a/search/all_a.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['numchannels_52',['numChannels',['../structwavStruct.html#a18fe2dc1d4211c2f43e776fcc36a7215',1,'wavStruct']]] -]; diff --git a/search/all_b.html b/search/all_b.html deleted file mode 100644 index 130deb4..0000000 --- a/search/all_b.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_b.js b/search/all_b.js deleted file mode 100644 index 7921031..0000000 --- a/search/all_b.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['pipeno_53',['pipeNo',['../AudioRadioRelay_2myRadio_8h.html#a55e5cc60176f662c9c5060e7a21813a0',1,'pipeNo(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#a55e5cc60176f662c9c5060e7a21813a0',1,'pipeNo(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#a55e5cc60176f662c9c5060e7a21813a0',1,'pipeNo(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#a55e5cc60176f662c9c5060e7a21813a0',1,'pipeNo(): myRadio.h']]], - ['pipes_54',['pipes',['../AudioRadioRelay_2myRadio_8h.html#a7f088b1645731f3771cdd4b766b17262',1,'pipes(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#a7f088b1645731f3771cdd4b766b17262',1,'pipes(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#a7f088b1645731f3771cdd4b766b17262',1,'pipes(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#a7f088b1645731f3771cdd4b766b17262',1,'pipes(): myRadio.h'],['../radioRelay_8cpp.html#a7f088b1645731f3771cdd4b766b17262',1,'pipes(): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#a7f088b1645731f3771cdd4b766b17262',1,'pipes(): wirelessSpeaker.cpp']]], - ['playaudio_55',['playAudio',['../ESP32_2ESP32__AudioTest_2myWAV_8h.html#a8b5e339ad4f30b0119d65d6b1cbed40d',1,'playAudio(const char *audioFile): myWAV.h'],['../SDAudio_2SdAudioRecording_2myWAV_8h.html#a8b5e339ad4f30b0119d65d6b1cbed40d',1,'playAudio(const char *audioFile): myWAV.h'],['../SDAudio_2SdAudioWavPlayer_2myWAV_8h.html#aa616f2ebb537598077ecc25029cdc8f5',1,'playAudio(char *audioFile): myWAV.h']]] -]; diff --git a/search/all_c.html b/search/all_c.html deleted file mode 100644 index 3dd5af0..0000000 --- a/search/all_c.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_c.js b/search/all_c.js deleted file mode 100644 index 791fe20..0000000 --- a/search/all_c.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['radio_56',['radio',['../AudioRadioRelay_2myRadio_8h.html#a771b97fa1e21682b39948f2978229a0b',1,'radio(radioCEPin, radioCSPin): myRadio.h'],['../SimpleSine_2myRadio_8h.html#acec3bd1a95deddaf2b9ec088482bf555',1,'radio(46, 52): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#acec3bd1a95deddaf2b9ec088482bf555',1,'radio(46, 52): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#acec3bd1a95deddaf2b9ec088482bf555',1,'radio(46, 52): myRadio.h'],['../radioRelay_8cpp.html#a5532258cd0ecd1ad2497775a64aa3a2b',1,'radio(25, 0): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#a5532258cd0ecd1ad2497775a64aa3a2b',1,'radio(25, 0): wirelessSpeaker.cpp']]], - ['radiorelay_2ecpp_57',['radioRelay.cpp',['../radioRelay_8cpp.html',1,'']]], - ['reads_58',['reads',['../wirelessSpeaker_8cpp.html#abfb6af9133722c93d469d8ba887534ec',1,'reads(): wirelessSpeaker.cpp'],['../radioRelay_8cpp.html#abfb6af9133722c93d469d8ba887534ec',1,'reads(): radioRelay.cpp']]], - ['rx_59',['RX',['../AudioRadioRelay_2myRadio_8h.html#a83c842c62d349a53b8ab92de31655d65',1,'RX(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#a83c842c62d349a53b8ab92de31655d65',1,'RX(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#a83c842c62d349a53b8ab92de31655d65',1,'RX(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#a83c842c62d349a53b8ab92de31655d65',1,'RX(): myRadio.h']]], - ['rx_60',['rx',['../AudioRadioRelay_2myRadio_8h.html#afd7e1b908d70e52f7dd4a98ec79829b9',1,'rx(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#afd7e1b908d70e52f7dd4a98ec79829b9',1,'rx(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#afd7e1b908d70e52f7dd4a98ec79829b9',1,'rx(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#afd7e1b908d70e52f7dd4a98ec79829b9',1,'rx(): myRadio.h']]] -]; diff --git a/search/all_d.html b/search/all_d.html deleted file mode 100644 index af7f2f0..0000000 --- a/search/all_d.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_d.js b/search/all_d.js deleted file mode 100644 index 2da5d94..0000000 --- a/search/all_d.js +++ /dev/null @@ -1,15 +0,0 @@ -var searchData= -[ - ['samplerate_61',['sampleRate',['../structwavStruct.html#a0545b5a56a2f54e4e3b585f79311288e',1,'wavStruct']]], - ['setsamplerate_62',['setSampleRate',['../classAutoAnalog.html#a99cfa2255a20289a00274d3ead8d1f6e',1,'AutoAnalog']]], - ['setupradio_63',['setupRadio',['../AudioRadioRelay_2myRadio_8h.html#aa39131205ee0bc5bc10475636c635ebf',1,'setupRadio(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#aa39131205ee0bc5bc10475636c635ebf',1,'setupRadio(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#aa39131205ee0bc5bc10475636c635ebf',1,'setupRadio(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#aa39131205ee0bc5bc10475636c635ebf',1,'setupRadio(): myRadio.h']]], - ['sinesetup16_64',['sineSetup16',['../mySine_8h.html#acbd2b31894e02adcf6f0f8099177c28b',1,'mySine.h']]], - ['sinesetup8_65',['sineSetup8',['../mySine_8h.html#ae44a938e186c2e77dd0163fd152f0293',1,'mySine.h']]], - ['startrecording_66',['startRecording',['../myRecording_8h.html#a4ea53321b85f86e188fd80d36c9189ed',1,'myRecording.h']]], - ['stoprecording_67',['stopRecording',['../myRecording_8h.html#abc4265fd9d0dfc06a3a6acb4ab597fb0',1,'myRecording.h']]], - ['subchunk2id_68',['subChunk2ID',['../structwavStruct.html#a1a756e35b87345883760b4ee76f6d829',1,'wavStruct']]], - ['subchunk2size_69',['subChunk2Size',['../structwavStruct.html#ae4c12d2a733c9a28a3be671c2522fc54',1,'wavStruct']]], - ['subchunkid_70',['subchunkID',['../structwavStruct.html#a3291d263479184a24ec2c9dad9190d78',1,'wavStruct']]], - ['subchunksize_71',['subchunkSize',['../structwavStruct.html#a1c2fe6179f4bae87a4c4794d07011a08',1,'wavStruct']]], - ['sz_72',['sz',['../radioRelay_8cpp.html#a2c1bd10d4bbc82d2d6c052c5842c0c8c',1,'sz(): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#a2c1bd10d4bbc82d2d6c052c5842c0c8c',1,'sz(): wirelessSpeaker.cpp']]] -]; diff --git a/search/all_e.html b/search/all_e.html deleted file mode 100644 index e25df42..0000000 --- a/search/all_e.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_e.js b/search/all_e.js deleted file mode 100644 index f342f7e..0000000 --- a/search/all_e.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['triggeradc_73',['triggerADC',['../classAutoAnalog.html#aedd70fc9f6f130c32ccb015b670f5318',1,'AutoAnalog']]], - ['tx_74',['tx',['../AudioRadioRelay_2myRadio_8h.html#a3b1e88519ca75747960d51b86b2c5e95',1,'tx(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#a3b1e88519ca75747960d51b86b2c5e95',1,'tx(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#a3b1e88519ca75747960d51b86b2c5e95',1,'tx(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#a3b1e88519ca75747960d51b86b2c5e95',1,'tx(): myRadio.h']]] -]; diff --git a/search/all_f.html b/search/all_f.html deleted file mode 100644 index b23da6c..0000000 --- a/search/all_f.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/all_f.js b/search/all_f.js deleted file mode 100644 index 4e01706..0000000 --- a/search/all_f.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['volume_75',['volume',['../volume_8h.html#aeaa6b9d4ebf06bdf8d2dc8728667a81d',1,'volume.h']]], - ['volume_2eh_76',['volume.h',['../volume_8h.html',1,'']]], - ['volumeset_77',['volumeSet',['../volume_8h.html#af534741cba67f1a9f2c5985b218ac36f',1,'volume.h']]], - ['volumevar_78',['volumeVar',['../volume_8h.html#ae519f5749175866b7a85b7f34cabb646',1,'volume.h']]] -]; diff --git a/search/classes_0.js b/search/classes_0.js index 0b02a13..b161744 100644 --- a/search/classes_0.js +++ b/search/classes_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['autoanalog_82',['AutoAnalog',['../classAutoAnalog.html',1,'']]] + ['autoanalog_28',['AutoAnalog',['../classAutoAnalog.html',1,'']]] ]; diff --git a/search/classes_1.html b/search/classes_1.html deleted file mode 100644 index 576e916..0000000 --- a/search/classes_1.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/classes_1.js b/search/classes_1.js deleted file mode 100644 index 1aae435..0000000 --- a/search/classes_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['wavstruct_83',['wavStruct',['../structwavStruct.html',1,'']]] -]; diff --git a/search/defines_0.js b/search/defines_0.js index 18fa152..0c038de 100644 --- a/search/defines_0.js +++ b/search/defines_0.js @@ -1,6 +1,6 @@ var searchData= [ - ['aaa_5fchannel0_157',['AAA_CHANNEL0',['../AutoAnalogAudio_8h.html#a97475d07967046efdeaea99d160d55cf',1,'AutoAnalogAudio.h']]], - ['aaa_5fchannel1_158',['AAA_CHANNEL1',['../AutoAnalogAudio_8h.html#a6bb2eff4f0118bacdf5103cf97fcc125',1,'AutoAnalogAudio.h']]], - ['aaa_5fmode_5fstereo_159',['AAA_MODE_STEREO',['../AutoAnalogAudio_8h.html#a96a94533ce3ba3de2eab562ba43883b3',1,'AutoAnalogAudio.h']]] + ['aaa_5fchannel0_53',['AAA_CHANNEL0',['../AutoAnalogAudio_8h.html#a97475d07967046efdeaea99d160d55cf',1,'AutoAnalogAudio.h']]], + ['aaa_5fchannel1_54',['AAA_CHANNEL1',['../AutoAnalogAudio_8h.html#a6bb2eff4f0118bacdf5103cf97fcc125',1,'AutoAnalogAudio.h']]], + ['aaa_5fmode_5fstereo_55',['AAA_MODE_STEREO',['../AutoAnalogAudio_8h.html#a96a94533ce3ba3de2eab562ba43883b3',1,'AutoAnalogAudio.h']]] ]; diff --git a/search/defines_1.html b/search/defines_1.html deleted file mode 100644 index c49009c..0000000 --- a/search/defines_1.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/defines_1.js b/search/defines_1.js deleted file mode 100644 index 5d6082a..0000000 --- a/search/defines_1.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['dac0_5fpin_160',['DAC0_PIN',['../AutoAnalog__config_8h.html#a431ff7ca78dcb48da953b539d76b67e9',1,'AutoAnalog_config.h']]], - ['dac1_5fpin_161',['DAC1_PIN',['../AutoAnalog__config_8h.html#aadce927c4d67b0d0e59b1c134ff3eb3d',1,'AutoAnalog_config.h']]], - ['default_5ffrequency_162',['DEFAULT_FREQUENCY',['../AutoAnalog__config_8h.html#a052b63090cda80236391c5fc0c1fe30c',1,'AutoAnalog_config.h']]] -]; diff --git a/search/defines_2.html b/search/defines_2.html deleted file mode 100644 index c551011..0000000 --- a/search/defines_2.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/defines_2.js b/search/defines_2.js deleted file mode 100644 index 0468a24..0000000 --- a/search/defines_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['max_5fbuffer_5fsize_163',['MAX_BUFFER_SIZE',['../AutoAnalog__config_8h.html#ad4d796b98c583d49e83adabd74a63bf6',1,'AutoAnalog_config.h']]] -]; diff --git a/search/files_0.js b/search/files_0.js index 1278c02..aed8eb2 100644 --- a/search/files_0.js +++ b/search/files_0.js @@ -1,6 +1,5 @@ var searchData= [ - ['autoanalog_5fconfig_2eh_84',['AutoAnalog_config.h',['../AutoAnalog__config_8h.html',1,'']]], - ['autoanalogaudio_2ecpp_85',['AutoAnalogAudio.cpp',['../avr_2AutoAnalogAudio_8cpp.html',1,'(Global Namespace)'],['../esp32_2AutoAnalogAudio_8cpp.html',1,'(Global Namespace)'],['../sam_2AutoAnalogAudio_8cpp.html',1,'(Global Namespace)']]], - ['autoanalogaudio_2eh_86',['AutoAnalogAudio.h',['../AutoAnalogAudio_8h.html',1,'']]] + ['autoanalogaudio_2ecpp_29',['AutoAnalogAudio.cpp',['../AutoAnalogAudio_8cpp.html',1,'']]], + ['autoanalogaudio_2eh_30',['AutoAnalogAudio.h',['../AutoAnalogAudio_8h.html',1,'']]] ]; diff --git a/search/files_1.html b/search/files_1.html deleted file mode 100644 index 7050ef4..0000000 --- a/search/files_1.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/files_1.js b/search/files_1.js deleted file mode 100644 index dd379ec..0000000 --- a/search/files_1.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['makefile_87',['Makefile',['../Makefile.html',1,'']]], - ['myradio_2eh_88',['myRadio.h',['../AudioRadioRelay_2myRadio_8h.html',1,'(Global Namespace)'],['../SimpleSine_2myRadio_8h.html',1,'(Global Namespace)'],['../WirelessMicrophone_2myRadio_8h.html',1,'(Global Namespace)'],['../WirelessSpeaker_2myRadio_8h.html',1,'(Global Namespace)']]], - ['myrecording_2eh_89',['myRecording.h',['../myRecording_8h.html',1,'']]], - ['mysine_2eh_90',['mySine.h',['../mySine_8h.html',1,'']]], - ['mywav_2eh_91',['myWAV.h',['../ESP32_2ESP32__AudioTest_2myWAV_8h.html',1,'(Global Namespace)'],['../SDAudio_2SdAudioRecording_2myWAV_8h.html',1,'(Global Namespace)'],['../SDAudio_2SdAudioWavPlayer_2myWAV_8h.html',1,'(Global Namespace)']]] -]; diff --git a/search/files_2.html b/search/files_2.html deleted file mode 100644 index 497cdf5..0000000 --- a/search/files_2.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/files_2.js b/search/files_2.js deleted file mode 100644 index c7f55ff..0000000 --- a/search/files_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['radiorelay_2ecpp_92',['radioRelay.cpp',['../radioRelay_8cpp.html',1,'']]] -]; diff --git a/search/files_3.html b/search/files_3.html deleted file mode 100644 index 1ba106b..0000000 --- a/search/files_3.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/files_3.js b/search/files_3.js deleted file mode 100644 index 9b2e768..0000000 --- a/search/files_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['volume_2eh_93',['volume.h',['../volume_8h.html',1,'']]] -]; diff --git a/search/files_4.html b/search/files_4.html deleted file mode 100644 index 753b7b1..0000000 --- a/search/files_4.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/files_4.js b/search/files_4.js deleted file mode 100644 index 8b306d5..0000000 --- a/search/files_4.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['wirelessspeaker_2ecpp_94',['wirelessSpeaker.cpp',['../wirelessSpeaker_8cpp.html',1,'']]] -]; diff --git a/search/functions_0.js b/search/functions_0.js index ff75dec..add9007 100644 --- a/search/functions_0.js +++ b/search/functions_0.js @@ -1,6 +1,5 @@ var searchData= [ - ['adc_5fhandler_95',['ADC_Handler',['../myRecording_8h.html#ada953331e0adc056867e918bc80ce8a5',1,'myRecording.h']]], - ['adcinterrupts_96',['adcInterrupts',['../classAutoAnalog.html#a04a015a15f13e2fdac6cc193d2818259',1,'AutoAnalog']]], - ['autoanalog_97',['AutoAnalog',['../classAutoAnalog.html#a3667d5820bc647c87517c1eaea8ff722',1,'AutoAnalog']]] + ['adcinterrupts_31',['adcInterrupts',['../classAutoAnalog.html#a04a015a15f13e2fdac6cc193d2818259',1,'AutoAnalog']]], + ['autoanalog_32',['AutoAnalog',['../classAutoAnalog.html#a3667d5820bc647c87517c1eaea8ff722',1,'AutoAnalog']]] ]; diff --git a/search/functions_1.js b/search/functions_1.js index 0287a9b..5fb9c03 100644 --- a/search/functions_1.js +++ b/search/functions_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['begin_98',['begin',['../classAutoAnalog.html#af050f10f4589e38907f4776bb49b0e07',1,'AutoAnalog']]] + ['begin_33',['begin',['../classAutoAnalog.html#af050f10f4589e38907f4776bb49b0e07',1,'AutoAnalog']]] ]; diff --git a/search/functions_2.js b/search/functions_2.js index 8e488d9..cb4fdd2 100644 --- a/search/functions_2.js +++ b/search/functions_2.js @@ -1,4 +1,7 @@ var searchData= [ - ['createwavheader_99',['createWavHeader',['../myRecording_8h.html#a3989c22db7ebadee5e79bf69bf3be25f',1,'myRecording.h']]] + ['dachandler_34',['dacHandler',['../classAutoAnalog.html#a0bf0cb2ddbf79748887551f09a7932ec',1,'AutoAnalog']]], + ['dacinterrupts_35',['dacInterrupts',['../classAutoAnalog.html#aa689bffc34485c3fc6cddfdd01ca399b',1,'AutoAnalog']]], + ['disableadcchannel_36',['disableAdcChannel',['../classAutoAnalog.html#af23ab64cf3d4881f55ba1d5c0b1d607b',1,'AutoAnalog']]], + ['disabledac_37',['disableDAC',['../classAutoAnalog.html#a7936ca7efd99bb3a66ece6115893af94',1,'AutoAnalog']]] ]; diff --git a/search/functions_3.js b/search/functions_3.js index 03d542b..0181805 100644 --- a/search/functions_3.js +++ b/search/functions_3.js @@ -1,8 +1,4 @@ var searchData= [ - ['dacc_5fhandler_100',['DACC_Handler',['../ESP32_2ESP32__AudioTest_2myWAV_8h.html#a4e5ace3081c1889b911e460ec4a1dbd2',1,'DACC_Handler(void): myWAV.h'],['../SDAudio_2SdAudioRecording_2myWAV_8h.html#a4e5ace3081c1889b911e460ec4a1dbd2',1,'DACC_Handler(void): myWAV.h'],['../SDAudio_2SdAudioWavPlayer_2myWAV_8h.html#a4e5ace3081c1889b911e460ec4a1dbd2',1,'DACC_Handler(void): myWAV.h']]], - ['dachandler_101',['dacHandler',['../classAutoAnalog.html#a0bf0cb2ddbf79748887551f09a7932ec',1,'AutoAnalog']]], - ['dacinterrupts_102',['dacInterrupts',['../classAutoAnalog.html#aa689bffc34485c3fc6cddfdd01ca399b',1,'AutoAnalog']]], - ['disableadcchannel_103',['disableAdcChannel',['../classAutoAnalog.html#af23ab64cf3d4881f55ba1d5c0b1d607b',1,'AutoAnalog']]], - ['disabledac_104',['disableDAC',['../classAutoAnalog.html#a7936ca7efd99bb3a66ece6115893af94',1,'AutoAnalog']]] + ['enableadcchannel_38',['enableAdcChannel',['../classAutoAnalog.html#ab0f3ceccd76b77c0a6e407ba92f42346',1,'AutoAnalog']]] ]; diff --git a/search/functions_4.js b/search/functions_4.js index 46b9df1..618937b 100644 --- a/search/functions_4.js +++ b/search/functions_4.js @@ -1,4 +1,4 @@ var searchData= [ - ['enableadcchannel_105',['enableAdcChannel',['../classAutoAnalog.html#ab0f3ceccd76b77c0a6e407ba92f42346',1,'AutoAnalog']]] + ['feeddac_39',['feedDAC',['../classAutoAnalog.html#ad6728b5d90528b5817c1b8aa661de5e5',1,'AutoAnalog']]] ]; diff --git a/search/functions_5.js b/search/functions_5.js index 78669db..dd9403d 100644 --- a/search/functions_5.js +++ b/search/functions_5.js @@ -1,4 +1,4 @@ var searchData= [ - ['feeddac_106',['feedDAC',['../classAutoAnalog.html#ad6728b5d90528b5817c1b8aa661de5e5',1,'AutoAnalog']]] + ['getadc_40',['getADC',['../classAutoAnalog.html#a61f2ceee4ff61ec9323a30a6c44ab504',1,'AutoAnalog']]] ]; diff --git a/search/functions_6.js b/search/functions_6.js index 166d782..7ea8b01 100644 --- a/search/functions_6.js +++ b/search/functions_6.js @@ -1,4 +1,5 @@ var searchData= [ - ['getadc_107',['getADC',['../classAutoAnalog.html#a61f2ceee4ff61ec9323a30a6c44ab504',1,'AutoAnalog']]] + ['rampin_41',['rampIn',['../classAutoAnalog.html#a20472840f8cd85e9a41a5a968f522d23',1,'AutoAnalog']]], + ['rampout_42',['rampOut',['../classAutoAnalog.html#a6a49d5ac89bf8edbc8e91f9686099dbc',1,'AutoAnalog']]] ]; diff --git a/search/functions_7.js b/search/functions_7.js index bbf86b1..0ca7da7 100644 --- a/search/functions_7.js +++ b/search/functions_7.js @@ -1,4 +1,4 @@ var searchData= [ - ['inthandler_108',['intHandler',['../radioRelay_8cpp.html#af7f8daedc0d0ef054185df4c8bd6e492',1,'intHandler(): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#af7f8daedc0d0ef054185df4c8bd6e492',1,'intHandler(): radioRelay.cpp']]] + ['setsamplerate_43',['setSampleRate',['../classAutoAnalog.html#a99cfa2255a20289a00274d3ead8d1f6e',1,'AutoAnalog']]] ]; diff --git a/search/functions_8.js b/search/functions_8.js index 24b13a8..0609b9a 100644 --- a/search/functions_8.js +++ b/search/functions_8.js @@ -1,4 +1,4 @@ var searchData= [ - ['loadbuffer_109',['loadBuffer',['../ESP32_2ESP32__AudioTest_2myWAV_8h.html#ab2b78c4d809057c8fa3d4074d99a33e6',1,'loadBuffer(): myWAV.h'],['../SDAudio_2SdAudioRecording_2myWAV_8h.html#ab2b78c4d809057c8fa3d4074d99a33e6',1,'loadBuffer(): myWAV.h'],['../SDAudio_2SdAudioWavPlayer_2myWAV_8h.html#ab2b78c4d809057c8fa3d4074d99a33e6',1,'loadBuffer(): myWAV.h']]] + ['triggeradc_44',['triggerADC',['../classAutoAnalog.html#aedd70fc9f6f130c32ccb015b670f5318',1,'AutoAnalog']]] ]; diff --git a/search/functions_9.html b/search/functions_9.html deleted file mode 100644 index 9a8e429..0000000 --- a/search/functions_9.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_9.js b/search/functions_9.js deleted file mode 100644 index fdbe9a6..0000000 --- a/search/functions_9.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['main_110',['main',['../radioRelay_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): wirelessSpeaker.cpp']]] -]; diff --git a/search/functions_a.html b/search/functions_a.html deleted file mode 100644 index 5ecc152..0000000 --- a/search/functions_a.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_a.js b/search/functions_a.js deleted file mode 100644 index 6f83328..0000000 --- a/search/functions_a.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['playaudio_111',['playAudio',['../ESP32_2ESP32__AudioTest_2myWAV_8h.html#a8b5e339ad4f30b0119d65d6b1cbed40d',1,'playAudio(const char *audioFile): myWAV.h'],['../SDAudio_2SdAudioRecording_2myWAV_8h.html#a8b5e339ad4f30b0119d65d6b1cbed40d',1,'playAudio(const char *audioFile): myWAV.h'],['../SDAudio_2SdAudioWavPlayer_2myWAV_8h.html#aa616f2ebb537598077ecc25029cdc8f5',1,'playAudio(char *audioFile): myWAV.h']]] -]; diff --git a/search/functions_b.html b/search/functions_b.html deleted file mode 100644 index e301fed..0000000 --- a/search/functions_b.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_b.js b/search/functions_b.js deleted file mode 100644 index a45d593..0000000 --- a/search/functions_b.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['radio_112',['radio',['../AudioRadioRelay_2myRadio_8h.html#a771b97fa1e21682b39948f2978229a0b',1,'radio(radioCEPin, radioCSPin): myRadio.h'],['../SimpleSine_2myRadio_8h.html#acec3bd1a95deddaf2b9ec088482bf555',1,'radio(46, 52): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#acec3bd1a95deddaf2b9ec088482bf555',1,'radio(46, 52): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#acec3bd1a95deddaf2b9ec088482bf555',1,'radio(46, 52): myRadio.h'],['../radioRelay_8cpp.html#a5532258cd0ecd1ad2497775a64aa3a2b',1,'radio(25, 0): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#a5532258cd0ecd1ad2497775a64aa3a2b',1,'radio(25, 0): wirelessSpeaker.cpp']]], - ['rx_113',['RX',['../AudioRadioRelay_2myRadio_8h.html#a83c842c62d349a53b8ab92de31655d65',1,'RX(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#a83c842c62d349a53b8ab92de31655d65',1,'RX(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#a83c842c62d349a53b8ab92de31655d65',1,'RX(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#a83c842c62d349a53b8ab92de31655d65',1,'RX(): myRadio.h']]] -]; diff --git a/search/functions_c.html b/search/functions_c.html deleted file mode 100644 index c4f3268..0000000 --- a/search/functions_c.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_c.js b/search/functions_c.js deleted file mode 100644 index c68f407..0000000 --- a/search/functions_c.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['setsamplerate_114',['setSampleRate',['../classAutoAnalog.html#a99cfa2255a20289a00274d3ead8d1f6e',1,'AutoAnalog']]], - ['setupradio_115',['setupRadio',['../AudioRadioRelay_2myRadio_8h.html#aa39131205ee0bc5bc10475636c635ebf',1,'setupRadio(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#aa39131205ee0bc5bc10475636c635ebf',1,'setupRadio(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#aa39131205ee0bc5bc10475636c635ebf',1,'setupRadio(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#aa39131205ee0bc5bc10475636c635ebf',1,'setupRadio(): myRadio.h']]], - ['sinesetup16_116',['sineSetup16',['../mySine_8h.html#acbd2b31894e02adcf6f0f8099177c28b',1,'mySine.h']]], - ['sinesetup8_117',['sineSetup8',['../mySine_8h.html#ae44a938e186c2e77dd0163fd152f0293',1,'mySine.h']]], - ['startrecording_118',['startRecording',['../myRecording_8h.html#a4ea53321b85f86e188fd80d36c9189ed',1,'myRecording.h']]], - ['stoprecording_119',['stopRecording',['../myRecording_8h.html#abc4265fd9d0dfc06a3a6acb4ab597fb0',1,'myRecording.h']]] -]; diff --git a/search/functions_d.html b/search/functions_d.html deleted file mode 100644 index 7a1ed06..0000000 --- a/search/functions_d.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_d.js b/search/functions_d.js deleted file mode 100644 index f94e224..0000000 --- a/search/functions_d.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['triggeradc_120',['triggerADC',['../classAutoAnalog.html#aedd70fc9f6f130c32ccb015b670f5318',1,'AutoAnalog']]] -]; diff --git a/search/functions_e.html b/search/functions_e.html deleted file mode 100644 index 22d2a6b..0000000 --- a/search/functions_e.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/functions_e.js b/search/functions_e.js deleted file mode 100644 index 86fee01..0000000 --- a/search/functions_e.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['volume_121',['volume',['../volume_8h.html#aeaa6b9d4ebf06bdf8d2dc8728667a81d',1,'volume.h']]], - ['volumeset_122',['volumeSet',['../volume_8h.html#af534741cba67f1a9f2c5985b218ac36f',1,'volume.h']]] -]; diff --git a/search/pages_0.js b/search/pages_0.js index 4a6e36e..ca5582a 100644 --- a/search/pages_0.js +++ b/search/pages_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['automatic_20analog_20audio_20library_20for_20arduino_164',['Automatic Analog Audio Library for Arduino',['../index.html',1,'']]] + ['automatic_20analog_20audio_20library_20for_20arduino_56',['Automatic Analog Audio Library for Arduino',['../index.html',1,'']]] ]; diff --git a/search/searchdata.js b/search/searchdata.js index a1283d7..b99b734 100644 --- a/search/searchdata.js +++ b/search/searchdata.js @@ -1,11 +1,11 @@ var indexSectionsWithContent = { - 0: "abcdefgilmnprstvw", - 1: "aw", - 2: "amrvw", - 3: "abcdefgilmprstv", - 4: "abcdefnprstvw", - 5: "adm", + 0: "abdefgrst", + 1: "a", + 2: "a", + 3: "abdefgrst", + 4: "ad", + 5: "a", 6: "a" }; diff --git a/search/variables_0.js b/search/variables_0.js index 7cdef31..bdb807c 100644 --- a/search/variables_0.js +++ b/search/variables_0.js @@ -1,9 +1,7 @@ var searchData= [ - ['adcbitspersample_123',['adcBitsPerSample',['../classAutoAnalog.html#adf54b09207afbc94726a48642e3b611a',1,'AutoAnalog']]], - ['adcbuffer_124',['adcBuffer',['../classAutoAnalog.html#a257d95cf5a0b43deaef32b761fc25792',1,'AutoAnalog']]], - ['adcbuffer16_125',['adcBuffer16',['../classAutoAnalog.html#a64b99ccc41ac44398397f12c89d292f3',1,'AutoAnalog']]], - ['audiofile_126',['audioFile',['../radioRelay_8cpp.html#aeb55d028079e845b63a47487a559a265',1,'audioFile(): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#aeb55d028079e845b63a47487a559a265',1,'audioFile(): wirelessSpeaker.cpp']]], - ['audioformat_127',['audioFormat',['../structwavStruct.html#ab9930c579e2f3d5b4f87d8c7cb9216f2',1,'wavStruct']]], - ['autoadjust_128',['autoAdjust',['../classAutoAnalog.html#a34814ebff21d9b602f1f33503c070a54',1,'AutoAnalog']]] + ['adcbitspersample_45',['adcBitsPerSample',['../classAutoAnalog.html#adf54b09207afbc94726a48642e3b611a',1,'AutoAnalog']]], + ['adcbuffer_46',['adcBuffer',['../classAutoAnalog.html#a257d95cf5a0b43deaef32b761fc25792',1,'AutoAnalog']]], + ['adcbuffer16_47',['adcBuffer16',['../classAutoAnalog.html#a64b99ccc41ac44398397f12c89d292f3',1,'AutoAnalog']]], + ['autoadjust_48',['autoAdjust',['../classAutoAnalog.html#a34814ebff21d9b602f1f33503c070a54',1,'AutoAnalog']]] ]; diff --git a/search/variables_1.js b/search/variables_1.js index d4046eb..cc2efca 100644 --- a/search/variables_1.js +++ b/search/variables_1.js @@ -1,7 +1,7 @@ var searchData= [ - ['bitspersample_129',['bitsPerSample',['../structwavStruct.html#a649c279336b4d4e015d40843b171aca0',1,'wavStruct']]], - ['blockalign_130',['blockAlign',['../structwavStruct.html#a8f84ef76f9cda4505e663e6899756a72',1,'wavStruct']]], - ['bufr_131',['bufR',['../radioRelay_8cpp.html#a51ee633ac58c12ea248bbd19f56083a2',1,'bufR(): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#a51ee633ac58c12ea248bbd19f56083a2',1,'bufR(): wirelessSpeaker.cpp']]], - ['byterate_132',['byteRate',['../structwavStruct.html#a53216ad90372c322e87ef53a02c1ce77',1,'wavStruct']]] + ['dacbitspersample_49',['dacBitsPerSample',['../classAutoAnalog.html#a122737d7a251d9da00ecf02be72c2e18',1,'AutoAnalog']]], + ['dacbuffer_50',['dacBuffer',['../classAutoAnalog.html#a4b5f46afb8f50e9bc28431cd467ee8bf',1,'AutoAnalog']]], + ['dacbuffer16_51',['dacBuffer16',['../classAutoAnalog.html#a85377e5dc495fdbd129db30c6c88ca71',1,'AutoAnalog']]], + ['dactaskhandle_52',['dacTaskHandle',['../classAutoAnalog.html#a58ffe6c35c52bf503720a89546ad6d61',1,'AutoAnalog']]] ]; diff --git a/search/variables_2.html b/search/variables_2.html deleted file mode 100644 index 0580462..0000000 --- a/search/variables_2.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_2.js b/search/variables_2.js deleted file mode 100644 index 004aa8e..0000000 --- a/search/variables_2.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['channelselection_133',['channelSelection',['../ESP32_2ESP32__AudioTest_2myWAV_8h.html#a8014c4ccf4648c5d80ea94067df04f63',1,'channelSelection(): myWAV.h'],['../SDAudio_2SdAudioRecording_2myWAV_8h.html#a8014c4ccf4648c5d80ea94067df04f63',1,'channelSelection(): myWAV.h'],['../SDAudio_2SdAudioWavPlayer_2myWAV_8h.html#a8014c4ccf4648c5d80ea94067df04f63',1,'channelSelection(): myWAV.h']]], - ['chunkid_134',['chunkID',['../structwavStruct.html#a346dee1d280bde886ebe0a7ced927447',1,'wavStruct']]], - ['chunksize_135',['chunkSize',['../structwavStruct.html#acdbd8eafa546e65f2a2dea3ef307048d',1,'wavStruct']]], - ['counter_136',['counter',['../myRecording_8h.html#a51322ddb267b4729d6b5f2bb05d49fff',1,'myRecording.h']]] -]; diff --git a/search/variables_3.html b/search/variables_3.html deleted file mode 100644 index 0d69e76..0000000 --- a/search/variables_3.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_3.js b/search/variables_3.js deleted file mode 100644 index 0e81beb..0000000 --- a/search/variables_3.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['dacbitspersample_137',['dacBitsPerSample',['../classAutoAnalog.html#a122737d7a251d9da00ecf02be72c2e18',1,'AutoAnalog']]], - ['dacbuffer_138',['dacBuffer',['../classAutoAnalog.html#a4b5f46afb8f50e9bc28431cd467ee8bf',1,'AutoAnalog']]], - ['dacbuffer16_139',['dacBuffer16',['../classAutoAnalog.html#a85377e5dc495fdbd129db30c6c88ca71',1,'AutoAnalog']]] -]; diff --git a/search/variables_4.html b/search/variables_4.html deleted file mode 100644 index a4b6506..0000000 --- a/search/variables_4.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_4.js b/search/variables_4.js deleted file mode 100644 index 2e520d3..0000000 --- a/search/variables_4.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['endposition_140',['endPosition',['../ESP32_2ESP32__AudioTest_2myWAV_8h.html#a3fc7d72297512a5563c67a45a56a4153',1,'myWAV.h']]] -]; diff --git a/search/variables_5.html b/search/variables_5.html deleted file mode 100644 index 7e345d1..0000000 --- a/search/variables_5.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_5.js b/search/variables_5.js deleted file mode 100644 index d608c82..0000000 --- a/search/variables_5.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['fail_141',['fail',['../AudioRadioRelay_2myRadio_8h.html#a0a4001078da73398d49b9470fcccb48a',1,'fail(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#a0a4001078da73398d49b9470fcccb48a',1,'fail(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#a0a4001078da73398d49b9470fcccb48a',1,'fail(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#a0a4001078da73398d49b9470fcccb48a',1,'fail(): myRadio.h']]], - ['format_142',['format',['../structwavStruct.html#acd9b4d0d807fc2a1d896ee0fc4aaecd3',1,'wavStruct']]] -]; diff --git a/search/variables_6.html b/search/variables_6.html deleted file mode 100644 index 7d48e75..0000000 --- a/search/variables_6.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_6.js b/search/variables_6.js deleted file mode 100644 index f7e7438..0000000 --- a/search/variables_6.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['numchannels_143',['numChannels',['../structwavStruct.html#a18fe2dc1d4211c2f43e776fcc36a7215',1,'wavStruct']]] -]; diff --git a/search/variables_7.html b/search/variables_7.html deleted file mode 100644 index 5c26340..0000000 --- a/search/variables_7.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_7.js b/search/variables_7.js deleted file mode 100644 index 8996e49..0000000 --- a/search/variables_7.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['pipeno_144',['pipeNo',['../AudioRadioRelay_2myRadio_8h.html#a55e5cc60176f662c9c5060e7a21813a0',1,'pipeNo(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#a55e5cc60176f662c9c5060e7a21813a0',1,'pipeNo(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#a55e5cc60176f662c9c5060e7a21813a0',1,'pipeNo(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#a55e5cc60176f662c9c5060e7a21813a0',1,'pipeNo(): myRadio.h']]], - ['pipes_145',['pipes',['../AudioRadioRelay_2myRadio_8h.html#a7f088b1645731f3771cdd4b766b17262',1,'pipes(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#a7f088b1645731f3771cdd4b766b17262',1,'pipes(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#a7f088b1645731f3771cdd4b766b17262',1,'pipes(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#a7f088b1645731f3771cdd4b766b17262',1,'pipes(): myRadio.h'],['../radioRelay_8cpp.html#a7f088b1645731f3771cdd4b766b17262',1,'pipes(): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#a7f088b1645731f3771cdd4b766b17262',1,'pipes(): wirelessSpeaker.cpp']]] -]; diff --git a/search/variables_8.html b/search/variables_8.html deleted file mode 100644 index dc9ec54..0000000 --- a/search/variables_8.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_8.js b/search/variables_8.js deleted file mode 100644 index 72b7a84..0000000 --- a/search/variables_8.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['reads_146',['reads',['../radioRelay_8cpp.html#abfb6af9133722c93d469d8ba887534ec',1,'reads(): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#abfb6af9133722c93d469d8ba887534ec',1,'reads(): wirelessSpeaker.cpp']]], - ['rx_147',['rx',['../AudioRadioRelay_2myRadio_8h.html#afd7e1b908d70e52f7dd4a98ec79829b9',1,'rx(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#afd7e1b908d70e52f7dd4a98ec79829b9',1,'rx(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#afd7e1b908d70e52f7dd4a98ec79829b9',1,'rx(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#afd7e1b908d70e52f7dd4a98ec79829b9',1,'rx(): myRadio.h']]] -]; diff --git a/search/variables_9.html b/search/variables_9.html deleted file mode 100644 index 7b01475..0000000 --- a/search/variables_9.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_9.js b/search/variables_9.js deleted file mode 100644 index 80a311e..0000000 --- a/search/variables_9.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['samplerate_148',['sampleRate',['../structwavStruct.html#a0545b5a56a2f54e4e3b585f79311288e',1,'wavStruct']]], - ['subchunk2id_149',['subChunk2ID',['../structwavStruct.html#a1a756e35b87345883760b4ee76f6d829',1,'wavStruct']]], - ['subchunk2size_150',['subChunk2Size',['../structwavStruct.html#ae4c12d2a733c9a28a3be671c2522fc54',1,'wavStruct']]], - ['subchunkid_151',['subchunkID',['../structwavStruct.html#a3291d263479184a24ec2c9dad9190d78',1,'wavStruct']]], - ['subchunksize_152',['subchunkSize',['../structwavStruct.html#a1c2fe6179f4bae87a4c4794d07011a08',1,'wavStruct']]], - ['sz_153',['sz',['../radioRelay_8cpp.html#a2c1bd10d4bbc82d2d6c052c5842c0c8c',1,'sz(): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#a2c1bd10d4bbc82d2d6c052c5842c0c8c',1,'sz(): wirelessSpeaker.cpp']]] -]; diff --git a/search/variables_a.html b/search/variables_a.html deleted file mode 100644 index 52a724d..0000000 --- a/search/variables_a.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_a.js b/search/variables_a.js deleted file mode 100644 index 4865d0e..0000000 --- a/search/variables_a.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['tx_154',['tx',['../AudioRadioRelay_2myRadio_8h.html#a3b1e88519ca75747960d51b86b2c5e95',1,'tx(): myRadio.h'],['../SimpleSine_2myRadio_8h.html#a3b1e88519ca75747960d51b86b2c5e95',1,'tx(): myRadio.h'],['../WirelessMicrophone_2myRadio_8h.html#a3b1e88519ca75747960d51b86b2c5e95',1,'tx(): myRadio.h'],['../WirelessSpeaker_2myRadio_8h.html#a3b1e88519ca75747960d51b86b2c5e95',1,'tx(): myRadio.h']]] -]; diff --git a/search/variables_b.html b/search/variables_b.html deleted file mode 100644 index f376b27..0000000 --- a/search/variables_b.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_b.js b/search/variables_b.js deleted file mode 100644 index 396a246..0000000 --- a/search/variables_b.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['volumevar_155',['volumeVar',['../volume_8h.html#ae519f5749175866b7a85b7f34cabb646',1,'volume.h']]] -]; diff --git a/search/variables_c.html b/search/variables_c.html deleted file mode 100644 index 6019eba..0000000 --- a/search/variables_c.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
    -
    Loading...
    -
    - -
    Searching...
    -
    No Matches
    - -
    - - diff --git a/search/variables_c.js b/search/variables_c.js deleted file mode 100644 index 14a6ace..0000000 --- a/search/variables_c.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['writes_156',['writes',['../radioRelay_8cpp.html#a507ae215097affc6f14d232dcfd39db0',1,'writes(): radioRelay.cpp'],['../wirelessSpeaker_8cpp.html#a507ae215097affc6f14d232dcfd39db0',1,'writes(): wirelessSpeaker.cpp']]] -]; diff --git a/structwavStruct-members.html b/structwavStruct-members.html deleted file mode 100644 index 5e7b5c3..0000000 --- a/structwavStruct-members.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -Auto Analog Audio: Member List - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - -
    -
    -
    -
    wavStruct Member List
    -
    - - - - - diff --git a/structwavStruct.html b/structwavStruct.html deleted file mode 100644 index 93a171d..0000000 --- a/structwavStruct.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - - - -Auto Analog Audio: wavStruct Struct Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - -
    -
    - -
    -
    wavStruct Struct Reference
    -
    -
    - -

    #include <myRecording.h>

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    -Public Attributes

    const char chunkID [4] = {'R', 'I', 'F', 'F'}
     
    uint32_t chunkSize = 36
     
    const char format [4] = {'W', 'A', 'V', 'E'}
     
    const char subchunkID [4] = {'f', 'm', 't', ' '}
     
    const uint32_t subchunkSize = 16
     
    const uint16_t audioFormat = 1
     
    uint16_t numChannels = 1
     
    uint32_t sampleRate = 11000
     
    uint32_t byteRate = 11000
     
    uint16_t blockAlign = 1
     
    uint16_t bitsPerSample = 8
     
    const char subChunk2ID [4] = {'d', 'a', 't', 'a'}
     
    uint32_t subChunk2Size = 0
     
    -

    Detailed Description

    -
    -

    Definition at line 6 of file myRecording.h.

    -

    Member Data Documentation

    - -

    ◆ chunkID

    - -
    -
    - - - - -
    const char wavStruct::chunkID[4] = {'R', 'I', 'F', 'F'}
    -
    - -

    Definition at line 7 of file myRecording.h.

    - -
    -
    - -

    ◆ chunkSize

    - -
    -
    - - - - -
    uint32_t wavStruct::chunkSize = 36
    -
    - -

    Definition at line 8 of file myRecording.h.

    - -
    -
    - -

    ◆ format

    - -
    -
    - - - - -
    const char wavStruct::format[4] = {'W', 'A', 'V', 'E'}
    -
    - -

    Definition at line 9 of file myRecording.h.

    - -
    -
    - -

    ◆ subchunkID

    - -
    -
    - - - - -
    const char wavStruct::subchunkID[4] = {'f', 'm', 't', ' '}
    -
    - -

    Definition at line 10 of file myRecording.h.

    - -
    -
    - -

    ◆ subchunkSize

    - -
    -
    - - - - -
    const uint32_t wavStruct::subchunkSize = 16
    -
    - -

    Definition at line 11 of file myRecording.h.

    - -
    -
    - -

    ◆ audioFormat

    - -
    -
    - - - - -
    const uint16_t wavStruct::audioFormat = 1
    -
    - -

    Definition at line 12 of file myRecording.h.

    - -
    -
    - -

    ◆ numChannels

    - -
    -
    - - - - -
    uint16_t wavStruct::numChannels = 1
    -
    - -

    Definition at line 13 of file myRecording.h.

    - -
    -
    - -

    ◆ sampleRate

    - -
    -
    - - - - -
    uint32_t wavStruct::sampleRate = 11000
    -
    - -

    Definition at line 14 of file myRecording.h.

    - -
    -
    - -

    ◆ byteRate

    - -
    -
    - - - - -
    uint32_t wavStruct::byteRate = 11000
    -
    - -

    Definition at line 15 of file myRecording.h.

    - -
    -
    - -

    ◆ blockAlign

    - -
    -
    - - - - -
    uint16_t wavStruct::blockAlign = 1
    -
    - -

    Definition at line 16 of file myRecording.h.

    - -
    -
    - -

    ◆ bitsPerSample

    - -
    -
    - - - - -
    uint16_t wavStruct::bitsPerSample = 8
    -
    - -

    Definition at line 17 of file myRecording.h.

    - -
    -
    - -

    ◆ subChunk2ID

    - -
    -
    - - - - -
    const char wavStruct::subChunk2ID[4] = {'d', 'a', 't', 'a'}
    -
    - -

    Definition at line 18 of file myRecording.h.

    - -
    -
    - -

    ◆ subChunk2Size

    - -
    -
    - - - - -
    uint32_t wavStruct::subChunk2Size = 0
    -
    - -

    Definition at line 19 of file myRecording.h.

    - -
    -
    -
    The documentation for this struct was generated from the following file: -
    - - - - diff --git a/volume_8h.html b/volume_8h.html deleted file mode 100644 index 4b75dce..0000000 --- a/volume_8h.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/ESP32/ESP32_AudioTest/volume.h File Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    volume.h File Reference
    -
    -
    - -

    Go to the source code of this file.

    - - - - - - -

    -Functions

    void volume (bool val)
     
    void volumeSet (float val)
     
    - - - -

    -Variables

    float volumeVar = 1.00
     
    -

    Function Documentation

    - -

    ◆ volume()

    - -
    -
    - - - - - - - - -
    void volume (bool val)
    -
    - -

    Definition at line 6 of file volume.h.

    - -
    -
    - -

    ◆ volumeSet()

    - -
    -
    - - - - - - - - -
    void volumeSet (float val)
    -
    - -

    Definition at line 28 of file volume.h.

    - -
    -
    -

    Variable Documentation

    - -

    ◆ volumeVar

    - -
    -
    - - - - -
    float volumeVar = 1.00
    -
    - -

    Definition at line 2 of file volume.h.

    - -
    -
    -
    - - - - diff --git a/volume_8h_source.html b/volume_8h_source.html deleted file mode 100644 index 9b8f15d..0000000 --- a/volume_8h_source.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/ESP32/ESP32_AudioTest/volume.h Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    volume.h
    -
    -
    -Go to the documentation of this file.
    1 
    -
    2 float volumeVar = 1.00;
    -
    3 
    -
    4 
    -
    5 
    -
    6 void volume(bool val) {
    -
    7 
    -
    8  if (val) {
    -
    9  if (volumeVar < 15) {
    -
    10  volumeVar = volumeVar - 0.1 >= 1.0 ? volumeVar - 0.1 : volumeVar;
    -
    11  } else {
    -
    12  volumeVar -= 1;
    -
    13  }
    -
    14  } else {
    -
    15  if (volumeVar < 15) {
    -
    16  volumeVar += .1;
    -
    17  } else if (volumeVar < 127) {
    -
    18  volumeVar += 1;
    -
    19  }
    -
    20  }
    -
    21  Serial.println(volumeVar);
    -
    22  //Note: 50% digital reduction may not equal 50% reduction in audible sound output
    -
    23  Serial.print("Volume Setting: ");
    -
    24  Serial.print((128 - volumeVar) / 127.0 * 100);
    -
    25  Serial.println("%");
    -
    26 }
    -
    27 
    -
    28 void volumeSet(float val) {
    -
    29 
    -
    30  if (val >= 1 && val <= 127) {
    -
    31  volumeVar = val;
    -
    32  Serial.print("Volume Setting: ");
    -
    33  Serial.print((128 - volumeVar) / 127.0 * 100);
    -
    34  Serial.println("%");
    -
    35  }
    -
    36 }
    -
    float volumeVar
    Definition: volume.h:2
    -
    void volume(bool val)
    Definition: volume.h:6
    -
    void volumeSet(float val)
    Definition: volume.h:28
    -
    - - - - diff --git a/wirelessSpeaker_8cpp.html b/wirelessSpeaker_8cpp.html deleted file mode 100644 index 7706686..0000000 --- a/wirelessSpeaker_8cpp.html +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/WirelessTx_RPi/wirelessSpeaker.cpp File Reference - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    - -
    -
    wirelessSpeaker.cpp File Reference
    -
    -
    -
    #include <cstdlib>
    -#include <iostream>
    -#include <sstream>
    -#include <string>
    -#include <RF24/RF24.h>
    -#include <unistd.h>
    -#include <fstream>
    -
    -

    Go to the source code of this file.

    - - - - - - - - -

    -Functions

    RF24 radio (25, 0)
     
    void intHandler ()
     
    int main (int argc, char **argv)
     
    - - - - - - - - - - - - - -

    -Variables

    char audioFile [] = "Guitar16b44kMono.wav"
     
    const uint64_t pipes [14] = { 0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL, 0x544d52683CLL, 0x544d526846LL, 0x544d526850LL, 0x544d52685ALL, 0x544d526820LL, 0x544d52686ELL, 0x544d52684BLL, 0x544d526841LL, 0x544d526855LL, 0x544d52685FLL, 0x544d526869LL}
     
    unsigned int sz = 0
     
    uint32_t reads = 0
     
    uint32_t writes = 0
     
    uint8_t bufR [32]
     
    -

    Function Documentation

    - -

    ◆ radio()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    RF24 radio (25 ,
     
    )
    -
    - -
    -
    - -

    ◆ intHandler()

    - -
    -
    - - - - - - - -
    void intHandler ()
    -
    - -

    Definition at line 151 of file radioRelay.cpp.

    - -
    -
    - -

    ◆ main()

    - -
    -
    - - - - - - - - - - - - - - - - - - -
    int main (int argc,
    char ** argv 
    )
    -
    - -

    Definition at line 41 of file wirelessSpeaker.cpp.

    - -
    -
    -

    Variable Documentation

    - -

    ◆ audioFile

    - -
    -
    - - - - -
    char audioFile[] = "Guitar16b44kMono.wav"
    -
    - -

    Definition at line 29 of file wirelessSpeaker.cpp.

    - -
    -
    - -

    ◆ pipes

    - -
    -
    - - - - -
    const uint64_t pipes[14] = { 0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL, 0x544d52683CLL, 0x544d526846LL, 0x544d526850LL, 0x544d52685ALL, 0x544d526820LL, 0x544d52686ELL, 0x544d52684BLL, 0x544d526841LL, 0x544d526855LL, 0x544d52685FLL, 0x544d526869LL}
    -
    - -

    Definition at line 35 of file wirelessSpeaker.cpp.

    - -
    -
    - -

    ◆ sz

    - -
    -
    - - - - -
    unsigned int sz = 0
    -
    - -

    Definition at line 36 of file wirelessSpeaker.cpp.

    - -
    -
    - -

    ◆ reads

    - -
    -
    - - - - -
    uint32_t reads = 0
    -
    - -

    Definition at line 38 of file wirelessSpeaker.cpp.

    - -
    -
    - -

    ◆ writes

    - -
    -
    - - - - -
    uint32_t writes = 0
    -
    - -

    Definition at line 38 of file wirelessSpeaker.cpp.

    - -
    -
    - -

    ◆ bufR

    - -
    -
    - - - - -
    uint8_t bufR[32]
    -
    - -

    Definition at line 39 of file wirelessSpeaker.cpp.

    - -
    -
    -
    - - - - diff --git a/wirelessSpeaker_8cpp_source.html b/wirelessSpeaker_8cpp_source.html deleted file mode 100644 index 9b86354..0000000 --- a/wirelessSpeaker_8cpp_source.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - -Auto Analog Audio: examples/WirelessTx_RPi/wirelessSpeaker.cpp Source File - - - - - - - - - - -
    -
    - - - - - - -
    -
    Auto Analog Audio -  1.42 -
    -
    TMRh20 2020 - Automatic DAC, ADC & Timers on Arduino Due
    -
    -
    - - - - - - - - -
    -
    - - -
    - -
    - - -
    -
    -
    -
    wirelessSpeaker.cpp
    -
    -
    -Go to the documentation of this file.
    1 /*
    -
    2 TMRh20 2016
    -
    3 
    -
    4  This program is free software; you can redistribute it and/or
    -
    5  modify it under the terms of the GNU General Public License
    -
    6  version 2 as published by the Free Software Foundation.
    -
    7  */
    -
    8 
    -
    14 #include <cstdlib>
    -
    15 #include <iostream>
    -
    16 #include <sstream>
    -
    17 #include <string>
    -
    18 #include <RF24/RF24.h>
    -
    19 #include <unistd.h>
    -
    20 #include <fstream>
    -
    21 
    -
    22 using namespace std;
    -
    23 
    -
    24 /****************** Raspberry Pi ***********************/
    -
    25 
    -
    26 RF24 radio(25, 0);
    -
    27 
    -
    28 // File should be mono, wav format
    -
    29 char audioFile[] = "Guitar16b44kMono.wav";
    -
    30 //char audioFile[] = "Guitar16b32kMono.wav";
    -
    31 //char audioFile[] = "Guitar16b24kMono.wav";
    -
    32 /**************************************************************/
    -
    33 
    -
    34 // The addresses used in RF24Audio
    -
    35 const uint64_t pipes[14] = { 0xABCDABCD71LL, 0x544d52687CLL, 0x544d526832LL, 0x544d52683CLL, 0x544d526846LL, 0x544d526850LL, 0x544d52685ALL, 0x544d526820LL, 0x544d52686ELL, 0x544d52684BLL, 0x544d526841LL, 0x544d526855LL, 0x544d52685FLL, 0x544d526869LL};
    -
    36 unsigned int sz = 0;
    -
    37 void intHandler();
    -
    38 uint32_t reads = 0, writes = 0;
    -
    39 uint8_t bufR[32];
    -
    40 
    -
    41 int main(int argc, char** argv) {
    -
    42 
    -
    43  cout << "RF24Audio On Rpi\n";
    -
    44 
    -
    45  // Configure radio settings for RF24Audio
    -
    46  radio.begin();
    -
    47  radio.setChannel(1);
    -
    48  radio.setPALevel(RF24_PA_MAX);
    -
    49  radio.setDataRate(RF24_1MBPS);
    -
    50  radio.setAutoAck(0);
    -
    51  radio.setCRCLength(RF24_CRC_8);
    -
    52  radio.setAddressWidth(5);
    -
    53 
    -
    54  radio.openWritingPipe(pipes[1]);
    -
    55  radio.openReadingPipe(1, pipes[0]);
    -
    56  radio.startListening();
    -
    57  radio.txDelay = 0;
    -
    58  radio.printDetails();
    -
    59  radio.stopListening();
    -
    60 
    -
    61  radio.stopListening();
    -
    62 
    -
    63 
    -
    64  uint32_t sampleDelay = 2000;
    -
    65 
    -
    66  // Read the entire wav file into memory
    -
    67  streampos size;
    -
    68  char * memblock;
    -
    69 
    -
    70  ifstream file (audioFile, ios::in | ios::binary | ios::ate);
    -
    71  if (file.is_open()) {
    -
    72 
    -
    73  size = file.tellg();//file.tellg();
    -
    74  sz = file.tellg();
    -
    75  printf("%d\n", sz);
    -
    76  memblock = new char [sz];
    -
    77  file.seekg (0, ios::beg);
    -
    78  file.read (memblock, sz);
    -
    79  file.close();
    -
    80  cout << "the entire file content is in memory\n";
    -
    81 
    -
    82  } else {
    -
    83  exit(1);
    -
    84  }
    -
    85 
    -
    86  // Get the sample rate of the wav file
    -
    87  uint32_t sampleRate = memblock[24];
    -
    88  sampleRate |= memblock[25] << 8;
    -
    89  sampleRate |= memblock[26] << 16;
    -
    90  sampleRate |= memblock[27] << 24;
    -
    91  cout << "Sample Rate " << sampleRate << "\n";
    -
    92 
    -
    93  // Calculate the required delay based on sample rate
    -
    94  sampleDelay = (1000000.0 / sampleRate * 32) - 1;
    -
    95  cout << "Sample Delay " << sampleDelay << "\n";
    -
    96 
    -
    97 
    -
    98  // Data starts at byte 44, after the .wav header as long as there is no metadata
    -
    99  int32_t filePos = 44;
    -
    100  cout << "Output via radio...\n";
    -
    101 
    -
    102  //Sending 16-bit/2-Byte samples, so need double sample rate
    -
    103  sampleDelay /= 2;
    -
    104  //Slight offset to ensure sample rate is close to accurate
    -
    105  sampleDelay -= 48;
    -
    106 
    -
    107  //Send the sample rate to the wireless speaker using acknowledged payloads
    -
    108  radio.setAutoAck(0, 1);
    -
    109  radio.openWritingPipe(pipes[2]);
    -
    110  radio.writeFast(&sampleRate, 4);
    -
    111  radio.txStandBy();
    -
    112  //Disable autoack/use multicast and change to the multicast pipe
    -
    113  radio.setAutoAck(0, 0);
    -
    114  radio.openWritingPipe(pipes[1]);
    -
    115  delay(50); //Give the recipient a ms or two to process and setup timers, DAC, ADC
    -
    116 
    -
    117 
    -
    118  uint32_t dTimer = 0;
    -
    119 
    -
    120  while (1) {
    -
    121 
    -
    122  radio.writeFast(&memblock[filePos], 32, 1);
    -
    123 
    -
    124  ++writes;
    -
    125 
    -
    126  delayMicroseconds(sampleDelay);
    -
    127  filePos += 32;
    -
    128  if (filePos >= sz) {
    -
    129  break;
    -
    130  }
    -
    131  if (millis() - dTimer > 1000) {
    -
    132  dTimer = millis();
    -
    133  printf("%d %d\n", reads, writes);
    -
    134  reads = writes = 0;
    -
    135  printf("%d %d %d %d\n", bufR[0], bufR[1], bufR[2], bufR[3]);
    -
    136  }
    -
    137  } // loop
    -
    138 
    -
    139  cout << "Complete, exit...\n";
    -
    140  delete[] memblock;
    -
    141 
    -
    142 } // main
    -
    143 
    -
    144 
    -
    unsigned int sz
    -
    int main(int argc, char **argv)
    -
    uint32_t writes
    -
    uint8_t bufR[32]
    -
    RF24 radio(25, 0)
    -
    const uint64_t pipes[14]
    -
    uint32_t reads
    -
    char audioFile[]
    -
    void intHandler()
    Definition: radioRelay.cpp:151
    -
    - - - -