ubitx-v5d-xcvr/ubitx_iop.h
Rob French f819e211da Significant reorganization of the code. Got rid of the audio classes,
just moved all the audio stuff into its own files.  Created a structure
for storing configuration data in... the intent is that it will be
stored to EEPROM (using EEPROMAnything).  It does compile now, but
haven't actually tried it out.  Notable learning points:  need to set
micGain AFTER selecting the mic input.  So lot of code now to take care
of trying to smoothly mute and unmute things.
2020-05-02 00:54:58 -05:00

75 lines
1.9 KiB
C

//======================================================================
// ubitx_iop.h
//======================================================================
#ifndef __ubitx_iop_h__
#define __ubitx_iop_h__
#include "audio.h"
#include "cat.h"
#include "eeprom.h"
// comment this out to disable debugging code
//#define DEBUG
enum RigMode {
MODE_SSB = 0,
MODE_DIGI,
MODE_CW,
};
// IOPConfig
// Used to store configuration parameters during runtime, as well as to
// save them to EEPROM.
//
// NOTE: Need to put version info and a version check here.
struct IOPConfig {
// RECEIVE PARAMETERS
// rig-in parameters (RX)
uint8_t rxRigInLevel = 5;
float rxRigInVol = 1.0;
float rxRigInCal = 1.0;
// USB-in parameters (RX) - debug/monitor use only
bool rxUSBInEnable = false;
float rxUSBInVol = 1.0;
float rxUSBInCal = 1.0;
// speaker-out (DAC) parameters (RX)
float rxSpkrOutCal = 1.0;
// line-out parameters (RX)
uint8_t rxLineOutLevel = 29;
float rxLineOutCal = 1.0;
// USB-out parameters (RX)
float rxUSBOutCal = 1.0;
// TRANSMIT PARAMETERS
// microphone-in parameters (TX)
uint8_t txMicInGain = 32;
float txMicInVol = 1.0;
float txMicInCal = 1.0;
// line-in parameters (TX)
uint8_t txLineInLevel = 5;
float txLineInVol = 1.0;
float txLineInCal = 1.0;
// USB-in parameters (TX)
float txUSBInVol = 1.0;
float txUSBInCal = 1.0;
// rig-out parameters (TX)
uint8_t txRigOutLevel = 29;
float txRigOutCal = 1.0;
// USB-out parameters (TX)- debug/monitor use only
bool txUSBOutEnable = true;
float txUSBOutCal = 1.0;
};
extern RigMode rigMode;
extern IOPConfig iopConfig;
#endif
//======================================================================
// EOF
//======================================================================