/* The ubitx is powered by an arduino nano. The pin assignment is as folows
*
*/
#define ENC_A (A0) // Tuning encoder interface
#define ENC_B (A1) // Tuning encoder interface
#define FBUTTON (A2) // Tuning encoder interface
#define PTT (A3) // Sense it for ssb and as a straight key for cw operation
#define ANALOG_KEYER (A6) // This is used as keyer. The analog port has 4.7K pull up resistor. Details are in the circuit description on www.hfsignals.com
#define ANALOG_SPARE (A7) // Not used yet
#define TX_RX (7) // Pin from the Nano to the radio to switch to TX (HIGH) and RX(LOW)
#define CW_TONE (6) // Generates a square wave sidetone while sending the CW.
#define TX_LPF_A (5) // The 30 MHz LPF is permanently connected in the output of the PA...
#define TX_LPF_B (4) // ...Alternatively, either 3.5 MHz, 7 MHz or 14 Mhz LPFs are...
#define TX_LPF_C (3) // ...switched inline depending upon the TX frequency
#define CW_KEY (2) // Pin goes high during CW keydown to transmit the carrier.
// ... The CW_KEY is needed in addition to the TX/RX key as the...
//functions of the setup menu. implemented in seteup.cpp
voiddoSetup2();//main setup function, displays the setup menu, calls various dialog boxes
voidsetupBFO();
voidsetupFreq();
//main functions to check if any button is pressed and other user interface events
voiddoCommands();//does the commands with encoder to jump from button to button
voidcheckTouch();//does the commands with a touch on the buttons
/* these are functiosn implemented in ubitx_si5351.cpp */
voidsi5351bx_setfreq(uint8_tclknum,uint32_tfout);
voidinitOscillators();
voidsi5351_set_calibration(int32_tcal);//calibration is a small value that is nudged to make up for the inaccuracies of the reference 25 MHz crystal frequency