Update to include basic audio functionality. Compiles. Need to add more debug checking.

This commit is contained in:
Rob French
2021-01-30 00:02:57 -06:00
parent 87b6e3fbde
commit 091f414409
9 changed files with 428 additions and 0 deletions

45
TeensyDSP/TR.cpp Normal file
View File

@@ -0,0 +1,45 @@
//======================================================================
// TR.cpp
//======================================================================
#include <Arduino.h>
#include "TR.h"
UBitxTR TR(DSP);
void UBitxTR::update(bool cw) {
updatePTT();
updateVOX();
updateKey();
if (isTX) {
// If we are currently transmitting, then ANY T/R release (key
// release) will result in exitting transmit... except for VOX
// and CAT which can only function as a release if it was enabled.
if (pttReleased() || keyReleased() ||
(voxEnabled && voxDeactivated()) ||
(catEnabled && catDeactivated())) {
// first, stop transmitting; then, setup RX audio
DBGCMD( setRX() );
DBGCMD( dsp.rx() );
}
} else {
if ((pttEnabled && pttPressed()) || (voxEnabled && voxActivated())) {
// first, setup TX audio; then, start transmitting (from Mic)
DBGCMD( dsp.txMicIn() );
DBGCMD( setTX() );
} else if (keyEnabled && keyPressed()) {
// first, setup TX audio; then, start transmitting (from Line In)
DBGCMD( dsp.txLineIn() );
DBGCMD( setTX() );
} else if (catEnabled && catActivated()) {
// first, setup TX audio; then, start transmitting (USB)
DBGCMD( dsp.txUSBIn() );
DBGCMD( setTX() );
}
}
}
//======================================================================
// EOF
//======================================================================